@oxyhq/services 22.9.0 → 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 (428) 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/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +25 -125
  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/ProfileButton.js +1 -1
  9. package/lib/commonjs/ui/components/RequireOxyAuth.js +1 -1
  10. package/lib/commonjs/ui/components/SurfaceHeaderAction.js +63 -0
  11. package/lib/commonjs/ui/components/SurfaceHeaderAction.js.map +1 -0
  12. package/lib/commonjs/ui/components/SurfaceScreen.js +52 -5
  13. package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -1
  14. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +46 -29
  15. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  16. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +47 -23
  17. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
  18. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js +22 -12
  19. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -1
  20. package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js +83 -0
  21. package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
  22. package/lib/commonjs/ui/context/OxyContext.js +23 -9
  23. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  24. package/lib/commonjs/ui/hooks/useAvatarPicker.js +34 -39
  25. package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
  26. package/lib/commonjs/ui/hooks/useSurfaceHeader.js +46 -0
  27. package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -0
  28. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +1 -1
  29. package/lib/commonjs/ui/navigation/accountDialogManager.js +14 -2
  30. package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
  31. package/lib/commonjs/ui/navigation/routes.js +3 -3
  32. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  33. package/lib/commonjs/ui/navigation/surfaceBackBridge.js +68 -0
  34. package/lib/commonjs/ui/navigation/surfaceBackBridge.js.map +1 -0
  35. package/lib/commonjs/ui/navigation/surfaceRegistry.js +52 -8
  36. package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -1
  37. package/lib/commonjs/ui/navigation/surfaces.js +42 -5
  38. package/lib/commonjs/ui/navigation/surfaces.js.map +1 -1
  39. package/lib/commonjs/ui/screens/AccountMembersScreen.js +214 -283
  40. package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
  41. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +88 -118
  42. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  43. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +22 -36
  44. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  45. package/lib/commonjs/ui/screens/AppInfoScreen.js +219 -226
  46. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/AvatarCropScreen.js +10 -14
  48. package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +24 -39
  50. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/CreateAccountScreen.js +136 -158
  52. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +29 -36
  54. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/EditProfileScreen.js +101 -109
  56. package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/FAQScreen.js +10 -15
  58. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
  59. package/lib/commonjs/ui/screens/FeedbackScreen.js +8 -16
  60. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  61. package/lib/commonjs/ui/screens/FileManagementScreen.js +219 -206
  62. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  63. package/lib/commonjs/ui/screens/HelpSupportScreen.js +62 -69
  64. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  65. package/lib/commonjs/ui/screens/HistoryViewScreen.js +63 -79
  66. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  67. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +69 -98
  68. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  69. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +8 -14
  70. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  71. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +77 -94
  72. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  73. package/lib/commonjs/ui/screens/ManageAccountScreen.js +99 -134
  74. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  75. package/lib/commonjs/ui/screens/NotificationsScreen.js +69 -76
  76. package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
  77. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -8
  78. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  79. package/lib/commonjs/ui/screens/PreferencesScreen.js +67 -74
  80. package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
  81. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +55 -91
  82. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  83. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +291 -304
  84. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  85. package/lib/commonjs/ui/screens/ProfileScreen.js +100 -114
  86. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  87. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +38 -45
  88. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  89. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +44 -57
  90. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  91. package/lib/commonjs/ui/screens/UserLinksScreen.js +24 -31
  92. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
  93. package/lib/commonjs/ui/screens/UserListScreen.js +14 -24
  94. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  95. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
  96. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +66 -75
  97. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  98. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +111 -139
  99. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  100. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +13 -20
  101. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  102. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +14 -27
  103. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  104. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +68 -85
  105. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  106. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +28 -36
  107. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  108. package/lib/module/index.js +12 -5
  109. package/lib/module/index.js.map +1 -1
  110. package/lib/module/ui/components/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +27 -127
  111. package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -0
  112. package/lib/module/ui/components/OxyAuthChooser.js +137 -40
  113. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  114. package/lib/module/ui/components/OxyConsentScreen.js +1 -1
  115. package/lib/module/ui/components/ProfileButton.js +1 -1
  116. package/lib/module/ui/components/RequireOxyAuth.js +1 -1
  117. package/lib/module/ui/components/SurfaceHeaderAction.js +58 -0
  118. package/lib/module/ui/components/SurfaceHeaderAction.js.map +1 -0
  119. package/lib/module/ui/components/SurfaceScreen.js +53 -6
  120. package/lib/module/ui/components/SurfaceScreen.js.map +1 -1
  121. package/lib/module/ui/components/fileManagement/FileDetailsModal.js +46 -29
  122. package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  123. package/lib/module/ui/components/modals/DeleteAccountModal.js +46 -23
  124. package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
  125. package/lib/module/ui/components/oxyAuthChooserStyles.js +22 -12
  126. package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -1
  127. package/lib/module/ui/components/surfaces/ActionSheetSurface.js +78 -0
  128. package/lib/module/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
  129. package/lib/module/ui/context/OxyContext.js +23 -9
  130. package/lib/module/ui/context/OxyContext.js.map +1 -1
  131. package/lib/module/ui/hooks/useAvatarPicker.js +34 -39
  132. package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
  133. package/lib/module/ui/hooks/useSurfaceHeader.js +42 -0
  134. package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -0
  135. package/lib/module/ui/hooks/useSwitchableAccounts.js +1 -1
  136. package/lib/module/ui/navigation/accountDialogManager.js +14 -2
  137. package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
  138. package/lib/module/ui/navigation/routes.js +3 -3
  139. package/lib/module/ui/navigation/routes.js.map +1 -1
  140. package/lib/module/ui/navigation/surfaceBackBridge.js +63 -0
  141. package/lib/module/ui/navigation/surfaceBackBridge.js.map +1 -0
  142. package/lib/module/ui/navigation/surfaceRegistry.js +52 -8
  143. package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -1
  144. package/lib/module/ui/navigation/surfaces.js +42 -5
  145. package/lib/module/ui/navigation/surfaces.js.map +1 -1
  146. package/lib/module/ui/screens/AccountMembersScreen.js +218 -286
  147. package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
  148. package/lib/module/ui/screens/AccountSettingsScreen.js +92 -121
  149. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  150. package/lib/module/ui/screens/AccountVerificationScreen.js +25 -38
  151. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  152. package/lib/module/ui/screens/AppInfoScreen.js +220 -227
  153. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  154. package/lib/module/ui/screens/AvatarCropScreen.js +10 -14
  155. package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
  156. package/lib/module/ui/screens/ConnectedAppsScreen.js +26 -40
  157. package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
  158. package/lib/module/ui/screens/CreateAccountScreen.js +139 -160
  159. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  160. package/lib/module/ui/screens/EditProfileFieldScreen.js +32 -38
  161. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  162. package/lib/module/ui/screens/EditProfileScreen.js +102 -110
  163. package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
  164. package/lib/module/ui/screens/FAQScreen.js +11 -15
  165. package/lib/module/ui/screens/FAQScreen.js.map +1 -1
  166. package/lib/module/ui/screens/FeedbackScreen.js +10 -17
  167. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  168. package/lib/module/ui/screens/FileManagementScreen.js +222 -208
  169. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  170. package/lib/module/ui/screens/HelpSupportScreen.js +64 -70
  171. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  172. package/lib/module/ui/screens/HistoryViewScreen.js +65 -81
  173. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  174. package/lib/module/ui/screens/LanguageSelectorScreen.js +71 -99
  175. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  176. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +10 -15
  177. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  178. package/lib/module/ui/screens/LegalDocumentsScreen.js +78 -94
  179. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  180. package/lib/module/ui/screens/ManageAccountScreen.js +102 -137
  181. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  182. package/lib/module/ui/screens/NotificationsScreen.js +71 -77
  183. package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
  184. package/lib/module/ui/screens/PaymentGatewayScreen.js +4 -9
  185. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  186. package/lib/module/ui/screens/PreferencesScreen.js +69 -75
  187. package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
  188. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +58 -93
  189. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  190. package/lib/module/ui/screens/PrivacySettingsScreen.js +293 -305
  191. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  192. package/lib/module/ui/screens/ProfileScreen.js +102 -116
  193. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  194. package/lib/module/ui/screens/SavesCollectionsScreen.js +40 -46
  195. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  196. package/lib/module/ui/screens/SearchSettingsScreen.js +46 -58
  197. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  198. package/lib/module/ui/screens/UserLinksScreen.js +26 -32
  199. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
  200. package/lib/module/ui/screens/UserListScreen.js +14 -24
  201. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  202. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
  203. package/lib/module/ui/screens/trust/TrustAboutScreen.js +67 -75
  204. package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  205. package/lib/module/ui/screens/trust/TrustCenterScreen.js +112 -139
  206. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  207. package/lib/module/ui/screens/trust/TrustFAQScreen.js +15 -21
  208. package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  209. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +14 -26
  210. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  211. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +69 -85
  212. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  213. package/lib/module/ui/screens/trust/TrustRulesScreen.js +30 -37
  214. package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  215. package/lib/typescript/commonjs/index.d.ts +2 -0
  216. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  217. package/lib/typescript/commonjs/ui/components/{OxyAccountDialog.d.ts → OxyAccountDialogScreen.d.ts} +4 -4
  218. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
  219. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +3 -3
  220. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  221. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +2 -2
  222. package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts +1 -1
  223. package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts +16 -0
  224. package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
  225. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts +4 -2
  226. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -1
  227. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
  228. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  229. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +17 -2
  230. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  231. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts +19 -9
  232. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
  234. package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
  235. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  236. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +7 -11
  237. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  238. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +31 -0
  239. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
  240. package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +1 -1
  241. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +14 -2
  242. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts +16 -0
  244. package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
  245. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +31 -13
  246. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  249. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  251. package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts +0 -4
  253. package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  255. package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  257. package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  263. package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  264. package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
  267. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  268. package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
  271. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  272. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  273. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  275. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  276. package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
  277. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
  278. package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  280. package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  282. package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  283. package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/ui/types/navigation.d.ts +8 -0
  285. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  286. package/lib/typescript/module/index.d.ts +2 -0
  287. package/lib/typescript/module/index.d.ts.map +1 -1
  288. package/lib/typescript/module/ui/components/{OxyAccountDialog.d.ts → OxyAccountDialogScreen.d.ts} +4 -4
  289. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
  290. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +3 -3
  291. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  292. package/lib/typescript/module/ui/components/ProfileButton.d.ts +2 -2
  293. package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts +1 -1
  294. package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts +16 -0
  295. package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
  296. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts +4 -2
  297. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -1
  298. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
  299. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  300. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +17 -2
  301. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  302. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts +19 -9
  303. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
  304. package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
  305. package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
  306. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  307. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +7 -11
  308. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  309. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +31 -0
  310. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
  311. package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +1 -1
  312. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +14 -2
  313. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
  314. package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts +16 -0
  315. package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
  316. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +31 -13
  317. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -1
  318. package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -1
  319. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  320. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  321. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  322. package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
  323. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +0 -4
  324. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  325. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  326. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  327. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  328. package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
  329. package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
  330. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  331. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  332. package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  333. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  334. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  335. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  336. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  337. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
  338. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  339. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
  340. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  341. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
  342. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  343. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  344. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  345. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  346. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  347. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
  348. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  349. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  350. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  351. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  352. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  353. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  354. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  355. package/lib/typescript/module/ui/types/navigation.d.ts +8 -0
  356. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  357. package/package.json +2 -2
  358. package/src/index.ts +12 -5
  359. package/src/ui/components/{OxyAccountDialog.tsx → OxyAccountDialogScreen.tsx} +21 -110
  360. package/src/ui/components/OxyAuthChooser.tsx +153 -33
  361. package/src/ui/components/OxyConsentScreen.tsx +1 -1
  362. package/src/ui/components/ProfileButton.tsx +2 -2
  363. package/src/ui/components/RequireOxyAuth.tsx +1 -1
  364. package/src/ui/components/SurfaceHeaderAction.tsx +60 -0
  365. package/src/ui/components/SurfaceScreen.tsx +66 -6
  366. package/src/ui/components/fileManagement/FileDetailsModal.tsx +50 -36
  367. package/src/ui/components/modals/DeleteAccountModal.tsx +47 -26
  368. package/src/ui/components/oxyAuthChooserStyles.ts +22 -12
  369. package/src/ui/components/surfaces/ActionSheetSurface.tsx +98 -0
  370. package/src/ui/context/OxyContext.tsx +22 -8
  371. package/src/ui/hooks/useAvatarPicker.ts +53 -66
  372. package/src/ui/hooks/useSurfaceHeader.ts +56 -0
  373. package/src/ui/hooks/useSwitchableAccounts.ts +1 -1
  374. package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +68 -0
  375. package/src/ui/navigation/accountDialogManager.ts +14 -2
  376. package/src/ui/navigation/routes.ts +3 -3
  377. package/src/ui/navigation/surfaceBackBridge.ts +69 -0
  378. package/src/ui/navigation/surfaceRegistry.ts +80 -14
  379. package/src/ui/navigation/surfaces.ts +33 -5
  380. package/src/ui/screens/AccountMembersScreen.tsx +39 -100
  381. package/src/ui/screens/AccountSettingsScreen.tsx +32 -54
  382. package/src/ui/screens/AccountVerificationScreen.tsx +23 -51
  383. package/src/ui/screens/AppInfoScreen.tsx +6 -13
  384. package/src/ui/screens/AvatarCropScreen.tsx +8 -17
  385. package/src/ui/screens/ConnectedAppsScreen.tsx +39 -60
  386. package/src/ui/screens/CreateAccountScreen.tsx +13 -39
  387. package/src/ui/screens/EditProfileFieldScreen.tsx +30 -48
  388. package/src/ui/screens/EditProfileScreen.tsx +7 -16
  389. package/src/ui/screens/FAQScreen.tsx +9 -13
  390. package/src/ui/screens/FeedbackScreen.tsx +8 -22
  391. package/src/ui/screens/FileManagementScreen.tsx +191 -188
  392. package/src/ui/screens/HelpSupportScreen.tsx +7 -13
  393. package/src/ui/screens/HistoryViewScreen.tsx +26 -31
  394. package/src/ui/screens/LanguageSelectorScreen.tsx +12 -46
  395. package/src/ui/screens/LearnMoreUsernamesScreen.tsx +8 -16
  396. package/src/ui/screens/LegalDocumentsScreen.tsx +7 -22
  397. package/src/ui/screens/ManageAccountScreen.tsx +96 -165
  398. package/src/ui/screens/NotificationsScreen.tsx +7 -13
  399. package/src/ui/screens/PaymentGatewayScreen.tsx +3 -10
  400. package/src/ui/screens/PreferencesScreen.tsx +7 -13
  401. package/src/ui/screens/PremiumSubscriptionScreen.tsx +52 -90
  402. package/src/ui/screens/PrivacySettingsScreen.tsx +9 -21
  403. package/src/ui/screens/ProfileScreen.tsx +9 -11
  404. package/src/ui/screens/SavesCollectionsScreen.tsx +7 -13
  405. package/src/ui/screens/SearchSettingsScreen.tsx +9 -21
  406. package/src/ui/screens/UserLinksScreen.tsx +7 -14
  407. package/src/ui/screens/UserListScreen.tsx +2 -5
  408. package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +1 -1
  409. package/src/ui/screens/trust/TrustAboutScreen.tsx +10 -17
  410. package/src/ui/screens/trust/TrustCenterScreen.tsx +9 -28
  411. package/src/ui/screens/trust/TrustFAQScreen.tsx +15 -18
  412. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +3 -5
  413. package/src/ui/screens/trust/TrustRewardsScreen.tsx +11 -26
  414. package/src/ui/screens/trust/TrustRulesScreen.tsx +10 -13
  415. package/src/ui/types/navigation.ts +8 -0
  416. package/lib/commonjs/ui/components/Header.js +0 -305
  417. package/lib/commonjs/ui/components/Header.js.map +0 -1
  418. package/lib/commonjs/ui/components/OxyAccountDialog.js.map +0 -1
  419. package/lib/module/ui/components/Header.js +0 -299
  420. package/lib/module/ui/components/Header.js.map +0 -1
  421. package/lib/module/ui/components/OxyAccountDialog.js.map +0 -1
  422. package/lib/typescript/commonjs/ui/components/Header.d.ts +0 -33
  423. package/lib/typescript/commonjs/ui/components/Header.d.ts.map +0 -1
  424. package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +0 -1
  425. package/lib/typescript/module/ui/components/Header.d.ts +0 -33
  426. package/lib/typescript/module/ui/components/Header.d.ts.map +0 -1
  427. package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +0 -1
  428. package/src/ui/components/Header.tsx +0 -224
