@openpeepshq/react 0.9.23 → 0.11.0

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 (272) hide show
  1. package/dist/components/RelationCapabilitiesEditor.js +3 -3
  2. package/dist/components/RoleCapabilityMatrix.js +2 -2
  3. package/dist/components/accounts/SignUpLoginModal.js +1 -1
  4. package/dist/components/configuration/ConfigurationList.js +2 -2
  5. package/dist/components/conversations/ConversationMessageBubble.js +8 -1
  6. package/dist/components/conversations/CreateNewConversation.js +34 -17
  7. package/dist/components/form/ImageEditModal.js +2 -2
  8. package/dist/components/groups/ChangeGroupRolesModal.js +1 -1
  9. package/dist/components/groups/ConfirmGroupExitModal.js +1 -1
  10. package/dist/components/groups/ConfirmMemberRemovalModal.js +1 -1
  11. package/dist/components/groups/DeleteGroupModal.js +1 -1
  12. package/dist/components/groups/GroupForm.js +2 -2
  13. package/dist/components/groups/GroupNotificationSettingsModal.js +2 -2
  14. package/dist/components/jams/JamCallParticipant.js +4 -3
  15. package/dist/components/jams/JamGuestForm.js +1 -1
  16. package/dist/components/jams/jamEventActions.d.ts +10 -0
  17. package/dist/components/jams/jamEventActions.js +13 -0
  18. package/dist/components/navigation/ContentHeader.js +1 -1
  19. package/dist/components/navigation/FooterMobile.js +1 -1
  20. package/dist/components/navigation/SideBar.js +3 -3
  21. package/dist/components/post/FullPostLayout.js +1 -1
  22. package/dist/components/post/index.d.ts +1 -0
  23. package/dist/components/post/index.js +1 -0
  24. package/dist/components/post/pieces/EventRsvpList.js +1 -1
  25. package/dist/components/post/pieces/EventRsvpScopeDialog.js +2 -2
  26. package/dist/components/post/pieces/EventWaitlistJoinDialog.js +1 -1
  27. package/dist/components/post/pieces/GalleryModal.js +1 -1
  28. package/dist/components/post/pieces/modals/DeletePostModal.js +2 -2
  29. package/dist/components/post/post-form/ComposeAttachments.d.ts +2 -0
  30. package/dist/components/post/post-form/ComposeAttachments.js +8 -0
  31. package/dist/components/post/post-form/DescriptionEditModal.js +1 -1
  32. package/dist/components/post/post-form/EditPostModal.js +2 -2
  33. package/dist/components/post/post-form/EventForm.js +4 -26
  34. package/dist/components/post/post-form/PostAudienceSelector.js +2 -2
  35. package/dist/components/post/post-form/ReplyModal.js +1 -1
  36. package/dist/components/post/types/event/FullEvent.js +3 -3
  37. package/dist/components/post/types/resource/FullResource.js +2 -1
  38. package/dist/components/preview-link/RemotePreviewLink.js +32 -4
  39. package/dist/components/preview-link/RemotePreviewLink.test.d.ts +1 -0
  40. package/dist/components/preview-link/RemotePreviewLink.test.js +118 -0
  41. package/dist/components/profile/ProfileActivitySummary.js +4 -4
  42. package/dist/components/profile/ProfileBadge.js +1 -1
  43. package/dist/components/profile/ProfilePageAction.js +1 -1
  44. package/dist/components/profile/ProfilePostsAndReplies.js +1 -1
  45. package/dist/components/profile/ProfileSelector.js +1 -1
  46. package/dist/components/profile/ReportProfileOrPostModal.js +4 -2
  47. package/dist/components/resources/CategoryPathPicker.js +1 -1
  48. package/dist/components/resources/ResourceCard.js +5 -3
  49. package/dist/components/resources/ResourceLibrary.js +61 -8
  50. package/dist/components/resources/ResourceLibrary.test.d.ts +1 -0
  51. package/dist/components/resources/ResourceLibrary.test.js +122 -0
  52. package/dist/components/server-data/context.d.ts +25 -16
  53. package/dist/contexts/openpeeps/hooks/admin.d.ts +2 -2
  54. package/dist/contexts/openpeeps/hooks/auth.d.ts +1 -1
  55. package/dist/contexts/openpeeps/hooks/other.d.ts +1 -0
  56. package/dist/contexts/router/index.d.ts +8 -0
  57. package/dist/contexts/router/index.js +27 -2
  58. package/dist/hooks/conversations/dmMessage.d.ts +15 -0
  59. package/dist/hooks/conversations/dmMessage.js +12 -0
  60. package/dist/hooks/conversations/useCreateConversation.d.ts +40 -0
  61. package/dist/hooks/conversations/useCreateConversation.js +6 -0
  62. package/dist/hooks/events/useEventForm.d.ts +3 -0
  63. package/dist/hooks/events/useEventForm.js +31 -2
  64. package/dist/hooks/events/useEventForm.test.d.ts +1 -0
  65. package/dist/hooks/events/useEventForm.test.js +107 -0
  66. package/dist/hooks/index.d.ts +3 -1
  67. package/dist/hooks/index.js +3 -1
  68. package/dist/hooks/posts/useFeedPostActions.js +4 -15
  69. package/dist/hooks/posts/usePostReactionToggle.d.ts +14 -0
  70. package/dist/hooks/posts/usePostReactionToggle.js +46 -0
  71. package/dist/hooks/resources/useResourceLibrary.d.ts +8 -1
  72. package/dist/hooks/resources/useResourceLibrary.js +5 -5
  73. package/dist/hooks/settings/useAccessTokens.d.ts +3 -3
  74. package/dist/hooks/settings/useAccessTokens.js +1 -0
  75. package/dist/lib/downloadUrl.d.ts +6 -0
  76. package/dist/lib/downloadUrl.js +6 -0
  77. package/dist/navigation/menuItems.js +4 -4
  78. package/dist/pages/Explore.js +1 -1
  79. package/dist/pages/admin/ApiKeys.js +3 -3
  80. package/dist/pages/admin/ConfigEditor.js +1 -1
  81. package/dist/pages/admin/ConfigurationCommunityFeed.js +2 -2
  82. package/dist/pages/admin/ConfigurationCommunityLanguage.js +2 -2
  83. package/dist/pages/admin/ConfigurationCommunityTimezone.js +2 -2
  84. package/dist/pages/admin/ConfigurationEmail.js +2 -2
  85. package/dist/pages/admin/ConfigurationI18n.js +1 -1
  86. package/dist/pages/admin/ConfigurationSso.js +1 -1
  87. package/dist/pages/admin/ConfigurationSsoNew.js +1 -1
  88. package/dist/pages/admin/Dashboard.js +1 -1
  89. package/dist/pages/admin/Db.js +4 -4
  90. package/dist/pages/admin/DiagnosticsEmail.js +3 -3
  91. package/dist/pages/admin/DiagnosticsJob.js +2 -2
  92. package/dist/pages/admin/DiagnosticsLivekit.js +1 -1
  93. package/dist/pages/admin/DiagnosticsLogs.js +2 -2
  94. package/dist/pages/admin/DiagnosticsPerformance.js +1 -1
  95. package/dist/pages/admin/GroupMembers.js +5 -5
  96. package/dist/pages/admin/Groups.js +2 -2
  97. package/dist/pages/admin/Invites.js +3 -3
  98. package/dist/pages/admin/Media.js +2 -2
  99. package/dist/pages/admin/MemberDetail.js +7 -7
  100. package/dist/pages/admin/Members.js +2 -2
  101. package/dist/pages/admin/analytics/AnalyticsLayout.js +3 -1
  102. package/dist/pages/admin/analytics/Content.js +1 -1
  103. package/dist/pages/admin/analytics/Engagement.js +1 -1
  104. package/dist/pages/admin/analytics/Groups.js +1 -1
  105. package/dist/pages/admin/analytics/ReportSettings.js +1 -1
  106. package/dist/pages/admin/community/CommunityAccess.js +1 -1
  107. package/dist/pages/admin/community/CommunityFavicons.js +1 -1
  108. package/dist/pages/admin/community/CommunityForbiddenUsernames.js +2 -2
  109. package/dist/pages/admin/community/CommunityInfo.js +1 -1
  110. package/dist/pages/admin/community/CommunityLinks.js +7 -3
  111. package/dist/pages/admin/community/CommunityMarkdownPage.js +1 -1
  112. package/dist/pages/admin/community/CommunityProfileFields.js +2 -2
  113. package/dist/pages/admin/community/CommunityRoles.js +7 -7
  114. package/dist/pages/admin/community/CommunityTheme.js +3 -2
  115. package/dist/pages/admin/community/ThemeColorPreview.d.ts +8 -0
  116. package/dist/pages/admin/community/ThemeColorPreview.js +46 -0
  117. package/dist/pages/admin/community/ThemeColorPreview.test.d.ts +1 -0
  118. package/dist/pages/admin/community/ThemeColorPreview.test.js +49 -0
  119. package/dist/pages/admin/community/useCommunityConfig.d.ts +2 -0
  120. package/dist/pages/admin/components/AdminGroupCard.js +1 -1
  121. package/dist/pages/admin/components/EditInviteLinkModal.js +1 -1
  122. package/dist/pages/admin/components/InviteWithEmailModal.js +2 -2
  123. package/dist/pages/admin/components/InviteWithLinkModal.js +3 -3
  124. package/dist/pages/admin/components/ProfileRowActions.js +4 -4
  125. package/dist/pages/admin/components/RestoreBackupModal.js +2 -2
  126. package/dist/pages/admin/components/RestoreTestBackupModal.js +1 -1
  127. package/dist/pages/auth/Login.js +1 -1
  128. package/dist/pages/auth/Register.js +3 -3
  129. package/dist/pages/auth/RequestResetPassword.js +1 -1
  130. package/dist/pages/conversations/Info.js +1 -1
  131. package/dist/pages/conversations/Show.js +45 -15
  132. package/dist/pages/events/Index.js +1 -1
  133. package/dist/pages/feeds/Bookmarks.js +1 -1
  134. package/dist/pages/groups/EditInfo.js +1 -1
  135. package/dist/pages/groups/EditRoles.js +1 -1
  136. package/dist/pages/groups/Index.js +1 -1
  137. package/dist/pages/groups/Members.js +2 -2
  138. package/dist/pages/groups/New.js +1 -1
  139. package/dist/pages/groups/Show.js +2 -2
  140. package/dist/pages/settings/AccessTokens.js +4 -4
  141. package/dist/pages/settings/Account.js +1 -1
  142. package/dist/pages/settings/Feed.js +1 -1
  143. package/dist/pages/settings/Language.js +1 -1
  144. package/dist/pages/settings/PublicProfile.js +3 -3
  145. package/dist/pages/settings/PushEnabledDevices.js +1 -1
  146. package/dist/pages/settings/Theme.js +1 -1
  147. package/dist/pages/settings/Timezone.js +1 -1
  148. package/dist/react-native.d.ts +1 -1
  149. package/dist/react-native.js +1 -1
  150. package/package.json +9 -9
  151. package/src/components/RelationCapabilitiesEditor.tsx +3 -3
  152. package/src/components/RoleCapabilityMatrix.tsx +2 -2
  153. package/src/components/accounts/SignUpLoginModal.tsx +1 -1
  154. package/src/components/configuration/ConfigurationList.tsx +2 -2
  155. package/src/components/conversations/ConversationMessageBubble.tsx +24 -0
  156. package/src/components/conversations/CreateNewConversation.tsx +114 -78
  157. package/src/components/form/ImageEditModal.tsx +2 -2
  158. package/src/components/groups/ChangeGroupRolesModal.tsx +1 -1
  159. package/src/components/groups/ConfirmGroupExitModal.tsx +1 -1
  160. package/src/components/groups/ConfirmMemberRemovalModal.tsx +2 -2
  161. package/src/components/groups/DeleteGroupModal.tsx +2 -2
  162. package/src/components/groups/GroupForm.tsx +2 -2
  163. package/src/components/groups/GroupNotificationSettingsModal.tsx +2 -2
  164. package/src/components/jams/JamCallParticipant.tsx +4 -3
  165. package/src/components/jams/JamGuestForm.tsx +1 -1
  166. package/src/components/jams/jamEventActions.ts +21 -0
  167. package/src/components/navigation/ContentHeader.tsx +3 -3
  168. package/src/components/navigation/FooterMobile.tsx +1 -1
  169. package/src/components/navigation/SideBar.tsx +19 -5
  170. package/src/components/post/FullPostLayout.tsx +1 -1
  171. package/src/components/post/index.ts +1 -0
  172. package/src/components/post/pieces/EventRsvpList.tsx +1 -1
  173. package/src/components/post/pieces/EventRsvpScopeDialog.tsx +2 -2
  174. package/src/components/post/pieces/EventWaitlistJoinDialog.tsx +1 -1
  175. package/src/components/post/pieces/GalleryModal.tsx +1 -1
  176. package/src/components/post/pieces/modals/DeletePostModal.tsx +2 -2
  177. package/src/components/post/post-form/ComposeAttachments.tsx +10 -0
  178. package/src/components/post/post-form/DescriptionEditModal.tsx +1 -1
  179. package/src/components/post/post-form/EditPostModal.tsx +2 -2
  180. package/src/components/post/post-form/EventForm.tsx +8 -26
  181. package/src/components/post/post-form/PostAudienceSelector.tsx +2 -2
  182. package/src/components/post/post-form/ReplyModal.tsx +1 -1
  183. package/src/components/post/types/event/FullEvent.tsx +3 -3
  184. package/src/components/post/types/resource/FullResource.tsx +2 -1
  185. package/src/components/preview-link/RemotePreviewLink.tsx +92 -25
  186. package/src/components/profile/ProfileActivitySummary.tsx +4 -4
  187. package/src/components/profile/ProfileBadge.tsx +1 -1
  188. package/src/components/profile/ProfilePageAction.tsx +1 -1
  189. package/src/components/profile/ProfilePostsAndReplies.tsx +2 -2
  190. package/src/components/profile/ProfileSelector.tsx +1 -1
  191. package/src/components/profile/ReportProfileOrPostModal.tsx +4 -2
  192. package/src/components/resources/CategoryPathPicker.tsx +1 -1
  193. package/src/components/resources/ResourceCard.tsx +5 -3
  194. package/src/components/resources/ResourceLibrary.tsx +79 -4
  195. package/src/contexts/router/index.tsx +40 -1
  196. package/src/hooks/conversations/dmMessage.ts +26 -0
  197. package/src/hooks/conversations/useCreateConversation.ts +7 -0
  198. package/src/hooks/events/useEventForm.ts +32 -1
  199. package/src/hooks/index.ts +10 -1
  200. package/src/hooks/posts/useFeedPostActions.ts +4 -18
  201. package/src/hooks/posts/usePostReactionToggle.ts +60 -0
  202. package/src/hooks/resources/useResourceLibrary.ts +20 -5
  203. package/src/hooks/settings/useAccessTokens.ts +1 -0
  204. package/src/lib/downloadUrl.ts +7 -0
  205. package/src/navigation/menuItems.ts +4 -4
  206. package/src/pages/Explore.tsx +4 -4
  207. package/src/pages/admin/ApiKeys.tsx +4 -4
  208. package/src/pages/admin/ConfigEditor.tsx +1 -1
  209. package/src/pages/admin/ConfigurationCommunityFeed.tsx +2 -2
  210. package/src/pages/admin/ConfigurationCommunityLanguage.tsx +2 -2
  211. package/src/pages/admin/ConfigurationCommunityTimezone.tsx +2 -2
  212. package/src/pages/admin/ConfigurationEmail.tsx +2 -2
  213. package/src/pages/admin/ConfigurationI18n.tsx +1 -1
  214. package/src/pages/admin/ConfigurationSso.tsx +1 -1
  215. package/src/pages/admin/ConfigurationSsoNew.tsx +1 -1
  216. package/src/pages/admin/Dashboard.tsx +1 -1
  217. package/src/pages/admin/Db.tsx +6 -6
  218. package/src/pages/admin/DiagnosticsEmail.tsx +5 -5
  219. package/src/pages/admin/DiagnosticsJob.tsx +2 -2
  220. package/src/pages/admin/DiagnosticsLivekit.tsx +3 -3
  221. package/src/pages/admin/DiagnosticsLogs.tsx +4 -4
  222. package/src/pages/admin/DiagnosticsPerformance.tsx +1 -1
  223. package/src/pages/admin/GroupMembers.tsx +6 -6
  224. package/src/pages/admin/Groups.tsx +2 -2
  225. package/src/pages/admin/Invites.tsx +4 -4
  226. package/src/pages/admin/Media.tsx +2 -2
  227. package/src/pages/admin/MemberDetail.tsx +7 -7
  228. package/src/pages/admin/Members.tsx +2 -2
  229. package/src/pages/admin/analytics/AnalyticsLayout.tsx +5 -1
  230. package/src/pages/admin/analytics/Content.tsx +1 -1
  231. package/src/pages/admin/analytics/Engagement.tsx +1 -1
  232. package/src/pages/admin/analytics/Groups.tsx +1 -1
  233. package/src/pages/admin/analytics/ReportSettings.tsx +1 -1
  234. package/src/pages/admin/community/CommunityAccess.tsx +1 -1
  235. package/src/pages/admin/community/CommunityFavicons.tsx +1 -1
  236. package/src/pages/admin/community/CommunityForbiddenUsernames.tsx +2 -2
  237. package/src/pages/admin/community/CommunityInfo.tsx +1 -1
  238. package/src/pages/admin/community/CommunityLinks.tsx +30 -1
  239. package/src/pages/admin/community/CommunityMarkdownPage.tsx +1 -1
  240. package/src/pages/admin/community/CommunityProfileFields.tsx +5 -5
  241. package/src/pages/admin/community/CommunityRoles.tsx +9 -9
  242. package/src/pages/admin/community/CommunityTheme.tsx +26 -23
  243. package/src/pages/admin/community/ThemeColorPreview.tsx +141 -0
  244. package/src/pages/admin/components/AdminGroupCard.tsx +2 -2
  245. package/src/pages/admin/components/EditInviteLinkModal.tsx +2 -2
  246. package/src/pages/admin/components/InviteWithEmailModal.tsx +2 -2
  247. package/src/pages/admin/components/InviteWithLinkModal.tsx +3 -3
  248. package/src/pages/admin/components/ProfileRowActions.tsx +6 -6
  249. package/src/pages/admin/components/RestoreBackupModal.tsx +2 -2
  250. package/src/pages/admin/components/RestoreTestBackupModal.tsx +1 -1
  251. package/src/pages/auth/Login.tsx +1 -1
  252. package/src/pages/auth/Register.tsx +3 -3
  253. package/src/pages/auth/RequestResetPassword.tsx +1 -1
  254. package/src/pages/conversations/Info.tsx +1 -1
  255. package/src/pages/conversations/Show.tsx +94 -33
  256. package/src/pages/events/Index.tsx +1 -1
  257. package/src/pages/feeds/Bookmarks.tsx +3 -1
  258. package/src/pages/groups/EditInfo.tsx +1 -1
  259. package/src/pages/groups/EditRoles.tsx +1 -1
  260. package/src/pages/groups/Index.tsx +1 -1
  261. package/src/pages/groups/Members.tsx +2 -2
  262. package/src/pages/groups/New.tsx +1 -1
  263. package/src/pages/groups/Show.tsx +4 -4
  264. package/src/pages/settings/AccessTokens.tsx +4 -4
  265. package/src/pages/settings/Account.tsx +1 -1
  266. package/src/pages/settings/Feed.tsx +1 -1
  267. package/src/pages/settings/Language.tsx +1 -1
  268. package/src/pages/settings/PublicProfile.tsx +3 -3
  269. package/src/pages/settings/PushEnabledDevices.tsx +3 -6
  270. package/src/pages/settings/Theme.tsx +1 -1
  271. package/src/pages/settings/Timezone.tsx +1 -1
  272. package/src/react-native.ts +1 -0
