@oxyhq/services 22.9.0 → 22.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (584) hide show
  1. package/lib/commonjs/index.js +24 -5
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/ui/components/AvatarCameraBadge.js +42 -0
  4. package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -0
  5. package/lib/commonjs/ui/components/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +55 -133
  6. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -0
  7. package/lib/commonjs/ui/components/OxyAuthChooser.js +657 -88
  8. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  9. package/lib/commonjs/ui/components/OxyConsentScreen.js +1 -1
  10. package/lib/commonjs/ui/components/ProfileButton.js +15 -1
  11. package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
  12. package/lib/commonjs/ui/components/ProfileSummaryCard.js +3 -23
  13. package/lib/commonjs/ui/components/ProfileSummaryCard.js.map +1 -1
  14. package/lib/commonjs/ui/components/RequireOxyAuth.js +1 -1
  15. package/lib/commonjs/ui/components/SurfaceHeaderAction.js +63 -0
  16. package/lib/commonjs/ui/components/SurfaceHeaderAction.js.map +1 -0
  17. package/lib/commonjs/ui/components/SurfaceScreen.js +91 -8
  18. package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -1
  19. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +46 -29
  20. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  21. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +47 -23
  22. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
  23. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js +81 -19
  24. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -1
  25. package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js +83 -23
  26. package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
  27. package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js +83 -0
  28. package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
  29. package/lib/commonjs/ui/context/OxyContext.js +79 -29
  30. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  31. package/lib/commonjs/ui/hooks/queries/queryKeys.js +18 -1
  32. package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
  33. package/lib/commonjs/ui/hooks/queries/useFileQueries.js +129 -0
  34. package/lib/commonjs/ui/hooks/queries/useFileQueries.js.map +1 -0
  35. package/lib/commonjs/ui/hooks/useAvatarPicker.js +38 -55
  36. package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
  37. package/lib/commonjs/ui/hooks/useReduceMotion.js +57 -0
  38. package/lib/commonjs/ui/hooks/useReduceMotion.js.map +1 -0
  39. package/lib/commonjs/ui/hooks/useSurfaceHeader.js +46 -0
  40. package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -0
  41. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +1 -1
  42. package/lib/commonjs/ui/navigation/accountDialogManager.js +36 -2
  43. package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
  44. package/lib/commonjs/ui/navigation/bottomSheetManager.js +5 -6
  45. package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
  46. package/lib/commonjs/ui/navigation/routes.js +4 -3
  47. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  48. package/lib/commonjs/ui/navigation/surfaceBackBridge.js +68 -0
  49. package/lib/commonjs/ui/navigation/surfaceBackBridge.js.map +1 -0
  50. package/lib/commonjs/ui/navigation/surfaceNavStack.js +62 -15
  51. package/lib/commonjs/ui/navigation/surfaceNavStack.js.map +1 -1
  52. package/lib/commonjs/ui/navigation/surfaceRegistry.js +84 -19
  53. package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -1
  54. package/lib/commonjs/ui/navigation/surfaces.js +139 -25
  55. package/lib/commonjs/ui/navigation/surfaces.js.map +1 -1
  56. package/lib/commonjs/ui/screens/AccountMembersScreen.js +214 -283
  57. package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
  58. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +88 -118
  59. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  60. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +22 -36
  61. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  62. package/lib/commonjs/ui/screens/AppInfoScreen.js +219 -226
  63. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  64. package/lib/commonjs/ui/screens/AvatarCropScreen.js +287 -289
  65. package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
  66. package/lib/commonjs/ui/screens/ChangeAvatarScreen.js +301 -0
  67. package/lib/commonjs/ui/screens/ChangeAvatarScreen.js.map +1 -0
  68. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +24 -39
  69. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
  70. package/lib/commonjs/ui/screens/CreateAccountScreen.js +136 -158
  71. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  72. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +29 -36
  73. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  74. package/lib/commonjs/ui/screens/EditProfileScreen.js +101 -109
  75. package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
  76. package/lib/commonjs/ui/screens/FAQScreen.js +10 -15
  77. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
  78. package/lib/commonjs/ui/screens/FeedbackScreen.js +8 -16
  79. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  80. package/lib/commonjs/ui/screens/FileManagementScreen.js +403 -627
  81. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  82. package/lib/commonjs/ui/screens/HelpSupportScreen.js +62 -69
  83. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  84. package/lib/commonjs/ui/screens/HistoryViewScreen.js +63 -79
  85. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  86. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +69 -98
  87. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  88. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +8 -14
  89. package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  90. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +77 -94
  91. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  92. package/lib/commonjs/ui/screens/ManageAccountScreen.js +99 -134
  93. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  94. package/lib/commonjs/ui/screens/NotificationsScreen.js +69 -76
  95. package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
  96. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -8
  97. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  98. package/lib/commonjs/ui/screens/PreferencesScreen.js +67 -74
  99. package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
  100. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +55 -91
  101. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  102. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +291 -304
  103. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  104. package/lib/commonjs/ui/screens/ProfileScreen.js +100 -114
  105. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  106. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +38 -45
  107. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  108. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +44 -57
  109. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  110. package/lib/commonjs/ui/screens/UserLinksScreen.js +24 -31
  111. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
  112. package/lib/commonjs/ui/screens/UserListScreen.js +14 -24
  113. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  114. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +16 -48
  115. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  116. package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js +63 -0
  117. package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js.map +1 -0
  118. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +54 -41
  119. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  120. package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +44 -81
  121. package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
  122. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +66 -75
  123. package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  124. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +111 -139
  125. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  126. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +13 -20
  127. package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  128. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +14 -27
  129. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  130. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +68 -85
  131. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  132. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +28 -36
  133. package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  134. package/lib/commonjs/ui/stores/resetSessionScopedStores.js +8 -3
  135. package/lib/commonjs/ui/stores/resetSessionScopedStores.js.map +1 -1
  136. package/lib/commonjs/ui/utils/avatarUtils.js +11 -2
  137. package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
  138. package/lib/commonjs/ui/utils/fileManagement.js +0 -79
  139. package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
  140. package/lib/module/index.js +12 -5
  141. package/lib/module/index.js.map +1 -1
  142. package/lib/module/ui/components/AvatarCameraBadge.js +40 -0
  143. package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -0
  144. package/lib/module/ui/components/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +57 -135
  145. package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -0
  146. package/lib/module/ui/components/OxyAuthChooser.js +659 -91
  147. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  148. package/lib/module/ui/components/OxyConsentScreen.js +1 -1
  149. package/lib/module/ui/components/ProfileButton.js +16 -2
  150. package/lib/module/ui/components/ProfileButton.js.map +1 -1
  151. package/lib/module/ui/components/ProfileSummaryCard.js +2 -23
  152. package/lib/module/ui/components/ProfileSummaryCard.js.map +1 -1
  153. package/lib/module/ui/components/RequireOxyAuth.js +1 -1
  154. package/lib/module/ui/components/SurfaceHeaderAction.js +58 -0
  155. package/lib/module/ui/components/SurfaceHeaderAction.js.map +1 -0
  156. package/lib/module/ui/components/SurfaceScreen.js +93 -10
  157. package/lib/module/ui/components/SurfaceScreen.js.map +1 -1
  158. package/lib/module/ui/components/fileManagement/FileDetailsModal.js +46 -29
  159. package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  160. package/lib/module/ui/components/modals/DeleteAccountModal.js +46 -23
  161. package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
  162. package/lib/module/ui/components/oxyAuthChooserStyles.js +81 -19
  163. package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -1
  164. package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js +83 -25
  165. package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
  166. package/lib/module/ui/components/surfaces/ActionSheetSurface.js +78 -0
  167. package/lib/module/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
  168. package/lib/module/ui/context/OxyContext.js +80 -30
  169. package/lib/module/ui/context/OxyContext.js.map +1 -1
  170. package/lib/module/ui/hooks/queries/queryKeys.js +16 -0
  171. package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
  172. package/lib/module/ui/hooks/queries/useFileQueries.js +120 -0
  173. package/lib/module/ui/hooks/queries/useFileQueries.js.map +1 -0
  174. package/lib/module/ui/hooks/useAvatarPicker.js +38 -55
  175. package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
  176. package/lib/module/ui/hooks/useReduceMotion.js +53 -0
  177. package/lib/module/ui/hooks/useReduceMotion.js.map +1 -0
  178. package/lib/module/ui/hooks/useSurfaceHeader.js +42 -0
  179. package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -0
  180. package/lib/module/ui/hooks/useSwitchableAccounts.js +1 -1
  181. package/lib/module/ui/navigation/accountDialogManager.js +34 -2
  182. package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
  183. package/lib/module/ui/navigation/bottomSheetManager.js +6 -7
  184. package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
  185. package/lib/module/ui/navigation/routes.js +4 -3
  186. package/lib/module/ui/navigation/routes.js.map +1 -1
  187. package/lib/module/ui/navigation/surfaceBackBridge.js +63 -0
  188. package/lib/module/ui/navigation/surfaceBackBridge.js.map +1 -0
  189. package/lib/module/ui/navigation/surfaceNavStack.js +62 -15
  190. package/lib/module/ui/navigation/surfaceNavStack.js.map +1 -1
  191. package/lib/module/ui/navigation/surfaceRegistry.js +84 -19
  192. package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -1
  193. package/lib/module/ui/navigation/surfaces.js +138 -26
  194. package/lib/module/ui/navigation/surfaces.js.map +1 -1
  195. package/lib/module/ui/screens/AccountMembersScreen.js +218 -286
  196. package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
  197. package/lib/module/ui/screens/AccountSettingsScreen.js +92 -121
  198. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  199. package/lib/module/ui/screens/AccountVerificationScreen.js +25 -38
  200. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  201. package/lib/module/ui/screens/AppInfoScreen.js +220 -227
  202. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  203. package/lib/module/ui/screens/AvatarCropScreen.js +289 -291
  204. package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
  205. package/lib/module/ui/screens/ChangeAvatarScreen.js +298 -0
  206. package/lib/module/ui/screens/ChangeAvatarScreen.js.map +1 -0
  207. package/lib/module/ui/screens/ConnectedAppsScreen.js +26 -40
  208. package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
  209. package/lib/module/ui/screens/CreateAccountScreen.js +139 -160
  210. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  211. package/lib/module/ui/screens/EditProfileFieldScreen.js +32 -38
  212. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  213. package/lib/module/ui/screens/EditProfileScreen.js +102 -110
  214. package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
  215. package/lib/module/ui/screens/FAQScreen.js +11 -15
  216. package/lib/module/ui/screens/FAQScreen.js.map +1 -1
  217. package/lib/module/ui/screens/FeedbackScreen.js +10 -17
  218. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  219. package/lib/module/ui/screens/FileManagementScreen.js +408 -631
  220. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  221. package/lib/module/ui/screens/HelpSupportScreen.js +64 -70
  222. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  223. package/lib/module/ui/screens/HistoryViewScreen.js +65 -81
  224. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  225. package/lib/module/ui/screens/LanguageSelectorScreen.js +71 -99
  226. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  227. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +10 -15
  228. package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
  229. package/lib/module/ui/screens/LegalDocumentsScreen.js +78 -94
  230. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  231. package/lib/module/ui/screens/ManageAccountScreen.js +102 -137
  232. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  233. package/lib/module/ui/screens/NotificationsScreen.js +71 -77
  234. package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
  235. package/lib/module/ui/screens/PaymentGatewayScreen.js +4 -9
  236. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  237. package/lib/module/ui/screens/PreferencesScreen.js +69 -75
  238. package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
  239. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +58 -93
  240. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  241. package/lib/module/ui/screens/PrivacySettingsScreen.js +293 -305
  242. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  243. package/lib/module/ui/screens/ProfileScreen.js +102 -116
  244. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  245. package/lib/module/ui/screens/SavesCollectionsScreen.js +40 -46
  246. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  247. package/lib/module/ui/screens/SearchSettingsScreen.js +46 -58
  248. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  249. package/lib/module/ui/screens/UserLinksScreen.js +26 -32
  250. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
  251. package/lib/module/ui/screens/UserListScreen.js +14 -24
  252. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  253. package/lib/module/ui/screens/WelcomeNewUserScreen.js +17 -49
  254. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  255. package/lib/module/ui/screens/fileManagement/FileLibraryError.js +59 -0
  256. package/lib/module/ui/screens/fileManagement/FileLibraryError.js.map +1 -0
  257. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +54 -42
  258. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  259. package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +45 -81
  260. package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
  261. package/lib/module/ui/screens/trust/TrustAboutScreen.js +67 -75
  262. package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
  263. package/lib/module/ui/screens/trust/TrustCenterScreen.js +112 -139
  264. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  265. package/lib/module/ui/screens/trust/TrustFAQScreen.js +15 -21
  266. package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
  267. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +14 -26
  268. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  269. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +69 -85
  270. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  271. package/lib/module/ui/screens/trust/TrustRulesScreen.js +30 -37
  272. package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
  273. package/lib/module/ui/stores/resetSessionScopedStores.js +8 -3
  274. package/lib/module/ui/stores/resetSessionScopedStores.js.map +1 -1
  275. package/lib/module/ui/utils/avatarUtils.js +11 -2
  276. package/lib/module/ui/utils/avatarUtils.js.map +1 -1
  277. package/lib/module/ui/utils/fileManagement.js +0 -78
  278. package/lib/module/ui/utils/fileManagement.js.map +1 -1
  279. package/lib/typescript/commonjs/index.d.ts +2 -0
  280. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/ui/components/AvatarCameraBadge.d.ts +4 -0
  282. package/lib/typescript/commonjs/ui/components/AvatarCameraBadge.d.ts.map +1 -0
  283. package/lib/typescript/{module/ui/components/OxyAccountDialog.d.ts → commonjs/ui/components/OxyAccountDialogScreen.d.ts} +5 -4
  284. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +3 -3
  286. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +2 -2
  288. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
  289. package/lib/typescript/commonjs/ui/components/ProfileSummaryCard.d.ts.map +1 -1
  290. package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts +1 -1
  291. package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts +16 -0
  292. package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
  293. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts +3 -4
  294. package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -1
  295. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
  296. package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  297. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +17 -2
  298. package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  299. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts +75 -13
  300. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
  301. package/lib/typescript/commonjs/ui/components/photogrid/JustifiedPhotoGrid.d.ts +10 -8
  302. package/lib/typescript/commonjs/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -1
  303. package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
  304. package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
  305. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  306. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +9 -0
  307. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts +50 -0
  309. package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +17 -16
  311. package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/ui/hooks/useReduceMotion.d.ts +14 -0
  313. package/lib/typescript/commonjs/ui/hooks/useReduceMotion.d.ts.map +1 -0
  314. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +31 -0
  315. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +1 -1
  317. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +27 -2
  318. package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
  319. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +4 -5
  320. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  321. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
  322. package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
  323. package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts +16 -0
  324. package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
  325. package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts +21 -0
  326. package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts.map +1 -1
  327. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +101 -23
  328. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -1
  329. package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts +42 -11
  330. package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -1
  331. package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  332. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  333. package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  334. package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
  335. package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts +18 -9
  336. package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  337. package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts +34 -0
  338. package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts.map +1 -0
  339. package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  340. package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  341. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  342. package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
  343. package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  345. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  346. package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  347. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  348. package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  349. package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  350. package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  351. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
  352. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  353. package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -1
  354. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  355. package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
  356. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  357. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  358. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  359. package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  360. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  361. package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
  362. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
  363. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  364. package/lib/typescript/commonjs/ui/screens/fileManagement/FileLibraryError.d.ts +23 -0
  365. package/lib/typescript/commonjs/ui/screens/fileManagement/FileLibraryError.d.ts.map +1 -0
  366. package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts +4 -0
  367. package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
  368. package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts +10 -2
  369. package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
  370. package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  371. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  372. package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  373. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  374. package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  375. package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  376. package/lib/typescript/commonjs/ui/stores/resetSessionScopedStores.d.ts +8 -1
  377. package/lib/typescript/commonjs/ui/stores/resetSessionScopedStores.d.ts.map +1 -1
  378. package/lib/typescript/commonjs/ui/types/navigation.d.ts +10 -0
  379. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  380. package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
  381. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +0 -48
  382. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
  383. package/lib/typescript/module/index.d.ts +2 -0
  384. package/lib/typescript/module/index.d.ts.map +1 -1
  385. package/lib/typescript/module/ui/components/AvatarCameraBadge.d.ts +4 -0
  386. package/lib/typescript/module/ui/components/AvatarCameraBadge.d.ts.map +1 -0
  387. package/lib/typescript/{commonjs/ui/components/OxyAccountDialog.d.ts → module/ui/components/OxyAccountDialogScreen.d.ts} +5 -4
  388. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
  389. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +3 -3
  390. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  391. package/lib/typescript/module/ui/components/ProfileButton.d.ts +2 -2
  392. package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
  393. package/lib/typescript/module/ui/components/ProfileSummaryCard.d.ts.map +1 -1
  394. package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts +1 -1
  395. package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts +16 -0
  396. package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
  397. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts +3 -4
  398. package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -1
  399. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
  400. package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
  401. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +17 -2
  402. package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
  403. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts +75 -13
  404. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
  405. package/lib/typescript/module/ui/components/photogrid/JustifiedPhotoGrid.d.ts +10 -8
  406. package/lib/typescript/module/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -1
  407. package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
  408. package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
  409. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  410. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +9 -0
  411. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  412. package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts +50 -0
  413. package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts.map +1 -0
  414. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +17 -16
  415. package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
  416. package/lib/typescript/module/ui/hooks/useReduceMotion.d.ts +14 -0
  417. package/lib/typescript/module/ui/hooks/useReduceMotion.d.ts.map +1 -0
  418. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +31 -0
  419. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
  420. package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +1 -1
  421. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +27 -2
  422. package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
  423. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +4 -5
  424. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  425. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  426. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  427. package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts +16 -0
  428. package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
  429. package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts +21 -0
  430. package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts.map +1 -1
  431. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +101 -23
  432. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -1
  433. package/lib/typescript/module/ui/navigation/surfaces.d.ts +42 -11
  434. package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -1
  435. package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
  436. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  437. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  438. package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
  439. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +18 -9
  440. package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
  441. package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts +34 -0
  442. package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts.map +1 -0
  443. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
  444. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  445. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  446. package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
  447. package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
  448. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  449. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  450. package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  451. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  452. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  453. package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
  454. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  455. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
  456. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  457. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
  458. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  459. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
  460. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  461. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  462. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  463. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  464. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  465. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
  466. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  467. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  468. package/lib/typescript/module/ui/screens/fileManagement/FileLibraryError.d.ts +23 -0
  469. package/lib/typescript/module/ui/screens/fileManagement/FileLibraryError.d.ts.map +1 -0
  470. package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts +4 -0
  471. package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
  472. package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts +10 -2
  473. package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
  474. package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
  475. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  476. package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
  477. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  478. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  479. package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
  480. package/lib/typescript/module/ui/stores/resetSessionScopedStores.d.ts +8 -1
  481. package/lib/typescript/module/ui/stores/resetSessionScopedStores.d.ts.map +1 -1
  482. package/lib/typescript/module/ui/types/navigation.d.ts +10 -0
  483. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  484. package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
  485. package/lib/typescript/module/ui/utils/fileManagement.d.ts +0 -48
  486. package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
  487. package/package.json +9 -5
  488. package/src/index.ts +12 -5
  489. package/src/ui/components/AvatarCameraBadge.tsx +35 -0
  490. package/src/ui/components/{OxyAccountDialog.tsx → OxyAccountDialogScreen.tsx} +50 -116
  491. package/src/ui/components/OxyAuthChooser.tsx +743 -86
  492. package/src/ui/components/OxyConsentScreen.tsx +1 -1
  493. package/src/ui/components/ProfileButton.tsx +18 -3
  494. package/src/ui/components/ProfileSummaryCard.tsx +2 -25
  495. package/src/ui/components/RequireOxyAuth.tsx +1 -1
  496. package/src/ui/components/SurfaceHeaderAction.tsx +60 -0
  497. package/src/ui/components/SurfaceScreen.tsx +108 -14
  498. package/src/ui/components/fileManagement/FileDetailsModal.tsx +50 -36
  499. package/src/ui/components/modals/DeleteAccountModal.tsx +47 -26
  500. package/src/ui/components/oxyAuthChooserStyles.ts +78 -16
  501. package/src/ui/components/photogrid/JustifiedPhotoGrid.tsx +158 -84
  502. package/src/ui/components/photogrid/__tests__/chunkPhotos.test.ts +51 -0
  503. package/src/ui/components/surfaces/ActionSheetSurface.tsx +98 -0
  504. package/src/ui/context/OxyContext.tsx +79 -25
  505. package/src/ui/hooks/queries/queryKeys.ts +15 -0
  506. package/src/ui/hooks/queries/useFileQueries.ts +162 -0
  507. package/src/ui/hooks/useAvatarPicker.ts +46 -74
  508. package/src/ui/hooks/useReduceMotion.ts +58 -0
  509. package/src/ui/hooks/useSurfaceHeader.ts +57 -0
  510. package/src/ui/hooks/useSwitchableAccounts.ts +1 -1
  511. package/src/ui/navigation/__tests__/getSurfaceConfig.test.ts +55 -7
  512. package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +149 -0
  513. package/src/ui/navigation/accountDialogManager.ts +42 -2
  514. package/src/ui/navigation/bottomSheetManager.ts +6 -7
  515. package/src/ui/navigation/routes.ts +6 -4
  516. package/src/ui/navigation/surfaceBackBridge.ts +69 -0
  517. package/src/ui/navigation/surfaceNavStack.ts +72 -9
  518. package/src/ui/navigation/surfaceRegistry.ts +164 -24
  519. package/src/ui/navigation/surfaces.ts +137 -30
  520. package/src/ui/screens/AccountMembersScreen.tsx +39 -100
  521. package/src/ui/screens/AccountSettingsScreen.tsx +32 -54
  522. package/src/ui/screens/AccountVerificationScreen.tsx +23 -51
  523. package/src/ui/screens/AppInfoScreen.tsx +6 -13
  524. package/src/ui/screens/AvatarCropScreen.tsx +340 -311
  525. package/src/ui/screens/ChangeAvatarScreen.tsx +359 -0
  526. package/src/ui/screens/ConnectedAppsScreen.tsx +39 -60
  527. package/src/ui/screens/CreateAccountScreen.tsx +13 -39
  528. package/src/ui/screens/EditProfileFieldScreen.tsx +30 -48
  529. package/src/ui/screens/EditProfileScreen.tsx +7 -16
  530. package/src/ui/screens/FAQScreen.tsx +9 -13
  531. package/src/ui/screens/FeedbackScreen.tsx +8 -22
  532. package/src/ui/screens/FileManagementScreen.tsx +370 -610
  533. package/src/ui/screens/HelpSupportScreen.tsx +7 -13
  534. package/src/ui/screens/HistoryViewScreen.tsx +26 -31
  535. package/src/ui/screens/LanguageSelectorScreen.tsx +12 -46
  536. package/src/ui/screens/LearnMoreUsernamesScreen.tsx +8 -16
  537. package/src/ui/screens/LegalDocumentsScreen.tsx +7 -22
  538. package/src/ui/screens/ManageAccountScreen.tsx +96 -165
  539. package/src/ui/screens/NotificationsScreen.tsx +7 -13
  540. package/src/ui/screens/PaymentGatewayScreen.tsx +3 -10
  541. package/src/ui/screens/PreferencesScreen.tsx +7 -13
  542. package/src/ui/screens/PremiumSubscriptionScreen.tsx +52 -90
  543. package/src/ui/screens/PrivacySettingsScreen.tsx +9 -21
  544. package/src/ui/screens/ProfileScreen.tsx +9 -11
  545. package/src/ui/screens/SavesCollectionsScreen.tsx +7 -13
  546. package/src/ui/screens/SearchSettingsScreen.tsx +9 -21
  547. package/src/ui/screens/UserLinksScreen.tsx +7 -14
  548. package/src/ui/screens/UserListScreen.tsx +2 -5
  549. package/src/ui/screens/WelcomeNewUserScreen.tsx +18 -48
  550. package/src/ui/screens/fileManagement/FileLibraryError.tsx +56 -0
  551. package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +56 -46
  552. package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +55 -71
  553. package/src/ui/screens/trust/TrustAboutScreen.tsx +10 -17
  554. package/src/ui/screens/trust/TrustCenterScreen.tsx +9 -28
  555. package/src/ui/screens/trust/TrustFAQScreen.tsx +15 -18
  556. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +3 -5
  557. package/src/ui/screens/trust/TrustRewardsScreen.tsx +11 -26
  558. package/src/ui/screens/trust/TrustRulesScreen.tsx +10 -13
  559. package/src/ui/stores/resetSessionScopedStores.ts +8 -3
  560. package/src/ui/types/navigation.ts +10 -0
  561. package/src/ui/utils/avatarUtils.ts +11 -2
  562. package/src/ui/utils/fileManagement.ts +1 -101
  563. package/lib/commonjs/ui/components/Header.js +0 -305
  564. package/lib/commonjs/ui/components/Header.js.map +0 -1
  565. package/lib/commonjs/ui/components/OxyAccountDialog.js.map +0 -1
  566. package/lib/commonjs/ui/stores/fileStore.js +0 -153
  567. package/lib/commonjs/ui/stores/fileStore.js.map +0 -1
  568. package/lib/module/ui/components/Header.js +0 -299
  569. package/lib/module/ui/components/Header.js.map +0 -1
  570. package/lib/module/ui/components/OxyAccountDialog.js.map +0 -1
  571. package/lib/module/ui/stores/fileStore.js +0 -145
  572. package/lib/module/ui/stores/fileStore.js.map +0 -1
  573. package/lib/typescript/commonjs/ui/components/Header.d.ts +0 -33
  574. package/lib/typescript/commonjs/ui/components/Header.d.ts.map +0 -1
  575. package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +0 -1
  576. package/lib/typescript/commonjs/ui/stores/fileStore.d.ts +0 -31
  577. package/lib/typescript/commonjs/ui/stores/fileStore.d.ts.map +0 -1
  578. package/lib/typescript/module/ui/components/Header.d.ts +0 -33
  579. package/lib/typescript/module/ui/components/Header.d.ts.map +0 -1
  580. package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +0 -1
  581. package/lib/typescript/module/ui/stores/fileStore.d.ts +0 -31
  582. package/lib/typescript/module/ui/stores/fileStore.d.ts.map +0 -1
  583. package/src/ui/components/Header.tsx +0 -224
  584. package/src/ui/stores/fileStore.ts +0 -118
