@oxyhq/services 22.9.0 → 22.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (428) hide show
  1. package/lib/commonjs/index.js +24 -5
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/ui/components/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +25 -125
  4. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -0
  5. package/lib/commonjs/ui/components/OxyAuthChooser.js +137 -40
  6. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  7. package/lib/commonjs/ui/components/OxyConsentScreen.js +1 -1
  8. package/lib/commonjs/ui/components/ProfileButton.js +1 -1
  9. package/lib/commonjs/ui/components/RequireOxyAuth.js +1 -1
  10. package/lib/commonjs/ui/components/SurfaceHeaderAction.js +63 -0
  11. package/lib/commonjs/ui/components/SurfaceHeaderAction.js.map +1 -0
  12. package/lib/commonjs/ui/components/SurfaceScreen.js +52 -5
  13. package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -1
  14. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +46 -29
  15. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  16. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +47 -23
  17. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
  18. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js +22 -12
  19. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -1
  20. package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js +83 -0
  21. package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
  22. package/lib/commonjs/ui/context/OxyContext.js +23 -9
  23. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  24. package/lib/commonjs/ui/hooks/useAvatarPicker.js +34 -39
  25. package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
  26. package/lib/commonjs/ui/hooks/useSurfaceHeader.js +46 -0
  27. package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -0
  28. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +1 -1
  29. package/lib/commonjs/ui/navigation/accountDialogManager.js +14 -2
  30. package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
  31. package/lib/commonjs/ui/navigation/routes.js +3 -3
  32. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  33. package/lib/commonjs/ui/navigation/surfaceBackBridge.js +68 -0
  34. package/lib/commonjs/ui/navigation/surfaceBackBridge.js.map +1 -0
  35. package/lib/commonjs/ui/navigation/surfaceRegistry.js +52 -8
  36. package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -1
  37. package/lib/commonjs/ui/navigation/surfaces.js +42 -5
  38. package/lib/commonjs/ui/navigation/surfaces.js.map +1 -1
  39. package/lib/commonjs/ui/screens/AccountMembersScreen.js +214 -283
  40. package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
  41. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +88 -118
  42. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  43. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +22 -36
  44. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  45. package/lib/commonjs/ui/screens/AppInfoScreen.js +219 -226
  46. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/AvatarCropScreen.js +10 -14
  48. package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +24 -39
  50. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/CreateAccountScreen.js +136 -158
  52. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +29 -36
  54. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/EditProfileScreen.js +101 -109
  56. package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/FAQScreen.js +10 -15
  58. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
  59. package/lib/commonjs/ui/screens/FeedbackScreen.js +8 -16
  60. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  61. package/lib/commonjs/ui/screens/FileManagementScreen.js +219 -206
  62. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  63. package/lib/commonjs/ui/screens/HelpSupportScreen.js +62 -69
  64. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  65. package/lib/commonjs/ui/screens/HistoryViewScreen.js +63 -79
  66. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  67. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +69 -98
  68. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  69. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +8 -14
  70. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  71. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +77 -94
  72. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  73. package/lib/commonjs/ui/screens/ManageAccountScreen.js +99 -134
  74. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  75. package/lib/commonjs/ui/screens/NotificationsScreen.js +69 -76
  76. package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
  77. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -8
  78. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  79. package/lib/commonjs/ui/screens/PreferencesScreen.js +67 -74
  80. package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
  81. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +55 -91
  82. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  83. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +291 -304
  84. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  85. package/lib/commonjs/ui/screens/ProfileScreen.js +100 -114
  86. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  87. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +38 -45
  88. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  89. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +44 -57
  90. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  91. package/lib/commonjs/ui/screens/UserLinksScreen.js +24 -31
  92. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
  93. package/lib/commonjs/ui/screens/UserListScreen.js +14 -24
  94. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  95. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
  96. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +66 -75
  97. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  98. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +111 -139
  99. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  100. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +13 -20
  101. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  102. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +14 -27
  103. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  104. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +68 -85
  105. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  106. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +28 -36
  107. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  108. package/lib/module/index.js +12 -5
  109. package/lib/module/index.js.map +1 -1
  110. package/lib/module/ui/components/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +27 -127
  111. package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -0
  112. package/lib/module/ui/components/OxyAuthChooser.js +137 -40
  113. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  114. package/lib/module/ui/components/OxyConsentScreen.js +1 -1
  115. package/lib/module/ui/components/ProfileButton.js +1 -1
  116. package/lib/module/ui/components/RequireOxyAuth.js +1 -1
  117. package/lib/module/ui/components/SurfaceHeaderAction.js +58 -0
  118. package/lib/module/ui/components/SurfaceHeaderAction.js.map +1 -0
  119. package/lib/module/ui/components/SurfaceScreen.js +53 -6
  120. package/lib/module/ui/components/SurfaceScreen.js.map +1 -1
  121. package/lib/module/ui/components/fileManagement/FileDetailsModal.js +46 -29
  122. package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  123. package/lib/module/ui/components/modals/DeleteAccountModal.js +46 -23
  124. package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
  125. package/lib/module/ui/components/oxyAuthChooserStyles.js +22 -12
  126. package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -1
  127. package/lib/module/ui/components/surfaces/ActionSheetSurface.js +78 -0
  128. package/lib/module/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
  129. package/lib/module/ui/context/OxyContext.js +23 -9
  130. package/lib/module/ui/context/OxyContext.js.map +1 -1
  131. package/lib/module/ui/hooks/useAvatarPicker.js +34 -39
  132. package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
  133. package/lib/module/ui/hooks/useSurfaceHeader.js +42 -0
  134. package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -0
  135. package/lib/module/ui/hooks/useSwitchableAccounts.js +1 -1
  136. package/lib/module/ui/navigation/accountDialogManager.js +14 -2
  137. package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
  138. package/lib/module/ui/navigation/routes.js +3 -3
  139. package/lib/module/ui/navigation/routes.js.map +1 -1
  140. package/lib/module/ui/navigation/surfaceBackBridge.js +63 -0
  141. package/lib/module/ui/navigation/surfaceBackBridge.js.map +1 -0
  142. package/lib/module/ui/navigation/surfaceRegistry.js +52 -8
  143. package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -1
  144. package/lib/module/ui/navigation/surfaces.js +42 -5
  145. package/lib/module/ui/navigation/surfaces.js.map +1 -1
  146. package/lib/module/ui/screens/AccountMembersScreen.js +218 -286
  147. package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
  148. package/lib/module/ui/screens/AccountSettingsScreen.js +92 -121
  149. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  150. package/lib/module/ui/screens/AccountVerificationScreen.js +25 -38
  151. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  152. package/lib/module/ui/screens/AppInfoScreen.js +220 -227
  153. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  154. package/lib/module/ui/screens/AvatarCropScreen.js +10 -14
  155. package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
  156. package/lib/module/ui/screens/ConnectedAppsScreen.js +26 -40
  157. package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
  158. package/lib/module/ui/screens/CreateAccountScreen.js +139 -160
  159. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  160. package/lib/module/ui/screens/EditProfileFieldScreen.js +32 -38
  161. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  162. package/lib/module/ui/screens/EditProfileScreen.js +102 -110
  163. package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
  164. package/lib/module/ui/screens/FAQScreen.js +11 -15
  165. package/lib/module/ui/screens/FAQScreen.js.map +1 -1
  166. package/lib/module/ui/screens/FeedbackScreen.js +10 -17
  167. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  168. package/lib/module/ui/screens/FileManagementScreen.js +222 -208
  169. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  170. package/lib/module/ui/screens/HelpSupportScreen.js +64 -70
  171. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  172. package/lib/module/ui/screens/HistoryViewScreen.js +65 -81
  173. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  174. package/lib/module/ui/screens/LanguageSelectorScreen.js +71 -99
  175. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  176. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +10 -15
  177. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  178. package/lib/module/ui/screens/LegalDocumentsScreen.js +78 -94
  179. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  180. package/lib/module/ui/screens/ManageAccountScreen.js +102 -137
  181. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  182. package/lib/module/ui/screens/NotificationsScreen.js +71 -77
  183. package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
  184. package/lib/module/ui/screens/PaymentGatewayScreen.js +4 -9
  185. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  186. package/lib/module/ui/screens/PreferencesScreen.js +69 -75
  187. package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
  188. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +58 -93
  189. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  190. package/lib/module/ui/screens/PrivacySettingsScreen.js +293 -305
  191. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  192. package/lib/module/ui/screens/ProfileScreen.js +102 -116
  193. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  194. package/lib/module/ui/screens/SavesCollectionsScreen.js +40 -46
  195. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  196. package/lib/module/ui/screens/SearchSettingsScreen.js +46 -58
  197. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  198. package/lib/module/ui/screens/UserLinksScreen.js +26 -32
  199. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
  200. package/lib/module/ui/screens/UserListScreen.js +14 -24
  201. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  202. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
  203. package/lib/module/ui/screens/trust/TrustAboutScreen.js +67 -75
  204. package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  205. package/lib/module/ui/screens/trust/TrustCenterScreen.js +112 -139
  206. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  207. package/lib/module/ui/screens/trust/TrustFAQScreen.js +15 -21
  208. package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  209. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +14 -26
  210. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  211. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +69 -85
  212. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  213. package/lib/module/ui/screens/trust/TrustRulesScreen.js +30 -37
  214. package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  215. package/lib/typescript/commonjs/index.d.ts +2 -0
  216. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  217. package/lib/typescript/commonjs/ui/components/{OxyAccountDialog.d.ts → OxyAccountDialogScreen.d.ts} +4 -4
  218. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
  219. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +3 -3
  220. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  221. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +2 -2
  222. package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts +1 -1
  223. package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts +16 -0
  224. package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
  225. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts +4 -2
  226. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -1
  227. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
  228. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  229. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +17 -2
  230. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  231. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts +19 -9
  232. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
  234. package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
  235. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  236. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +7 -11
  237. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  238. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +31 -0
  239. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
  240. package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +1 -1
  241. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +14 -2
  242. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts +16 -0
  244. package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
  245. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +31 -13
  246. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -1
  248. package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  249. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  251. package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts +0 -4
  253. package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  255. package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  257. package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
  259. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  263. package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  264. package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
  267. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  268. package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -1
  269. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
  271. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  272. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  273. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  274. package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  275. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  276. package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
  277. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
  278. package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  280. package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  282. package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  283. package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  284. package/lib/typescript/commonjs/ui/types/navigation.d.ts +8 -0
  285. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  286. package/lib/typescript/module/index.d.ts +2 -0
  287. package/lib/typescript/module/index.d.ts.map +1 -1
  288. package/lib/typescript/module/ui/components/{OxyAccountDialog.d.ts → OxyAccountDialogScreen.d.ts} +4 -4
  289. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
  290. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +3 -3
  291. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  292. package/lib/typescript/module/ui/components/ProfileButton.d.ts +2 -2
  293. package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts +1 -1
  294. package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts +16 -0
  295. package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
  296. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts +4 -2
  297. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -1
  298. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
  299. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  300. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +17 -2
  301. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  302. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts +19 -9
  303. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
  304. package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
  305. package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
  306. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  307. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +7 -11
  308. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  309. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +31 -0
  310. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
  311. package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +1 -1
  312. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +14 -2
  313. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
  314. package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts +16 -0
  315. package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
  316. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +31 -13
  317. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -1
  318. package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -1
  319. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  320. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  321. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  322. package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
  323. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +0 -4
  324. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  325. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  326. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  327. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  328. package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
  329. package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
  330. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  331. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  332. package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  333. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  334. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  335. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  336. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  337. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
  338. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  339. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
  340. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  341. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
  342. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  343. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  344. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  345. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  346. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  347. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
  348. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  349. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  350. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  351. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  352. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  353. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  354. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  355. package/lib/typescript/module/ui/types/navigation.d.ts +8 -0
  356. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  357. package/package.json +2 -2
  358. package/src/index.ts +12 -5
  359. package/src/ui/components/{OxyAccountDialog.tsx → OxyAccountDialogScreen.tsx} +21 -110
  360. package/src/ui/components/OxyAuthChooser.tsx +153 -33
  361. package/src/ui/components/OxyConsentScreen.tsx +1 -1
  362. package/src/ui/components/ProfileButton.tsx +2 -2
  363. package/src/ui/components/RequireOxyAuth.tsx +1 -1
  364. package/src/ui/components/SurfaceHeaderAction.tsx +60 -0
  365. package/src/ui/components/SurfaceScreen.tsx +66 -6
  366. package/src/ui/components/fileManagement/FileDetailsModal.tsx +50 -36
  367. package/src/ui/components/modals/DeleteAccountModal.tsx +47 -26
  368. package/src/ui/components/oxyAuthChooserStyles.ts +22 -12
  369. package/src/ui/components/surfaces/ActionSheetSurface.tsx +98 -0
  370. package/src/ui/context/OxyContext.tsx +22 -8
  371. package/src/ui/hooks/useAvatarPicker.ts +53 -66
  372. package/src/ui/hooks/useSurfaceHeader.ts +56 -0
  373. package/src/ui/hooks/useSwitchableAccounts.ts +1 -1
  374. package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +68 -0
  375. package/src/ui/navigation/accountDialogManager.ts +14 -2
  376. package/src/ui/navigation/routes.ts +3 -3
  377. package/src/ui/navigation/surfaceBackBridge.ts +69 -0
  378. package/src/ui/navigation/surfaceRegistry.ts +80 -14
  379. package/src/ui/navigation/surfaces.ts +33 -5
  380. package/src/ui/screens/AccountMembersScreen.tsx +39 -100
  381. package/src/ui/screens/AccountSettingsScreen.tsx +32 -54
  382. package/src/ui/screens/AccountVerificationScreen.tsx +23 -51
  383. package/src/ui/screens/AppInfoScreen.tsx +6 -13
  384. package/src/ui/screens/AvatarCropScreen.tsx +8 -17
  385. package/src/ui/screens/ConnectedAppsScreen.tsx +39 -60
  386. package/src/ui/screens/CreateAccountScreen.tsx +13 -39
  387. package/src/ui/screens/EditProfileFieldScreen.tsx +30 -48
  388. package/src/ui/screens/EditProfileScreen.tsx +7 -16
  389. package/src/ui/screens/FAQScreen.tsx +9 -13
  390. package/src/ui/screens/FeedbackScreen.tsx +8 -22
  391. package/src/ui/screens/FileManagementScreen.tsx +191 -188
  392. package/src/ui/screens/HelpSupportScreen.tsx +7 -13
  393. package/src/ui/screens/HistoryViewScreen.tsx +26 -31
  394. package/src/ui/screens/LanguageSelectorScreen.tsx +12 -46
  395. package/src/ui/screens/LearnMoreUsernamesScreen.tsx +8 -16
  396. package/src/ui/screens/LegalDocumentsScreen.tsx +7 -22
  397. package/src/ui/screens/ManageAccountScreen.tsx +96 -165
  398. package/src/ui/screens/NotificationsScreen.tsx +7 -13
  399. package/src/ui/screens/PaymentGatewayScreen.tsx +3 -10
  400. package/src/ui/screens/PreferencesScreen.tsx +7 -13
  401. package/src/ui/screens/PremiumSubscriptionScreen.tsx +52 -90
  402. package/src/ui/screens/PrivacySettingsScreen.tsx +9 -21
  403. package/src/ui/screens/ProfileScreen.tsx +9 -11
  404. package/src/ui/screens/SavesCollectionsScreen.tsx +7 -13
  405. package/src/ui/screens/SearchSettingsScreen.tsx +9 -21
  406. package/src/ui/screens/UserLinksScreen.tsx +7 -14
  407. package/src/ui/screens/UserListScreen.tsx +2 -5
  408. package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +1 -1
  409. package/src/ui/screens/trust/TrustAboutScreen.tsx +10 -17
  410. package/src/ui/screens/trust/TrustCenterScreen.tsx +9 -28
  411. package/src/ui/screens/trust/TrustFAQScreen.tsx +15 -18
  412. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +3 -5
  413. package/src/ui/screens/trust/TrustRewardsScreen.tsx +11 -26
  414. package/src/ui/screens/trust/TrustRulesScreen.tsx +10 -13
  415. package/src/ui/types/navigation.ts +8 -0
  416. package/lib/commonjs/ui/components/Header.js +0 -305
  417. package/lib/commonjs/ui/components/Header.js.map +0 -1
  418. package/lib/commonjs/ui/components/OxyAccountDialog.js.map +0 -1
  419. package/lib/module/ui/components/Header.js +0 -299
  420. package/lib/module/ui/components/Header.js.map +0 -1
  421. package/lib/module/ui/components/OxyAccountDialog.js.map +0 -1
  422. package/lib/typescript/commonjs/ui/components/Header.d.ts +0 -33
  423. package/lib/typescript/commonjs/ui/components/Header.d.ts.map +0 -1
  424. package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +0 -1
  425. package/lib/typescript/module/ui/components/Header.d.ts +0 -33
  426. package/lib/typescript/module/ui/components/Header.d.ts.map +0 -1
  427. package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +0 -1
  428. package/src/ui/components/Header.tsx +0 -224