@@ -38,7 +38,7 @@ export { extractUrlsFromText, isValidUrl, } from './components/preview-link/help
38
38
  // Jam logic that only depends on livekit-client (no @livekit/components-react).
39
39
  export { JamProvider, useJamContext, useJamObserver, } from './components/jams/JamContext.js';
40
40
  export { JamEventsProvider, useJamEventsContext, useMaybeJamEventsContext, } from './components/jams/JamEventsContext.js';
41
- export { mentionProfilesFromParticipants, parseJamEventPayload, parseParticipantMetadata, sendAttendance, sendJamEvent, sendReaction, toggleHand, } from './components/jams/jamEventActions.js';
41
+ export { mentionProfilesFromParticipants, parseJamEventPayload, parseParticipantMetadata, participantTileProfile, sendAttendance, sendJamEvent, sendReaction, toggleHand, } from './components/jams/jamEventActions.js';
42
42
  export { useRaisedHands } from './components/jams/useJamHands.js';
43
43
  export { useDropLateAudio } from './components/jams/dropLateAudio.js';
44
44
  export { calculateRecordingState, calculateRtmpStreamState, formatRecordingElapsed, useJamRecordingElapsed, useJamRecordingState, useJamRtmpStreamState, } from './components/jams/jamRecordingState.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpeepshq/react",
