@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,8 +1,9 @@
1
1
  import type React from 'react';
2
- import { useState, useEffect, useCallback, useMemo } from 'react';
2
+ import { useState, useEffect, useCallback } from 'react';
3
3
  import { View, ScrollView, ActivityIndicator } from 'react-native';
4
4
  import type { BaseScreenProps } from '../types/navigation';
5
- import { Dialog, toast, useDialogControl } from '@oxyhq/bloom';
5
+ import { toast } from '@oxyhq/bloom';
6
+ import { surfaces } from '@oxyhq/bloom/surfaces';
6
7
  import { useTheme } from '@oxyhq/bloom/theme';
7
8
  import { Button } from '@oxyhq/bloom/button';
8
9
  import { Chip } from '@oxyhq/bloom/chip';
@@ -16,8 +17,8 @@ import {
16
17
  SegmentedControlItemText,
17
18
  } from '@oxyhq/bloom/segmented-control';
18
19
  import { Ionicons } from '@expo/vector-icons';
19
- import Header from '../components/Header';
20
20
  import { useI18n } from '../hooks/useI18n';
21
+ import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
21
22
  import { useOxy } from '../context/OxyContext';
22
23
 
23
24
  type IoniconName = React.ComponentProps<typeof Ionicons>['name'];
@@ -88,6 +89,20 @@ const FEATURE_CATEGORIES: IndividualFeature['category'][] = [
88
89
  'productivity',
89
90
  ];
90
91
 
92
+ // Pure package-name → display-name mapping (module scope so the nav-header
93
+ // subtitle can reference it before the component's render helpers).
94
+ const getAppDisplayName = (packageName: string): string => {
95
+ const appNames: Record<string, string> = {
96
+ 'mention': 'Mention',
97
+ 'oxy-social': 'Oxy Social',
98
+ 'oxy-workspace': 'Oxy Workspace',
99
+ 'oxy-creator': 'Oxy Creator',
100
+ 'oxy-analytics': 'Oxy Analytics',
101
+ 'oxy-studio': 'Oxy Studio',
102
+ };
103
+ return appNames[packageName] || packageName;
104
+ };
105
+
91
106
  const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
92
107
  onClose,
93
108
  navigate,
@@ -105,16 +120,13 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
105
120
  const [billingInterval, setBillingInterval] = useState<BillingInterval>(BILLING_MONTH);
106
121
  const [activeTab, setActiveTab] = useState<ActiveTab>(TAB_PLANS);
107
122
  const [currentAppPackage, setCurrentAppPackage] = useState<string>('mention'); // Default to mention for demo
108
- const [pendingUnsubscribeFeatureId, setPendingUnsubscribeFeatureId] = useState<string | null>(null);
109
123
 
110
124
  const { t } = useI18n();
125
+
126
+ useSurfaceHeader({ title: t('premium.title') || 'Oxy+ Subscriptions', subtitle: t('premium.forApp', { app: getAppDisplayName(currentAppPackage) }) || `for ${getAppDisplayName(currentAppPackage)}` });
111
127
  const bloomTheme = useTheme();
112
128
  const colors = bloomTheme.colors;
113
129
 
114
- // Prompt controls
115
- const cancelSubscriptionDialog = useDialogControl();
116
- const unsubscribeFeatureDialog = useDialogControl();
117
-
118
130
  // Oxy+ subscription plans
119
131
  const mockPlans: SubscriptionPlan[] = [
120
132
  {
@@ -426,11 +438,15 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
426
438
  }
427
439
  };
428
440
 