@@ -6,10 +6,15 @@ 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 _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
9
10
  var _vectorIcons = require("@expo/vector-icons");
10
11
  var _reactNativeQrcodeSvg = _interopRequireDefault(require("react-native-qrcode-svg"));
11
12
  var _avatar = require("@oxyhq/bloom/avatar");
13
+ var _avatarGroup = require("@oxyhq/bloom/avatar-group");
12
14
  var _button = require("@oxyhq/bloom/button");
15
+ var _pressableScale = require("@oxyhq/bloom/pressable-scale");
16
+ var _compositionBar = require("@oxyhq/bloom/composition-bar");
17
+ var _settingsList = require("@oxyhq/bloom/settings-list");
13
18
  var _bloom = require("@oxyhq/bloom");
14
19
  var _typography = require("@oxyhq/bloom/typography");
15
20
  var _theme = require("@oxyhq/bloom/theme");
@@ -17,19 +22,23 @@ var _core = require("@oxyhq/core");
17
22
  var _reactQuery = require("@tanstack/react-query");
18
23
  var _OxyContext = require("../context/OxyContext.js");
19
24
  var _useI18n = require("../hooks/useI18n.js");
25
+ var _accountDialogManager = require("../navigation/accountDialogManager.js");
20
26
  var _isWebBrowser = require("../utils/isWebBrowser.js");