@@ -141,6 +141,12 @@ Object.defineProperty(exports, "RequireOxyAuth", {
141
141
  return _RequireOxyAuth.RequireOxyAuth;
142
142
  }
143
143
  });
144
+ Object.defineProperty(exports, "SurfaceHeaderAction", {
145
+ enumerable: true,
146
+ get: function () {
147
+ return _SurfaceHeaderAction.SurfaceHeaderAction;
148
+ }
149
+ });
144
150
  Object.defineProperty(exports, "closeAccountDialog", {
145
151
  enumerable: true,
146
152
  get: function () {
@@ -537,6 +543,12 @@ Object.defineProperty(exports, "useStorage", {
537
543
  return _useStorage.useStorage;
538
544
  }
539
545
  });
546
+ Object.defineProperty(exports, "useSurfaceHeader", {
547
+ enumerable: true,
548
+ get: function () {
549
+ return _useSurfaceHeader.useSurfaceHeader;
550
+ }
551
+ });
540
552
  Object.defineProperty(exports, "useSwitchSession", {
541
553
  enumerable: true,
542
554
  get: function () {
@@ -713,6 +725,8 @@ var _CreateAccountScreen = _interopRequireDefault(require("./ui/screens/CreateAc
713
725
  var _AccountMembersScreen = _interopRequireDefault(require("./ui/screens/AccountMembersScreen.js"));
714
726
  var _AccountSettingsScreen = _interopRequireDefault(require("./ui/screens/AccountSettingsScreen.js"));
715
727
  var _bottomSheetManager = require("./ui/navigation/bottomSheetManager.js");
728
+ var _useSurfaceHeader = require("./ui/hooks/useSurfaceHeader.js");
729
+ var _SurfaceHeaderAction = require("./ui/components/SurfaceHeaderAction.js");
716
730
  var _accountDialogManager = require("./ui/navigation/accountDialogManager.js");
717
731
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
718
732
  /**
@@ -805,13 +819,14 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
805
819
  // wall before the device-first cold boot resolves. Opens the ONE account dialog.
806
820
 
807
821
  // Sidebar account trigger. Pressing `ProfileButton` opens the unified
808
- // `OxyAccountDialog` (the single account switcher + sign-in surface) via
822
+ // `OxyAccountDialogScreen` (the single account switcher + sign-in surface) via
809
823
  // `useOxy().openAccountDialog`.
810
824
 
811
- // The account switcher/sign-in/sign-up chooser WITHOUT dialog chrome —
812
- // `OxyAccountDialog` wraps this in Bloom's `<Dialog>` for the normal in-app
813
- // surface; exported directly so a bare host (e.g. a future auth.oxy.so hub
814
- // page) can mount the exact same chooser with its own completion strategy.
825
+ // The account switcher/sign-in/sign-up chooser WITHOUT dialog chrome — the
826
+ // surface stack presents `OxyAccountDialogScreen` (which renders this) into
827
+ // Bloom's `<Dialog>` for the normal in-app surface; exported directly so a bare
828
+ // host (e.g. a future auth.oxy.so hub page) can mount the exact same chooser
829
+ // with its own completion strategy.
815
830
 
816
831
  // Unified switchable-accounts hook — the single source of everything the user
817
832
  // can switch into: device sign-ins AND linked graph accounts (owned orgs +
@@ -828,6 +843,10 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
828
843
  // Bottom-sheet navigation
829
844
  // ---------------------------------------------------------------------------
830
845
 
846
+ // Surface nav header — a surface screen declares its title/subtitle (+ any
847
+ // action slot) into the Dialog's OWN navigation header. Screens render no header
848
+ // of their own.
849
+
831
850
  // ---------------------------------------------------------------------------
832
851
  // Unified account dialog — imperative entry points
833
852
  // ---------------------------------------------------------------------------
@@ -1 +1 @@
1
- {"version":3,"names":["_core","require","_reactNative","_OxyProvider","_interopRequireDefault","_OxyContext","_useAuth","_FontLoader","_authStore","_accountStore","_assetStore","_useAssets","_useFileDownloadUrl","_useFollow","_useStorage","_useAccountQueries","_useServicesQueries","_useSecurityQueries","_useAuthMethods","_usePaymentQueries","_useAccountMutations","_useServicesMutations","_mutationFactory","_mutationKeys","_queryKeys","_userCache","_useMutationStatus","_useOnlineStatus","_useOxyEvent","_errorHandlers","_useFileFiltering","_OxySignInButton","_OxyAuthPrompt","_OxyOAuthCallback","_OxyConsentScreen","_RequireOxyAuth","_FollowButton","_OxyPayButton","_LogoIcon","_LogoText","_ProfileButton","_OxyAuthChooser","_useSwitchableAccounts","_ProfileScreen","_ManageAccountScreen","_NotificationsScreen","_PreferencesScreen","_ConnectedAppsScreen","_CreateAccountScreen","_AccountMembersScreen","_AccountSettingsScreen","_bottomSheetManager","_accountDialogManager","e","__esModule","default","setPlatformOS","Platform","OS"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,GAAA3C,sBAAA,CAAAH,OAAA;AAGA,IAAA+C,oBAAA,GAAA5C,sBAAA,CAAAH,OAAA;AACA,IAAAgD,qBAAA,GAAA7C,sBAAA,CAAAH,OAAA;AACA,IAAAiD,sBAAA,GAAA9C,sBAAA,CAAAH,OAAA;AAKA,IAAAkD,mBAAA,GAAAlD,OAAA;AAOA,IAAAmD,qBAAA,GAAAnD,OAAA;AAI8C,SAAAG,uBAAAiD,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA7R9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAIA,IAAAG,mBAAa,EAACC,qBAAQ,CAACC,EAAgB,CAAC;;AAExC;AACA;AACA;;AAOA;AACA;AACA;;AAGA;AACA;AACA;;AAgBA;AACA;AACA;;AAOA;AACA;AACA;;AAgCA;;AAeA;AACA;AACA;;AA2BA;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;;AAIA;;AAMA;AACA;AACA;;AASA;AACA;AACA;;AAIA;AACA;AACA;;AAkBA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;;AAIA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;;AAIA;;AAOA;;AAKA;AACA;AACA;;AAIA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["_core","require","_reactNative","_OxyProvider","_interopRequireDefault","_OxyContext","_useAuth","_FontLoader","_authStore","_accountStore","_assetStore","_useAssets","_useFileDownloadUrl","_useFollow","_useStorage","_useAccountQueries","_useServicesQueries","_useSecurityQueries","_useAuthMethods","_usePaymentQueries","_useAccountMutations","_useServicesMutations","_mutationFactory","_mutationKeys","_queryKeys","_userCache","_useMutationStatus","_useOnlineStatus","_useOxyEvent","_errorHandlers","_useFileFiltering","_OxySignInButton","_OxyAuthPrompt","_OxyOAuthCallback","_OxyConsentScreen","_RequireOxyAuth","_FollowButton","_OxyPayButton","_LogoIcon","_LogoText","_ProfileButton","_OxyAuthChooser","_useSwitchableAccounts","_ProfileScreen","_ManageAccountScreen","_NotificationsScreen","_PreferencesScreen","_ConnectedAppsScreen","_CreateAccountScreen","_AccountMembersScreen","_AccountSettingsScreen","_bottomSheetManager","_useSurfaceHeader","_SurfaceHeaderAction","_accountDialogManager","e","__esModule","default","setPlatformOS","Platform","OS"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD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ACA;;AAIA;AACA;AACA;;AAkBA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;;AAIA;;AAOA;;AAKA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;AACA","ignoreList":[]}
@@ -6,17 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _react = require("react");
8
8
  var _reactNative = require("react-native");
9
- var _vectorIcons = require("@expo/vector-icons");
10
- var _typography = require("@oxyhq/bloom/typography");
11
- var _theme = require("@oxyhq/bloom/theme");
12
9
  var _OxyContext = require("../context/OxyContext.js");
13
10
  var _useI18n = require("../hooks/useI18n.js");
11
+ var _useSurfaceHeader = require("../hooks/useSurfaceHeader.js");
14
12
  var _OxyAuthChooser = _interopRequireDefault(require("./OxyAuthChooser.js"));
15
- var _LogoIcon = require("./logo/LogoIcon.js");
16
13
  var _jsxRuntime = require("react/jsx-runtime");
17
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
15
  /**
19
- * OxyAccountDialog — the ONE unified account dialog BODY for `@oxyhq/services`.
16
+ * OxyAccountDialogScreen — the ONE unified account dialog BODY for `@oxyhq/services`.
20
17
  *
21
18
  * The header (title/subtitle per view + back button) around the headless chooser
22
19
  * logic, which lives in `OxyAuthChooser` — the account switcher, sign-in,
@@ -51,12 +48,11 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
51
48
  * `@oxyhq/core`. Closing routes through `useOxy().closeAccountDialog`, which
52
49
  * dismisses the surface and runs its exit animation.
53
50
  */
54
- const OxyAccountDialog = () => {
51
+ const OxyAccountDialogScreen = () => {
55
52
  const {
56
53
  accountDialogController: controller,
57
54
  closeAccountDialog
58
55
  } = (0, _OxyContext.useOxy)();
59
- const theme = (0, _theme.useTheme)();
60
56
  const {
61
57
  t
62
58
  } = (0, _useI18n.useI18n)();
@@ -67,95 +63,33 @@ const OxyAccountDialog = () => {
67
63
  const subscribe = (0, _react.useCallback)(listener => controller ? controller.subscribe(listener) : () => undefined, [controller]);
68
64
  const getSnapshot = (0, _react.useCallback)(() => controller ? controller.getSnapshot() : EMPTY_SNAPSHOT, [controller]);
69
65
  const snapshot = (0, _react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
70
- if (!controller) {
71
- return null;
72
- }
73
66
  const {
74
67
  view
75
68
  } = snapshot;
76
69
  const showBack = view === 'qr' || view === 'signup' || view === 'add' && snapshot.accounts.length > 0;
77
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
78
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(DialogHeader, {
79
- snapshot: snapshot,
80
- theme: theme,
81
- t: t,
82
- showBack: showBack,
83
- onBack: () => controller.setView('accounts'),
84
- onClose: closeAccountDialog
85
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
86
- style: styles.body,
87
- contentContainerStyle: styles.bodyContent,
88
- showsVerticalScrollIndicator: false,
89
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthChooser.default, {
90
- onComplete: closeAccountDialog
91
- })
92
- })]
93
- });
94
- };
95
-
96
- // ---------------------------------------------------------------------------
97
- // Header
98
- // ---------------------------------------------------------------------------
99
-
100
- const DialogHeader = ({
101
- snapshot,
102
- theme,
103
- t,
104
- showBack,
105
- onBack,
106
- onClose
107
- }) => {
70
+ const goToAccounts = (0, _react.useCallback)(() => controller?.setView('accounts'), [controller]);
108
71
  const {
109
72
  title,
110
73
  subtitle
111
- } = headerCopy(snapshot.view, snapshot.accounts.length, t);
112
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
113
- style: styles.header,
114
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
115
- style: styles.headerBar,
116
- children: [showBack ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
117
- onPress: onBack,
118
- style: [styles.iconButton, {
119
- backgroundColor: theme.colors.backgroundSecondary
120
- }],
121
- accessibilityRole: "button",
122
- accessibilityLabel: t('common.actions.back') || 'Back',
123
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
124
- name: "chevron-left",
125
- size: 22,
126
- color: theme.colors.textSecondary
127
- })
128
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
129
- style: styles.iconButton
130
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoIcon.LogoIcon, {
131
- height: 34,
132
- color: theme.colors.primary
133
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
134
- onPress: onClose,
135
- style: [styles.iconButton, {
136
- backgroundColor: theme.colors.backgroundSecondary
137
- }],
138
- accessibilityRole: "button",
139
- accessibilityLabel: t('common.actions.close') || 'Close',
140
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
141
- name: "close",
142
- size: 20,
143
- color: theme.colors.textSecondary
144
- })
145
- })]
146
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
147
- style: [styles.title, {
148
- color: theme.colors.text
149
- }],
150
- numberOfLines: 1,
151
- children: title
152
- }), subtitle ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
153
- style: [styles.subtitle, {
154
- color: theme.colors.textSecondary
155
- }],
156
- numberOfLines: 2,
157
- children: subtitle
158
- }) : null]
74
+ } = headerCopy(view, snapshot.accounts.length, t);
75
+
76
+ // The account dialog uses the SHARED Dialog nav header like every other screen
77
+ // (the base): the large in-content title/subtitle that collapses into the nav
78
+ // bar on scroll (default `largeTitle`), its per-view copy, and a per-view back
79
+ // that returns to the account list (the Dialog renders the frosted back/close).
80
+ (0, _useSurfaceHeader.useSurfaceHeader)({
81
+ title,
82
+ subtitle: subtitle ?? undefined,
83
+ onBack: showBack ? goToAccounts : undefined
84
+ });
85
+ if (!controller) {
86
+ return null;
87
+ }
88
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
89
+ style: styles.bodyContent,
90
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthChooser.default, {
91
+ onComplete: closeAccountDialog
92
+ })
159
93
  });
