@oxyhq/services 22.8.7 → 22.10.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 (502) hide show
  1. package/lib/commonjs/index.js +24 -5
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +150 -0
  4. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -0
  5. package/lib/commonjs/ui/components/OxyAuthChooser.js +137 -40
  6. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  7. package/lib/commonjs/ui/components/OxyConsentScreen.js +1 -1
  8. package/lib/commonjs/ui/components/OxyProvider.js +9 -29
  9. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  10. package/lib/commonjs/ui/components/ProfileButton.js +1 -1
  11. package/lib/commonjs/ui/components/RequireOxyAuth.js +1 -1
  12. package/lib/commonjs/ui/components/SurfaceHeaderAction.js +63 -0
  13. package/lib/commonjs/ui/components/SurfaceHeaderAction.js.map +1 -0
  14. package/lib/commonjs/ui/components/SurfaceScreen.js +193 -0
  15. package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -0
  16. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +46 -29
  17. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  18. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +47 -23
  19. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
  20. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js +22 -12
  21. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -1
  22. package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js +83 -0
  23. package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
  24. package/lib/commonjs/ui/context/OxyContext.js +49 -4
  25. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  26. package/lib/commonjs/ui/hooks/useAvatarPicker.js +34 -39
  27. package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
  28. package/lib/commonjs/ui/hooks/useSurfaceHeader.js +46 -0
  29. package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -0
  30. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +1 -1
  31. package/lib/commonjs/ui/navigation/accountDialogManager.js +14 -2
  32. package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
  33. package/lib/commonjs/ui/navigation/bottomSheetManager.js +38 -56
  34. package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
  35. package/lib/commonjs/ui/navigation/routes.js +7 -57
  36. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  37. package/lib/commonjs/ui/navigation/surfaceBackBridge.js +68 -0
  38. package/lib/commonjs/ui/navigation/surfaceBackBridge.js.map +1 -0
  39. package/lib/commonjs/ui/navigation/surfaceNavStack.js +98 -0
  40. package/lib/commonjs/ui/navigation/surfaceNavStack.js.map +1 -0
  41. package/lib/commonjs/ui/navigation/surfaceRegistry.js +152 -0
  42. package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -0
  43. package/lib/commonjs/ui/navigation/surfaces.js +256 -0
  44. package/lib/commonjs/ui/navigation/surfaces.js.map +1 -0
  45. package/lib/commonjs/ui/screens/AccountMembersScreen.js +214 -283
  46. package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +88 -118
  48. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +22 -36
  50. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/AppInfoScreen.js +219 -226
  52. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/AvatarCropScreen.js +10 -14
  54. package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +24 -39
  56. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/CreateAccountScreen.js +136 -158
  58. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  59. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +29 -36
  60. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  61. package/lib/commonjs/ui/screens/EditProfileScreen.js +101 -109
  62. package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
  63. package/lib/commonjs/ui/screens/FAQScreen.js +10 -15
  64. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
  65. package/lib/commonjs/ui/screens/FeedbackScreen.js +8 -16
  66. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  67. package/lib/commonjs/ui/screens/FileManagementScreen.js +219 -206
  68. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  69. package/lib/commonjs/ui/screens/HelpSupportScreen.js +62 -69
  70. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  71. package/lib/commonjs/ui/screens/HistoryViewScreen.js +63 -79
  72. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  73. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +69 -98
  74. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  75. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +8 -14
  76. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  77. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +77 -94
  78. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  79. package/lib/commonjs/ui/screens/ManageAccountScreen.js +99 -134
  80. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  81. package/lib/commonjs/ui/screens/NotificationsScreen.js +69 -76
  82. package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
  83. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -8
  84. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  85. package/lib/commonjs/ui/screens/PreferencesScreen.js +67 -74
  86. package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
  87. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +55 -91
  88. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  89. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +291 -304
  90. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  91. package/lib/commonjs/ui/screens/ProfileScreen.js +100 -114
  92. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  93. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +38 -45
  94. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  95. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +44 -57
  96. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  97. package/lib/commonjs/ui/screens/UserLinksScreen.js +24 -31
  98. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
  99. package/lib/commonjs/ui/screens/UserListScreen.js +14 -24
  100. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  101. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
  102. package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +9 -7
  103. package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
  104. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +66 -75
  105. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  106. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +111 -139
  107. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  108. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +13 -20
  109. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  110. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +14 -27
  111. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  112. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +68 -85
  113. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  114. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +28 -36
  115. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  116. package/lib/commonjs/ui/types/surfaceScreen.js +6 -0
  117. package/lib/commonjs/ui/types/surfaceScreen.js.map +1 -0
  118. package/lib/module/index.js +12 -5
  119. package/lib/module/index.js.map +1 -1
  120. package/lib/module/ui/components/OxyAccountDialogScreen.js +145 -0
  121. package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -0
  122. package/lib/module/ui/components/OxyAuthChooser.js +137 -40
  123. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  124. package/lib/module/ui/components/OxyConsentScreen.js +1 -1
  125. package/lib/module/ui/components/OxyProvider.js +10 -30
  126. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  127. package/lib/module/ui/components/ProfileButton.js +1 -1
  128. package/lib/module/ui/components/RequireOxyAuth.js +1 -1
  129. package/lib/module/ui/components/SurfaceHeaderAction.js +58 -0
  130. package/lib/module/ui/components/SurfaceHeaderAction.js.map +1 -0
  131. package/lib/module/ui/components/SurfaceScreen.js +188 -0
  132. package/lib/module/ui/components/SurfaceScreen.js.map +1 -0
  133. package/lib/module/ui/components/fileManagement/FileDetailsModal.js +46 -29
  134. package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  135. package/lib/module/ui/components/modals/DeleteAccountModal.js +46 -23
  136. package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
  137. package/lib/module/ui/components/oxyAuthChooserStyles.js +22 -12
  138. package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -1
  139. package/lib/module/ui/components/surfaces/ActionSheetSurface.js +78 -0
  140. package/lib/module/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
  141. package/lib/module/ui/context/OxyContext.js +49 -4
  142. package/lib/module/ui/context/OxyContext.js.map +1 -1
  143. package/lib/module/ui/hooks/useAvatarPicker.js +34 -39
  144. package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
  145. package/lib/module/ui/hooks/useSurfaceHeader.js +42 -0
  146. package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -0
  147. package/lib/module/ui/hooks/useSwitchableAccounts.js +1 -1
  148. package/lib/module/ui/navigation/accountDialogManager.js +14 -2
  149. package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
  150. package/lib/module/ui/navigation/bottomSheetManager.js +37 -53
  151. package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
  152. package/lib/module/ui/navigation/routes.js +6 -56
  153. package/lib/module/ui/navigation/routes.js.map +1 -1
  154. package/lib/module/ui/navigation/surfaceBackBridge.js +63 -0
  155. package/lib/module/ui/navigation/surfaceBackBridge.js.map +1 -0
  156. package/lib/module/ui/navigation/surfaceNavStack.js +95 -0
  157. package/lib/module/ui/navigation/surfaceNavStack.js.map +1 -0
  158. package/lib/module/ui/navigation/surfaceRegistry.js +146 -0
  159. package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -0
  160. package/lib/module/ui/navigation/surfaces.js +244 -0
  161. package/lib/module/ui/navigation/surfaces.js.map +1 -0
  162. package/lib/module/ui/screens/AccountMembersScreen.js +218 -286
  163. package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
  164. package/lib/module/ui/screens/AccountSettingsScreen.js +92 -121
  165. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  166. package/lib/module/ui/screens/AccountVerificationScreen.js +25 -38
  167. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  168. package/lib/module/ui/screens/AppInfoScreen.js +220 -227
  169. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  170. package/lib/module/ui/screens/AvatarCropScreen.js +10 -14
  171. package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
  172. package/lib/module/ui/screens/ConnectedAppsScreen.js +26 -40
  173. package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
  174. package/lib/module/ui/screens/CreateAccountScreen.js +139 -160
  175. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  176. package/lib/module/ui/screens/EditProfileFieldScreen.js +32 -38
  177. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  178. package/lib/module/ui/screens/EditProfileScreen.js +102 -110
  179. package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
  180. package/lib/module/ui/screens/FAQScreen.js +11 -15
  181. package/lib/module/ui/screens/FAQScreen.js.map +1 -1
  182. package/lib/module/ui/screens/FeedbackScreen.js +10 -17
  183. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  184. package/lib/module/ui/screens/FileManagementScreen.js +222 -208
  185. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  186. package/lib/module/ui/screens/HelpSupportScreen.js +64 -70
  187. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  188. package/lib/module/ui/screens/HistoryViewScreen.js +65 -81
  189. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  190. package/lib/module/ui/screens/LanguageSelectorScreen.js +71 -99
  191. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  192. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +10 -15
  193. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  194. package/lib/module/ui/screens/LegalDocumentsScreen.js +78 -94
  195. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  196. package/lib/module/ui/screens/ManageAccountScreen.js +102 -137
  197. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  198. package/lib/module/ui/screens/NotificationsScreen.js +71 -77
  199. package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
  200. package/lib/module/ui/screens/PaymentGatewayScreen.js +4 -9
  201. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  202. package/lib/module/ui/screens/PreferencesScreen.js +69 -75
  203. package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
  204. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +58 -93
  205. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  206. package/lib/module/ui/screens/PrivacySettingsScreen.js +293 -305
  207. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  208. package/lib/module/ui/screens/ProfileScreen.js +102 -116
  209. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  210. package/lib/module/ui/screens/SavesCollectionsScreen.js +40 -46
  211. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  212. package/lib/module/ui/screens/SearchSettingsScreen.js +46 -58
  213. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  214. package/lib/module/ui/screens/UserLinksScreen.js +26 -32
  215. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
  216. package/lib/module/ui/screens/UserListScreen.js +14 -24
  217. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  218. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
  219. package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +8 -7
  220. package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
  221. package/lib/module/ui/screens/trust/TrustAboutScreen.js +67 -75
  222. package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  223. package/lib/module/ui/screens/trust/TrustCenterScreen.js +112 -139
  224. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  225. package/lib/module/ui/screens/trust/TrustFAQScreen.js +15 -21
  226. package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  227. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +14 -26
  228. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  229. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +69 -85
  230. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  231. package/lib/module/ui/screens/trust/TrustRulesScreen.js +30 -37
  232. package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  233. package/lib/module/ui/types/surfaceScreen.js +4 -0
  234. package/lib/module/ui/types/surfaceScreen.js.map +1 -0
  235. package/lib/typescript/commonjs/index.d.ts +2 -0
  236. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  237. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts +39 -0
  238. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
  239. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +3 -3
  240. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts +3 -2
  242. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +2 -2
  244. package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts +1 -1
  245. package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts +16 -0
  246. package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
  247. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts +26 -0
  248. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -0
  249. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
  250. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  251. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +17 -2
  252. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  253. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts +19 -9
  254. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
  255. package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
  256. package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
  257. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +7 -11
  259. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +31 -0
  261. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +1 -1
  263. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +14 -2
  264. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +24 -16
  266. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  267. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +2 -60
  268. package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts +16 -0
  270. package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
  271. package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts +51 -0
  272. package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts.map +1 -0
  273. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +135 -0
  274. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -0
  275. package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts +79 -0
  276. package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -0
  277. package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  278. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  280. package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts +0 -4
  282. package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  283. package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  285. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  286. package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  289. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  290. package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  291. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  292. package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  293. package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  294. package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  295. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
  296. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  297. package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -1
  298. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  299. package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
  300. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  301. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  302. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  303. package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  304. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  305. package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
  306. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
  307. package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  309. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  310. package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  311. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  313. package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  314. package/lib/typescript/commonjs/ui/types/navigation.d.ts +8 -0
  315. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  316. package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts +38 -0
  317. package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts.map +1 -0
  318. package/lib/typescript/module/index.d.ts +2 -0
  319. package/lib/typescript/module/index.d.ts.map +1 -1
  320. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts +39 -0
  321. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
  322. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +3 -3
  323. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  324. package/lib/typescript/module/ui/components/OxyProvider.d.ts +3 -2
  325. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  326. package/lib/typescript/module/ui/components/ProfileButton.d.ts +2 -2
  327. package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts +1 -1
  328. package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts +16 -0
  329. package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
  330. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts +26 -0
  331. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -0
  332. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
  333. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  334. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +17 -2
  335. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  336. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts +19 -9
  337. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
  338. package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
  339. package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
  340. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  341. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +7 -11
  342. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  343. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +31 -0
  344. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
  345. package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +1 -1
  346. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +14 -2
  347. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
  348. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +24 -16
  349. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  350. package/lib/typescript/module/ui/navigation/routes.d.ts +2 -60
  351. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  352. package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts +16 -0
  353. package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
  354. package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts +51 -0
  355. package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts.map +1 -0
  356. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +135 -0
  357. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -0
  358. package/lib/typescript/module/ui/navigation/surfaces.d.ts +79 -0
  359. package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -0
  360. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  361. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  362. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  363. package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
  364. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +0 -4
  365. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  366. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  367. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  368. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  369. package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
  370. package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
  371. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  372. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  373. package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  374. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  375. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  376. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  377. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  378. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
  379. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  380. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
  381. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  382. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
  383. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  384. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  385. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  386. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  387. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  388. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
  389. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  390. package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
  391. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  392. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  393. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  394. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  395. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  396. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  397. package/lib/typescript/module/ui/types/navigation.d.ts +8 -0
  398. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  399. package/lib/typescript/module/ui/types/surfaceScreen.d.ts +38 -0
  400. package/lib/typescript/module/ui/types/surfaceScreen.d.ts.map +1 -0
  401. package/package.json +2 -2
  402. package/src/index.ts +12 -5
  403. package/src/ui/components/OxyAccountDialogScreen.tsx +148 -0
  404. package/src/ui/components/OxyAuthChooser.tsx +153 -33
  405. package/src/ui/components/OxyConsentScreen.tsx +1 -1
  406. package/src/ui/components/OxyProvider.tsx +12 -34
  407. package/src/ui/components/ProfileButton.tsx +2 -2
  408. package/src/ui/components/RequireOxyAuth.tsx +1 -1
  409. package/src/ui/components/SurfaceHeaderAction.tsx +60 -0
  410. package/src/ui/components/SurfaceScreen.tsx +226 -0
  411. package/src/ui/components/fileManagement/FileDetailsModal.tsx +50 -36
  412. package/src/ui/components/modals/DeleteAccountModal.tsx +47 -26
  413. package/src/ui/components/oxyAuthChooserStyles.ts +22 -12
  414. package/src/ui/components/surfaces/ActionSheetSurface.tsx +98 -0
  415. package/src/ui/context/OxyContext.tsx +43 -3
  416. package/src/ui/hooks/useAvatarPicker.ts +53 -66
  417. package/src/ui/hooks/useSurfaceHeader.ts +56 -0
  418. package/src/ui/hooks/useSwitchableAccounts.ts +1 -1
  419. package/src/ui/navigation/__tests__/getSurfaceConfig.test.ts +39 -0
  420. package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +68 -0
  421. package/src/ui/navigation/accountDialogManager.ts +14 -2
  422. package/src/ui/navigation/bottomSheetManager.ts +46 -73
  423. package/src/ui/navigation/routes.ts +7 -106
  424. package/src/ui/navigation/surfaceBackBridge.ts +69 -0
  425. package/src/ui/navigation/surfaceNavStack.ts +110 -0
  426. package/src/ui/navigation/surfaceRegistry.ts +240 -0
  427. package/src/ui/navigation/surfaces.ts +272 -0
  428. package/src/ui/screens/AccountMembersScreen.tsx +39 -100
  429. package/src/ui/screens/AccountSettingsScreen.tsx +32 -54
  430. package/src/ui/screens/AccountVerificationScreen.tsx +23 -51
  431. package/src/ui/screens/AppInfoScreen.tsx +6 -13
  432. package/src/ui/screens/AvatarCropScreen.tsx +8 -17
  433. package/src/ui/screens/ConnectedAppsScreen.tsx +39 -60
  434. package/src/ui/screens/CreateAccountScreen.tsx +13 -39
  435. package/src/ui/screens/EditProfileFieldScreen.tsx +30 -48
  436. package/src/ui/screens/EditProfileScreen.tsx +7 -16
  437. package/src/ui/screens/FAQScreen.tsx +9 -13
  438. package/src/ui/screens/FeedbackScreen.tsx +8 -22
  439. package/src/ui/screens/FileManagementScreen.tsx +191 -188
  440. package/src/ui/screens/HelpSupportScreen.tsx +7 -13
  441. package/src/ui/screens/HistoryViewScreen.tsx +26 -31
  442. package/src/ui/screens/LanguageSelectorScreen.tsx +12 -46
  443. package/src/ui/screens/LearnMoreUsernamesScreen.tsx +8 -16
  444. package/src/ui/screens/LegalDocumentsScreen.tsx +7 -22
  445. package/src/ui/screens/ManageAccountScreen.tsx +96 -165
  446. package/src/ui/screens/NotificationsScreen.tsx +7 -13
  447. package/src/ui/screens/PaymentGatewayScreen.tsx +3 -10
  448. package/src/ui/screens/PreferencesScreen.tsx +7 -13
  449. package/src/ui/screens/PremiumSubscriptionScreen.tsx +52 -90
  450. package/src/ui/screens/PrivacySettingsScreen.tsx +9 -21
  451. package/src/ui/screens/ProfileScreen.tsx +9 -11
  452. package/src/ui/screens/SavesCollectionsScreen.tsx +7 -13
  453. package/src/ui/screens/SearchSettingsScreen.tsx +9 -21
  454. package/src/ui/screens/UserLinksScreen.tsx +7 -14
  455. package/src/ui/screens/UserListScreen.tsx +2 -5
  456. package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +1 -1
  457. package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +9 -7
  458. package/src/ui/screens/trust/TrustAboutScreen.tsx +10 -17
  459. package/src/ui/screens/trust/TrustCenterScreen.tsx +9 -28
  460. package/src/ui/screens/trust/TrustFAQScreen.tsx +15 -18
  461. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +3 -5
  462. package/src/ui/screens/trust/TrustRewardsScreen.tsx +11 -26
  463. package/src/ui/screens/trust/TrustRulesScreen.tsx +10 -13
  464. package/src/ui/types/navigation.ts +8 -0
  465. package/src/ui/types/surfaceScreen.ts +38 -0
  466. package/lib/commonjs/ui/components/BottomSheet.js +0 -49
  467. package/lib/commonjs/ui/components/BottomSheet.js.map +0 -1
  468. package/lib/commonjs/ui/components/BottomSheetRouter.js +0 -298
  469. package/lib/commonjs/ui/components/BottomSheetRouter.js.map +0 -1
  470. package/lib/commonjs/ui/components/Header.js +0 -305
  471. package/lib/commonjs/ui/components/Header.js.map +0 -1
  472. package/lib/commonjs/ui/components/OxyAccountDialog.js +0 -259
  473. package/lib/commonjs/ui/components/OxyAccountDialog.js.map +0 -1
  474. package/lib/module/ui/components/BottomSheet.js +0 -45
  475. package/lib/module/ui/components/BottomSheet.js.map +0 -1
  476. package/lib/module/ui/components/BottomSheetRouter.js +0 -292
  477. package/lib/module/ui/components/BottomSheetRouter.js.map +0 -1
  478. package/lib/module/ui/components/Header.js +0 -299
  479. package/lib/module/ui/components/Header.js.map +0 -1
  480. package/lib/module/ui/components/OxyAccountDialog.js +0 -254
  481. package/lib/module/ui/components/OxyAccountDialog.js.map +0 -1
  482. package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts +0 -29
  483. package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts.map +0 -1
  484. package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts +0 -9
  485. package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +0 -1
  486. package/lib/typescript/commonjs/ui/components/Header.d.ts +0 -33
  487. package/lib/typescript/commonjs/ui/components/Header.d.ts.map +0 -1
  488. package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts +0 -37
  489. package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +0 -1
  490. package/lib/typescript/module/ui/components/BottomSheet.d.ts +0 -29
  491. package/lib/typescript/module/ui/components/BottomSheet.d.ts.map +0 -1
  492. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +0 -9
  493. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +0 -1
  494. package/lib/typescript/module/ui/components/Header.d.ts +0 -33
  495. package/lib/typescript/module/ui/components/Header.d.ts.map +0 -1
  496. package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts +0 -37
  497. package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +0 -1
  498. package/src/ui/components/BottomSheet.tsx +0 -48
  499. package/src/ui/components/BottomSheetRouter.tsx +0 -310
  500. package/src/ui/components/Header.tsx +0 -224
  501. package/src/ui/components/OxyAccountDialog.tsx +0 -243
  502. package/src/ui/navigation/__tests__/getSheetConfig.test.ts +0 -36