21
27
  var _commonsStoreLinks = require("../utils/commonsStoreLinks.js");
28
+ var _useServicesQueries = require("../hooks/queries/useServicesQueries.js");
22
29
  var _oxyAuthChooserStyles = require("./oxyAuthChooserStyles.js");
30
+ var _AvatarCameraBadge = _interopRequireDefault(require("./AvatarCameraBadge.js"));
23
31
  var _jsxRuntime = require("react/jsx-runtime");
24
32
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
33
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
25
34
  /**
26
35
  * OxyAuthChooser — the account switcher + sign-in/sign-up surface, WITHOUT
27
36
  * any dialog chrome.
28
37
  *
29
38
  * A thin React Native binding over the headless `AccountDialogController` in
30
39
  * `@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
40
+ * machine {@link OxyAccountDialogScreen} renders, extracted so it can be mounted in
41
+ * TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialogScreen` (the normal
33
42
  * in-app surface), and mounted bare by a future auth.oxy.so hub page for the
34
43
  * cross-origin passkey popup (b2) — same chooser, two hosts, two completion
35
44
  * strategies via the `onComplete` prop. Neither host duplicates view logic.
@@ -70,13 +79,20 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
70
79
  * that do not use NativeWind (e.g. the accounts app).
71
80
  */