160
94
  };
161
95
 
@@ -207,44 +141,10 @@ const EMPTY_SNAPSHOT = {
207
141
  commonsAvailability: 'unknown'
208
142
  };
209
143
  const styles = _reactNative.StyleSheet.create({
210
- header: {
211
- alignItems: 'center',
212
- marginBottom: 12
213
- },
214
- headerBar: {
215
- width: '100%',
216
- flexDirection: 'row',
217
- alignItems: 'center',
218
- justifyContent: 'space-between',
219
- marginBottom: 8
220
- },
221
- iconButton: {
222
- width: 32,
223
- height: 32,
224
- borderRadius: 16,
225
- alignItems: 'center',
226
- justifyContent: 'center'
227
- },
228
- title: {
229
- fontSize: 22,
230
- fontWeight: '800',
231
- letterSpacing: -0.4,
232
- textAlign: 'center',
233
- marginTop: 6
234
- },
235
- subtitle: {
236
- fontSize: 14,
237
- lineHeight: 19,
238
- textAlign: 'center',
239
- marginTop: 4
240
- },
241
- body: {
242
- width: '100%'
243
- },
244
144
  bodyContent: {
245
145
  paddingTop: 4,
246
146
  paddingBottom: 4
247
147
  }
248
148
  });
249
- var _default = exports.default = OxyAccountDialog;
250
- //# sourceMappingURL=OxyAccountDialog.js.map
149
+ var _default = exports.default = OxyAccountDialogScreen;
150
+ //# sourceMappingURL=OxyAccountDialogScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_OxyContext","_useI18n","_useSurfaceHeader","_OxyAuthChooser","_interopRequireDefault","_jsxRuntime","e","__esModule","default","OxyAccountDialogScreen","accountDialogController","controller","closeAccountDialog","useOxy","t","useI18n","subscribe","useCallback","listener","undefined","getSnapshot","EMPTY_SNAPSHOT","snapshot","useSyncExternalStore","view","showBack","accounts","length","goToAccounts","setView","title","subtitle","headerCopy","useSurfaceHeader","onBack","jsx","View","style","styles","bodyContent","children","onComplete","accountCount","activeAccountId","loading","error","switchingAccountId","signIn","phase","authorizeCode","qrPayload","expiresAt","commonsAvailability","StyleSheet","create","paddingTop","paddingBottom","_default","exports"],"sourceRoot":"../../../../src","sources":["ui/components/OxyAccountDialogScreen.tsx"],"mappings":";;;;;;AAwBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAC,sBAAA,CAAAN,OAAA;AAA8C,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAM,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA9B9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,sBAAgC,GAAGA,CAAA,KAAM;EAC7C,MAAM;IAAEC,uBAAuB,EAAEC,UAAU;IAAEC;EAAmB,CAAC,GAAG,IAAAC,kBAAM,EAAC,CAAC;EAC5E,MAAM;IAAEC;EAAE,CAAC,GAAG,IAAAC,gBAAO,EAAC,CAAC;;EAEvB;EACA;EACA;EACA,MAAMC,SAAS,GAAG,IAAAC,kBAAW,EAC1BC,QAAoB,IAAMP,UAAU,GAAGA,UAAU,CAACK,SAAS,CAACE,QAAQ,CAAC,GAAG,MAAMC,SAAU,EACzF,CAACR,UAAU,CACb,CAAC;EACD,MAAMS,WAAW,GAAG,IAAAH,kBAAW,EAC7B,MAAON,UAAU,GAAGA,UAAU,CAACS,WAAW,CAAC,CAAC,GAAGC,cAAe,EAC9D,CAACV,UAAU,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GAEYC,sBAAsB","ignoreList":[]}
@@ -10,6 +10,7 @@ var _vectorIcons = require("@expo/vector-icons");
10
10
  var _reactNativeQrcodeSvg = _interopRequireDefault(require("react-native-qrcode-svg"));
