@oxyhq/services 22.8.7 → 22.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (502) hide show
  1. package/lib/commonjs/index.js +24 -5
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +150 -0
  4. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -0
  5. package/lib/commonjs/ui/components/OxyAuthChooser.js +137 -40
  6. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  7. package/lib/commonjs/ui/components/OxyConsentScreen.js +1 -1
  8. package/lib/commonjs/ui/components/OxyProvider.js +9 -29
  9. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  10. package/lib/commonjs/ui/components/ProfileButton.js +1 -1
  11. package/lib/commonjs/ui/components/RequireOxyAuth.js +1 -1
  12. package/lib/commonjs/ui/components/SurfaceHeaderAction.js +63 -0
  13. package/lib/commonjs/ui/components/SurfaceHeaderAction.js.map +1 -0
  14. package/lib/commonjs/ui/components/SurfaceScreen.js +193 -0
  15. package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -0
  16. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +46 -29
  17. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  18. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +47 -23
  19. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
  20. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js +22 -12
  21. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -1
  22. package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js +83 -0
  23. package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
  24. package/lib/commonjs/ui/context/OxyContext.js +49 -4
  25. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  26. package/lib/commonjs/ui/hooks/useAvatarPicker.js +34 -39
  27. package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
  28. package/lib/commonjs/ui/hooks/useSurfaceHeader.js +46 -0
  29. package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -0
  30. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +1 -1
  31. package/lib/commonjs/ui/navigation/accountDialogManager.js +14 -2
  32. package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
  33. package/lib/commonjs/ui/navigation/bottomSheetManager.js +38 -56
  34. package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
  35. package/lib/commonjs/ui/navigation/routes.js +7 -57
  36. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  37. package/lib/commonjs/ui/navigation/surfaceBackBridge.js +68 -0
  38. package/lib/commonjs/ui/navigation/surfaceBackBridge.js.map +1 -0
  39. package/lib/commonjs/ui/navigation/surfaceNavStack.js +98 -0
  40. package/lib/commonjs/ui/navigation/surfaceNavStack.js.map +1 -0
  41. package/lib/commonjs/ui/navigation/surfaceRegistry.js +152 -0
  42. package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -0
  43. package/lib/commonjs/ui/navigation/surfaces.js +256 -0
  44. package/lib/commonjs/ui/navigation/surfaces.js.map +1 -0
  45. package/lib/commonjs/ui/screens/AccountMembersScreen.js +214 -283
  46. package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +88 -118
  48. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +22 -36
  50. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/AppInfoScreen.js +219 -226
  52. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/AvatarCropScreen.js +10 -14
  54. package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +24 -39
  56. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/CreateAccountScreen.js +136 -158
  58. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  59. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +29 -36
  60. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  61. package/lib/commonjs/ui/screens/EditProfileScreen.js +101 -109
  62. package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
  63. package/lib/commonjs/ui/screens/FAQScreen.js +10 -15
  64. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
  65. package/lib/commonjs/ui/screens/FeedbackScreen.js +8 -16
  66. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  67. package/lib/commonjs/ui/screens/FileManagementScreen.js +219 -206
  68. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  69. package/lib/commonjs/ui/screens/HelpSupportScreen.js +62 -69
  70. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  71. package/lib/commonjs/ui/screens/HistoryViewScreen.js +63 -79
  72. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  73. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +69 -98
  74. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  75. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +8 -14
  76. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  77. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +77 -94
  78. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  79. package/lib/commonjs/ui/screens/ManageAccountScreen.js +99 -134
  80. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  81. package/lib/commonjs/ui/screens/NotificationsScreen.js +69 -76
  82. package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
  83. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -8
  84. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  85. package/lib/commonjs/ui/screens/PreferencesScreen.js +67 -74
  86. package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
  87. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +55 -91
  88. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  89. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +291 -304
  90. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  91. package/lib/commonjs/ui/screens/ProfileScreen.js +100 -114
  92. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  93. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +38 -45
  94. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  95. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +44 -57
  96. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  97. package/lib/commonjs/ui/screens/UserLinksScreen.js +24 -31
  98. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
  99. package/lib/commonjs/ui/screens/UserListScreen.js +14 -24
  100. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  101. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
  102. package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +9 -7
  103. package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
  104. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +66 -75
  105. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  106. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +111 -139
  107. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  108. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +13 -20
  109. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  110. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +14 -27
  111. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  112. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +68 -85
  113. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  114. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +28 -36
  115. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  116. package/lib/commonjs/ui/types/surfaceScreen.js +6 -0
  117. package/lib/commonjs/ui/types/surfaceScreen.js.map +1 -0
  118. package/lib/module/index.js +12 -5
  119. package/lib/module/index.js.map +1 -1
  120. package/lib/module/ui/components/OxyAccountDialogScreen.js +145 -0
  121. package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -0
  122. package/lib/module/ui/components/OxyAuthChooser.js +137 -40
  123. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  124. package/lib/module/ui/components/OxyConsentScreen.js +1 -1
  125. package/lib/module/ui/components/OxyProvider.js +10 -30
  126. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  127. package/lib/module/ui/components/ProfileButton.js +1 -1
  128. package/lib/module/ui/components/RequireOxyAuth.js +1 -1
  129. package/lib/module/ui/components/SurfaceHeaderAction.js +58 -0
  130. package/lib/module/ui/components/SurfaceHeaderAction.js.map +1 -0
  131. package/lib/module/ui/components/SurfaceScreen.js +188 -0
  132. package/lib/module/ui/components/SurfaceScreen.js.map +1 -0
  133. package/lib/module/ui/components/fileManagement/FileDetailsModal.js +46 -29
  134. package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  135. package/lib/module/ui/components/modals/DeleteAccountModal.js +46 -23
  136. package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
  137. package/lib/module/ui/components/oxyAuthChooserStyles.js +22 -12
  138. package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -1
  139. package/lib/module/ui/components/surfaces/ActionSheetSurface.js +78 -0
  140. package/lib/module/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
  141. package/lib/module/ui/context/OxyContext.js +49 -4
  142. package/lib/module/ui/context/OxyContext.js.map +1 -1
  143. package/lib/module/ui/hooks/useAvatarPicker.js +34 -39
  144. package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
  145. package/lib/module/ui/hooks/useSurfaceHeader.js +42 -0
  146. package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -0
  147. package/lib/module/ui/hooks/useSwitchableAccounts.js +1 -1
  148. package/lib/module/ui/navigation/accountDialogManager.js +14 -2
  149. package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
  150. package/lib/module/ui/navigation/bottomSheetManager.js +37 -53
  151. package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
  152. package/lib/module/ui/navigation/routes.js +6 -56
  153. package/lib/module/ui/navigation/routes.js.map +1 -1
  154. package/lib/module/ui/navigation/surfaceBackBridge.js +63 -0
  155. package/lib/module/ui/navigation/surfaceBackBridge.js.map +1 -0
  156. package/lib/module/ui/navigation/surfaceNavStack.js +95 -0
  157. package/lib/module/ui/navigation/surfaceNavStack.js.map +1 -0
  158. package/lib/module/ui/navigation/surfaceRegistry.js +146 -0
  159. package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -0
  160. package/lib/module/ui/navigation/surfaces.js +244 -0
  161. package/lib/module/ui/navigation/surfaces.js.map +1 -0
  162. package/lib/module/ui/screens/AccountMembersScreen.js +218 -286
  163. package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
  164. package/lib/module/ui/screens/AccountSettingsScreen.js +92 -121
  165. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  166. package/lib/module/ui/screens/AccountVerificationScreen.js +25 -38
  167. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  168. package/lib/module/ui/screens/AppInfoScreen.js +220 -227
  169. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  170. package/lib/module/ui/screens/AvatarCropScreen.js +10 -14
  171. package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
  172. package/lib/module/ui/screens/ConnectedAppsScreen.js +26 -40
  173. package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
  174. package/lib/module/ui/screens/CreateAccountScreen.js +139 -160
  175. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  176. package/lib/module/ui/screens/EditProfileFieldScreen.js +32 -38
  177. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  178. package/lib/module/ui/screens/EditProfileScreen.js +102 -110
  179. package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
  180. package/lib/module/ui/screens/FAQScreen.js +11 -15
  181. package/lib/module/ui/screens/FAQScreen.js.map +1 -1
  182. package/lib/module/ui/screens/FeedbackScreen.js +10 -17
  183. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  184. package/lib/module/ui/screens/FileManagementScreen.js +222 -208
  185. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  186. package/lib/module/ui/screens/HelpSupportScreen.js +64 -70
  187. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  188. package/lib/module/ui/screens/HistoryViewScreen.js +65 -81
  189. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  190. package/lib/module/ui/screens/LanguageSelectorScreen.js +71 -99
  191. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  192. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +10 -15
  193. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  194. package/lib/module/ui/screens/LegalDocumentsScreen.js +78 -94
  195. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  196. package/lib/module/ui/screens/ManageAccountScreen.js +102 -137
  197. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  198. package/lib/module/ui/screens/NotificationsScreen.js +71 -77
  199. package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
  200. package/lib/module/ui/screens/PaymentGatewayScreen.js +4 -9
  201. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  202. package/lib/module/ui/screens/PreferencesScreen.js +69 -75
  203. package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
  204. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +58 -93
  205. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  206. package/lib/module/ui/screens/PrivacySettingsScreen.js +293 -305
  207. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  208. package/lib/module/ui/screens/ProfileScreen.js +102 -116
  209. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  210. package/lib/module/ui/screens/SavesCollectionsScreen.js +40 -46
  211. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  212. package/lib/module/ui/screens/SearchSettingsScreen.js +46 -58
  213. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  214. package/lib/module/ui/screens/UserLinksScreen.js +26 -32
  215. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
  216. package/lib/module/ui/screens/UserListScreen.js +14 -24
  217. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  218. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
  219. package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +8 -7
  220. package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
  221. package/lib/module/ui/screens/trust/TrustAboutScreen.js +67 -75
  222. package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  223. package/lib/module/ui/screens/trust/TrustCenterScreen.js +112 -139
  224. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  225. package/lib/module/ui/screens/trust/TrustFAQScreen.js +15 -21
  226. package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  227. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +14 -26
  228. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  229. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +69 -85
  230. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  231. package/lib/module/ui/screens/trust/TrustRulesScreen.js +30 -37
  232. package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  233. package/lib/module/ui/types/surfaceScreen.js +4 -0
  234. package/lib/module/ui/types/surfaceScreen.js.map +1 -0
  235. package/lib/typescript/commonjs/index.d.ts +2 -0
  236. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  237. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts +39 -0
  238. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
  239. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +3 -3
  240. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts +3 -2
  242. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +2 -2
  244. package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts +1 -1
  245. package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts +16 -0
  246. package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
  247. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts +26 -0
  248. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -0
  249. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
  250. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  251. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +17 -2
  252. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  253. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts +19 -9
  254. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
  255. package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
  256. package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
  257. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +7 -11
  259. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +31 -0
  261. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +1 -1
  263. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +14 -2
  264. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +24 -16
  266. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  267. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +2 -60
  268. package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts +16 -0
  270. package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
  271. package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts +51 -0
  272. package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts.map +1 -0
  273. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +135 -0
  274. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -0
  275. package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts +79 -0
  276. package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -0
  277. package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  278. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  280. package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts +0 -4
  282. package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  283. package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  285. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  286. package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  289. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  290. package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  291. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  292. package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  293. package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  294. package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  295. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
  296. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  297. package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -1
  298. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  299. package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
  300. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  301. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  302. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  303. package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  304. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  305. package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
  306. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
  307. package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  309. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  310. package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  311. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  313. package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  314. package/lib/typescript/commonjs/ui/types/navigation.d.ts +8 -0
  315. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  316. package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts +38 -0
  317. package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts.map +1 -0
  318. package/lib/typescript/module/index.d.ts +2 -0
  319. package/lib/typescript/module/index.d.ts.map +1 -1
  320. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts +39 -0
  321. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
  322. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +3 -3
  323. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  324. package/lib/typescript/module/ui/components/OxyProvider.d.ts +3 -2
  325. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  326. package/lib/typescript/module/ui/components/ProfileButton.d.ts +2 -2
  327. package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts +1 -1
  328. package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts +16 -0
  329. package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
  330. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts +26 -0
  331. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -0
  332. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
  333. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  334. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +17 -2
  335. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  336. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts +19 -9
  337. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
  338. package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
  339. package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
  340. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  341. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +7 -11
  342. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  343. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +31 -0
  344. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
  345. package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +1 -1
  346. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +14 -2
  347. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
  348. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +24 -16
  349. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  350. package/lib/typescript/module/ui/navigation/routes.d.ts +2 -60
  351. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  352. package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts +16 -0
  353. package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
  354. package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts +51 -0
  355. package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts.map +1 -0
  356. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +135 -0
  357. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -0
  358. package/lib/typescript/module/ui/navigation/surfaces.d.ts +79 -0
  359. package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -0
  360. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  361. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  362. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  363. package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
  364. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +0 -4
  365. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  366. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  367. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  368. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  369. package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
  370. package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
  371. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  372. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  373. package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  374. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  375. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  376. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  377. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  378. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
  379. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  380. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
  381. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  382. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
  383. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  384. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  385. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  386. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  387. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  388. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
  389. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  390. package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
  391. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  392. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  393. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  394. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  395. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  396. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  397. package/lib/typescript/module/ui/types/navigation.d.ts +8 -0
  398. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  399. package/lib/typescript/module/ui/types/surfaceScreen.d.ts +38 -0
  400. package/lib/typescript/module/ui/types/surfaceScreen.d.ts.map +1 -0
  401. package/package.json +2 -2
  402. package/src/index.ts +12 -5
  403. package/src/ui/components/OxyAccountDialogScreen.tsx +148 -0
  404. package/src/ui/components/OxyAuthChooser.tsx +153 -33
  405. package/src/ui/components/OxyConsentScreen.tsx +1 -1
  406. package/src/ui/components/OxyProvider.tsx +12 -34
  407. package/src/ui/components/ProfileButton.tsx +2 -2
  408. package/src/ui/components/RequireOxyAuth.tsx +1 -1
  409. package/src/ui/components/SurfaceHeaderAction.tsx +60 -0
  410. package/src/ui/components/SurfaceScreen.tsx +226 -0
  411. package/src/ui/components/fileManagement/FileDetailsModal.tsx +50 -36
  412. package/src/ui/components/modals/DeleteAccountModal.tsx +47 -26
  413. package/src/ui/components/oxyAuthChooserStyles.ts +22 -12
  414. package/src/ui/components/surfaces/ActionSheetSurface.tsx +98 -0
  415. package/src/ui/context/OxyContext.tsx +43 -3
  416. package/src/ui/hooks/useAvatarPicker.ts +53 -66
  417. package/src/ui/hooks/useSurfaceHeader.ts +56 -0
  418. package/src/ui/hooks/useSwitchableAccounts.ts +1 -1
  419. package/src/ui/navigation/__tests__/getSurfaceConfig.test.ts +39 -0
  420. package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +68 -0
  421. package/src/ui/navigation/accountDialogManager.ts +14 -2
  422. package/src/ui/navigation/bottomSheetManager.ts +46 -73
  423. package/src/ui/navigation/routes.ts +7 -106
  424. package/src/ui/navigation/surfaceBackBridge.ts +69 -0
  425. package/src/ui/navigation/surfaceNavStack.ts +110 -0
  426. package/src/ui/navigation/surfaceRegistry.ts +240 -0
  427. package/src/ui/navigation/surfaces.ts +272 -0
  428. package/src/ui/screens/AccountMembersScreen.tsx +39 -100
  429. package/src/ui/screens/AccountSettingsScreen.tsx +32 -54
  430. package/src/ui/screens/AccountVerificationScreen.tsx +23 -51
  431. package/src/ui/screens/AppInfoScreen.tsx +6 -13
  432. package/src/ui/screens/AvatarCropScreen.tsx +8 -17
  433. package/src/ui/screens/ConnectedAppsScreen.tsx +39 -60
  434. package/src/ui/screens/CreateAccountScreen.tsx +13 -39
  435. package/src/ui/screens/EditProfileFieldScreen.tsx +30 -48
  436. package/src/ui/screens/EditProfileScreen.tsx +7 -16
  437. package/src/ui/screens/FAQScreen.tsx +9 -13
  438. package/src/ui/screens/FeedbackScreen.tsx +8 -22
  439. package/src/ui/screens/FileManagementScreen.tsx +191 -188
  440. package/src/ui/screens/HelpSupportScreen.tsx +7 -13
  441. package/src/ui/screens/HistoryViewScreen.tsx +26 -31
  442. package/src/ui/screens/LanguageSelectorScreen.tsx +12 -46
  443. package/src/ui/screens/LearnMoreUsernamesScreen.tsx +8 -16
  444. package/src/ui/screens/LegalDocumentsScreen.tsx +7 -22
  445. package/src/ui/screens/ManageAccountScreen.tsx +96 -165
  446. package/src/ui/screens/NotificationsScreen.tsx +7 -13
  447. package/src/ui/screens/PaymentGatewayScreen.tsx +3 -10
  448. package/src/ui/screens/PreferencesScreen.tsx +7 -13
  449. package/src/ui/screens/PremiumSubscriptionScreen.tsx +52 -90
  450. package/src/ui/screens/PrivacySettingsScreen.tsx +9 -21
  451. package/src/ui/screens/ProfileScreen.tsx +9 -11
  452. package/src/ui/screens/SavesCollectionsScreen.tsx +7 -13
  453. package/src/ui/screens/SearchSettingsScreen.tsx +9 -21
  454. package/src/ui/screens/UserLinksScreen.tsx +7 -14
  455. package/src/ui/screens/UserListScreen.tsx +2 -5
  456. package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +1 -1
  457. package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +9 -7
  458. package/src/ui/screens/trust/TrustAboutScreen.tsx +10 -17
  459. package/src/ui/screens/trust/TrustCenterScreen.tsx +9 -28
  460. package/src/ui/screens/trust/TrustFAQScreen.tsx +15 -18
  461. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +3 -5
  462. package/src/ui/screens/trust/TrustRewardsScreen.tsx +11 -26
  463. package/src/ui/screens/trust/TrustRulesScreen.tsx +10 -13
  464. package/src/ui/types/navigation.ts +8 -0
  465. package/src/ui/types/surfaceScreen.ts +38 -0
  466. package/lib/commonjs/ui/components/BottomSheet.js +0 -49
  467. package/lib/commonjs/ui/components/BottomSheet.js.map +0 -1
  468. package/lib/commonjs/ui/components/BottomSheetRouter.js +0 -298
  469. package/lib/commonjs/ui/components/BottomSheetRouter.js.map +0 -1
  470. package/lib/commonjs/ui/components/Header.js +0 -305
  471. package/lib/commonjs/ui/components/Header.js.map +0 -1
  472. package/lib/commonjs/ui/components/OxyAccountDialog.js +0 -259
  473. package/lib/commonjs/ui/components/OxyAccountDialog.js.map +0 -1
  474. package/lib/module/ui/components/BottomSheet.js +0 -45
  475. package/lib/module/ui/components/BottomSheet.js.map +0 -1
  476. package/lib/module/ui/components/BottomSheetRouter.js +0 -292
  477. package/lib/module/ui/components/BottomSheetRouter.js.map +0 -1
  478. package/lib/module/ui/components/Header.js +0 -299
  479. package/lib/module/ui/components/Header.js.map +0 -1
  480. package/lib/module/ui/components/OxyAccountDialog.js +0 -254
  481. package/lib/module/ui/components/OxyAccountDialog.js.map +0 -1
  482. package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts +0 -29
  483. package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts.map +0 -1
  484. package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts +0 -9
  485. package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +0 -1
  486. package/lib/typescript/commonjs/ui/components/Header.d.ts +0 -33
  487. package/lib/typescript/commonjs/ui/components/Header.d.ts.map +0 -1
  488. package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts +0 -37
  489. package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +0 -1
  490. package/lib/typescript/module/ui/components/BottomSheet.d.ts +0 -29
  491. package/lib/typescript/module/ui/components/BottomSheet.d.ts.map +0 -1
  492. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +0 -9
  493. package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +0 -1
  494. package/lib/typescript/module/ui/components/Header.d.ts +0 -33
  495. package/lib/typescript/module/ui/components/Header.d.ts.map +0 -1
  496. package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts +0 -37
  497. package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +0 -1
  498. package/src/ui/components/BottomSheet.tsx +0 -48
  499. package/src/ui/components/BottomSheetRouter.tsx +0 -310
  500. package/src/ui/components/Header.tsx +0 -224
  501. package/src/ui/components/OxyAccountDialog.tsx +0 -243
  502. package/src/ui/navigation/__tests__/getSheetConfig.test.ts +0 -36