72
81
 
73
- /** Diameter of a row avatar. */const ROW_AVATAR_SIZE = 40;
82
+ /** Diameter of a row avatar (the sign-in view's account rows). */const ROW_AVATAR_SIZE = 40;
74
83
  /** High-contrast QR colors — intentionally fixed (NOT themed) for scan reliability. */
75
84
  const QR_PLATE_BG = '#FFFFFF';
76
85
  const QR_FOREGROUND = '#000000';
77
86
  const QR_SIZE = 196;
78
87
  /** Commons' own identity-creation deep link (mirrors the `approve`/`attest`/`card` intents). */
79
88
  const COMMONS_CREATE_IDENTITY_URL = 'oxycommons://create-identity';
89
+ /**
90
+ * "Accounts by Oxy" management app — the canonical home for account settings,
91
+ * data export, and storage management. The account-menu rows deep-link into it
92
+ * (`/data`, `/storage`, or its root) the same way `getCommonsAcquisitionUrl`
93
+ * hands off to Commons; nothing here invents new API endpoints.
94
+ */
95
+ const ACCOUNTS_APP_URL = 'https://accounts.oxy.so';
80
96
  /**
81
97
  * Resolve an account's stored color (a named Bloom preset, e.g. `'purple'`) to
82
98
  * a concrete brand hex for the row accent. Falls back to the theme primary when
@@ -94,7 +110,7 @@ function toPreset(color) {
94
110
  return _theme.APP_COLOR_NAMES.includes(color) ? color : undefined;
95
111
  }
96
112
  /**
97
- * The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialog`
113
+ * The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialogScreen`
98
114
  * (wrapped in Bloom's `<Dialog>`) today; mountable bare by any future host that
99
115
  * supplies its own `onComplete`.
100
116
  */