11
11
  var _avatar = require("@oxyhq/bloom/avatar");
12
12
  var _button = require("@oxyhq/bloom/button");
13
+ var _settingsList = require("@oxyhq/bloom/settings-list");
13
14
  var _bloom = require("@oxyhq/bloom");
14
15
  var _typography = require("@oxyhq/bloom/typography");
15
16
  var _theme = require("@oxyhq/bloom/theme");
@@ -28,8 +29,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
28
29
  *
29
30
  * A thin React Native binding over the headless `AccountDialogController` in
30
31
  * `@oxyhq/core` (bound via `useSyncExternalStore`) — the same data/state
31
- * machine {@link OxyAccountDialog} renders, extracted so it can be mounted in
32
- * TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialog` (the normal
32
+ * machine {@link OxyAccountDialogScreen} renders, extracted so it can be mounted in
33
+ * TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialogScreen` (the normal
33
34
  * in-app surface), and mounted bare by a future auth.oxy.so hub page for the
34
35
  * cross-origin passkey popup (b2) — same chooser, two hosts, two completion
35
36
  * strategies via the `onComplete` prop. Neither host duplicates view logic.
@@ -71,6 +72,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
71
72
  */
72
73
 
73
74
  /** Diameter of a row avatar. */const ROW_AVATAR_SIZE = 40;
