@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,26 +6,33 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
+ var _reactQuery = require("@tanstack/react-query");
9
10
  var _expoImage = require("expo-image");
10
11
  var _bloom = require("@oxyhq/bloom");
12
+ var _surfaces = require("@oxyhq/bloom/surfaces");
11
13
  var Skeleton = _interopRequireWildcard(require("@oxyhq/bloom/skeleton"));
12
14
  var _vectorIcons = require("@expo/vector-icons");
13
- var _fileStore = require("../stores/fileStore.js");
14
- var _Header = _interopRequireDefault(require("../components/Header.js"));
15
+ var _queryKeys = require("../hooks/queries/queryKeys.js");
16
+ var _useFileQueries = require("../hooks/queries/useFileQueries.js");
17
+ var _useSurfaceHeader = require("../hooks/useSurfaceHeader.js");
18
+ var _SurfaceHeaderAction = require("../components/SurfaceHeaderAction.js");
15
19
  var _JustifiedPhotoGrid = _interopRequireDefault(require("../components/photogrid/JustifiedPhotoGrid.js"));
16
20
  var _theme = require("@oxyhq/bloom/theme");
17
21
  var _OxyContext = require("../context/OxyContext.js");
18
22
  var _useI18n = require("../hooks/useI18n.js");
23
+ var _useReduceMotion = require("../hooks/useReduceMotion.js");
19
24
  var _useAccountMutations = require("../hooks/mutations/useAccountMutations.js");
20
25
  var _fileManagement = require("../utils/fileManagement.js");
21
26
  var _useResolvedFileUrls = require("../hooks/useResolvedFileUrls.js");
22
27
  var _FileViewer = require("../components/fileManagement/FileViewer.js");
23
28
  var _FileDetailsModal = require("../components/fileManagement/FileDetailsModal.js");
24
29
  var _UploadPreview = require("../components/fileManagement/UploadPreview.js");
30
+ var _ActionSheetSurface = require("../components/surfaces/ActionSheetSurface.js");
25
31
  var _shared = require("./fileManagement/shared.js");
26
32
  var _useFileUploadState = require("./fileManagement/hooks/useFileUploadState.js");
27
33
  var _PhotoPickerSection = _interopRequireDefault(require("./fileManagement/PhotoPickerSection.js"));
28
34
  var _FileListSection = _interopRequireDefault(require("./fileManagement/FileListSection.js"));
35
+ var _FileLibraryError = _interopRequireDefault(require("./fileManagement/FileLibraryError.js"));
29
36
  var _UploadBar = _interopRequireDefault(require("./fileManagement/UploadBar.js"));
30
37
  var _AnimatedButton = require("../components/fileManagement/AnimatedButton.js");
31
38
  var _jsxRuntime = require("react/jsx-runtime");
@@ -34,6 +41,20 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
34
41
  // Genuinely-inline-only styles: `viewModeButton` is spread into an Animated.View
35
42
  // style array (interpolated backgroundColor), and the photo tiles are
36
43
  // `expo-image` (no className remap). Everything else uses NativeWind classNames.