@@ -1,5 +1,5 @@
1
1
  /**
2
- * OxyAccountDialog — the ONE unified account dialog BODY for `@oxyhq/services`.
2
+ * OxyAccountDialogScreen — the ONE unified account dialog BODY for `@oxyhq/services`.
3
3
  *
4
4
  * The header (title/subtitle per view + back button) around the headless chooser
5
5
  * logic, which lives in `OxyAuthChooser` — the account switcher, sign-in,
@@ -23,17 +23,13 @@
23
23
 
24
24
  import type React from 'react';
25
25
  import { useCallback, useSyncExternalStore } from 'react';
26
- import { Pressable, ScrollView, StyleSheet, View } from 'react-native';
27
- import { MaterialCommunityIcons } from '@expo/vector-icons';
28
- import { Text } from '@oxyhq/bloom/typography';
29
- import { useTheme } from '@oxyhq/bloom/theme';
26
+ import { StyleSheet, View } from 'react-native';
30
27
  import type { AccountDialogSnapshot } from '@oxyhq/core';
31
28
  import { useOxy } from '../context/OxyContext';
32
29
  import { useI18n } from '../hooks/useI18n';
30
+ import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
33
31
  import OxyAuthChooser from './OxyAuthChooser';
34
- import { LogoIcon } from './logo/LogoIcon';
35
32
 
36
- type Theme = ReturnType<typeof useTheme>;
37
33
  type Translate = ReturnType<typeof useI18n>['t'];
38
34
 
39
35
  /**
@@ -49,9 +45,8 @@ type Translate = ReturnType<typeof useI18n>['t'];
49
45
  * `@oxyhq/core`. Closing routes through `useOxy().closeAccountDialog`, which
50
46
  * dismisses the surface and runs its exit animation.
51
47
  */