@@ -9,22 +9,23 @@ var _reactNative = require("react-native");
9
9
  var _settingsList = require("@oxyhq/bloom/settings-list");
10
10
  var _chip = require("@oxyhq/bloom/chip");
11
11
  var _theme = require("@oxyhq/bloom/theme");
12
- var _Header = _interopRequireDefault(require("../../components/Header.js"));
12
+ var _useSurfaceHeader = require("../../hooks/useSurfaceHeader.js");
13
13
  var _loading = require("@oxyhq/bloom/loading");
14
14
  var _useI18n = require("../../hooks/useI18n.js");
15
15
  var _OxyContext = require("../../context/OxyContext.js");
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
17
  /** Stable display order for rule category sections. */const CATEGORY_ORDER = ['content', 'social', 'trust', 'moderation', 'physical', 'penalty', 'other'];
19
- const TrustRulesScreen = ({
20
- goBack
21
- }) => {
18
+ const TrustRulesScreen = () => {
22
19
  const {
23
20
  oxyServices
24
21
  } = (0, _OxyContext.useOxy)();
25
22
  const {
26
23
  t
27
24
  } = (0, _useI18n.useI18n)();
25
+ (0, _useSurfaceHeader.useSurfaceHeader)({
26
+ title: t('trust.rules.title') || 'Trust Rules',
27
+ subtitle: t('trust.rules.subtitle') || 'How to earn reputation'
28
+ });
28
29
  const bloomTheme = (0, _theme.useTheme)();
29
30
  const [rules, setRules] = (0, _react.useState)([]);
30
31
  const [isLoading, setIsLoading] = (0, _react.useState)(true);
@@ -53,14 +54,8 @@ const TrustRulesScreen = ({
53
54
  items: buckets.get(category) ?? []
54
55
  }));
55
56
  }, [rules]);