44
+ // Nav-header slot layout for this screen's action row + review-mode back button.
45
+ const fmHeaderStyles = _reactNative.StyleSheet.create({
46
+ actionsRow: {
47
+ flexDirection: 'row',
48
+ gap: 8
49
+ },
50
+ backButton: {
51
+ width: 36,
52
+ height: 36,
53
+ borderRadius: 18,
54
+ alignItems: 'center',
55
+ justifyContent: 'center'
56
+ }
57
+ });
37
58
  const screenStyles = _reactNative.StyleSheet.create({
38
59
  viewModeButton: {
39
60
  paddingHorizontal: 10,
@@ -44,11 +65,6 @@ const screenStyles = _reactNative.StyleSheet.create({
44
65
  justifyContent: 'center',
45
66
  marginHorizontal: 1
46
67
  },
47
- photoImage: {
48
- width: '100%',
49
- height: '100%',
50
- borderRadius: 8
51
- },
52
68
  justifiedPhotoImage: {
53
69
  width: '100%',
54
70
  height: '100%',
@@ -57,9 +73,9 @@ const screenStyles = _reactNative.StyleSheet.create({
57
73
  });
58
74
  const FileManagementScreen = ({
59
75
  onClose,
60
- theme,
61
76
  goBack,
62
77
  navigate,
78
+ dismiss,
63
79
  userId,
64
80
  containerWidth,
65
81
  selectMode = false,
@@ -85,57 +101,49 @@ const FileManagementScreen = ({
85
101
  const {
86
102
  t
87
103
  } = (0, _useI18n.useI18n)();
104
+ const queryClient = (0, _reactQuery.useQueryClient)();
88
105
  const uploadFileMutation = (0, _useAccountMutations.useUploadFile)();
89
- // Prompt controls
90
- const fileDeleteDialog = (0, _bloom.useDialogControl)();
91
- const bulkDeleteDialog = (0, _bloom.useDialogControl)();
92
- const visibilityChangeDialog = (0, _bloom.useDialogControl)();
93
- const [pendingDeleteFile, setPendingDeleteFile] = (0, _react.useState)(null);
94
- const files = (0, _fileStore.useFiles)();
106
+
107
+ // Files are owned by the ACTIVE account. `targetUserId` scopes the query key,
108
+ // so switching accounts (or an explicit `userId` prop) shows that account's
109
+ // library with no manual reset.
110
+ const targetUserId = userId || user?.id;
111
+
112
+ // The file list is React Query's, NOT a store: infinite-paginated, fetched on
113
+ // mount + on owner change, edited optimistically via cache helpers. The
114
+ // rendered list is the flattened pages.
115
+ const filesQuery = (0, _useFileQueries.useUserFilesInfinite)(targetUserId);
116
+ const files = (0, _react.useMemo)(() => filesQuery.data?.pages.flatMap(page => page.files) ?? [], [filesQuery.data]);
117
+ // No owner resolved yet reads as "loading" (matches the old skeleton-until-
118
+ // first-load behaviour); `isLoading` is the first-page fetch only.
119
+ const isLoadingFiles = !targetUserId || filesQuery.isLoading;
120
+ const isRefreshingFiles = filesQuery.isRefetching;
121
+ const isFetchingMore = filesQuery.isFetchingNextPage;
122
+ const hasMoreFiles = filesQuery.hasNextPage ?? false;
123
+ // Terminal load failure with nothing cached — render a DISTINCT error state
124
+ // (not the empty state) so a failed load never looks like an empty library.
125
+ const hasLoadError = filesQuery.isError && files.length === 0;
126
+ const invalidateFiles = (0, _react.useCallback)(() => {
127
+ queryClient.invalidateQueries({
128
+ queryKey: _queryKeys.queryKeys.files.list(targetUserId)
129
+ });
130
+ }, [queryClient, targetUserId]);
95
131
  const {
96
132
  width: windowWidth
97
133
  } = (0, _reactNative.useWindowDimensions)();
98
134
  // Prefer an explicit sheet width from the router; fall back to the window
99
135
  // so photo grids never size against a hardcoded 400px default.
100
136
  const safeContainerWidth = typeof containerWidth === 'number' && containerWidth > 0 ? containerWidth : windowWidth;
101
- const uploading = (0, _fileStore.useUploading)();
102
- const uploadProgress = (0, _fileStore.useUploadAggregateProgress)();
103
- const deleting = (0, _fileStore.useDeleting)();
104
- const [loading, setLoading] = (0, _react.useState)(true);
105
- const [refreshing, setRefreshing] = (0, _react.useState)(false);
106
- const [paging, setPaging] = (0, _react.useState)({
107
- offset: 0,
108
- limit: 40,
109
- total: 0,
110
- hasMore: true,
111
- loadingMore: false
112
- });
113
- const [selectedFile, setSelectedFile] = (0, _react.useState)(null);
114
- const fileDetailsControl = (0, _bloom.useDialogControl)();
137
+ // In-flight delete target (local UI state — was in the file store).
138
+ const [deletingId, setDeletingId] = (0, _react.useState)(null);
115
139
  // In selectMode we never open the detailed viewer
116
140
  const [openedFile, setOpenedFile] = (0, _react.useState)(null);
117
141
  const [fileContent, setFileContent] = (0, _react.useState)(null);
118
142
  const [loadingFileContent, setLoadingFileContent] = (0, _react.useState)(false);
119
143
  const [showFileDetailsInViewer, setShowFileDetailsInViewer] = (0, _react.useState)(false);
120
- const [reduceMotion, setReduceMotion] = (0, _react.useState)(false);
121
-
122
- // Detect reduce-motion preference once on mount + subscribe to changes.
123
- // Used by `PhotoPickerView` to skip cell stagger animations.
124
- (0, _react.useEffect)(() => {
125
- let cancelled = false;
126
- _reactNative.AccessibilityInfo.isReduceMotionEnabled().then(enabled => {
127
- if (!cancelled) setReduceMotion(enabled);
128
- }).catch(() => {
129
- // Defaults to false; no action needed.
130
- });
131
- const sub = _reactNative.AccessibilityInfo.addEventListener('reduceMotionChanged', enabled => {
132
- setReduceMotion(enabled);
133
- });
134
- return () => {
135
- cancelled = true;
136
- sub.remove();
137
- };
138
- }, []);
144
+ // Reduce-motion preference, read as an external store (no effect). Passed to
145
+ // `PhotoPickerView` to skip cell stagger animations.
146
+ const reduceMotion = (0, _useReduceMotion.useReduceMotion)();
139
147
 
140
148
  // Image-only picker mode: when the consumer restricts to image MIME types
141
149
  // (e.g. avatar picker), photos grid is the more useful default view.
@@ -187,24 +195,59 @@ const FileManagementScreen = ({
187
195
  });
188
196
  return sorted;
189
197
  }, [files, searchQuery, viewMode, sortBy, sortOrder]);
190
- const [photoDimensions, setPhotoDimensions] = (0, _react.useState)({});
191
- const photoDimensionsRef = (0, _react.useRef)(photoDimensions);
192
- photoDimensionsRef.current = photoDimensions;
193
- const [loadingDimensions, setLoadingDimensions] = (0, _react.useState)(false);
194
- // Selection state
195
- const [selectedIds, setSelectedIds] = (0, _react.useState)(new Set(initialSelectedIds));
196
- const [lastSelectedFileId, setLastSelectedFileId] = (0, _react.useState)(null);
198
+ // Selection state. `initialSelectedIds` is the INITIAL selection only (lazy
199
+ // init) there is no prop→state sync effect, since no caller mutates it
200
+ // after mount.
201
+ const [selectedIds, setSelectedIds] = (0, _react.useState)(() => new Set(initialSelectedIds));
197
202
  const scrollViewRef = (0, _react.useRef)(null);
198
203
  const photoScrollViewRef = (0, _react.useRef)(null);
199
- const containerRef = (0, _react.useRef)(null);
200
- (0, _react.useEffect)(() => {
201
- if (initialSelectedIds?.length) {
202
- setSelectedIds(new Set(initialSelectedIds));
204
+
205
+ // Scroll the browse list/grid to a just-selected file. Driven directly from
206
+ // the selection event handler (double-rAF so the selection re-render has
207
+ // committed first) — not an effect. No-ops in the image-only picker, whose
208
+ // own FlatList is not either ScrollView ref.
209
+ const scrollToSelectedFile = (0, _react.useCallback)(fileId => {
210
+ if (viewMode === 'all' && scrollViewRef.current) {
211
+ const itemIndex = filteredFiles.findIndex(file => file.id === fileId);
212
+ if (itemIndex < 0) return;
213
+ // GroupedItem dense rows are ~65px, +30px when a description wraps.
214
+ const baseItemHeight = 65;
215
+ const descriptionHeight = 30;
216
+ let scrollPosition = 0;
217
+ for (let i = 0; i <= itemIndex && i < filteredFiles.length; i++) {
218
+ scrollPosition += baseItemHeight;
219
+ if (filteredFiles[i].metadata?.description) scrollPosition += descriptionHeight;
220
+ }
221
+ // Offset for the header/controls/search/stats chrome (~250px) so the
222
+ // item lands near the top, not under the chrome.
223
+ const finalScrollPosition = 250 + scrollPosition - 150;
224
+ requestAnimationFrame(() => {
225
+ requestAnimationFrame(() => {
226
+ scrollViewRef.current?.scrollTo({
227
+ y: Math.max(0, finalScrollPosition),
228
+ animated: true
229
+ });
230
+ });
231
+ });
232
+ } else if (viewMode === 'photos' && photoScrollViewRef.current) {
233
+ const photos = filteredFiles.filter(file => file.contentType.startsWith('image/'));
234
+ const photoIndex = photos.findIndex(p => p.id === fileId);
235
+ if (photoIndex < 0) return;
236
+ // Rough estimate for the justified grid (3 photos/row, variable heights).
237
+ const row = Math.floor(photoIndex / 3);
238
+ const finalScrollPosition = row * (150 + 4) - 100;
239
+ requestAnimationFrame(() => {
240
+ requestAnimationFrame(() => {
241
+ photoScrollViewRef.current?.scrollTo({
242
+ y: Math.max(0, finalScrollPosition),
243
+ animated: true
244
+ });
245
+ });
246
+ });
203
247
  }
204
- }, [initialSelectedIds]);
248
+ }, [viewMode, filteredFiles]);
205
249
  const toggleSelect = (0, _react.useCallback)(async file => {
206
- // Allow selection in regular mode for bulk operations
207
- // if (!selectMode) return;
250
+ // Selection is allowed in regular mode too (for bulk operations).
208
251
  if (disabledMimeTypes.length) {
209
252
  const blocked = disabledMimeTypes.some(mt => file.contentType === mt || file.contentType.startsWith(mt.endsWith('/') ? mt : `${mt}/`));
210
253
  if (blocked) {
@@ -223,9 +266,6 @@ const FileManagementScreen = ({
223
266
  }
224
267
  }
225
268
 
226
- // Track the selected file for scrolling
227
- setLastSelectedFileId(file.id);
228
-
229
269
  // Link file to entity if linkContext is provided
230
270
  if (linkContext) {
231
271
  try {
@@ -235,11 +275,19 @@ const FileManagementScreen = ({
235
275
  }
236
276
  }
237
277
  if (!multiSelect) {
238
- onSelect?.(file);
239
- if (afterSelect === 'back') {
240
- goBack?.();
241
- } else if (afterSelect === 'close') {
242
- onClose?.();
278
+ if (onSelect) {
279
+ // Legacy callback caller (inbox, WelcomeNewUser): keep the
280
+ // callback + afterSelect behaviour unchanged.
281
+ onSelect(file);
282
+ if (afterSelect === 'back') {
283
+ goBack?.();
284
+ } else if (afterSelect === 'close') {
285
+ onClose?.();
286
+ }
287
+ } else {
288
+ // Promise-based picker (avatar picker): resolve the surface's
289
+ // present() promise with the picked file.
290
+ dismiss?.(file);
243
291
  }
244
292
  return;
245
293
  }
@@ -259,13 +307,14 @@ const FileManagementScreen = ({
259
307
  }
260
308
  return next;
261
309
  });
262
- }, [selectMode, multiSelect, onSelect, onClose, goBack, disabledMimeTypes, maxSelection, afterSelect, defaultVisibility, oxyServices, linkContext]);
310
+ scrollToSelectedFile(file.id);
311
+ }, [multiSelect, onSelect, onClose, goBack, dismiss, disabledMimeTypes, maxSelection, afterSelect, defaultVisibility, oxyServices, linkContext, t, scrollToSelectedFile]);
263
312
  const confirmMultiSelection = (0, _react.useCallback)(async () => {
264
313
  if (!selectMode || !multiSelect) return;
265
314
  const map = {};
266
- files.forEach(f => {
315
+ for (const f of files) {
267
316
  map[f.id] = f;
268
- });
317
+ }
269
318
  const chosen = Array.from(selectedIds).map(id => map[id]).filter(Boolean);
270
319
 
271
320
  // Update visibility and link files if needed
@@ -292,9 +341,15 @@ const FileManagementScreen = ({
292
341
 
293
342
  // Wait for all updates (but don't block on failures)
294
343
  await Promise.allSettled(updatePromises);
295
- onConfirmSelection?.(chosen);
296
- onClose?.();
297
- }, [selectMode, multiSelect, selectedIds, files, onConfirmSelection, onClose, defaultVisibility, oxyServices, linkContext]);
344
+ if (onConfirmSelection) {
345
+ // Legacy callback caller (inbox): keep the callback + close.
346
+ onConfirmSelection(chosen);
347
+ onClose?.();
348
+ } else {
349
+ // Promise-based picker: resolve the surface with the chosen files.
350
+ dismiss?.(chosen);
351
+ }
352
+ }, [selectMode, multiSelect, selectedIds, files, onConfirmSelection, onClose, dismiss, defaultVisibility, oxyServices, linkContext]);
298
353
 
299
354
  // Private-safe thumbnail URLs for the currently-shown files, resolved in
300
355
  // ONE batch per page (not N per-tile) and cached by React Query. Uploads
@@ -313,81 +368,16 @@ const FileManagementScreen = ({
313
368
  // FileManagementScreen uses a slightly elevated page background.
314
369
  const backgroundColor = colors.backgroundSecondary;
315
370
  const borderColor = colors.border;
316
- const targetUserId = userId || user?.id;
317
- const storeSetDeleting = (0, _fileStore.useFileStore)(s => s.setDeleting);
318
- const loadFiles = (0, _react.useCallback)(async (mode = 'initial') => {
319
- if (!targetUserId) return;
320
- try {
321
- if (mode === 'refresh') {
322
- setRefreshing(true);
323
- } else if (mode === 'initial') {
324
- setLoading(true);
325
- setPaging(p => ({
326
- ...p,
327
- offset: 0,
328
- hasMore: true
329
- }));
330
- } else if (mode === 'more') {
331
- // Prevent duplicate fetches
332
- setPaging(p => ({
333
- ...p,
334
- loadingMore: true
335
- }));
336
- }
337
- const currentPaging = mode === 'more' ? prevPagingRef.current ?? paging : paging;
338
- const effectiveOffset = mode === 'more' ? currentPaging.offset + currentPaging.limit : 0;
339
- const response = await oxyServices.listUserFiles(currentPaging.limit, effectiveOffset);
340
- const assets = (response.files || []).map(f => ({
341
- id: f.id,
342
- filename: f.originalName ?? f.sha256 ?? '',
343
- contentType: f.mime ?? '',
344
- length: f.size ?? 0,
345
- chunkSize: 0,
346
- uploadDate: f.createdAt ?? '',
347
- metadata: f.metadata ?? {},
348
- variants: f.variants ?? []
349
- }));
350
- if (mode === 'more') {
351
- // append
352
- _fileStore.useFileStore.getState().setFiles(assets, {
353
- merge: true
354
- });
355
- setPaging(p => ({
356
- ...p,
357
- offset: effectiveOffset,
358
- total: response.total || effectiveOffset + assets.length,
359
- hasMore: response.hasMore,
360
- loadingMore: false
361
- }));
362
- } else {
363
- _fileStore.useFileStore.getState().setFiles(assets, {
364
- merge: false
365
- });
366
- setPaging(p => ({
367
- ...p,
368
- offset: 0,
369
- total: response.total || assets.length,
370
- hasMore: response.hasMore,
371
- loadingMore: false
372
- }));
373
- }
374
- } catch (error) {
375
- _bloom.toast.error((0, _shared.getErrorMessage)(error) || t('fileManagement.toasts.loadFailed'));
376
- } finally {
377
- setLoading(false);
378
- setRefreshing(false);
379
- setPaging(p => ({
380
- ...p,
381
- loadingMore: false
382
- }));
383
- }
384
- }, [targetUserId, oxyServices, paging]);
385
371
 
386
372
  // Self-contained document-picking + upload-preview state and handlers.
373
+ // Optimistic uploads edit the file query cache directly (see
374
+ // useFileQueries), so no loader is threaded in.
387
375
  const {
388
376
  isPickingDocument,
389
377
  pendingFiles,
390
378
  showUploadPreview,
379
+ uploading,
380
+ uploadProgress,
391
381
  handleFileUpload,
392
382
  handleConfirmUpload,
393
383
  handleCancelUpload,
@@ -404,154 +394,59 @@ const FileManagementScreen = ({
404
394
  onClose,
405
395
  selectedIds,
406
396
  setSelectedIds,
407
- loadFiles,
408
397
  t
409
398
  });
410
-
411
- // Keep a ref to avoid stale closure when calculating next offset
412
- const prevPagingRef = (0, _react.useRef)(paging);
413
- (0, _react.useEffect)(() => {
414
- prevPagingRef.current = paging;
415
- }, [paging]);
416
-
417
- // (removed effect; filteredFiles is memoized)
418
-
419
- // Load photo dimensions for justified grid - unified approach using Image.getSize
420
- const loadPhotoDimensions = (0, _react.useCallback)(async photos => {
421
- if (photos.length === 0) return;
422
- setLoadingDimensions(true);
423
-
424
- // Snapshot ids missing from the cache at kick-off; concurrent runs may
425
- // overlap but each merge is applied via a functional updater.
426
- const photosToLoad = photos.filter(photo => !photoDimensionsRef.current[photo.id]);
427
- if (photosToLoad.length === 0) {
428
- setLoadingDimensions(false);
429
- return;
430
- }
431
- try {
432
- const measured = {};
433
- await Promise.all(photosToLoad.map(async photo => {
434
- try {
435
- const downloadUrl = thumbSourceFor(photo);
436
- // URL not resolved yet — skip (do NOT record fallback
437
- // dims) so this photo is re-measured once its private-safe
438
- // URL resolves. Measuring the broken public URL is exactly
439
- // the bug we are fixing.
440
- if (!downloadUrl) {
441
- return;
442
- }
443
-
444
- // Unified approach using Image.getSize (works on all platforms)
445
- await new Promise(resolve => {
446
- _reactNative.Image.getSize(downloadUrl, (width, height) => {
447
- measured[photo.id] = {
448
- width,
449
- height
450
- };
451
- resolve();
452
- }, () => {
453
- // Fallback dimensions
454
- measured[photo.id] = {
455
- width: 1,
456
- height: 1
457
- };
458
- resolve();
459
- });
460
- });
461
- } catch (error) {
462
- // Fallback dimensions for any errors
463
- measured[photo.id] = {
464
- width: 1,
465
- height: 1
466
- };
467
- }
468
- }));
469
- if (Object.keys(measured).length > 0) {
470
- setPhotoDimensions(prev => ({
471
- ...prev,
472
- ...measured
473
- }));
474
- }
475
- } catch (error) {
476
- // Photo dimensions loading failed, continue without dimensions
477
- } finally {
478
- setLoadingDimensions(false);
479
- }
480
- }, [thumbSourceFor]);
481
-
482
- // Re-measure photo dimensions when their private-safe URLs resolve. The
483
- // justified grid's own trigger fires on the photo SET, not on URL
484
- // availability, so newly-resolved private tiles would otherwise keep their
485
- // skipped (unmeasured) state and render with fallback geometry.
486
- (0, _react.useEffect)(() => {
487
- if (viewMode !== 'photos') return;
488
- const photos = filteredFiles.filter(file => file.contentType.startsWith('image/'));
489
- if (photos.length > 0) {
490
- loadPhotoDimensions(photos);
491
- }
492
- }, [resolvedThumbUrls, viewMode, filteredFiles, loadPhotoDimensions]);
493
-
494
- // Create justified rows from photos with responsive algorithm
495
- const createJustifiedRows = (0, _react.useCallback)((photos, containerWidth) => {
496
- if (photos.length === 0) return [];
497
- const rows = [];
498
- const photosPerRow = 3; // Fixed 3 photos per row for consistency
499
-
500
- for (let i = 0; i < photos.length; i += photosPerRow) {
501
- const rowPhotos = photos.slice(i, i + photosPerRow);
502
- rows.push(rowPhotos);
503
- }
504
- return rows;
505
- }, []);
506
- const confirmFileDelete = (0, _react.useCallback)((fileId, filename) => {
507
- setPendingDeleteFile({
508
- id: fileId,
509
- name: filename
399
+ const confirmFileDelete = (0, _react.useCallback)(async (fileId, filename) => {
400
+ const confirmed = await _surfaces.surfaces.confirm({
401
+ title: t('fileManagement.deleteFile') || 'Delete File',
402
+ message: t('fileManagement.confirms.deleteFile', {
403
+ filename
404
+ }),
405
+ confirmLabel: t('fileManagement.confirm') || 'Delete',
406
+ cancelLabel: t('common.cancel') || 'Cancel',
407
+ destructive: true
510
408
  });
511
- fileDeleteDialog.open();
512
- }, [fileDeleteDialog]);
513
- const handleFileDelete = (0, _react.useCallback)(async () => {
514
- if (!pendingDeleteFile) return;
515
- const {
516
- id: fileId
517
- } = pendingDeleteFile;
409
+ if (!confirmed) return;
518
410
  try {
519
- storeSetDeleting(fileId);
411
+ setDeletingId(fileId);
520
412
  await oxyServices.deleteFile(fileId);
521
413
  _bloom.toast.success(t('fileManagement.toasts.deleteSuccess'));
522
414
 
523
- // Reload files after successful deletion
524
- // Optimistic remove
525
- _fileStore.useFileStore.getState().removeFile(fileId);
526
- // Silent background reconcile
527
- setTimeout(() => loadFiles('silent'), 800);
415
+ // Remove from the query cache, then reconcile against the server.
416
+ (0, _useFileQueries.removeFileFromCache)(queryClient, targetUserId, fileId);
417
+ invalidateFiles();
528
418
  } catch (error) {
529
419
  // Provide specific error messages
530
420
  if ((0, _shared.getErrorMessage)(error)?.includes('File not found') || (0, _shared.getErrorMessage)(error)?.includes('404')) {
531
421
  _bloom.toast.error(t('fileManagement.toasts.fileNotFound'));
532
- // Still reload files to refresh the list
533
- setTimeout(() => loadFiles('silent'), 800);
422
+ // It's already gone server-side reconcile the list.
423
+ invalidateFiles();
534
424
  } else if ((0, _shared.getErrorMessage)(error)?.includes('permission') || (0, _shared.getErrorMessage)(error)?.includes('403')) {
535
425
  _bloom.toast.error(t('fileManagement.toasts.noPermission'));
536
426
  } else {
537
427
  _bloom.toast.error((0, _shared.getErrorMessage)(error) || t('fileManagement.toasts.deleteFailed'));
538
428
  }
539
429
  } finally {
540
- storeSetDeleting(null);
541
- setPendingDeleteFile(null);
430
+ setDeletingId(null);
542
431
  }
543
- }, [pendingDeleteFile, storeSetDeleting, oxyServices, loadFiles, t]);
544
- const confirmBulkDelete = (0, _react.useCallback)(() => {
545
- if (selectedIds.size === 0) return;
546
- bulkDeleteDialog.open();
547
- }, [selectedIds.size, bulkDeleteDialog]);
548
- const handleBulkDelete = (0, _react.useCallback)(async () => {
432
+ }, [oxyServices, queryClient, targetUserId, invalidateFiles, t]);
433
+ const confirmBulkDelete = (0, _react.useCallback)(async () => {
549
434
  if (selectedIds.size === 0) return;
435
+ const confirmed = await _surfaces.surfaces.confirm({
436
+ title: t('fileManagement.deleteFiles') || 'Delete Files',
437
+ message: t('fileManagement.confirms.deleteFiles', {
438
+ count: selectedIds.size
439
+ }),
440
+ confirmLabel: t('fileManagement.confirm') || 'Delete',
441
+ cancelLabel: t('common.cancel') || 'Cancel',
442
+ destructive: true
443
+ });
444
+ if (!confirmed) return;
550
445
  try {
551
446
  const deletePromises = Array.from(selectedIds).map(async fileId => {
552
447
  try {
553
448
  await oxyServices.deleteFile(fileId);
554
- _fileStore.useFileStore.getState().removeFile(fileId);
449
+ (0, _useFileQueries.removeFileFromCache)(queryClient, targetUserId, fileId);
555
450
  return {
556
451
  success: true,
557
452
  fileId
@@ -578,11 +473,11 @@ const FileManagementScreen = ({
578
473
  }));
579
474
  }
580
475
  setSelectedIds(new Set());
581
- setTimeout(() => loadFiles('silent'), 800);
476
+ invalidateFiles();
582
477
  } catch (error) {
583
478
  _bloom.toast.error((0, _shared.getErrorMessage)(error) || t('fileManagement.toasts.bulkDeleteError'));
584
479
  }
585
- }, [selectedIds, files, oxyServices, loadFiles]);
480
+ }, [selectedIds, oxyServices, queryClient, targetUserId, invalidateFiles, t]);
586
481
  const handleBulkVisibilityChange = (0, _react.useCallback)(async visibility => {
587
482
  if (selectedIds.size === 0) return;
588
483
  try {
@@ -609,29 +504,47 @@ const FileManagementScreen = ({
609
504
  count: successful,
610
505
  visibility
611
506
  }));
612
- // Update file metadata in store
613
- Array.from(selectedIds).forEach(fileId => {
614
- _fileStore.useFileStore.getState().updateFile(fileId, {
615
- metadata: {
616
- ...files.find(f => f.id === fileId)?.metadata,
617
- visibility
618
- }
507
+ // Reflect the new visibility in the cached files.
508
+ for (const fileId of selectedIds) {
509
+ (0, _useFileQueries.patchFileMetadataInCache)(queryClient, targetUserId, fileId, {
510
+ visibility
619
511
  });
620
- });
512
+ }
621
513
  }
622
514
  if (failed > 0) {
623
515
  _bloom.toast.error(t('fileManagement.toasts.visibilityFailed', {
624
516
  count: failed
625
517
  }));
626
518
  }
627
- setTimeout(() => loadFiles('silent'), 800);
519
+ invalidateFiles();
628
520
  } catch (error) {
629
521
  _bloom.toast.error((0, _shared.getErrorMessage)(error) || t('fileManagement.toasts.visibilityError'));
630
522
  }
631
- }, [selectedIds, oxyServices, files, loadFiles]);
523
+ }, [selectedIds, oxyServices, queryClient, targetUserId, invalidateFiles, t]);
524
+ const handleVisibilityChange = (0, _react.useCallback)(async () => {
525
+ if (selectedIds.size === 0) return;
526
+ const visibility = await (0, _ActionSheetSurface.presentActionSheet)({
527
+ title: t('fileManagement.changeVisibility') || 'Change Visibility',
528
+ message: t('fileManagement.changeVisibilityConfirm', {
529
+ count: selectedIds.size
530
+ }),
531
+ options: [{
532
+ label: t('fileManagement.private') || 'Private',
533
+ value: 'private'
534
+ }, {
535
+ label: t('fileManagement.public') || 'Public',
536
+ value: 'public'
537
+ }, {
538
+ label: t('fileManagement.unlisted') || 'Unlisted',
539
+ value: 'unlisted'
540
+ }],
541
+ cancelLabel: t('common.cancel') || 'Cancel'
542
+ });
543
+ if (visibility) await handleBulkVisibilityChange(visibility);
544
+ }, [selectedIds.size, handleBulkVisibilityChange, t]);
632
545
 
633
546
  // Unified download function - works on all platforms
634
- const handleFileDownload = async (fileId, filename) => {
547
+ const handleFileDownload = (0, _react.useCallback)(async (fileId, filename) => {
635
548
  try {
636
549
  // Resolve an authenticated, private-safe URL. The synchronous
637
550
  // `getFileDownloadUrl` yields the public CDN origin, which 404s for
@@ -674,8 +587,8 @@ const FileManagementScreen = ({
674
587
  } catch (error) {
675
588
  _bloom.toast.error((0, _shared.getErrorMessage)(error) || t('fileManagement.toasts.downloadFailed'));
676
589
  }
677
- };
678
- const handleFileOpen = async file => {
590
+ }, [oxyServices, t]);
591
+ const handleFileOpen = (0, _react.useCallback)(async file => {
679
592
  if (selectMode) {
680
593
  toggleSelect(file);
681
594
  return;
@@ -715,17 +628,21 @@ const FileManagementScreen = ({
715
628
  } finally {
716
629
  setLoadingFileContent(false);
717
630
  }
718
- };
719
- const handleCloseFile = () => {
631
+ }, [selectMode, toggleSelect, oxyServices, t]);
632
+ const handleCloseFile = (0, _react.useCallback)(() => {
720
633
  setOpenedFile(null);
721
634
  setFileContent(null);
722
635
  setShowFileDetailsInViewer(false);
723
636
  // Don't reset view mode when closing a file
724
- };
725
- const showFileDetailsModal = file => {
726
- setSelectedFile(file);
727
- fileDetailsControl.open();
728
- };
637
+ }, []);
638
+ const showFileDetailsModal = (0, _react.useCallback)(file => {
639
+ (0, _FileDetailsModal.presentFileDetails)({
640
+ file,
641
+ onDownload: handleFileDownload,
642
+ onDelete: confirmFileDelete,
643
+ isOwner: user?.id === targetUserId
644
+ });
645
+ }, [handleFileDownload, confirmFileDelete, user?.id, targetUserId]);
729
646
  const renderJustifiedPhotoItem = (0, _react.useCallback)((photo, width, height, isLast) => {
730
647
  const downloadUrl = thumbSourceFor(photo);
731
648
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
@@ -770,18 +687,7 @@ const FileManagementScreen = ({
770
687
  })]
771
688
  })
772
689
  }, photo.id);
773
- }, [thumbSourceFor, selectMode, selectedIds, multiSelect, colors.primary, colors.text]);
774
-
775
- // Run initial load once per targetUserId change to avoid accidental loops
776
- const lastLoadedFor = (0, _react.useRef)(undefined);
777
- (0, _react.useEffect)(() => {
778
- const key = targetUserId || 'anonymous';
779
- if (lastLoadedFor.current !== key) {
780
- lastLoadedFor.current = key;
781
- loadFiles('initial');
782
- }
783
- // eslint-disable-next-line react-hooks/exhaustive-deps
784
- }, [targetUserId]);
690
+ }, [thumbSourceFor, selectMode, selectedIds, multiSelect, colors.primary, colors.text, handleFileOpen]);
785
691
 
786
692
  // SettingsListItem-based file items (for 'all' view)
787
693
  const groupedFileItems = (0, _react.useMemo)(() => {
@@ -932,8 +838,8 @@ const FileManagementScreen = ({
932
838
  backgroundColor: colors.negativeSubtle
933
839
  },
934
840
  onPress: () => confirmFileDelete(file.id, file.filename),
935
- disabled: deleting === file.id,
936
- children: deleting === file.id ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
841
+ disabled: deletingId === file.id,
842
+ children: deletingId === file.id ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
937
843
  size: "small",
938
844
  color: colors.error
939
845
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
@@ -945,85 +851,27 @@ const FileManagementScreen = ({
945
851
  }) : undefined
946
852
  };
947
853
  });
948
- }, [filteredFiles, theme, deleting, handleFileDownload, confirmFileDelete, handleFileOpen, thumbSourceFor, selectMode, selectedIds]);
949
-
950
- // Scroll to selected file after selection
951
- (0, _react.useEffect)(() => {
952
- if (lastSelectedFileId && selectMode) {
953
- if (viewMode === 'all' && scrollViewRef.current) {
954
- // Find the index of the selected file (filteredFiles is already sorted)
955
- const itemIndex = filteredFiles.findIndex(file => file.id === lastSelectedFileId);
956
- if (itemIndex >= 0) {
957
- // Estimate item height (GroupedItem with dense mode is approximately 60-70px)
958
- // Account for description rows which add extra height
959
- const baseItemHeight = 65;
960
- const descriptionHeight = 30; // Approximate height for description
961
- // Use filteredFiles which is already sorted according to user's selection
962
- const sortedFiles = filteredFiles;
963
-
964
- // Calculate total height up to this item
965
- let scrollPosition = 0;
966
- for (let i = 0; i <= itemIndex && i < sortedFiles.length; i++) {
967
- const file = sortedFiles[i];
968
- scrollPosition += baseItemHeight;
969
- if (file.metadata?.description) {
970
- scrollPosition += descriptionHeight;
971
- }
972
- }
973
-
974
- // Add header, controls, search, and stats height (approximately 250px)
975
- const headerHeight = 250;
976
- const finalScrollPosition = headerHeight + scrollPosition - 150; // Offset to show item near top
977
-
978
- // Use requestAnimationFrame to ensure DOM is updated before scrolling
979
- requestAnimationFrame(() => {
980
- requestAnimationFrame(() => {
981
- scrollViewRef.current?.scrollTo({
982
- y: Math.max(0, finalScrollPosition),
983
- animated: true
984
- });
985
- });
986
- });
987
- }
988
- } else if (viewMode === 'photos' && photoScrollViewRef.current) {
989
- // For photo grid, find the photo index
990
- const photos = filteredFiles.filter(file => file.contentType.startsWith('image/'));
991
- const photoIndex = photos.findIndex(p => p.id === lastSelectedFileId);
992
- if (photoIndex >= 0) {
993
- // Rough scroll estimate for the justified grid (3 photos/row; variable row heights).
994
- const itemsPerRow = 3;
995
- const estimatedRowHeight = 150;
996
- const rowGap = 4;
997
- const row = Math.floor(photoIndex / itemsPerRow);
998
- const finalScrollPosition = row * (estimatedRowHeight + rowGap) - 100;
854
+ }, [filteredFiles, colors, deletingId, toggleSelect, handleFileDownload, confirmFileDelete, handleFileOpen, thumbSourceFor, selectMode, selectedIds]);
999
855
 
1000
- // Use requestAnimationFrame to ensure DOM is updated before scrolling
1001
- requestAnimationFrame(() => {
1002
- requestAnimationFrame(() => {
1003
- photoScrollViewRef.current?.scrollTo({
1004
- y: Math.max(0, finalScrollPosition),
1005
- animated: true
1006
- });
1007
- });
1008
- });
1009
- }
1010
- }
1011
- }
1012
- }, [lastSelectedFileId, selectMode, viewMode, filteredFiles, safeContainerWidth]);
1013
-
1014
- // Clear selected file ID after scroll animation completes
1015
- (0, _react.useEffect)(() => {
1016
- if (lastSelectedFileId && scrollViewRef.current) {
1017
- const timeoutId = setTimeout(() => {
1018
- setLastSelectedFileId(null);
1019
- }, 600); // Allow time for scroll animation to complete
856
+ // Browse-themed terminal load-failure state DISTINCT from the empty state.
857
+ const renderLoadError = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_FileLibraryError.default, {
858
+ title: t('fileManagement.loadError.title'),
859
+ description: t('fileManagement.loadError.description'),
860
+ retryLabel: t('fileManagement.retry'),
861
+ onRetry: () => filesQuery.refetch(),
862
+ iconColor: colors.error,
863
+ titleColor: colors.text,
864
+ descriptionColor: colors.textSecondary,
865
+ buttonColor: colors.primary
866
+ });
1020
867
 
1021
- return () => clearTimeout(timeoutId);
1022
- }
1023
- }, [lastSelectedFileId]);
1024
- const renderPhotoGrid = (0, _react.useCallback)(() => {
868
+ // Browse "photos" view. The justified grid owns its own dimension
869
+ // measurement + reflow (see JustifiedPhotoGrid); this only supplies the
870
+ // photo set, the private-safe URL resolver, and the tile renderer.
871
+ const renderPhotoGrid = () => {
1025
872
  const photos = filteredFiles.filter(file => file.contentType.startsWith('image/'));
1026
873
  if (photos.length === 0) {
874
+ if (hasLoadError) return renderLoadError();
1027
875
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1028
876
  className: "items-center py-[40px] px-[24px]",
1029
877
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
@@ -1049,10 +897,7 @@ const FileManagementScreen = ({
1049
897
  },
1050
898
  onPress: handleFileUpload,
1051
899
  disabled: uploading || isPickingDocument,
1052
- children: uploading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
1053
- size: "small",
1054
- color: "#FFFFFF"
1055
- }) : isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
900
+ children: uploading || isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
1056
901
  size: "small",
1057
902
  color: "#FFFFFF"
1058
903
  }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
@@ -1068,13 +913,13 @@ const FileManagementScreen = ({
1068
913
  })]
1069
914
  });
1070
915
  }
1071
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
916
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
1072
917
  ref: photoScrollViewRef,
1073
918
  className: "flex-1",
1074
919
  contentContainerClassName: "p-[10px]",
1075
920
  refreshControl: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.RefreshControl, {
1076
- refreshing: refreshing,
1077
- onRefresh: () => loadFiles('refresh'),
921
+ refreshing: isRefreshingFiles,
922
+ onRefresh: () => filesQuery.refetch(),
1078
923
  tintColor: colors.primary
1079
924
  }),
1080
925
  showsVerticalScrollIndicator: false,
@@ -1087,38 +932,21 @@ const FileManagementScreen = ({
1087
932
  contentSize
1088
933
  } = nativeEvent;
1089
934
  const distanceFromBottom = contentSize.height - (contentOffset.y + layoutMeasurement.height);
1090
- if (distanceFromBottom < 200 && !paging.loadingMore && paging.hasMore) {
1091
- loadFiles('more');
935
+ if (distanceFromBottom < 200 && !isFetchingMore && hasMoreFiles) {
936
+ filesQuery.fetchNextPage();
1092
937
  }
1093
938
  },
1094
939
  scrollEventThrottle: 250,
1095
- children: [loadingDimensions && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1096
- className: "flex-row items-center justify-center py-[16px] gap-[8px]",
1097
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
1098
- size: "small",
1099
- color: colors.primary
1100
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1101
- className: "text-[14px] italic",
1102
- style: {
1103
- color: colors.textSecondary
1104
- },
1105
- children: t('fileManagement.loadingPhotoLayout')
1106
- })]
1107
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_JustifiedPhotoGrid.default, {
940
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_JustifiedPhotoGrid.default, {
1108
941
  photos: photos,
1109
- photoDimensions: photoDimensions,
1110
- loadPhotoDimensions: loadPhotoDimensions,
1111
- createJustifiedRows: createJustifiedRows,
942
+ getThumbUrl: thumbSourceFor,
1112
943
  renderJustifiedPhotoItem: renderJustifiedPhotoItem,
1113
944
  textColor: colors.text,
1114
945
  containerWidth: typeof containerWidth === 'number' && containerWidth > 0 ? containerWidth : undefined
1115
- })]
946
+ })
1116
947
  });