@@ -1 +1 @@
1
- {"version":3,"file":"TrustFAQScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustFAQScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;;AAqG9D,wBAA0C"}
1
+ {"version":3,"file":"TrustFAQScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustFAQScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;;AAkG9D,wBAA0C"}
@@ -1 +1 @@
1
- {"version":3,"file":"TrustLeaderboardScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustLeaderboardScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AAa9D,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwJrD,CAAC;AA0CF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"TrustLeaderboardScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustLeaderboardScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AAa9D,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsJrD,CAAC;AA0CF,eAAe,sBAAsB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TrustRewardsScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustRewardsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AA0E9D,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkYjD,CAAC;AAkIF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"TrustRewardsScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustRewardsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AA0E9D,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmXjD,CAAC;AAkIF,eAAe,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TrustRulesScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustRulesScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AAiB9D,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwF/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"TrustRulesScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustRulesScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AAiB9D,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAqF/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -10,6 +10,14 @@ export interface BaseScreenProps {
10
10
  goBack?: () => void;
11
11
  onClose?: () => void;
12
12
  onAuthenticated?: (payload?: unknown) => void;
13
+ /**
14
+ * Dismiss THIS surface, resolving the `present()` promise that opened it
15
+ * with `result`. Injected by the surface host (the P1 surface stack). Picker
16
+ * and crop screens use it to hand a typed result back to the awaiting
17
+ * `surfaces.present(...)` call instead of an untyped `onSelect`/`onConfirm`
18
+ * callback prop.
19
+ */
20
+ dismiss?: (result?: unknown) => void;
13
21
  theme?: 'light' | 'dark' | string;
14
22
  initialStep?: number;
15
23
  stepControllerRef?: RefObject<StepController | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../../src/ui/types/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAsB,CAAC;AAItD,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAE5B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACxE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAG9C,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAGlC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAGjE,aAAa,CAAC,EAAE,SAAS,CAAC;IAG1B,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAGnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IAMtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;CACzC"}
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../../src/ui/types/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAsB,CAAC;AAItD,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAE5B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACxE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAGrC,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAGlC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAGjE,aAAa,CAAC,EAAE,SAAS,CAAC;IAG1B,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAGnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IAMtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;CACzC"}
@@ -0,0 +1,38 @@
1
+ import type { RouteName } from '../navigation/routes.js';
2
+ import type { SurfaceProps, SurfaceResult } from '../navigation/surfaceRegistry.js';
3
+ /**
4
+ * The typed prop contract a screen receives when it is bound into an SDK surface.
5
+ *
6
+ * This is the successor to the grab-bag `BaseScreenProps`: `props` carries the
7
+ * route's own {@link SurfaceProps typed props}, and the navigation methods are
8
+ * split along the two axes the surface system models — NAV-WITHIN
9
+ * (`navigate`/`replace`/`goBack`/`step`) inside this surface, and DEPTH
10
+ * (`present`/`dismiss`) across the stack.
11
+ *
12
+ * In P1 the ~35 screens still consume the legacy `BaseScreenProps` shape (the
13
+ * `SurfaceScreen` binding passes a superset that satisfies both), so this type is
14
+ * the target contract for the per-screen migration in a later phase — it is not
15
+ * yet the render-time prop shape for existing screens.
16
+ */
17
+ export interface SurfaceScreenProps<K extends RouteName> {
18
+ /** The route's typed props (from the {@link SurfaceProps registry}). */
19
+ props: SurfaceProps<K>;
20
+ /** Drill in to another route — WITHIN this surface, or a new surface if the
21
+ * target's presentation differs. */
22
+ navigate: <T extends RouteName>(route: T, props?: SurfaceProps<T>) => void;
23
+ /** Replace the current route in place (no history entry). */
24
+ replace: <T extends RouteName>(route: T, props?: SurfaceProps<T>) => void;
25
+ /** Pop one level; if at the root, dismiss the surface. */
26
+ goBack: () => void;
27
+ /** Whether a back is possible (a deeper route OR a prior wizard step). */
28
+ canGoBack: () => boolean;
29
+ /** Dismiss THIS surface, resolving its `present()` promise with `result`. */
30
+ dismiss: (result?: SurfaceResult<K>) => void;
31
+ /** Present a NEW surface on top of the stack (DEPTH); resolves with its result. */
32
+ present: <T extends RouteName>(route: T, props?: SurfaceProps<T>) => Promise<SurfaceResult<T> | undefined>;
33
+ /** The current wizard step of this frame. */
34
+ step: number;
35
+ /** Set the current wizard step. */
36
+ setStep: (step: number) => void;
37
+ }
38
+ //# sourceMappingURL=surfaceScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surfaceScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/types/surfaceScreen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kCAA+B,CAAC;AAEjF;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,SAAS;IACrD,wEAAwE;IACxE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACvB;wCACoC;IACpC,QAAQ,EAAE,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC3E,6DAA6D;IAC7D,OAAO,EAAE,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC1E,0DAA0D;IAC1D,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,0EAA0E;IAC1E,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,6EAA6E;IAC7E,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC7C,mFAAmF;IACnF,OAAO,EAAE,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAC3G,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/services",
3
- "version": "22.8.7",
3
+ "version": "22.10.0",
4
4
  "description": "OxyHQ Expo/React Native SDK — UI components, screens, and native features",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -176,7 +176,7 @@
176
176
  },
177
177
  "peerDependencies": {
178
178
  "@expo/vector-icons": "^15.0.3",
179
- "@oxyhq/bloom": ">=0.44.1",
179
+ "@oxyhq/bloom": ">=0.48.0",
180
180
  "@oxyhq/core": "^12.9.0",
181
181
  "@react-native-async-storage/async-storage": "^2.0.0",
182
182
  "@react-native-community/netinfo": "^11.4.1",
package/src/index.ts CHANGED
@@ -236,15 +236,16 @@ export { LogoIcon } from './ui/components/logo/LogoIcon';
236
236
  export { LogoText } from './ui/components/logo/LogoText';
237
237
 
238
238
  // Sidebar account trigger. Pressing `ProfileButton` opens the unified
239
- // `OxyAccountDialog` (the single account switcher + sign-in surface) via
239
+ // `OxyAccountDialogScreen` (the single account switcher + sign-in surface) via
240
240
  // `useOxy().openAccountDialog`.
241
241
  export { default as ProfileButton } from './ui/components/ProfileButton';
242
242
  export type { ProfileButtonProps } from './ui/components/ProfileButton';
243
243
 
244
- // The account switcher/sign-in/sign-up chooser WITHOUT dialog chrome —
245
- // `OxyAccountDialog` wraps this in Bloom's `<Dialog>` for the normal in-app
246
- // surface; exported directly so a bare host (e.g. a future auth.oxy.so hub
247
- // page) can mount the exact same chooser with its own completion strategy.
244
+ // The account switcher/sign-in/sign-up chooser WITHOUT dialog chrome — the
245
+ // surface stack presents `OxyAccountDialogScreen` (which renders this) into
246
+ // Bloom's `<Dialog>` for the normal in-app surface; exported directly so a bare
247
+ // host (e.g. a future auth.oxy.so hub page) can mount the exact same chooser
248
+ // with its own completion strategy.
248
249
  export { default as OxyAuthChooser } from './ui/components/OxyAuthChooser';
249
250
  export type { OxyAuthChooserProps } from './ui/components/OxyAuthChooser';
250
251
 
@@ -275,6 +276,12 @@ export { default as AccountSettingsScreen } from './ui/screens/AccountSettingsSc
275
276
  export { showBottomSheet, closeBottomSheet } from './ui/navigation/bottomSheetManager';
276
277
  export type { RouteName } from './ui/navigation/routes';
277
278
 
279
+ // Surface nav header — a surface screen declares its title/subtitle (+ any
280
+ // action slot) into the Dialog's OWN navigation header. Screens render no header
281
+ // of their own.
282
+ export { useSurfaceHeader, type SurfaceHeaderContent } from './ui/hooks/useSurfaceHeader';
283
+ export { SurfaceHeaderAction, type SurfaceHeaderActionProps } from './ui/components/SurfaceHeaderAction';
284
+
278
285
  // ---------------------------------------------------------------------------
279
286
  // Unified account dialog — imperative entry points
280
287
  // ---------------------------------------------------------------------------
@@ -0,0 +1,148 @@
1
+ /**
2
+ * OxyAccountDialogScreen — the ONE unified account dialog BODY for `@oxyhq/services`.
3
+ *
4
+ * The header (title/subtitle per view + back button) around the headless chooser
5
+ * logic, which lives in `OxyAuthChooser` — the account switcher, sign-in,
6
+ * sign-up, and QR views are ALL there, extracted so the same chooser can be
7
+ * mounted bare by a future host with no Dialog chrome (e.g. an auth.oxy.so hub
8
+ * page driving the cross-origin passkey popup, b2). This file owns ONLY the
9
+ * header + the scroll body.
10
+ *
11
+ * It is presented as the `AccountDialog` route on the shared Bloom SURFACE STACK
12
+ * (`@oxyhq/bloom/surfaces`) — `OxyContext.openAccountDialog` calls
13
+ * `presentDetached('AccountDialog', …, { placement: { base: 'bottom', md:
14
+ * 'center' }, dismissOnBackdrop: false, maxWidth: 420 })`, so the STACK owns the
15
+ * responsive `<Dialog>` chrome and this component renders only its content. That
16
+ * replaces the previous standalone controlled `<Dialog open={isAccountDialogOpen}>`
17
+ * mount: dismissal now flows through the stack (backdrop/swipe disabled), and the
18
+ * header close button (and `OxyAuthChooser`'s `onComplete`) drive
19
+ * `useOxy().closeAccountDialog`, which dismisses the surface and runs its exit
20
+ * animation. The view-enum (`accounts|signin|qr|add|signup`) stays internal here,
21
+ * driven by the shared `AccountDialogController` in `@oxyhq/core`.
22
+ */
23
+
24
+ import type React from 'react';
25
+ import { useCallback, useSyncExternalStore } from 'react';
26
+ import { StyleSheet, View } from 'react-native';
27
+ import type { AccountDialogSnapshot } from '@oxyhq/core';
28
+ import { useOxy } from '../context/OxyContext';
29
+ import { useI18n } from '../hooks/useI18n';
30
+ import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
31
+ import OxyAuthChooser from './OxyAuthChooser';
32
+
33
+ type Translate = ReturnType<typeof useI18n>['t'];
34
+
35
+ /**
36
+ * The unified account dialog BODY — the header + `OxyAuthChooser` chooser.
37
+ *
38
+ * Presented as the `AccountDialog` surface (route) on the shared Bloom surface
39
+ * stack; the surface owns the `<Dialog>` chrome (responsive `{ base: 'bottom',
40
+ * md: 'center' }` placement, `dismissOnBackdrop={false}`, `maxWidth={420}` — set
41
+ * by `OxyContext` when it presents this surface), so this component renders ONLY
42
+ * the content. Open it via `useOxy().openAccountDialog(view?)` or the imperative
43
+ * `openAccountDialog('signin')`; the view-enum (`accounts|signin|qr|add|signup`)
44
+ * stays internal here, driven by the shared `AccountDialogController` in
45
+ * `@oxyhq/core`. Closing routes through `useOxy().closeAccountDialog`, which
46
+ * dismisses the surface and runs its exit animation.
47
+ */
48
+ const OxyAccountDialogScreen: React.FC = () => {
49
+ const { accountDialogController: controller, closeAccountDialog } = useOxy();
50
+ const { t } = useI18n();
51
+
52
+ // A lightweight, header-only binding to the same controller `OxyAuthChooser`
53
+ // binds independently — cheap, and the established pattern here (
54
+ // `useSwitchableAccounts` also binds to this controller on its own).
55
+ const subscribe = useCallback(
56
+ (listener: () => void) => (controller ? controller.subscribe(listener) : () => undefined),
57
+ [controller],
58
+ );
59
+ const getSnapshot = useCallback(
60
+ () => (controller ? controller.getSnapshot() : EMPTY_SNAPSHOT),
61
+ [controller],
62
+ );
63
+ const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
64
+
65
+ const { view } = snapshot;
66
+ const showBack =
67
+ view === 'qr' || view === 'signup' || (view === 'add' && snapshot.accounts.length > 0);
68
+ const goToAccounts = useCallback(() => controller?.setView('accounts'), [controller]);
69
+ const { title, subtitle } = headerCopy(view, snapshot.accounts.length, t);
70
+
71
+ // The account dialog uses the SHARED Dialog nav header like every other screen
72
+ // (the base): the large in-content title/subtitle that collapses into the nav
73
+ // bar on scroll (default `largeTitle`), its per-view copy, and a per-view back
74
+ // that returns to the account list (the Dialog renders the frosted back/close).
75
+ useSurfaceHeader({
76
+ title,
77
+ subtitle: subtitle ?? undefined,
78
+ onBack: showBack ? goToAccounts : undefined,
79
+ });
80
+
81
+ if (!controller) {
82
+ return null;
83
+ }
84
+
85
+ return (
86
+ <View style={styles.bodyContent}>
87
+ <OxyAuthChooser onComplete={closeAccountDialog} />
88
+ </View>
89
+ );
90
+ };
91
+
92
+ // ---------------------------------------------------------------------------
93
+ // Copy + helpers
94
+ // ---------------------------------------------------------------------------
95
+
96
+ function headerCopy(
97
+ view: AccountDialogSnapshot['view'],
98
+ accountCount: number,
99
+ t: Translate,
100
+ ): { title: string; subtitle: string | null } {
101
+ switch (view) {
102
+ case 'accounts':
103
+ return {
104
+ title: t('accountSwitcher.sections.yourAccounts') || 'Your accounts',
105
+ subtitle: t('signin.chooser.subtitle') || 'Choose which account to continue with.',
106
+ };
107
+ case 'qr':
108
+ return {
109
+ title: t('accountSwitcher.scanTitle') || 'Sign in with Oxy',
110
+ subtitle: t('accountSwitcher.scanSubtitle') || 'Scan with Commons on your phone.',
111
+ };
112
+ case 'signup':
113
+ return {
114
+ title: t('signup.title') || 'Create your account',
115
+ subtitle: t('signup.subtitle') || 'One identity for the whole ecosystem.',
116
+ };
117
+ default:
118
+ return accountCount > 0
119
+ ? {
120
+ title: t('signin.addAccountTitle') || 'Add another account',
121
+ subtitle: t('signin.addAccountSubtitle') || 'Sign in with another account.',
122
+ }
123
+ : {
124
+ title: t('signin.title') || 'Sign in',
125
+ subtitle: t('signin.subtitle') || 'One identity for the whole ecosystem.',
126
+ };
127
+ }
128
+ }
129
+
130
+ const EMPTY_SNAPSHOT: AccountDialogSnapshot = {
131
+ view: 'accounts',
132
+ accounts: [],
133
+ activeAccountId: null,
134
+ loading: false,
135
+ error: null,
136
+ switchingAccountId: null,
137
+ signIn: { phase: 'idle', authorizeCode: null, qrPayload: null, expiresAt: null, error: null },
138
+ commonsAvailability: 'unknown',
139
+ };
140
+
141
+ const styles = StyleSheet.create({
142
+ bodyContent: {
143
+ paddingTop: 4,
144
+ paddingBottom: 4,
145
+ },
146
+ });
147
+
148
+ export default OxyAccountDialogScreen;
@@ -4,8 +4,8 @@
4
4
  *
5
5
  * A thin React Native binding over the headless `AccountDialogController` in
6
6
  * `@oxyhq/core` (bound via `useSyncExternalStore`) — the same data/state
7
- * machine {@link OxyAccountDialog} renders, extracted so it can be mounted in
8
- * TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialog` (the normal
7
+ * machine {@link OxyAccountDialogScreen} renders, extracted so it can be mounted in
8
+ * TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialogScreen` (the normal
9
9
  * in-app surface), and mounted bare by a future auth.oxy.so hub page for the
10
10
  * cross-origin passkey popup (b2) — same chooser, two hosts, two completion
11
11
  * strategies via the `onComplete` prop. Neither host duplicates view logic.
@@ -61,6 +61,7 @@ import { MaterialCommunityIcons } from '@expo/vector-icons';
61
61
  import QRCode from 'react-native-qrcode-svg';
62
62
  import { Avatar } from '@oxyhq/bloom/avatar';
63
63
  import { Button } from '@oxyhq/bloom/button';
64
+ import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
64
65
  import { toast } from '@oxyhq/bloom';
65
66
  import { Text } from '@oxyhq/bloom/typography';
66
67
  import {
@@ -81,6 +82,8 @@ import { authChooserStyles as styles } from './oxyAuthChooserStyles';
81
82
 
82
83
  /** Diameter of a row avatar. */
83
84
  const ROW_AVATAR_SIZE = 40;
85
+ /** Diameter of the prominent current-account avatar in the collapsed header. */
86
+ const HEADER_AVATAR_SIZE = 48;
84
87
  /** High-contrast QR colors — intentionally fixed (NOT themed) for scan reliability. */
85
88
  const QR_PLATE_BG = '#FFFFFF';
86
89
  const QR_FOREGROUND = '#000000';
@@ -122,7 +125,7 @@ type Theme = ReturnType<typeof useTheme>;
122
125
  type Translate = ReturnType<typeof useI18n>['t'];
123
126
 
124
127
  /**
125
- * The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialog`
128
+ * The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialogScreen`
126
129
  * (wrapped in Bloom's `<Dialog>`) today; mountable bare by any future host that
127
130
  * supplies its own `onComplete`.
128
131
  */
@@ -371,7 +374,24 @@ interface AccountsViewProps {
371
374
  handlers: OxyAuthChooserHandlers;
372
375
  }
373
376
 
377
+ /**
378
+ * The signed-in switcher, in the Google account-menu shape:
379
+ * - COLLAPSED (default): the active account is prominent at the top (avatar +
380
+ * name + email) with a trailing expand chevron, and a "Manage your Oxy
381
+ * account" outline button directly under it. Nothing else.
382
+ * - EXPANDED: the same header + button, then the full account list (current
383
+ * first with a check-circle, every other switchable account, "Add another
384
+ * account", and "Manage accounts on this device").
385
+ *
386
+ * Collapse state is a plain `useState` toggled in the header's press handler —
387
+ * no `useEffect`, no derived-from-props sync. When there is only ONE account
388
+ * (nothing to switch to) the chevron is hidden and the "Add another account" +
389
+ * "Manage accounts on this device" items render inline, so those affordances
390
+ * stay reachable without a pointless expand toggle.
391
+ */
374
392
  const AccountsView: React.FC<AccountsViewProps> = ({ snapshot, theme, t, handlers }) => {
393
+ const [expanded, setExpanded] = useState(false);
394
+
375
395
  if (snapshot.loading && snapshot.accounts.length === 0) {
376
396
  return (
377
397
  <View style={styles.centeredBlock}>
@@ -383,40 +403,140 @@ const AccountsView: React.FC<AccountsViewProps> = ({ snapshot, theme, t, handler
383
403
  );
384
404
  }
385
405
 
406
+ const switchingDisabled = snapshot.switchingAccountId !== null;
407
+ const current = snapshot.accounts.find((account) => account.isCurrent) ?? snapshot.accounts[0];
408
+ const hasOtherAccounts = snapshot.accounts.some(
409
+ (account) => account.accountId !== current?.accountId,
410
+ );
411
+ // Current account first, then the rest — the expanded list order.
412
+ const orderedAccounts = current
413
+ ? [current, ...snapshot.accounts.filter((account) => account.accountId !== current.accountId)]
414
+ : snapshot.accounts;
415
+ // Multi-account: reveal the list only when expanded. Single-account: no expand
416
+ // affordance, so surface add/manage inline.
417
+ const showList = hasOtherAccounts ? expanded : true;
418
+
419
+ const renderAccountItem = (account: SwitchableAccount) => {
420
+ const accent = resolveAccentHex(account.color, theme.colors.primary);
421
+ const isSwitching = snapshot.switchingAccountId === account.accountId;
422
+ return (
423
+ <SettingsListItem
424
+ key={account.accountId}
425
+ icon={
426
+ <View
427
+ style={[styles.avatarRing, { borderColor: account.isCurrent ? accent : 'transparent' }]}
428
+ >
429
+ <Avatar
430
+ source={account.avatarUrl ?? undefined}
431
+ variant="thumb"
432
+ name={account.displayName}
433
+ size={ROW_AVATAR_SIZE}
434
+ />
435
+ </View>
436
+ }
437
+ title={account.displayName}
438
+ description={account.email ?? undefined}
439
+ onPress={() => handlers.onSwitch(account.accountId)}
440
+ disabled={switchingDisabled}
441
+ accessibilityLabel={account.displayName}
442
+ showChevron={false}
443
+ rightElement={
444
+ isSwitching ? (
445
+ <MaterialCommunityIcons name="loading" size={20} color={accent} />
446
+ ) : account.isCurrent ? (
447
+ <MaterialCommunityIcons name="check-circle" size={20} color={accent} />
448
+ ) : undefined
449
+ }
450
+ />
451
+ );
452
+ };
453
+
386
454
  return (
387
455
  <View style={styles.rows}>
388
- {snapshot.accounts.map((account) => (
389
- <AccountRow
390
- key={account.accountId}
391
- account={account}
392
- theme={theme}
393
- switching={snapshot.switchingAccountId === account.accountId}
394
- disabled={snapshot.switchingAccountId !== null}
395
- onPress={() => handlers.onSwitch(account.accountId)}
396
- />
397
- ))}
456
+ {current ? (
457
+ <Pressable
458
+ style={styles.currentAccountRow}
459
+ onPress={hasOtherAccounts ? () => setExpanded((value) => !value) : undefined}
460
+ disabled={hasOtherAccounts ? switchingDisabled : true}
461
+ accessibilityRole={hasOtherAccounts ? 'button' : undefined}
462
+ accessibilityState={hasOtherAccounts ? { expanded } : undefined}
463
+ accessibilityLabel={current.displayName}
464
+ >
465
+ <View
466
+ style={[
467
+ styles.avatarRing,
468
+ { borderColor: resolveAccentHex(current.color, theme.colors.primary) },
469
+ ]}
470
+ >
471
+ <Avatar
472
+ source={current.avatarUrl ?? undefined}
473
+ variant="thumb"
474
+ name={current.displayName}
475
+ size={HEADER_AVATAR_SIZE}
476
+ />
477
+ </View>
478
+ <View style={styles.currentAccountMeta}>
479
+ <Text style={[styles.currentAccountName, { color: theme.colors.text }]} numberOfLines={1}>
480
+ {current.displayName}
481
+ </Text>
482
+ {current.email ? (
483
+ <Text
484
+ style={[styles.currentAccountEmail, { color: theme.colors.textSecondary }]}
485
+ numberOfLines={1}
486
+ >
487
+ {current.email}
488
+ </Text>
489
+ ) : null}
490
+ </View>
491
+ {hasOtherAccounts ? (
492
+ <MaterialCommunityIcons
493
+ name={expanded ? 'chevron-up' : 'chevron-down'}
494
+ size={24}
495
+ color={theme.colors.textSecondary}
496
+ />
497
+ ) : null}
498
+ </Pressable>
499
+ ) : null}
398
500
 
399
- <Pressable
400
- style={[styles.addRow, { borderColor: theme.colors.border }]}
401
- onPress={handlers.onAdd}
402
- accessibilityRole="button"
403
- accessibilityLabel={t('signin.addAccountTitle') || 'Add another account'}
404
- >
405
- <View style={[styles.addBadge, { borderColor: theme.colors.border }]}>
406
- <MaterialCommunityIcons name="plus" size={20} color={theme.colors.textSecondary} />
407
- </View>
408
- <Text style={[styles.rowName, { color: theme.colors.textSecondary }]}>
409
- {t('signin.addAccountTitle') || 'Add another account'}
410
- </Text>
411
- </Pressable>
501
+ <Button variant="outline" onPress={handlers.onManage} style={styles.manageButton}>
502
+ {t('accountMenu.manage') || 'Manage your Oxy account'}
503
+ </Button>
412
504
 
413
- <View style={styles.footerLinks}>
414
- <Pressable onPress={handlers.onManage} accessibilityRole="button">
415
- <Text style={[styles.linkText, { color: theme.colors.primary }]}>
416
- {t('accountMenu.manage') || 'Manage accounts'}
417
- </Text>
418
- </Pressable>
419
- </View>
505
+ {showList ? (
506
+ <SettingsListGroup>
507
+ {hasOtherAccounts ? orderedAccounts.map(renderAccountItem) : null}
508
+
509
+ <SettingsListItem
510
+ icon={
511
+ <View style={[styles.addBadge, { borderColor: theme.colors.border }]}>
512
+ <MaterialCommunityIcons name="plus" size={20} color={theme.colors.textSecondary} />
513
+ </View>
514
+ }
515
+ title={t('signin.addAccountTitle') || 'Add another account'}
516
+ onPress={handlers.onAdd}
517
+ disabled={switchingDisabled}
518
+ accessibilityLabel={t('signin.addAccountTitle') || 'Add another account'}
519
+ showChevron={false}
520
+ />
521
+
522
+ <SettingsListItem
523
+ icon={
524
+ <View style={[styles.addBadge, { borderColor: theme.colors.border }]}>
525
+ <MaterialCommunityIcons
526
+ name="cog-outline"
527
+ size={20}
528
+ color={theme.colors.textSecondary}
529
+ />
530
+ </View>
531
+ }
532
+ title={t('accountSwitcher.manageOnDevice') || 'Manage accounts on this device'}
533
+ onPress={handlers.onManage}
534
+ disabled={switchingDisabled}
535
+ accessibilityLabel={t('accountSwitcher.manageOnDevice') || 'Manage accounts on this device'}
536
+ showChevron={false}
537
+ />
538
+ </SettingsListGroup>
539
+ ) : null}
420
540
  </View>
421
541
  );
422
542
  };
@@ -14,7 +14,7 @@
14
14
  * and behavioral lockstep.
15
15
  *
16
16
  * Theming is `useTheme()` + a `StyleSheet` (the same approach as
17
- * {@link OxyAccountDialog}) so it renders correctly in EVERY consumer, including
17
+ * {@link OxyAccountDialogScreen}) so it renders correctly in EVERY consumer, including
18
18
  * apps that do not use NativeWind. Copy is localized through {@link useI18n}
19
19
  * under the `consent.*` keys.
20
20
  */
@@ -1,4 +1,4 @@
1
- import { lazy, Suspense, useEffect, useRef, useState, type ComponentType, type FC, type ReactNode } from 'react';
1
+ import { useEffect, useRef, useState, type FC, type ReactNode } from 'react';
2
2
  import { AppState, Platform, StyleSheet, View } from 'react-native';
3
3
  import { GestureHandlerRootView } from 'react-native-gesture-handler';
4
4
  import { SafeAreaProvider } from 'react-native-safe-area-context';
@@ -6,6 +6,7 @@ import type { OxyProviderProps } from '../types/navigation';
6
6
  import { OxyContextProvider, type OxyContextProviderProps } from '../context/OxyContext';
7
7
  import { QueryClientProvider, focusManager, onlineManager } from '@tanstack/react-query';
8
8
  import { BloomDialogProvider } from '@oxyhq/bloom';
9
+ import { SurfaceProvider } from '@oxyhq/bloom/surfaces';
9
10
  import { ToastOutlet } from '@oxyhq/bloom/toast';
10
11
  import { logger as loggerUtil } from '@oxyhq/core';
11
12
  import { RequireOxyAuth } from './RequireOxyAuth';
@@ -49,35 +50,14 @@ const isWeb = Platform.OS === 'web';
49
50
  // static analyzer cannot trace this into the web bundle. Native-only.
50
51
  const KEYBOARD_CONTROLLER_MODULE = 'react-native-keyboard-controller';
51
52
 
52
- // Lazy-load optional components (avoids require() for ESM compatibility).
53
- // The .then() extracts + casts the default export so that `lazy()` sees
54
- // `Promise<{ default: ComponentType }>` instead of the full module namespace.
55
- const LazyBottomSheetRouter = lazy((): Promise<{ default: ComponentType }> =>
56
- import('./BottomSheetRouter').then(
57
- (mod) => ({ default: mod.default as unknown as ComponentType }),
58
- (error) => {
59
- if (__DEV__) {
60
- loggerUtil.error('Failed to load BottomSheetRouter', error instanceof Error ? error : new Error(String(error)), { component: 'OxyProvider' });
61
- }
62
- return { default: (() => null) as FC };
63
- },
64
- ),
65
- );
66
-
67
- const LazyOxyAccountDialog = lazy((): Promise<{ default: ComponentType }> =>
68
- import('./OxyAccountDialog').then(
69
- (mod) => ({ default: mod.default as unknown as ComponentType }),
70
- () => ({ default: (() => null) as FC }),
71
- ),
72
- );
73
-
74
53
  /**
75
54
  * OxyProvider - Universal provider for Expo apps (native + web)
76
55
  *
77
56
  * Provides authentication, session management, query client, and UI overlays.
78
57
  * Wraps its own overlay stack in SafeAreaProvider and GestureHandlerRootView so
79
- * BottomSheetRouter and OxyAccountDialog can safely render even when a consuming
80
- * app has not mounted those providers yet.
58
+ * the shared Bloom SURFACE STACK (`<SurfaceProvider>` / `<SurfaceHost>`) which
59
+ * hosts every SDK surface (the ~35 bottom-sheet routes + the AccountDialog) — can
60
+ * safely render even when a consuming app has not mounted those providers yet.
81
61
  *
82
62
  * Usage:
83
63
  * ```tsx
@@ -316,15 +296,13 @@ const OxyProvider: FC<OxyProviderProps> = ({
316
296
  hubSync={hubSync}
317
297
  onAuthStateChange={onAuthStateChange as OxyContextProviderProps['onAuthStateChange']}
318
298
  >
319
- {requireAuth === 'off' ? (
320
- children
321
- ) : (
322
- <RequireOxyAuth prompt={requireAuth}>{children}</RequireOxyAuth>
323
- )}
324
- <Suspense fallback={null}>
325
- <LazyBottomSheetRouter />
326
- <LazyOxyAccountDialog />
327
- </Suspense>
299
+ <SurfaceProvider>
300
+ {requireAuth === 'off' ? (
301
+ children
302
+ ) : (
303
+ <RequireOxyAuth prompt={requireAuth}>{children}</RequireOxyAuth>
304
+ )}
305
+ </SurfaceProvider>
328
306
  <ToastOutlet />
329
307
  </OxyContextProvider>
330
308
  </BloomDialogProvider>
@@ -65,7 +65,7 @@ export interface ProfileButtonProps {
65
65
  onNavigateProfile?: () => void;
66
66
  /**
67
67
  * Retained for source compatibility. The trigger now opens the unified
68
- * `OxyAccountDialog` (a centered / bottom-sheet modal) rather than an
68
+ * `OxyAccountDialogScreen` (a centered / bottom-sheet modal) rather than an
69
69
  * anchored popover, so popover placement no longer applies.
70
70
  */
71
71
  placement?: 'up' | 'down' | 'auto';
@@ -82,7 +82,7 @@ export interface ProfileButtonProps {
82
82
  /**
83
83
  * Self-contained sidebar account trigger, modeled on Bluesky's ProfileCard and
84
84
  * the Oxy inbox's `MailboxDrawer` footer. Pressing it opens the unified
85
- * {@link OxyAccountDialog} — the single account switcher + sign-in surface — via
85
+ * {@link OxyAccountDialogScreen} — the single account switcher + sign-in surface — via
86
86
  * `useOxy().openAccountDialog`.
87
87
  *
88
88
  * Three auth states from {@link useAuth}:
@@ -15,7 +15,7 @@
15
15
  * neutral loading state so the signed-out wall never flashes before the
16
16
  * device-first cold boot concludes (the documented cold-boot race).
17
17
  *
18
- * Styling follows the sibling `OxyAccountDialog`/`OxySignInButton` pattern —
18
+ * Styling follows the sibling `OxyAccountDialogScreen`/`OxySignInButton` pattern —
19
19
  * `useTheme()` + `StyleSheet` (NOT NativeWind), so the gate renders correctly in
20
20
  * EVERY consumer, including apps that do not run NativeWind (e.g. the accounts
21
21
  * app).