@@ -107,7 +123,9 @@ const OxyAuthChooser = ({
107
123
  refreshAccounts,
108
124
  signInWithPasskey,
109
125
  registerWithPasskey,
110
- oxyServices
126
+ oxyServices,
127
+ logout,
128
+ openAvatarPicker
111
129
  } = (0, _OxyContext.useOxy)();
112
130
  const theme = (0, _theme.useTheme)();
113
131
  const {
@@ -161,21 +179,41 @@ const OxyAuthChooser = ({
161
179
  }
162
180
  }, [createPasskeyPending, registerWithPasskey, onComplete, t]);
163
181
 
182
+ // Web: auto-start "Sign in with Oxy" when the sign-in entry becomes the shown
183
+ // view — the QR handoff is the PRIMARY web surface, not a button behind a tap.
184
+ // `signInWithOxy()` tries the shared keychain first (silently, native-only)
185
+ // then falls to the QR handoff, which is what actually renders. Driven from the
186
+ // EVENTS that reach that view — the initial `subscribe` pass below (an
187
+ // open-to-sign-in) and the add / back-to-sign-in handlers — never a watcher
188
+ // effect. Guarded so it never restarts a live flow (phase must be idle) and is a
189
+ // no-op on native (button-driven). Reads the live snapshot at call time (an
190
+ // event callback, not render), so it is stable across renders.
191
+ const autoStartSignIn = (0, _react.useCallback)(() => {
192
+ if (!controller || !(0, _isWebBrowser.isWebBrowser)()) return;
193
+ const {
194
+ view: currentView,
195
+ signIn
196
+ } = controller.getSnapshot();
197
+ if (currentView !== 'signin' && currentView !== 'add' || signIn.phase !== 'idle') return;
198
+ void controller.signInWithOxy();
199
+ }, [controller]);
200
+
164
201
  // Bind the headless controller. `getSnapshot` returns a stable reference
165
202
  // between changes, so it is `useSyncExternalStore`-safe. Guard the no-provider
166
203
  // loading state (`controller` is `null`) with an inert store.
167
- const subscribe = (0, _react.useCallback)(listener => controller ? controller.subscribe(listener) : () => undefined, [controller]);
168
- const getSnapshot = (0, _react.useCallback)(() => controller ? controller.getSnapshot() : EMPTY_SNAPSHOT, [controller]);
169
- const snapshot = (0, _react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
170
- const {
171
- view
172
- } = snapshot;
173
-
174
- // Sign-in device-flow failures land on `snapshot.signIn` asynchronously (poll /
175
- // socket / popup cancel). Toast at the controller notification site never an
176
- // inline banner in the QR view (owner mandate, same contract as account-switch).
177
- (0, _react.useEffect)(() => {
178
- if (!controller) return;
204
+ //
205
+ // The subscribe callback ALSO carries two owner-mandated reactions to the
206
+ // controller. These run in the subscribe / notification callbacks — EVENT
207
+ // callbacks, not render/effect — so neither is a React effect hook:
208
+ // 1. Sign-in device-flow failures (poll / socket / popup-cancel land on
209
+ // `signIn` asynchronously) are toasted at the notification site, deduped
210
+ // per subscription — NEVER an inline banner in the QR view (owner mandate,
211
+ // same contract as account-switch).
212
+ // 2. On subscribe (mount / re-subscribe a passive effect, the SAME timing
213
+ // the removed effects had) the web sign-in flow auto-starts if the opening
214
+ // view is the sign-in entry.
215
+ const subscribe = (0, _react.useCallback)(listener => {
216
+ if (!controller) return () => undefined;
179
217
  let lastToastedSignInError = null;
180
218
  const maybeToastSignInError = () => {
181
219
  const {
@@ -183,29 +221,23 @@ const OxyAuthChooser = ({
183
221
  } = controller.getSnapshot();
184
222
  if (signIn.phase === 'error' && signIn.error && signIn.error !== lastToastedSignInError) {
185
223
  lastToastedSignInError = signIn.error;
186
- _bloom.toast.error(signIn.error || t('accountSwitcher.toasts.signInFailed') || 'Sign-in failed. Please try again.');
187
- }
188
- if (signIn.phase !== 'error') {
224
+ _bloom.toast.error(signIn.error);
225
+ } else if (signIn.phase !== 'error') {
189
226
  lastToastedSignInError = null;
190
227
  }
191
228
  };
192
229
  maybeToastSignInError();
193
- return controller.subscribe(maybeToastSignInError);
194
- }, [controller, t]);
195
-
196
- // Web: "Sign in with Oxy" auto-starts the instant the sign-in entry is
197
- // reached — no button tap needed. `signInWithOxy()` tries the shared
198
- // keychain first (silently, native-only) then falls to the QR handoff,
199
- // which is what actually renders: the QR is the primary web surface, not a
200
- // peer button among several. Gated on `phase === 'idle'` so navigating back
201
- // to this view while a flow is already active (or re-entering it) never
202
- // restarts/duplicates it. Native stays fully button-driven (unchanged) —
203
- // this effect is a no-op there.
204
- (0, _react.useEffect)(() => {
205
- if (!controller || !(0, _isWebBrowser.isWebBrowser)()) return;
206
- if (view !== 'signin' && view !== 'add' || snapshot.signIn.phase !== 'idle') return;
207
- void controller.signInWithOxy();
208
- }, [controller, view, snapshot.signIn.phase]);
230
+ autoStartSignIn();
231
+ return controller.subscribe(() => {
232
+ maybeToastSignInError();
233
+ listener();
234
+ });
235
+ }, [controller, autoStartSignIn]);
236
+ const getSnapshot = (0, _react.useCallback)(() => controller ? controller.getSnapshot() : EMPTY_SNAPSHOT, [controller]);
237
+ const snapshot = (0, _react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
238
+ const {
239
+ view
240
+ } = snapshot;
209
241
  const [switching, setSwitching] = (0, _react.useState)(false);
210
242
  const handleSwitch = (0, _react.useCallback)(async accountId => {
211
243
  if (!controller || switching) return;
@@ -236,15 +268,81 @@ const OxyAuthChooser = ({
236
268
  }, [controller, switching, snapshot.activeAccountId, onComplete, refreshAccounts, queryClient, t]);
237
269
  const handleManage = (0, _react.useCallback)(() => {
238
270
  onComplete?.();
271
+ const hooks = (0, _accountDialogManager.getAccountDialogConsumerHooks)();
272
+ if (hooks?.onNavigateManage) {
273
+ hooks.onNavigateManage();
274
+ return;
275
+ }
239
276
  showBottomSheet?.('ManageAccount');
240
277
  }, [onComplete, showBottomSheet]);
278
+ const handleAdd = (0, _react.useCallback)(() => {
279
+ const hooks = (0, _accountDialogManager.getAccountDialogConsumerHooks)();
280
+ if (hooks?.onAddAccount) {
281
+ hooks.onAddAccount();
282
+ return;
283
+ }
284
+ // No consumer override: enter the "add account" view and auto-start the web
285
+ // sign-in flow, from this handler (the event that reaches the view).
286
+ controller?.add();
287
+ autoStartSignIn();
288
+ }, [controller, autoStartSignIn]);
241
289
  const handlers = (0, _react.useMemo)(() => ({
242
290
  onSwitch: accountId => {
243
291
  void handleSwitch(accountId);
244
292
  },
245
- onAdd: () => controller?.add(),
246
- onManage: handleManage
247
- }), [handleSwitch, controller, handleManage]);
293
+ onAdd: handleAdd,
294
+ onManage: handleManage,
295
+ // Morphs the AccountDialog surface into `ChangeAvatar` (and back), then
296
+ // uploads / clears the picked photo — the single shared avatar write path.
297
+ onEditAvatar: () => openAvatarPicker()
298
+ }), [handleSwitch, handleAdd, handleManage, openAvatarPicker]);
299
+
300
+ // Real storage usage for the account menu's "Oxy storage" block. Disabled
301
+ // (no fetch) until a private-API session exists, so it is inert on the
302
+ // sign-in/QR/sign-up views; when present the block shows live used/total.
303
+ const storageQuery = (0, _useServicesQueries.useAccountStorageUsage)();
304
+ const storage = (0, _react.useMemo)(() => storageQuery.data ? {
305
+ usedBytes: storageQuery.data.totalUsedBytes,
306
+ limitBytes: storageQuery.data.totalLimitBytes
307
+ } : null, [storageQuery.data]);
308
+
309
+ // The account-menu rows below the switcher: storage + data + settings + help
310
+ // deep-link into the "Accounts by Oxy" app or open the matching in-app sheet
311
+ // (Help, Legal); sign-out uses the SDK's own per-account sign-out. No new
312
+ // endpoints — the same handoff pattern `handleManage`/`getCommonsAcquisitionUrl`
313
+ // already use.
314
+ const accountMenu = (0, _react.useMemo)(() => {
315
+ const openUrl = url => {
316
+ void _reactNative.Linking.openURL(url);
317
+ };
318
+ const openSheet = config => {
319
+ onComplete?.();
320
+ showBottomSheet?.(config);
321
+ };
322
+ return {
323
+ onOpenSettings: () => openUrl(ACCOUNTS_APP_URL),
324
+ onOpenData: () => openUrl(`${ACCOUNTS_APP_URL}/data`),
325
+ onManageStorage: () => openUrl(`${ACCOUNTS_APP_URL}/storage`),
326
+ onUpgradeStorage: () => openUrl(`${ACCOUNTS_APP_URL}/storage`),
327
+ onHelp: () => openSheet('HelpSupport'),
328
+ onPrivacy: () => openSheet({
329
+ screen: 'LegalDocuments',
330
+ props: {
331
+ initialStep: 1
332
+ }
333
+ }),
334
+ onTerms: () => openSheet({
335
+ screen: 'LegalDocuments',
336
+ props: {
337
+ initialStep: 2
338
+ }
339
+ }),
340
+ onSignOut: () => {
341
+ void logout();
342
+ onComplete?.();
343
+ }
344
+ };
345
+ }, [onComplete, showBottomSheet, logout]);
248
346
  if (!controller) {
249
347
  return null;
250
348
  }
@@ -253,7 +351,9 @@ const OxyAuthChooser = ({
253
351
  snapshot: snapshot,
254
352
  theme: theme,
255
353
  t: t,
256
- handlers: handlers
354
+ handlers: handlers,
355
+ storage: storage,
356
+ menu: accountMenu
257
357
  });
258
358
  }
259
359
  if (view === 'qr') {
@@ -283,7 +383,10 @@ const OxyAuthChooser = ({
283
383
  onCreateWithPasskey: handleCreateWithPasskey,
284
384
  createPending: createPasskeyPending,
285
385
  onOpenHub: () => void controller.startPasskeyHubSignIn(),
286
- onBackToSignIn: () => controller.setView('signin')
386
+ onBackToSignIn: () => {
387
+ controller.setView('signin');
388
+ autoStartSignIn();
389
+ }
287
390
  });
288
391
  }
289
392
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(SignInView, {
@@ -298,75 +401,541 @@ const OxyAuthChooser = ({
298
401
  };
299
402
 
300
403
  // ---------------------------------------------------------------------------
301
- // Accounts view
404
+ // Accounts view — the signed-in Oxy account MENU (NativeWind)
302
405
  // ---------------------------------------------------------------------------
303
406
 
407
+ /** Used/total storage bytes for the "Oxy storage" block, or `null` when unknown. */
408
+
409
+ /** The account-menu row actions the container wires (deep-links / sheets / sign-out). */
410
+
411
+ /**
412
+ * Leading glyph for the rows that live in a Bloom grouped section (the MENU
413
+ * block) and for the storage card's cloud, which lines its title up with them.
414
+ * It is Bloom's OWN icon-slot size: `SettingsListItem` reserves a fixed 20px
415
+ * leading column and Bloom is consumed exactly as it ships, so a menu glyph
416
+ * larger than this would overhang into the row's title.
417
+ */
418
+ const ROW_ICON_SIZE = 20;
419
+ /**
420
+ * The switch card's two corner states. Collapsed it is one row and reads as a
421
+ * PILL; opened it is a card holding rows, on the same 16px corner the Bloom
422
+ * grouped section below it uses. Interpolated across the reveal, never snapped.
423
+ */
424
+ const SWITCH_CARD_PILL_RADIUS = 999;
425
+ const SWITCH_CARD_RADIUS = 16;
426
+ /**
427
+ * The fraction of the reveal over which the corner resolves. The corner is a
428
+ * FASTER gesture than the reveal — it has to be finished before the rows read as
429
+ * rows, or the card still looks like a pill while a list falls out of it — so it
430
+ * is clamped to the reveal's opening fraction instead of tracking it end to end.
431
+ * Measured in a browser against the 240ms reveal: the corner reaches its card
432
+ * value ~120ms in, with the list only ~20% revealed, and (mirrored) the pill is
433
+ * back ~250ms into the close, with the list already down to ~0.
434
+ */
435
+ const SWITCH_CARD_RADIUS_SETTLE = 0.2;
436
+ /** Diameter of an account row's avatar in the switch list (own markup). */
437
+ const SWITCH_AVATAR_SIZE = 36;
438
+ /** Glyph inside a bordered affordance badge, sized to the avatar it stands in for. */
439
+ const BADGE_GLYPH_SIZE = 19;
440
+ /** The hero block's large current-account avatar. */
441
+ const HERO_AVATAR_SIZE = 72;
442
+
443
+ /**
444
+ * The hero's address line, shown under the "Hi, <name>!" greeting: the account's
445
+ * canonical `@oxy.so` email when it has one, else its normalized `@handle`. Never
446
+ * synthesizes a `username@oxy.so` address (the identity contract forbids it) — a
447
+ * non-Oxy or missing email falls back to `getNormalizedUserHandle`.
448
+ */
449
+ function heroAddressLine(account) {
450
+ if (account.email?.toLowerCase().endsWith('@oxy.so')) {
451
+ return account.email;
452
+ }
453
+ const handle = (0, _core.getNormalizedUserHandle)(account.user);
454
+ return handle ? `@${handle}` : null;
455
+ }
456
+ /** Avatars shown in the switch row's facepile before it collapses into `+N`. */
457
+ const FACEPILE_MAX = 2;
458
+ /** Facepile avatar diameter — one clear step down from a switch-list avatar. */
459
+ const FACEPILE_AVATAR_SIZE = 32;
460
+ /**
461
+ * Facepile overlap. Well under Bloom's `size / 3` default: the stack draws the
462
+ * FIRST item on top, so a deep overlap would bury the trailing `+N` chip's own
463
+ * label under the avatar before it.
464
+ */
465
+ const FACEPILE_OVERLAP = 4;
466
+
467
+ /**
468
+ * `bytes` → `"11.6 GB"`. Whole plan sizes read as whole numbers (`"17 GB"`, not
469
+ * `"17.0 GB"`), and anything ≥ 100 GB drops the decimal entirely.
470
+ */
471
+ function formatStorageGb(bytes) {
472
+ const gb = bytes / 1024 ** 3;
473
+ if (gb >= 100 || Number.isInteger(gb)) return `${Math.round(gb)} GB`;
474
+ return `${gb.toFixed(1)} GB`;
475
+ }
476
+ /**
477
+ * A `Pressable` that appends a hover-tint NativeWind token while pointer-hovered.
478
+ * The Metro web pipeline here does NOT emit NativeWind `hover:` variants, so hover
479
+ * is driven by RN's cross-platform `onHoverIn`/`onHoverOut` (they fire only on web
480
+ * via react-native-web; a no-op on native) toggling a plain background token —
481
+ * the tint stays a NativeWind class, only the trigger is JS.
482
+ */
483
+ const HoverPressable = ({
484
+ baseClassName,
485
+ hoverClassName,
486
+ ...rest
487
+ }) => {
488
+ const [hovered, setHovered] = (0, _react.useState)(false);
489
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
490
+ ...rest,
491
+ className: hovered ? `${baseClassName} ${hoverClassName}` : baseClassName,
492
+ onHoverIn: () => setHovered(true),
493
+ onHoverOut: () => setHovered(false)
494
+ });
495
+ };
496
+
497
+ /**
498
+ * The signed-in Oxy account MENU — a Google-account-menu-style full menu built
499
+ * entirely with NativeWind `className` (the dynamic per-account accent hex is
500
+ * the one inline style NativeWind can't express). Structure mirrors the
501
+ * approved demo:
502
+ * - ACCOUNT on its own distinct panel surface: a COMPACT current-account row
503
+ * (avatar + name + email + expand chevron) that toggles the switch list, a
504
+ * "Manage your Oxy account" pill, and — when expanded — the other switchable
505
+ * accounts + "Add another account" + "Manage accounts on this device".
506
+ * - OXY STORAGE: cloud + used/total + a progress bar + Upgrade / Manage chips.
507
+ * - MENU rows: Your data in Oxy · Oxy settings · Help & feedback · Sign out —
508
+ * Bloom's grouped section (`SettingsListGroup`/`SettingsListItem`), the same
509
+ * component every other SDK settings surface uses, not a local row copy.
510
+ * - FOOTER: Privacy Policy · Terms of Service.
511
+ *
512
+ * All three blocks share ONE rhythm taken from that grouped section: a 12px
513
+ * content inset, a 12px gap after the leading element, 16px between blocks, and
514
+ * a 16px trailing chevron column.
515
+ *
516
+ * Collapse state is a plain `useState` toggled in the current row's press
517
+ * handler — no effect hook, no derived-from-props sync. With only ONE account
518
+ * (nothing to switch to) the chevron is hidden and the list renders inline so
519
+ * "Add another account" stays reachable without a pointless toggle.
520
+ */
304
521
  const AccountsView = ({
305
522
  snapshot,
306
523
  theme,
307
524
  t,
308
- handlers
525
+ handlers,
526
+ storage,
527
+ menu
309
528
  }) => {
529
+ const [expanded, setExpanded] = (0, _react.useState)(false);
530
+ // Measured natural height of the switch list, so the reveal animates to an
531
+ // exact height (and the content below reflows down smoothly) instead of a
532
+ // guessed max. The measuring wrapper is style-based, NOT className'd — on
533
+ // RN-Web `onLayout` never fires for className'd Views (see AGENTS.md).
534
+ const [listContentHeight, setListContentHeight] = (0, _react.useState)(0);
535
+ // 0 = collapsed, 1 = expanded. Set imperatively in the toggle handler (no
536
+ // effect hook). On RN-Web there is no worklets plugin, so every shared value a
537
+ // mapper reads MUST be in its deps array or it freezes on the first frame
538
+ // (AGENTS.md "Reanimated (web)").
539
+ const listProgress = (0, _reactNativeReanimated.useSharedValue)(0);
540
+ const listStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
541
+ height: listProgress.value * listContentHeight,
542
+ opacity: listProgress.value
543
+ }), [listProgress, listContentHeight]);
544
+ const chevronStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
545
+ transform: [{
546
+ rotate: `${listProgress.value * 180}deg`
547
+ }]
548
+ }), [listProgress]);
549
+ // Collapsed, the switch card is a single row and reads as a PILL; opened, it
550
+ // becomes a card holding rows and takes the grouped-section corner. The corner
551
+ // is driven off the SAME `listProgress` as the reveal — but clamped to its
552
+ // opening fraction, so it resolves early instead of trailing the rows: the
553
+ // card already reads as a card by the time they are visible. Collapsing is the
554
+ // mirror image, the pill returning over the closing tail.
555
+ const switchCardStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
556
+ borderRadius: (0, _reactNativeReanimated.interpolate)(listProgress.value, [0, SWITCH_CARD_RADIUS_SETTLE], [SWITCH_CARD_PILL_RADIUS, SWITCH_CARD_RADIUS], _reactNativeReanimated.Extrapolation.CLAMP)
557
+ }), [listProgress]);
558
+ // `CompositionBar` ships as an interactive breakdown: a selected segment
559
+ // replaces its hint line with that segment's readout. Tapping the selected one
560
+ // again clears it.
561
+ const [storageSegment, setStorageSegment] = (0, _react.useState)(null);
562
+ const toggleStorageSegment = (0, _react.useCallback)(key => setStorageSegment(previous => previous === key ? null : key), []);
563
+ const toggleExpanded = (0, _react.useCallback)(() => {
564
+ const next = !expanded;
565
+ setExpanded(next);
566
+ listProgress.value = (0, _reactNativeReanimated.withTiming)(next ? 1 : 0, {
567
+ duration: 240
568
+ });
569
+ }, [expanded, listProgress]);
310
570
  if (snapshot.loading && snapshot.accounts.length === 0) {
311
571
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
312
- style: _oxyAuthChooserStyles.authChooserStyles.centeredBlock,
572
+ className: "items-center justify-center gap-space-12 py-space-24",
313
573
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
314
574
  name: "loading",
315
575
  size: 24,
316
576
  color: theme.colors.textSecondary
317
577
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
318
- style: [_oxyAuthChooserStyles.authChooserStyles.mutedText, {
319
- color: theme.colors.textSecondary
320
- }],
321
- children: t('accountSwitcher.loading') || 'Loading accounts…'
578
+ className: "text-body text-text-secondary text-center",
579
+ children: t('accountSwitcher.loading')
322
580
  })]