1117
- }, [filteredFiles, colors, user?.id, targetUserId, uploading, handleFileUpload, refreshing, loadFiles, loadingDimensions, photoDimensions, loadPhotoDimensions, createJustifiedRows, renderJustifiedPhotoItem, containerWidth]);
1118
-
1119
- // Inline justified grid removed (moved to components/photogrid/JustifiedPhotoGrid.tsx)
1120
-
1121
- const renderEmptyState = () => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
948
+ };
949
+ const renderEmptyState = () => hasLoadError ? renderLoadError() : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1122
950
  className: "items-center py-[40px] px-[24px]",
1123
951
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1124
952
  name: "folder-open-outline",
@@ -1143,10 +971,7 @@ const FileManagementScreen = ({
1143
971
  },
1144
972
  onPress: handleFileUpload,
1145
973
  disabled: uploading || isPickingDocument,
1146
- children: uploading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
1147
- size: "small",
1148
- color: "#FFFFFF"
1149
- }) : isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
974
+ children: uploading || isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
1150
975
  size: "small",
1151
976
  color: "#FFFFFF"
1152
977
  }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
@@ -1172,7 +997,85 @@ const FileManagementScreen = ({
1172
997
  // picker's placement-aware container width / columns / tile size and the
1173
998
  // Dialog-vs-bottom-sheet sizing. Skipping the browse chrome here is what keeps
1174
999
  // the picker from flashing the wrong (file-manager) skeleton inside the Dialog.
1175
- if (loading && !isImageOnlyPicker) {
1000
+ // The Dialog owns the nav header; this screen contributes its state-dependent
1001
+ // title/subtitle + action slots. The image-only picker mode is headerless
1002
+ // (PhotoPickerView owns its own bar), so this config is simply ignored there.
1003
+ const fmHeaderRight = (0, _react.useMemo)(() => {
1004
+ const actions = selectMode && multiSelect ? [{
1005
+ key: 'clear',
1006
+ label: t('fileManagement.clear'),
1007
+ onPress: () => setSelectedIds(new Set()),
1008
+ disabled: selectedIds.size === 0
1009
+ }, {
1010
+ key: 'confirm',
1011
+ label: t('fileManagement.confirm'),
1012
+ onPress: confirmMultiSelection,
1013
+ disabled: selectedIds.size === 0
1014
+ }] : !selectMode && selectedIds.size > 0 ? [{
1015
+ key: 'clear',
1016
+ label: t('fileManagement.clear'),
1017
+ onPress: () => setSelectedIds(new Set()),
1018
+ disabled: false
1019
+ }, {
1020
+ key: 'delete',
1021
+ label: t('fileManagement.delete', {
1022
+ count: selectedIds.size
1023
+ }),
1024
+ onPress: confirmBulkDelete,
1025
+ disabled: false
1026
+ }, {
1027
+ key: 'visibility',
1028
+ label: t('fileManagement.visibility'),
1029
+ onPress: handleVisibilityChange,
1030
+ disabled: false
1031
+ }] : [];
1032
+ if (actions.length === 0) return undefined;
1033
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1034
+ style: fmHeaderStyles.actionsRow,
1035
+ children: actions.map(a => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SurfaceHeaderAction.SurfaceHeaderAction, {
1036
+ label: a.label,
1037
+ onPress: a.onPress,
1038
+ disabled: a.disabled
1039
+ }, a.key))
1040
+ });
1041
+ }, [selectMode, multiSelect, selectedIds, t, confirmMultiSelection, confirmBulkDelete, handleVisibilityChange]);
1042
+ const fmHeaderBack = (0, _react.useMemo)(() => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
1043
+ onPress: handleCancelUpload,
1044
+ accessibilityRole: "button",
1045
+ accessibilityLabel: t('common.back') || 'Back',
1046
+ hitSlop: 8,
1047
+ style: fmHeaderStyles.backButton,
1048
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1049
+ name: "chevron-back",
1050
+ size: 20,
1051
+ color: colors.text
1052
+ })
1053
+ }), [handleCancelUpload, colors.text, t]);
1054
+ (0, _useSurfaceHeader.useSurfaceHeader)(showUploadPreview ? {
1055
+ title: t('fileManagement.reviewFiles'),
1056
+ subtitle: t('fileManagement.readyToUpload', {
1057
+ count: pendingFiles.length
1058
+ }),
1059
+ left: fmHeaderBack,
1060
+ largeTitle: false
1061
+ } : {
1062
+ title: selectMode ? multiSelect ? maxSelection ? t('fileManagement.selectedWithMax', {
1063
+ count: selectedIds.size,
1064
+ max: maxSelection
1065
+ }) : t('fileManagement.selected', {
1066
+ count: selectedIds.size
1067
+ }) : t('fileManagement.selectFile') : viewMode === 'photos' ? t('fileManagement.photos') : t('fileManagement.title'),
1068
+ subtitle: selectMode ? multiSelect ? t('fileManagement.available', {
1069
+ count: filteredFiles.length
1070
+ }) : t('fileManagement.tapToSelect') : filteredFiles.length === 1 ? t('fileManagement.itemCount', {
1071
+ count: filteredFiles.length
1072
+ }) : t('fileManagement.itemCount_plural', {
1073
+ count: filteredFiles.length
1074
+ }),
1075
+ right: fmHeaderRight,
1076
+ largeTitle: false
1077
+ });
1078
+ if (isLoadingFiles && !isImageOnlyPicker) {
1176
1079
  const GRID_PADDING = 10;
1177
1080
  const TILE_GAP = 4;
1178
1081
  const GRID_COLUMNS = 3;
@@ -1265,141 +1168,77 @@ const FileManagementScreen = ({
1265
1168
  const photosOnly = filteredFiles.filter(file => file.contentType.startsWith('image/'));
1266
1169
  const isOwner = user?.id === targetUserId;
1267
1170
  const allowUpload = isOwner && allowUploadInSelectMode;
1268
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
1269
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_PhotoPickerSection.default, {
1270
- photos: photosOnly,
1271
- selectedIds: selectedIds,
1272
- multiSelect: multiSelect,
1273
- maxSelection: maxSelection,
1274
- allowUpload: allowUpload,
1275
- refreshing: refreshing,
1276
- uploading: uploading,
1277
- isPickingDocument: isPickingDocument,
1278
- uploadProgress: uploadProgress,
1279
- hasMore: paging.hasMore,
1280
- loadingMore: paging.loadingMore,
1281
- loading: loading,
1282
- reduceMotion: reduceMotion,
1283
- getThumbUrl: thumbSourceFor,
1284
- primaryColor: colors.primary,
1285
- isOwner: isOwner,
1286
- onTogglePhoto: toggleSelect,
1287
- onPreviewPhoto: file => showFileDetailsModal(file),
1288
- onUpload: handleFileUpload,
1289
- onRefresh: () => loadFiles('refresh'),
1290
- onLoadMore: () => loadFiles('more'),
1291
- onCancel: () => {
1171
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PhotoPickerSection.default, {
1172
+ photos: photosOnly,
1173
+ selectedIds: selectedIds,
1174
+ multiSelect: multiSelect,
1175
+ maxSelection: maxSelection,
1176
+ allowUpload: allowUpload,
1177
+ refreshing: isRefreshingFiles,
1178
+ uploading: uploading,
1179
+ isPickingDocument: isPickingDocument,
1180
+ uploadProgress: uploadProgress,
1181
+ hasMore: hasMoreFiles,
1182
+ loadingMore: isFetchingMore,
1183
+ loading: isLoadingFiles,
1184
+ loadError: hasLoadError,
1185
+ onRetry: () => filesQuery.refetch(),
1186
+ reduceMotion: reduceMotion,
1187
+ getThumbUrl: thumbSourceFor,
1188
+ primaryColor: colors.primary,
1189
+ isOwner: isOwner,
1190
+ onTogglePhoto: toggleSelect
1191
+ // Long-press preview surfaces the file-detail panel on the stack.
1192
+ ,
1193
+ onPreviewPhoto: file => showFileDetailsModal(file),
1194
+ onUpload: handleFileUpload,
1195
+ onRefresh: () => filesQuery.refetch(),
1196
+ onLoadMore: () => filesQuery.fetchNextPage(),
1197
+ onCancel: () => {
1198
+ if (onSelect || onConfirmSelection) {
1199
+ // Legacy callback caller: preserve close/back behaviour.
1292
1200
  if (onClose) onClose();else goBack?.();
1293
- },
1294
- onConfirm: confirmMultiSelection,
1295
- t: t
1296
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FileDetailsModal.FileDetailsModal, {
1297
- control: fileDetailsControl,
1298
- file: selectedFile,
1299
- onDownload: handleFileDownload,
1300
- onDelete: confirmFileDelete,
1301
- isOwner: isOwner
1302
- })]
1201
+ } else {
1202
+ // Promise picker (avatar): dismiss just this surface.
1203
+ dismiss?.();
1204
+ }
1205
+ },
1206
+ onConfirm: confirmMultiSelection,
1207
+ t: t
1303
1208
  });
1304
1209
  }
