@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
@@ -3,20 +3,71 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.PHOTOS_PER_ROW = void 0;
7
+ exports.chunkPhotos = chunkPhotos;
6
8
  exports.default = void 0;
7
9
  var _react = _interopRequireWildcard(require("react"));
8
10
  var _reactNative = require("react-native");
11
+ var _reactQuery = require("@tanstack/react-query");
9
12
  var _jsxRuntime = require("react/jsx-runtime");
10
13
  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); }
14
+ /** Stable empty map so an unresolved query yields a referentially-stable value. */
15
+ const EMPTY_DIMENSIONS = {};
16
+
17
+ /**
18
+ * Measure the intrinsic size of every photo whose thumbnail URL has resolved,
19
+ * via `Image.getSize`. Pure/async (no React state) so it can be a React Query
20
+ * `queryFn`. Photos without a resolved URL are skipped and re-measured on the
21
+ * next signature change; a load error falls back to 1×1 (→ the 4/3 default).
22
+ */
23
+ async function measurePhotoDimensions(photos, getThumbUrl) {
24
+ const measured = {};
25
+ await Promise.all(photos.map(photo => new Promise(resolve => {
26
+ const url = getThumbUrl(photo);
27
+ if (!url) {
28
+ resolve();
29
+ return;
30
+ }
31
+ _reactNative.Image.getSize(url, (width, height) => {
32
+ measured[photo.id] = {
33
+ width,
34
+ height
35
+ };
36
+ resolve();
37
+ }, () => {
38
+ measured[photo.id] = {
39
+ width: 1,
40
+ height: 1
41
+ };
42
+ resolve();
43
+ });
44
+ })));
45
+ return measured;
46
+ }
47
+
48
+ /** Fixed photos-per-row for the justified grid (Apple Photos-style trio). */
49
+ const PHOTOS_PER_ROW = exports.PHOTOS_PER_ROW = 3;
50
+
51
+ /** Chunk a photo list into fixed-length rows (last row may be short). */
52
+ function chunkPhotos(photos, perRow) {
53
+ const rows = [];
54
+ for (let i = 0; i < photos.length; i += perRow) {
55
+ rows.push(photos.slice(i, i + perRow));
56
+ }
57
+ return rows;
58
+ }
11
59
  /**
12
60
  * Responsive justified photo grid that stretches to the provided containerWidth.
13
61
  * Uses flex rows with proportional children widths instead of absolute pixel widths so it always fills.
62
+ *
63
+ * Owns its own intrinsic-dimension measurement: it calls `Image.getSize` on each
64
+ * photo's resolved thumbnail URL and reflows once real aspect ratios are known
65
+ * (falling back to 4/3 until then). Measurement re-runs whenever a photo is added
66
+ * OR its (asynchronously-resolved) private-safe URL first appears.
14
67
  */