323
581
  });
324
582
  }
325
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
326
- 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
- }],
583
+ const switchingDisabled = snapshot.switchingAccountId !== null;
584
+ const current = snapshot.accounts.find(account => account.isCurrent) ?? snapshot.accounts[0];
585
+ const others = current ? snapshot.accounts.filter(account => account.accountId !== current.accountId) : snapshot.accounts;
586
+ const currentAccent = current ? resolveAccentHex(current.color, theme.colors.primary) : theme.colors.primary;
587
+ // The hero's address line under the greeting: the account's canonical @oxy.so
588
+ // email when it has one, else its normalized `@handle` (never a synthesized
589
+ // `username@oxy.so`, per the identity contract — `getNormalizedUserHandle`).
590
+ const currentAddress = current ? heroAddressLine(current) : null;
591
+ // The switch list repeats the CURRENT account (first, ringed) — unlike the old
592
+ // compact header it is not represented anywhere else once the hero moved out
593
+ // of the card, and the list is where you switch back to it.
594
+ const switchableAccounts = current ? [current, ...others] : others;
595
+ const facepile = switchableAccounts.map(account => ({
596
+ id: account.accountId,
597
+ uri: account.avatarUrl ?? undefined,
598
+ displayName: account.displayName
599
+ }));
600
+
601
+ // Used vs free is a two-part COMPOSITION (the parts always fill the bar), not
602
+ // a progress value — exactly what Bloom's `CompositionBar` models. Both colors
603
+ // are theme tokens, so the bar is correct in light and dark.
604
+ const storageCategories = storage ? [{
605
+ key: 'used',
606
+ name: t('accountMenu.storage.used'),
607
+ amount: storage.usedBytes,
608
+ color: theme.colors.primary
609
+ }, {
610
+ key: 'free',
611
+ name: t('accountMenu.storage.free'),
612
+ amount: Math.max(0, storage.limitBytes - storage.usedBytes),
613
+ color: theme.colors.contrast50
614
+ }] : [];
615
+ const usageLabel = storage ? t('accountMenu.storage.usage', {
616
+ used: formatStorageGb(storage.usedBytes),
617
+ total: formatStorageGb(storage.limitBytes)
618
+ }) : t('accountMenu.storage.unavailable');
619
+
620
+ // The switch list body, revealed under the "Switch account" row. Own markup,
621
+ // not a Bloom grouped section: this is not a list of settings rows and the
622
+ // component is not a card container. It mirrors the section's rhythm by hand —
623
+ // 12px content inset, 12px after the avatar, a hairline between rows — and
624
+ // draws those hairlines INSIDE the animated clip, so a collapsed list never
625
+ // strands one against the header row.
626
+ const listItems = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
627
+ children: [switchableAccounts.map((account, index) => {
628
+ const accent = resolveAccentHex(account.color, theme.colors.primary);
629
+ const isSwitching = snapshot.switchingAccountId === account.accountId;
630
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
631
+ children: [index > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
632
+ className: "h-px bg-border opacity-30 ml-space-12"
633
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(HoverPressable, {
634
+ baseClassName: `flex-row items-center gap-space-12 px-space-12 py-[10px]${switchingDisabled ? ' opacity-60' : ''}`,
635
+ hoverClassName: "bg-fill-secondary",
636
+ onPress: () => handlers.onSwitch(account.accountId),
637
+ disabled: switchingDisabled,
638
+ accessibilityRole: "button",
639
+ accessibilityLabel: account.displayName,
640
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
641
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_avatar.Avatar, {
642
+ source: account.avatarUrl ?? undefined,
643
+ variant: "thumb",
644
+ name: account.displayName,
645
+ size: SWITCH_AVATAR_SIZE
646
+ }), account.isCurrent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
647
+ style: [_oxyAuthChooserStyles.authChooserStyles.currentAvatarRing, {
648
+ borderColor: accent
649
+ }],
650
+ pointerEvents: "none"
651
+ }) : null]
652
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
653
+ className: "flex-1 min-w-0",
654
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
655
+ className: "text-body font-semibold text-text",
656
+ numberOfLines: 1,
657
+ children: account.displayName
658
+ }), account.email ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
659
+ className: "text-caption text-text-secondary",
660
+ numberOfLines: 1,
661
+ children: account.email
662
+ }) : null]
663
+ }), isSwitching ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
664
+ name: "loading",
665
+ size: 20,
666
+ color: accent
667
+ }) : null]
668
+ })]
669
+ }, account.accountId);
670
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
671
+ className: "h-px bg-border opacity-30 ml-space-12"
672
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(AccountAffordanceRow, {
673
+ icon: "plus",
674
+ label: t('accountMenu.addAnother'),
337
675
  onPress: handlers.onAdd,
338
- accessibilityRole: "button",
339
- accessibilityLabel: t('signin.addAccountTitle') || 'Add another account',
340
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
341
- style: [_oxyAuthChooserStyles.authChooserStyles.addBadge, {
342
- borderColor: theme.colors.border
343
- }],
344
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
345
- name: "plus",
346
- size: 20,
347
- color: theme.colors.textSecondary
348
- })
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
- })]
676
+ disabled: switchingDisabled,
677
+ theme: theme
355
678
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
356
- style: _oxyAuthChooserStyles.authChooserStyles.footerLinks,
357
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
679
+ className: "h-px bg-border opacity-30 ml-space-12"
680
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(AccountAffordanceRow, {
681
+ icon: "account-multiple-outline",
682
+ label: t('accountSwitcher.manageOnDevice'),
683
+ onPress: handlers.onManage,
684
+ disabled: switchingDisabled,
685
+ theme: theme
686
+ })]
687
+ });
688
+ const manageLabel = t('accountMenu.manage');
689
+ const switchLabel = t('accountMenu.switchAccount');
690
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
691
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
692
+ style: _oxyAuthChooserStyles.authChooserStyles.hero,
693
+ children: [current ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
694
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_pressableScale.PressableScale, {
695
+ onPress: handlers.onEditAvatar,
696
+ accessibilityRole: "button",
697
+ accessibilityLabel: t('editProfile.changeAvatar'),
698
+ style: _oxyAuthChooserStyles.authChooserStyles.heroAvatarPressable,
699
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_avatar.Avatar, {
700
+ source: current.avatarUrl ?? undefined,
701
+ name: current.displayName,
702
+ size: HERO_AVATAR_SIZE
703
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
704
+ style: [_oxyAuthChooserStyles.authChooserStyles.heroAvatarRing, {
705
+ borderColor: currentAccent
706
+ }],
707
+ pointerEvents: "none"
708
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AvatarCameraBadge.default, {})]
709
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
710
+ style: _oxyAuthChooserStyles.authChooserStyles.heroNameBlock,
711
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
712
+ style: [_oxyAuthChooserStyles.authChooserStyles.heroGreeting, {
713
+ color: theme.colors.text
714
+ }],
715
+ numberOfLines: 2,
716
+ children: t('accountMenu.greeting', {
717
+ name: current.displayName
718
+ })
719
+ }), currentAddress ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
720
+ style: [_oxyAuthChooserStyles.authChooserStyles.heroAddress, {
721
+ color: theme.colors.textSecondary
722
+ }],
723
+ numberOfLines: 1,
724
+ children: currentAddress
725
+ }) : null]
726
+ })]
727
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
728
+ variant: "secondary",
729
+ size: "small",
358
730
  onPress: handlers.onManage,