1305
1210
 
1306
1211
  // If a file is opened, show the file viewer
1307
1212
  if (!selectMode && openedFile) {
1308
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
1309
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_FileViewer.FileViewer, {
1310
- file: openedFile,
1311
- fileContent: fileContent,
1312
- loadingFileContent: loadingFileContent,
1313
- showFileDetailsInViewer: showFileDetailsInViewer,
1314
- onToggleDetails: () => setShowFileDetailsInViewer(!showFileDetailsInViewer),
1315
- onClose: handleCloseFile,
1316
- onDownload: handleFileDownload,
1317
- onDelete: confirmFileDelete,
1318
- isOwner: user?.id === targetUserId
1319
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FileDetailsModal.FileDetailsModal, {
1320
- control: fileDetailsControl,
1321
- file: selectedFile,
1322
- onDownload: handleFileDownload,
1323
- onDelete: confirmFileDelete,
1324
- isOwner: user?.id === targetUserId
1325
- })]
1213
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FileViewer.FileViewer, {
1214
+ file: openedFile,
1215
+ fileContent: fileContent,
1216
+ loadingFileContent: loadingFileContent,
1217
+ showFileDetailsInViewer: showFileDetailsInViewer,
1218
+ onToggleDetails: () => setShowFileDetailsInViewer(!showFileDetailsInViewer),
1219
+ onClose: handleCloseFile,
1220
+ onDownload: handleFileDownload,
1221
+ onDelete: confirmFileDelete,
1222
+ isOwner: user?.id === targetUserId
1326
1223
  });