56
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
57
- className: "flex-1 bg-bg",
58
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.default, {
59
- title: t('trust.rules.title') || 'Trust Rules',
60
- subtitle: t('trust.rules.subtitle') || 'How to earn reputation',
61
- onBack: goBack,
62
- elevation: "subtle"
63
- }), isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
57
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
58
+ children: isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
64
59
  size: "large",
65
60
  color: bloomTheme.colors.primary
66
61
  }) : error ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
@@ -69,29 +64,26 @@ const TrustRulesScreen = ({
69
64
  }) : rules.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
70
65
  className: "text-text-secondary text-base text-center px-screen-margin pt-space-40",
71
66
  children: t('trust.rules.empty') || 'No rules found.'
72
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
73
- className: "flex-1",
74
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
75
- className: "px-screen-margin pb-space-24 pt-space-12",
76
- children: groupedRules.map(({
77
- category,
78
- items
79
- }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListGroup, {
80
- title: t(`trust.rules.categories.${category}`) || category,
81
- children: items.map(rule => /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
82
- title: rule.description,
83
- showChevron: false,
84
- rightElement: /*#__PURE__*/(0, _jsxRuntime.jsx)(_chip.Chip, {
85
- variant: "soft",
86
- size: "small",
87
- color: rule.points > 0 ? 'success' : rule.points < 0 ? 'error' : 'default',
88
- children: rule.points > 0 ? `+${rule.points}` : `${rule.points}`
89
- }),
90
- accessibilityLabel: `${rule.description}, ${rule.points > 0 ? '+' : ''}${rule.points} ${t('trust.center.balance') || 'reputation points'}`
91
- }, rule.id))
92
- }, category))
93
- })
94
- })]
67
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
68
+ className: "px-screen-margin pb-space-24 pt-space-12",
69
+ children: groupedRules.map(({
70
+ category,
71
+ items
72
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListGroup, {
73
+ title: t(`trust.rules.categories.${category}`) || category,
74
+ children: items.map(rule => /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
75
+ title: rule.description,
76
+ showChevron: false,
77
+ rightElement: /*#__PURE__*/(0, _jsxRuntime.jsx)(_chip.Chip, {
78
+ variant: "soft",
79
+ size: "small",
80
+ color: rule.points > 0 ? 'success' : rule.points < 0 ? 'error' : 'default',
81
+ children: rule.points > 0 ? `+${rule.points}` : `${rule.points}`
82
+ }),
83
+ accessibilityLabel: `${rule.description}, ${rule.points > 0 ? '+' : ''}${rule.points} ${t('trust.center.balance') || 'reputation points'}`
84
+ }, rule.id))
85
+ }, category))
86
+ })
95
87
  });
