@oxyhq/services 22.9.0 → 22.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (584) 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/AvatarCameraBadge.js +42 -0
  4. package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -0
  5. package/lib/commonjs/ui/components/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +55 -133
  6. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -0
  7. package/lib/commonjs/ui/components/OxyAuthChooser.js +657 -88
  8. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  9. package/lib/commonjs/ui/components/OxyConsentScreen.js +1 -1
  10. package/lib/commonjs/ui/components/ProfileButton.js +15 -1
  11. package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
  12. package/lib/commonjs/ui/components/ProfileSummaryCard.js +3 -23
  13. package/lib/commonjs/ui/components/ProfileSummaryCard.js.map +1 -1
  14. package/lib/commonjs/ui/components/RequireOxyAuth.js +1 -1
  15. package/lib/commonjs/ui/components/SurfaceHeaderAction.js +63 -0
  16. package/lib/commonjs/ui/components/SurfaceHeaderAction.js.map +1 -0
  17. package/lib/commonjs/ui/components/SurfaceScreen.js +91 -8
  18. package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -1
  19. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +46 -29
  20. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  21. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +47 -23
  22. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
  23. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js +81 -19
  24. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -1
  25. package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js +83 -23
  26. package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
  27. package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js +83 -0
  28. package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
  29. package/lib/commonjs/ui/context/OxyContext.js +79 -29
  30. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  31. package/lib/commonjs/ui/hooks/queries/queryKeys.js +18 -1
  32. package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
  33. package/lib/commonjs/ui/hooks/queries/useFileQueries.js +129 -0
  34. package/lib/commonjs/ui/hooks/queries/useFileQueries.js.map +1 -0
  35. package/lib/commonjs/ui/hooks/useAvatarPicker.js +38 -55
  36. package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
  37. package/lib/commonjs/ui/hooks/useReduceMotion.js +57 -0
  38. package/lib/commonjs/ui/hooks/useReduceMotion.js.map +1 -0
  39. package/lib/commonjs/ui/hooks/useSurfaceHeader.js +46 -0
  40. package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -0
  41. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +1 -1
  42. package/lib/commonjs/ui/navigation/accountDialogManager.js +36 -2
  43. package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
  44. package/lib/commonjs/ui/navigation/bottomSheetManager.js +5 -6
  45. package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
  46. package/lib/commonjs/ui/navigation/routes.js +4 -3
  47. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  48. package/lib/commonjs/ui/navigation/surfaceBackBridge.js +68 -0
  49. package/lib/commonjs/ui/navigation/surfaceBackBridge.js.map +1 -0
  50. package/lib/commonjs/ui/navigation/surfaceNavStack.js +62 -15
  51. package/lib/commonjs/ui/navigation/surfaceNavStack.js.map +1 -1
  52. package/lib/commonjs/ui/navigation/surfaceRegistry.js +84 -19
  53. package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -1
  54. package/lib/commonjs/ui/navigation/surfaces.js +139 -25
  55. package/lib/commonjs/ui/navigation/surfaces.js.map +1 -1
  56. package/lib/commonjs/ui/screens/AccountMembersScreen.js +214 -283
  57. package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
  58. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +88 -118
  59. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  60. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +22 -36
  61. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  62. package/lib/commonjs/ui/screens/AppInfoScreen.js +219 -226
  63. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  64. package/lib/commonjs/ui/screens/AvatarCropScreen.js +287 -289
  65. package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
  66. package/lib/commonjs/ui/screens/ChangeAvatarScreen.js +301 -0
  67. package/lib/commonjs/ui/screens/ChangeAvatarScreen.js.map +1 -0
  68. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +24 -39
  69. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
  70. package/lib/commonjs/ui/screens/CreateAccountScreen.js +136 -158
  71. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  72. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +29 -36
  73. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  74. package/lib/commonjs/ui/screens/EditProfileScreen.js +101 -109
  75. package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
  76. package/lib/commonjs/ui/screens/FAQScreen.js +10 -15
  77. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
  78. package/lib/commonjs/ui/screens/FeedbackScreen.js +8 -16
  79. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  80. package/lib/commonjs/ui/screens/FileManagementScreen.js +403 -627
  81. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  82. package/lib/commonjs/ui/screens/HelpSupportScreen.js +62 -69
  83. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  84. package/lib/commonjs/ui/screens/HistoryViewScreen.js +63 -79
  85. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  86. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +69 -98
  87. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  88. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +8 -14
  89. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  90. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +77 -94
  91. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  92. package/lib/commonjs/ui/screens/ManageAccountScreen.js +99 -134
  93. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  94. package/lib/commonjs/ui/screens/NotificationsScreen.js +69 -76
  95. package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
  96. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -8
  97. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  98. package/lib/commonjs/ui/screens/PreferencesScreen.js +67 -74
  99. package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
  100. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +55 -91
  101. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  102. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +291 -304
  103. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  104. package/lib/commonjs/ui/screens/ProfileScreen.js +100 -114
  105. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  106. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +38 -45
  107. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  108. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +44 -57
  109. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  110. package/lib/commonjs/ui/screens/UserLinksScreen.js +24 -31
  111. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
  112. package/lib/commonjs/ui/screens/UserListScreen.js +14 -24
  113. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  114. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +16 -48
  115. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  116. package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js +63 -0
  117. package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js.map +1 -0
  118. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +54 -41
  119. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  120. package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +44 -81
  121. package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
  122. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +66 -75
  123. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  124. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +111 -139
  125. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  126. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +13 -20
  127. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  128. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +14 -27
  129. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  130. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +68 -85
  131. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  132. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +28 -36
  133. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  134. package/lib/commonjs/ui/stores/resetSessionScopedStores.js +8 -3
  135. package/lib/commonjs/ui/stores/resetSessionScopedStores.js.map +1 -1
  136. package/lib/commonjs/ui/utils/avatarUtils.js +11 -2
  137. package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
  138. package/lib/commonjs/ui/utils/fileManagement.js +0 -79
  139. package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
  140. package/lib/module/index.js +12 -5
  141. package/lib/module/index.js.map +1 -1
  142. package/lib/module/ui/components/AvatarCameraBadge.js +40 -0
  143. package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -0
  144. package/lib/module/ui/components/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +57 -135
  145. package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -0
  146. package/lib/module/ui/components/OxyAuthChooser.js +659 -91
  147. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  148. package/lib/module/ui/components/OxyConsentScreen.js +1 -1
  149. package/lib/module/ui/components/ProfileButton.js +16 -2
  150. package/lib/module/ui/components/ProfileButton.js.map +1 -1
  151. package/lib/module/ui/components/ProfileSummaryCard.js +2 -23
  152. package/lib/module/ui/components/ProfileSummaryCard.js.map +1 -1
  153. package/lib/module/ui/components/RequireOxyAuth.js +1 -1
  154. package/lib/module/ui/components/SurfaceHeaderAction.js +58 -0
  155. package/lib/module/ui/components/SurfaceHeaderAction.js.map +1 -0
  156. package/lib/module/ui/components/SurfaceScreen.js +93 -10
  157. package/lib/module/ui/components/SurfaceScreen.js.map +1 -1
  158. package/lib/module/ui/components/fileManagement/FileDetailsModal.js +46 -29
  159. package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  160. package/lib/module/ui/components/modals/DeleteAccountModal.js +46 -23
  161. package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
  162. package/lib/module/ui/components/oxyAuthChooserStyles.js +81 -19
  163. package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -1
  164. package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js +83 -25
  165. package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
  166. package/lib/module/ui/components/surfaces/ActionSheetSurface.js +78 -0
  167. package/lib/module/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
  168. package/lib/module/ui/context/OxyContext.js +80 -30
  169. package/lib/module/ui/context/OxyContext.js.map +1 -1
  170. package/lib/module/ui/hooks/queries/queryKeys.js +16 -0
  171. package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
  172. package/lib/module/ui/hooks/queries/useFileQueries.js +120 -0
  173. package/lib/module/ui/hooks/queries/useFileQueries.js.map +1 -0
  174. package/lib/module/ui/hooks/useAvatarPicker.js +38 -55
  175. package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
  176. package/lib/module/ui/hooks/useReduceMotion.js +53 -0
  177. package/lib/module/ui/hooks/useReduceMotion.js.map +1 -0
  178. package/lib/module/ui/hooks/useSurfaceHeader.js +42 -0
  179. package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -0
  180. package/lib/module/ui/hooks/useSwitchableAccounts.js +1 -1
  181. package/lib/module/ui/navigation/accountDialogManager.js +34 -2
  182. package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
  183. package/lib/module/ui/navigation/bottomSheetManager.js +6 -7
  184. package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
  185. package/lib/module/ui/navigation/routes.js +4 -3
  186. package/lib/module/ui/navigation/routes.js.map +1 -1
  187. package/lib/module/ui/navigation/surfaceBackBridge.js +63 -0
  188. package/lib/module/ui/navigation/surfaceBackBridge.js.map +1 -0
  189. package/lib/module/ui/navigation/surfaceNavStack.js +62 -15
  190. package/lib/module/ui/navigation/surfaceNavStack.js.map +1 -1
  191. package/lib/module/ui/navigation/surfaceRegistry.js +84 -19
  192. package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -1
  193. package/lib/module/ui/navigation/surfaces.js +138 -26
  194. package/lib/module/ui/navigation/surfaces.js.map +1 -1
  195. package/lib/module/ui/screens/AccountMembersScreen.js +218 -286
  196. package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
  197. package/lib/module/ui/screens/AccountSettingsScreen.js +92 -121
  198. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  199. package/lib/module/ui/screens/AccountVerificationScreen.js +25 -38
  200. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  201. package/lib/module/ui/screens/AppInfoScreen.js +220 -227
  202. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  203. package/lib/module/ui/screens/AvatarCropScreen.js +289 -291
  204. package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
  205. package/lib/module/ui/screens/ChangeAvatarScreen.js +298 -0
  206. package/lib/module/ui/screens/ChangeAvatarScreen.js.map +1 -0
  207. package/lib/module/ui/screens/ConnectedAppsScreen.js +26 -40
  208. package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
  209. package/lib/module/ui/screens/CreateAccountScreen.js +139 -160
  210. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  211. package/lib/module/ui/screens/EditProfileFieldScreen.js +32 -38
  212. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  213. package/lib/module/ui/screens/EditProfileScreen.js +102 -110
  214. package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
  215. package/lib/module/ui/screens/FAQScreen.js +11 -15
  216. package/lib/module/ui/screens/FAQScreen.js.map +1 -1
  217. package/lib/module/ui/screens/FeedbackScreen.js +10 -17
  218. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  219. package/lib/module/ui/screens/FileManagementScreen.js +408 -631
  220. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  221. package/lib/module/ui/screens/HelpSupportScreen.js +64 -70
  222. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  223. package/lib/module/ui/screens/HistoryViewScreen.js +65 -81
  224. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  225. package/lib/module/ui/screens/LanguageSelectorScreen.js +71 -99
  226. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  227. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +10 -15
  228. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  229. package/lib/module/ui/screens/LegalDocumentsScreen.js +78 -94
  230. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  231. package/lib/module/ui/screens/ManageAccountScreen.js +102 -137
  232. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  233. package/lib/module/ui/screens/NotificationsScreen.js +71 -77
  234. package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
  235. package/lib/module/ui/screens/PaymentGatewayScreen.js +4 -9
  236. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  237. package/lib/module/ui/screens/PreferencesScreen.js +69 -75
  238. package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
  239. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +58 -93
  240. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  241. package/lib/module/ui/screens/PrivacySettingsScreen.js +293 -305
  242. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  243. package/lib/module/ui/screens/ProfileScreen.js +102 -116
  244. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  245. package/lib/module/ui/screens/SavesCollectionsScreen.js +40 -46
  246. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  247. package/lib/module/ui/screens/SearchSettingsScreen.js +46 -58
  248. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  249. package/lib/module/ui/screens/UserLinksScreen.js +26 -32
  250. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
  251. package/lib/module/ui/screens/UserListScreen.js +14 -24
  252. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  253. package/lib/module/ui/screens/WelcomeNewUserScreen.js +17 -49
  254. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  255. package/lib/module/ui/screens/fileManagement/FileLibraryError.js +59 -0
  256. package/lib/module/ui/screens/fileManagement/FileLibraryError.js.map +1 -0
  257. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +54 -42
  258. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  259. package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +45 -81
  260. package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
  261. package/lib/module/ui/screens/trust/TrustAboutScreen.js +67 -75
  262. package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  263. package/lib/module/ui/screens/trust/TrustCenterScreen.js +112 -139
  264. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  265. package/lib/module/ui/screens/trust/TrustFAQScreen.js +15 -21
  266. package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  267. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +14 -26
  268. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  269. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +69 -85
  270. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  271. package/lib/module/ui/screens/trust/TrustRulesScreen.js +30 -37
  272. package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  273. package/lib/module/ui/stores/resetSessionScopedStores.js +8 -3
  274. package/lib/module/ui/stores/resetSessionScopedStores.js.map +1 -1
  275. package/lib/module/ui/utils/avatarUtils.js +11 -2
  276. package/lib/module/ui/utils/avatarUtils.js.map +1 -1
  277. package/lib/module/ui/utils/fileManagement.js +0 -78
  278. package/lib/module/ui/utils/fileManagement.js.map +1 -1
  279. package/lib/typescript/commonjs/index.d.ts +2 -0
  280. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/ui/components/AvatarCameraBadge.d.ts +4 -0
  282. package/lib/typescript/commonjs/ui/components/AvatarCameraBadge.d.ts.map +1 -0
  283. package/lib/typescript/{module/ui/components/OxyAccountDialog.d.ts → commonjs/ui/components/OxyAccountDialogScreen.d.ts} +5 -4
  284. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +3 -3
  286. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +2 -2
  288. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
  289. package/lib/typescript/commonjs/ui/components/ProfileSummaryCard.d.ts.map +1 -1
  290. package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts +1 -1
  291. package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts +16 -0
  292. package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
  293. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts +3 -4
  294. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -1
  295. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
  296. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  297. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +17 -2
  298. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  299. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts +75 -13
  300. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
  301. package/lib/typescript/commonjs/ui/components/photogrid/JustifiedPhotoGrid.d.ts +10 -8
  302. package/lib/typescript/commonjs/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -1
  303. package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
  304. package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
  305. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  306. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +9 -0
  307. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts +50 -0
  309. package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +17 -16
  311. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/ui/hooks/useReduceMotion.d.ts +14 -0
  313. package/lib/typescript/commonjs/ui/hooks/useReduceMotion.d.ts.map +1 -0
  314. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +31 -0
  315. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +1 -1
  317. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +27 -2
  318. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
  319. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +4 -5
  320. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  321. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
  322. package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
  323. package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts +16 -0
  324. package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
  325. package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts +21 -0
  326. package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts.map +1 -1
  327. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +101 -23
  328. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -1
  329. package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts +42 -11
  330. package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -1
  331. package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  332. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  333. package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  334. package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
  335. package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts +18 -9
  336. package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  337. package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts +34 -0
  338. package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts.map +1 -0
  339. package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  340. package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  341. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  342. package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
  343. package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  345. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  346. package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  347. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  348. package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  349. package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  350. package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  351. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
  352. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  353. package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -1
  354. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  355. package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
  356. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  357. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  358. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  359. package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  360. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  361. package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
  362. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
  363. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  364. package/lib/typescript/commonjs/ui/screens/fileManagement/FileLibraryError.d.ts +23 -0
  365. package/lib/typescript/commonjs/ui/screens/fileManagement/FileLibraryError.d.ts.map +1 -0
  366. package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts +4 -0
  367. package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
  368. package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts +10 -2
  369. package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
  370. package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  371. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  372. package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  373. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  374. package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  375. package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  376. package/lib/typescript/commonjs/ui/stores/resetSessionScopedStores.d.ts +8 -1
  377. package/lib/typescript/commonjs/ui/stores/resetSessionScopedStores.d.ts.map +1 -1
  378. package/lib/typescript/commonjs/ui/types/navigation.d.ts +10 -0
  379. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  380. package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
  381. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +0 -48
  382. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
  383. package/lib/typescript/module/index.d.ts +2 -0
  384. package/lib/typescript/module/index.d.ts.map +1 -1
  385. package/lib/typescript/module/ui/components/AvatarCameraBadge.d.ts +4 -0
  386. package/lib/typescript/module/ui/components/AvatarCameraBadge.d.ts.map +1 -0
  387. package/lib/typescript/{commonjs/ui/components/OxyAccountDialog.d.ts → module/ui/components/OxyAccountDialogScreen.d.ts} +5 -4
  388. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
  389. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +3 -3
  390. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  391. package/lib/typescript/module/ui/components/ProfileButton.d.ts +2 -2
  392. package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
  393. package/lib/typescript/module/ui/components/ProfileSummaryCard.d.ts.map +1 -1
  394. package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts +1 -1
  395. package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts +16 -0
  396. package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
  397. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts +3 -4
  398. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -1
  399. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
  400. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  401. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +17 -2
  402. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  403. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts +75 -13
  404. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
  405. package/lib/typescript/module/ui/components/photogrid/JustifiedPhotoGrid.d.ts +10 -8
  406. package/lib/typescript/module/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -1
  407. package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
  408. package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
  409. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  410. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +9 -0
  411. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  412. package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts +50 -0
  413. package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts.map +1 -0
  414. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +17 -16
  415. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  416. package/lib/typescript/module/ui/hooks/useReduceMotion.d.ts +14 -0
  417. package/lib/typescript/module/ui/hooks/useReduceMotion.d.ts.map +1 -0
  418. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +31 -0
  419. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
  420. package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +1 -1
  421. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +27 -2
  422. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
  423. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +4 -5
  424. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  425. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  426. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  427. package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts +16 -0
  428. package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
  429. package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts +21 -0
  430. package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts.map +1 -1
  431. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +101 -23
  432. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -1
  433. package/lib/typescript/module/ui/navigation/surfaces.d.ts +42 -11
  434. package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -1
  435. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  436. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  437. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  438. package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
  439. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +18 -9
  440. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  441. package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts +34 -0
  442. package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts.map +1 -0
  443. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  444. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  445. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  446. package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
  447. package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
  448. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  449. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  450. package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  451. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  452. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  453. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  454. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  455. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
  456. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  457. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
  458. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  459. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
  460. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  461. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  462. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  463. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  464. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  465. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
  466. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  467. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  468. package/lib/typescript/module/ui/screens/fileManagement/FileLibraryError.d.ts +23 -0
  469. package/lib/typescript/module/ui/screens/fileManagement/FileLibraryError.d.ts.map +1 -0
  470. package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts +4 -0
  471. package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
  472. package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts +10 -2
  473. package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
  474. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  475. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  476. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  477. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  478. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  479. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  480. package/lib/typescript/module/ui/stores/resetSessionScopedStores.d.ts +8 -1
  481. package/lib/typescript/module/ui/stores/resetSessionScopedStores.d.ts.map +1 -1
  482. package/lib/typescript/module/ui/types/navigation.d.ts +10 -0
  483. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  484. package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
  485. package/lib/typescript/module/ui/utils/fileManagement.d.ts +0 -48
  486. package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
  487. package/package.json +9 -5
  488. package/src/index.ts +12 -5
  489. package/src/ui/components/AvatarCameraBadge.tsx +35 -0
  490. package/src/ui/components/{OxyAccountDialog.tsx → OxyAccountDialogScreen.tsx} +50 -116
  491. package/src/ui/components/OxyAuthChooser.tsx +743 -86
  492. package/src/ui/components/OxyConsentScreen.tsx +1 -1
  493. package/src/ui/components/ProfileButton.tsx +18 -3
  494. package/src/ui/components/ProfileSummaryCard.tsx +2 -25
  495. package/src/ui/components/RequireOxyAuth.tsx +1 -1
  496. package/src/ui/components/SurfaceHeaderAction.tsx +60 -0
  497. package/src/ui/components/SurfaceScreen.tsx +108 -14
  498. package/src/ui/components/fileManagement/FileDetailsModal.tsx +50 -36
  499. package/src/ui/components/modals/DeleteAccountModal.tsx +47 -26
  500. package/src/ui/components/oxyAuthChooserStyles.ts +78 -16
  501. package/src/ui/components/photogrid/JustifiedPhotoGrid.tsx +158 -84
  502. package/src/ui/components/photogrid/__tests__/chunkPhotos.test.ts +51 -0
  503. package/src/ui/components/surfaces/ActionSheetSurface.tsx +98 -0
  504. package/src/ui/context/OxyContext.tsx +79 -25
  505. package/src/ui/hooks/queries/queryKeys.ts +15 -0
  506. package/src/ui/hooks/queries/useFileQueries.ts +162 -0
  507. package/src/ui/hooks/useAvatarPicker.ts +46 -74
  508. package/src/ui/hooks/useReduceMotion.ts +58 -0
  509. package/src/ui/hooks/useSurfaceHeader.ts +57 -0
  510. package/src/ui/hooks/useSwitchableAccounts.ts +1 -1
  511. package/src/ui/navigation/__tests__/getSurfaceConfig.test.ts +55 -7
  512. package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +149 -0
  513. package/src/ui/navigation/accountDialogManager.ts +42 -2
  514. package/src/ui/navigation/bottomSheetManager.ts +6 -7
  515. package/src/ui/navigation/routes.ts +6 -4
  516. package/src/ui/navigation/surfaceBackBridge.ts +69 -0
  517. package/src/ui/navigation/surfaceNavStack.ts +72 -9
  518. package/src/ui/navigation/surfaceRegistry.ts +164 -24
  519. package/src/ui/navigation/surfaces.ts +137 -30
  520. package/src/ui/screens/AccountMembersScreen.tsx +39 -100
  521. package/src/ui/screens/AccountSettingsScreen.tsx +32 -54
  522. package/src/ui/screens/AccountVerificationScreen.tsx +23 -51
  523. package/src/ui/screens/AppInfoScreen.tsx +6 -13
  524. package/src/ui/screens/AvatarCropScreen.tsx +340 -311
  525. package/src/ui/screens/ChangeAvatarScreen.tsx +359 -0
  526. package/src/ui/screens/ConnectedAppsScreen.tsx +39 -60
  527. package/src/ui/screens/CreateAccountScreen.tsx +13 -39
  528. package/src/ui/screens/EditProfileFieldScreen.tsx +30 -48
  529. package/src/ui/screens/EditProfileScreen.tsx +7 -16
  530. package/src/ui/screens/FAQScreen.tsx +9 -13
  531. package/src/ui/screens/FeedbackScreen.tsx +8 -22
  532. package/src/ui/screens/FileManagementScreen.tsx +370 -610
  533. package/src/ui/screens/HelpSupportScreen.tsx +7 -13
  534. package/src/ui/screens/HistoryViewScreen.tsx +26 -31
  535. package/src/ui/screens/LanguageSelectorScreen.tsx +12 -46
  536. package/src/ui/screens/LearnMoreUsernamesScreen.tsx +8 -16
  537. package/src/ui/screens/LegalDocumentsScreen.tsx +7 -22
  538. package/src/ui/screens/ManageAccountScreen.tsx +96 -165
  539. package/src/ui/screens/NotificationsScreen.tsx +7 -13
  540. package/src/ui/screens/PaymentGatewayScreen.tsx +3 -10
  541. package/src/ui/screens/PreferencesScreen.tsx +7 -13
  542. package/src/ui/screens/PremiumSubscriptionScreen.tsx +52 -90
  543. package/src/ui/screens/PrivacySettingsScreen.tsx +9 -21
  544. package/src/ui/screens/ProfileScreen.tsx +9 -11
  545. package/src/ui/screens/SavesCollectionsScreen.tsx +7 -13
  546. package/src/ui/screens/SearchSettingsScreen.tsx +9 -21
  547. package/src/ui/screens/UserLinksScreen.tsx +7 -14
  548. package/src/ui/screens/UserListScreen.tsx +2 -5
  549. package/src/ui/screens/WelcomeNewUserScreen.tsx +18 -48
  550. package/src/ui/screens/fileManagement/FileLibraryError.tsx +56 -0
  551. package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +56 -46
  552. package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +55 -71
  553. package/src/ui/screens/trust/TrustAboutScreen.tsx +10 -17
  554. package/src/ui/screens/trust/TrustCenterScreen.tsx +9 -28
  555. package/src/ui/screens/trust/TrustFAQScreen.tsx +15 -18
  556. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +3 -5
  557. package/src/ui/screens/trust/TrustRewardsScreen.tsx +11 -26
  558. package/src/ui/screens/trust/TrustRulesScreen.tsx +10 -13
  559. package/src/ui/stores/resetSessionScopedStores.ts +8 -3
  560. package/src/ui/types/navigation.ts +10 -0
  561. package/src/ui/utils/avatarUtils.ts +11 -2
  562. package/src/ui/utils/fileManagement.ts +1 -101
  563. package/lib/commonjs/ui/components/Header.js +0 -305
  564. package/lib/commonjs/ui/components/Header.js.map +0 -1
  565. package/lib/commonjs/ui/components/OxyAccountDialog.js.map +0 -1
  566. package/lib/commonjs/ui/stores/fileStore.js +0 -153
  567. package/lib/commonjs/ui/stores/fileStore.js.map +0 -1
  568. package/lib/module/ui/components/Header.js +0 -299
  569. package/lib/module/ui/components/Header.js.map +0 -1
  570. package/lib/module/ui/components/OxyAccountDialog.js.map +0 -1
  571. package/lib/module/ui/stores/fileStore.js +0 -145
  572. package/lib/module/ui/stores/fileStore.js.map +0 -1
  573. package/lib/typescript/commonjs/ui/components/Header.d.ts +0 -33
  574. package/lib/typescript/commonjs/ui/components/Header.d.ts.map +0 -1
  575. package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +0 -1
  576. package/lib/typescript/commonjs/ui/stores/fileStore.d.ts +0 -31
  577. package/lib/typescript/commonjs/ui/stores/fileStore.d.ts.map +0 -1
  578. package/lib/typescript/module/ui/components/Header.d.ts +0 -33
  579. package/lib/typescript/module/ui/components/Header.d.ts.map +0 -1
  580. package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +0 -1
  581. package/lib/typescript/module/ui/stores/fileStore.d.ts +0 -31
  582. package/lib/typescript/module/ui/stores/fileStore.d.ts.map +0 -1
  583. package/src/ui/components/Header.tsx +0 -224
  584. package/src/ui/stores/fileStore.ts +0 -118