1327
1224
  }
1328
1225
 
1329
1226
  // If upload preview is showing, render it inline instead of the file list
1330
1227
  if (showUploadPreview) {
1331
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1228
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1332
1229
  className: "flex-1",
1333
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.default, {
1334
- title: t('fileManagement.reviewFiles'),
1335
- subtitle: t('fileManagement.readyToUpload', {
1336
- count: pendingFiles.length
1337
- }),
1338
- onBack: handleCancelUpload,
1339
- showBackButton: true,
1340
- variant: "minimal",
1341
- elevation: "none",
1342
- titleAlignment: "left"
1343
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_UploadPreview.UploadPreview, {
1230
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_UploadPreview.UploadPreview, {
1344
1231
  pendingFiles: pendingFiles,
1345
1232
  onConfirm: handleConfirmUpload,
1346
1233
  onCancel: handleCancelUpload,
1347
1234
  onRemoveFile: removePendingFile,
1348
1235
  inline: true
1349
- })]
1236
+ })
1350
1237
  });
1351
1238
  }
1352
1239
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1353
1240
  className: "flex-1",
1354
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.default, {
1355
- title: selectMode ? multiSelect ? maxSelection ? t('fileManagement.selectedWithMax', {
1356
- count: selectedIds.size,
1357
- max: maxSelection
1358
- }) : t('fileManagement.selected', {
1359
- count: selectedIds.size
1360
- }) : t('fileManagement.selectFile') : viewMode === 'photos' ? t('fileManagement.photos') : t('fileManagement.title'),
1361
- subtitle: selectMode ? multiSelect ? t('fileManagement.available', {
1362
- count: filteredFiles.length
1363
- }) : t('fileManagement.tapToSelect') : filteredFiles.length === 1 ? t('fileManagement.itemCount', {
1364
- count: filteredFiles.length
1365
- }) : t('fileManagement.itemCount_plural', {
1366
- count: filteredFiles.length
1367
- }),
1368
- actions: selectMode && multiSelect ? [{
1369
- key: 'clear',
1370
- text: t('fileManagement.clear'),
1371
- onPress: () => setSelectedIds(new Set()),
1372
- disabled: selectedIds.size === 0
1373
- }, {
1374
- key: 'confirm',
1375
- text: t('fileManagement.confirm'),
1376
- onPress: confirmMultiSelection,
1377
- disabled: selectedIds.size === 0
1378
- }] : !selectMode && selectedIds.size > 0 ? [{
1379
- key: 'clear',
1380
- text: t('fileManagement.clear'),
1381
- onPress: () => setSelectedIds(new Set())
1382
- }, {
1383
- key: 'delete',
1384
- text: t('fileManagement.delete', {
1385
- count: selectedIds.size
1386
- }),
1387
- onPress: confirmBulkDelete,
1388
- icon: 'delete'
1389
- }, {
1390
- key: 'visibility',
1391
- text: t('fileManagement.visibility'),
1392
- onPress: () => {
1393
- visibilityChangeDialog.open();
1394
- },
1395
- icon: 'eye'
1396
- }] : undefined,
1397
- onBack: onClose || goBack,
1398
- showBackButton: true,
1399
- variant: "minimal",
1400
- elevation: "none",
1401
- titleAlignment: "left"
1402
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1241
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1403
1242
  className: "flex-row items-center justify-between px-[12px] py-[12px] gap-[12px]",
1404
1243
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
1405
1244
  horizontal: true,
@@ -1429,32 +1268,30 @@ const FileManagementScreen = ({
1429
1268
  textColor: colors.text,
1430
1269
  style: screenStyles.viewModeButton,
1431
1270
  accessibilityLabel: t('fileManagement.a11y.viewPhotos') || 'Show photos only'
1432
- }), !isImageOnlyPicker && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
1433
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AnimatedButton.AnimatedButton, {
1434
- isSelected: viewMode === 'videos',
1435
- onPress: () => setViewMode('videos'),
1436
- icon: viewMode === 'videos' ? 'video' : 'video-outline',
1437
- primaryColor: colors.primary,
1438
- textColor: colors.text,
1439
- style: screenStyles.viewModeButton,
1440
- accessibilityLabel: t('fileManagement.a11y.viewVideos') || 'Show videos only'
1441
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AnimatedButton.AnimatedButton, {
1442
- isSelected: viewMode === 'documents',
1443
- onPress: () => setViewMode('documents'),
1444
- icon: viewMode === 'documents' ? 'file-document' : 'file-document-outline',
1445
- primaryColor: colors.primary,
1446
- textColor: colors.text,
1447
- style: screenStyles.viewModeButton,
1448
- accessibilityLabel: t('fileManagement.a11y.viewDocuments') || 'Show documents only'
1449
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AnimatedButton.AnimatedButton, {
1450
- isSelected: viewMode === 'audio',
1451
- onPress: () => setViewMode('audio'),
1452
- icon: viewMode === 'audio' ? 'music-note' : 'music-note-outline',
1453
- primaryColor: colors.primary,
1454
- textColor: colors.text,
1455
- style: screenStyles.viewModeButton,
1456
- accessibilityLabel: t('fileManagement.a11y.viewAudio') || 'Show audio only'
1457
- })]
1271
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AnimatedButton.AnimatedButton, {
1272
+ isSelected: viewMode === 'videos',
1273
+ onPress: () => setViewMode('videos'),
1274
+ icon: viewMode === 'videos' ? 'video' : 'video-outline',
1275
+ primaryColor: colors.primary,
1276
+ textColor: colors.text,
1277
+ style: screenStyles.viewModeButton,
1278
+ accessibilityLabel: t('fileManagement.a11y.viewVideos') || 'Show videos only'
1279
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AnimatedButton.AnimatedButton, {
1280
+ isSelected: viewMode === 'documents',
1281
+ onPress: () => setViewMode('documents'),
1282
+ icon: viewMode === 'documents' ? 'file-document' : 'file-document-outline',
1283
+ primaryColor: colors.primary,
1284
+ textColor: colors.text,
1285
+ style: screenStyles.viewModeButton,
1286
+ accessibilityLabel: t('fileManagement.a11y.viewDocuments') || 'Show documents only'
1287
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_AnimatedButton.AnimatedButton, {
1288
+ isSelected: viewMode === 'audio',
1289
+ onPress: () => setViewMode('audio'),
1290
+ icon: viewMode === 'audio' ? 'music-note' : 'music-note-outline',
1291
+ primaryColor: colors.primary,
1292
+ textColor: colors.text,
1293
+ style: screenStyles.viewModeButton,
1294
+ accessibilityLabel: t('fileManagement.a11y.viewAudio') || 'Show audio only'
1458
1295
  })]
1459
1296
  })