3
- "version": "0.9.23",
3
+ "version": "0.11.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -34,11 +34,11 @@
34
34
  "@livekit/components-styles": "^1.1.6",
35
35
  "@tanstack/react-query": "5.90.16",
36
36
  "@videojs/react": "^10.0.0-beta.24",
37
- "dompurify": "^3.4.17",
37
+ "dompurify": "3.4.17",
38
38
  "emoji-picker-element": "^1.29.1",
39
39
  "heic2any": "^0.0.4",
40
40
  "i18next": "^24.2.3",
41
- "i18next-http-backend": "^3.0.2",
41
+ "i18next-http-backend": "^3.0.6",
42
42
  "js-base64": "^3.7.7",
43
43
  "livekit-client": "2.19.2",
44
44
  "lucide-react": "^0.469.0",
@@ -51,10 +51,10 @@
51
51
  "react-i18next": "^15.4.1",
52
52
  "simple-icons": "^16.31.0",
53
53
  "uuidv7": "^1.0.2",
54
+ "@openpeepshq/common": "^0.6.1",
54
55
  "@openpeepshq/client": "^0.3.0",
55
- "@openpeepshq/common": "^0.5.12",
56
56
  "@openpeepshq/greenscreen": "^0.2.1",
57
- "@openpeepshq/react-ui": "^0.4.1"
57
+ "@openpeepshq/react-ui": "^0.5.1"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "react": "^18.3.0 || ^19.0.0",
@@ -68,14 +68,14 @@
68
68
  "@types/react-dom": "19.2.3",