96
88
  };
97
89
  var _default = exports.default = TrustRulesScreen;
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","_settingsList","_chip","_theme","_Header","_interopRequireDefault","_loading","_useI18n","_OxyContext","_jsxRuntime","e","__esModule","default","CATEGORY_ORDER","TrustRulesScreen","goBack","oxyServices","useOxy","t","useI18n","bloomTheme","useTheme","rules","setRules","useState","isLoading","setIsLoading","error","setError","useEffect","getReputationRules","then","data","Array","isArray","catch","err","Error","message","finally","groupedRules","useMemo","buckets","Map","rule","category","includes","bucket","get","push","set","filter","has","map","items","jsxs","View","className","children","jsx","title","subtitle","onBack","elevation","Loading","size","color","colors","primary","Text","length","ScrollView","SettingsListGroup","SettingsListItem","description","showChevron","rightElement","Chip","variant","points","accessibilityLabel","id","_default","exports"],"sourceRoot":"../../../../../src","sources":["ui/screens/trust/TrustRulesScreen.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAGA,IAAAK,OAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AAAkD,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAM,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAElD,uDACA,MAAMG,cAAoC,GAAG,CACzC,SAAS,EACT,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,UAAU,EACV,SAAS,EACT,OAAO,CACV;AAED,MAAMC,gBAA2C,GAAGA,CAAC;EAAEC;AAAO,CAAC,KAAK;EAChE,MAAM;IAAEC;EAAY,CAAC,GAAG,IAAAC,kBAAM,EAAC,CAAC;EAChC,MAAM;IAAEC;EAAE,CAAC,GAAG,IAAAC,gBAAO,EAAC,CAAC;EACvB,MAAMC,UAAU,GAAG,IAAAC,eAAQ,EAAC,CAAC;EAE7B,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,eAAQ,EAAmB,EAAE,CAAC;EAC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EaE,gBAAgB","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_reactNative","_settingsList","_chip","_theme","_useSurfaceHeader","_loading","_useI18n","_OxyContext","_jsxRuntime","CATEGORY_ORDER","TrustRulesScreen","oxyServices","useOxy","t","useI18n","useSurfaceHeader","title","subtitle","bloomTheme","useTheme","rules","setRules","useState","isLoading","setIsLoading","error","setError","useEffect","getReputationRules","then","data","Array","isArray","catch","err","Error","message","finally","groupedRules","useMemo","buckets","Map","rule","category","includes","bucket","get","push","set","filter","has","map","items","jsx","Fragment","children","Loading","size","color","colors","primary","Text","className","length","View","SettingsListGroup","SettingsListItem","description","showChevron","rightElement","Chip","variant","points","accessibilityLabel","id","_default","exports","default"],"sourceRoot":"../../../../../src","sources":["ui/screens/trust/TrustRulesScreen.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAGA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAAkD,IAAAS,WAAA,GAAAT,OAAA;AAElD,uDACA,MAAMU,cAAoC,GAAG,CACzC,SAAS,EACT,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,UAAU,EACV,SAAS,EACT,OAAO,CACV;AAED,MAAMC,gBAA2C,GAAGA,CAAA,KAAM;EACtD,MAAM;IAAEC;EAAY,CAAC,GAAG,IAAAC,kBAAM,EAAC,CAAC;EAChC,MAAM;IAAEC;EAAE,CAAC,GAAG,IAAAC,gBAAO,EAAC,CAAC;EAEvB,IAAAC,kCAAgB,EAAC;IACbC,KAAK,EAAEH,CAAC,CAAC,mBAAmB,CAAC,IAAI,aAAa;IAC9CI,QAAQ,EAAEJ,CAAC,CAAC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D,KAAK,EAAEH,CAAC,CAAC,0BAA0B8B,QAAQ,EAAE,CAAC,IAAIA,QAAS;QAAAY,QAAA,EAE1DH,KAAK,CAACD,GAAG,CAAET,IAAI,iBACZ,IAAAlC,WAAA,CAAA6C,GAAA,EAACpD,aAAA,CAAAiE,gBAAgB;UAEblD,KAAK,EAAE0B,IAAI,CAACyB,WAAY;UACxBC,WAAW,EAAE,KAAM;UACnBC,YAAY,eACR,IAAA7D,WAAA,CAAA6C,GAAA,EAACnD,KAAA,CAAAoE,IAAI;YACDC,OAAO,EAAC,MAAM;YACdd,IAAI,EAAC,OAAO;YACZC,KAAK,EAAEhB,IAAI,CAAC8B,MAAM,GAAG,CAAC,GAAG,SAAS,GAAG9B,IAAI,CAAC8B,MAAM,GAAG,CAAC,GAAG,OAAO,GAAG,SAAU;YAAAjB,QAAA,EAE1Eb,IAAI,CAAC8B,MAAM,GAAG,CAAC,GAAG,IAAI9B,IAAI,CAAC8B,MAAM,EAAE,GAAG,GAAG9B,IAAI,CAAC8B,MAAM;UAAE,CACrD,CACT;UACDC,kBAAkB,EAAE,GAAG/B,IAAI,CAACyB,WAAW,KAAKzB,IAAI,CAAC8B,MAAM,GAAG,CAAC,GAAG,GAAG,GAAG,EAAE,GAAG9B,IAAI,CAAC8B,MAAM,IAAI3D,CAAC,CAAC,sBAAsB,CAAC,IAAI,mBAAmB;QAAG,GAZtI6B,IAAI,CAACgC,EAab,CACJ;MAAC,GAnBG/B,QAoBU,CACtB;IAAC,CACA;EACb,CACH,CAAC;AAEX,CAAC;AAAC,IAAAgC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEanE,gBAAgB","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=surfaceScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["ui/types/surfaceScreen.ts"],"mappings":"","ignoreList":[]}
@@ -122,13 +122,14 @@ export { LogoIcon } from "./ui/components/logo/LogoIcon.js";
122
122
  export { LogoText } from "./ui/components/logo/LogoText.js";
123
123
 
124
124
  // Sidebar account trigger. Pressing `ProfileButton` opens the unified
125
- // `OxyAccountDialog` (the single account switcher + sign-in surface) via
125
+ // `OxyAccountDialogScreen` (the single account switcher + sign-in surface) via
126
126
  // `useOxy().openAccountDialog`.
127
127
  export { default as ProfileButton } from "./ui/components/ProfileButton.js";
128
- // The account switcher/sign-in/sign-up chooser WITHOUT dialog chrome —
129
- // `OxyAccountDialog` wraps this in Bloom's `<Dialog>` for the normal in-app
130
- // surface; exported directly so a bare host (e.g. a future auth.oxy.so hub
131
- // page) can mount the exact same chooser with its own completion strategy.
128
+ // The account switcher/sign-in/sign-up chooser WITHOUT dialog chrome — the
129
+ // surface stack presents `OxyAccountDialogScreen` (which renders this) into
130
+ // Bloom's `<Dialog>` for the normal in-app surface; exported directly so a bare
131
+ // host (e.g. a future auth.oxy.so hub page) can mount the exact same chooser
132
+ // with its own completion strategy.
132
133
  export { default as OxyAuthChooser } from "./ui/components/OxyAuthChooser.js";
133
134
  // Unified switchable-accounts hook — the single source of everything the user