52
- const OxyAccountDialog: React.FC = () => {
48
+ const OxyAccountDialogScreen: React.FC = () => {
53
49
  const { accountDialogController: controller, closeAccountDialog } = useOxy();
54
- const theme = useTheme();
55
50
  const { t } = useI18n();
56
51
 
57
52
  // A lightweight, header-only binding to the same controller `OxyAuthChooser`
@@ -67,79 +62,29 @@ const OxyAccountDialog: React.FC = () => {
67
62
  );
68
63
  const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
69
64
 
70
- if (!controller) {
71
- return null;
72
- }
73
-
74
65
  const { view } = snapshot;
75
66
  const showBack =
76
67
  view === 'qr' || view === 'signup' || (view === 'add' && snapshot.accounts.length > 0);
68
+ const goToAccounts = useCallback(() => controller?.setView('accounts'), [controller]);
69
+ const { title, subtitle } = headerCopy(view, snapshot.accounts.length, t);
77
70
 
78
- return (
79
- <>
80
- <DialogHeader
81
- snapshot={snapshot}
82
- theme={theme}
83
- t={t}
84
- showBack={showBack}
85
- onBack={() => controller.setView('accounts')}
86
- onClose={closeAccountDialog}
87
- />
88
- <ScrollView style={styles.body} contentContainerStyle={styles.bodyContent} showsVerticalScrollIndicator={false}>
89
- <OxyAuthChooser onComplete={closeAccountDialog} />
90
- </ScrollView>
91
- </>
92
- );
93
- };
94
-
95
- // ---------------------------------------------------------------------------
96
- // Header
97
- // ---------------------------------------------------------------------------
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
+ });
98
80
 