1460
1297
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
@@ -1487,15 +1324,15 @@ const FileManagementScreen = ({
1487
1324
  size: 14,
1488
1325
  color: colors.textSecondary
1489
1326
  })]
1490
- }), user?.id === targetUserId && (!selectMode || selectMode && allowUploadInSelectMode) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1491
- className: `h-[44px] rounded-[22px] items-center justify-center ${isImageOnlyPicker ? 'w-auto min-w-[44px] px-[14px]' : 'w-[44px]'}`,
1327
+ }), user?.id === targetUserId && (!selectMode || allowUploadInSelectMode) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1328
+ className: "h-[44px] w-[44px] rounded-[22px] items-center justify-center",
1492
1329
  style: {
1493
1330
  backgroundColor: colors.primary
1494
1331
  },
1495
1332
  onPress: handleFileUpload,
1496
1333
  disabled: uploading || isPickingDocument,
1497
1334
  accessibilityRole: "button",
1498
- accessibilityLabel: isImageOnlyPicker ? t('fileManagement.a11y.uploadFromDevice') || 'Upload photo from device' : t('fileManagement.a11y.uploadFile') || 'Upload file',
1335
+ accessibilityLabel: t('fileManagement.a11y.uploadFile') || 'Upload file',
1499
1336
  accessibilityState: {
1500
1337
  busy: uploading || isPickingDocument
1501
1338
  },