134
135
  // can switch into: device sign-ins AND linked graph accounts (owned orgs +
@@ -153,6 +154,12 @@ export { default as AccountSettingsScreen } from "./ui/screens/AccountSettingsSc
153
154
  // Bottom-sheet navigation
154
155
  // ---------------------------------------------------------------------------
155
156
  export { showBottomSheet, closeBottomSheet } from "./ui/navigation/bottomSheetManager.js";
157
+ // Surface nav header — a surface screen declares its title/subtitle (+ any
158
+ // action slot) into the Dialog's OWN navigation header. Screens render no header
159
+ // of their own.
160
+ export { useSurfaceHeader } from "./ui/hooks/useSurfaceHeader.js";
161
+ export { SurfaceHeaderAction } from "./ui/components/SurfaceHeaderAction.js";
162
+
156
163
  // ---------------------------------------------------------------------------
157
164
  // Unified account dialog — imperative entry points
158
165
  // ---------------------------------------------------------------------------
@@ -1 +1 @@
1
- {"version":3,"names":["setPlatformOS","Platform","OS","default","OxyProvider","useOxy","useAuth","FontLoader","setupFonts","useAuthStore","useAccountStore","useAssetStore","useAssets","useAssetsStore","useAsset","useUploadProgress","useAssetLoading","useAssetErrors","useAssetsByApp","useAssetsByEntity","useAssetUsageCount","useIsAssetLinked","setOxyAssetInstance","useFileDownloadUrl","useFollow","useFollowerCounts","useSeedFollowStatuses","useStorage","useUserProfile","useUserProfiles","useCurrentUser","useUserById","useUserByUsername","useUsersBySessions","usePrivacySettings","useConnectedApps","useSessions","useSession","useDeviceSessions","useUserDevices","useSecurityInfo","useAccountStorageUsage","useSecurityActivity","useRecentSecurityActivity","useInfiniteSecurityActivity","useAuthMethods","useUserSubscription","useUserPayments","useUserWallet","useUserWalletTransactions","useUpdateProfile","useUploadAvatar","useUpdateAccountSettings","useUpdatePrivacySettings","useUpdateNotificationPreferences","useUpdateUserPreferences","useRevokeConnectedApp","useUploadFile","useSwitchSession","useLogoutSession","useLogoutAll","useUpdateDeviceName","useRemoveDevice","createProfileMutation","createGenericMutation","mutationKeys","queryKeys","invalidateAccountQueries","invalidateUserQueries","invalidateSessionQueries","invalidateDeviceQueries","invalidatePrivacyQueries","invalidateSecurityQueries","invalidateStorageQueries","invalidatePaymentsQueries","invalidateConnectedAppsQueries","invalidateAuthMethodsQueries","upsertCachedUser","upsertCachedUsers","useMutationStatus","useOnlineStatus","useOxyEvent","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage","useFileFiltering","OXY_OAUTH_STATE_STORAGE_KEY","OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY","OxySignInButton","OxyAuthPrompt","OxyOAuthCallback","OxyConsentScreen","RequireOxyAuth","FollowButton","OxyPayButton","LogoIcon","LogoText","ProfileButton","OxyAuthChooser","useSwitchableAccounts","ProfileScreen","ManageAccountScreen","NotificationsScreen","PreferencesScreen","ConnectedAppsScreen","CreateAccountScreen","AccountMembersScreen","AccountSettingsScreen","showBottomSheet","closeBottomSheet","openAccountDialog","closeAccountDialog","subscribeToAccountDialog"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,SAASA,aAAa,QAAyB,aAAa;AAC5D,SAASC,QAAQ,QAAQ,cAAc;AACvCD,aAAa,CAACC,QAAQ,CAACC,EAAgB,CAAC;;AAExC;AACA;AACA;AACA,SAASC,OAAO,IAAIC,WAAW,QAAQ,gCAA6B;AACpE,SAASC,MAAM,QAAQ,4BAAyB;AAEhD,SAASC,OAAO,QAAQ,uBAAoB;AAG5C;AACA;AACA;AACA,SAASC,UAAU,EAAEC,UAAU,QAAQ,4BAA4B;;AAEnE;AACA;AACA;AACA,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SAASC,eAAe,QAAQ,6BAA0B;AAC1D,SACIC,aAAa,EACbC,SAAS,IAAIC,cAAc,EAC3BC,QAAQ,EACRC,iBAAiB,EACjBC,eAAe,EACfC,cAAc,EACdC,cAAc,EACdC,iBAAiB,EACjBC,kBAAkB,EAClBC,gBAAgB,QACb,2BAAwB;;AAE/B;AACA;AACA;AACA,SAAST,SAAS,EAAEU,mBAAmB,QAAQ,yBAAsB;AACrE,SAASC,kBAAkB,QAAQ,kCAA+B;AAClE,SAASC,SAAS,EAAEC,iBAAiB,EAAEC,qBAAqB,QAAQ,yBAAsB;AAC1F,SAASC,UAAU,QAAQ,0BAAuB;AAGlD;AACA;AACA;AACA,SACIC,cAAc,EACdC,eAAe,EACfC,cAAc,EACdC,WAAW,EACXC,iBAAiB,EACjBC,kBAAkB,EAClBC,kBAAkB,EAClBC,gBAAgB,QACb,yCAAsC;AAC7C,SACIC,WAAW,EACXC,UAAU,EACVC,iBAAiB,EACjBC,cAAc,EACdC,eAAe,EACfC,sBAAsB,QACnB,0CAAuC;AAC9C,SACIC,mBAAmB,EACnBC,yBAAyB,EACz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ASC,gBAAgB,QAAQ,qCAAkC;AAOnE;AACA;AACA;AACA;AACA;AACA,SAASC,cAAc,QAAQ,mCAAgC;AAG/D,SAAS1F,OAAO,IAAI2F,YAAY,QAAQ,iCAA8B;AAEtE,SAAS3F,OAAO,IAAI4F,YAAY,QAAQ,iCAA8B;AACtE,SAASC,QAAQ,QAAQ,kCAA+B;AACxD,SAASC,QAAQ,QAAQ,kCAA+B;;AAExD;AACA;AACA;AACA,SAAS9F,OAAO,IAAI+F,aAAa,QAAQ,kCAA+B;AAGxE;AACA;AACA;AACA;AACA,SAAS/F,OAAO,IAAIgG,cAAc,QAAQ,mCAAgC;AAG1E;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,qBAAqB,QAAQ,qCAAkC;AAGxE;AACA,SAASjG,OAAO,IAAIkG,aAAa,QAAQ,+BAA4B;AACrE,SAASlG,OAAO,IAAImG,mBAAmB,QAAQ,qCAAkC;AACjF,SAASnG,OAAO,IAAIoG,mBAAmB,QAAQ,qCAAkC;AACjF,SAASpG,OAAO,IAAIqG,iBAAiB,QAAQ,mCAAgC;AAC7E,SAASrG,OAAO,IAAIsG,mBAAmB,QAAQ,qCAAkC;;AAEjF;AACA,SAAStG,OAAO,IAAIuG,mBAAmB,QAAQ,qCAAkC;AACjF,SAASvG,OAAO,IAAIwG,oBAAoB,QAAQ,sCAAmC;AACnF,SAASxG,OAAO,IAAIyG,qBAAqB,QAAQ,uCAAoC;;AAErF;AACA;AACA;AACA,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,uCAAoC;AAGtF;AACA;AACA;AACA;AACA,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,wBAAwB,QACnB,yCAAsC","ignoreList":[]}
1
+ {"version":3,"names":["setPlatformOS","Platform","OS","default","OxyProvider","useOxy","useAuth","FontLoader","setupFonts","useAuthStore","useAccountStore","useAssetStore","useAssets","useAssetsStore","useAsset","useUploadProgress","useAssetLoading","useAssetErrors","useAssetsByApp","useAssetsByEntity","useAssetUsageCount","useIsAssetLinked","setOxyAssetInstance","useFileDownloadUrl","useFollow","useFollowerCounts","useSeedFollowStatuses","useStorage","useUserProfile","useUserProfiles","useCurrentUser","useUserById","useUserByUsername","useUsersBySessions","usePrivacySettings","useConnectedApps","useSessions","useSession","useDeviceSessions","useUserDevices","useSecurityInfo","useAccountStorageUsage","useSecurityActivity","useRecentSecurityActivity","useInfiniteSecurityActivity","useAuthMethods","useUserSubscription","useUserPayments","useUserWallet","useUserWalletTransactions","useUpdateProfile","useUploadAvatar","useUpdateAccountSettings","useUpdatePrivacySettings","useUpdateNotificationPreferences","useUpdateUserPreferences","useRevokeConnectedApp","useUploadFile","useSwitchSession","useLogoutSession","useLogoutAll","useUpdateDeviceName","useRemoveDevice","createProfileMutation","createGenericMutation","mutationKeys","queryKeys","invalidateAccountQueries","invalidateUserQueries","invalidateSessionQueries","invalidateDeviceQueries","invalidatePrivacyQueries","invalidateSecurityQueries","invalidateStorageQueries","invalidatePaymentsQueries","invalidateConnectedAppsQueries","invalidateAuthMethodsQueries","upsertCachedUser","upsertCachedUsers","useMutationStatus","useOnlineStatus","useOxyEvent","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage","useFileFiltering","OXY_OAUTH_STATE_STORAGE_KEY","OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY","OxySignInButton","OxyAuthPrompt","OxyOAuthCallback","OxyConsentScreen","RequireOxyAuth","FollowButton","OxyPayButton","LogoIcon","LogoText","ProfileButton","OxyAuthChooser","useSwitchableAccounts","ProfileScreen","ManageAccountScreen","NotificationsScreen","PreferencesScreen","ConnectedAppsScreen","CreateAccountScreen","AccountMembersScreen","AccountSettingsScreen","showBottomSheet","closeBottomSheet","useSurfaceHeader","SurfaceHeaderAction","openAccountDialog","closeAccountDialog","subscribeToAccountDialog"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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EtE,SAAS3F,OAAO,IAAI4F,YAAY,QAAQ,iCAA8B;AACtE,SAASC,QAAQ,QAAQ,kCAA+B;AACxD,SAASC,QAAQ,QAAQ,kCAA+B;;AAExD;AACA;AACA;AACA,SAAS9F,OAAO,IAAI+F,aAAa,QAAQ,kCAA+B;AAGxE;AACA;AACA;AACA;AACA;AACA,SAAS/F,OAAO,IAAIgG,cAAc,QAAQ,mCAAgC;AAG1E;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,qBAAqB,QAAQ,qCAAkC;AAGxE;AACA,SAASjG,OAAO,IAAIkG,aAAa,QAAQ,+BAA4B;AACrE,SAASlG,OAAO,IAAImG,mBAAmB,QAAQ,qCAAkC;AACjF,SAASnG,OAAO,IAAIoG,mBAAmB,QAAQ,qCAAkC;AACjF,SAASpG,OAAO,IAAIqG,iBAAiB,QAAQ,mCAAgC;AAC7E,SAASrG,OAAO,IAAIsG,mBAAmB,QAAQ,qCAAkC;;AAEjF;AACA,SAAStG,OAAO,IAAIuG,mBAAmB,QAAQ,qCAAkC;AACjF,SAASvG,OAAO,IAAIwG,oBAAoB,QAAQ,sCAAmC;AACnF,SAASxG,OAAO,IAAIyG,qBAAqB,QAAQ,uCAAoC;;AAErF;AACA;AACA;AACA,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,uCAAoC;AAGtF;AACA;AACA;AACA,SAASC,gBAAgB,QAAmC,gCAA6B;AACzF,SAASC,mBAAmB,QAAuC,wCAAqC;;AAExG;AACA;AACA;AACA;AACA,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,wBAAwB,QACnB,yCAAsC","ignoreList":[]}
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * OxyAccountDialogScreen — the ONE unified account dialog BODY for `@oxyhq/services`.
5
+ *
6
+ * The header (title/subtitle per view + back button) around the headless chooser
7
+ * logic, which lives in `OxyAuthChooser` — the account switcher, sign-in,
8
+ * sign-up, and QR views are ALL there, extracted so the same chooser can be
9
+ * mounted bare by a future host with no Dialog chrome (e.g. an auth.oxy.so hub
10
+ * page driving the cross-origin passkey popup, b2). This file owns ONLY the
11
+ * header + the scroll body.
12
+ *
13
+ * It is presented as the `AccountDialog` route on the shared Bloom SURFACE STACK
14
+ * (`@oxyhq/bloom/surfaces`) — `OxyContext.openAccountDialog` calls
15
+ * `presentDetached('AccountDialog', …, { placement: { base: 'bottom', md:
16
+ * 'center' }, dismissOnBackdrop: false, maxWidth: 420 })`, so the STACK owns the
17
+ * responsive `<Dialog>` chrome and this component renders only its content. That
18
+ * replaces the previous standalone controlled `<Dialog open={isAccountDialogOpen}>`
19
+ * mount: dismissal now flows through the stack (backdrop/swipe disabled), and the
20
+ * header close button (and `OxyAuthChooser`'s `onComplete`) drive
21
+ * `useOxy().closeAccountDialog`, which dismisses the surface and runs its exit
22
+ * animation. The view-enum (`accounts|signin|qr|add|signup`) stays internal here,
23
+ * driven by the shared `AccountDialogController` in `@oxyhq/core`.
24
+ */
25
+
26
+ import { useCallback, useSyncExternalStore } from 'react';
27
+ import { StyleSheet, View } from 'react-native';
28
+ import { useOxy } from "../context/OxyContext.js";
29
+ import { useI18n } from "../hooks/useI18n.js";
30
+ import { useSurfaceHeader } from "../hooks/useSurfaceHeader.js";
31
+ import OxyAuthChooser from "./OxyAuthChooser.js";
32
+ import { jsx as _jsx } from "react/jsx-runtime";
33
+ /**
34
+ * The unified account dialog BODY — the header + `OxyAuthChooser` chooser.
35
+ *
36
+ * Presented as the `AccountDialog` surface (route) on the shared Bloom surface
37
+ * stack; the surface owns the `<Dialog>` chrome (responsive `{ base: 'bottom',
38
+ * md: 'center' }` placement, `dismissOnBackdrop={false}`, `maxWidth={420}` — set
39
+ * by `OxyContext` when it presents this surface), so this component renders ONLY
40
+ * the content. Open it via `useOxy().openAccountDialog(view?)` or the imperative
41
+ * `openAccountDialog('signin')`; the view-enum (`accounts|signin|qr|add|signup`)
42
+ * stays internal here, driven by the shared `AccountDialogController` in
43
+ * `@oxyhq/core`. Closing routes through `useOxy().closeAccountDialog`, which
44
+ * dismisses the surface and runs its exit animation.
45
+ */
46
+ const OxyAccountDialogScreen = () => {
47
+ const {
48
+ accountDialogController: controller,
49
+ closeAccountDialog
50
+ } = useOxy();
51
+ const {
52
+ t
53
+ } = useI18n();
54
+
55
+ // A lightweight, header-only binding to the same controller `OxyAuthChooser`
56
+ // binds independently — cheap, and the established pattern here (
57
+ // `useSwitchableAccounts` also binds to this controller on its own).
58
+ const subscribe = useCallback(listener => controller ? controller.subscribe(listener) : () => undefined, [controller]);
59
+ const getSnapshot = useCallback(() => controller ? controller.getSnapshot() : EMPTY_SNAPSHOT, [controller]);
60
+ const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
61
+ const {
62
+ view
63
+ } = snapshot;
64
+ const showBack = view === 'qr' || view === 'signup' || view === 'add' && snapshot.accounts.length > 0;
65
+ const goToAccounts = useCallback(() => controller?.setView('accounts'), [controller]);
66
+ const {
67
+ title,
68
+ subtitle
69
+ } = headerCopy(view, snapshot.accounts.length, t);
70
+
71
+ // The account dialog uses the SHARED Dialog nav header like every other screen
72
+ // (the base): the large in-content title/subtitle that collapses into the nav
73
+ // bar on scroll (default `largeTitle`), its per-view copy, and a per-view back
74
+ // that returns to the account list (the Dialog renders the frosted back/close).
75
+ useSurfaceHeader({
76
+ title,
77
+ subtitle: subtitle ?? undefined,
78
+ onBack: showBack ? goToAccounts : undefined
79
+ });
80
+ if (!controller) {
81
+ return null;
82
+ }
83
+ return /*#__PURE__*/_jsx(View, {
84
+ style: styles.bodyContent,
85
+ children: /*#__PURE__*/_jsx(OxyAuthChooser, {
86
+ onComplete: closeAccountDialog
87
+ })
88
+ });
89
+ };
90
+
91
+ // ---------------------------------------------------------------------------
92
+ // Copy + helpers
93
+ // ---------------------------------------------------------------------------
94
+
95
+ function headerCopy(view, accountCount, t) {
96
+ switch (view) {
97
+ case 'accounts':
98
+ return {
99
+ title: t('accountSwitcher.sections.yourAccounts') || 'Your accounts',
100
+ subtitle: t('signin.chooser.subtitle') || 'Choose which account to continue with.'
101
+ };
102
+ case 'qr':
103
+ return {
104
+ title: t('accountSwitcher.scanTitle') || 'Sign in with Oxy',
105
+ subtitle: t('accountSwitcher.scanSubtitle') || 'Scan with Commons on your phone.'
106
+ };
107
+ case 'signup':
108
+ return {
109
+ title: t('signup.title') || 'Create your account',
110
+ subtitle: t('signup.subtitle') || 'One identity for the whole ecosystem.'
111
+ };
112
+ default:
113
+ return accountCount > 0 ? {
114
+ title: t('signin.addAccountTitle') || 'Add another account',
115
+ subtitle: t('signin.addAccountSubtitle') || 'Sign in with another account.'
116
+ } : {
117
+ title: t('signin.title') || 'Sign in',
118
+ subtitle: t('signin.subtitle') || 'One identity for the whole ecosystem.'
119
+ };
120
+ }
121
+ }
122
+ const EMPTY_SNAPSHOT = {
123
+ view: 'accounts',
124
+ accounts: [],
125
+ activeAccountId: null,
126
+ loading: false,
127
+ error: null,
128
+ switchingAccountId: null,
129
+ signIn: {
130
+ phase: 'idle',
131
+ authorizeCode: null,
132
+ qrPayload: null,
133
+ expiresAt: null,
134
+ error: null
135
+ },
136
+ commonsAvailability: 'unknown'
137
+ };
138
+ const styles = StyleSheet.create({
139
+ bodyContent: {
140
+ paddingTop: 4,
141
+ paddingBottom: 4
142
+ }
143
+ });
144
+ export default OxyAccountDialogScreen;
145
+ //# sourceMappingURL=OxyAccountDialogScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useCallback","useSyncExternalStore","StyleSheet","View","useOxy","useI18n","useSurfaceHeader","OxyAuthChooser","jsx","_jsx","OxyAccountDialogScreen","accountDialogController","controller","closeAccountDialog","t","subscribe","listener","undefined","getSnapshot","EMPTY_SNAPSHOT","snapshot","view","showBack","accounts","length","goToAccounts","setView","title","subtitle","headerCopy","onBack","style","styles","bodyContent","children","onComplete","accountCount","activeAccountId","loading","error","switchingAccountId","signIn","phase","authorizeCode","qrPayload","expiresAt","commonsAvailability","create","paddingTop","paddingBottom"],"sourceRoot":"../../../../src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OAAOsB,YAAY,GAAG,CAAC,GACnB;QACET,KAAK,EAAEb,CAAC,CAAC,wBAAwB,CAAC,IAAI,qBAAqB;QAC3Dc,QAAQ,EAAEd,CAAC,CAAC,2BAA2B,CAAC,IAAI;MAC9C,CAAC,GACD;QACEa,KAAK,EAAEb,CAAC,CAAC,cAAc,CAAC,IAAI,SAAS;QACrCc,QAAQ,EAAEd,CAAC,CAAC,iBAAiB,CAAC,IAAI;MACpC,CAAC;EACT;AACF;AAEA,MAAMK,cAAqC,GAAG;EAC5CE,IAAI,EAAE,UAAU;EAChBE,QAAQ,EAAE,EAAE;EACZc,eAAe,EAAE,IAAI;EACrBC,OAAO,EAAE,KAAK;EACdC,KAAK,EAAE,IAAI;EACXC,kBAAkB,EAAE,IAAI;EACxBC,MAAM,EAAE;IAAEC,KAAK,EAAE,MAAM;IAAEC,aAAa,EAAE,IAAI;IAAEC,SAAS,EAAE,IAAI;IAAEC,SAAS,EAAE,IAAI;IAAEN,KAAK,EAAE;EAAK,CAAC;EAC7FO,mBAAmB,EAAE;AACvB,CAAC;AAED,MAAMd,MAAM,GAAG9B,UAAU,CAAC6C,MAAM,CAAC;EAC/Bd,WAAW,EAAE;IACXe,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,eAAevC,sBAAsB","ignoreList":[]}
@@ -6,8 +6,8 @@
6
6
  *
7
7
  * A thin React Native binding over the headless `AccountDialogController` in
8
8
  * `@oxyhq/core` (bound via `useSyncExternalStore`) — the same data/state
9
- * machine {@link OxyAccountDialog} renders, extracted so it can be mounted in
10
- * TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialog` (the normal
9
+ * machine {@link OxyAccountDialogScreen} renders, extracted so it can be mounted in
10
+ * TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialogScreen` (the normal
11
11
  * in-app surface), and mounted bare by a future auth.oxy.so hub page for the
12
12
  * cross-origin passkey popup (b2) — same chooser, two hosts, two completion
13
13
  * strategies via the `onComplete` prop. Neither host duplicates view logic.
@@ -54,6 +54,7 @@ import { MaterialCommunityIcons } from '@expo/vector-icons';
54
54
  import QRCode from 'react-native-qrcode-svg';
55
55
  import { Avatar } from '@oxyhq/bloom/avatar';
56
56
  import { Button } from '@oxyhq/bloom/button';
57
+ import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
57
58
  import { toast } from '@oxyhq/bloom';
58
59
  import { Text } from '@oxyhq/bloom/typography';
59
60
  import { useTheme, BloomColorScope, APP_COLOR_NAMES, APP_COLOR_PRESETS } from '@oxyhq/bloom/theme';
@@ -68,6 +69,8 @@ import { authChooserStyles as styles } from "./oxyAuthChooserStyles.js";
68
69
  /** Diameter of a row avatar. */
69
70
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
70
71
  const ROW_AVATAR_SIZE = 40;
72
+ /** Diameter of the prominent current-account avatar in the collapsed header. */
73
+ const HEADER_AVATAR_SIZE = 48;
71
74
  /** High-contrast QR colors — intentionally fixed (NOT themed) for scan reliability. */
72
75
  const QR_PLATE_BG = '#FFFFFF';
73
76
  const QR_FOREGROUND = '#000000';
@@ -91,7 +94,7 @@ function toPreset(color) {
91
94
  return APP_COLOR_NAMES.includes(color) ? color : undefined;
92
95
  }
93
96
  /**
94
- * The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialog`
97
+ * The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialogScreen`
95
98
  * (wrapped in Bloom's `<Dialog>`) today; mountable bare by any future host that
96
99
  * supplies its own `onComplete`.
97
100
  */
@@ -298,12 +301,28 @@ const OxyAuthChooser = ({
298
301
  // Accounts view
299
302
  // ---------------------------------------------------------------------------
300
303
 
304
+ /**
305
+ * The signed-in switcher, in the Google account-menu shape:
306
+ * - COLLAPSED (default): the active account is prominent at the top (avatar +
307
+ * name + email) with a trailing expand chevron, and a "Manage your Oxy
308
+ * account" outline button directly under it. Nothing else.
309
+ * - EXPANDED: the same header + button, then the full account list (current
310
+ * first with a check-circle, every other switchable account, "Add another
311
+ * account", and "Manage accounts on this device").
312
+ *
313
+ * Collapse state is a plain `useState` toggled in the header's press handler —
314
+ * no `useEffect`, no derived-from-props sync. When there is only ONE account
315
+ * (nothing to switch to) the chevron is hidden and the "Add another account" +
316
+ * "Manage accounts on this device" items render inline, so those affordances
317
+ * stay reachable without a pointless expand toggle.
318
+ */
301
319
  const AccountsView = ({
302
320
  snapshot,
303
321
  theme,
304
322
  t,
305
323
  handlers
306
324
  }) => {
325
+ const [expanded, setExpanded] = useState(false);
307
326
  if (snapshot.loading && snapshot.accounts.length === 0) {
308
327
  return /*#__PURE__*/_jsxs(View, {
309
328
  style: styles.centeredBlock,
@@ -319,49 +338,127 @@ const AccountsView = ({
319
338
  })]
320
339
  });
321
340
  }
341
+ const switchingDisabled = snapshot.switchingAccountId !== null;
342
+ const current = snapshot.accounts.find(account => account.isCurrent) ?? snapshot.accounts[0];
343
+ const hasOtherAccounts = snapshot.accounts.some(account => account.accountId !== current?.accountId);
344
+ // Current account first, then the rest — the expanded list order.
345
+ const orderedAccounts = current ? [current, ...snapshot.accounts.filter(account => account.accountId !== current.accountId)] : snapshot.accounts;
346
+ // Multi-account: reveal the list only when expanded. Single-account: no expand
347
+ // affordance, so surface add/manage inline.
348
+ const showList = hasOtherAccounts ? expanded : true;
349
+ const renderAccountItem = account => {
350
+ const accent = resolveAccentHex(account.color, theme.colors.primary);
351
+ const isSwitching = snapshot.switchingAccountId === account.accountId;
352
+ return /*#__PURE__*/_jsx(SettingsListItem, {
353
+ icon: /*#__PURE__*/_jsx(View, {
354
+ style: [styles.avatarRing, {
355
+ borderColor: account.isCurrent ? accent : 'transparent'
356
+ }],
357
+ children: /*#__PURE__*/_jsx(Avatar, {
358
+ source: account.avatarUrl ?? undefined,
359
+ variant: "thumb",
360
+ name: account.displayName,
361
+ size: ROW_AVATAR_SIZE
362
+ })
363
+ }),
364
+ title: account.displayName,
365
+ description: account.email ?? undefined,
366
+ onPress: () => handlers.onSwitch(account.accountId),
367
+ disabled: switchingDisabled,
368
+ accessibilityLabel: account.displayName,
369
+ showChevron: false,
370
+ rightElement: isSwitching ? /*#__PURE__*/_jsx(MaterialCommunityIcons, {
371
+ name: "loading",
372
+ size: 20,
373
+ color: accent
374
+ }) : account.isCurrent ? /*#__PURE__*/_jsx(MaterialCommunityIcons, {
375
+ name: "check-circle",
376
+ size: 20,
377
+ color: accent
378
+ }) : undefined
379
+ }, account.accountId);
380
+ };
322
381
  return /*#__PURE__*/_jsxs(View, {
323
382
  style: styles.rows,
324
- children: [snapshot.accounts.map(account => /*#__PURE__*/_jsx(AccountRow, {
325
- account: account,
326
- theme: theme,
327
- switching: snapshot.switchingAccountId === account.accountId,
328
- disabled: snapshot.switchingAccountId !== null,
329
- onPress: () => handlers.onSwitch(account.accountId)
330
- }, account.accountId)), /*#__PURE__*/_jsxs(Pressable, {
331
- style: [styles.addRow, {
332
- borderColor: theme.colors.border
333
- }],
334
- onPress: handlers.onAdd,
335
- accessibilityRole: "button",
336
- accessibilityLabel: t('signin.addAccountTitle') || 'Add another account',
383
+ children: [current ? /*#__PURE__*/_jsxs(Pressable, {
384
+ style: styles.currentAccountRow,
385
+ onPress: hasOtherAccounts ? () => setExpanded(value => !value) : undefined,
386
+ disabled: hasOtherAccounts ? switchingDisabled : true,
387
+ accessibilityRole: hasOtherAccounts ? 'button' : undefined,
388
+ accessibilityState: hasOtherAccounts ? {
389
+ expanded
390
+ } : undefined,
391
+ accessibilityLabel: current.displayName,
337
392
  children: [/*#__PURE__*/_jsx(View, {
338
- style: [styles.addBadge, {
339
- borderColor: theme.colors.border
393
+ style: [styles.avatarRing, {
394
+ borderColor: resolveAccentHex(current.color, theme.colors.primary)
340
395
  }],
341
- children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
342
- name: "plus",
343
- size: 20,
344
- color: theme.colors.textSecondary
396
+ children: /*#__PURE__*/_jsx(Avatar, {
397
+ source: current.avatarUrl ?? undefined,
398
+ variant: "thumb",
399
+ name: current.displayName,
400
+ size: HEADER_AVATAR_SIZE
345
401
  })
346
- }), /*#__PURE__*/_jsx(Text, {
347
- style: [styles.rowName, {
348
- color: theme.colors.textSecondary
349
- }],
350
- children: t('signin.addAccountTitle') || 'Add another account'
351
- })]
352
- }), /*#__PURE__*/_jsx(View, {
353
- style: styles.footerLinks,
354
- children: /*#__PURE__*/_jsx(Pressable, {
355
- onPress: handlers.onManage,
356
- accessibilityRole: "button",
357
- children: /*#__PURE__*/_jsx(Text, {
358
- style: [styles.linkText, {
359
- color: theme.colors.primary
402
+ }), /*#__PURE__*/_jsxs(View, {
403
+ style: styles.currentAccountMeta,
404
+ children: [/*#__PURE__*/_jsx(Text, {
405
+ style: [styles.currentAccountName, {
406
+ color: theme.colors.text
360
407
  }],
361
- children: t('accountMenu.manage') || 'Manage accounts'
362
- })
363
- })
364
- })]
408
+ numberOfLines: 1,
409
+ children: current.displayName
410
+ }), current.email ? /*#__PURE__*/_jsx(Text, {
411
+ style: [styles.currentAccountEmail, {
412
+ color: theme.colors.textSecondary
413
+ }],
414
+ numberOfLines: 1,
415
+ children: current.email
416
+ }) : null]
417
+ }), hasOtherAccounts ? /*#__PURE__*/_jsx(MaterialCommunityIcons, {
418
+ name: expanded ? 'chevron-up' : 'chevron-down',
419
+ size: 24,
420
+ color: theme.colors.textSecondary
421
+ }) : null]
422
+ }) : null, /*#__PURE__*/_jsx(Button, {
423
+ variant: "outline",
424
+ onPress: handlers.onManage,
425
+ style: styles.manageButton,
426
+ children: t('accountMenu.manage') || 'Manage your Oxy account'
427
+ }), showList ? /*#__PURE__*/_jsxs(SettingsListGroup, {
428
+ children: [hasOtherAccounts ? orderedAccounts.map(renderAccountItem) : null, /*#__PURE__*/_jsx(SettingsListItem, {
429
+ icon: /*#__PURE__*/_jsx(View, {
430
+ style: [styles.addBadge, {
431
+ borderColor: theme.colors.border
432
+ }],
433
+ children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
434
+ name: "plus",
435
+ size: 20,
436
+ color: theme.colors.textSecondary
437
+ })
438
+ }),
439
+ title: t('signin.addAccountTitle') || 'Add another account',
440
+ onPress: handlers.onAdd,
441
+ disabled: switchingDisabled,
442
+ accessibilityLabel: t('signin.addAccountTitle') || 'Add another account',
443
+ showChevron: false
444
+ }), /*#__PURE__*/_jsx(SettingsListItem, {
445
+ icon: /*#__PURE__*/_jsx(View, {
446
+ style: [styles.addBadge, {
447
+ borderColor: theme.colors.border
448
+ }],
449
+ children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
450
+ name: "cog-outline",
451
+ size: 20,
452
+ color: theme.colors.textSecondary
453
+ })
454
+ }),
455
+ title: t('accountSwitcher.manageOnDevice') || 'Manage accounts on this device',
456
+ onPress: handlers.onManage,
457
+ disabled: switchingDisabled,
458
+ accessibilityLabel: t('accountSwitcher.manageOnDevice') || 'Manage accounts on this device',
459
+ showChevron: false
460
+ })]
461
+ }) : null]
365
462
  });
366
463
  };
367
464
  const AccountRow = ({