15
68
  const JustifiedPhotoGrid = ({
16
69
  photos,
17
- photoDimensions,
18
- loadPhotoDimensions,
19
- createJustifiedRows,
70
+ getThumbUrl,
20
71
  renderJustifiedPhotoItem,
21
72
  textColor,
22
73
  containerWidth: explicitWidth,
@@ -40,11 +91,24 @@ const JustifiedPhotoGrid = ({
40
91
  const w = e.nativeEvent.layout.width;
41
92
  setMeasuredWidth(prev => prev === w ? prev : w);
42
93
  }, [resolvedExplicitWidth]);
43
- // Ensure dimensions are loaded for displayed photos
44
- (0, _react.useEffect)(() => {
45
- loadPhotoDimensions(photos);
46
- // eslint-disable-next-line react-hooks/exhaustive-deps
47
- }, [photos.map(p => p.id).join(',')]);
94
+
95
+ // Signature of every photo id + its currently-resolved URL — the measurement
96
+ // query key. A private tile's URL resolves asynchronously after it enters the
97
+ // list, so keying on THIS (not just the photo set) re-measures the moment a
98
+ // URL lands, not just when photos are added.
99
+ const urlSignature = (0, _react.useMemo)(() => photos.map(p => `${p.id}:${getThumbUrl(p) ?? ''}`).join('|'), [photos, getThumbUrl]);
100
+
101
+ // Intrinsic dimensions via React Query (no effect): re-runs when the signature
102
+ // changes and reflows the justified rows. `keepPreviousData` holds the last
103
+ // measured map during a re-measure so tiles never flash back to the 4/3 default.
104
+ const dimensionsQuery = (0, _reactQuery.useQuery)({
105
+ queryKey: ['justifiedPhotoDimensions', urlSignature],
106
+ queryFn: () => measurePhotoDimensions(photos, getThumbUrl),
107
+ placeholderData: _reactQuery.keepPreviousData,
108
+ staleTime: Number.POSITIVE_INFINITY,
109
+ gcTime: 5 * 60 * 1000
110
+ });
111
+ const photoDimensions = dimensionsQuery.data ?? EMPTY_DIMENSIONS;
48
112
 
49
113
  // Group photos by date first
50
114
  const photosByDate = (0, _react.useMemo)(() => {
@@ -72,10 +136,9 @@ const JustifiedPhotoGrid = ({
72
136
  onLayout: onLayoutContainer,
73
137
  children: sortedDates.map(date => {
74
138
  const dayPhotos = photosByDate[date];
75
- // createJustifiedRows should build rows such that the "ideal" height (availableWidth / totalAspect) stays within min/max.
76
- // We pass the effective container width.
77
- const dateWidth = dateWidths[date] ?? effectiveWidth; // fallback to overall width until measured
78
- const rows = dateWidth > 0 ? createJustifiedRows(dayPhotos, dateWidth) : [];
139
+ // Fall back to the overall width until this section is measured.
140
+ const dateWidth = dateWidths[date] ?? effectiveWidth;
141
+ const rows = dateWidth > 0 ? chunkPhotos(dayPhotos, PHOTOS_PER_ROW) : [];
79
142
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
80
143
  style: {
81
144
  marginBottom: 24,
@@ -100,7 +163,7 @@ const JustifiedPhotoGrid = ({
100
163
  width: '100%'
101
164
  },
102
165
  children: rows.map((row, rowIndex) => {
103
- // Compute total aspect ratios using loaded dimensions (fallback 4/3)
166
+ // Total aspect ratio of the row, using measured dims (fallback 4/3).
104
167
  const aspects = row.map(p => {
105
168
  const dims = photoDimensions[p.id];
106
169
  return dims ? dims.width / dims.height : 4 / 3;
@@ -108,32 +171,29 @@ const JustifiedPhotoGrid = ({
108
171
  const totalAspect = aspects.reduce((a, b) => a + b, 0);
109
172
  const gapsTotal = gap * (row.length - 1);
110
173
  const availableWidth = dateWidth - gapsTotal;
111
- // Ideal height that perfectly fills width when preserving aspect ratios
174
+ // Ideal height that perfectly fills width when preserving aspect ratios.
112
175
  const idealHeight = availableWidth / totalAspect;
113
- // We rely on row construction keeping idealHeight within min/max bounds; if not, clamp but then distribute leftover/overflow.
176
+ // Clamp to min/max, then distribute the leftover/overflow proportionally.
114
177
  let rowHeight = idealHeight;
115
- let widthAdjustment = 0; // difference to distribute if clamped
178
+ let widthAdjustment = 0;
116
179
  if (idealHeight < minRowHeight) {
117
180
  rowHeight = minRowHeight;
118
- widthAdjustment = availableWidth - rowHeight * totalAspect; // negative means overflow
181
+ widthAdjustment = availableWidth - rowHeight * totalAspect;
119
182
  } else if (idealHeight > maxRowHeight) {
120
183
  rowHeight = maxRowHeight;
121
184
  widthAdjustment = availableWidth - rowHeight * totalAspect;
122
185
  }
123
-
124
- // Pre-compute widths maintaining aspect ratios
125
186
  let widths = aspects.map(ar => ar * rowHeight);
126
- // If we have widthAdjustment (due to clamping) distribute proportionally so row still fills exactly
127
187
  if (widthAdjustment !== 0) {
128
188
  const widthSum = widths.reduce((a, b) => a + b, 0);
129
189
  widths = widths.map(w => w + w / widthSum * widthAdjustment);
130
190
  }
131
191
 
132
- // To combat rounding issues, adjust last item width to fill precisely
192
+ // Correct any rounding drift on the last tile so the row fills exactly.
133
193
  const widthSumRounded = widths.reduce((a, b) => a + b, 0);
134
194
  const roundingDiff = availableWidth - widthSumRounded;
135
195
  if (Math.abs(roundingDiff) > 0.5) {
136
- widths[widths.length - 1] += roundingDiff; // minimal correction
196
+ widths[widths.length - 1] += roundingDiff;
137
197
  }
138
198
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
139
199
  style: {
@@ -152,7 +212,7 @@ const JustifiedPhotoGrid = ({
152
212
  children: renderJustifiedPhotoItem(p, photoWidth, rowHeight, i === row.length - 1)
153
213
  }, p.id);
154
214
  })
155
- }, rowIndex);
215
+ }, row[0]?.id ?? rowIndex);
156
216
  })
157
217
  })]
158
218
  }, date);
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","JustifiedPhotoGrid","photos","photoDimensions","loadPhotoDimensions","createJustifiedRows","renderJustifiedPhotoItem","textColor","containerWidth","explicitWidth","gap","minRowHeight","maxRowHeight","dateFormatLocale","width","windowWidth","useWindowDimensions","measuredWidth","setMeasuredWidth","useState","resolvedExplicitWidth","resolvedMeasuredWidth","effectiveWidth","onLayoutContainer","useCallback","w","nativeEvent","layout","prev","useEffect","map","p","id","join","photosByDate","useMemo","reduce","groups","photo","date","Date","uploadDate","toDateString","push","sortedDates","keys","sort","a","b","getTime","dateWidths","setDateWidths","onLayoutDate","jsx","View","style","onLayout","children","dayPhotos","dateWidth","rows","jsxs","marginBottom","Text","fontSize","fontWeight","color","toLocaleDateString","weekday","year","month","day","row","rowIndex","aspects","dims","height","totalAspect","gapsTotal","length","availableWidth","idealHeight","rowHeight","widthAdjustment","widths","ar","widthSum","widthSumRounded","roundingDiff","Math","abs","flexDirection","photoWidth","marginRight","_default","exports","React","memo"],"sourceRoot":"../../../../../src","sources":["ui/components/photogrid/JustifiedPhotoGrid.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAuF,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,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AAA,EAACzE,YAAA,CAAA0E,IAAI;kBAEDC,KAAK,EAAE;oBAAEzC,KAAK,EAAE8E,UAAU;oBAAEhB,MAAM,EAAEM,SAAS;oBAAEW,WAAW,EAAExG,CAAC,KAAKmF,GAAG,CAACO,MAAM,GAAG,CAAC,GAAG,CAAC,GAAGrE;kBAAI,CAAE;kBAAA+C,QAAA,EAE5FnD,wBAAwB,CAACyB,CAAC,EAAE6D,UAAU,EAAEV,SAAS,EAAE7F,CAAC,KAAKmF,GAAG,CAACO,MAAM,GAAG,CAAC;gBAAC,GAHpEhD,CAAC,CAACC,EAIL,CAAC;cAEf,CAAC;YAAC,GAXKyC,QAYL,CAAC;UAEf,CAAC;QAAC,CACA,CAAC;MAAA,GA7DFlC,IA8DH,CAAC;IAEf,CAAC;EAAC,CACR,CAAC;AAEf,CAAC;AAAC,IAAAuD,QAAA,GAAAC,OAAA,CAAAvG,OAAA,gBAEawG,cAAK,CAACC,IAAI,CAAChG,kBAAkB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactQuery","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EMPTY_DIMENSIONS","measurePhotoDimensions","photos","getThumbUrl","measured","Promise","all","map","photo","resolve","url","Image","getSize","width","height","id","PHOTOS_PER_ROW","exports","chunkPhotos","perRow","rows","length","push","slice","JustifiedPhotoGrid","renderJustifiedPhotoItem","textColor","containerWidth","explicitWidth","gap","minRowHeight","maxRowHeight","dateFormatLocale","windowWidth","useWindowDimensions","measuredWidth","setMeasuredWidth","useState","resolvedExplicitWidth","resolvedMeasuredWidth","effectiveWidth","onLayoutContainer","useCallback","w","nativeEvent","layout","prev","urlSignature","useMemo","p","join","dimensionsQuery","useQuery","queryKey","queryFn","placeholderData","keepPreviousData","staleTime","Number","POSITIVE_INFINITY","gcTime","photoDimensions","data","photosByDate","reduce","groups","date","Date","uploadDate","toDateString","sortedDates","keys","sort","a","b","getTime","dateWidths","setDateWidths","onLayoutDate","jsx","View","style","onLayout","children","dayPhotos","dateWidth","jsxs","marginBottom","Text","fontSize","fontWeight","color","toLocaleDateString","weekday","year","month","day","row","rowIndex","aspects","dims","totalAspect","gapsTotal","availableWidth","idealHeight","rowHeight","widthAdjustment","widths","ar","widthSum","widthSumRounded","roundingDiff","Math","abs","flexDirection","photoWidth","marginRight","_default","React","memo"],"sourceRoot":"../../../../../src","sources":["ui/components/photogrid/JustifiedPhotoGrid.tsx"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAmE,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CA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E;cAAAJ,QAAA,EAC9Fc,GAAG,CAAC1F,GAAG,CAAC,CAAC0C,CAAC,EAAE7D,CAAC,KAAK;gBACf,MAAM+H,UAAU,GAAGR,MAAM,CAACvH,CAAC,CAAC;gBAC5B,oBACI,IAAAR,WAAA,CAAAmG,GAAA,EAACrG,YAAA,CAAAsG,IAAI;kBAEDC,KAAK,EAAE;oBAAEpE,KAAK,EAAEsG,UAAU;oBAAErG,MAAM,EAAE2F,SAAS;oBAAEW,WAAW,EAAEhI,CAAC,KAAK6G,GAAG,CAAC5E,MAAM,GAAG,CAAC,GAAG,CAAC,GAAGQ;kBAAI,CAAE;kBAAAsD,QAAA,EAE5F1D,wBAAwB,CAACwB,CAAC,EAAEkE,UAAU,EAAEV,SAAS,EAAErH,CAAC,KAAK6G,GAAG,CAAC5E,MAAM,GAAG,CAAC;gBAAC,GAHpE4B,CAAC,CAAClC,EAIL,CAAC;cAEf,CAAC;YAAC,GAXKkF,GAAG,CAAC,CAAC,CAAC,EAAElF,EAAE,IAAImF,QAYnB,CAAC;UAEf,CAAC;QAAC,CACA,CAAC;MAAA,GA3DFhC,IA4DH,CAAC;IAEf,CAAC;EAAC,CACA,CAAC;AAEf,CAAC;AAAC,IAAAmD,QAAA,GAAApG,OAAA,CAAA1B,OAAA,gBAEa+H,cAAK,CAACC,IAAI,CAAC/F,kBAAkB,CAAC","ignoreList":[]}
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ActionSheetSurface = ActionSheetSurface;
7
+ exports.presentActionSheet = presentActionSheet;
8
+ var _reactNative = require("react-native");
9
+ var _button = require("@oxyhq/bloom/button");
10
+ var _theme = require("@oxyhq/bloom/theme");
11
+ var _surfaces = require("@oxyhq/bloom/surfaces");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ /**
14
+ * A single choice in an {@link ActionSheetSurface} — a labelled button that
15
+ * resolves the surface with `value` when pressed.
16
+ */
17
+
18
+ const TITLE_STYLE = {
19
+ fontSize: 22,
20
+ fontWeight: '600',
21
+ lineHeight: 30
22
+ };
23
+ const MESSAGE_STYLE = {
24
+ fontSize: 16,
25
+ lineHeight: 22
26
+ };
27
+
28
+ /**
29
+ * A multi-choice action sheet rendered as a shared-stack surface — the
30
+ * many-option counterpart to Bloom's two-way `surfaces.confirm`. Each option
31
+ * button resolves the surface's `present()` promise with that option's `value`;
32
+ * cancel / backdrop / Escape resolve `undefined`. Presented via
33
+ * {@link presentActionSheet}.
34
+ */
35
+ function ActionSheetSurface({
36
+ surface,
37
+ title,
38
+ message,
39
+ options,
40
+ cancelLabel
41
+ }) {
42
+ const theme = (0, _theme.useTheme)();
43
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
44
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
45
+ style: [TITLE_STYLE, {
46
+ color: theme.colors.text,
47
+ paddingBottom: message ? 4 : 16
48
+ }],
49
+ children: title
50
+ }), message ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
51
+ style: [MESSAGE_STYLE, {
52
+ color: theme.colors.textSecondary,
53
+ paddingBottom: 16
54
+ }],
55
+ children: message
56
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
57
+ style: {
58
+ gap: 8
59
+ },
60
+ children: [options.map(option => /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
61
+ variant: option.destructive ? 'destructive' : 'primary',
62
+ onPress: () => surface.dismiss(option.value),
63
+ children: option.label
64
+ }, option.value)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
65
+ variant: "secondary",
66
+ onPress: () => surface.dismiss(undefined),
67
+ children: cancelLabel
68
+ })]
69
+ })]
70
+ });
71
+ }
72
+
73
+ /**
74
+ * Present an {@link ActionSheetSurface} on the shared stack and resolve with the
75
+ * chosen option `value`, or `undefined` if cancelled/dismissed.
76
+ */
77
+ function presentActionSheet(options) {
78
+ return _surfaces.surfaces.present(surface => /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionSheetSurface, {
79
+ surface: surface,
80
+ ...options
81
+ }));
82
+ }
83
+ //# sourceMappingURL=ActionSheetSurface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_button","_theme","_surfaces","_jsxRuntime","TITLE_STYLE","fontSize","fontWeight","lineHeight","MESSAGE_STYLE","ActionSheetSurface","surface","title","message","options","cancelLabel","theme","useTheme","jsxs","View","children","jsx","Text","style","color","colors","text","paddingBottom","textSecondary","gap","map","option","Button","variant","destructive","onPress","dismiss","value","label","undefined","presentActionSheet","surfaces","present"],"sourceRoot":"../../../../../src","sources":["ui/components/surfaces/ActionSheetSurface.tsx"],"mappings":";;;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAAuE,IAAAI,WAAA,GAAAJ,OAAA;AAEvE;AACA;AACA;AACA;;AAqBA,MAAMK,WAAW,GAAG;EAAEC,QAAQ,EAAE,EAAE;EAAEC,UAAU,EAAE,KAAc;EAAEC,UAAU,EAAE;AAAG,CAAC;AAChF,MAAMC,aAAa,GAAG;EAAEH,QAAQ,EAAE,EAAE;EAAEE,UAAU,EAAE;AAAG,CAAC;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,kBAAkBA,CAAmB;EACjDC,OAAO;EACPC,KAAK;EACLC,OAAO;EACPC,OAAO;EACPC;AACwB,CAAC,EAAsB;EAC/C,MAAMC,KAAK,GAAG,IAAAC,eAAQ,EAAC,CAAC;EAExB,oBACI,IAAAb,WAAA,CAAAc,IAAA,EAACnB,YAAA,CAAAoB,IAAI;IAAAC,QAAA,gBACD,IAAAhB,WAAA,CAAAiB,GAAA,EAACtB,YAAA,CAAAuB,IAAI;MACDC,KAAK,EAAE,CACHlB,WAA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iB,GAAA,EAACX,kBAAkB;IAACC,OAAO,EAAEA,OAAQ;IAAA,GAAKG;EAAO,CAAG,CACvD,CAAC;AACN","ignoreList":[]}
@@ -587,10 +587,35 @@ const OxyProvider = ({
587
587
  const commitSwitchedSessionRef = (0, _react.useRef)(commitSwitchedSession);
588
588
  commitSwitchedSessionRef.current = commitSwitchedSession;
589
589
 
590
- // The live AccountDialog surface (a stacked Bloom surface), while open. Held so
590
+ // The live AccountDialog surface (a stacked Bloom surface), while open the
591
+ // SINGLE source of truth for "is the account dialog open". Held so
591
592
  // `openAccountDialog` can no-op when already open and `closeAccountDialog` /
592
- // `onSignedIn` can dismiss it. Cleared when the surface settles.
593
+ // `onSignedIn` can dismiss it. Its present→settle lifecycle is what drives the
594
+ // reactive `accountDialogOpen` mirror below: presenting flips it true, the
595
+ // surface settling (`result.finally`) flips it false — no other write site.
593
596
  const accountDialogSurfaceRef = (0, _react.useRef)(null);
597
+
598
+ // When the account dialog is shown by MORPHING an already-open route surface
599
+ // (e.g. ManageAccount → the account switcher) it is pushed as a frame ONTO that
600
+ // surface rather than presented as its own. This holds that host surface so the
601
+ // close path can pop the AccountDialog frame back to it. `null` when the dialog
602
+ // is its OWN detached surface (opened cold, with no surface underneath).
603
+ const accountDialogHostRef = (0, _react.useRef)(null);
604
+
605
+ // The single teardown for the account dialog wherever it lives: pop the morphed
606
+ // frame back to its host surface (reshaping Manage ← switcher), or dismiss the
607
+ // detached surface (whose settle then flips `accountDialogOpen`). Reads only
608
+ // stable refs + `setAccountDialogOpen`, so its identity never changes.
609
+ const dismissAccountDialogSurface = (0, _react.useCallback)(() => {
610
+ const host = accountDialogHostRef.current;
611
+ if (host) {
612
+ accountDialogHostRef.current = null;
613
+ setAccountDialogOpen(false);
614
+ host.goBack();
615
+ return;
616
+ }
617
+ accountDialogSurfaceRef.current?.dismiss();
618
+ }, []);
594
619
  const accountDialogControllerRef = (0, _react.useRef)(null);
595
620
  if (!accountDialogControllerRef.current) {
596
621
  accountDialogControllerRef.current = (0, _core.createAccountDialogController)({
@@ -604,8 +629,9 @@ const OxyProvider = ({
604
629
  commitSession: session => handleWebSessionRef.current(session),
605
630
  commitSwitchedSession: session => commitSwitchedSessionRef.current(session),
606
631
  onSignedIn: () => {
607
- accountDialogSurfaceRef.current?.dismiss();
608
- setAccountDialogOpen(false);
632
+ // Close the dialog: pop the morphed frame back to its host surface, or
633
+ // dismiss the detached surface (whose settle flips `accountDialogOpen`).
634
+ dismissAccountDialogSurface();
609
635
  },
610
636
  openUrl: url => {
611
637
  if ((0, _isWebBrowser.isWebBrowser)()) {
@@ -629,35 +655,60 @@ const OxyProvider = ({
629
655
  }
630
656
  const accountDialogController = accountDialogControllerRef.current;
631
657
  const openAccountDialog = (0, _react.useCallback)(view => {
632
- accountDialogControllerRef.current?.setView(view ?? 'accounts');
633
- // Present the AccountDialog surface on the shared Bloom stack the FIRST time
634
- // (subsequent opens just re-point the controller's view above). `presentDetached`
635
- // keeps it OUT of the `showBottomSheet` route-surface lineage, so closing the
636
- // bottom-sheet session never touches the account dialog and vice-versa.
637
- if (!accountDialogSurfaceRef.current) {
638
- const instance = (0, _surfaces.presentDetached)('AccountDialog', {
639
- initialView: view ?? 'accounts'
640
- }, {
641
- placement: {
642
- base: 'bottom',
643
- md: 'center'
644
- },
645
- dismissOnBackdrop: false,
646
- maxWidth: 420
647
- });
648
- accountDialogSurfaceRef.current = instance;
649
- instance.result.finally(() => {
650
- if (accountDialogSurfaceRef.current === instance) accountDialogSurfaceRef.current = null;
651
- setAccountDialogOpen(false);
658
+ const nextView = view ?? 'accounts';
659
+ accountDialogControllerRef.current?.setView(nextView);
660
+
661
+ // Its own detached surface is already open just re-point the view above.
662
+ if (accountDialogSurfaceRef.current) {
663
+ setAccountDialogOpen(true);
664
+ return;
665
+ }
666
+
667
+ // When a route surface (e.g. ManageAccount) is already open, MORPH it in
668
+ // place: push the AccountDialog as a frame ONTO that surface, so the panel
669
+ // reshapes from that surface to the switcher and a back returns to it. With no
670
+ // surface open (opened cold from a sign-in button), present the dialog as its
671
+ // OWN detached surface — kept OUT of the `showBottomSheet` route-surface
672
+ // lineage so closing the bottom-sheet session never touches it and vice-versa.
673
+ // `navigate` is idempotent for the top frame (it replaces rather than
674
+ // duplicates), so calling this while already morphed in just re-points the
675
+ // view, and calling it after a back re-pushes the frame — no stale guard.
676
+ const host = (0, _surfaces.topRouteSurface)();
677
+ if (host) {
678
+ accountDialogHostRef.current = host;
679
+ host.navigate('AccountDialog', {
680
+ initialView: nextView
652
681
  });
682
+ setAccountDialogOpen(true);
683
+ return;
653
684
  }
685
+ const instance = (0, _surfaces.presentDetached)('AccountDialog', {
686
+ initialView: nextView
687
+ }, {
688
+ placement: {
689
+ base: 'bottom',
690
+ md: 'center'
691
+ },
692
+ dismissOnBackdrop: false,
693
+ maxWidth: 420
694
+ });
695
+ accountDialogSurfaceRef.current = instance;
696
+ // The surface settling is the ONE place `accountDialogOpen` flips false for
697
+ // the detached path — covering every dismiss (close button, `onSignedIn`,
698
+ // programmatic `closeAccountDialog`, host unmount). The morphed path clears
699
+ // its own state in `dismissAccountDialogSurface`.
700
+ instance.result.finally(() => {
701
+ if (accountDialogSurfaceRef.current === instance) {
702
+ accountDialogSurfaceRef.current = null;
703
+ setAccountDialogOpen(false);
704
+ }
705
+ });
654
706
  setAccountDialogOpen(true);
655
707
  }, []);
656
708
  const closeAccountDialog = (0, _react.useCallback)(() => {
657
709
  accountDialogControllerRef.current?.cancelSignIn();
658
- accountDialogSurfaceRef.current?.dismiss();
659
- setAccountDialogOpen(false);
660
- }, []);
710
+ dismissAccountDialogSurface();
711
+ }, [dismissAccountDialogSurface]);
661
712
 
662
713
  // Start driving the dialog on mount; tear it down on unmount.
663
714
  (0, _react.useEffect)(() => {
@@ -885,8 +936,7 @@ const OxyProvider = ({
885
936
  oxyServices,
886
937
  currentLanguage,
887
938
  activeSessionId,
888
- queryClient,
889
- showBottomSheet: showBottomSheetForContext
939
+ queryClient
890
940
  });
891
941
  const {
892
942
  accounts,