@@ -1511,17 +1348,6 @@ const FileManagementScreen = ({
1511
1348
  }) : isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
1512
1349
  size: "small",
1513
1350
  color: "#FFFFFF"
1514
- }) : isImageOnlyPicker ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1515
- className: "flex-row items-center gap-[6px]",
1516
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1517
- name: "cloud-upload",
1518
- size: 18,
1519
- color: "#FFFFFF"
1520
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1521
- className: "text-white text-[14px] font-semibold",
1522
- numberOfLines: 1,
1523
- children: t('fileManagement.upload') || 'Upload'
1524
- })]
1525
1351
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1526
1352
  name: "add",
1527
1353
  size: 22,
@@ -1617,72 +1443,22 @@ const FileManagementScreen = ({
1617
1443
  filteredFiles: filteredFiles,
1618
1444
  searchQuery: searchQuery,
1619
1445
  items: groupedFileItems,
1620
- paging: paging,
1621
- refreshing: refreshing,
1446
+ paging: {
1447
+ loadingMore: isFetchingMore,
1448
+ hasMore: hasMoreFiles
1449
+ },
1450
+ refreshing: isRefreshingFiles,
1622
1451
  colors: colors,
1623
1452
  t: t,
1624
- onRefresh: () => loadFiles('refresh'),
1625
- onLoadMore: () => loadFiles('more'),
1453
+ onRefresh: () => filesQuery.refetch(),
1454
+ onLoadMore: () => filesQuery.fetchNextPage(),
1626
1455
  onClearSearch: () => setSearchQuery(''),
1627
1456
  renderEmptyState: renderEmptyState
1628
- }), !selectMode && /*#__PURE__*/(0, _jsxRuntime.jsx)(_FileDetailsModal.FileDetailsModal, {
1629
- control: fileDetailsControl,
1630
- file: selectedFile,
1631
- onDownload: handleFileDownload,
1632
- onDelete: confirmFileDelete,
1633
- isOwner: user?.id === targetUserId
1634
1457
  }), !selectMode && uploading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_UploadBar.default, {
1635
1458
  uploadProgress: uploadProgress,
1636
1459
  isDark: bloomTheme.isDark,
1637
1460
  colors: colors,
1638
1461
  t: t
1639
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
1640
- control: fileDeleteDialog,
1641
- title: t('fileManagement.deleteFile') || 'Delete File',
1642
- description: pendingDeleteFile ? t('fileManagement.confirms.deleteFile', {
1643
- filename: pendingDeleteFile.name
1644
- }) : '',
1645
- actions: [{
1646
- label: t('fileManagement.confirm') || 'Delete',
1647
- color: 'destructive',
1648
- onPress: handleFileDelete
1649
- }, {
1650
- label: t('common.cancel') || 'Cancel',
1651
- color: 'cancel'
1652
- }]
1653
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
1654
- control: bulkDeleteDialog,
1655
- title: t('fileManagement.deleteFiles') || 'Delete Files',
1656
- description: t('fileManagement.confirms.deleteFiles', {
1657
- count: selectedIds.size
1658
- }),
1659
- actions: [{
1660
- label: t('fileManagement.confirm') || 'Delete',
1661
- color: 'destructive',
1662
- onPress: handleBulkDelete
1663
- }, {
1664
- label: t('common.cancel') || 'Cancel',
1665
- color: 'cancel'
1666
- }]
1667
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
1668
- control: visibilityChangeDialog,
1669
- title: t('fileManagement.changeVisibility') || 'Change Visibility',
1670
- description: t('fileManagement.changeVisibilityConfirm', {
1671
- count: selectedIds.size
1672
- }),
1673
- actions: [{
1674
- label: t('fileManagement.private') || 'Private',
1675
- onPress: () => handleBulkVisibilityChange('private')
1676
- }, {
1677
- label: t('fileManagement.public') || 'Public',
1678
- onPress: () => handleBulkVisibilityChange('public')
1679
- }, {
1680
- label: t('fileManagement.unlisted') || 'Unlisted',
1681
- onPress: () => handleBulkVisibilityChange('unlisted')
1682
- }, {
1683
- label: t('common.cancel') || 'Cancel',
1684
- color: 'cancel'
1685
- }]
1686
1462
  })]
1687
1463
  });
1688
1464
  };