99
- interface HeaderProps {
100
- snapshot: AccountDialogSnapshot;
101
- theme: Theme;
102
- t: Translate;
103
- showBack: boolean;
104
- onBack: () => void;
105
- onClose: () => void;
106
- }
81
+ if (!controller) {
82
+ return null;
83
+ }
107
84
 
108
- const DialogHeader: React.FC<HeaderProps> = ({ snapshot, theme, t, showBack, onBack, onClose }) => {
109
- const { title, subtitle } = headerCopy(snapshot.view, snapshot.accounts.length, t);
110
85
  return (
111
- <View style={styles.header}>
112
- <View style={styles.headerBar}>
113
- {showBack ? (
114
- <Pressable
115
- onPress={onBack}
116
- style={[styles.iconButton, { backgroundColor: theme.colors.backgroundSecondary }]}
117
- accessibilityRole="button"
118
- accessibilityLabel={t('common.actions.back') || 'Back'}
119
- >
120
- <MaterialCommunityIcons name="chevron-left" size={22} color={theme.colors.textSecondary} />
121
- </Pressable>
122
- ) : (
123
- <View style={styles.iconButton} />
124
- )}
125
- <LogoIcon height={34} color={theme.colors.primary} />
126
- <Pressable
127
- onPress={onClose}
128
- style={[styles.iconButton, { backgroundColor: theme.colors.backgroundSecondary }]}
129
- accessibilityRole="button"
130
- accessibilityLabel={t('common.actions.close') || 'Close'}
131
- >
132
- <MaterialCommunityIcons name="close" size={20} color={theme.colors.textSecondary} />
133
- </Pressable>
134
- </View>
135
- <Text style={[styles.title, { color: theme.colors.text }]} numberOfLines={1}>
136
- {title}
137
- </Text>
138
- {subtitle ? (
139
- <Text style={[styles.subtitle, { color: theme.colors.textSecondary }]} numberOfLines={2}>
140
- {subtitle}
141
- </Text>
142
- ) : null}
86
+ <View style={styles.bodyContent}>
87
+ <OxyAuthChooser onComplete={closeAccountDialog} />
143
88
  </View>
144
89
  );
145
90
  };
@@ -194,44 +139,10 @@ const EMPTY_SNAPSHOT: AccountDialogSnapshot = {
194
139
  };
195
140
 