69
69
  "@typescript-eslint/eslint-plugin": "^8.72.0",
70
70
  "@typescript-eslint/parser": "^8.72.0",
71
- "concurrently": "^9.1.2",
72
- "eslint": "^10.1.0",
71
+ "eslint": "^10.14.0",
72
+ "concurrently": "^9.2.5",
73
73
  "eslint-plugin-react-hooks": "^5.2.0",
74
74
  "jsdom": "^25.0.1",
75
- "react-router-dom": "^7.0.0",
75
+ "react-router-dom": "^7.18.5",
76
76
  "tsc-alias": "^1.8.10",
77
77
  "typescript": "^6.0.2",
78
- "vitest": "^2.1.8",
78
+ "vitest": "^4.1.12",
79
79
  "eslint-config-prettier": "^9.1.0",
80
80
  "@eslint/js": "^9.17.0",
81
81
  "@openpeepshq/fetch-client": "^0.2.1"
@@ -161,7 +161,7 @@ export function RelationCapabilitiesEditor() {
161
161
  if (configQuery.isLoading || !draft) {
162
162
  return (
163
163
  <div className="text-muted-foreground flex h-32 items-center justify-center text-sm">
164
- {t('common.form.loading', { defaultValue: 'Loading…' })}
164
+ {t('common.states.loading', { defaultValue: 'Loading…' })}
165
165
  </div>
166
166
  );
167
167
  }
@@ -198,11 +198,11 @@ export function RelationCapabilitiesEditor() {
198
198
  action={handleSave}
199
199
  disabled={saving || !canUpdateConfig || !diffPatch}
200
200
  loadingContent={t('common.saving', { defaultValue: 'Saving…' })}
201
- title={t('common.save', { defaultValue: 'Save' })}
201
+ title={t('common.actions.save', { defaultValue: 'Save' })}
202
202
  >
203
203
  {saving
204
204
  ? t('common.saving', { defaultValue: 'Saving…' })
205
- : t('common.save', { defaultValue: 'Save' })}
205
+ : t('common.actions.save', { defaultValue: 'Save' })}
206
206
  </Button>
207
207
  {canUpdateConfig && diffPatch ? (
208
208
  <Button
@@ -183,11 +183,11 @@ export function RoleCapabilityMatrix({ roles }: RoleCapabilityMatrixProps) {
183
183
  action={handleSave}
184
184
  disabled={saving || !canUpdateRoles || changedRoleIds.length === 0}
185
185
  loadingContent={t('common.saving', { defaultValue: 'Saving…' })}
186
- title={t('common.save', { defaultValue: 'Save' })}
186
+ title={t('common.actions.save', { defaultValue: 'Save' })}
187
187
  >
188
188
  {saving
189
189
  ? t('common.saving', { defaultValue: 'Saving…' })
190
- : t('common.save', { defaultValue: 'Save' })}
190
+ : t('common.actions.save', { defaultValue: 'Save' })}
191
191
  </Button>
192
192
  {canUpdateRoles && deviatesFromDefaults ? (
193
193
  <Button
@@ -36,7 +36,7 @@ export function SignUpLoginModal({ onClose }: SignUpLoginModalProps) {
36
36
  </DialogDescription>
37
37
  </DialogHeader>
38
38
  <DialogActions
39
- cancelLabel={t('common.cancel', { defaultValue: 'Cancel' })}
39
+ cancelLabel={t('common.actions.cancel', { defaultValue: 'Cancel' })}
40
40
  onCancel={onClose}
41
41
  actionLabel={t('accounts.login.loginButton', {
42
42
  defaultValue: 'Log In',
@@ -89,7 +89,7 @@ export function ConfigurationList({
89
89
  )}
90
90
  <button
91
91
  type="button"
92
- title={t('common.listEditor.removeTitle', {
92
+ title={t('common.actions.remove', {
93
93
  defaultValue: 'Remove',
94
94
  })}
95
95
  onClick={() => setAndNotify(value.toSpliced(index, 1))}
@@ -100,7 +100,7 @@ export function ConfigurationList({
100
100
  ))}
101
101
  <button
102
102
  type="button"
103
- title={t('common.listEditor.addTitle', { defaultValue: 'Add' })}
103
+ title={t('common.actions.add', { defaultValue: 'Add' })}
104
104
  onClick={() => setAndNotify([...value, structuredClone(defaults)])}
105
105
  >
106
106
  <Plus className="h-4 w-4" />
@@ -1,4 +1,8 @@
1
+ import { ThumbsUp } from 'lucide-react';
1
2
  import type { PublicPost } from '@openpeepshq/common/types';
3
+ import { Button } from '@openpeepshq/react-ui';
4
+ import { useT } from '../../i18n';
5
+ import { usePostReactionToggle } from '../../hooks/posts/usePostReactionToggle';
2
6
  import { useCurrentProfile } from '../layout/IdentityContext';
3
7
  import { FeedPostContent } from '../post/FeedPostContent';
4
8
  import { UnreadPostIndicator } from '../post/pieces/UnreadPostIndicator';
@@ -11,7 +15,10 @@ export function ConversationMessageBubble({
11
15
  unread?: boolean;
12
16
  }) {
13
17
  const me = useCurrentProfile();
18
+ const t = useT();
14
19
  const mine = message.profile.id === me?.id;
20
+ const { iReacted, canReact, toggleReaction } = usePostReactionToggle(message);
21
+ const reactionCount = message.reactions?.length ?? 0;
15
22
 
16
23
  return (
17
24
  <div
@@ -23,6 +30,23 @@ export function ConversationMessageBubble({
23
30
  }`}
24
31
  >
25
32
  <FeedPostContent post={message} />
33
+ {me && canReact ? (
34
+ <div className={mine ? 'mt-2 flex justify-end' : 'mt-2 flex'}>
35
+ <Button
36
+ variant="unstyled"
37
+ className={`items-center gap-1 rounded-button p-1 text-xs ${
38
+ iReacted ? 'text-primary' : 'text-muted-foreground'
39
+ }`}
40
+ title={t('posts.actions.react', { defaultValue: 'React' })}
41
+ aria-label={t('posts.actions.react')}
42
+ action={toggleReaction}
43
+ spinnerOnlyOnLoading
44
+ >
45
+ <ThumbsUp className="h-4 w-4" />
46
+ {reactionCount > 0 ? reactionCount : null}
47
+ </Button>
48
+ </div>
49
+ ) : null}
26
50
  </div>
27
51
  {!mine ? (
28
52
  <UnreadPostIndicator
@@ -1,3 +1,4 @@
1
+ import { Image } from 'lucide-react';
1
2
  import type { PublicProfile } from '@openpeepshq/common/types';
2
3
  import { blockedPairIds } from '@openpeepshq/common/lib';
3
4
  import {
@@ -11,7 +12,11 @@ import {
11
12
  } from '@openpeepshq/react-ui';
12
13
  import { useT } from '../../i18n';
13
14
  import { useCreateConversation } from '../../hooks/conversations/useCreateConversation';
14
- import { OpenpeepsMarkdownInput } from '../post';
15
+ import {
16
+ canSendDmMessage,
17
+ DM_MAX_ATTACHMENTS,
18
+ } from '../../hooks/conversations/dmMessage';
19
+ import { OpenpeepsMarkdownInput, useComposeAttachments } from '../post';
15
20
  import { ProfilesInput } from '../profile';
16
21
 
17
22
  const MAX_MESSAGE_LENGTH = 500;
@@ -38,6 +43,8 @@ export const CreateNewConversation = ({
38
43
  setSelectedProfiles,
39
44
  message,
40
45
  setMessage,
46
+ attachments,
47
+ setAttachments,
41
48
  submitting,
42
49
  error,
43
50
  send,
@@ -47,91 +54,120 @@ export const CreateNewConversation = ({
47
54
  skipProfileSelection,
48
55
  onClose,
49
56
  });
57
+ const compose = useComposeAttachments({
58
+ attachments,
59
+ onChange: setAttachments,
60
+ });
61
+ const canSend = canSendDmMessage({
62
+ sending: submitting,
63
+ uploadsPending: compose.pending,
64
+ text: message,
65
+ attachments,
66
+ });
67
+ const addImageLabel = t('posts.form.addImage', {
68
+ defaultValue: 'Add Media',
69
+ });
50
70
 
51
71
  return (
52
- <Dialog open onOpenChange={(open) => !open && onClose()}>
53
- <DialogContent className="flex max-h-[85vh] max-w-lg flex-col overflow-hidden">
54
- {step === 1 ? (
55
- <>
56
- <DialogHeader>
57
- <DialogTitle>
58
- {t('conversations.createNew.title', {
59
- defaultValue: 'New message',
60
- })}
61
- </DialogTitle>
62
- </DialogHeader>
72
+ <>
73
+ <Dialog open onOpenChange={(open) => !open && onClose()}>
74
+ <DialogContent className="flex max-h-[85vh] max-w-lg flex-col overflow-hidden">
75
+ {step === 1 ? (
76
+ <>
77
+ <DialogHeader>
78
+ <DialogTitle>
79
+ {t('conversations.createNew.title', {
80
+ defaultValue: 'New message',
81
+ })}
82
+ </DialogTitle>
83
+ </DialogHeader>
63
84
 
64
- <div className="min-h-0 flex-1 space-y-2 overflow-y-auto">
65
- <ProfilesInput
66
- value={selectedProfiles}
67
- onChange={setSelectedProfiles}
68
- banlist={me ? [me.id, ...blockedPairIds(me)] : []}
69
- placeholder={t('conversations.createNew.searchPlaceholder', {
70
- defaultValue: 'Search members…',
71
- })}
72
- title={t('conversations.createNew.title', {
73
- defaultValue: 'New message',
74
- })}
75
- />
76
- </div>
77
-
78
- <DialogActions
79
- cancelLabel={t('common.cancel', { defaultValue: 'Cancel' })}
80
- onCancel={onClose}
81
- actionLabel={t('common.next', { defaultValue: 'Next' })}
82
- onAction={() => setStep(2)}
83
- disabled={selectedProfiles.length === 0}
84
- />
85
- </>
86
- ) : (
87
- <>
88
- <DialogHeader>
89
- <DialogTitle>
90
- {t('conversations.createNew.sendMessage', {
91
- defaultValue: 'Send message',
92
- })}
93
- </DialogTitle>
94
- </DialogHeader>
85
+ <div className="min-h-0 flex-1 space-y-2 overflow-y-auto">
86
+ <ProfilesInput
87
+ value={selectedProfiles}
88
+ onChange={setSelectedProfiles}
89
+ banlist={me ? [me.id, ...blockedPairIds(me)] : []}
90
+ placeholder={t('conversations.createNew.searchPlaceholder', {
91
+ defaultValue: 'Search members…',
92
+ })}
93
+ title={t('conversations.createNew.title', {
94
+ defaultValue: 'New message',
95
+ })}
96
+ />
97
+ </div>
95
98
 
96
- <div className="min-h-0 flex-1 overflow-y-auto">
97
- <OpenpeepsMarkdownInput
98
- rows={5}
99
- value={message}
100
- onChange={setMessage}
101
- maxLength={MAX_MESSAGE_LENGTH}
102
- placeholder={t('conversations.createNew.messagePlaceholder', {
103
- defaultValue: 'Write a message…',
99
+ <DialogActions
100
+ cancelLabel={t('common.actions.cancel', {
101
+ defaultValue: 'Cancel',
104
102
  })}
103
+ onCancel={onClose}
104
+ actionLabel={t('common.next', { defaultValue: 'Next' })}
105
+ onAction={() => setStep(2)}
106
+ disabled={selectedProfiles.length === 0}
105
107
  />
106
- </div>
108
+ </>
109
+ ) : (
110
+ <>
111
+ <DialogHeader>
112
+ <DialogTitle>
113
+ {t('conversations.createNew.sendMessage', {
114
+ defaultValue: 'Send message',
115
+ })}
116
+ </DialogTitle>
117
+ </DialogHeader>
107
118
 
108
- {error ? <p className="text-error text-sm">{error}</p> : null}
109
-
110
- <DialogFooter className="flex-wrap gap-2">
111
- {!skipProfileSelection ? (
112
- <Button variant="outline" action={() => setStep(1)}>
113
- {t('common.back', { defaultValue: 'Back' })}
119
+ <div className="min-h-0 flex-1 space-y-2 overflow-y-auto">
120
+ {compose.previews}
121
+ <OpenpeepsMarkdownInput
122
+ rows={5}
123
+ value={message}
124
+ onChange={setMessage}
125
+ maxLength={MAX_MESSAGE_LENGTH}
126
+ placeholder={t('conversations.createNew.messagePlaceholder', {
127
+ defaultValue: 'Write a message…',
128
+ })}
129
+ />
130
+ <Button
131
+ compact
132
+ variant="ghost"
133
+ title={addImageLabel}
134
+ action={compose.openImagePicker}
135
+ disabled={attachments.length >= DM_MAX_ATTACHMENTS}
136
+ data-testid="conversation-add-image"
137
+ >
138
+ <Image className="size-5" />
114
139
  </Button>
115
- ) : (
116
- <Button variant="outline" action={onClose}>
117
- {t('common.cancel', { defaultValue: 'Cancel' })}
140
+ </div>
141
+
142
+ {error ? <p className="text-error text-sm">{error}</p> : null}
143
+
144
+ <DialogFooter className="flex-wrap gap-2">
145
+ {!skipProfileSelection ? (
146
+ <Button variant="outline" action={() => setStep(1)}>
147
+ {t('common.actions.back', { defaultValue: 'Back' })}
148
+ </Button>
149
+ ) : (
150
+ <Button variant="outline" action={onClose}>
151
+ {t('common.actions.cancel', { defaultValue: 'Cancel' })}
152
+ </Button>
153
+ )}
154
+ <Button
155
+ variant="default"
156
+ disabled={!canSend || selectedProfiles.length === 0}
157
+ action={send}
158
+ >
159
+ {submitting
160
+ ? t('common.actions.sending', { defaultValue: 'Sending…' })
161
+ : t('common.actions.send', {
162
+ defaultValue: 'Send',
163
+ })}
118
164
  </Button>
119
- )}
120
- <Button
121
- variant="default"
122
- disabled={submitting || selectedProfiles.length === 0}
123
- action={send}
124
- >
125
- {submitting
126
- ? t('common.sending', { defaultValue: 'Sending…' })
127
- : t('conversations.createNew.send', {
128
- defaultValue: 'Send',
129
- })}
130
- </Button>
131
- </DialogFooter>
132
- </>
133
- )}
134
- </DialogContent>
135
- </Dialog>
165
+ </DialogFooter>
166
+ </>
167
+ )}
168
+ </DialogContent>
169
+ </Dialog>
170
+ {compose.inputs}
171
+ </>
136
172
  );
137
173
  };
@@ -216,12 +216,12 @@ export function ImageEditModal({
216
216
  </div>
217
217
 
218
218
  <DialogActions
219
- cancelLabel={t('common.cancel', { defaultValue: 'Cancel' })}
219
+ cancelLabel={t('common.actions.cancel', { defaultValue: 'Cancel' })}
220
220
  onCancel={onClose}
221
221
  actionLabel={
222
222
  submitting
223
223
  ? t('common.uploading', { defaultValue: 'Uploading…' })
224
- : t('common.add', { defaultValue: 'Add' })
224
+ : t('common.actions.add', { defaultValue: 'Add' })
225
225
  }
226
226
  onAction={confirm}
227
227
  disabled={submitting}
@@ -110,7 +110,7 @@ export function ChangeGroupRolesModal({
110
110
  </p>
111
111
  ) : null}
112
112
  <DialogActions
113
- cancelLabel={t('common.cancel', { defaultValue: 'Cancel' })}
113
+ cancelLabel={t('common.actions.cancel', { defaultValue: 'Cancel' })}
114
114
  onCancel={onClose}
115
115
  actionLabel={t('groups.changeRoles.confirm', {
116
116
  defaultValue: 'Save roles',
@@ -63,7 +63,7 @@ export function ConfirmGroupExitModal({
63
63
  </p>
64
64
  ) : null}
65
65
  <DialogActions
66
- cancelLabel={t('common.cancel', { defaultValue: 'Cancel' })}
66
+ cancelLabel={t('common.actions.cancel', { defaultValue: 'Cancel' })}
67
67
  onCancel={onClose}
68
68
  actionLabel={t('groups.modals.confirmExit.leave', {
69
69
  defaultValue: 'Leave',
@@ -63,9 +63,9 @@ export function ConfirmMemberRemovalModal({
63
63
  </p>
64
64
  ) : null}
65
65
  <DialogActions
66
- cancelLabel={t('common.cancel', { defaultValue: 'Cancel' })}
66
+ cancelLabel={t('common.actions.cancel', { defaultValue: 'Cancel' })}
67
67
  onCancel={onClose}
68
- actionLabel={t('groups.removeMember.confirm', {
68
+ actionLabel={t('common.actions.remove', {
69
69
  defaultValue: 'Remove',
70
70
  })}
71
71
  onAction={submit}
@@ -59,9 +59,9 @@ export function DeleteGroupModal({ group, onClose }: DeleteGroupModalProps) {
59
59
  </p>
60
60
  ) : null}
61
61
  <DialogActions
62
- cancelLabel={t('groups.delete.cancel', { defaultValue: 'Cancel' })}
62
+ cancelLabel={t('common.actions.cancel', { defaultValue: 'Cancel' })}
63
63
  onCancel={onClose}
64
- actionLabel={t('groups.delete.deleteButton', {
64
+ actionLabel={t('common.actions.delete', {
65
65
  defaultValue: 'Delete',
66
66
  })}
67
67
  onAction={submit}
@@ -85,7 +85,7 @@ export function GroupForm({
85
85
  {!isEdit ? (
86
86
  <div className="space-y-2 px-1">
87
87
  <Label htmlFor="handle">
88
- {t('groups.handle.title', { defaultValue: 'Handle' })}
88
+ {t('common.labels.handle', { defaultValue: 'Handle' })}
89
89
  </Label>
90
90
  <Input
91
91
  id="handle"
@@ -116,7 +116,7 @@ export function GroupForm({
116
116
 
117
117
  <div className="space-y-2 px-1">
118
118
  <Label htmlFor="description">
119
- {t('groups.description.title', { defaultValue: 'Description' })}
119
+ {t('common.labels.description', { defaultValue: 'Description' })}
120
120
  </Label>
121
121
  <Textarea
122
122
  id="description"
@@ -119,12 +119,12 @@ export function GroupNotificationSettingsModal({
119
119
  </p>
120
120
  ) : null}
121
121
  <DialogActions
122
- cancelLabel={t('common.cancel', { defaultValue: 'Cancel' })}
122
+ cancelLabel={t('common.actions.cancel', { defaultValue: 'Cancel' })}
123
123
  onCancel={onClose}
124
124
  actionLabel={
125
125
  saving
126
126
  ? t('common.saving', { defaultValue: 'Saving…' })
127
- : t('common.save', { defaultValue: 'Save' })
127
+ : t('common.actions.save', { defaultValue: 'Save' })
128
128
  }
129
129
  onAction={onSave}
130
130
  disabled={saving || !ready}
@@ -25,7 +25,7 @@ import { Avatar } from '../profile';
25
25
  import { JamAnimatedEmoji } from './JamAnimatedEmoji';
26
26
  import { useJamContext } from './JamContext';
27
27
  import { useJamEventsContext } from './JamEventsContext';
28
- import { parseParticipantMetadata } from './jamEventActions';
28
+ import { participantTileProfile } from './jamEventActions';
29
29
  import { useConnectionLost } from './useParticipantConnection';
30
30
  import { useRaisedHands } from './useJamHands';
31
31
 
@@ -156,7 +156,7 @@ function JamParticipantOverlay({
156
156
  }
157
157
  }, [handUp]);
158
158
 
159
- const profile = parseParticipantMetadata(participant.metadata).profile;
159
+ const profile = participantTileProfile(participant, me);
160
160
  const isModerator = jam.moderators.includes(participant.identity);
161
161
  const viewerIsModerator = !!me && jam.moderators.includes(me.id);
162
162
 
@@ -263,7 +263,8 @@ export function JamCallParticipant({
263
263
  }: JamCallParticipantProps) {
264
264
  const t = useT();
265
265
  const participant = trackRef.participant;
266
- const profile = parseParticipantMetadata(participant.metadata).profile;
266
+ const me = useCurrentProfile();
267
+ const profile = participantTileProfile(participant, me);
267
268
  const connectionLost = useConnectionLost(participant);
268
269
  const speaking = useIsSpeaking(participant);
269
270
  const cameraOn = isTrackReference(trackRef) && !trackRef.publication.isMuted;
@@ -72,7 +72,7 @@ export function JamGuestForm() {
72
72
 
73
73
  <div className="space-y-2">
74
74
  <Label htmlFor="guest-email">
75
- {t('jams.lobby.guestEmailLabel', { defaultValue: 'Email' })}
75
+ {t('common.labels.email', { defaultValue: 'Email' })}
76
76
  </Label>
77
77
  <Input
78
78
  id="guest-email"
@@ -30,6 +30,27 @@ export function parseParticipantMetadata(
30
30
  }
31
31
  }
32
32
 
33
+ const hasTileIdentity = (profile?: {
34
+ handle?: string;
35
+ displayName?: string;
36
+ avatar?: string | null;
37
+ }) => !!(profile?.handle || profile?.displayName || profile?.avatar);
38
+
39
+ /**
40
+ * Profile drawn on a participant tile. LiveKit applies token metadata only
41
+ * after the room connection completes, so the local tile has no profile while
42
+ * the UI still says it is connecting and the empty-name avatar renders as "??".
43
+ * Use the signed-in profile for that window.
44
+ */
45
+ export const participantTileProfile = (
46
+ participant: { isLocal: boolean; metadata?: string },
47
+ localProfile?: PublicProfile,
48
+ ): PublicProfile | undefined => {
49
+ const fromRoom = parseParticipantMetadata(participant.metadata).profile;
50
+ if (hasTileIdentity(fromRoom)) return fromRoom;
51
+ return participant.isLocal ? localProfile : fromRoom;
52
+ };
53
+
33
54
  export const mentionProfilesFromParticipants = (
34
55
  participants: { metadata?: string }[],
35
56
  ): PublicProfile[] => {
@@ -26,12 +26,12 @@ export function ContentHeader() {
26
26
  <div className="flex min-w-0 items-center gap-2">
27
27
  <button
28
28
  type="button"
29
- title={t('navigation.back')}
30
- aria-label={t('navigation.back')}
29
+ title={t('common.actions.back')}
30
+ aria-label={t('common.actions.back')}
31
31
  onClick={() => router.back()}
32
32
  >
33
33
  <ChevronLeft aria-hidden="true" />
34
- <span className="sr-only">{t('navigation.back')}</span>
34
+ <span className="sr-only">{t('common.actions.back')}</span>
35
35
  </button>
36
36
  {titleNode ?? (
37
37
  <h1
@@ -43,7 +43,7 @@ export function FooterMobile({ onNewPost }: FooterMobileProps = {}) {
43
43
  action={onNewPost ?? hrefOf({ type: 'postNew' })}
44
44
  />
45
45
  <MobileMenuItem
46
- title={t('navigation.groups')}
46
+ title={t('common.entities.groups')}
47
47
  tooltip={t('navigation.tooltips.groups')}
48
48
  icon={Users}
49
49
  action={hrefOf({ type: 'groups' })}
@@ -36,7 +36,8 @@ export function SideBar({ onClose, mainMenu, profileMenu }: SideBarProps = {}) {
36
36
  serverInfo.communityConfig,
37
37
  profileSettings,
38
38
  ).logoSmall;
39
- const { name, tagLine } = serverInfo.communityConfig?.info ?? {};
39
+ const { name, tagLine, bugReportUrl } =
40
+ serverInfo.communityConfig?.info ?? {};
40
41
  const homeHref = hrefOf({ type: 'home' });
41
42
  const registerHref = hrefOf({ type: 'auth', mode: 'register' });
42
43
  const loginHref = hrefOf({ type: 'auth', mode: 'login' });
@@ -44,7 +45,8 @@ export function SideBar({ onClose, mainMenu, profileMenu }: SideBarProps = {}) {
44
45
 
45
46
  return (
46
47
  <div className="bg-background text-foreground relative h-screen w-full pt-3 md:h-full">
47
- <div className="h-[90%] overflow-y-auto">
48
+ {/* pb keeps the last menu item scrollable above the absolute footer */}
49
+ <div className="h-[90%] overflow-y-auto pb-14">
48
50
  <div className="flex w-full items-center justify-between px-4 md:items-start">
49
51
  <a href={homeHref}>
50
52
  {logoSmall && (
@@ -54,13 +56,13 @@ export function SideBar({ onClose, mainMenu, profileMenu }: SideBarProps = {}) {
54
56
  {onClose && (
55
57
  <button
56
58
  type="button"
57
- title={t('common.close')}
58
- aria-label={t('common.close')}
59
+ title={t('common.actions.close')}
60
+ aria-label={t('common.actions.close')}
59
61
  className="flex md:hidden"
60
62
  onClick={onClose}
61
63
  >
62
64
  <X aria-hidden="true" />
63
- <span className="sr-only">{t('common.close')}</span>
65
+ <span className="sr-only">{t('common.actions.close')}</span>
64
66
  </button>
65
67
  )}
66
68
  </div>
@@ -105,6 +107,18 @@ export function SideBar({ onClose, mainMenu, profileMenu }: SideBarProps = {}) {
105
107
  )}
106
108
  </div>
107
109
  <footer className="bg-background absolute bottom-3">
110
+ {bugReportUrl && /^https?:\/\//i.test(bugReportUrl) && (
111
+ <p className="ml-4 text-center">
112
+ <a
113
+ href={bugReportUrl}
114
+ target="_blank"
115
+ rel="noreferrer"
116
+ className="op-anchor text-sm"
117
+ >
118
+ {t('navigation.reportBug', { defaultValue: 'Report a bug' })}
119
+ </a>
120
+ </p>
121
+ )}
108
122
  <p className="ml-4 text-center">{t('navigation.poweredBy')}</p>
109
123
  </footer>
110
124
  </div>