75
+ /** Diameter of the prominent current-account avatar in the collapsed header. */
76
+ const HEADER_AVATAR_SIZE = 48;
74
77
  /** High-contrast QR colors — intentionally fixed (NOT themed) for scan reliability. */
75
78
  const QR_PLATE_BG = '#FFFFFF';
76
79
  const QR_FOREGROUND = '#000000';
@@ -94,7 +97,7 @@ function toPreset(color) {
94
97
  return _theme.APP_COLOR_NAMES.includes(color) ? color : undefined;
95
98
  }
96
99
  /**
97
- * The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialog`
100
+ * The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialogScreen`
98
101
  * (wrapped in Bloom's `<Dialog>`) today; mountable bare by any future host that
99
102
  * supplies its own `onComplete`.
100
103
  */
@@ -301,12 +304,28 @@ const OxyAuthChooser = ({
301
304
  // Accounts view
302
305
  // ---------------------------------------------------------------------------
303
306
 
307
+ /**
308
+ * The signed-in switcher, in the Google account-menu shape:
309
+ * - COLLAPSED (default): the active account is prominent at the top (avatar +
310
+ * name + email) with a trailing expand chevron, and a "Manage your Oxy
311
+ * account" outline button directly under it. Nothing else.
312
+ * - EXPANDED: the same header + button, then the full account list (current
313
+ * first with a check-circle, every other switchable account, "Add another
314
+ * account", and "Manage accounts on this device").
315
+ *
316
+ * Collapse state is a plain `useState` toggled in the header's press handler —
317
+ * no `useEffect`, no derived-from-props sync. When there is only ONE account
318
+ * (nothing to switch to) the chevron is hidden and the "Add another account" +
319
+ * "Manage accounts on this device" items render inline, so those affordances
320
+ * stay reachable without a pointless expand toggle.
321
+ */
304
322
  const AccountsView = ({
305
323
  snapshot,
306
324
  theme,
307
325
  t,
308
326
  handlers
309
327
  }) => {
328
+ const [expanded, setExpanded] = (0, _react.useState)(false);
310
329
  if (snapshot.loading && snapshot.accounts.length === 0) {
311
330
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
312
331
  style: _oxyAuthChooserStyles.authChooserStyles.centeredBlock,
@@ -322,49 +341,127 @@ const AccountsView = ({
322
341
  })]
323
342
  });
324
343
  }