@@ -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
  */
@@ -1,5 +1,5 @@
1
1
  import type React from 'react';
2
- import { useCallback, useMemo, useState } from 'react';
2
+ import { useCallback, useEffect, useMemo, useState } from 'react';
3
3
  import {
4
4
  View,
5
5
  Pressable,
@@ -17,6 +17,7 @@ import { getAccountDisplayName, getAccountFallbackHandle } from '@oxyhq/core';
17
17
  import { useAuth } from '../hooks/useAuth';
18
18
  import { useOxy } from '../context/OxyContext';
19
19
  import { useI18n } from '../hooks/useI18n';
20
+ import { registerAccountDialogConsumerHooks } from '../navigation/accountDialogManager';
20
21
 
21
22
  const isWeb = Platform.OS === 'web';
22
23
 
@@ -65,7 +66,7 @@ export interface ProfileButtonProps {
65
66
  onNavigateProfile?: () => void;
66
67
  /**
67
68
  * Retained for source compatibility. The trigger now opens the unified
68
- * `OxyAccountDialog` (a centered / bottom-sheet modal) rather than an
69
+ * `OxyAccountDialogScreen` (a centered / bottom-sheet modal) rather than an
69
70
  * anchored popover, so popover placement no longer applies.
70
71
  */
71
72
  placement?: 'up' | 'down' | 'auto';
@@ -82,7 +83,7 @@ export interface ProfileButtonProps {
82
83
  /**
83
84
  * Self-contained sidebar account trigger, modeled on Bluesky's ProfileCard and
84
85
  * the Oxy inbox's `MailboxDrawer` footer. Pressing it opens the unified
85
- * {@link OxyAccountDialog} — the single account switcher + sign-in surface — via
86
+ * {@link OxyAccountDialogScreen} — the single account switcher + sign-in surface — via
86
87
  * `useOxy().openAccountDialog`.
87
88
  *
88
89
  * Three auth states from {@link useAuth}:
@@ -102,6 +103,9 @@ export interface ProfileButtonProps {
102
103
  const ProfileButton: React.FC<ProfileButtonProps> = ({
103
104
  expanded = true,
104
105
  avatarSize,
106
+ onNavigateManage,
107
+ onAddAccount,
108
+ onNavigateProfile,
105
109
  className,
106
110
  style,
107
111
  }) => {
@@ -127,6 +131,17 @@ const ProfileButton: React.FC<ProfileButtonProps> = ({
127
131
  openAccountDialog('accounts');
128
132
  }, [openAccountDialog]);
129
133
 
134
+ useEffect(() => {
135
+ if (!onNavigateManage && !onAddAccount && !onNavigateProfile) {
136
+ return undefined;
137
+ }
138
+ return registerAccountDialogConsumerHooks({
139
+ onNavigateManage,
140
+ onAddAccount,
141
+ onNavigateProfile,
142
+ });
143
+ }, [onNavigateManage, onAddAccount, onNavigateProfile]);
144
+
130
145
  const avatarUrl = useMemo(
131
146
  () => (user?.avatar ? oxyServices.getFileDownloadUrl(user.avatar, 'thumb') : undefined),
132
147
  [user?.avatar, oxyServices],
@@ -1,11 +1,10 @@
1
1
  import type React from 'react';
2
2
  import { View, type ViewStyle } from 'react-native';
3
- import { Ionicons } from '@expo/vector-icons';
4
- import { useTheme } from '@oxyhq/bloom/theme';
5
3
  import { H4, Text } from '@oxyhq/bloom/typography';
6
4
  import { Avatar } from '@oxyhq/bloom/avatar';
7
5
  import { Card } from '@oxyhq/bloom/card';
8
6
  import { PressableScale } from '@oxyhq/bloom/pressable-scale';
7
+ import AvatarCameraBadge from './AvatarCameraBadge';
9
8
 
10
9
  /**
11
10
  * ProfileSummaryCard — the shared "who am I" summary block rendered at the top
@@ -37,18 +36,6 @@ export interface ProfileSummaryCardProps {
37
36
  avatarAccessibilityLabel?: string;
38
37
  }
39
38
 
40
- const badgeStyle: ViewStyle = {
41
- position: 'absolute',
42
- right: 0,
43
- bottom: 0,
44
- width: 28,
45
- height: 28,
46
- borderRadius: 14,
47
- alignItems: 'center',
48
- justifyContent: 'center',
49
- borderWidth: 2,
50
- };
51
-
52
39
  const cardStyle: ViewStyle = {
53
40
  borderRadius: 20,
54
41
  marginBottom: 16,
@@ -67,8 +54,6 @@ const ProfileSummaryCard: React.FC<ProfileSummaryCardProps> = ({
67
54
  showCameraBadge = false,
68
55
  avatarAccessibilityLabel,
69
56
  }) => {
70
- const bloomTheme = useTheme();
71
-
72
57
  const avatar = <Avatar source={avatarUri} name={displayName} size={avatarSize} />;
73
58
 
74
59
  const avatarNode = onAvatarPress ? (
@@ -80,15 +65,7 @@ const ProfileSummaryCard: React.FC<ProfileSummaryCardProps> = ({
80
65
  className="mb-space-12"
81
66
  >
82
67
  {avatar}
83
- {showCameraBadge ? (
84
- <View style={badgeStyle} className="bg-fill-brand border-border-image">
85
- <Ionicons
86
- name="camera"
87
- size={14}
88
- color={bloomTheme.colors.primaryForeground}
89
- />
90
- </View>
91
- ) : null}
68
+ {showCameraBadge ? <AvatarCameraBadge /> : null}
92
69
  </PressableScale>
93
70
  ) : (
94
71
  <View className="mb-space-12">{avatar}</View>
@@ -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,28 @@
1
- import React, { useCallback, useEffect, useMemo, type ErrorInfo } from 'react';
2
- import { StyleSheet, Text, View } from 'react-native';
1
+ import React, { useCallback, useEffect, useMemo, useState, type ErrorInfo } from 'react';
2
+ import { StyleSheet, Text, View, useWindowDimensions } from 'react-native';
3
3
  import { useStore } from 'zustand';
4
4
  import { useTheme } from '@oxyhq/bloom/theme';
5
+ import {
6
+ useDialogFrame,
7
+ useDialogHeader,
8
+ type DialogHeaderConfig,
9
+ } from '@oxyhq/bloom/dialog';
5
10
  import type { SurfaceControls } from '@oxyhq/bloom/surfaces';
6
11
  import type { RouteName } from '../navigation/routes';
7
12
  import { getScreenComponent } from '../navigation/routes';
13
+ import { pushSurfaceBackHandler } from '../navigation/surfaceBackBridge';
8
14
  import type { SurfaceNavStack } from '../navigation/surfaceNavStack';
9
- import type { SurfacePresentation } from '../navigation/surfaceRegistry';
15
+ import { getSurfaceConfig } from '../navigation/surfaceRegistry';
10
16
  import {
11
17
  closeAllRouteSurfaces,
12
18
  navigateWithinOrPresent,
13
19
  presentRoute,
14
20
  replaceWithinOrPresent,
15
21
  } from '../navigation/surfaces';
22
+ import {
23
+ SurfaceHeaderContext,
24
+ type SurfaceHeaderContent,
25
+ } from '../hooks/useSurfaceHeader';
16
26
  import type { BaseScreenProps } from '../types/navigation';
17
27
 
18
28
  /** Error boundary catching screen render failures (e.g. a lazy `require()` throw). */
@@ -70,8 +80,8 @@ export interface SurfaceScreenProps {
70
80
  navStack: SurfaceNavStack;
71
81
  /** Bloom's per-surface controls (dismiss / present a child) — the DEPTH axis. */
72
82
  surface: SurfaceControls;
73
- /** This surface's presentation, so `navigate` knows when to drill in vs. stack. */
74
- presentation: SurfacePresentation;
83
+ /** Whether backdrop / Escape / back may dismiss at the root frame. Defaults to true. */
84
+ dismissOnBackdrop?: boolean;
75
85
  }
76
86
 
77
87
  /**
@@ -83,7 +93,11 @@ export interface SurfaceScreenProps {
83
93
  * effect) rather than a captured-controls call, so a dismiss requested before
84
94
  * this surface mounted still resolves the Bloom surface exactly once.
85
95
  */
86
- function SurfaceScreen({ navStack, surface, presentation }: SurfaceScreenProps) {
96
+ function SurfaceScreen({
97
+ navStack,
98
+ surface,
99
+ dismissOnBackdrop = true,
100
+ }: SurfaceScreenProps) {
87
101
  const theme = useTheme();
88
102
  const state = useStore(navStack.store);
89
103
  const top = state.frames[state.frames.length - 1];
@@ -96,17 +110,24 @@ function SurfaceScreen({ navStack, surface, presentation }: SurfaceScreenProps)
96
110
 
97
111
  const navigate = useCallback(
98
112
  (route: RouteName, props?: Record<string, unknown>) =>
99
- navigateWithinOrPresent(presentation, navStack, route, props),
100
- [navStack, presentation],
113
+ navigateWithinOrPresent(navStack, route, props),
114
+ [navStack],
101
115
  );
102
116
 
103
117
  const replace = useCallback(
104
118
  (route: RouteName, props?: Record<string, unknown>) =>
105
- replaceWithinOrPresent(presentation, navStack, route, props),
106
- [navStack, presentation],
119
+ replaceWithinOrPresent(navStack, route, props),
120
+ [navStack],
107
121
  );
108
122
 
109
- const dismiss = useCallback((result?: unknown) => navStack.requestDismiss(result), [navStack]);
123
+ // Screens' `dismiss(result)` resolves an active sub-flow (morphed-in avatar
124
+ // picker) back to its caller and pops to its entry frame; with no flow it
125
+ // dismisses the whole surface (a screen presented as its own surface) — the
126
+ // historical behaviour. `navStack.resolveFlowOrDismiss` owns that fork.
127
+ const dismiss = useCallback(
128
+ (result?: unknown) => navStack.resolveFlowOrDismiss(result),
129
+ [navStack],
130
+ );
110
131
 
111
132
  const canGoBack = useCallback(() => navStack.canGoBack(), [navStack]);
112
133
 
@@ -124,11 +145,82 @@ function SurfaceScreen({ navStack, surface, presentation }: SurfaceScreenProps)
124
145
  navStack.requestDismiss();
125
146
  }, [navStack]);
126
147
 
148
+ const handleSystemBack = useCallback((): boolean => {
149
+ if (navStack.goBack()) return true;
150
+ const current = navStack.getTop();
151
+ if (current.step > 0) {
152
+ navStack.setStep(current.step - 1);
153
+ return true;
154
+ }
155
+ if (dismissOnBackdrop) navStack.requestDismiss();
156
+ return true;
157
+ }, [navStack, dismissOnBackdrop]);
158
+
159
+ useEffect(() => pushSurfaceBackHandler(handleSystemBack), [handleSystemBack]);
160
+
127
161
  const present = useCallback(
128
162
  (route: RouteName, props?: Record<string, unknown>) => presentRoute(route, props).result,
129
163
  [],
130
164
  );
131
165
 
166
+ // --- Dialog nav-header wiring ------------------------------------------
167
+ // Screens render NO header of their own: the Dialog owns a sticky gradient nav
168
+ // bar + a large collapsing title. Here the surface HOST supplies the back/close
169
+ // wiring and bridges the mounted screen's runtime contribution (its translated
170
+ // title/subtitle + any action slot, via `useSurfaceHeader`) into the Dialog's
171
+ // header. One writer to Bloom's header store — this merge — so back/close and
172
+ // the screen's content never race.
173
+ const [headerContent, setHeaderContent] = useState<SurfaceHeaderContent | null>(null);
174
+ const headerContext = useMemo(() => ({ setContent: setHeaderContent }), []);
175
+
176
+ const config = useMemo(() => getSurfaceConfig(top.route, top.props), [top.route, top.props]);
177
+ const headerMode = config.header;
178
+
179
+ // --- Size morphing on nav-within ---------------------------------------
180
+ // The Dialog cannot see a drill-in from its own props (only this host
181
+ // re-renders when the nav stack moves), so it is told which frame is on
182
+ // screen. When that identity changes the surface MORPHS — the panel animates
183
+ // between the two frames' sizes instead of hard-cutting. A wizard step counts
184
+ // as a frame: it swaps the visible content inside one screen the same way.
185
+ // A `stacks` route opens its OWN surface (never a frame here); everything else
186
+ // morphs.
187
+ //
188
+ // A route may declare an EXPLICIT large morph target (`frameSize`) — the media
189
+ // selector's own-scroller grid, which the panel can't measure, grows the
190
+ // container to a near-full-height, wider card and shrinks back on exit. Resolve
191
+ // its viewport-relative height to px here (the Dialog clamps to the viewport).
192
+ const { height: viewportHeight } = useWindowDimensions();
193
+ const frameSize = useMemo(() => {
194
+ const spec = config.frameSize;
195
+ if (!spec) return undefined;
196
+ const height =
197
+ spec.heightRatio !== undefined ? Math.round(viewportHeight * spec.heightRatio) : undefined;
198
+ return { height, maxWidth: spec.maxWidth };
199
+ }, [config.frameSize, viewportHeight]);
200
+ useDialogFrame(
201
+ useMemo(
202
+ () => ({ key: `${top.route}#${top.step}`, morph: config.morph, size: frameSize }),
203
+ [top.route, top.step, config.morph, frameSize],
204
+ ),
205
+ );
206
+ // Show a back affordance whenever the surface can navigate back — either an
207
+ // earlier frame in this surface's stack, or an earlier wizard step.
208
+ const canGoBackNow = state.frames.length > 1 || top.step > 0;
209
+
210
+ const dialogHeader = useMemo<DialogHeaderConfig | null>(() => {
211
+ if (!headerMode) return null;
212
+ return {
213
+ largeTitle: true,
214
+ ...headerContent,
215
+ // A screen may own its back (e.g. the account dialog's per-view back via
216
+ // `useSurfaceHeader({ onBack })`); otherwise the surface's nav-stack back
217
+ // drives it (a drilled-in frame / wizard step).
218
+ onBack: headerContent?.onBack ?? (canGoBackNow ? goBack : undefined),
219
+ };
220
+ }, [headerMode, headerContent, canGoBackNow, goBack]);
221
+
222
+ useDialogHeader(dialogHeader);
223
+
132
224
  const screenProps = useMemo<BaseScreenProps>(() => {
133
225
  const { initialStep: _omitInitialStep, ...rest } = top.props;
134
226
  return {
@@ -157,9 +249,11 @@ function SurfaceScreen({ navStack, surface, presentation }: SurfaceScreenProps)
157
249
  if (!ScreenComponent) return null;
158
250
 
159
251
  return (
160
- <ScreenErrorBoundary screenName={top.route}>
161
- <ScreenComponent {...screenProps} />
162
- </ScreenErrorBoundary>
252
+ <SurfaceHeaderContext.Provider value={headerContext}>
253
+ <ScreenErrorBoundary screenName={top.route}>
254
+ <ScreenComponent {...screenProps} />
255
+ </ScreenErrorBoundary>
256
+ </SurfaceHeaderContext.Provider>
163
257
  );
164
258
  }
165
259
 
@@ -1,62 +1,40 @@
1
1
  import type React from 'react';
2
2
  import { View, Text } from 'react-native';
3
3
  import { Ionicons } from '@expo/vector-icons';
4
- import { Dialog, type DialogControlProps } from '@oxyhq/bloom';
4
+ import { Button } from '@oxyhq/bloom/button';
5
5
  import { useTheme } from '@oxyhq/bloom/theme';
6
+ import { surfaces, type SurfaceControls } from '@oxyhq/bloom/surfaces';
6
7
  import type { FileMetadata } from '@oxyhq/core';
7
8
  import { useI18n } from '../../hooks/useI18n';
8
9
  import { formatFileSize, getFileIcon } from '../../utils/fileManagement';
9
10
 
10
11
  interface FileDetailsModalProps {
11
- control: DialogControlProps;
12
- file: FileMetadata | null;
12
+ /** The presenting surface's controls (from `surfaces.present`). */
13
+ surface: SurfaceControls;
14
+ file: FileMetadata;
13
15
  onDownload: (fileId: string, filename: string) => void;
14
16
  onDelete: (fileId: string, filename: string) => void;
15
17
  isOwner: boolean;
16
- onClose?: () => void;
17
18
  }
18
19
 
20
+ /**
21
+ * File-detail panel — a rich presented surface (NOT a yes/no confirm): a file's
22
+ * icon + metadata plus download / delete / cancel actions. Each action first
23
+ * dismisses this surface, then runs its handler, so a follow-up delete confirm
24
+ * stacks cleanly above whatever remains. Presented via {@link presentFileDetails}.
25
+ */
19
26
  export const FileDetailsModal: React.FC<FileDetailsModalProps> = ({
20
- control,
27
+ surface,
21
28
  file,
22
29
  onDownload,
23
30
  onDelete,
24
31
  isOwner,
25
- onClose,
26
32
  }) => {
27
33
  const { t } = useI18n();
28
34
  const { colors } = useTheme();
29
35
 
30
- if (!file) return null;
31
-
32
- const actions = isOwner
33
- ? [
34
- {
35
- label: t('fileManagement.details.download'),
36
- onPress: () => onDownload(file.id, file.filename),
37
- },
38
- {
39
- label: t('common.actions.delete'),
40
- color: 'destructive' as const,
41
- onPress: () => onDelete(file.id, file.filename),
42
- },
43
- { label: t('common.cancel'), color: 'cancel' as const },
44
- ]
45
- : [
46
- {
47
- label: t('fileManagement.details.download'),
48
- onPress: () => onDownload(file.id, file.filename),
49
- },
50
- { label: t('common.cancel'), color: 'cancel' as const },
51
- ];
52
-
53
36
  return (
54
- <Dialog
55
- control={control}
56
- onClose={onClose}
57
- label={t('fileManagement.details.title')}
58
- actions={actions}
59
- >
37
+ <View>
60
38
  <View className="bg-secondary border-border p-[18px] rounded-[14px] border items-center">
61
39
  <View className="mb-space-16">
62
40
  <Ionicons
@@ -110,6 +88,42 @@ export const FileDetailsModal: React.FC<FileDetailsModalProps> = ({
110
88
  )}
111
89
  </View>
112
90
  </View>
113
- </Dialog>
91
+
92
+ <View style={{ gap: 8 }}>
93
+ <Button
94
+ variant="primary"
95
+ onPress={() => {
96
+ surface.dismiss();
97
+ onDownload(file.id, file.filename);
98
+ }}
99
+ >
100
+ {t('fileManagement.details.download')}
101
+ </Button>
102
+ {isOwner ? (
103
+ <Button
104
+ variant="destructive"
105
+ onPress={() => {
106
+ surface.dismiss();
107
+ onDelete(file.id, file.filename);
108
+ }}
109
+ >
110
+ {t('common.actions.delete')}
111
+ </Button>
112
+ ) : null}
113
+ <Button variant="secondary" onPress={() => surface.dismiss()}>
114
+ {t('common.cancel')}
115
+ </Button>
116
+ </View>
117
+ </View>
114
118
  );
115
119
  };
120
+
121
+ /** Options accepted by {@link presentFileDetails} (everything but `surface`). */
122
+ type PresentFileDetailsOptions = Omit<FileDetailsModalProps, 'surface'>;
123
+
124
+ /** Present the file-detail panel on the shared surface stack. */
125
+ export function presentFileDetails(options: PresentFileDetailsOptions): void {
126
+ void surfaces.present((surface) => (
127
+ <FileDetailsModal surface={surface} {...options} />
128
+ ));
129
+ }
@@ -2,18 +2,27 @@ import type React from 'react';
2
2
  import { useState, useCallback } from 'react';
3
3
  import { View, Text, TextInput } from 'react-native';
4
4
  import { Ionicons } from '@expo/vector-icons';
5
- import { Dialog, type DialogControlProps } from '@oxyhq/bloom';
5
+ import { Button } from '@oxyhq/bloom/button';
6
6
  import { useTheme } from '@oxyhq/bloom/theme';
7
+ import { surfaces, type SurfaceControls } from '@oxyhq/bloom/surfaces';
7
8
 
8
9
  interface DeleteAccountModalProps {
9
- control: DialogControlProps;
10
+ /** The presenting surface's controls (from `surfaces.present`). */
11
+ surface: SurfaceControls;
10
12
  username: string;
11
13
  onDelete: (confirmText: string) => Promise<void>;
12
14
  t: (key: string, params?: Record<string, string>) => string | undefined;
13
15
  }
14
16
 
17
+ /**
18
+ * Delete-account confirmation — a rich presented surface (NOT a yes/no confirm):
19
+ * the user must retype their username, then the destructive action runs
20
+ * `onDelete`. On success the surface is dismissed with `true` (the presenter
21
+ * then signs out + closes); cancel dismisses with `false`. Presented via
22
+ * {@link presentDeleteAccount}.
23
+ */
15
24
  const DeleteAccountModal: React.FC<DeleteAccountModalProps> = ({
16
- control,
25
+ surface,
17
26
  username,
18
27
  onDelete,
19
28
  t,
@@ -33,36 +42,21 @@ const DeleteAccountModal: React.FC<DeleteAccountModalProps> = ({
33
42
 
34
43
  try {
35
44
  await onDelete(confirmUsername);
36
- // Dialog will be closed by parent on success
45
+ surface.dismiss(true);
37
46
  } catch (err: unknown) {
38
47
  setError((err instanceof Error ? err.message : null) || t('deleteAccount.error') || 'Failed to delete account');
39
48
  } finally {
40
49
  setIsDeleting(false);
41
50
  }
42
- }, [isValid, confirmUsername, onDelete, t]);
51
+ }, [isValid, confirmUsername, onDelete, surface, t]);
43
52
 
44
- const handleCleanup = useCallback(() => {
53
+ const handleCancel = useCallback(() => {
45
54
  if (isDeleting) return;
46
- setConfirmUsername('');
47
- setError(null);
48
- }, [isDeleting]);
55
+ surface.dismiss(false);
56
+ }, [isDeleting, surface]);
49
57
 
50
58
  return (
51
- <Dialog
52
- control={control}
53
- onClose={handleCleanup}
54
- label="Delete Account"
55
- actions={[
56
- {
57
- label: t('deleteAccount.confirm') || 'Delete Forever',
58
- color: 'destructive',
59
- onPress: handleDelete,
60
- disabled: !isValid || isDeleting,
61
- shouldCloseOnPress: false,
62
- },
63
- { label: t('common.cancel') || 'Cancel', color: 'cancel' },
64
- ]}
65
- >
59
+ <View>
66
60
  <View className="flex-row items-center mb-4 gap-3">
67
61
  <Ionicons name="alert-circle" size={32} color={theme.colors.error} />
68
62
  <Text className="text-text text-xl font-bold" style={{ color: theme.colors.error }}>
@@ -92,7 +86,7 @@ const DeleteAccountModal: React.FC<DeleteAccountModalProps> = ({
92
86
  <TextInput
93
87
  className="text-text bg-bg text-base py-3 px-4 border rounded-lg"
94
88
  style={{
95
- borderColor: confirmUsername === username ? theme.colors.success : theme.colors.border,
89
+ borderColor: isValid ? theme.colors.success : theme.colors.border,
96
90
  }}
97
91
  value={confirmUsername}
98
92
  onChangeText={setConfirmUsername}
@@ -103,8 +97,35 @@ const DeleteAccountModal: React.FC<DeleteAccountModalProps> = ({
103
97
  editable={!isDeleting}
104
98
  />
105
99
  </View>
106
- </Dialog>
100
+
101
+ <View style={{ gap: 8 }}>
102
+ <Button
103
+ variant="destructive"
104
+ onPress={handleDelete}
105
+ disabled={!isValid || isDeleting}
106
+ loading={isDeleting}
107
+ >
108
+ {t('deleteAccount.confirm') || 'Delete Forever'}
109
+ </Button>
110
+ <Button variant="secondary" onPress={handleCancel} disabled={isDeleting}>
111
+ {t('common.cancel') || 'Cancel'}
112
+ </Button>
113
+ </View>
114
+ </View>
107
115
  );
108
116
  };
109
117
 
118
+ /** Options accepted by {@link presentDeleteAccount} (everything but `surface`). */
119
+ type PresentDeleteAccountOptions = Omit<DeleteAccountModalProps, 'surface'>;
120
+
121
+ /**
122
+ * Present the delete-account confirmation on the shared surface stack. Resolves
123
+ * `true` once the account is deleted, `false` if cancelled/dismissed.
124
+ */
125
+ export function presentDeleteAccount(options: PresentDeleteAccountOptions): Promise<boolean> {
126
+ return surfaces
127
+ .present<boolean>((surface) => <DeleteAccountModal surface={surface} {...options} />)
128
+ .then((result) => result === true);
129
+ }
130
+
110
131
  export default DeleteAccountModal;