359
- accessibilityRole: "button",
360
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
361
- style: [_oxyAuthChooserStyles.authChooserStyles.linkText, {
362
- color: theme.colors.primary
731
+ accessibilityLabel: manageLabel,
732
+ children: manageLabel
733
+ })]
734
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
735
+ className: "bg-fill overflow-hidden mb-space-16",
736
+ style: switchCardStyle,
737
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(HoverPressable, {
738
+ baseClassName: `flex-row items-center gap-space-12 px-space-12 py-[10px] min-h-[44px]${switchingDisabled ? ' opacity-60' : ''}`,
739
+ hoverClassName: "bg-fill-secondary",
740
+ onPress: toggleExpanded,
741
+ disabled: switchingDisabled,
742
+ accessibilityRole: "button"
743
+ // The ARIA prop, not `accessibilityState`: react-native-web 0.21
744
+ // forwards only this one, and RN maps it to
745
+ // `accessibilityState.expanded` natively — so the disclosure state
746
+ // reaches assistive tech on BOTH platforms.
747
+ ,
748
+ "aria-expanded": expanded,
749
+ accessibilityLabel: switchLabel,
750
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
751
+ className: "flex-1 text-body text-text",
752
+ numberOfLines: 1,
753
+ children: switchLabel
754
+ }), expanded ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_avatarGroup.AvatarGroup, {
755
+ items: facepile,
756
+ layout: "stack",
757
+ size: FACEPILE_AVATAR_SIZE,
758
+ max: FACEPILE_MAX,
759
+ overlap: FACEPILE_OVERLAP,
760
+ variant: "thumb",
761
+ showInitials: true,
762
+ ringColor: theme.colors.card
763
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
764
+ style: [_oxyAuthChooserStyles.authChooserStyles.chevronCircle, {
765
+ backgroundColor: theme.colors.contrast50
363
766
  }],
364
- children: t('accountMenu.manage') || 'Manage accounts'
767
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
768
+ style: chevronStyle,
769
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
770
+ name: "chevron-down",
771
+ size: 20,
772
+ color: theme.colors.text
773
+ })
774
+ })
775
+ })]
776
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
777
+ style: [_oxyAuthChooserStyles.authChooserStyles.collapse, listStyle],
778
+ pointerEvents: expanded ? 'auto' : 'none',
779
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
780
+ style: _oxyAuthChooserStyles.authChooserStyles.collapseMeasure,
781
+ onLayout: event => setListContentHeight(event.nativeEvent.layout.height),
782
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
783
+ children: listItems
784
+ })
365
785
  })