344
+ const switchingDisabled = snapshot.switchingAccountId !== null;
345
+ const current = snapshot.accounts.find(account => account.isCurrent) ?? snapshot.accounts[0];
346
+ const hasOtherAccounts = snapshot.accounts.some(account => account.accountId !== current?.accountId);
347
+ // Current account first, then the rest — the expanded list order.
348
+ const orderedAccounts = current ? [current, ...snapshot.accounts.filter(account => account.accountId !== current.accountId)] : snapshot.accounts;
349
+ // Multi-account: reveal the list only when expanded. Single-account: no expand
350
+ // affordance, so surface add/manage inline.
351
+ const showList = hasOtherAccounts ? expanded : true;
352
+ const renderAccountItem = account => {
353
+ const accent = resolveAccentHex(account.color, theme.colors.primary);
354
+ const isSwitching = snapshot.switchingAccountId === account.accountId;
355
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
356
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
357
+ style: [_oxyAuthChooserStyles.authChooserStyles.avatarRing, {
358
+ borderColor: account.isCurrent ? accent : 'transparent'
359
+ }],
360
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_avatar.Avatar, {
361
+ source: account.avatarUrl ?? undefined,
362
+ variant: "thumb",
363
+ name: account.displayName,
364
+ size: ROW_AVATAR_SIZE
365
+ })
366
+ }),
367
+ title: account.displayName,
368
+ description: account.email ?? undefined,
369
+ onPress: () => handlers.onSwitch(account.accountId),
370
+ disabled: switchingDisabled,
371
+ accessibilityLabel: account.displayName,
372
+ showChevron: false,
373
+ rightElement: isSwitching ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
374
+ name: "loading",
375
+ size: 20,
376
+ color: accent
377
+ }) : account.isCurrent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
378
+ name: "check-circle",
379
+ size: 20,
380
+ color: accent
381
+ }) : undefined
382
+ }, account.accountId);
383
+ };
325
384
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
326
385
  style: _oxyAuthChooserStyles.authChooserStyles.rows,