196
141
  const styles = StyleSheet.create({
197
- header: {
198
- alignItems: 'center',
199
- marginBottom: 12,
200
- },
201
- headerBar: {
202
- width: '100%',
203
- flexDirection: 'row',
204
- alignItems: 'center',
205
- justifyContent: 'space-between',
206
- marginBottom: 8,
207
- },
208
- iconButton: {
209
- width: 32,
210
- height: 32,
211
- borderRadius: 16,
212
- alignItems: 'center',
213
- justifyContent: 'center',
214
- },
215
- title: {
216
- fontSize: 22,
217
- fontWeight: '800',
218
- letterSpacing: -0.4,
219
- textAlign: 'center',
220
- marginTop: 6,
221
- },
222
- subtitle: {
223
- fontSize: 14,
224
- lineHeight: 19,
225
- textAlign: 'center',
226
- marginTop: 4,
227
- },
228
- body: {
229
- width: '100%',
230
- },
231
142
  bodyContent: {
232
143
  paddingTop: 4,
233
144
  paddingBottom: 4,
234
145
  },
235
146
  });
236
147
 
237
- export default OxyAccountDialog;
148
+ export default OxyAccountDialogScreen;
@@ -4,8 +4,8 @@
4
4
  *
5
5
  * A thin React Native binding over the headless `AccountDialogController` in
6
6
  * `@oxyhq/core` (bound via `useSyncExternalStore`) — the same data/state
7
- * machine {@link OxyAccountDialog} renders, extracted so it can be mounted in
8
- * TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialog` (the normal
7
+ * machine {@link OxyAccountDialogScreen} renders, extracted so it can be mounted in
8
+ * TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialogScreen` (the normal
9
9
  * in-app surface), and mounted bare by a future auth.oxy.so hub page for the
10
10
  * cross-origin passkey popup (b2) — same chooser, two hosts, two completion
11
11
  * strategies via the `onComplete` prop. Neither host duplicates view logic.
@@ -61,6 +61,7 @@ import { MaterialCommunityIcons } from '@expo/vector-icons';
61
61
  import QRCode from 'react-native-qrcode-svg';
62
62
  import { Avatar } from '@oxyhq/bloom/avatar';
63
63
  import { Button } from '@oxyhq/bloom/button';
64
+ import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
64
65
  import { toast } from '@oxyhq/bloom';
65
66
  import { Text } from '@oxyhq/bloom/typography';