366
- })
786
+ })]
787
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
788
+ className: "bg-fill rounded-[16px] overflow-hidden mb-space-16 px-space-12 py-[10px] gap-space-12",
789
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
790
+ className: "flex-row items-center gap-space-12 min-h-[24px]",
791
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
792
+ className: "w-[20px] items-center",
793
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
794
+ name: "cloud-outline",
795
+ size: ROW_ICON_SIZE,
796
+ color: theme.colors.textSecondary
797
+ })
798
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
799
+ className: "flex-1 text-body font-semibold text-text",
800
+ numberOfLines: 1,
801
+ children: t('accountMenu.storage.title')
802
+ })]
803
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_compositionBar.CompositionBar, {
804
+ categories: storageCategories,
805
+ selectedKey: storageSegment,
806
+ onSelect: toggleStorageSegment,
807
+ hintLabel: usageLabel,
808
+ formatReadout: (bytes, percent) => `${formatStorageGb(bytes)} · ${percent}%`
809
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
810
+ className: "flex-row gap-space-8",
811
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StorageChip, {
812
+ label: t('accountMenu.storage.upgrade'),
813
+ onPress: menu.onUpgradeStorage
814
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(StorageChip, {
815
+ label: t('accountMenu.storage.manage'),
816
+ onPress: menu.onManageStorage
817
+ })]
818
+ })]
819
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_settingsList.SettingsListGroup, {
820
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
821
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(MenuIcon, {
822
+ name: "tray-arrow-down",
823
+ theme: theme
824
+ }),
825
+ title: t('accountMenu.data'),
826
+ onPress: menu.onOpenData
827
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
828
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(MenuIcon, {
829
+ name: "cog-outline",
830
+ theme: theme
831
+ }),
832
+ title: t('accountMenu.settings'),
833
+ onPress: menu.onOpenSettings
834
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
835
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(MenuIcon, {
836
+ name: "help-circle-outline",
837
+ theme: theme
838
+ }),
839
+ title: t('accountMenu.help'),
840
+ onPress: menu.onHelp
841
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
842
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(MenuIcon, {
843
+ name: "logout",
844
+ theme: theme
845
+ }),
846
+ title: t('accountMenu.signOut'),
847
+ onPress: menu.onSignOut,
848
+ showChevron: false
849
+ })]
850
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
851
+ className: "flex-row items-center justify-center gap-space-12 px-space-12 pb-space-8",
852
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
853
+ onPress: menu.onPrivacy,
854
+ accessibilityRole: "link",
855
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
856
+ className: "text-bodySmall text-text-secondary",
857
+ children: t('accountMenu.privacy')
858
+ })
859
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
860
+ className: "text-bodySmall text-text-tertiary",
861
+ children: "\xB7"
862
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
863
+ onPress: menu.onTerms,
864
+ accessibilityRole: "link",
865
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
866
+ className: "text-bodySmall text-text-secondary",
867
+ children: t('accountMenu.terms')
868
+ })
869
+ })]
367
870
  })]
368
871
  });
369
872
  };
873
+
874
+ // ---------------------------------------------------------------------------
875
+ // Account-menu row building blocks (NativeWind)
876
+ // ---------------------------------------------------------------------------
877
+
878
+ /**
879
+ * An account-list AFFORDANCE row ("Add another account", "Manage accounts on
880
+ * this device") — a bordered circle sized to the avatar it stands in for, so its
881
+ * label lands on the same line as every account name above it. Own markup, like
882
+ * the account rows it closes: this list is not a Bloom grouped section.
883
+ */
884
+ const AccountAffordanceRow = ({
885
+ icon,
886
+ label,
887
+ onPress,
888
+ disabled,
889
+ theme
890
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(HoverPressable, {
891
+ baseClassName: `flex-row items-center gap-space-12 px-space-12 py-[10px]${disabled ? ' opacity-60' : ''}`,
892
+ hoverClassName: "bg-fill-secondary",
893
+ onPress: onPress,
894
+ disabled: disabled,
895
+ accessibilityRole: "button",
896
+ accessibilityLabel: label,
897
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
898
+ className: "w-[36px] h-[36px] items-center justify-center rounded-radius-max border border-border",
899
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
900
+ name: icon,
901
+ size: BADGE_GLYPH_SIZE,
902
+ color: theme.colors.textSecondary
903
+ })
904
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
905
+ className: "flex-1 text-body font-semibold text-text",
906
+ numberOfLines: 1,
907
+ children: label
908
+ })]
909
+ });
910
+
911
+ /**
912
+ * The leading glyph for a grouped-section menu row, sized to Bloom's 20px icon
913
+ * column so the icons, the storage block's cloud and every row title align.
914
+ */
915
+ const MenuIcon = ({
916
+ name,
917
+ theme
918
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
919
+ name: name,
920
+ size: ROW_ICON_SIZE,
921
+ color: theme.colors.textSecondary
922
+ });
923
+
924
+ /** A storage action chip — a bordered pill on the sheet background. */
925
+ const StorageChip = ({
926
+ label,
927
+ onPress
928
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(HoverPressable, {
929
+ baseClassName: "rounded-radius-max border border-border bg-bg py-[9px] px-[14px]",
930
+ hoverClassName: "bg-fill-secondary",
931
+ onPress: onPress,
932
+ accessibilityRole: "button",
933
+ accessibilityLabel: label,
934
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
935
+ className: "text-bodySmall font-semibold text-text",
936
+ children: label
937
+ })
938
+ });
370
939
  const AccountRow = ({
371
940
  account,
372
941
  theme,
@@ -435,9 +1004,9 @@ const AccountRow = ({
435
1004
  };
436
1005
 
437
1006
  // ---------------------------------------------------------------------------
438
- // Sign-in view (add / signin) — NATIVE-facing today: on web the auto-start
439
- // effect above moves the view to `qr` almost immediately, so this renders
440
- // only for a brief instant there.
1007
+ // Sign-in view (add / signin) — NATIVE-facing today: on web `autoStartSignIn`
1008
+ // (fired from the subscribe pass / the add / back-to-sign-in handlers) moves the
1009
+ // view to `qr` almost immediately, so this renders only for a brief instant there.
441
1010
  // ---------------------------------------------------------------------------
442
1011
 
443
1012
  const SignInView = ({