429
- const confirmCancelSubscription = useCallback(() => {
430
- cancelSubscriptionDialog.open();
431
- }, [cancelSubscriptionDialog]);
432
-
433
441
  const handleCancelSubscription = useCallback(async () => {
442
+ const confirmed = await surfaces.confirm({
443
+ title: t('premium.confirms.cancelSubTitle') || 'Cancel Subscription',
444
+ message: t('premium.confirms.cancelSub') || 'Are you sure you want to cancel your subscription? You will lose access to premium features at the end of your current billing period.',
445
+ confirmLabel: t('premium.actions.cancelSubBtn') || 'Cancel Subscription',
446
+ cancelLabel: t('common.cancel') || 'Cancel',
447
+ destructive: true,
448
+ });
449
+ if (!confirmed) return;
434
450
  try {
435
451
  setSubscription(prev => prev ? {
436
452
  ...prev,
@@ -512,18 +528,22 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
512
528
  }
513
529
  };
514
530
 
515
- const confirmFeatureUnsubscribe = useCallback((featureId: string) => {
516
- setPendingUnsubscribeFeatureId(featureId);
517
- unsubscribeFeatureDialog.open();
518
- }, [unsubscribeFeatureDialog]);
519
-
520
- const handleFeatureUnsubscribe = useCallback(async () => {
521
- if (!pendingUnsubscribeFeatureId) return;
522
- const feature = individualFeatures.find(f => f.id === pendingUnsubscribeFeatureId);
531
+ const handleFeatureUnsubscribe = useCallback(async (featureId: string) => {
532
+ const feature = individualFeatures.find(f => f.id === featureId);
533
+ const confirmed = await surfaces.confirm({
534
+ title: t('premium.confirms.unsubscribeFeatureTitle') || 'Unsubscribe from Feature',
535
+ message: feature
536
+ ? (t('premium.confirms.unsubscribeFeature', { name: feature.name }) ?? `Are you sure you want to unsubscribe from ${feature.name}?`)
537
+ : '',
538
+ confirmLabel: t('premium.actions.unsubscribe') || 'Unsubscribe',
539
+ cancelLabel: t('common.cancel') || 'Cancel',
540
+ destructive: true,
541
+ });
542
+ if (!confirmed) return;
523
543
  try {
524
544
  setIndividualFeatures(prev =>
525
545
  prev.map(f =>
526
- f.id === pendingUnsubscribeFeatureId
546
+ f.id === featureId
527
547
  ? { ...f, isSubscribed: false }
528
548
  : f
529
549
  )
@@ -531,27 +551,8 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
531
551
  toast.success((t('premium.toasts.featureUnsubscribed', { name: feature?.name ?? '' }) ?? `Unsubscribed from ${feature?.name}`));
532
552
  } catch (error) {
533
553
  toast.error(t('premium.toasts.featureUnsubscribeFailed') || 'Failed to unsubscribe from feature');
534
- } finally {
535
- setPendingUnsubscribeFeatureId(null);
536
554
  }
537
- }, [pendingUnsubscribeFeatureId, individualFeatures, t]);
538
-
539
- const pendingUnsubscribeFeature = useMemo(
540
- () => individualFeatures.find(f => f.id === pendingUnsubscribeFeatureId),
541
- [individualFeatures, pendingUnsubscribeFeatureId]
542
- );
543
-
544
- const getAppDisplayName = (packageName: string) => {
545
- const appNames: Record<string, string> = {
546
- 'mention': 'Mention',
547
- 'oxy-social': 'Oxy Social',
548
- 'oxy-workspace': 'Oxy Workspace',
549
- 'oxy-creator': 'Oxy Creator',
550
- 'oxy-analytics': 'Oxy Analytics',
551
- 'oxy-studio': 'Oxy Studio'
552
- };
553
- return appNames[packageName] || packageName;
554
- };
555
+ }, [individualFeatures, t]);
555
556
 
556
557
  const renderCurrentSubscription = () => {
557
558
  if (!subscription) return null;
@@ -608,7 +609,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
608
609
  ) : (
609
610
  <Button
610
611
  variant="destructive"
611
- onPress={confirmCancelSubscription}
612
+ onPress={handleCancelSubscription}
612
613
  className="flex-1"
613
614
  accessibilityLabel={t('premium.actions.cancelSubBtn') || 'Cancel Subscription'}
614
615
  >
@@ -915,7 +916,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
915
916
  </Button>
916
917
  <Button
917
918
  variant="outline"
918
- onPress={() => confirmFeatureUnsubscribe(feature.id)}
919
+ onPress={() => handleFeatureUnsubscribe(feature.id)}
919
920
  accessibilityLabel={t('premium.actions.unsubscribe') || 'Unsubscribe'}
920
921
  className="flex-1"
921
922
  >
@@ -1006,41 +1007,21 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
1006
1007
 
1007
1008
  if (loading) {
1008
1009
  return (
1009
- <View className="flex-1 bg-bg">
1010
- <Header
1011
- title={t('premium.title') || 'Oxy+ Subscriptions'}
1012
- subtitle={t('premium.forApp', { app: getAppDisplayName(currentAppPackage) }) || `for ${getAppDisplayName(currentAppPackage)}`}
1013
- onBack={goBack || onClose}
1014
- onClose={onClose}
1015
- showCloseButton={!!onClose}
1016
- elevation="subtle"
1017
- />
1018
- <View className="flex-1 items-center justify-center px-screen-margin">
1010
+ <>
1011
+ <View className="items-center justify-center px-screen-margin py-space-40">
1019
1012
  <ActivityIndicator size="large" color={colors.primary} />
1020
1013
  <Text className="text-text-secondary text-base text-center mt-space-16">
1021
1014
  {t('premium.loading') || 'Loading subscription plans...'}
1022
1015
  </Text>
1023
1016
  </View>
1024
- </View>
1017
+ </>
1025
1018
  );
1026
1019
  }
1027
1020
 
1028
1021
  return (
1029
- <View className="flex-1 bg-bg">
1030
- <Header
1031
- title={t('premium.title') || 'Oxy+ Subscriptions'}
1032
- subtitle={t('premium.forApp', { app: getAppDisplayName(currentAppPackage) }) || `for ${getAppDisplayName(currentAppPackage)}`}
1033
- onBack={goBack || onClose}
1034
- onClose={onClose}
1035
- showCloseButton={!!onClose}
1036
- elevation="subtle"
1037
- />
1038
-
1039
- <ScrollView
1040
- className="flex-1"
1041
- contentContainerClassName="px-screen-margin pb-space-32"
1042
- showsVerticalScrollIndicator={false}
1043
- >
1022
+ <>
1023
+
1024
+ <View className="px-screen-margin pb-space-32">
1044
1025
  <View className="pt-space-20">
1045
1026
  {renderAppSwitcher()}
1046
1027
 
@@ -1114,27 +1095,8 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
1114
1095
  </BenefitList>
1115
1096
  </View>
1116
1097
  </View>
1117
- </ScrollView>
1118
-
1119
- <Dialog
1120
- control={cancelSubscriptionDialog}
1121
- title={t('premium.confirms.cancelSubTitle') || 'Cancel Subscription'}
1122
- description={t('premium.confirms.cancelSub') || 'Are you sure you want to cancel your subscription? You will lose access to premium features at the end of your current billing period.'}
1123
- actions={[
1124
- { label: t('premium.actions.cancelSubBtn') || 'Cancel Subscription', color: 'destructive', onPress: handleCancelSubscription },
1125
- { label: t('common.cancel') || 'Cancel', color: 'cancel' },
1126
- ]}
1127
- />
1128
- <Dialog
1129
- control={unsubscribeFeatureDialog}
1130
- title={t('premium.confirms.unsubscribeFeatureTitle') || 'Unsubscribe from Feature'}
1131
- description={pendingUnsubscribeFeature ? (t('premium.confirms.unsubscribeFeature', { name: pendingUnsubscribeFeature.name }) ?? `Are you sure you want to unsubscribe from ${pendingUnsubscribeFeature.name}?`) : ''}
1132
- actions={[
1133
- { label: t('premium.actions.unsubscribe') || 'Unsubscribe', color: 'destructive', onPress: handleFeatureUnsubscribe },
1134
- { label: t('common.cancel') || 'Cancel', color: 'cancel' },
1135
- ]}
1136
- />
1137
- </View>
1098
+ </View>
1099
+ </>
1138
1100
  );
1139
1101
  };
1140
1102
 
@@ -1,17 +1,17 @@
1
1
  import React, { useState, useCallback, useEffect } from 'react';
2
- import { View, ScrollView } from 'react-native';
2
+ import { View } from 'react-native';
3
3
  import type { BaseScreenProps } from '../types/navigation';
4
4
  import { toast } from '@oxyhq/bloom';
5
5
  import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
6
6
  import { Switch } from '@oxyhq/bloom/switch';
7
7
  import { Button } from '@oxyhq/bloom/button';
8
8
  import { useTheme } from '@oxyhq/bloom/theme';
9
- import Header from '../components/Header';
10
9
  import { Avatar } from '@oxyhq/bloom/avatar';
11
10
  import { Loading } from '@oxyhq/bloom/loading';
12
11
  import { Text } from '@oxyhq/bloom/typography';
13
12
  import { SettingsIcon } from '../components/SettingsIcon';
14
13
  import { useI18n } from '../hooks/useI18n';
14
+ import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
15
15
  import { useSettingToggles } from '../hooks/useSettingToggle';
16
16
  import type { BlockedUser, RestrictedUser } from '@oxyhq/core';
17
17
  import { getAccountDisplayName } from '@oxyhq/core';
@@ -69,6 +69,8 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
69
69
  // switched, else the personal user).
70
70
  const { oxyServices, user } = useOxy();
71
71
  const { t, locale } = useI18n();
72
+
73
+ useSurfaceHeader({ title: t('privacySettings.title') || 'Privacy Settings' });
72
74
  const bloomTheme = useTheme();
73
75
  const [isLoading, setIsLoading] = useState(true);
74
76
  const [blockedUsers, setBlockedUsers] = useState<BlockedUser[]>([]);
@@ -205,29 +207,16 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
205
207
 
206
208
  if (isLoading) {
207
209
  return (
208
- <View className="flex-1 bg-bg">
209
- <Header
210
- title={t('privacySettings.title') || 'Privacy Settings'}
211
- onBack={goBack || onClose}
212
- variant="minimal"
213
- elevation="subtle"
214
- />
210
+ <>
215
211
  <Loading size="large" color={bloomTheme.colors.text} />
216
- </View>
212
+ </>
217
213
  );
218
214
  }
219
215
 
220
216
  return (
221
- <View className="flex-1 bg-bg">
222
- <Header
223
- title={t('privacySettings.title') || 'Privacy Settings'}
224
- onBack={goBack || onClose}
225
- variant="minimal"
226
- elevation="subtle"
227
- />
217
+ <>
228
218
 
229
- <ScrollView className="flex-1">
230
- <View className="px-screen-margin pb-space-24">
219
+ <View className="px-screen-margin pb-space-24">
231
220
  {/* Account Privacy */}
232
221
  <SettingsListGroup title={t('privacySettings.sections.account') || 'ACCOUNT PRIVACY'}>
233
222
  <SettingsListItem
@@ -423,8 +412,7 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
423
412
  )}
424
413
  </SettingsListGroup>
425
414
  </View>
426
- </ScrollView>
427
- </View>
415
+ </>
428
416
  );
429
417
  };
430
418
 
@@ -1,6 +1,6 @@
1
1
  import type React from 'react';
2
2
  import { useEffect, useState } from 'react';
3
- import { View, StyleSheet, ActivityIndicator, ScrollView } from 'react-native';
3
+ import { View, StyleSheet, ActivityIndicator } from 'react-native';
4
4
  import type { BaseScreenProps } from '../types/navigation';
5
5
  import { useTheme } from '@oxyhq/bloom/theme';
6
6
  import { Button } from '@oxyhq/bloom/button';
@@ -142,7 +142,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
142
142
 
143
143
  if (isLoading) {
144
144
  return (
145
- <View style={styles.centerContainer} className="bg-bg">
145
+ <View className="items-center py-space-40">
146
146
  <ActivityIndicator size="large" color={bloomTheme.colors.primary} />
147
147
  </View>
148
148
  );
@@ -150,7 +150,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
150
150
 
151
151
  if (error) {
152
152
  return (
153
- <View style={styles.container} className="bg-bg">
153
+ <>
154
154
  <View style={styles.errorHeader} className="px-screen-margin py-space-12 border-b border-border">
155
155
  {goBack && (
156
156
  <Button
@@ -165,14 +165,14 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
165
165
  {t('profile.errorTitle') || 'Profile Error'}
166
166
  </H2>
167
167
  </View>
168
- <View style={styles.errorContent} className="px-space-32 gap-space-12">
168
+ <View style={styles.errorContent} className="px-space-32 gap-space-12 py-space-40">
169
169
  <Ionicons name="alert-circle" size={48} color={bloomTheme.colors.error} />
170
170
  <Text style={styles.errorText} className="text-text">{error}</Text>
171
171
  <Text style={styles.errorSubtext} className="text-text-secondary">
172
172
  {t('profile.errorSubtext') || "This could happen if the user doesn't exist or the profile service is unavailable."}
173
173
  </Text>
174
174
  </View>
175
- </View>
175
+ </>
176
176
  );
177
177
  }
178
178
 
@@ -192,8 +192,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
192
192
  })();
193
193
 
194
194
  return (
195
- <View style={styles.container} className="bg-bg">
196
- <ScrollView style={styles.flex} contentContainerStyle={styles.scrollContainer}>
195
+ <View style={styles.scrollContainer}>
197
196
  {/* Banner Image */}
198
197
  <View style={styles.bannerContainer} className="bg-fill-brand/20">
199
198
  <View style={styles.flex} className="bg-fill-brand" />
@@ -243,6 +242,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
243
242
  </View>
244
243
 
245
244
  {/* Info Grid as a settings list group */}
245
+ <View className="px-screen-margin">
246
246
  <SettingsListGroup>
247
247
  {profile?.createdAt && (
248
248
  <SettingsListItem
@@ -302,6 +302,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
302
302
  />
303
303
  )}
304
304
  </SettingsListGroup>
305
+ </View>
305
306
 
306
307
  {/* All Stats in one row */}
307
308
  <View style={styles.statsRow} className="px-screen-margin">
@@ -326,7 +327,6 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
326
327
  <Text style={styles.statLabel} className="text-text-secondary">{t('profile.following') || 'Following'}</Text>
327
328
  </View>
328
329
  </View>
329
- </ScrollView>
330
330
  </View>
331
331
  );
332
332
  };
@@ -335,9 +335,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
335
335
  // that no token class can express. Colors, spacing, radius, and typography roles
336
336
  // live on Bloom components + NativeWind token classes.
337
337
  const styles = StyleSheet.create({
338
- container: { flex: 1 },
339
338
  flex: { flex: 1 },
340
- centerContainer: { flex: 1, justifyContent: 'center', alignItems: 'center' },
341
339
  scrollContainer: { alignItems: 'stretch', paddingBottom: 40 },
342
340
  bannerContainer: { height: BANNER_HEIGHT, position: 'relative', overflow: 'hidden' },
343
341
  avatarRow: {
@@ -366,7 +364,7 @@ const styles = StyleSheet.create({
366
364
  // Error state layout
367
365
  errorHeader: { flexDirection: 'row', alignItems: 'center', gap: 16 },
368
366
  errorTitle: { fontSize: 20 },
369
- errorContent: { flex: 1, justifyContent: 'center', alignItems: 'center' },
367
+ errorContent: { justifyContent: 'center', alignItems: 'center' },
370
368
  errorText: { fontSize: 18, fontWeight: '600', textAlign: 'center' },
371
369
  errorSubtext: { fontSize: 14, textAlign: 'center' },
372
370
  });
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import { View, ScrollView } from 'react-native';
2
+ import { View } from 'react-native';
3
3
  import type { BaseScreenProps } from '../types/navigation';
4
4
  import { toast } from '@oxyhq/bloom';
5
5
  import {
@@ -9,11 +9,11 @@ import {
9
9
  } from '@oxyhq/bloom/segmented-control';
10
10
  import { useTheme } from '@oxyhq/bloom/theme';
11
11
  import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
12
- import Header from '../components/Header';
13
12
  import { Loading } from '@oxyhq/bloom/loading';
14
13
  import { Text } from '@oxyhq/bloom/typography';
15
14
  import { SettingsIcon } from '../components/SettingsIcon';
16
15
  import { useI18n } from '../hooks/useI18n';
16
+ import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
17
17
  import { useOxy } from '../context/OxyContext';
18
18
 
19
19
  type SavesTab = 'saves' | 'collections';
@@ -42,6 +42,8 @@ const SavesCollectionsScreen: React.FC<BaseScreenProps> = ({
42
42
  // switched, else the personal user).
43
43
  const { oxyServices, user } = useOxy();
44
44
  const { t } = useI18n();
45
+
46
+ useSurfaceHeader({ title: t('saves.title') || 'Saves & Collections' });
45
47
  const bloomTheme = useTheme();
46
48
  const [savedItems, setSavedItems] = useState<SavedItem[]>([]);
47
49
  const [collections, setCollections] = useState<Collection[]>([]);
@@ -87,13 +89,7 @@ const SavesCollectionsScreen: React.FC<BaseScreenProps> = ({
87
89
  };
88
90
 
89
91
  return (
90
- <View className="flex-1 bg-bg">
91
- <Header
92
- title={t('saves.title') || 'Saves & Collections'}
93
- onBack={goBack || onClose}
94
- variant="minimal"
95
- elevation="subtle"
96
- />
92
+ <>
97
93
 
98
94
  {/* Tabs */}
99
95
  <View className="px-screen-margin py-space-12 border-b border-border">
@@ -116,8 +112,7 @@ const SavesCollectionsScreen: React.FC<BaseScreenProps> = ({
116
112
  </SegmentedControl>
117
113
  </View>
118
114
 
119
- <ScrollView className="flex-1">
120
- <View className="px-screen-margin pb-space-24">
115
+ <View className="px-screen-margin pb-space-24">
121
116
  {isLoading ? (
122
117
  <Loading
123
118
  size="large"
@@ -165,8 +160,7 @@ const SavesCollectionsScreen: React.FC<BaseScreenProps> = ({
165
160
  )
166
161
  )}
167
162
  </View>
168
- </ScrollView>
169
- </View>
163
+ </>
170
164
  );
171
165
  };
172
166
 
@@ -1,13 +1,13 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import { View, ScrollView } from 'react-native';
2
+ import { View } from 'react-native';
3
3
  import type { BaseScreenProps } from '../types/navigation';
4
- import Header from '../components/Header';
5
4
  import { Loading } from '@oxyhq/bloom/loading';
6
5
  import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
7
6
  import { Switch } from '@oxyhq/bloom/switch';
8
7
  import { useTheme } from '@oxyhq/bloom/theme';
9
8
  import { SettingsIcon } from '../components/SettingsIcon';
10
9
  import { useI18n } from '../hooks/useI18n';
10
+ import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
11
11
  import { useSettingToggles } from '../hooks/useSettingToggle';
12
12
  import { useOxy } from '../context/OxyContext';
13
13
  import type { User } from '@oxyhq/core';
@@ -26,6 +26,8 @@ const SearchSettingsScreen: React.FC<BaseScreenProps> = ({
26
26
  // authenticate as the active session, which IS that account.
27
27
  const { oxyServices, user } = useOxy();
28
28
  const { t } = useI18n();
29
+
30
+ useSurfaceHeader({ title: t('searchSettings.title') || 'Search Settings' });
29
31
  const bloomTheme = useTheme();
30
32
  const [isLoading, setIsLoading] = useState(true);
31
33
 
@@ -79,29 +81,16 @@ const SearchSettingsScreen: React.FC<BaseScreenProps> = ({
79
81
 
80
82
  if (isLoading) {
81
83
  return (
82
- <View className="flex-1 bg-bg">
83
- <Header
84
- title={t('searchSettings.title') || 'Search Settings'}
85
- onBack={goBack || onClose}
86
- variant="minimal"
87
- elevation="subtle"
88
- />
84
+ <>
89
85
  <Loading size="large" color={bloomTheme.colors.text} />
90
- </View>
86
+ </>
91
87
  );
92
88
  }
93
89
 
94
90
  return (
95
- <View className="flex-1 bg-bg">
96
- <Header
97
- title={t('searchSettings.title') || 'Search Settings'}
98
- onBack={goBack || onClose}
99
- variant="minimal"
100
- elevation="subtle"
101
- />
91
+ <>
102
92
 
103
- <ScrollView className="flex-1">
104
- <View className="px-screen-margin pb-space-24">
93
+ <View className="px-screen-margin pb-space-24">
105
94
  {/* SafeSearch */}
106
95
  <SettingsListGroup title={t('searchSettings.safeSearch.title') || 'SafeSearch'}>
107
96
  <SettingsListItem
@@ -146,8 +135,7 @@ const SearchSettingsScreen: React.FC<BaseScreenProps> = ({
146
135
  />
147
136
  </SettingsListGroup>
148
137
  </View>
149
- </ScrollView>
150
- </View>
138
+ </>
151
139
  );
152
140
  };
153
141
 
@@ -1,11 +1,11 @@
1
1
  import type React from 'react';
2
- import { View, ScrollView, Linking } from 'react-native';
2
+ import { View, Linking } from 'react-native';
3
3
  import type { BaseScreenProps } from '../types/navigation';
4
- import Header from '../components/Header';
5
4
  import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
6
5
  import { SettingsIcon } from '../components/SettingsIcon';
7
6
  import { useTheme } from '@oxyhq/bloom/theme';
8
7
  import { useI18n } from '../hooks/useI18n';
8
+ import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
9
9
 
10
10
  interface UserLinksScreenProps extends BaseScreenProps {
11
11
  userId: string;
@@ -28,6 +28,8 @@ const UserLinksScreen: React.FC<UserLinksScreenProps> = ({
28
28
  const bloomTheme = useTheme();
29
29
  const { t } = useI18n();
30
30
 
31
+ useSurfaceHeader({ title: t('userLinks.title'), subtitle: links.length !== 1 ? t('userLinks.linkCount_plural', { count: links.length }) : t('userLinks.linkCount', { count: links.length }) });
32
+
31
33
  const handleLinkPress = async (url: string) => {
32
34
  try {
33
35
  await Linking.openURL(url);
@@ -39,17 +41,9 @@ const UserLinksScreen: React.FC<UserLinksScreenProps> = ({
39
41
  };
40
42
 
41
43
  return (
42
- <View className="flex-1 bg-bg">
43
- <Header
44
- title={t('userLinks.title')}
45
- subtitle={links.length !== 1 ? t('userLinks.linkCount_plural', { count: links.length }) : t('userLinks.linkCount', { count: links.length })}
46
- onBack={goBack}
47
- variant="minimal"
48
- elevation="subtle"
49
- />
44
+ <>
50
45
 
51
- <ScrollView className="flex-1">
52
- <View className="px-screen-margin pb-space-24">
46
+ <View className="px-screen-margin pb-space-24">
53
47
  <SettingsListGroup title={t('userLinks.title')}>
54
48
  {links.map((link) => (
55
49
  <SettingsListItem
@@ -62,8 +56,7 @@ const UserLinksScreen: React.FC<UserLinksScreenProps> = ({
62
56
  ))}
63
57
  </SettingsListGroup>
64
58
  </View>
65
- </ScrollView>
66
- </View>
59
+ </>
67
60
  );
68
61
  };
69
62
 
@@ -12,11 +12,11 @@ import type { BaseScreenProps } from '../types/navigation';
12
12
  import { useTheme } from '@oxyhq/bloom/theme';
13
13
  import { H6, Text } from '@oxyhq/bloom/typography';
14
14
  import { Button } from '@oxyhq/bloom/button';
15
- import Header from '../components/Header';
16
15
  import { Avatar } from '@oxyhq/bloom/avatar';
17
16
  import FollowButton from '../components/FollowButton';
18
17
  import { Ionicons } from '@expo/vector-icons';
19
18
  import { useI18n } from '../hooks/useI18n';
19
+ import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
20
20
  import { useOxy } from '../context/OxyContext';
21
21
  import { logger, getAccountDisplayName, getAccountFallbackHandle } from '@oxyhq/core';
22
22
  import type { User } from '@oxyhq/core';
@@ -46,7 +46,6 @@ const UserListScreen: React.FC<UserListScreenProps> = ({
46
46
  userId,
47
47
  mode,
48
48
  initialCount,
49
- goBack,
50
49
  navigate,
51
50
  }) => {
52
51
  const { oxyServices, user: currentUser } = useOxy();
@@ -230,11 +229,11 @@ const UserListScreen: React.FC<UserListScreenProps> = ({
230
229
  : (t('userList.following') || 'Following');
231
230
 
232
231
  const headerSubtitle = total > 0 ? String(total) : undefined;
232
+ useSurfaceHeader({ title, subtitle: headerSubtitle });
233
233
 
234
234
  if (isLoading && users.length === 0) {
235
235
  return (
236
236
  <View className="flex-1 bg-bg">
237
- <Header title={title} onBack={goBack} elevation="subtle" />
238
237
  <View style={styles.center}>
239
238
  <ActivityIndicator size="large" color={bloomTheme.colors.primary} />
240
239
  </View>
@@ -245,7 +244,6 @@ const UserListScreen: React.FC<UserListScreenProps> = ({
245
244
  if (error) {
246
245
  return (
247
246
  <View className="flex-1 bg-bg">
248
- <Header title={title} onBack={goBack} elevation="subtle" />
249
247
  <View style={styles.center} className="px-space-32 gap-space-16">
250
248
  <Ionicons name="alert-circle" size={ERROR_ICON_SIZE} color={bloomTheme.colors.error} />
251
249
  <Text className="text-text-secondary text-base text-center">{error}</Text>
@@ -259,7 +257,6 @@ const UserListScreen: React.FC<UserListScreenProps> = ({
259
257
 
260
258
  return (
261
259
  <View className="flex-1 bg-bg">
262
- <Header title={title} subtitle={headerSubtitle} onBack={goBack} elevation="subtle" />
263
260
  <FlatList
264
261
  data={users}
265
262
  renderItem={renderUser}
@@ -385,7 +385,7 @@ const PhotoPickerView: React.FC<PhotoPickerViewProps> = ({
385
385
  // long, and the panel hugs its content when the grid is short (no huge empty
386
386
  // panel). The cap is tighter for the centered card (a floating modal reads
387
387
  // better below full height); the bottom sheet may run taller. Keep this
388
- // breakpoint in sync with `DIALOG_PLACEMENT` in BottomSheetRouter.
388
+ // breakpoint in sync with `SHEET_PLACEMENT` in surfaces.ts.
389
389
  const isCenteredPanel = windowWidth >= BREAKPOINTS.md;
390
390
  const maxPanelHeight = useMemo(
391
391
  () => (isCenteredPanel