327
- children: [snapshot.accounts.map(account => /*#__PURE__*/(0, _jsxRuntime.jsx)(AccountRow, {
328
- account: account,
329
- theme: theme,
330
- switching: snapshot.switchingAccountId === account.accountId,
331
- disabled: snapshot.switchingAccountId !== null,
332
- onPress: () => handlers.onSwitch(account.accountId)
333
- }, account.accountId)), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
334
- style: [_oxyAuthChooserStyles.authChooserStyles.addRow, {
335
- borderColor: theme.colors.border
336
- }],
337
- onPress: handlers.onAdd,
338
- accessibilityRole: "button",
339
- accessibilityLabel: t('signin.addAccountTitle') || 'Add another account',
386
+ children: [current ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
387
+ style: _oxyAuthChooserStyles.authChooserStyles.currentAccountRow,
388
+ onPress: hasOtherAccounts ? () => setExpanded(value => !value) : undefined,
389
+ disabled: hasOtherAccounts ? switchingDisabled : true,
390
+ accessibilityRole: hasOtherAccounts ? 'button' : undefined,
391
+ accessibilityState: hasOtherAccounts ? {
392
+ expanded
393
+ } : undefined,
394
+ accessibilityLabel: current.displayName,
340
395
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
341
- style: [_oxyAuthChooserStyles.authChooserStyles.addBadge, {
342
- borderColor: theme.colors.border
396
+ style: [_oxyAuthChooserStyles.authChooserStyles.avatarRing, {
397
+ borderColor: resolveAccentHex(current.color, theme.colors.primary)
343
398
  }],
344
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
345
- name: "plus",
346
- size: 20,
347
- color: theme.colors.textSecondary
399
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_avatar.Avatar, {
400
+ source: current.avatarUrl ?? undefined,
401
+ variant: "thumb",
402
+ name: current.displayName,
403
+ size: HEADER_AVATAR_SIZE
348
404
  })
349
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
350
- style: [_oxyAuthChooserStyles.authChooserStyles.rowName, {
351
- color: theme.colors.textSecondary
352
- }],
353
- children: t('signin.addAccountTitle') || 'Add another account'
354
- })]
355
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
356
- style: _oxyAuthChooserStyles.authChooserStyles.footerLinks,
357
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
358
- onPress: handlers.onManage,
359
- accessibilityRole: "button",
360
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
361
- style: [_oxyAuthChooserStyles.authChooserStyles.linkText, {
362
- color: theme.colors.primary
405
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
406
+ style: _oxyAuthChooserStyles.authChooserStyles.currentAccountMeta,
407
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
408
+ style: [_oxyAuthChooserStyles.authChooserStyles.currentAccountName, {
409
+ color: theme.colors.text
363
410
  }],
364
- children: t('accountMenu.manage') || 'Manage accounts'
365
- })
366
- })
367
- })]
411
+ numberOfLines: 1,
412
+ children: current.displayName
413
+ }), current.email ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
414
+ style: [_oxyAuthChooserStyles.authChooserStyles.currentAccountEmail, {
415
+ color: theme.colors.textSecondary
416
+ }],
417
+ numberOfLines: 1,
418
+ children: current.email
419
+ }) : null]
420
+ }), hasOtherAccounts ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
421
+ name: expanded ? 'chevron-up' : 'chevron-down',
422
+ size: 24,
423
+ color: theme.colors.textSecondary
424
+ }) : null]
425
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
426
+ variant: "outline",
427
+ onPress: handlers.onManage,
428
+ style: _oxyAuthChooserStyles.authChooserStyles.manageButton,
429
+ children: t('accountMenu.manage') || 'Manage your Oxy account'
430
+ }), showList ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_settingsList.SettingsListGroup, {
431
+ children: [hasOtherAccounts ? orderedAccounts.map(renderAccountItem) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
432
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
433
+ style: [_oxyAuthChooserStyles.authChooserStyles.addBadge, {
434
+ borderColor: theme.colors.border
435
+ }],
436
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
437
+ name: "plus",
438
+ size: 20,
439
+ color: theme.colors.textSecondary
440
+ })
441
+ }),
442
+ title: t('signin.addAccountTitle') || 'Add another account',
443
+ onPress: handlers.onAdd,
444
+ disabled: switchingDisabled,
445
+ accessibilityLabel: t('signin.addAccountTitle') || 'Add another account',
446
+ showChevron: false
447
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
448
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
449
+ style: [_oxyAuthChooserStyles.authChooserStyles.addBadge, {
450
+ borderColor: theme.colors.border
451
+ }],
452
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
453
+ name: "cog-outline",
454
+ size: 20,
455
+ color: theme.colors.textSecondary
456
+ })
457
+ }),
458
+ title: t('accountSwitcher.manageOnDevice') || 'Manage accounts on this device',
459
+ onPress: handlers.onManage,
460
+ disabled: switchingDisabled,
461
+ accessibilityLabel: t('accountSwitcher.manageOnDevice') || 'Manage accounts on this device',
462
+ showChevron: false
463
+ })]
464
+ }) : null]
368
465
  });
369
466
  };
370
467
  const AccountRow = ({