66
67
  import {
@@ -81,6 +82,8 @@ import { authChooserStyles as styles } from './oxyAuthChooserStyles';
81
82
 
82
83
  /** Diameter of a row avatar. */
83
84
  const ROW_AVATAR_SIZE = 40;
85
+ /** Diameter of the prominent current-account avatar in the collapsed header. */
86
+ const HEADER_AVATAR_SIZE = 48;
84
87
  /** High-contrast QR colors — intentionally fixed (NOT themed) for scan reliability. */
85
88
  const QR_PLATE_BG = '#FFFFFF';
86
89
  const QR_FOREGROUND = '#000000';
@@ -122,7 +125,7 @@ type Theme = ReturnType<typeof useTheme>;
122
125
  type Translate = ReturnType<typeof useI18n>['t'];
123
126
 
124
127
  /**
125
- * The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialog`
128
+ * The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialogScreen`
126
129
  * (wrapped in Bloom's `<Dialog>`) today; mountable bare by any future host that
127
130
  * supplies its own `onComplete`.
128
131
  */
@@ -371,7 +374,24 @@ interface AccountsViewProps {
371
374
  handlers: OxyAuthChooserHandlers;
372
375
  }
373
376
 
377
+ /**
378
+ * The signed-in switcher, in the Google account-menu shape:
379
+ * - COLLAPSED (default): the active account is prominent at the top (avatar +
380
+ * name + email) with a trailing expand chevron, and a "Manage your Oxy
381
+ * account" outline button directly under it. Nothing else.
382
+ * - EXPANDED: the same header + button, then the full account list (current
383
+ * first with a check-circle, every other switchable account, "Add another
384
+ * account", and "Manage accounts on this device").
385
+ *
386
+ * Collapse state is a plain `useState` toggled in the header's press handler —
387
+ * no `useEffect`, no derived-from-props sync. When there is only ONE account
388
+ * (nothing to switch to) the chevron is hidden and the "Add another account" +
389
+ * "Manage accounts on this device" items render inline, so those affordances
390
+ * stay reachable without a pointless expand toggle.
391
+ */
374
392
  const AccountsView: React.FC<AccountsViewProps> = ({ snapshot, theme, t, handlers }) => {
393
+ const [expanded, setExpanded] = useState(false);
394
+
375
395
  if (snapshot.loading && snapshot.accounts.length === 0) {
376
396
  return (
377
397
  <View style={styles.centeredBlock}>
@@ -383,40 +403,140 @@ const AccountsView: React.FC<AccountsViewProps> = ({ snapshot, theme, t, handler
383
403
  );
384
404
  }
385
405
 
406
+ const switchingDisabled = snapshot.switchingAccountId !== null;
407
+ const current = snapshot.accounts.find((account) => account.isCurrent) ?? snapshot.accounts[0];
408
+ const hasOtherAccounts = snapshot.accounts.some(
409
+ (account) => account.accountId !== current?.accountId,
410
+ );
411
+ // Current account first, then the rest — the expanded list order.
412
+ const orderedAccounts = current
413
+ ? [current, ...snapshot.accounts.filter((account) => account.accountId !== current.accountId)]
414
+ : snapshot.accounts;
415
+ // Multi-account: reveal the list only when expanded. Single-account: no expand
416
+ // affordance, so surface add/manage inline.
417
+ const showList = hasOtherAccounts ? expanded : true;
418
+
419
+ const renderAccountItem = (account: SwitchableAccount) => {
420
+ const accent = resolveAccentHex(account.color, theme.colors.primary);
421
+ const isSwitching = snapshot.switchingAccountId === account.accountId;
422
+ return (
423
+ <SettingsListItem
424
+ key={account.accountId}
425
+ icon={
426
+ <View
427
+ style={[styles.avatarRing, { borderColor: account.isCurrent ? accent : 'transparent' }]}
428
+ >
429
+ <Avatar
430
+ source={account.avatarUrl ?? undefined}
431
+ variant="thumb"
432
+ name={account.displayName}
433
+ size={ROW_AVATAR_SIZE}
434
+ />
435
+ </View>
436
+ }
437
+ title={account.displayName}
438
+ description={account.email ?? undefined}
439
+ onPress={() => handlers.onSwitch(account.accountId)}
440
+ disabled={switchingDisabled}
441
+ accessibilityLabel={account.displayName}
442
+ showChevron={false}
443
+ rightElement={
444
+ isSwitching ? (
445
+ <MaterialCommunityIcons name="loading" size={20} color={accent} />
446
+ ) : account.isCurrent ? (
447
+ <MaterialCommunityIcons name="check-circle" size={20} color={accent} />
448
+ ) : undefined
449
+ }
450
+ />
451
+ );
452
+ };
453
+
386
454
  return (
387
455
  <View style={styles.rows}>
388
- {snapshot.accounts.map((account) => (
389
- <AccountRow
390
- key={account.accountId}
391
- account={account}
392
- theme={theme}
393
- switching={snapshot.switchingAccountId === account.accountId}
394
- disabled={snapshot.switchingAccountId !== null}
395
- onPress={() => handlers.onSwitch(account.accountId)}
396
- />
397
- ))}
456
+ {current ? (
457
+ <Pressable
458
+ style={styles.currentAccountRow}
459
+ onPress={hasOtherAccounts ? () => setExpanded((value) => !value) : undefined}
460
+ disabled={hasOtherAccounts ? switchingDisabled : true}
461
+ accessibilityRole={hasOtherAccounts ? 'button' : undefined}
462
+ accessibilityState={hasOtherAccounts ? { expanded } : undefined}
463
+ accessibilityLabel={current.displayName}
464
+ >
465
+ <View
466
+ style={[
467
+ styles.avatarRing,
468
+ { borderColor: resolveAccentHex(current.color, theme.colors.primary) },
469
+ ]}
470
+ >
471
+ <Avatar
472
+ source={current.avatarUrl ?? undefined}
473
+ variant="thumb"
474
+ name={current.displayName}
475
+ size={HEADER_AVATAR_SIZE}
476
+ />
477
+ </View>
478
+ <View style={styles.currentAccountMeta}>
479
+ <Text style={[styles.currentAccountName, { color: theme.colors.text }]} numberOfLines={1}>
480
+ {current.displayName}
481
+ </Text>
482
+ {current.email ? (
483
+ <Text
484
+ style={[styles.currentAccountEmail, { color: theme.colors.textSecondary }]}
485
+ numberOfLines={1}
486
+ >
487
+ {current.email}
488
+ </Text>
489
+ ) : null}
490
+ </View>
491
+ {hasOtherAccounts ? (
492
+ <MaterialCommunityIcons
493
+ name={expanded ? 'chevron-up' : 'chevron-down'}
494
+ size={24}
495
+ color={theme.colors.textSecondary}
496
+ />
497
+ ) : null}
498
+ </Pressable>
499
+ ) : null}
398
500
 
399
- <Pressable
400
- style={[styles.addRow, { borderColor: theme.colors.border }]}
401
- onPress={handlers.onAdd}
402
- accessibilityRole="button"
403
- accessibilityLabel={t('signin.addAccountTitle') || 'Add another account'}
404
- >
405
- <View style={[styles.addBadge, { borderColor: theme.colors.border }]}>
406
- <MaterialCommunityIcons name="plus" size={20} color={theme.colors.textSecondary} />
407
- </View>
408
- <Text style={[styles.rowName, { color: theme.colors.textSecondary }]}>
409
- {t('signin.addAccountTitle') || 'Add another account'}
410
- </Text>
411
- </Pressable>
501
+ <Button variant="outline" onPress={handlers.onManage} style={styles.manageButton}>
502
+ {t('accountMenu.manage') || 'Manage your Oxy account'}
503
+ </Button>
412
504
 
413
- <View style={styles.footerLinks}>
414
- <Pressable onPress={handlers.onManage} accessibilityRole="button">
415
- <Text style={[styles.linkText, { color: theme.colors.primary }]}>
416
- {t('accountMenu.manage') || 'Manage accounts'}
417
- </Text>
418
- </Pressable>
419
- </View>
505
+ {showList ? (
506
+ <SettingsListGroup>
507
+ {hasOtherAccounts ? orderedAccounts.map(renderAccountItem) : null}
508
+
509
+ <SettingsListItem
510
+ icon={
511
+ <View style={[styles.addBadge, { borderColor: theme.colors.border }]}>
512
+ <MaterialCommunityIcons name="plus" size={20} color={theme.colors.textSecondary} />
513
+ </View>
514
+ }
515
+ title={t('signin.addAccountTitle') || 'Add another account'}
516
+ onPress={handlers.onAdd}
517
+ disabled={switchingDisabled}
518
+ accessibilityLabel={t('signin.addAccountTitle') || 'Add another account'}
519
+ showChevron={false}
520
+ />
521
+
522
+ <SettingsListItem
523
+ icon={
524
+ <View style={[styles.addBadge, { borderColor: theme.colors.border }]}>
525
+ <MaterialCommunityIcons
526
+ name="cog-outline"
527
+ size={20}
528
+ color={theme.colors.textSecondary}
529
+ />
530
+ </View>
531
+ }
532
+ title={t('accountSwitcher.manageOnDevice') || 'Manage accounts on this device'}
533
+ onPress={handlers.onManage}
534
+ disabled={switchingDisabled}
535
+ accessibilityLabel={t('accountSwitcher.manageOnDevice') || 'Manage accounts on this device'}
536
+ showChevron={false}
537
+ />
538
+ </SettingsListGroup>
539
+ ) : null}
420
540
  </View>
421
541
  );
422
542
  };
@@ -14,7 +14,7 @@
14
14
  * and behavioral lockstep.
15
15
  *
16
16
  * Theming is `useTheme()` + a `StyleSheet` (the same approach as
17
- * {@link OxyAccountDialog}) so it renders correctly in EVERY consumer, including
17
+ * {@link OxyAccountDialogScreen}) so it renders correctly in EVERY consumer, including
18
18
  * apps that do not use NativeWind. Copy is localized through {@link useI18n}
19
19
  * under the `consent.*` keys.
20
20
  */
@@ -65,7 +65,7 @@ export interface ProfileButtonProps {
65
65
  onNavigateProfile?: () => void;
66
66
  /**
67
67
  * Retained for source compatibility. The trigger now opens the unified
68
- * `OxyAccountDialog` (a centered / bottom-sheet modal) rather than an
68
+ * `OxyAccountDialogScreen` (a centered / bottom-sheet modal) rather than an
69
69
  * anchored popover, so popover placement no longer applies.
70
70
  */
71
71
  placement?: 'up' | 'down' | 'auto';
@@ -82,7 +82,7 @@ export interface ProfileButtonProps {
82
82
  /**
83
83
  * Self-contained sidebar account trigger, modeled on Bluesky's ProfileCard and
84
84
  * the Oxy inbox's `MailboxDrawer` footer. Pressing it opens the unified
85
- * {@link OxyAccountDialog} — the single account switcher + sign-in surface — via
85
+ * {@link OxyAccountDialogScreen} — the single account switcher + sign-in surface — via
86
86
  * `useOxy().openAccountDialog`.
87
87
  *
88
88
  * Three auth states from {@link useAuth}:
@@ -15,7 +15,7 @@
15
15
  * neutral loading state so the signed-out wall never flashes before the
16
16
  * device-first cold boot concludes (the documented cold-boot race).
17
17
  *
18
- * Styling follows the sibling `OxyAccountDialog`/`OxySignInButton` pattern —
18
+ * Styling follows the sibling `OxyAccountDialogScreen`/`OxySignInButton` pattern —
19
19
  * `useTheme()` + `StyleSheet` (NOT NativeWind), so the gate renders correctly in
20
20
  * EVERY consumer, including apps that do not run NativeWind (e.g. the accounts
21
21
  * app).
@@ -0,0 +1,60 @@
1
+ import type React from 'react';
2
+ import { ActivityIndicator, StyleSheet } from 'react-native';
3
+ import { useTheme } from '@oxyhq/bloom/theme';
4
+ import { PressableScale } from '@oxyhq/bloom/pressable-scale';
5
+ import { Text } from '@oxyhq/bloom/typography';
6
+
7
+ export interface SurfaceHeaderActionProps {
8
+ /** Button label (e.g. a translated "Save"). */
9
+ label: string;
10
+ onPress: () => void;
11
+ /** Show a spinner instead of the label (also disables the button). */
12
+ loading?: boolean;
13
+ disabled?: boolean;
14
+ }
15
+
16
+ /**
17
+ * A filled pill action for a surface's nav-header right slot — the canonical
18
+ * "Save" affordance. Pass a memoized instance to `useSurfaceHeader({ right })`
19
+ * so the header does not thrash between renders.
20
+ */
21
+ export const SurfaceHeaderAction: React.FC<SurfaceHeaderActionProps> = ({
22
+ label,
23
+ onPress,
24
+ loading,
25
+ disabled,
26
+ }) => {
27
+ const { colors } = useTheme();
28
+ const isDisabled = disabled || loading;
29
+ return (
30
+ <PressableScale
31
+ onPress={onPress}
32
+ disabled={isDisabled}
33
+ accessibilityRole="button"
34
+ accessibilityLabel={label}
35
+ style={[styles.button, { backgroundColor: colors.primary, opacity: isDisabled ? 0.5 : 1 }]}
36
+ >
37
+ {loading ? (
38
+ <ActivityIndicator size="small" color={colors.primaryForeground} />
39
+ ) : (
40
+ <Text style={[styles.label, { color: colors.primaryForeground }]}>{label}</Text>
41
+ )}
42
+ </PressableScale>
43
+ );
44
+ };
45
+
46
+ const styles = StyleSheet.create({
47
+ button: {
48
+ height: 36,
49
+ minWidth: 64,
50
+ paddingHorizontal: 14,
51
+ borderRadius: 18,
52
+ alignItems: 'center',
53
+ justifyContent: 'center',
54
+ },
55
+ label: {
56
+ fontSize: 14,
57
+ fontWeight: '600',
58
+ letterSpacing: -0.2,
59
+ },
60
+ });
@@ -1,18 +1,24 @@
1
- import React, { useCallback, useEffect, useMemo, type ErrorInfo } from 'react';
1
+ import React, { useCallback, useEffect, useMemo, useState, type ErrorInfo } from 'react';
2
2
  import { StyleSheet, Text, View } from 'react-native';
3
3
  import { useStore } from 'zustand';
4
4
  import { useTheme } from '@oxyhq/bloom/theme';
5
+ import { useDialogHeader, type DialogHeaderConfig } from '@oxyhq/bloom/dialog';
5
6
  import type { SurfaceControls } from '@oxyhq/bloom/surfaces';
6
7
  import type { RouteName } from '../navigation/routes';
7
8
  import { getScreenComponent } from '../navigation/routes';
9
+ import { pushSurfaceBackHandler } from '../navigation/surfaceBackBridge';
8
10
  import type { SurfaceNavStack } from '../navigation/surfaceNavStack';
9
- import type { SurfacePresentation } from '../navigation/surfaceRegistry';
11
+ import { getSurfaceConfig, type SurfacePresentation } from '../navigation/surfaceRegistry';
10
12
  import {
11
13
  closeAllRouteSurfaces,
12
14
  navigateWithinOrPresent,
13
15
  presentRoute,
14
16
  replaceWithinOrPresent,
15
17
  } from '../navigation/surfaces';
18
+ import {
19
+ SurfaceHeaderContext,
20
+ type SurfaceHeaderContent,
21
+ } from '../hooks/useSurfaceHeader';
16
22
  import type { BaseScreenProps } from '../types/navigation';
17
23
 
18
24
  /** Error boundary catching screen render failures (e.g. a lazy `require()` throw). */
@@ -72,6 +78,8 @@ export interface SurfaceScreenProps {
72
78
  surface: SurfaceControls;
73
79
  /** This surface's presentation, so `navigate` knows when to drill in vs. stack. */
74
80
  presentation: SurfacePresentation;
81
+ /** Whether backdrop / Escape / back may dismiss at the root frame. Defaults to true. */
82
+ dismissOnBackdrop?: boolean;
75
83
  }
76
84
 
77
85
  /**
@@ -83,7 +91,12 @@ export interface SurfaceScreenProps {
83
91
  * effect) rather than a captured-controls call, so a dismiss requested before
84
92
  * this surface mounted still resolves the Bloom surface exactly once.
85
93
  */
86
- function SurfaceScreen({ navStack, surface, presentation }: SurfaceScreenProps) {
94
+ function SurfaceScreen({
95
+ navStack,
96
+ surface,
97
+ presentation,
98
+ dismissOnBackdrop = true,
99
+ }: SurfaceScreenProps) {
87
100
  const theme = useTheme();
88
101
  const state = useStore(navStack.store);
89
102
  const top = state.frames[state.frames.length - 1];
@@ -124,11 +137,56 @@ function SurfaceScreen({ navStack, surface, presentation }: SurfaceScreenProps)
124
137
  navStack.requestDismiss();
125
138
  }, [navStack]);
126
139
 
140
+ const handleSystemBack = useCallback((): boolean => {
141
+ if (navStack.goBack()) return true;
142
+ const current = navStack.getTop();
143
+ if (current.step > 0) {
144
+ navStack.setStep(current.step - 1);
145
+ return true;
146
+ }
147
+ if (dismissOnBackdrop) navStack.requestDismiss();
148
+ return true;
149
+ }, [navStack, dismissOnBackdrop]);
150
+
151
+ useEffect(() => pushSurfaceBackHandler(handleSystemBack), [handleSystemBack]);
152
+
127
153
  const present = useCallback(
128
154
  (route: RouteName, props?: Record<string, unknown>) => presentRoute(route, props).result,
129
155
  [],
130
156
  );
131
157
 
158
+ // --- Dialog nav-header wiring ------------------------------------------
159
+ // Screens render NO header of their own: the Dialog owns a sticky gradient nav
160
+ // bar + a large collapsing title. Here the surface HOST supplies the back/close
161
+ // wiring and bridges the mounted screen's runtime contribution (its translated
162
+ // title/subtitle + any action slot, via `useSurfaceHeader`) into the Dialog's
163
+ // header. One writer to Bloom's header store — this merge — so back/close and
164
+ // the screen's content never race.
165
+ const [headerContent, setHeaderContent] = useState<SurfaceHeaderContent | null>(null);
166
+ const headerContext = useMemo(() => ({ setContent: setHeaderContent }), []);
167
+
168
+ const headerMode = useMemo(
169
+ () => getSurfaceConfig(top.route, top.props).header,
170
+ [top.route, top.props],
171
+ );
172
+ // Show a back affordance whenever the surface can navigate back — either an
173
+ // earlier frame in this surface's stack, or an earlier wizard step.
174
+ const canGoBackNow = state.frames.length > 1 || top.step > 0;
175
+
176
+ const dialogHeader = useMemo<DialogHeaderConfig | null>(() => {
177
+ if (!headerMode) return null;
178
+ return {
179
+ largeTitle: true,
180
+ ...headerContent,
181
+ // A screen may own its back (e.g. the account dialog's per-view back via
182
+ // `useSurfaceHeader({ onBack })`); otherwise the surface's nav-stack back
183
+ // drives it (a drilled-in frame / wizard step).
184
+ onBack: headerContent?.onBack ?? (canGoBackNow ? goBack : undefined),
185
+ };
186
+ }, [headerMode, headerContent, canGoBackNow, goBack]);
187
+
188
+ useDialogHeader(dialogHeader);
189
+
132
190
  const screenProps = useMemo<BaseScreenProps>(() => {
133
191
  const { initialStep: _omitInitialStep, ...rest } = top.props;
134
192
  return {
@@ -157,9 +215,11 @@ function SurfaceScreen({ navStack, surface, presentation }: SurfaceScreenProps)
157
215
  if (!ScreenComponent) return null;
158
216
 
159
217
  return (
160
- <ScreenErrorBoundary screenName={top.route}>
161
- <ScreenComponent {...screenProps} />
162
- </ScreenErrorBoundary>
218
+ <SurfaceHeaderContext.Provider value={headerContext}>
219
+ <ScreenErrorBoundary screenName={top.route}>
220
+ <ScreenComponent {...screenProps} />
221
+ </ScreenErrorBoundary>
222
+ </SurfaceHeaderContext.Provider>
163
223
  );
164
224
  }
165
225