@oxyhq/services 5.14.0 → 5.15.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 (1157) hide show
  1. package/README.md +130 -54
  2. package/lib/commonjs/assets/assets/lottie/welcomeheader_background_op1.json +1 -0
  3. package/lib/commonjs/assets/lottie/welcomeheader_background_op1.json +1 -0
  4. package/lib/commonjs/core/HttpService.js +94 -4
  5. package/lib/commonjs/core/HttpService.js.map +1 -1
  6. package/lib/commonjs/core/OxyServices.base.js +3 -1
  7. package/lib/commonjs/core/OxyServices.base.js.map +1 -1
  8. package/lib/commonjs/core/mixins/OxyServices.assets.js +213 -22
  9. package/lib/commonjs/core/mixins/OxyServices.assets.js.map +1 -1
  10. package/lib/commonjs/core/mixins/OxyServices.auth.js +70 -99
  11. package/lib/commonjs/core/mixins/OxyServices.auth.js.map +1 -1
  12. package/lib/commonjs/crypto/index.js +33 -0
  13. package/lib/commonjs/crypto/index.js.map +1 -0
  14. package/lib/commonjs/crypto/keyManager.js +208 -0
  15. package/lib/commonjs/crypto/keyManager.js.map +1 -0
  16. package/lib/commonjs/crypto/recoveryPhrase.js +137 -0
  17. package/lib/commonjs/crypto/recoveryPhrase.js.map +1 -0
  18. package/lib/commonjs/crypto/signatureService.js +230 -0
  19. package/lib/commonjs/crypto/signatureService.js.map +1 -0
  20. package/lib/commonjs/i18n/locales/en-US.json +4 -0
  21. package/lib/commonjs/index.js +22 -0
  22. package/lib/commonjs/index.js.map +1 -1
  23. package/lib/commonjs/ui/components/ActivityIndicator.js +203 -0
  24. package/lib/commonjs/ui/components/ActivityIndicator.js.map +1 -0
  25. package/lib/commonjs/ui/components/AutoHeightScrollView.js +46 -0
  26. package/lib/commonjs/ui/components/AutoHeightScrollView.js.map +1 -0
  27. package/lib/commonjs/ui/components/BottomSheet.js +407 -0
  28. package/lib/commonjs/ui/components/BottomSheet.js.map +1 -0
  29. package/lib/commonjs/ui/components/BottomSheetRouter.js +366 -0
  30. package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -0
  31. package/lib/commonjs/ui/components/CrossFadeIcon.js +106 -0
  32. package/lib/commonjs/ui/components/CrossFadeIcon.js.map +1 -0
  33. package/lib/commonjs/ui/components/EmptyState.js +41 -0
  34. package/lib/commonjs/ui/components/EmptyState.js.map +1 -0
  35. package/lib/commonjs/ui/components/GroupedItem.js +87 -82
  36. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  37. package/lib/commonjs/ui/components/GroupedSection.js +25 -25
  38. package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
  39. package/lib/commonjs/ui/components/Header.js +111 -47
  40. package/lib/commonjs/ui/components/Header.js.map +1 -1
  41. package/lib/commonjs/ui/components/HelperText.js +103 -0
  42. package/lib/commonjs/ui/components/HelperText.js.map +1 -0
  43. package/lib/commonjs/ui/components/Icon.js +109 -0
  44. package/lib/commonjs/ui/components/Icon.js.map +1 -0
  45. package/lib/commonjs/ui/components/IconButton/IconButton.js +159 -0
  46. package/lib/commonjs/ui/components/IconButton/IconButton.js.map +1 -0
  47. package/lib/commonjs/ui/components/IconButton/utils.js +155 -0
  48. package/lib/commonjs/ui/components/IconButton/utils.js.map +1 -0
  49. package/lib/commonjs/ui/components/LoadingState.js +47 -0
  50. package/lib/commonjs/ui/components/LoadingState.js.map +1 -0
  51. package/lib/commonjs/ui/components/OxyPayButton.js +1 -14
  52. package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -1
  53. package/lib/commonjs/ui/components/OxyProvider.js +41 -391
  54. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  55. package/lib/commonjs/ui/components/OxySignInButton.js +9 -13
  56. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  57. package/lib/commonjs/ui/components/ProfileCard.js +7 -4
  58. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
  59. package/lib/commonjs/ui/components/QuickActions.js +7 -4
  60. package/lib/commonjs/ui/components/QuickActions.js.map +1 -1
  61. package/lib/commonjs/ui/components/Section.js +4 -1
  62. package/lib/commonjs/ui/components/Section.js.map +1 -1
  63. package/lib/commonjs/ui/components/SectionTitle.js +6 -3
  64. package/lib/commonjs/ui/components/SectionTitle.js.map +1 -1
  65. package/lib/commonjs/ui/components/SettingRow.js +77 -0
  66. package/lib/commonjs/ui/components/SettingRow.js.map +1 -0
  67. package/lib/commonjs/ui/components/StepBasedScreen.js +188 -172
  68. package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
  69. package/lib/commonjs/ui/components/Surface.js +258 -0
  70. package/lib/commonjs/ui/components/Surface.js.map +1 -0
  71. package/lib/commonjs/ui/components/TextField/Addons/Outline.js +46 -0
  72. package/lib/commonjs/ui/components/TextField/Addons/Outline.js.map +1 -0
  73. package/lib/commonjs/ui/components/TextField/Addons/Underline.js +53 -0
  74. package/lib/commonjs/ui/components/TextField/Addons/Underline.js.map +1 -0
  75. package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.js +155 -0
  76. package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAdornment.js.map +1 -0
  77. package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAffix.js +144 -0
  78. package/lib/commonjs/ui/components/TextField/Adornment/TextFieldAffix.js.map +1 -0
  79. package/lib/commonjs/ui/components/TextField/Adornment/TextFieldIcon.js +137 -0
  80. package/lib/commonjs/ui/components/TextField/Adornment/TextFieldIcon.js.map +1 -0
  81. package/lib/commonjs/ui/components/TextField/Adornment/enums.js +22 -0
  82. package/lib/commonjs/ui/components/TextField/Adornment/enums.js.map +1 -0
  83. package/lib/commonjs/ui/components/TextField/Adornment/types.js +6 -0
  84. package/lib/commonjs/ui/components/TextField/Adornment/types.js.map +1 -0
  85. package/lib/commonjs/ui/components/TextField/Adornment/utils.js +62 -0
  86. package/lib/commonjs/ui/components/TextField/Adornment/utils.js.map +1 -0
  87. package/lib/commonjs/ui/components/TextField/Label/InputLabel.js +176 -0
  88. package/lib/commonjs/ui/components/TextField/Label/InputLabel.js.map +1 -0
  89. package/lib/commonjs/ui/components/TextField/Label/LabelBackground.js +84 -0
  90. package/lib/commonjs/ui/components/TextField/Label/LabelBackground.js.map +1 -0
  91. package/lib/commonjs/ui/components/TextField/TextFieldFlat.js +377 -0
  92. package/lib/commonjs/ui/components/TextField/TextFieldFlat.js.map +1 -0
  93. package/lib/commonjs/ui/components/TextField/TextFieldOutlined.js +361 -0
  94. package/lib/commonjs/ui/components/TextField/TextFieldOutlined.js.map +1 -0
  95. package/lib/commonjs/ui/components/TextField/constants.js +50 -0
  96. package/lib/commonjs/ui/components/TextField/constants.js.map +1 -0
  97. package/lib/commonjs/ui/components/TextField/helpers.js +490 -0
  98. package/lib/commonjs/ui/components/TextField/helpers.js.map +1 -0
  99. package/lib/commonjs/ui/components/TextField/types.js +6 -0
  100. package/lib/commonjs/ui/components/TextField/types.js.map +1 -0
  101. package/lib/commonjs/ui/components/TextField.js +339 -0
  102. package/lib/commonjs/ui/components/TextField.js.map +1 -0
  103. package/lib/commonjs/ui/components/TouchableRipple/Pressable.js +12 -0
  104. package/lib/commonjs/ui/components/TouchableRipple/Pressable.js.map +1 -0
  105. package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.js +258 -0
  106. package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.js.map +1 -0
  107. package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.native.js +107 -0
  108. package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.native.js.map +1 -0
  109. package/lib/commonjs/ui/components/TouchableRipple/utils.js +56 -0
  110. package/lib/commonjs/ui/components/TouchableRipple/utils.js.map +1 -0
  111. package/lib/commonjs/ui/components/Typography/AnimatedText.js +62 -0
  112. package/lib/commonjs/ui/components/Typography/AnimatedText.js.map +1 -0
  113. package/lib/commonjs/ui/components/Typography/types.js +26 -0
  114. package/lib/commonjs/ui/components/Typography/types.js.map +1 -0
  115. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +171 -0
  116. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -0
  117. package/lib/commonjs/ui/components/fileManagement/FileViewer.js +409 -0
  118. package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -0
  119. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +181 -0
  120. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -0
  121. package/lib/commonjs/ui/components/fileManagement/styles.js +868 -0
  122. package/lib/commonjs/ui/components/fileManagement/styles.js.map +1 -0
  123. package/lib/commonjs/ui/components/index.js +29 -1
  124. package/lib/commonjs/ui/components/index.js.map +1 -1
  125. package/lib/commonjs/ui/components/profile/EditBioModal.js +181 -0
  126. package/lib/commonjs/ui/components/profile/EditBioModal.js.map +1 -0
  127. package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js +207 -0
  128. package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js.map +1 -0
  129. package/lib/commonjs/ui/components/profile/EditEmailModal.js +184 -0
  130. package/lib/commonjs/ui/components/profile/EditEmailModal.js.map +1 -0
  131. package/lib/commonjs/ui/components/profile/EditLinksModal.js +315 -0
  132. package/lib/commonjs/ui/components/profile/EditLinksModal.js.map +1 -0
  133. package/lib/commonjs/ui/components/profile/EditLocationModal.js +273 -0
  134. package/lib/commonjs/ui/components/profile/EditLocationModal.js.map +1 -0
  135. package/lib/commonjs/ui/components/profile/EditUsernameModal.js +180 -0
  136. package/lib/commonjs/ui/components/profile/EditUsernameModal.js.map +1 -0
  137. package/lib/commonjs/ui/components/profile/TwoFactorSetupModal.js +467 -0
  138. package/lib/commonjs/ui/components/profile/TwoFactorSetupModal.js.map +1 -0
  139. package/lib/commonjs/ui/components/styles/overlay.js +85 -0
  140. package/lib/commonjs/ui/components/styles/overlay.js.map +1 -0
  141. package/lib/commonjs/ui/components/styles/shadow.js +132 -0
  142. package/lib/commonjs/ui/components/styles/shadow.js.map +1 -0
  143. package/lib/commonjs/ui/components/theming.js +116 -0
  144. package/lib/commonjs/ui/components/theming.js.map +1 -0
  145. package/lib/commonjs/ui/components/types.js +2 -0
  146. package/lib/commonjs/ui/components/types.js.map +1 -0
  147. package/lib/commonjs/ui/components/utils/forwardRef.js +18 -0
  148. package/lib/commonjs/ui/components/utils/forwardRef.js.map +1 -0
  149. package/lib/commonjs/ui/components/utils/hasTouchHandler.js +13 -0
  150. package/lib/commonjs/ui/components/utils/hasTouchHandler.js.map +1 -0
  151. package/lib/commonjs/ui/components/utils/roundLayoutSize.js +9 -0
  152. package/lib/commonjs/ui/components/utils/roundLayoutSize.js.map +1 -0
  153. package/lib/commonjs/ui/components/utils/splitStyles.js +50 -0
  154. package/lib/commonjs/ui/components/utils/splitStyles.js.map +1 -0
  155. package/lib/commonjs/ui/constants/iconColors.js +84 -0
  156. package/lib/commonjs/ui/constants/iconColors.js.map +1 -0
  157. package/lib/commonjs/ui/constants/spacing.js +50 -0
  158. package/lib/commonjs/ui/constants/spacing.js.map +1 -0
  159. package/lib/commonjs/ui/constants/theme.js +123 -0
  160. package/lib/commonjs/ui/constants/theme.js.map +1 -0
  161. package/lib/commonjs/ui/context/OxyContext.js +198 -853
  162. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  163. package/lib/commonjs/ui/context/ThemeContext.js +36 -0
  164. package/lib/commonjs/ui/context/ThemeContext.js.map +1 -0
  165. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +349 -0
  166. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -0
  167. package/lib/commonjs/ui/context/hooks/useDeviceManagement.js +73 -0
  168. package/lib/commonjs/ui/context/hooks/useDeviceManagement.js.map +1 -0
  169. package/lib/commonjs/ui/context/hooks/useLanguageManagement.js +112 -0
  170. package/lib/commonjs/ui/context/hooks/useLanguageManagement.js.map +1 -0
  171. package/lib/commonjs/ui/context/hooks/useSessionManagement.js +261 -0
  172. package/lib/commonjs/ui/context/hooks/useSessionManagement.js.map +1 -0
  173. package/lib/commonjs/ui/context/hooks/useStorage.js +79 -0
  174. package/lib/commonjs/ui/context/hooks/useStorage.js.map +1 -0
  175. package/lib/commonjs/ui/context/utils/errorHandlers.js +90 -0
  176. package/lib/commonjs/ui/context/utils/errorHandlers.js.map +1 -0
  177. package/lib/commonjs/ui/context/utils/sessionHelpers.js +103 -0
  178. package/lib/commonjs/ui/context/utils/sessionHelpers.js.map +1 -0
  179. package/lib/commonjs/ui/context/utils/storageHelpers.js +119 -0
  180. package/lib/commonjs/ui/context/utils/storageHelpers.js.map +1 -0
  181. package/lib/commonjs/ui/hooks/index.js +14 -0
  182. package/lib/commonjs/ui/hooks/index.js.map +1 -1
  183. package/lib/commonjs/ui/hooks/use-color-scheme.js +29 -0
  184. package/lib/commonjs/ui/hooks/use-color-scheme.js.map +1 -0
  185. package/lib/commonjs/ui/hooks/use-haptic-press.js +21 -0
  186. package/lib/commonjs/ui/hooks/use-haptic-press.js.map +1 -0
  187. package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
  188. package/lib/commonjs/ui/hooks/useDeviceManagement.js +73 -0
  189. package/lib/commonjs/ui/hooks/useDeviceManagement.js.map +1 -0
  190. package/lib/commonjs/ui/hooks/useLanguageManagement.js +112 -0
  191. package/lib/commonjs/ui/hooks/useLanguageManagement.js.map +1 -0
  192. package/lib/commonjs/ui/hooks/useProfileEditing.js +123 -0
  193. package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -0
  194. package/lib/commonjs/ui/hooks/useSessionManagement.js +261 -0
  195. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -0
  196. package/lib/commonjs/ui/hooks/useStorage.js +79 -0
  197. package/lib/commonjs/ui/hooks/useStorage.js.map +1 -0
  198. package/lib/commonjs/ui/hooks/useThemeColors.js +31 -0
  199. package/lib/commonjs/ui/hooks/useThemeColors.js.map +1 -0
  200. package/lib/commonjs/ui/hooks/useThemeStyles.js +69 -0
  201. package/lib/commonjs/ui/hooks/useThemeStyles.js.map +1 -0
  202. package/lib/commonjs/ui/index.js +1 -4
  203. package/lib/commonjs/ui/index.js.map +1 -1
  204. package/lib/commonjs/ui/navigation/bottomSheetManager.js +180 -0
  205. package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -0
  206. package/lib/commonjs/ui/navigation/routes.js +80 -154
  207. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  208. package/lib/commonjs/ui/screens/AccountCenterScreen.js +67 -67
  209. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  210. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +217 -98
  211. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  212. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +514 -429
  213. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  214. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +44 -59
  215. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  216. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +12 -19
  217. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  218. package/lib/commonjs/ui/screens/AppInfoScreen.js +36 -43
  219. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  220. package/lib/commonjs/ui/screens/FeedbackScreen.js +14 -14
  221. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  222. package/lib/commonjs/ui/screens/FileManagementScreen.js +674 -1968
  223. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  224. package/lib/commonjs/ui/screens/HelpSupportScreen.js +26 -23
  225. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  226. package/lib/commonjs/ui/screens/HistoryViewScreen.js +19 -59
  227. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  228. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +79 -170
  229. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  230. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +13 -40
  231. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  232. package/lib/commonjs/ui/screens/OxyAuthScreen.js +436 -0
  233. package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -0
  234. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +18 -24
  235. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  236. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +21 -9
  237. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  238. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +180 -252
  239. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  240. package/lib/commonjs/ui/screens/ProfileScreen.js +7 -5
  241. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  242. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +32 -70
  243. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  244. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +26 -99
  245. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  246. package/lib/commonjs/ui/screens/SessionManagementScreen.js +24 -16
  247. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  248. package/lib/commonjs/ui/screens/UserLinksScreen.js +8 -10
  249. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
  250. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +64 -67
  251. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  252. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +11 -8
  253. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  254. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +124 -122
  255. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  256. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +99 -112
  257. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  258. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +12 -9
  259. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  260. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +552 -79
  261. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  262. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +12 -8
  263. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  264. package/lib/commonjs/ui/styles/authStyles.js +5 -11
  265. package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
  266. package/lib/commonjs/ui/styles/spacing.js +60 -2
  267. package/lib/commonjs/ui/styles/spacing.js.map +1 -1
  268. package/lib/commonjs/ui/styles/theme.js +1 -1
  269. package/lib/commonjs/ui/types/fileManagement.js +6 -0
  270. package/lib/commonjs/ui/types/fileManagement.js.map +1 -0
  271. package/lib/commonjs/ui/types/navigation.js +6 -0
  272. package/lib/commonjs/ui/types/navigation.js.map +1 -0
  273. package/lib/commonjs/ui/utils/colorUtils.js +52 -0
  274. package/lib/commonjs/ui/utils/colorUtils.js.map +1 -0
  275. package/lib/commonjs/ui/utils/errorHandlers.js +90 -0
  276. package/lib/commonjs/ui/utils/errorHandlers.js.map +1 -0
  277. package/lib/commonjs/ui/utils/fileManagement.js +181 -0
  278. package/lib/commonjs/ui/utils/fileManagement.js.map +1 -0
  279. package/lib/commonjs/ui/utils/sessionHelpers.js +103 -0
  280. package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -0
  281. package/lib/commonjs/ui/utils/storageHelpers.js +119 -0
  282. package/lib/commonjs/ui/utils/storageHelpers.js.map +1 -0
  283. package/lib/commonjs/ui/utils/themeUtils.js +47 -0
  284. package/lib/commonjs/ui/utils/themeUtils.js.map +1 -0
  285. package/lib/commonjs/ui/utils/user-utils.js +53 -0
  286. package/lib/commonjs/ui/utils/user-utils.js.map +1 -0
  287. package/lib/commonjs/utils/errorUtils.js +14 -4
  288. package/lib/commonjs/utils/errorUtils.js.map +1 -1
  289. package/lib/module/assets/assets/lottie/welcomeheader_background_op1.json +1 -0
  290. package/lib/module/assets/lottie/welcomeheader_background_op1.json +1 -0
  291. package/lib/module/core/HttpService.js +94 -4
  292. package/lib/module/core/HttpService.js.map +1 -1
  293. package/lib/module/core/OxyServices.base.js +3 -1
  294. package/lib/module/core/OxyServices.base.js.map +1 -1
  295. package/lib/module/core/mixins/OxyServices.assets.js +212 -20
  296. package/lib/module/core/mixins/OxyServices.assets.js.map +1 -1
  297. package/lib/module/core/mixins/OxyServices.auth.js +70 -99
  298. package/lib/module/core/mixins/OxyServices.auth.js.map +1 -1
  299. package/lib/module/crypto/index.js +16 -0
  300. package/lib/module/crypto/index.js.map +1 -0
  301. package/lib/module/crypto/keyManager.js +204 -0
  302. package/lib/module/crypto/keyManager.js.map +1 -0
  303. package/lib/module/crypto/recoveryPhrase.js +131 -0
  304. package/lib/module/crypto/recoveryPhrase.js.map +1 -0
  305. package/lib/module/crypto/signatureService.js +227 -0
  306. package/lib/module/crypto/signatureService.js.map +1 -0
  307. package/lib/module/i18n/locales/en-US.json +4 -0
  308. package/lib/module/index.js +2 -0
  309. package/lib/module/index.js.map +1 -1
  310. package/lib/module/ui/components/ActivityIndicator.js +198 -0
  311. package/lib/module/ui/components/ActivityIndicator.js.map +1 -0
  312. package/lib/module/ui/components/AutoHeightScrollView.js +41 -0
  313. package/lib/module/ui/components/AutoHeightScrollView.js.map +1 -0
  314. package/lib/module/ui/components/BottomSheet.js +402 -0
  315. package/lib/module/ui/components/BottomSheet.js.map +1 -0
  316. package/lib/module/ui/components/BottomSheetRouter.js +356 -0
  317. package/lib/module/ui/components/BottomSheetRouter.js.map +1 -0
  318. package/lib/module/ui/components/CrossFadeIcon.js +101 -0
  319. package/lib/module/ui/components/CrossFadeIcon.js.map +1 -0
  320. package/lib/module/ui/components/EmptyState.js +36 -0
  321. package/lib/module/ui/components/EmptyState.js.map +1 -0
  322. package/lib/module/ui/components/GroupedItem.js +88 -82
  323. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  324. package/lib/module/ui/components/GroupedSection.js +23 -23
  325. package/lib/module/ui/components/GroupedSection.js.map +1 -1
  326. package/lib/module/ui/components/Header.js +109 -46
  327. package/lib/module/ui/components/Header.js.map +1 -1
  328. package/lib/module/ui/components/HelperText.js +99 -0
  329. package/lib/module/ui/components/HelperText.js.map +1 -0
  330. package/lib/module/ui/components/Icon.js +102 -0
  331. package/lib/module/ui/components/Icon.js.map +1 -0
  332. package/lib/module/ui/components/IconButton/IconButton.js +153 -0
  333. package/lib/module/ui/components/IconButton/IconButton.js.map +1 -0
  334. package/lib/module/ui/components/IconButton/utils.js +149 -0
  335. package/lib/module/ui/components/IconButton/utils.js.map +1 -0
  336. package/lib/module/ui/components/LoadingState.js +42 -0
  337. package/lib/module/ui/components/LoadingState.js.map +1 -0
  338. package/lib/module/ui/components/OxyPayButton.js +1 -14
  339. package/lib/module/ui/components/OxyPayButton.js.map +1 -1
  340. package/lib/module/ui/components/OxyProvider.js +45 -396
  341. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  342. package/lib/module/ui/components/OxySignInButton.js +9 -13
  343. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  344. package/lib/module/ui/components/ProfileCard.js +7 -4
  345. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  346. package/lib/module/ui/components/QuickActions.js +7 -4
  347. package/lib/module/ui/components/QuickActions.js.map +1 -1
  348. package/lib/module/ui/components/Section.js +4 -1
  349. package/lib/module/ui/components/Section.js.map +1 -1
  350. package/lib/module/ui/components/SectionTitle.js +6 -3
  351. package/lib/module/ui/components/SectionTitle.js.map +1 -1
  352. package/lib/module/ui/components/SettingRow.js +72 -0
  353. package/lib/module/ui/components/SettingRow.js.map +1 -0
  354. package/lib/module/ui/components/StepBasedScreen.js +190 -174
  355. package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
  356. package/lib/module/ui/components/Surface.js +252 -0
  357. package/lib/module/ui/components/Surface.js.map +1 -0
  358. package/lib/module/ui/components/TextField/Addons/Outline.js +40 -0
  359. package/lib/module/ui/components/TextField/Addons/Outline.js.map +1 -0
  360. package/lib/module/ui/components/TextField/Addons/Underline.js +47 -0
  361. package/lib/module/ui/components/TextField/Addons/Underline.js.map +1 -0
  362. package/lib/module/ui/components/TextField/Adornment/TextFieldAdornment.js +148 -0
  363. package/lib/module/ui/components/TextField/Adornment/TextFieldAdornment.js.map +1 -0
  364. package/lib/module/ui/components/TextField/Adornment/TextFieldAffix.js +141 -0
  365. package/lib/module/ui/components/TextField/Adornment/TextFieldAffix.js.map +1 -0
  366. package/lib/module/ui/components/TextField/Adornment/TextFieldIcon.js +135 -0
  367. package/lib/module/ui/components/TextField/Adornment/TextFieldIcon.js.map +1 -0
  368. package/lib/module/ui/components/TextField/Adornment/enums.js +18 -0
  369. package/lib/module/ui/components/TextField/Adornment/enums.js.map +1 -0
  370. package/lib/module/ui/components/TextField/Adornment/types.js +4 -0
  371. package/lib/module/ui/components/TextField/Adornment/types.js.map +1 -0
  372. package/lib/module/ui/components/TextField/Adornment/utils.js +57 -0
  373. package/lib/module/ui/components/TextField/Adornment/utils.js.map +1 -0
  374. package/lib/module/ui/components/TextField/Label/InputLabel.js +171 -0
  375. package/lib/module/ui/components/TextField/Label/InputLabel.js.map +1 -0
  376. package/lib/module/ui/components/TextField/Label/LabelBackground.js +78 -0
  377. package/lib/module/ui/components/TextField/Label/LabelBackground.js.map +1 -0
  378. package/lib/module/ui/components/TextField/TextFieldFlat.js +372 -0
  379. package/lib/module/ui/components/TextField/TextFieldFlat.js.map +1 -0
  380. package/lib/module/ui/components/TextField/TextFieldOutlined.js +355 -0
  381. package/lib/module/ui/components/TextField/TextFieldOutlined.js.map +1 -0
  382. package/lib/module/ui/components/TextField/constants.js +46 -0
  383. package/lib/module/ui/components/TextField/constants.js.map +1 -0
  384. package/lib/module/ui/components/TextField/helpers.js +472 -0
  385. package/lib/module/ui/components/TextField/helpers.js.map +1 -0
  386. package/lib/module/ui/components/TextField/types.js +4 -0
  387. package/lib/module/ui/components/TextField/types.js.map +1 -0
  388. package/lib/module/ui/components/TextField.js +333 -0
  389. package/lib/module/ui/components/TextField.js.map +1 -0
  390. package/lib/module/ui/components/TouchableRipple/Pressable.js +9 -0
  391. package/lib/module/ui/components/TouchableRipple/Pressable.js.map +1 -0
  392. package/lib/module/ui/components/TouchableRipple/TouchableRipple.js +253 -0
  393. package/lib/module/ui/components/TouchableRipple/TouchableRipple.js.map +1 -0
  394. package/lib/module/ui/components/TouchableRipple/TouchableRipple.native.js +101 -0
  395. package/lib/module/ui/components/TouchableRipple/TouchableRipple.native.js.map +1 -0
  396. package/lib/module/ui/components/TouchableRipple/utils.js +50 -0
  397. package/lib/module/ui/components/TouchableRipple/utils.js.map +1 -0
  398. package/lib/module/ui/components/Typography/AnimatedText.js +56 -0
  399. package/lib/module/ui/components/Typography/AnimatedText.js.map +1 -0
  400. package/lib/module/ui/components/Typography/types.js +22 -0
  401. package/lib/module/ui/components/Typography/types.js.map +1 -0
  402. package/lib/module/ui/components/fileManagement/FileDetailsModal.js +165 -0
  403. package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -0
  404. package/lib/module/ui/components/fileManagement/FileViewer.js +402 -0
  405. package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -0
  406. package/lib/module/ui/components/fileManagement/UploadPreview.js +175 -0
  407. package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -0
  408. package/lib/module/ui/components/fileManagement/styles.js +864 -0
  409. package/lib/module/ui/components/fileManagement/styles.js.map +1 -0
  410. package/lib/module/ui/components/index.js +4 -1
  411. package/lib/module/ui/components/index.js.map +1 -1
  412. package/lib/module/ui/components/profile/EditBioModal.js +175 -0
  413. package/lib/module/ui/components/profile/EditBioModal.js.map +1 -0
  414. package/lib/module/ui/components/profile/EditDisplayNameModal.js +201 -0
  415. package/lib/module/ui/components/profile/EditDisplayNameModal.js.map +1 -0
  416. package/lib/module/ui/components/profile/EditEmailModal.js +178 -0
  417. package/lib/module/ui/components/profile/EditEmailModal.js.map +1 -0
  418. package/lib/module/ui/components/profile/EditLinksModal.js +309 -0
  419. package/lib/module/ui/components/profile/EditLinksModal.js.map +1 -0
  420. package/lib/module/ui/components/profile/EditLocationModal.js +267 -0
  421. package/lib/module/ui/components/profile/EditLocationModal.js.map +1 -0
  422. package/lib/module/ui/components/profile/EditUsernameModal.js +174 -0
  423. package/lib/module/ui/components/profile/EditUsernameModal.js.map +1 -0
  424. package/lib/module/ui/components/profile/TwoFactorSetupModal.js +460 -0
  425. package/lib/module/ui/components/profile/TwoFactorSetupModal.js.map +1 -0
  426. package/lib/module/ui/components/styles/overlay.js +80 -0
  427. package/lib/module/ui/components/styles/overlay.js.map +1 -0
  428. package/lib/module/ui/components/styles/shadow.js +128 -0
  429. package/lib/module/ui/components/styles/shadow.js.map +1 -0
  430. package/lib/module/ui/components/theming.js +111 -0
  431. package/lib/module/ui/components/theming.js.map +1 -0
  432. package/lib/module/ui/components/types.js +2 -0
  433. package/lib/module/ui/components/types.js.map +1 -0
  434. package/lib/module/ui/components/utils/forwardRef.js +13 -0
  435. package/lib/module/ui/components/utils/forwardRef.js.map +1 -0
  436. package/lib/module/ui/components/utils/hasTouchHandler.js +9 -0
  437. package/lib/module/ui/components/utils/hasTouchHandler.js.map +1 -0
  438. package/lib/module/ui/components/utils/roundLayoutSize.js +4 -0
  439. package/lib/module/ui/components/utils/roundLayoutSize.js.map +1 -0
  440. package/lib/module/ui/components/utils/splitStyles.js +46 -0
  441. package/lib/module/ui/components/utils/splitStyles.js.map +1 -0
  442. package/lib/module/ui/constants/iconColors.js +78 -0
  443. package/lib/module/ui/constants/iconColors.js.map +1 -0
  444. package/lib/module/ui/constants/spacing.js +45 -0
  445. package/lib/module/ui/constants/spacing.js.map +1 -0
  446. package/lib/module/ui/constants/theme.js +119 -0
  447. package/lib/module/ui/constants/theme.js.map +1 -0
  448. package/lib/module/ui/context/OxyContext.js +199 -855
  449. package/lib/module/ui/context/OxyContext.js.map +1 -1
  450. package/lib/module/ui/context/ThemeContext.js +29 -0
  451. package/lib/module/ui/context/ThemeContext.js.map +1 -0
  452. package/lib/module/ui/context/hooks/useAuthOperations.js +344 -0
  453. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -0
  454. package/lib/module/ui/context/hooks/useDeviceManagement.js +68 -0
  455. package/lib/module/ui/context/hooks/useDeviceManagement.js.map +1 -0
  456. package/lib/module/ui/context/hooks/useLanguageManagement.js +107 -0
  457. package/lib/module/ui/context/hooks/useLanguageManagement.js.map +1 -0
  458. package/lib/module/ui/context/hooks/useSessionManagement.js +256 -0
  459. package/lib/module/ui/context/hooks/useSessionManagement.js.map +1 -0
  460. package/lib/module/ui/context/hooks/useStorage.js +74 -0
  461. package/lib/module/ui/context/hooks/useStorage.js.map +1 -0
  462. package/lib/module/ui/context/utils/errorHandlers.js +83 -0
  463. package/lib/module/ui/context/utils/errorHandlers.js.map +1 -0
  464. package/lib/module/ui/context/utils/sessionHelpers.js +96 -0
  465. package/lib/module/ui/context/utils/sessionHelpers.js.map +1 -0
  466. package/lib/module/ui/context/utils/storageHelpers.js +111 -0
  467. package/lib/module/ui/context/utils/storageHelpers.js.map +1 -0
  468. package/lib/module/ui/hooks/index.js +2 -0
  469. package/lib/module/ui/hooks/index.js.map +1 -1
  470. package/lib/module/ui/hooks/use-color-scheme.js +26 -0
  471. package/lib/module/ui/hooks/use-color-scheme.js.map +1 -0
  472. package/lib/module/ui/hooks/use-haptic-press.js +17 -0
  473. package/lib/module/ui/hooks/use-haptic-press.js.map +1 -0
  474. package/lib/module/ui/hooks/useAssets.js.map +1 -1
  475. package/lib/module/ui/hooks/useDeviceManagement.js +68 -0
  476. package/lib/module/ui/hooks/useDeviceManagement.js.map +1 -0
  477. package/lib/module/ui/hooks/useLanguageManagement.js +107 -0
  478. package/lib/module/ui/hooks/useLanguageManagement.js.map +1 -0
  479. package/lib/module/ui/hooks/useProfileEditing.js +118 -0
  480. package/lib/module/ui/hooks/useProfileEditing.js.map +1 -0
  481. package/lib/module/ui/hooks/useSessionManagement.js +256 -0
  482. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -0
  483. package/lib/module/ui/hooks/useStorage.js +74 -0
  484. package/lib/module/ui/hooks/useStorage.js.map +1 -0
  485. package/lib/module/ui/hooks/useThemeColors.js +27 -0
  486. package/lib/module/ui/hooks/useThemeColors.js.map +1 -0
  487. package/lib/module/ui/hooks/useThemeStyles.js +64 -0
  488. package/lib/module/ui/hooks/useThemeStyles.js.map +1 -0
  489. package/lib/module/ui/index.js +2 -4
  490. package/lib/module/ui/index.js.map +1 -1
  491. package/lib/module/ui/navigation/bottomSheetManager.js +168 -0
  492. package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -0
  493. package/lib/module/ui/navigation/routes.js +77 -152
  494. package/lib/module/ui/navigation/routes.js.map +1 -1
  495. package/lib/module/ui/screens/AccountCenterScreen.js +67 -67
  496. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  497. package/lib/module/ui/screens/AccountOverviewScreen.js +218 -100
  498. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  499. package/lib/module/ui/screens/AccountSettingsScreen.js +515 -430
  500. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  501. package/lib/module/ui/screens/AccountSwitcherScreen.js +45 -60
  502. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  503. package/lib/module/ui/screens/AccountVerificationScreen.js +12 -19
  504. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  505. package/lib/module/ui/screens/AppInfoScreen.js +36 -43
  506. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  507. package/lib/module/ui/screens/FeedbackScreen.js +14 -14
  508. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  509. package/lib/module/ui/screens/FileManagementScreen.js +670 -1965
  510. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  511. package/lib/module/ui/screens/HelpSupportScreen.js +26 -23
  512. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  513. package/lib/module/ui/screens/HistoryViewScreen.js +22 -62
  514. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  515. package/lib/module/ui/screens/LanguageSelectorScreen.js +80 -171
  516. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  517. package/lib/module/ui/screens/LegalDocumentsScreen.js +16 -43
  518. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  519. package/lib/module/ui/screens/OxyAuthScreen.js +432 -0
  520. package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -0
  521. package/lib/module/ui/screens/PaymentGatewayScreen.js +18 -24
  522. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  523. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +21 -9
  524. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  525. package/lib/module/ui/screens/PrivacySettingsScreen.js +167 -239
  526. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  527. package/lib/module/ui/screens/ProfileScreen.js +7 -5
  528. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  529. package/lib/module/ui/screens/SavesCollectionsScreen.js +35 -73
  530. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  531. package/lib/module/ui/screens/SearchSettingsScreen.js +29 -102
  532. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  533. package/lib/module/ui/screens/SessionManagementScreen.js +24 -16
  534. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  535. package/lib/module/ui/screens/UserLinksScreen.js +8 -10
  536. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
  537. package/lib/module/ui/screens/WelcomeNewUserScreen.js +65 -68
  538. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  539. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +11 -8
  540. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  541. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +124 -121
  542. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  543. package/lib/module/ui/screens/karma/KarmaFAQScreen.js +101 -114
  544. package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  545. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +12 -9
  546. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  547. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +554 -81
  548. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  549. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +12 -8
  550. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  551. package/lib/module/ui/styles/authStyles.js +5 -11
  552. package/lib/module/ui/styles/authStyles.js.map +1 -1
  553. package/lib/module/ui/styles/spacing.js +12 -2
  554. package/lib/module/ui/styles/spacing.js.map +1 -1
  555. package/lib/module/ui/styles/theme.js +1 -1
  556. package/lib/module/ui/types/fileManagement.js +4 -0
  557. package/lib/module/ui/types/fileManagement.js.map +1 -0
  558. package/lib/module/ui/types/navigation.js +4 -0
  559. package/lib/module/ui/types/navigation.js.map +1 -0
  560. package/lib/module/ui/utils/colorUtils.js +46 -0
  561. package/lib/module/ui/utils/colorUtils.js.map +1 -0
  562. package/lib/module/ui/utils/errorHandlers.js +83 -0
  563. package/lib/module/ui/utils/errorHandlers.js.map +1 -0
  564. package/lib/module/ui/utils/fileManagement.js +172 -0
  565. package/lib/module/ui/utils/fileManagement.js.map +1 -0
  566. package/lib/module/ui/utils/sessionHelpers.js +96 -0
  567. package/lib/module/ui/utils/sessionHelpers.js.map +1 -0
  568. package/lib/module/ui/utils/storageHelpers.js +111 -0
  569. package/lib/module/ui/utils/storageHelpers.js.map +1 -0
  570. package/lib/module/ui/utils/themeUtils.js +41 -0
  571. package/lib/module/ui/utils/themeUtils.js.map +1 -0
  572. package/lib/module/ui/utils/user-utils.js +46 -0
  573. package/lib/module/ui/utils/user-utils.js.map +1 -0
  574. package/lib/module/utils/errorUtils.js +14 -4
  575. package/lib/module/utils/errorUtils.js.map +1 -1
  576. package/lib/typescript/core/HttpService.d.ts +48 -0
  577. package/lib/typescript/core/HttpService.d.ts.map +1 -1
  578. package/lib/typescript/core/OxyServices.base.d.ts.map +1 -1
  579. package/lib/typescript/core/mixins/OxyServices.analytics.d.ts.map +1 -1
  580. package/lib/typescript/core/mixins/OxyServices.assets.d.ts +23 -1
  581. package/lib/typescript/core/mixins/OxyServices.assets.d.ts.map +1 -1
  582. package/lib/typescript/core/mixins/OxyServices.auth.d.ts +70 -42
  583. package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -1
  584. package/lib/typescript/core/mixins/OxyServices.developer.d.ts.map +1 -1
  585. package/lib/typescript/core/mixins/OxyServices.devices.d.ts.map +1 -1
  586. package/lib/typescript/core/mixins/OxyServices.karma.d.ts.map +1 -1
  587. package/lib/typescript/core/mixins/OxyServices.language.d.ts.map +1 -1
  588. package/lib/typescript/core/mixins/OxyServices.location.d.ts.map +1 -1
  589. package/lib/typescript/core/mixins/OxyServices.payment.d.ts.map +1 -1
  590. package/lib/typescript/core/mixins/OxyServices.privacy.d.ts.map +1 -1
  591. package/lib/typescript/core/mixins/OxyServices.totp.d.ts.map +1 -1
  592. package/lib/typescript/core/mixins/OxyServices.user.d.ts.map +1 -1
  593. package/lib/typescript/core/mixins/OxyServices.utility.d.ts.map +1 -1
  594. package/lib/typescript/core/mixins/index.d.ts +26 -34
  595. package/lib/typescript/core/mixins/index.d.ts.map +1 -1
  596. package/lib/typescript/crypto/index.d.ts +11 -0
  597. package/lib/typescript/crypto/index.d.ts.map +1 -0
  598. package/lib/typescript/crypto/keyManager.d.ts +73 -0
  599. package/lib/typescript/crypto/keyManager.d.ts.map +1 -0
  600. package/lib/typescript/crypto/recoveryPhrase.d.ts +57 -0
  601. package/lib/typescript/crypto/recoveryPhrase.d.ts.map +1 -0
  602. package/lib/typescript/crypto/signatureService.d.ts +80 -0
  603. package/lib/typescript/crypto/signatureService.d.ts.map +1 -0
  604. package/lib/typescript/index.d.ts +2 -0
  605. package/lib/typescript/index.d.ts.map +1 -1
  606. package/lib/typescript/models/interfaces.d.ts +1 -0
  607. package/lib/typescript/models/interfaces.d.ts.map +1 -1
  608. package/lib/typescript/types/bip39.d.ts +28 -0
  609. package/lib/typescript/types/color.d.ts +18 -0
  610. package/lib/typescript/types/elliptic.d.ts +60 -0
  611. package/lib/typescript/types/expo-crypto.d.ts +28 -0
  612. package/lib/typescript/types/expo-random.d.ts +8 -0
  613. package/lib/typescript/types/expo-secure-store.d.ts +20 -0
  614. package/lib/typescript/types/expo-vector-icons.d.ts +9 -0
  615. package/lib/typescript/ui/components/ActivityIndicator.d.ts +45 -0
  616. package/lib/typescript/ui/components/ActivityIndicator.d.ts.map +1 -0
  617. package/lib/typescript/ui/components/AutoHeightScrollView.d.ts +23 -0
  618. package/lib/typescript/ui/components/AutoHeightScrollView.d.ts.map +1 -0
  619. package/lib/typescript/ui/components/BottomSheet.d.ts +29 -0
  620. package/lib/typescript/ui/components/BottomSheet.d.ts.map +1 -0
  621. package/lib/typescript/ui/components/BottomSheetRouter.d.ts +14 -0
  622. package/lib/typescript/ui/components/BottomSheetRouter.d.ts.map +1 -0
  623. package/lib/typescript/ui/components/CrossFadeIcon.d.ts +27 -0
  624. package/lib/typescript/ui/components/CrossFadeIcon.d.ts.map +1 -0
  625. package/lib/typescript/ui/components/EmptyState.d.ts +8 -0
  626. package/lib/typescript/ui/components/EmptyState.d.ts.map +1 -0
  627. package/lib/typescript/ui/components/GroupedItem.d.ts +5 -9
  628. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
  629. package/lib/typescript/ui/components/GroupedSection.d.ts +6 -7
  630. package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -1
  631. package/lib/typescript/ui/components/Header.d.ts +6 -1
  632. package/lib/typescript/ui/components/Header.d.ts.map +1 -1
  633. package/lib/typescript/ui/components/HelperText.d.ts +47 -0
  634. package/lib/typescript/ui/components/HelperText.d.ts.map +1 -0
  635. package/lib/typescript/ui/components/Icon.d.ts +60 -0
  636. package/lib/typescript/ui/components/Icon.d.ts.map +1 -0
  637. package/lib/typescript/ui/components/IconButton/IconButton.d.ts +99 -0
  638. package/lib/typescript/ui/components/IconButton/IconButton.d.ts.map +1 -0
  639. package/lib/typescript/ui/components/IconButton/utils.d.ts +19 -0
  640. package/lib/typescript/ui/components/IconButton/utils.d.ts.map +1 -0
  641. package/lib/typescript/ui/components/LoadingState.d.ts +9 -0
  642. package/lib/typescript/ui/components/LoadingState.d.ts.map +1 -0
  643. package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -1
  644. package/lib/typescript/ui/components/OxyProvider.d.ts +4 -5
  645. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  646. package/lib/typescript/ui/components/OxySignInButton.d.ts +3 -8
  647. package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -1
  648. package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -1
  649. package/lib/typescript/ui/components/QuickActions.d.ts.map +1 -1
  650. package/lib/typescript/ui/components/Section.d.ts +1 -1
  651. package/lib/typescript/ui/components/Section.d.ts.map +1 -1
  652. package/lib/typescript/ui/components/SectionTitle.d.ts +1 -1
  653. package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -1
  654. package/lib/typescript/ui/components/SettingRow.d.ts +14 -0
  655. package/lib/typescript/ui/components/SettingRow.d.ts.map +1 -0
  656. package/lib/typescript/ui/components/StepBasedScreen.d.ts +3 -2
  657. package/lib/typescript/ui/components/StepBasedScreen.d.ts.map +1 -1
  658. package/lib/typescript/ui/components/Surface.d.ts +76 -0
  659. package/lib/typescript/ui/components/Surface.d.ts.map +1 -0
  660. package/lib/typescript/ui/components/TextField/Addons/Outline.d.ts +16 -0
  661. package/lib/typescript/ui/components/TextField/Addons/Outline.d.ts.map +1 -0
  662. package/lib/typescript/ui/components/TextField/Addons/Underline.d.ts +19 -0
  663. package/lib/typescript/ui/components/TextField/Addons/Underline.d.ts.map +1 -0
  664. package/lib/typescript/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +45 -0
  665. package/lib/typescript/ui/components/TextField/Adornment/TextFieldAdornment.d.ts.map +1 -0
  666. package/lib/typescript/ui/components/TextField/Adornment/TextFieldAffix.d.ts +73 -0
  667. package/lib/typescript/ui/components/TextField/Adornment/TextFieldAffix.d.ts.map +1 -0
  668. package/lib/typescript/ui/components/TextField/Adornment/TextFieldIcon.d.ts +78 -0
  669. package/lib/typescript/ui/components/TextField/Adornment/TextFieldIcon.d.ts.map +1 -0
  670. package/lib/typescript/ui/components/TextField/Adornment/enums.d.ts +13 -0
  671. package/lib/typescript/ui/components/TextField/Adornment/enums.d.ts.map +1 -0
  672. package/lib/typescript/ui/components/TextField/Adornment/types.d.ts +12 -0
  673. package/lib/typescript/ui/components/TextField/Adornment/types.d.ts.map +1 -0
  674. package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts +12 -0
  675. package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts.map +1 -0
  676. package/lib/typescript/ui/components/TextField/Label/InputLabel.d.ts +5 -0
  677. package/lib/typescript/ui/components/TextField/Label/InputLabel.d.ts.map +1 -0
  678. package/lib/typescript/ui/components/TextField/Label/LabelBackground.d.ts +4 -0
  679. package/lib/typescript/ui/components/TextField/Label/LabelBackground.d.ts.map +1 -0
  680. package/lib/typescript/ui/components/TextField/TextFieldFlat.d.ts +4 -0
  681. package/lib/typescript/ui/components/TextField/TextFieldFlat.d.ts.map +1 -0
  682. package/lib/typescript/ui/components/TextField/TextFieldOutlined.d.ts +4 -0
  683. package/lib/typescript/ui/components/TextField/TextFieldOutlined.d.ts.map +1 -0
  684. package/lib/typescript/ui/components/TextField/constants.d.ts +32 -0
  685. package/lib/typescript/ui/components/TextField/constants.d.ts.map +1 -0
  686. package/lib/typescript/ui/components/TextField/helpers.d.ts +97 -0
  687. package/lib/typescript/ui/components/TextField/helpers.d.ts.map +1 -0
  688. package/lib/typescript/ui/components/TextField/types.d.ts +156 -0
  689. package/lib/typescript/ui/components/TextField/types.d.ts.map +1 -0
  690. package/lib/typescript/ui/components/TextField.d.ts +192 -0
  691. package/lib/typescript/ui/components/TextField.d.ts.map +1 -0
  692. package/lib/typescript/ui/components/TouchableRipple/Pressable.d.ts +13 -0
  693. package/lib/typescript/ui/components/TouchableRipple/Pressable.d.ts.map +1 -0
  694. package/lib/typescript/ui/components/TouchableRipple/TouchableRipple.d.ts +62 -0
  695. package/lib/typescript/ui/components/TouchableRipple/TouchableRipple.d.ts.map +1 -0
  696. package/lib/typescript/ui/components/TouchableRipple/TouchableRipple.native.d.ts +25 -0
  697. package/lib/typescript/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -0
  698. package/lib/typescript/ui/components/TouchableRipple/utils.d.ts +11 -0
  699. package/lib/typescript/ui/components/TouchableRipple/utils.d.ts.map +1 -0
  700. package/lib/typescript/ui/components/Typography/AnimatedText.d.ts +35 -0
  701. package/lib/typescript/ui/components/Typography/AnimatedText.d.ts.map +1 -0
  702. package/lib/typescript/ui/components/Typography/types.d.ts +19 -0
  703. package/lib/typescript/ui/components/Typography/types.d.ts.map +1 -0
  704. package/lib/typescript/ui/components/fileManagement/FileDetailsModal.d.ts +15 -0
  705. package/lib/typescript/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -0
  706. package/lib/typescript/ui/components/fileManagement/FileViewer.d.ts +18 -0
  707. package/lib/typescript/ui/components/fileManagement/FileViewer.d.ts.map +1 -0
  708. package/lib/typescript/ui/components/fileManagement/UploadPreview.d.ts +21 -0
  709. package/lib/typescript/ui/components/fileManagement/UploadPreview.d.ts.map +1 -0
  710. package/lib/typescript/ui/components/fileManagement/styles.d.ts +860 -0
  711. package/lib/typescript/ui/components/fileManagement/styles.d.ts.map +1 -0
  712. package/lib/typescript/ui/components/index.d.ts +4 -1
  713. package/lib/typescript/ui/components/index.d.ts.map +1 -1
  714. package/lib/typescript/ui/components/profile/EditBioModal.d.ts +11 -0
  715. package/lib/typescript/ui/components/profile/EditBioModal.d.ts.map +1 -0
  716. package/lib/typescript/ui/components/profile/EditDisplayNameModal.d.ts +12 -0
  717. package/lib/typescript/ui/components/profile/EditDisplayNameModal.d.ts.map +1 -0
  718. package/lib/typescript/ui/components/profile/EditEmailModal.d.ts +11 -0
  719. package/lib/typescript/ui/components/profile/EditEmailModal.d.ts.map +1 -0
  720. package/lib/typescript/ui/components/profile/EditLinksModal.d.ts +18 -0
  721. package/lib/typescript/ui/components/profile/EditLinksModal.d.ts.map +1 -0
  722. package/lib/typescript/ui/components/profile/EditLocationModal.d.ts +20 -0
  723. package/lib/typescript/ui/components/profile/EditLocationModal.d.ts.map +1 -0
  724. package/lib/typescript/ui/components/profile/EditUsernameModal.d.ts +11 -0
  725. package/lib/typescript/ui/components/profile/EditUsernameModal.d.ts.map +1 -0
  726. package/lib/typescript/ui/components/profile/TwoFactorSetupModal.d.ts +11 -0
  727. package/lib/typescript/ui/components/profile/TwoFactorSetupModal.d.ts.map +1 -0
  728. package/lib/typescript/ui/components/styles/overlay.d.ts +4 -0
  729. package/lib/typescript/ui/components/styles/overlay.d.ts.map +1 -0
  730. package/lib/typescript/ui/components/styles/shadow.d.ts +3 -0
  731. package/lib/typescript/ui/components/styles/shadow.d.ts.map +1 -0
  732. package/lib/typescript/ui/components/theming.d.ts +8 -0
  733. package/lib/typescript/ui/components/theming.d.ts.map +1 -0
  734. package/lib/typescript/ui/components/types.d.ts +80 -0
  735. package/lib/typescript/ui/components/types.d.ts.map +1 -0
  736. package/lib/typescript/ui/components/utils/forwardRef.d.ts +12 -0
  737. package/lib/typescript/ui/components/utils/forwardRef.d.ts.map +1 -0
  738. package/lib/typescript/ui/components/utils/hasTouchHandler.d.ts +6 -0
  739. package/lib/typescript/ui/components/utils/hasTouchHandler.d.ts.map +1 -0
  740. package/lib/typescript/ui/components/utils/roundLayoutSize.d.ts +2 -0
  741. package/lib/typescript/ui/components/utils/roundLayoutSize.d.ts.map +1 -0
  742. package/lib/typescript/ui/components/utils/splitStyles.d.ts +20 -0
  743. package/lib/typescript/ui/components/utils/splitStyles.d.ts.map +1 -0
  744. package/lib/typescript/ui/constants/iconColors.d.ts +130 -0
  745. package/lib/typescript/ui/constants/iconColors.d.ts.map +1 -0
  746. package/lib/typescript/ui/constants/spacing.d.ts +33 -0
  747. package/lib/typescript/ui/constants/spacing.d.ts.map +1 -0
  748. package/lib/typescript/ui/constants/theme.d.ts +97 -0
  749. package/lib/typescript/ui/constants/theme.d.ts.map +1 -0
  750. package/lib/typescript/ui/context/OxyContext.d.ts +23 -17
  751. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  752. package/lib/typescript/ui/context/ThemeContext.d.ts +19 -0
  753. package/lib/typescript/ui/context/ThemeContext.d.ts.map +1 -0
  754. package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +51 -0
  755. package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts.map +1 -0
  756. package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts +27 -0
  757. package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts.map +1 -0
  758. package/lib/typescript/ui/context/hooks/useLanguageManagement.d.ts +25 -0
  759. package/lib/typescript/ui/context/hooks/useLanguageManagement.d.ts.map +1 -0
  760. package/lib/typescript/ui/context/hooks/useSessionManagement.d.ts +39 -0
  761. package/lib/typescript/ui/context/hooks/useSessionManagement.d.ts.map +1 -0
  762. package/lib/typescript/ui/context/hooks/useStorage.d.ts +22 -0
  763. package/lib/typescript/ui/context/hooks/useStorage.d.ts.map +1 -0
  764. package/lib/typescript/ui/context/utils/errorHandlers.d.ts +30 -0
  765. package/lib/typescript/ui/context/utils/errorHandlers.d.ts.map +1 -0
  766. package/lib/typescript/ui/context/utils/sessionHelpers.d.ts +59 -0
  767. package/lib/typescript/ui/context/utils/sessionHelpers.d.ts.map +1 -0
  768. package/lib/typescript/ui/context/utils/storageHelpers.d.ts +31 -0
  769. package/lib/typescript/ui/context/utils/storageHelpers.d.ts.map +1 -0
  770. package/lib/typescript/ui/hooks/index.d.ts +2 -0
  771. package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
  772. package/lib/typescript/ui/hooks/use-color-scheme.d.ts +8 -0
  773. package/lib/typescript/ui/hooks/use-color-scheme.d.ts.map +1 -0
  774. package/lib/typescript/ui/hooks/use-haptic-press.d.ts +8 -0
  775. package/lib/typescript/ui/hooks/use-haptic-press.d.ts.map +1 -0
  776. package/lib/typescript/ui/hooks/useDeviceManagement.d.ts +27 -0
  777. package/lib/typescript/ui/hooks/useDeviceManagement.d.ts.map +1 -0
  778. package/lib/typescript/ui/hooks/useLanguageManagement.d.ts +25 -0
  779. package/lib/typescript/ui/hooks/useLanguageManagement.d.ts.map +1 -0
  780. package/lib/typescript/ui/hooks/useProfileEditing.d.ts +36 -0
  781. package/lib/typescript/ui/hooks/useProfileEditing.d.ts.map +1 -0
  782. package/lib/typescript/ui/hooks/useSessionManagement.d.ts +39 -0
  783. package/lib/typescript/ui/hooks/useSessionManagement.d.ts.map +1 -0
  784. package/lib/typescript/ui/hooks/useStorage.d.ts +22 -0
  785. package/lib/typescript/ui/hooks/useStorage.d.ts.map +1 -0
  786. package/lib/typescript/ui/hooks/useThemeColors.d.ts +94 -0
  787. package/lib/typescript/ui/hooks/useThemeColors.d.ts.map +1 -0
  788. package/lib/typescript/ui/hooks/useThemeStyles.d.ts +45 -0
  789. package/lib/typescript/ui/hooks/useThemeStyles.d.ts.map +1 -0
  790. package/lib/typescript/ui/index.d.ts +2 -2
  791. package/lib/typescript/ui/index.d.ts.map +1 -1
  792. package/lib/typescript/ui/navigation/bottomSheetManager.d.ts +74 -0
  793. package/lib/typescript/ui/navigation/bottomSheetManager.d.ts.map +1 -0
  794. package/lib/typescript/ui/navigation/routes.d.ts +4 -7
  795. package/lib/typescript/ui/navigation/routes.d.ts.map +1 -1
  796. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts +1 -1
  797. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  798. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts +1 -1
  799. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  800. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +1 -1
  801. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  802. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts +1 -1
  803. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  804. package/lib/typescript/ui/screens/AccountVerificationScreen.d.ts +1 -1
  805. package/lib/typescript/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  806. package/lib/typescript/ui/screens/AppInfoScreen.d.ts +1 -1
  807. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
  808. package/lib/typescript/ui/screens/FeedbackScreen.d.ts +1 -1
  809. package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
  810. package/lib/typescript/ui/screens/FileManagementScreen.d.ts +1 -36
  811. package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
  812. package/lib/typescript/ui/screens/HelpSupportScreen.d.ts +1 -1
  813. package/lib/typescript/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  814. package/lib/typescript/ui/screens/HistoryViewScreen.d.ts +1 -1
  815. package/lib/typescript/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  816. package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts +1 -1
  817. package/lib/typescript/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  818. package/lib/typescript/ui/screens/LegalDocumentsScreen.d.ts +1 -1
  819. package/lib/typescript/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  820. package/lib/typescript/ui/screens/OxyAuthScreen.d.ts +16 -0
  821. package/lib/typescript/ui/screens/OxyAuthScreen.d.ts.map +1 -0
  822. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +1 -1
  823. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  824. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +1 -1
  825. package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  826. package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts +1 -1
  827. package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  828. package/lib/typescript/ui/screens/ProfileScreen.d.ts +1 -1
  829. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
  830. package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts +1 -1
  831. package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  832. package/lib/typescript/ui/screens/SearchSettingsScreen.d.ts +1 -1
  833. package/lib/typescript/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  834. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts +1 -1
  835. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  836. package/lib/typescript/ui/screens/UserLinksScreen.d.ts +2 -2
  837. package/lib/typescript/ui/screens/UserLinksScreen.d.ts.map +1 -1
  838. package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts +1 -1
  839. package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  840. package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts +1 -1
  841. package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
  842. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts +1 -1
  843. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
  844. package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts +1 -1
  845. package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts +1 -1
  846. package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
  847. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts +1 -1
  848. package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
  849. package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts +1 -1
  850. package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
  851. package/lib/typescript/ui/stores/authStore.d.ts +1 -2
  852. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
  853. package/lib/typescript/ui/styles/authStyles.d.ts +0 -10
  854. package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -1
  855. package/lib/typescript/ui/styles/spacing.d.ts +7 -1
  856. package/lib/typescript/ui/styles/spacing.d.ts.map +1 -1
  857. package/lib/typescript/ui/types/fileManagement.d.ts +41 -0
  858. package/lib/typescript/ui/types/fileManagement.d.ts.map +1 -0
  859. package/lib/typescript/ui/types/navigation.d.ts +36 -0
  860. package/lib/typescript/ui/types/navigation.d.ts.map +1 -0
  861. package/lib/typescript/ui/utils/colorUtils.d.ts +14 -0
  862. package/lib/typescript/ui/utils/colorUtils.d.ts.map +1 -0
  863. package/lib/typescript/ui/utils/errorHandlers.d.ts +30 -0
  864. package/lib/typescript/ui/utils/errorHandlers.d.ts.map +1 -0
  865. package/lib/typescript/ui/utils/fileManagement.d.ts +39 -0
  866. package/lib/typescript/ui/utils/fileManagement.d.ts.map +1 -0
  867. package/lib/typescript/ui/utils/sessionHelpers.d.ts +59 -0
  868. package/lib/typescript/ui/utils/sessionHelpers.d.ts.map +1 -0
  869. package/lib/typescript/ui/utils/storageHelpers.d.ts +31 -0
  870. package/lib/typescript/ui/utils/storageHelpers.d.ts.map +1 -0
  871. package/lib/typescript/ui/utils/themeUtils.d.ts +24 -0
  872. package/lib/typescript/ui/utils/themeUtils.d.ts.map +1 -0
  873. package/lib/typescript/ui/utils/user-utils.d.ts +29 -0
  874. package/lib/typescript/ui/utils/user-utils.d.ts.map +1 -0
  875. package/lib/typescript/utils/errorUtils.d.ts.map +1 -1
  876. package/package.json +26 -15
  877. package/src/assets/lottie/welcomeheader_background_op1.json +1 -0
  878. package/src/core/HttpService.ts +97 -4
  879. package/src/core/OxyServices.base.ts +3 -1
  880. package/src/core/mixins/OxyServices.assets.ts +225 -27
  881. package/src/core/mixins/OxyServices.auth.ts +144 -80
  882. package/src/crypto/index.ts +20 -0
  883. package/src/crypto/keyManager.ts +213 -0
  884. package/src/crypto/recoveryPhrase.ts +146 -0
  885. package/src/crypto/signatureService.ts +258 -0
  886. package/src/i18n/locales/en-US.json +4 -0
  887. package/src/index.ts +13 -0
  888. package/src/models/interfaces.ts +1 -0
  889. package/src/types/bip39.d.ts +28 -0
  890. package/src/types/color.d.ts +18 -0
  891. package/src/types/elliptic.d.ts +60 -0
  892. package/src/types/expo-crypto.d.ts +28 -0
  893. package/src/types/expo-random.d.ts +8 -0
  894. package/src/types/expo-secure-store.d.ts +20 -0
  895. package/src/types/expo-vector-icons.d.ts +9 -0
  896. package/src/ui/components/ActivityIndicator.tsx +254 -0
  897. package/src/ui/components/AutoHeightScrollView.tsx +50 -0
  898. package/src/ui/components/BottomSheet.tsx +443 -0
  899. package/src/ui/components/BottomSheetRouter.tsx +407 -0
  900. package/src/ui/components/CrossFadeIcon.tsx +140 -0
  901. package/src/ui/components/EmptyState.tsx +39 -0
  902. package/src/ui/components/GroupedItem.tsx +98 -96
  903. package/src/ui/components/GroupedSection.tsx +24 -29
  904. package/src/ui/components/Header.tsx +129 -49
  905. package/src/ui/components/HelperText.tsx +160 -0
  906. package/src/ui/components/Icon.tsx +181 -0
  907. package/src/ui/components/IconButton/IconButton.tsx +235 -0
  908. package/src/ui/components/IconButton/utils.ts +190 -0
  909. package/src/ui/components/LoadingState.tsx +46 -0
  910. package/src/ui/components/OxyPayButton.tsx +1 -12
  911. package/src/ui/components/OxyProvider.tsx +49 -409
  912. package/src/ui/components/OxySignInButton.tsx +11 -18
  913. package/src/ui/components/ProfileCard.tsx +7 -4
  914. package/src/ui/components/QuickActions.tsx +7 -4
  915. package/src/ui/components/Section.tsx +6 -2
  916. package/src/ui/components/SectionTitle.tsx +7 -4
  917. package/src/ui/components/SettingRow.tsx +76 -0
  918. package/src/ui/components/StepBasedScreen.tsx +205 -187
  919. package/src/ui/components/Surface.tsx +384 -0
  920. package/src/ui/components/TextField/Addons/Outline.tsx +64 -0
  921. package/src/ui/components/TextField/Addons/Underline.tsx +78 -0
  922. package/src/ui/components/TextField/Adornment/TextFieldAdornment.tsx +208 -0
  923. package/src/ui/components/TextField/Adornment/TextFieldAffix.tsx +212 -0
  924. package/src/ui/components/TextField/Adornment/TextFieldIcon.tsx +195 -0
  925. package/src/ui/components/TextField/Adornment/enums.tsx +12 -0
  926. package/src/ui/components/TextField/Adornment/types.tsx +11 -0
  927. package/src/ui/components/TextField/Adornment/utils.ts +66 -0
  928. package/src/ui/components/TextField/Label/InputLabel.tsx +219 -0
  929. package/src/ui/components/TextField/Label/LabelBackground.tsx +100 -0
  930. package/src/ui/components/TextField/TextFieldFlat.tsx +488 -0
  931. package/src/ui/components/TextField/TextFieldOutlined.tsx +464 -0
  932. package/src/ui/components/TextField/constants.tsx +48 -0
  933. package/src/ui/components/TextField/helpers.tsx +612 -0
  934. package/src/ui/components/TextField/types.tsx +156 -0
  935. package/src/ui/components/TextField.tsx +578 -0
  936. package/src/ui/components/TouchableRipple/Pressable.tsx +41 -0
  937. package/src/ui/components/TouchableRipple/TouchableRipple.native.tsx +146 -0
  938. package/src/ui/components/TouchableRipple/TouchableRipple.tsx +347 -0
  939. package/src/ui/components/TouchableRipple/utils.ts +66 -0
  940. package/src/ui/components/Typography/AnimatedText.tsx +107 -0
  941. package/src/ui/components/Typography/types.tsx +22 -0
  942. package/src/ui/components/fileManagement/FileDetailsModal.tsx +137 -0
  943. package/src/ui/components/fileManagement/FileViewer.tsx +380 -0
  944. package/src/ui/components/fileManagement/UploadPreview.tsx +175 -0
  945. package/src/ui/components/fileManagement/styles.ts +860 -0
  946. package/src/ui/components/index.ts +4 -1
  947. package/src/ui/components/profile/EditBioModal.tsx +184 -0
  948. package/src/ui/components/profile/EditDisplayNameModal.tsx +205 -0
  949. package/src/ui/components/profile/EditEmailModal.tsx +188 -0
  950. package/src/ui/components/profile/EditLinksModal.tsx +316 -0
  951. package/src/ui/components/profile/EditLocationModal.tsx +278 -0
  952. package/src/ui/components/profile/EditUsernameModal.tsx +183 -0
  953. package/src/ui/components/profile/TwoFactorSetupModal.tsx +442 -0
  954. package/src/ui/components/styles/overlay.tsx +88 -0
  955. package/src/ui/components/styles/shadow.tsx +136 -0
  956. package/src/ui/components/theming.tsx +114 -0
  957. package/src/ui/components/types.tsx +90 -0
  958. package/src/ui/components/utils/forwardRef.tsx +23 -0
  959. package/src/ui/components/utils/hasTouchHandler.tsx +23 -0
  960. package/src/ui/components/utils/roundLayoutSize.ts +2 -0
  961. package/src/ui/components/utils/splitStyles.ts +60 -0
  962. package/src/ui/constants/iconColors.ts +88 -0
  963. package/src/ui/constants/spacing.ts +45 -0
  964. package/src/ui/constants/theme.ts +120 -0
  965. package/src/ui/context/OxyContext.tsx +276 -894
  966. package/src/ui/context/ThemeContext.tsx +41 -0
  967. package/src/ui/context/hooks/useAuthOperations.ts +400 -0
  968. package/src/ui/context/hooks/useDeviceManagement.ts +108 -0
  969. package/src/ui/context/hooks/useLanguageManagement.ts +152 -0
  970. package/src/ui/context/hooks/useSessionManagement.ts +378 -0
  971. package/src/ui/context/hooks/useStorage.ts +104 -0
  972. package/src/ui/context/utils/errorHandlers.ts +136 -0
  973. package/src/ui/context/utils/sessionHelpers.ts +146 -0
  974. package/src/ui/context/utils/storageHelpers.ts +134 -0
  975. package/src/ui/hooks/index.ts +3 -1
  976. package/src/ui/hooks/use-color-scheme.ts +24 -0
  977. package/src/ui/hooks/use-haptic-press.ts +15 -0
  978. package/src/ui/hooks/useAssets.ts +1 -1
  979. package/src/ui/hooks/useDeviceManagement.ts +108 -0
  980. package/src/ui/hooks/useLanguageManagement.ts +152 -0
  981. package/src/ui/hooks/useProfileEditing.ts +151 -0
  982. package/src/ui/hooks/useSessionManagement.ts +378 -0
  983. package/src/ui/hooks/useStorage.ts +104 -0
  984. package/src/ui/hooks/useThemeColors.ts +26 -0
  985. package/src/ui/hooks/useThemeStyles.ts +85 -0
  986. package/src/ui/index.ts +1 -4
  987. package/src/ui/navigation/bottomSheetManager.ts +191 -0
  988. package/src/ui/navigation/routes.ts +107 -189
  989. package/src/ui/screens/AccountCenterScreen.tsx +67 -63
  990. package/src/ui/screens/AccountOverviewScreen.tsx +237 -95
  991. package/src/ui/screens/AccountSettingsScreen.tsx +546 -474
  992. package/src/ui/screens/AccountSwitcherScreen.tsx +113 -116
  993. package/src/ui/screens/AccountVerificationScreen.tsx +18 -20
  994. package/src/ui/screens/AppInfoScreen.tsx +37 -38
  995. package/src/ui/screens/FeedbackScreen.tsx +15 -12
  996. package/src/ui/screens/FileManagementScreen.tsx +764 -2026
  997. package/src/ui/screens/HelpSupportScreen.tsx +30 -23
  998. package/src/ui/screens/HistoryViewScreen.tsx +25 -56
  999. package/src/ui/screens/LanguageSelectorScreen.tsx +84 -170
  1000. package/src/ui/screens/LegalDocumentsScreen.tsx +18 -41
  1001. package/src/ui/screens/OxyAuthScreen.tsx +402 -0
  1002. package/src/ui/screens/PaymentGatewayScreen.tsx +20 -22
  1003. package/src/ui/screens/PremiumSubscriptionScreen.tsx +13 -10
  1004. package/src/ui/screens/PrivacySettingsScreen.tsx +150 -198
  1005. package/src/ui/screens/ProfileScreen.tsx +7 -6
  1006. package/src/ui/screens/SavesCollectionsScreen.tsx +39 -62
  1007. package/src/ui/screens/SearchSettingsScreen.tsx +36 -86
  1008. package/src/ui/screens/SessionManagementScreen.tsx +25 -17
  1009. package/src/ui/screens/UserLinksScreen.tsx +10 -11
  1010. package/src/ui/screens/WelcomeNewUserScreen.tsx +41 -41
  1011. package/src/ui/screens/karma/KarmaAboutScreen.tsx +13 -9
  1012. package/src/ui/screens/karma/KarmaCenterScreen.tsx +70 -70
  1013. package/src/ui/screens/karma/KarmaFAQScreen.tsx +96 -96
  1014. package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +15 -10
  1015. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +605 -60
  1016. package/src/ui/screens/karma/KarmaRulesScreen.tsx +14 -9
  1017. package/src/ui/stores/authStore.ts +1 -1
  1018. package/src/ui/styles/authStyles.ts +5 -11
  1019. package/src/ui/styles/spacing.ts +21 -2
  1020. package/src/ui/styles/theme.ts +1 -1
  1021. package/src/ui/types/fileManagement.ts +51 -0
  1022. package/src/ui/types/navigation.ts +61 -0
  1023. package/src/ui/utils/colorUtils.ts +46 -0
  1024. package/src/ui/utils/errorHandlers.ts +136 -0
  1025. package/src/ui/utils/fileManagement.ts +190 -0
  1026. package/src/ui/utils/sessionHelpers.ts +146 -0
  1027. package/src/ui/utils/storageHelpers.ts +134 -0
  1028. package/src/ui/utils/themeUtils.ts +43 -0
  1029. package/src/ui/utils/user-utils.ts +58 -0
  1030. package/src/utils/errorUtils.ts +14 -4
  1031. package/lib/commonjs/ui/components/internal/TextField.js +0 -665
  1032. package/lib/commonjs/ui/components/internal/TextField.js.map +0 -1
  1033. package/lib/commonjs/ui/navigation/OxyRouter.js +0 -213
  1034. package/lib/commonjs/ui/navigation/OxyRouter.js.map +0 -1
  1035. package/lib/commonjs/ui/navigation/types.js +0 -13
  1036. package/lib/commonjs/ui/navigation/types.js.map +0 -1
  1037. package/lib/commonjs/ui/screens/AccountManagementDemo.js +0 -298
  1038. package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +0 -1
  1039. package/lib/commonjs/ui/screens/RecoverAccountScreen.js +0 -137
  1040. package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +0 -1
  1041. package/lib/commonjs/ui/screens/SignInScreen.js +0 -270
  1042. package/lib/commonjs/ui/screens/SignInScreen.js.map +0 -1
  1043. package/lib/commonjs/ui/screens/SignUpScreen.js +0 -229
  1044. package/lib/commonjs/ui/screens/SignUpScreen.js.map +0 -1
  1045. package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js +0 -135
  1046. package/lib/commonjs/ui/screens/steps/RecoverRequestStep.js.map +0 -1
  1047. package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js +0 -165
  1048. package/lib/commonjs/ui/screens/steps/RecoverResetPasswordStep.js.map +0 -1
  1049. package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js +0 -159
  1050. package/lib/commonjs/ui/screens/steps/RecoverSuccessStep.js.map +0 -1
  1051. package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js +0 -144
  1052. package/lib/commonjs/ui/screens/steps/RecoverVerifyStep.js.map +0 -1
  1053. package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js +0 -358
  1054. package/lib/commonjs/ui/screens/steps/SignInPasswordStep.js.map +0 -1
  1055. package/lib/commonjs/ui/screens/steps/SignInTotpStep.js +0 -188
  1056. package/lib/commonjs/ui/screens/steps/SignInTotpStep.js.map +0 -1
  1057. package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js +0 -509
  1058. package/lib/commonjs/ui/screens/steps/SignInUsernameStep.js.map +0 -1
  1059. package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js +0 -200
  1060. package/lib/commonjs/ui/screens/steps/SignUpIdentityStep.js.map +0 -1
  1061. package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js +0 -185
  1062. package/lib/commonjs/ui/screens/steps/SignUpSecurityStep.js.map +0 -1
  1063. package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js +0 -138
  1064. package/lib/commonjs/ui/screens/steps/SignUpSummaryStep.js.map +0 -1
  1065. package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js +0 -150
  1066. package/lib/commonjs/ui/screens/steps/SignUpWelcomeStep.js.map +0 -1
  1067. package/lib/module/package.json +0 -1
  1068. package/lib/module/ui/components/internal/TextField.js +0 -660
  1069. package/lib/module/ui/components/internal/TextField.js.map +0 -1
  1070. package/lib/module/ui/navigation/OxyRouter.js +0 -209
  1071. package/lib/module/ui/navigation/OxyRouter.js.map +0 -1
  1072. package/lib/module/ui/navigation/types.js +0 -22
  1073. package/lib/module/ui/navigation/types.js.map +0 -1
  1074. package/lib/module/ui/screens/AccountManagementDemo.js +0 -295
  1075. package/lib/module/ui/screens/AccountManagementDemo.js.map +0 -1
  1076. package/lib/module/ui/screens/RecoverAccountScreen.js +0 -133
  1077. package/lib/module/ui/screens/RecoverAccountScreen.js.map +0 -1
  1078. package/lib/module/ui/screens/SignInScreen.js +0 -265
  1079. package/lib/module/ui/screens/SignInScreen.js.map +0 -1
  1080. package/lib/module/ui/screens/SignUpScreen.js +0 -224
  1081. package/lib/module/ui/screens/SignUpScreen.js.map +0 -1
  1082. package/lib/module/ui/screens/steps/RecoverRequestStep.js +0 -130
  1083. package/lib/module/ui/screens/steps/RecoverRequestStep.js.map +0 -1
  1084. package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js +0 -160
  1085. package/lib/module/ui/screens/steps/RecoverResetPasswordStep.js.map +0 -1
  1086. package/lib/module/ui/screens/steps/RecoverSuccessStep.js +0 -154
  1087. package/lib/module/ui/screens/steps/RecoverSuccessStep.js.map +0 -1
  1088. package/lib/module/ui/screens/steps/RecoverVerifyStep.js +0 -139
  1089. package/lib/module/ui/screens/steps/RecoverVerifyStep.js.map +0 -1
  1090. package/lib/module/ui/screens/steps/SignInPasswordStep.js +0 -353
  1091. package/lib/module/ui/screens/steps/SignInPasswordStep.js.map +0 -1
  1092. package/lib/module/ui/screens/steps/SignInTotpStep.js +0 -183
  1093. package/lib/module/ui/screens/steps/SignInTotpStep.js.map +0 -1
  1094. package/lib/module/ui/screens/steps/SignInUsernameStep.js +0 -504
  1095. package/lib/module/ui/screens/steps/SignInUsernameStep.js.map +0 -1
  1096. package/lib/module/ui/screens/steps/SignUpIdentityStep.js +0 -195
  1097. package/lib/module/ui/screens/steps/SignUpIdentityStep.js.map +0 -1
  1098. package/lib/module/ui/screens/steps/SignUpSecurityStep.js +0 -180
  1099. package/lib/module/ui/screens/steps/SignUpSecurityStep.js.map +0 -1
  1100. package/lib/module/ui/screens/steps/SignUpSummaryStep.js +0 -133
  1101. package/lib/module/ui/screens/steps/SignUpSummaryStep.js.map +0 -1
  1102. package/lib/module/ui/screens/steps/SignUpWelcomeStep.js +0 -145
  1103. package/lib/module/ui/screens/steps/SignUpWelcomeStep.js.map +0 -1
  1104. package/lib/typescript/ui/components/internal/TextField.d.ts +0 -41
  1105. package/lib/typescript/ui/components/internal/TextField.d.ts.map +0 -1
  1106. package/lib/typescript/ui/navigation/OxyRouter.d.ts +0 -7
  1107. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +0 -1
  1108. package/lib/typescript/ui/navigation/types.d.ts +0 -141
  1109. package/lib/typescript/ui/navigation/types.d.ts.map +0 -1
  1110. package/lib/typescript/ui/screens/AccountManagementDemo.d.ts +0 -8
  1111. package/lib/typescript/ui/screens/AccountManagementDemo.d.ts.map +0 -1
  1112. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +0 -5
  1113. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +0 -1
  1114. package/lib/typescript/ui/screens/SignInScreen.d.ts +0 -5
  1115. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +0 -1
  1116. package/lib/typescript/ui/screens/SignUpScreen.d.ts +0 -5
  1117. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +0 -1
  1118. package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts +0 -24
  1119. package/lib/typescript/ui/screens/steps/RecoverRequestStep.d.ts.map +0 -1
  1120. package/lib/typescript/ui/screens/steps/RecoverResetPasswordStep.d.ts +0 -24
  1121. package/lib/typescript/ui/screens/steps/RecoverResetPasswordStep.d.ts.map +0 -1
  1122. package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts +0 -19
  1123. package/lib/typescript/ui/screens/steps/RecoverSuccessStep.d.ts.map +0 -1
  1124. package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts +0 -26
  1125. package/lib/typescript/ui/screens/steps/RecoverVerifyStep.d.ts.map +0 -1
  1126. package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts +0 -30
  1127. package/lib/typescript/ui/screens/steps/SignInPasswordStep.d.ts.map +0 -1
  1128. package/lib/typescript/ui/screens/steps/SignInTotpStep.d.ts +0 -19
  1129. package/lib/typescript/ui/screens/steps/SignInTotpStep.d.ts.map +0 -1
  1130. package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts +0 -28
  1131. package/lib/typescript/ui/screens/steps/SignInUsernameStep.d.ts.map +0 -1
  1132. package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts +0 -26
  1133. package/lib/typescript/ui/screens/steps/SignUpIdentityStep.d.ts.map +0 -1
  1134. package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts +0 -27
  1135. package/lib/typescript/ui/screens/steps/SignUpSecurityStep.d.ts.map +0 -1
  1136. package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts +0 -17
  1137. package/lib/typescript/ui/screens/steps/SignUpSummaryStep.d.ts.map +0 -1
  1138. package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts +0 -14
  1139. package/lib/typescript/ui/screens/steps/SignUpWelcomeStep.d.ts.map +0 -1
  1140. package/src/ui/components/internal/TextField.tsx +0 -808
  1141. package/src/ui/navigation/OxyRouter.tsx +0 -216
  1142. package/src/ui/navigation/types.ts +0 -164
  1143. package/src/ui/screens/AccountManagementDemo.tsx +0 -297
  1144. package/src/ui/screens/RecoverAccountScreen.tsx +0 -141
  1145. package/src/ui/screens/SignInScreen.tsx +0 -297
  1146. package/src/ui/screens/SignUpScreen.tsx +0 -239
  1147. package/src/ui/screens/steps/RecoverRequestStep.tsx +0 -143
  1148. package/src/ui/screens/steps/RecoverResetPasswordStep.tsx +0 -162
  1149. package/src/ui/screens/steps/RecoverSuccessStep.tsx +0 -148
  1150. package/src/ui/screens/steps/RecoverVerifyStep.tsx +0 -154
  1151. package/src/ui/screens/steps/SignInPasswordStep.tsx +0 -343
  1152. package/src/ui/screens/steps/SignInTotpStep.tsx +0 -163
  1153. package/src/ui/screens/steps/SignInUsernameStep.tsx +0 -560
  1154. package/src/ui/screens/steps/SignUpIdentityStep.tsx +0 -217
  1155. package/src/ui/screens/steps/SignUpSecurityStep.tsx +0 -207
  1156. package/src/ui/screens/steps/SignUpSummaryStep.tsx +0 -155
  1157. package/src/ui/screens/steps/SignUpWelcomeStep.tsx +0 -127
@@ -7,21 +7,67 @@ exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _expoImage = require("expo-image");
10
- var _OxyContext = require("../context/OxyContext");
11
- var _fonts = require("../styles/fonts");
12
10
  var _sonner = require("../../lib/sonner");
13
11
  var _vectorIcons = require("@expo/vector-icons");
14
12
  var _fileStore = require("../stores/fileStore");
15
13
  var _Header = _interopRequireDefault(require("../components/Header"));
16
14
  var _JustifiedPhotoGrid = _interopRequireDefault(require("../components/photogrid/JustifiedPhotoGrid"));
17
15
  var _components = require("../components");
16
+ var _useThemeStyles = require("../hooks/useThemeStyles");
17
+ var _useColorScheme = require("../hooks/use-color-scheme");
18
+ var _themeUtils = require("../utils/themeUtils");
19
+ var _OxyContext = require("../context/OxyContext");
20
+ var _fileManagement = require("../utils/fileManagement");
21
+ var _FileViewer = require("../components/fileManagement/FileViewer");
22
+ var _FileDetailsModal = require("../components/fileManagement/FileDetailsModal");
23
+ var _UploadPreview = require("../components/fileManagement/UploadPreview");
24
+ var _styles = require("../components/fileManagement/styles");
18
25
  var _jsxRuntime = require("react/jsx-runtime");
19
26
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
20
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } // Exporting props & callback types so external callers (e.g. showBottomSheet config objects) can annotate
21
- // Add this helper function near the top (after imports):
22
- async function uploadFileRaw(file, userId, oxyServices, visibility) {
23
- return await oxyServices.uploadRawFile(file, visibility);
24
- }
27
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } // @ts-ignore - MaterialCommunityIcons is available at runtime
28
+ // Animated button component for smooth transitions
29
+ const AnimatedButton = ({
30
+ isSelected,
31
+ onPress,
32
+ icon,
33
+ primaryColor,
34
+ textColor,
35
+ style
36
+ }) => {
37
+ const animatedValue = (0, _react.useRef)(new _reactNative.Animated.Value(isSelected ? 1 : 0)).current;
38
+ (0, _react.useEffect)(() => {
39
+ _reactNative.Animated.timing(animatedValue, {
40
+ toValue: isSelected ? 1 : 0,
41
+ duration: 200,
42
+ easing: _reactNative.Easing.out(_reactNative.Easing.ease),
43
+ useNativeDriver: false
44
+ }).start();
45
+ }, [isSelected, animatedValue]);
46
+ const backgroundColor = animatedValue.interpolate({
47
+ inputRange: [0, 1],
48
+ outputRange: ['transparent', primaryColor]
49
+ });
50
+ const iconColor = animatedValue.interpolate({
51
+ inputRange: [0, 1],
52
+ outputRange: [textColor, '#FFFFFF']
53
+ });
54
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
55
+ onPress: onPress,
56
+ activeOpacity: 0.7,
57
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
58
+ style: [style, {
59
+ backgroundColor
60
+ }],
61
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
62
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
63
+ name: icon,
64
+ size: 16,
65
+ color: isSelected ? '#FFFFFF' : textColor
66
+ })
67
+ })
68
+ })
69
+ });
70
+ };
25
71
  const FileManagementScreen = ({
26
72
  onClose,
27
73
  theme,
@@ -42,11 +88,14 @@ const FileManagementScreen = ({
42
88
  defaultVisibility = 'private',
43
89
  linkContext
44
90
  }) => {
91
+ // Use useOxy() hook for OxyContext values
45
92
  const {
46
93
  user,
47
94
  oxyServices
48
95
  } = (0, _OxyContext.useOxy)();
49
96
  const files = (0, _fileStore.useFiles)();
97
+ // Ensure containerWidth is a number (TypeScript guard)
98
+ const safeContainerWidth = typeof containerWidth === 'number' ? containerWidth : 400;
50
99
  const uploading = (0, _fileStore.useUploading)();
51
100
  const uploadProgress = (0, _fileStore.useUploadAggregateProgress)();
52
101
  const deleting = (0, _fileStore.useDeleting)();
@@ -66,6 +115,7 @@ const FileManagementScreen = ({
66
115
  const [fileContent, setFileContent] = (0, _react.useState)(null);
67
116
  const [loadingFileContent, setLoadingFileContent] = (0, _react.useState)(false);
68
117
  const [showFileDetailsInViewer, setShowFileDetailsInViewer] = (0, _react.useState)(false);
118
+ const [isPickingDocument, setIsPickingDocument] = (0, _react.useState)(false);
69
119
  const [viewMode, setViewMode] = (0, _react.useState)('all');
70
120
  const [searchQuery, setSearchQuery] = (0, _react.useState)('');
71
121
  const [sortBy, setSortBy] = (0, _react.useState)('date');
@@ -108,10 +158,8 @@ const FileManagementScreen = ({
108
158
  });
109
159
  return sorted;
110
160
  }, [files, searchQuery, viewMode, sortBy, sortOrder]);
111
- const [isDragging, setIsDragging] = (0, _react.useState)(false);
112
161
  const [photoDimensions, setPhotoDimensions] = (0, _react.useState)({});
113
162
  const [loadingDimensions, setLoadingDimensions] = (0, _react.useState)(false);
114
- const [hoveredPreview, setHoveredPreview] = (0, _react.useState)(null);
115
163
  const uploadStartRef = (0, _react.useRef)(null);
116
164
  const MIN_BANNER_MS = 600;
117
165
  // Selection state
@@ -120,7 +168,7 @@ const FileManagementScreen = ({
120
168
  const scrollViewRef = (0, _react.useRef)(null);
121
169
  const photoScrollViewRef = (0, _react.useRef)(null);
122
170
  const itemRefs = (0, _react.useRef)(new Map()); // Track item positions
123
- const containerRef = (0, _react.useRef)(null); // Ref for drag and drop container
171
+ const containerRef = (0, _react.useRef)(null);
124
172
  (0, _react.useEffect)(() => {
125
173
  if (initialSelectedIds && initialSelectedIds.length) {
126
174
  setSelectedIds(new Set(initialSelectedIds));
@@ -228,52 +276,19 @@ const FileManagementScreen = ({
228
276
  }, []);
229
277
 
230
278
  // Helper to safely request a thumbnail variant only for image mime types.
231
- // Prevents backend warnings: "Variant thumb not supported for mime application/pdf".
232
- const getSafeDownloadUrl = (0, _react.useCallback)((file, variant = 'thumb') => {
233
- const isImage = file.contentType.startsWith('image/');
234
- const isVideo = file.contentType.startsWith('video/');
235
-
236
- // Prefer explicit variant key if variants metadata present
237
- if (file.variants && file.variants.length > 0) {
238
- // For videos, try 'poster' regardless of requested variant
239
- if (isVideo) {
240
- const poster = file.variants.find(v => v.type === 'poster');
241
- if (poster) return oxyServices.getFileDownloadUrl(file.id, 'poster');
242
- }
243
- if (isImage) {
244
- const desired = file.variants.find(v => v.type === variant);
245
- if (desired) return oxyServices.getFileDownloadUrl(file.id, variant);
246
- }
247
- }
248
- if (isImage) {
249
- return oxyServices.getFileDownloadUrl(file.id, variant);
250
- }
251
- if (isVideo) {
252
- // Fallback to poster if backend supports implicit generation
253
- try {
254
- return oxyServices.getFileDownloadUrl(file.id, 'poster');
255
- } catch {
256
- return oxyServices.getFileDownloadUrl(file.id);
257
- }
258
- }
259
- // Other mime types: no variant
260
- return oxyServices.getFileDownloadUrl(file.id);
279
+ const getSafeDownloadUrlCallback = (0, _react.useCallback)((file, variant = 'thumb') => {
280
+ return (0, _fileManagement.getSafeDownloadUrl)(file, variant, (fileId, variant) => oxyServices.getFileDownloadUrl(fileId, variant));
261
281
  }, [oxyServices]);
262
282
 
263
- // Memoize theme-related calculations to prevent unnecessary recalculations
264
- const themeStyles = (0, _react.useMemo)(() => {
265
- const isDarkTheme = theme === 'dark';
266
- return {
267
- isDarkTheme,
268
- textColor: isDarkTheme ? '#FFFFFF' : '#000000',
269
- backgroundColor: isDarkTheme ? '#121212' : '#f2f2f2',
270
- secondaryBackgroundColor: isDarkTheme ? '#222222' : '#FFFFFF',
271
- borderColor: isDarkTheme ? '#444444' : '#E0E0E0',
272
- primaryColor: '#007AFF',
273
- dangerColor: '#FF3B30',
274
- successColor: '#34C759'
275
- };
276
- }, [theme]);
283
+ // Use centralized theme styles hook for consistency
284
+ const colorScheme = (0, _useColorScheme.useColorScheme)();
285
+ const normalizedTheme = (0, _themeUtils.normalizeTheme)(theme);
286
+ const baseThemeStyles = (0, _useThemeStyles.useThemeStyles)(normalizedTheme, colorScheme);
287
+ // FileManagementScreen uses a slightly different light background
288
+ const themeStyles = (0, _react.useMemo)(() => ({
289
+ ...baseThemeStyles,
290
+ backgroundColor: baseThemeStyles.isDarkTheme ? baseThemeStyles.backgroundColor : '#f2f2f2'
291
+ }), [baseThemeStyles]);
277
292
 
278
293
  // Extract commonly used theme variables
279
294
  const backgroundColor = themeStyles.backgroundColor;
@@ -358,7 +373,7 @@ const FileManagementScreen = ({
358
373
 
359
374
  // (removed effect; filteredFiles is memoized)
360
375
 
361
- // Load photo dimensions for justified grid
376
+ // Load photo dimensions for justified grid - unified approach using Image.getSize
362
377
  const loadPhotoDimensions = (0, _react.useCallback)(async photos => {
363
378
  if (photos.length === 0) return;
364
379
  setLoadingDimensions(true);
@@ -376,50 +391,27 @@ const FileManagementScreen = ({
376
391
  try {
377
392
  await Promise.all(photosToLoad.map(async photo => {
378
393
  try {
379
- const downloadUrl = getSafeDownloadUrl(photo, 'thumb');
380
- if (_reactNative.Platform.OS === 'web') {
381
- const img = new window.Image();
382
- await new Promise((resolve, reject) => {
383
- img.onload = () => {
384
- newDimensions[photo.id] = {
385
- width: img.naturalWidth,
386
- height: img.naturalHeight
387
- };
388
- hasNewDimensions = true;
389
- resolve();
394
+ const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
395
+
396
+ // Unified approach using Image.getSize (works on all platforms)
397
+ await new Promise(resolve => {
398
+ _reactNative.Image.getSize(downloadUrl, (width, height) => {
399
+ newDimensions[photo.id] = {
400
+ width,
401
+ height
390
402
  };
391
- img.onerror = () => {
392
- // Fallback dimensions for failed loads
393
- newDimensions[photo.id] = {
394
- width: 1,
395
- height: 1
396
- };
397
- hasNewDimensions = true;
398
- resolve();
403
+ hasNewDimensions = true;
404
+ resolve();
405
+ }, () => {
406
+ // Fallback dimensions
407
+ newDimensions[photo.id] = {
408
+ width: 1,
409
+ height: 1
399
410
  };
400
- img.src = downloadUrl;
411
+ hasNewDimensions = true;
412
+ resolve();
401
413
  });
402
- } else {
403
- // For mobile, use Image.getSize from react-native
404
- await new Promise(resolve => {
405
- _reactNative.Image.getSize(downloadUrl, (width, height) => {
406
- newDimensions[photo.id] = {
407
- width,
408
- height
409
- };
410
- hasNewDimensions = true;
411
- resolve();
412
- }, () => {
413
- // Fallback dimensions
414
- newDimensions[photo.id] = {
415
- width: 1,
416
- height: 1
417
- };
418
- hasNewDimensions = true;
419
- resolve();
420
- });
421
- });
422
- }
414
+ });
423
415
  } catch (error) {
424
416
  // Fallback dimensions for any errors
425
417
  newDimensions[photo.id] = {
@@ -437,7 +429,7 @@ const FileManagementScreen = ({
437
429
  } finally {
438
430
  setLoadingDimensions(false);
439
431
  }
440
- }, [oxyServices, photoDimensions]);
432
+ }, [getSafeDownloadUrlCallback, photoDimensions]);
441
433
 
442
434
  // Create justified rows from photos with responsive algorithm
443
435
  const createJustifiedRows = (0, _react.useCallback)((photos, containerWidth) => {
@@ -452,8 +444,9 @@ const FileManagementScreen = ({
452
444
  return rows;
453
445
  }, []);
454
446
  const processFileUploads = async selectedFiles => {
455
- if (selectedFiles.length === 0) return;
456
- if (!targetUserId) return; // Guard clause to ensure userId is defined
447
+ if (selectedFiles.length === 0) return [];
448
+ if (!targetUserId) return []; // Guard clause to ensure userId is defined
449
+ const uploadedFiles = [];
457
450
  try {
458
451
  storeSetUploadProgress({
459
452
  current: 0,
@@ -462,9 +455,9 @@ const FileManagementScreen = ({
462
455
  const maxSize = 50 * 1024 * 1024; // 50MB
463
456
  const oversizedFiles = selectedFiles.filter(file => file.size > maxSize);
464
457
  if (oversizedFiles.length > 0) {
465
- const fileList = oversizedFiles.map(f => f.name).join('\n');
466
- window.alert(`File Size Limit\n\nThe following files are too large (max 50MB):\n${fileList}`);
467
- return;
458
+ const fileList = oversizedFiles.map(f => f.name).join(', ');
459
+ _sonner.toast.error(`The following files are too large (max 50MB): ${fileList}`);
460
+ return [];
468
461
  }
469
462
  let successCount = 0;
470
463
  let failureCount = 0;
@@ -474,9 +467,22 @@ const FileManagementScreen = ({
474
467
  current: i + 1,
475
468
  total: selectedFiles.length
476
469
  });
470
+ const raw = selectedFiles[i];
471
+ const fileName = raw.name || `file-${i + 1}`;
472
+ const optimisticId = `temp-${Date.now()}-${i}-${Math.random().toString(36).substr(2, 9)}`; // Unique ID per file
473
+
477
474
  try {
478
- const raw = selectedFiles[i];
479
- const optimisticId = `temp-${Date.now()}-${i}`;
475
+ // Validate file before upload
476
+ if (!raw || !raw.name || raw.size === undefined || raw.size <= 0) {
477
+ const errorMsg = `Invalid file: ${fileName}`;
478
+ console.error('Upload validation failed:', {
479
+ file: raw,
480
+ error: errorMsg
481
+ });
482
+ failureCount++;
483
+ errors.push(`${fileName}: Invalid file (missing name or size)`);
484
+ continue;
485
+ }
480
486
  const optimisticFile = {
481
487
  id: optimisticId,
482
488
  filename: raw.name,
@@ -492,7 +498,8 @@ const FileManagementScreen = ({
492
498
  _fileStore.useFileStore.getState().addFile(optimisticFile, {
493
499
  prepend: true
494
500
  });
495
- const result = await uploadFileRaw(raw, targetUserId, oxyServices, defaultVisibility);
501
+ const result = await (0, _fileManagement.uploadFileRaw)(raw, targetUserId, oxyServices, defaultVisibility);
502
+
496
503
  // Attempt to refresh file list incrementally – fetch single file metadata if API allows
497
504
  if (result?.file || result?.files?.[0]) {
498
505
  const f = result.file || result.files[0];
@@ -511,6 +518,8 @@ const FileManagementScreen = ({
511
518
  _fileStore.useFileStore.getState().addFile(merged, {
512
519
  prepend: true
513
520
  });
521
+ uploadedFiles.push(merged);
522
+ successCount++;
514
523
  } else {
515
524
  // Fallback: will reconcile on later list refresh
516
525
  _fileStore.useFileStore.getState().updateFile(optimisticId, {
@@ -518,19 +527,39 @@ const FileManagementScreen = ({
518
527
  uploading: false
519
528
  }
520
529
  });
530
+ console.warn('Upload completed but no file data returned:', {
531
+ fileName,
532
+ result
533
+ });
534
+ // Still count as success if upload didn't throw
535
+ successCount++;
521
536
  }
522
- successCount++;
523
537
  } catch (error) {
524
538
  failureCount++;
525
- errors.push(`${selectedFiles[i].name}: ${error.message || 'Upload failed'}`);
539
+ const errorMessage = error.message || error.toString() || 'Upload failed';
540
+ const fullError = `${fileName}: ${errorMessage}`;
541
+ errors.push(fullError);
542
+ console.error('File upload failed:', {
543
+ fileName,
544
+ fileSize: raw.size,
545
+ fileType: raw.type,
546
+ error: errorMessage,
547
+ stack: error.stack
548
+ });
549
+
550
+ // Remove optimistic file on error (use the same optimisticId from above)
551
+ _fileStore.useFileStore.getState().removeFile(optimisticId);
526
552
  }
527
553
  }
554
+
555
+ // Show success/error messages
528
556
  if (successCount > 0) {
529
557
  _sonner.toast.success(`${successCount} file(s) uploaded successfully`);
530
558
  }
531
559
  if (failureCount > 0) {
532
- const errorMessage = `${failureCount} file(s) failed to upload${errors.length > 0 ? ':\n' + errors.slice(0, 3).join('\n') + (errors.length > 3 ? '\n...' : '') : ''}`;
533
- _sonner.toast.error(errorMessage);
560
+ // Show detailed error message with first few errors
561
+ const errorDetails = errors.length > 0 ? `\n${errors.slice(0, 3).join('\n')}${errors.length > 3 ? `\n...and ${errors.length - 3} more` : ''}` : '';
562
+ _sonner.toast.error(`${failureCount} file(s) failed to upload${errorDetails}`);
534
563
  }
535
564
  // Silent background refresh to ensure metadata/variants updated
536
565
  setTimeout(() => {
@@ -541,31 +570,74 @@ const FileManagementScreen = ({
541
570
  } finally {
542
571
  storeSetUploadProgress(null);
543
572
  }
573
+ return uploadedFiles;
544
574
  };
545
575
  const handleFileSelection = (0, _react.useCallback)(async selectedFiles => {
546
576
  const MAX_FILE_SIZE = 100 * 1024 * 1024; // 100MB
547
577
  const processedFiles = [];
548
578
  for (const file of selectedFiles) {
579
+ // Validate file has required properties
580
+ if (!file) {
581
+ console.error('Invalid file: file is null or undefined');
582
+ _sonner.toast.error('Invalid file: file is missing');
583
+ continue;
584
+ }
585
+ if (!file.name || typeof file.name !== 'string') {
586
+ console.error('Invalid file: missing or invalid name property', file);
587
+ _sonner.toast.error('Invalid file: missing file name');
588
+ continue;
589
+ }
590
+ if (file.size === undefined || file.size === null || isNaN(file.size)) {
591
+ console.error('Invalid file: missing or invalid size property', file);
592
+ _sonner.toast.error(`Invalid file "${file.name || 'unknown'}": missing file size`);
593
+ continue;
594
+ }
595
+ if (file.size <= 0) {
596
+ console.error('Invalid file: file size is zero or negative', file);
597
+ _sonner.toast.error(`File "${file.name}" is empty`);
598
+ continue;
599
+ }
600
+
549
601
  // Validate file size
550
602
  if (file.size > MAX_FILE_SIZE) {
551
- _sonner.toast.error(`"${file.name}" is too large. Maximum file size is ${formatFileSize(MAX_FILE_SIZE)}`);
603
+ _sonner.toast.error(`"${file.name}" is too large. Maximum file size is ${(0, _fileManagement.formatFileSize)(MAX_FILE_SIZE)}`);
552
604
  continue;
553
605
  }
554
606
 
555
- // Generate preview for images
607
+ // Ensure file has a type property
608
+ const fileType = file.type || 'application/octet-stream';
609
+
610
+ // Generate preview for images - unified approach
556
611
  let preview;
557
- if (file.type.startsWith('image/')) {
558
- preview = URL.createObjectURL(file);
612
+ if (fileType.startsWith('image/')) {
613
+ // Try to use file URI from expo-document-picker if available (works on all platforms)
614
+ const fileUri = file.uri;
615
+ if (fileUri && typeof fileUri === 'string' && (fileUri.startsWith('file://') || fileUri.startsWith('content://') || fileUri.startsWith('http://') || fileUri.startsWith('https://') || fileUri.startsWith('blob:'))) {
616
+ preview = fileUri;
617
+ } else {
618
+ // Fallback: create blob URL if possible (works on web)
619
+ try {
620
+ if (file instanceof File || file instanceof Blob) {
621
+ preview = URL.createObjectURL(file);
622
+ }
623
+ } catch (error) {
624
+ console.warn('Failed to create preview URL:', error);
625
+ // Preview is optional, continue without it
626
+ }
627
+ }
559
628
  }
560
629
  processedFiles.push({
561
630
  file,
562
631
  preview,
563
632
  size: file.size,
564
633
  name: file.name,
565
- type: file.type
634
+ type: fileType
566
635
  });
567
636
  }
568
- if (processedFiles.length === 0) return;
637
+ if (processedFiles.length === 0) {
638
+ _sonner.toast.error('No valid files to upload');
639
+ return;
640
+ }
569
641
 
570
642
  // Show preview modal for user to review files before upload
571
643
  setPendingFiles(processedFiles);
@@ -583,7 +655,7 @@ const FileManagementScreen = ({
583
655
  current: 0,
584
656
  total: filesToUpload.length
585
657
  });
586
- await processFileUploads(filesToUpload);
658
+ const uploadedFiles = await processFileUploads(filesToUpload);
587
659
 
588
660
  // Cleanup preview URLs
589
661
  pendingFiles.forEach(pf => {
@@ -592,6 +664,30 @@ const FileManagementScreen = ({
592
664
  }
593
665
  });
594
666
  setPendingFiles([]);
667
+
668
+ // If in selectMode, automatically select the uploaded file(s)
669
+ if (selectMode && uploadedFiles.length > 0) {
670
+ // Wait a bit for the file store to update and ensure file is available
671
+ setTimeout(() => {
672
+ const fileToSelect = uploadedFiles[0];
673
+ if (!multiSelect && fileToSelect) {
674
+ // Single select mode - directly call onSelect callback
675
+ onSelect?.(fileToSelect);
676
+ if (afterSelect === 'back') {
677
+ goBack?.();
678
+ } else if (afterSelect === 'close') {
679
+ onClose?.();
680
+ }
681
+ } else if (multiSelect) {
682
+ // Multi-select mode - add all uploaded files to selection
683
+ uploadedFiles.forEach(file => {
684
+ if (!selectedIds.has(file.id)) {
685
+ setSelectedIds(prev => new Set(prev).add(file.id));
686
+ }
687
+ });
688
+ }
689
+ }, 500);
690
+ }
595
691
  endUpload();
596
692
  } catch (error) {
597
693
  _sonner.toast.error(error.message || 'Failed to upload files');
@@ -619,82 +715,110 @@ const FileManagementScreen = ({
619
715
  setShowUploadPreview(false);
620
716
  }
621
717
  };
718
+
719
+ /**
720
+ * Handle file upload - opens document picker and processes selected files
721
+ * Expo 54 compatible - works on web, iOS, and Android
722
+ */
622
723
  const handleFileUpload = async () => {
724
+ // Prevent concurrent document picker calls
725
+ if (isPickingDocument) {
726
+ _sonner.toast.error('Please wait for the current file selection to complete');
727
+ return;
728
+ }
623
729
  try {
624
- if (_reactNative.Platform.OS === 'web') {
625
- // Enhanced web file picker
626
- const input = document.createElement('input');
627
- input.type = 'file';
628
- input.multiple = true;
629
- input.accept = '*/*';
630
- const cancellationTimer = setTimeout(() => {
631
- const state = _fileStore.useFileStore.getState();
632
- if (state.uploading && uploadStartRef.current && !state.uploadProgress) {
633
- endUpload();
634
- }
635
- }, 1500);
636
- input.onchange = async e => {
637
- clearTimeout(cancellationTimer);
638
- const selectedFiles = Array.from(e.target.files || []);
639
- if (selectedFiles.length === 0) {
640
- endUpload();
641
- return;
642
- }
643
- await handleFileSelection(selectedFiles);
644
- };
645
- input.click();
646
- } else {
647
- // Mobile file picker with expo-document-picker
648
- try {
649
- // Dynamically import to avoid breaking if not installed
650
- const DocumentPicker = await Promise.resolve().then(() => _interopRequireWildcard(require('expo-document-picker'))).catch(() => null);
651
- if (!DocumentPicker) {
652
- _sonner.toast.error('File picker not available. Please install expo-document-picker');
653
- return;
654
- }
655
- const result = await DocumentPicker.getDocumentAsync({
656
- type: '*/*',
657
- multiple: true,
658
- copyToCacheDirectory: true
659
- });
660
- if (result.canceled) {
661
- return;
662
- }
730
+ setIsPickingDocument(true);
663
731
 
664
- // Convert expo document picker results to File-like objects
665
- const files = [];
666
- for (const doc of result.assets) {
667
- if (doc.file) {
668
- // expo-document-picker provides a File-like object
669
- files.push(doc.file);
670
- } else if (doc.uri) {
671
- // Fallback: fetch and create Blob
672
- const response = await fetch(doc.uri);
673
- const blob = await response.blob();
674
- const file = new File([blob], doc.name || 'file', {
675
- type: doc.mimeType || 'application/octet-stream'
676
- });
677
- files.push(file);
678
- }
679
- }
680
- if (files.length > 0) {
681
- await handleFileSelection(files);
682
- }
683
- } catch (error) {
684
- if (error.message?.includes('expo-document-picker')) {
685
- _sonner.toast.error('File picker not available. Please install expo-document-picker');
686
- } else {
687
- _sonner.toast.error(error.message || 'Failed to select files');
732
+ // Dynamically import expo-document-picker (Expo 54 supports it on all platforms)
733
+ const DocumentPicker = await Promise.resolve().then(() => _interopRequireWildcard(require('expo-document-picker'))).catch(() => null);
734
+ if (!DocumentPicker || !DocumentPicker.getDocumentAsync) {
735
+ _sonner.toast.error('File picker not available. Please install expo-document-picker');
736
+ return;
737
+ }
738
+
739
+ // Use getDocumentAsync directly - it will handle platform availability
740
+ const result = await DocumentPicker.getDocumentAsync({
741
+ type: '*/*',
742
+ multiple: true,
743
+ copyToCacheDirectory: true
744
+ });
745
+ if (result.canceled) {
746
+ setIsPickingDocument(false);
747
+ return;
748
+ }
749
+ if (!result.assets || result.assets.length === 0) {
750
+ setIsPickingDocument(false);
751
+ _sonner.toast.error('No files were selected');
752
+ return;
753
+ }
754
+
755
+ // Convert expo document picker results to File-like objects
756
+ // According to Expo 54 docs, expo-document-picker returns assets with:
757
+ // - uri: file URI (file://, content://, or blob URL)
758
+ // - name: file name
759
+ // - size: file size in bytes
760
+ // - mimeType: MIME type of the file
761
+ // - file: (optional) native File object (usually only on web)
762
+ const files = [];
763
+ const errors = [];
764
+
765
+ // Process files in parallel for better performance
766
+ // This allows multiple files to be converted simultaneously
767
+ const conversionPromises = result.assets.map((doc, index) => (0, _fileManagement.convertDocumentPickerAssetToFile)(doc, index).then(file => {
768
+ if (file) {
769
+ // Validate file has required properties before adding
770
+ if (!file.name || file.size === undefined) {
771
+ errors.push(`File "${doc.name || 'file'}" is invalid: missing required properties`);
772
+ return null;
688
773
  }
774
+ return file;
775
+ }
776
+ return null;
777
+ }).catch(error => {
778
+ errors.push(`File "${doc.name || 'file'}": ${error.message || 'Failed to process'}`);
779
+ return null;
780
+ }));
781
+ const convertedFiles = await Promise.all(conversionPromises);
782
+
783
+ // Filter out null values
784
+ for (const file of convertedFiles) {
785
+ if (file) {
786
+ files.push(file);
689
787
  }
690
788
  }
789
+
790
+ // Show errors if any
791
+ if (errors.length > 0) {
792
+ const errorMessage = errors.slice(0, 3).join('\n') + (errors.length > 3 ? `\n...and ${errors.length - 3} more` : '');
793
+ _sonner.toast.error(`Failed to load some files:\n${errorMessage}`);
794
+ }
795
+
796
+ // Process successfully converted files
797
+ if (files.length > 0) {
798
+ await handleFileSelection(files);
799
+ } else {
800
+ // Files were selected but none could be converted
801
+ _sonner.toast.error('No files could be processed. Please try selecting files again.');
802
+ }
691
803
  } catch (error) {
692
- _sonner.toast.error(error.message || 'Failed to open file picker');
804
+ console.error('File upload error:', error);
805
+ if (error.message?.includes('expo-document-picker') || error.message?.includes('Different document picking in progress')) {
806
+ if (error.message?.includes('Different document picking in progress')) {
807
+ _sonner.toast.error('Please wait for the current file selection to complete');
808
+ } else {
809
+ _sonner.toast.error('File picker not available. Please install expo-document-picker');
810
+ }
811
+ } else {
812
+ _sonner.toast.error(error.message || 'Failed to select files');
813
+ }
814
+ } finally {
815
+ // Always reset the picking state, even if there was an error
816
+ setIsPickingDocument(false);
693
817
  }
694
818
  };
695
819
  const handleFileDelete = async (fileId, filename) => {
696
- // Use web-compatible confirmation dialog
697
- const confirmed = window.confirm(`Are you sure you want to delete "${filename}"? This action cannot be undone.`);
820
+ // Use platform-aware confirmation dialog
821
+ const confirmed = await (0, _fileManagement.confirmAction)(`Are you sure you want to delete "${filename}"? This action cannot be undone.`, 'Delete File', 'Delete', 'Cancel');
698
822
  if (!confirmed) {
699
823
  return;
700
824
  }
@@ -730,7 +854,7 @@ const FileManagementScreen = ({
730
854
  fileMap[f.id] = f;
731
855
  });
732
856
  const selectedFiles = Array.from(selectedIds).map(id => fileMap[id]).filter(Boolean);
733
- const confirmed = window.confirm(`Are you sure you want to delete ${selectedFiles.length} file(s)? This action cannot be undone.`);
857
+ const confirmed = await (0, _fileManagement.confirmAction)(`Are you sure you want to delete ${selectedFiles.length} file(s)? This action cannot be undone.`, 'Delete Files', 'Delete', 'Cancel');
734
858
  if (!confirmed) return;
735
859
  try {
736
860
  const deletePromises = Array.from(selectedIds).map(async fileId => {
@@ -806,70 +930,17 @@ const FileManagementScreen = ({
806
930
  }
807
931
  }, [selectedIds, oxyServices, files, loadFiles]);
808
932
 
809
- // Global drag listeners (web) - attach to document for reliable drag and drop
810
- (0, _react.useEffect)(() => {
811
- if (_reactNative.Platform.OS !== 'web' || user?.id !== targetUserId) return;
812
- let dragCounter = 0; // Track drag enter/leave to handle nested elements
813
-
814
- const onDragEnter = e => {
815
- dragCounter++;
816
- if (e?.dataTransfer?.types?.includes('Files')) {
817
- e.preventDefault();
818
- e.stopPropagation();
819
- setIsDragging(true);
820
- }
821
- };
822
- const onDragOver = e => {
823
- if (e?.dataTransfer?.types?.includes('Files')) {
824
- e.preventDefault();
825
- e.stopPropagation();
826
- // Keep dragging state true while over document
827
- setIsDragging(true);
828
- }
829
- };
830
- const onDrop = async e => {
831
- dragCounter = 0;
832
- setIsDragging(false);
833
- if (e?.dataTransfer?.files?.length) {
834
- e.preventDefault();
835
- e.stopPropagation();
836
- try {
837
- const files = Array.from(e.dataTransfer.files);
838
- if (files.length > 0) {
839
- await handleFileSelection(files);
840
- }
841
- } catch (error) {
842
- _sonner.toast.error(error.message || 'Failed to upload files');
843
- }
844
- }
845
- };
846
- const onDragLeave = e => {
847
- dragCounter--;
848
- // Only hide drag overlay if we're actually leaving the document (drag counter reaches 0)
849
- if (dragCounter === 0) {
850
- setIsDragging(false);
851
- }
852
- };
853
-
854
- // Attach to document for global drag detection
855
- document.addEventListener('dragenter', onDragEnter, false);
856
- document.addEventListener('dragover', onDragOver, false);
857
- document.addEventListener('drop', onDrop, false);
858
- document.addEventListener('dragleave', onDragLeave, false);
859
- return () => {
860
- document.removeEventListener('dragenter', onDragEnter, false);
861
- document.removeEventListener('dragover', onDragOver, false);
862
- document.removeEventListener('drop', onDrop, false);
863
- document.removeEventListener('dragleave', onDragLeave, false);
864
- };
865
- }, [user?.id, targetUserId, handleFileSelection]);
933
+ // Unified download function - works on all platforms
866
934
  const handleFileDownload = async (fileId, filename) => {
867
935
  try {
868
- if (_reactNative.Platform.OS === 'web') {
869
- // Use the public download URL method
870
- const downloadUrl = oxyServices.getFileDownloadUrl(fileId);
936
+ // Try to use the download URL with a simple approach
937
+ // On web, this creates a download link. On mobile, it opens the URL.
938
+ const downloadUrl = oxyServices.getFileDownloadUrl(fileId);
939
+
940
+ // For web platforms, use link download
941
+ if (typeof window !== 'undefined' && window.document) {
871
942
  try {
872
- // Method 1: Try simple link download first
943
+ // Try simple link download first
873
944
  const link = document.createElement('a');
874
945
  link.href = downloadUrl;
875
946
  link.download = filename;
@@ -879,9 +950,9 @@ const FileManagementScreen = ({
879
950
  document.body.removeChild(link);
880
951
  _sonner.toast.success('File download started');
881
952
  } catch (linkError) {
882
- // Method 2: Fallback to authenticated download
953
+ // Fallback to authenticated download
883
954
  const blob = await oxyServices.getFileContentAsBlob(fileId);
884
- const url = window.URL.createObjectURL(blob);
955
+ const url = URL.createObjectURL(blob);
885
956
  const link = document.createElement('a');
886
957
  link.href = url;
887
958
  link.download = filename;
@@ -890,33 +961,19 @@ const FileManagementScreen = ({
890
961
  document.body.removeChild(link);
891
962
 
892
963
  // Clean up the blob URL
893
- window.URL.revokeObjectURL(url);
964
+ URL.revokeObjectURL(url);
894
965
  _sonner.toast.success('File downloaded successfully');
895
966
  }
896
967
  } else {
897
- _sonner.toast.info('File download not implemented for mobile yet');
968
+ // For mobile, open the URL (user can save from browser)
969
+ // Note: This is a simplified approach - for full mobile support,
970
+ // consider using expo-file-system or react-native-fs
971
+ _sonner.toast.info('Please use your browser to download the file');
898
972
  }
899
973
  } catch (error) {
900
974
  _sonner.toast.error(error.message || 'Failed to download file');
901
975
  }
902
976
  };
903
- const formatFileSize = bytes => {
904
- if (bytes === 0) return '0 Bytes';
905
- const k = 1024;
906
- const sizes = ['Bytes', 'KB', 'MB', 'GB'];
907
- const i = Math.floor(Math.log(bytes) / Math.log(k));
908
- return Number.parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
909
- };
910
- const getFileIcon = contentType => {
911
- if (contentType.startsWith('image/')) return 'image';
912
- if (contentType.startsWith('video/')) return 'videocam';
913
- if (contentType.startsWith('audio/')) return 'musical-notes';
914
- if (contentType.includes('pdf')) return 'document-text';
915
- if (contentType.includes('word') || contentType.includes('doc')) return 'document';
916
- if (contentType.includes('excel') || contentType.includes('sheet')) return 'grid';
917
- if (contentType.includes('zip') || contentType.includes('archive')) return 'archive';
918
- return 'document-outline';
919
- };
920
977
  const handleFileOpen = async file => {
921
978
  if (selectMode) {
922
979
  toggleSelect(file);
@@ -967,20 +1024,20 @@ const FileManagementScreen = ({
967
1024
  setShowFileDetails(true);
968
1025
  };
969
1026
  const renderSimplePhotoItem = (0, _react.useCallback)((photo, index) => {
970
- const downloadUrl = getSafeDownloadUrl(photo, 'thumb');
1027
+ const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
971
1028
 
972
1029
  // Calculate photo item width based on actual container size from bottom sheet
973
1030
  let itemsPerRow = 3; // Default for mobile
974
- if (containerWidth > 768) itemsPerRow = 4; // Desktop/tablet
975
- else if (containerWidth > 480) itemsPerRow = 3; // Large mobile
1031
+ if (safeContainerWidth > 768) itemsPerRow = 4; // Desktop/tablet
1032
+ else if (safeContainerWidth > 480) itemsPerRow = 3; // Large mobile
976
1033
 
977
1034
  // Account for the photoScrollContainer padding (16px on each side = 32px total)
978
1035
  const scrollContainerPadding = 32; // Total horizontal padding from photoScrollContainer
979
1036
  const gaps = (itemsPerRow - 1) * 4; // Gap between items (4px)
980
- const availableWidth = containerWidth - scrollContainerPadding;
1037
+ const availableWidth = safeContainerWidth - scrollContainerPadding;
981
1038
  const itemWidth = (availableWidth - gaps) / itemsPerRow;
982
1039
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
983
- style: [styles.simplePhotoItem, {
1040
+ style: [_styles.fileManagementStyles.simplePhotoItem, {
984
1041
  width: itemWidth,
985
1042
  height: itemWidth,
986
1043
  marginRight: (index + 1) % itemsPerRow === 0 ? 0 : 4,
@@ -992,12 +1049,12 @@ const FileManagementScreen = ({
992
1049
  onPress: () => handleFileOpen(photo),
993
1050
  activeOpacity: 0.8,
994
1051
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
995
- style: styles.simplePhotoContainer,
1052
+ style: _styles.fileManagementStyles.simplePhotoContainer,
996
1053
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
997
1054
  source: {
998
1055
  uri: downloadUrl
999
1056
  },
1000
- style: styles.simplePhotoImage,
1057
+ style: _styles.fileManagementStyles.simplePhotoImage,
1001
1058
  contentFit: "cover",
1002
1059
  transition: 120,
1003
1060
  cachePolicy: "memory-disk",
@@ -1006,7 +1063,7 @@ const FileManagementScreen = ({
1006
1063
  },
1007
1064
  accessibilityLabel: photo.filename
1008
1065
  }), selectMode && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1009
- style: styles.selectionBadge,
1066
+ style: _styles.fileManagementStyles.selectionBadge,
1010
1067
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1011
1068
  name: selectedIds.has(photo.id) ? 'checkmark-circle' : 'ellipse-outline',
1012
1069
  size: 20,
@@ -1015,11 +1072,11 @@ const FileManagementScreen = ({
1015
1072
  })]
1016
1073
  })
1017
1074
  }, photo.id);
1018
- }, [oxyServices, containerWidth, selectMode, selectedIds, themeStyles.primaryColor, themeStyles.textColor]);
1075
+ }, [oxyServices, safeContainerWidth, selectMode, selectedIds, themeStyles.primaryColor, themeStyles.textColor]);
1019
1076
  const renderJustifiedPhotoItem = (0, _react.useCallback)((photo, width, height, isLast) => {
1020
- const downloadUrl = getSafeDownloadUrl(photo, 'thumb');
1077
+ const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
1021
1078
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1022
- style: [styles.justifiedPhotoItem, {
1079
+ style: [_styles.fileManagementStyles.justifiedPhotoItem, {
1023
1080
  width,
1024
1081
  height,
1025
1082
  ...(selectMode && selectedIds.has(photo.id) ? {
@@ -1033,12 +1090,12 @@ const FileManagementScreen = ({
1033
1090
  onPress: () => handleFileOpen(photo),
1034
1091
  activeOpacity: 0.8,
1035
1092
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1036
- style: styles.justifiedPhotoContainer,
1093
+ style: _styles.fileManagementStyles.justifiedPhotoContainer,
1037
1094
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
1038
1095
  source: {
1039
1096
  uri: downloadUrl
1040
1097
  },
1041
- style: styles.justifiedPhotoImage,
1098
+ style: _styles.fileManagementStyles.justifiedPhotoImage,
1042
1099
  contentFit: "cover",
1043
1100
  transition: 120,
1044
1101
  cachePolicy: "memory-disk",
@@ -1047,7 +1104,7 @@ const FileManagementScreen = ({
1047
1104
  },
1048
1105
  accessibilityLabel: photo.filename
1049
1106
  }), selectMode && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1050
- style: styles.selectionBadge,
1107
+ style: _styles.fileManagementStyles.selectionBadge,
1051
1108
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1052
1109
  name: selectedIds.has(photo.id) ? 'checkmark-circle' : 'ellipse-outline',
1053
1110
  size: 20,
@@ -1076,7 +1133,7 @@ const FileManagementScreen = ({
1076
1133
  const hasPreview = isImage || isPDF || isVideo;
1077
1134
  const borderColor = themeStyles.borderColor;
1078
1135
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1079
- style: [styles.fileItem, {
1136
+ style: [_styles.fileManagementStyles.fileItem, {
1080
1137
  backgroundColor: themeStyles.secondaryBackgroundColor,
1081
1138
  borderColor
1082
1139
  }, selectMode && selectedIds.has(file.id) && {
@@ -1084,21 +1141,17 @@ const FileManagementScreen = ({
1084
1141
  borderWidth: 2
1085
1142
  }],
1086
1143
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
1087
- style: styles.fileContent,
1144
+ style: _styles.fileManagementStyles.fileContent,
1088
1145
  onPress: () => handleFileOpen(file),
1089
1146
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1090
- style: styles.filePreviewContainer,
1147
+ style: _styles.fileManagementStyles.filePreviewContainer,
1091
1148
  children: hasPreview ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1092
- style: styles.filePreview,
1093
- ...(_reactNative.Platform.OS === 'web' && {
1094
- onMouseEnter: () => setHoveredPreview(file.id),
1095
- onMouseLeave: () => setHoveredPreview(null)
1096
- }),
1149
+ style: _styles.fileManagementStyles.filePreview,
1097
1150
  children: [isImage && /*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
1098
1151
  source: {
1099
- uri: getSafeDownloadUrl(file, 'thumb')
1152
+ uri: getSafeDownloadUrlCallback(file, 'thumb')
1100
1153
  },
1101
- style: styles.previewImage,
1154
+ style: _styles.fileManagementStyles.previewImage,
1102
1155
  contentFit: "cover",
1103
1156
  transition: 120,
1104
1157
  cachePolicy: "memory-disk",
@@ -1107,24 +1160,24 @@ const FileManagementScreen = ({
1107
1160
  },
1108
1161
  accessibilityLabel: file.filename
1109
1162
  }), isPDF && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1110
- style: styles.pdfPreview,
1163
+ style: _styles.fileManagementStyles.pdfPreview,
1111
1164
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1112
1165
  name: "document",
1113
1166
  size: 32,
1114
1167
  color: themeStyles.primaryColor
1115
1168
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1116
- style: [styles.pdfLabel, {
1169
+ style: [_styles.fileManagementStyles.pdfLabel, {
1117
1170
  color: themeStyles.primaryColor
1118
1171
  }],
1119
1172
  children: "PDF"
1120
1173
  })]
1121
1174
  }), isVideo && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1122
- style: styles.videoPreviewWrapper,
1175
+ style: _styles.fileManagementStyles.videoPreviewWrapper,
1123
1176
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
1124
1177
  source: {
1125
- uri: getSafeDownloadUrl(file, 'thumb')
1178
+ uri: getSafeDownloadUrlCallback(file, 'thumb')
1126
1179
  },
1127
- style: styles.videoPosterImage,
1180
+ style: _styles.fileManagementStyles.videoPosterImage,
1128
1181
  contentFit: "cover",
1129
1182
  transition: 120,
1130
1183
  cachePolicy: "memory-disk",
@@ -1133,7 +1186,7 @@ const FileManagementScreen = ({
1133
1186
  },
1134
1187
  accessibilityLabel: file.filename + ' video thumbnail'
1135
1188
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1136
- style: styles.videoOverlay,
1189
+ style: _styles.fileManagementStyles.videoOverlay,
1137
1190
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1138
1191
  name: "play",
1139
1192
  size: 24,
@@ -1141,26 +1194,16 @@ const FileManagementScreen = ({
1141
1194
  })
1142
1195
  })]
1143
1196
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1144
- style: [styles.fallbackIcon, {
1197
+ style: [_styles.fileManagementStyles.fallbackIcon, {
1145
1198
  display: isImage ? 'none' : 'flex'
1146
1199
  }],
1147
- ...(_reactNative.Platform.OS === 'web' && {
1148
- 'data-fallback': 'true'
1149
- }),
1150
1200
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1151
- name: getFileIcon(file.contentType),
1201
+ name: (0, _fileManagement.getFileIcon)(file.contentType),
1152
1202
  size: 32,
1153
1203
  color: themeStyles.primaryColor
1154
1204
  })
1155
- }), !selectMode && _reactNative.Platform.OS === 'web' && hoveredPreview === file.id && isImage && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1156
- style: styles.previewOverlay,
1157
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1158
- name: "eye",
1159
- size: 24,
1160
- color: "#FFFFFF"
1161
- })
1162
1205
  }), selectMode && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1163
- style: styles.selectionBadge,
1206
+ style: _styles.fileManagementStyles.selectionBadge,
1164
1207
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1165
1208
  name: selectedIds.has(file.id) ? 'checkmark-circle' : 'ellipse-outline',
1166
1209
  size: 22,
@@ -1168,28 +1211,28 @@ const FileManagementScreen = ({
1168
1211
  })
1169
1212
  })]
1170
1213
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1171
- style: styles.fileIconContainer,
1214
+ style: _styles.fileManagementStyles.fileIconContainer,
1172
1215
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1173
- name: getFileIcon(file.contentType),
1216
+ name: (0, _fileManagement.getFileIcon)(file.contentType),
1174
1217
  size: 32,
1175
1218
  color: themeStyles.primaryColor
1176
1219
  })
1177
1220
  })
1178
1221
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1179
- style: styles.fileInfo,
1222
+ style: _styles.fileManagementStyles.fileInfo,
1180
1223
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1181
- style: [styles.fileName, {
1224
+ style: [_styles.fileManagementStyles.fileName, {
1182
1225
  color: themeStyles.textColor
1183
1226
  }],
1184
1227
  numberOfLines: 1,
1185
1228
  children: file.filename
1186
1229
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
1187
- style: [styles.fileDetails, {
1230
+ style: [_styles.fileManagementStyles.fileDetails, {
1188
1231
  color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1189
1232
  }],
1190
- children: [formatFileSize(file.length), " \u2022 ", new Date(file.uploadDate).toLocaleDateString()]
1233
+ children: [(0, _fileManagement.formatFileSize)(file.length), " \u2022 ", new Date(file.uploadDate).toLocaleDateString()]
1191
1234
  }), file.metadata?.description && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1192
- style: [styles.fileDescription, {
1235
+ style: [_styles.fileManagementStyles.fileDescription, {
1193
1236
  color: themeStyles.isDarkTheme ? '#AAAAAA' : '#888888'
1194
1237
  }],
1195
1238
  numberOfLines: 2,
@@ -1197,9 +1240,9 @@ const FileManagementScreen = ({
1197
1240
  })]
1198
1241
  })]
1199
1242
  }), !selectMode && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1200
- style: styles.fileActions,
1243
+ style: _styles.fileManagementStyles.fileActions,
1201
1244
  children: [hasPreview && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1202
- style: [styles.actionButton, {
1245
+ style: [_styles.fileManagementStyles.actionButton, {
1203
1246
  backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
1204
1247
  }],
1205
1248
  onPress: () => handleFileOpen(file),
@@ -1209,7 +1252,7 @@ const FileManagementScreen = ({
1209
1252
  color: themeStyles.primaryColor
1210
1253
  })
1211
1254
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1212
- style: [styles.actionButton, {
1255
+ style: [_styles.fileManagementStyles.actionButton, {
1213
1256
  backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
1214
1257
  }],
1215
1258
  onPress: () => handleFileDownload(file.id, file.filename),
@@ -1219,7 +1262,7 @@ const FileManagementScreen = ({
1219
1262
  color: themeStyles.primaryColor
1220
1263
  })
1221
1264
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1222
- style: [styles.actionButton, {
1265
+ style: [_styles.fileManagementStyles.actionButton, {
1223
1266
  backgroundColor: themeStyles.isDarkTheme ? '#400000' : '#FFEBEE'
1224
1267
  }],
1225
1268
  onPress: () => {
@@ -1250,18 +1293,107 @@ const FileManagementScreen = ({
1250
1293
  });
1251
1294
  return sortedFiles.map(file => {
1252
1295
  const isImage = file.contentType.startsWith('image/');
1296
+ const isPDF = file.contentType.includes('pdf');
1253
1297
  const isVideo = file.contentType.startsWith('video/');
1254
- const hasPreview = isImage || isVideo;
1255
- const previewUrl = hasPreview ? isVideo ? getSafeDownloadUrl(file, 'poster') : getSafeDownloadUrl(file, 'thumb') : undefined;
1298
+ const hasPreview = isImage || isPDF || isVideo;
1256
1299
  const isSelected = selectedIds.has(file.id);
1300
+
1301
+ // Create customIcon for preview thumbnails (36x36 to match GroupedItem iconContainer)
1302
+ let customIcon;
1303
+ if (hasPreview) {
1304
+ if (isImage) {
1305
+ customIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1306
+ style: {
1307
+ width: 36,
1308
+ height: 36,
1309
+ borderRadius: 18,
1310
+ overflow: 'hidden'
1311
+ },
1312
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
1313
+ source: {
1314
+ uri: getSafeDownloadUrlCallback(file, 'thumb')
1315
+ },
1316
+ style: {
1317
+ width: 36,
1318
+ height: 36
1319
+ },
1320
+ contentFit: "cover",
1321
+ transition: 120,
1322
+ cachePolicy: "memory-disk",
1323
+ onError: () => {
1324
+ // Image preview failed to load - will fallback to icon
1325
+ },
1326
+ accessibilityLabel: file.filename
1327
+ })
1328
+ });
1329
+ } else if (isVideo) {
1330
+ customIcon = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1331
+ style: {
1332
+ width: 36,
1333
+ height: 36,
1334
+ borderRadius: 18,
1335
+ overflow: 'hidden',
1336
+ backgroundColor: '#000000',
1337
+ position: 'relative'
1338
+ },
1339
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
1340
+ source: {
1341
+ uri: getSafeDownloadUrlCallback(file, 'thumb')
1342
+ },
1343
+ style: {
1344
+ width: 36,
1345
+ height: 36
1346
+ },
1347
+ contentFit: "cover",
1348
+ transition: 120,
1349
+ cachePolicy: "memory-disk",
1350
+ onError: _ => {
1351
+ // If thumbnail not available, we still show icon overlay
1352
+ },
1353
+ accessibilityLabel: file.filename + ' video thumbnail'
1354
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1355
+ style: {
1356
+ position: 'absolute',
1357
+ top: 0,
1358
+ left: 0,
1359
+ right: 0,
1360
+ bottom: 0,
1361
+ alignItems: 'center',
1362
+ justifyContent: 'center',
1363
+ backgroundColor: 'rgba(0,0,0,0.25)'
1364
+ },
1365
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1366
+ name: "play",
1367
+ size: 16,
1368
+ color: "#FFFFFF"
1369
+ })
1370
+ })]
1371
+ });
1372
+ } else if (isPDF) {
1373
+ customIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1374
+ style: {
1375
+ width: 36,
1376
+ height: 36,
1377
+ borderRadius: 18,
1378
+ alignItems: 'center',
1379
+ justifyContent: 'center',
1380
+ backgroundColor: '#FF6B6B20'
1381
+ },
1382
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1383
+ name: "document",
1384
+ size: 20,
1385
+ color: themeStyles.primaryColor
1386
+ })
1387
+ });
1388
+ }
1389
+ }
1257
1390
  return {
1258
1391
  id: file.id,
1259
- image: previewUrl,
1260
- imageSize: 44,
1261
- icon: !previewUrl ? getFileIcon(file.contentType) : undefined,
1392
+ customIcon: customIcon,
1393
+ icon: !hasPreview ? (0, _fileManagement.getFileIcon)(file.contentType) : undefined,
1262
1394
  iconColor: themeStyles.primaryColor,
1263
1395
  title: file.filename,
1264
- subtitle: `${formatFileSize(file.length)} • ${new Date(file.uploadDate).toLocaleDateString()}`,
1396
+ subtitle: `${(0, _fileManagement.formatFileSize)(file.length)} • ${new Date(file.uploadDate).toLocaleDateString()}`,
1265
1397
  theme: theme,
1266
1398
  onPress: () => {
1267
1399
  // Support selection in regular mode with long press or if already selecting
@@ -1286,9 +1418,9 @@ const FileManagementScreen = ({
1286
1418
  selected: (selectMode || selectedIds.size > 0) && isSelected,
1287
1419
  // Hide action buttons when selecting (in selectMode or bulk operations mode)
1288
1420
  customContent: !selectMode && selectedIds.size === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1289
- style: styles.groupedActions,
1421
+ style: _styles.fileManagementStyles.groupedActions,
1290
1422
  children: [(isImage || isVideo || file.contentType.includes('pdf')) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1291
- style: [styles.groupedActionBtn, {
1423
+ style: [_styles.fileManagementStyles.groupedActionBtn, {
1292
1424
  backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
1293
1425
  }],
1294
1426
  onPress: () => handleFileOpen(file),
@@ -1298,7 +1430,7 @@ const FileManagementScreen = ({
1298
1430
  color: themeStyles.primaryColor
1299
1431
  })
1300
1432
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1301
- style: [styles.groupedActionBtn, {
1433
+ style: [_styles.fileManagementStyles.groupedActionBtn, {
1302
1434
  backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
1303
1435
  }],
1304
1436
  onPress: () => handleFileDownload(file.id, file.filename),
@@ -1308,7 +1440,7 @@ const FileManagementScreen = ({
1308
1440
  color: themeStyles.primaryColor
1309
1441
  })
1310
1442
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1311
- style: [styles.groupedActionBtn, {
1443
+ style: [_styles.fileManagementStyles.groupedActionBtn, {
1312
1444
  backgroundColor: themeStyles.isDarkTheme ? '#400000' : '#FFEBEE'
1313
1445
  }],
1314
1446
  onPress: () => handleFileDelete(file.id, file.filename),
@@ -1324,7 +1456,7 @@ const FileManagementScreen = ({
1324
1456
  })]
1325
1457
  }) : undefined,
1326
1458
  customContentBelow: file.metadata?.description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1327
- style: [styles.groupedDescription, {
1459
+ style: [_styles.fileManagementStyles.groupedDescription, {
1328
1460
  color: themeStyles.isDarkTheme ? '#AAAAAA' : '#666666'
1329
1461
  }],
1330
1462
  numberOfLines: 2,
@@ -1332,7 +1464,7 @@ const FileManagementScreen = ({
1332
1464
  }) : undefined
1333
1465
  };
1334
1466
  });
1335
- }, [filteredFiles, theme, themeStyles, deleting, handleFileDownload, handleFileDelete, handleFileOpen, getSafeDownloadUrl, selectMode, selectedIds]);
1467
+ }, [filteredFiles, theme, themeStyles, deleting, handleFileDownload, handleFileDelete, handleFileOpen, getSafeDownloadUrlCallback, selectMode, selectedIds]);
1336
1468
 
1337
1469
  // Scroll to selected file after selection
1338
1470
  (0, _react.useEffect)(() => {
@@ -1380,10 +1512,10 @@ const FileManagementScreen = ({
1380
1512
  // Estimate photo item height based on grid layout
1381
1513
  // Calculate items per row
1382
1514
  let itemsPerRow = 3;
1383
- if (containerWidth > 768) itemsPerRow = 6;else if (containerWidth > 480) itemsPerRow = 4;
1515
+ if (safeContainerWidth > 768) itemsPerRow = 6;else if (safeContainerWidth > 480) itemsPerRow = 4;
1384
1516
  const scrollContainerPadding = 32;
1385
1517
  const gaps = (itemsPerRow - 1) * 4;
1386
- const availableWidth = containerWidth - scrollContainerPadding;
1518
+ const availableWidth = safeContainerWidth - scrollContainerPadding;
1387
1519
  const itemWidth = (availableWidth - gaps) / itemsPerRow;
1388
1520
 
1389
1521
  // Calculate row and approximate scroll position
@@ -1403,7 +1535,7 @@ const FileManagementScreen = ({
1403
1535
  }
1404
1536
  }
1405
1537
  }
1406
- }, [lastSelectedFileId, selectMode, viewMode, filteredFiles, containerWidth]);
1538
+ }, [lastSelectedFileId, selectMode, viewMode, filteredFiles, safeContainerWidth]);
1407
1539
 
1408
1540
  // Clear selected file ID after scroll animation completes
1409
1541
  (0, _react.useEffect)(() => {
@@ -1416,32 +1548,32 @@ const FileManagementScreen = ({
1416
1548
  }
1417
1549
  }, [lastSelectedFileId]);
1418
1550
  const renderPhotoItem = (photo, index) => {
1419
- const downloadUrl = getSafeDownloadUrl(photo, 'thumb');
1551
+ const downloadUrl = getSafeDownloadUrlCallback(photo, 'thumb');
1420
1552
 
1421
1553
  // Calculate photo item width based on actual container size from bottom sheet
1422
1554
  let itemsPerRow = 3; // Default for mobile
1423
- if (containerWidth > 768) itemsPerRow = 6; // Tablet/Desktop
1424
- else if (containerWidth > 480) itemsPerRow = 4; // Large mobile
1555
+ if (safeContainerWidth > 768) itemsPerRow = 6; // Tablet/Desktop
1556
+ else if (safeContainerWidth > 480) itemsPerRow = 4; // Large mobile
1425
1557
 
1426
1558
  // Account for the photoScrollContainer padding (16px on each side = 32px total)
1427
1559
  const scrollContainerPadding = 32; // Total horizontal padding from photoScrollContainer
1428
1560
  const gaps = (itemsPerRow - 1) * 4; // Gap between items
1429
- const availableWidth = containerWidth - scrollContainerPadding;
1561
+ const availableWidth = safeContainerWidth - scrollContainerPadding;
1430
1562
  const itemWidth = (availableWidth - gaps) / itemsPerRow;
1431
1563
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1432
- style: [styles.photoItem, {
1564
+ style: [_styles.fileManagementStyles.photoItem, {
1433
1565
  width: itemWidth,
1434
1566
  height: itemWidth
1435
1567
  }],
1436
1568
  onPress: () => handleFileOpen(photo),
1437
1569
  activeOpacity: 0.8,
1438
1570
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1439
- style: styles.photoContainer,
1571
+ style: _styles.fileManagementStyles.photoContainer,
1440
1572
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
1441
1573
  source: {
1442
1574
  uri: downloadUrl
1443
1575
  },
1444
- style: styles.photoImage,
1576
+ style: _styles.fileManagementStyles.photoImage,
1445
1577
  contentFit: "cover",
1446
1578
  transition: 120,
1447
1579
  cachePolicy: "memory-disk",
@@ -1457,37 +1589,40 @@ const FileManagementScreen = ({
1457
1589
  const photos = filteredFiles.filter(file => file.contentType.startsWith('image/'));
1458
1590
  if (photos.length === 0) {
1459
1591
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1460
- style: styles.emptyState,
1592
+ style: _styles.fileManagementStyles.emptyState,
1461
1593
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1462
1594
  name: "images-outline",
1463
1595
  size: 64,
1464
1596
  color: themeStyles.isDarkTheme ? '#666666' : '#CCCCCC'
1465
1597
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1466
- style: [styles.emptyStateTitle, {
1598
+ style: [_styles.fileManagementStyles.emptyStateTitle, {
1467
1599
  color: themeStyles.textColor
1468
1600
  }],
1469
1601
  children: "No Photos Yet"
1470
1602
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
1471
- style: [styles.emptyStateDescription, {
1603
+ style: [_styles.fileManagementStyles.emptyStateDescription, {
1472
1604
  color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1473
1605
  }],
1474
- children: [" ", user?.id === targetUserId ? `Upload photos to get started. You can select multiple photos at once${_reactNative.Platform.OS === 'web' ? ' or drag & drop them here.' : '.'}` : "This user hasn't uploaded any photos yet", " "]
1606
+ children: [" ", user?.id === targetUserId ? `Upload photos to get started. You can select multiple photos at once.` : "This user hasn't uploaded any photos yet", " "]
1475
1607
  }), user?.id === targetUserId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1476
- style: [styles.emptyStateButton, {
1608
+ style: [_styles.fileManagementStyles.emptyStateButton, {
1477
1609
  backgroundColor: themeStyles.primaryColor
1478
1610
  }],
1479
1611
  onPress: handleFileUpload,
1480
- disabled: uploading,
1612
+ disabled: uploading || isPickingDocument,
1481
1613
  children: uploading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
1482
1614
  size: "small",
1483
1615
  color: "#FFFFFF"
1616
+ }) : isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
1617
+ size: "small",
1618
+ color: "#FFFFFF"
1484
1619
  }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
1485
1620
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1486
1621
  name: "cloud-upload",
1487
1622
  size: 20,
1488
1623
  color: "#FFFFFF"
1489
1624
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1490
- style: styles.emptyStateButtonText,
1625
+ style: _styles.fileManagementStyles.emptyStateButtonText,
1491
1626
  children: "Upload Photos"
1492
1627
  })]
1493
1628
  })
@@ -1496,8 +1631,8 @@ const FileManagementScreen = ({
1496
1631
  }
1497
1632
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
1498
1633
  ref: photoScrollViewRef,
1499
- style: styles.scrollView,
1500
- contentContainerStyle: styles.photoScrollContainer,
1634
+ style: _styles.fileManagementStyles.scrollView,
1635
+ contentContainerStyle: _styles.fileManagementStyles.photoScrollContainer,
1501
1636
  refreshControl: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.RefreshControl, {
1502
1637
  refreshing: refreshing,
1503
1638
  onRefresh: () => loadFiles('refresh'),
@@ -1519,12 +1654,12 @@ const FileManagementScreen = ({
1519
1654
  },
1520
1655
  scrollEventThrottle: 250,
1521
1656
  children: [loadingDimensions && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1522
- style: styles.dimensionsLoadingIndicator,
1657
+ style: _styles.fileManagementStyles.dimensionsLoadingIndicator,
1523
1658
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
1524
1659
  size: "small",
1525
1660
  color: themeStyles.primaryColor
1526
1661
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1527
- style: [styles.dimensionsLoadingText, {
1662
+ style: [_styles.fileManagementStyles.dimensionsLoadingText, {
1528
1663
  color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1529
1664
  }],
1530
1665
  children: "Loading photo layout..."
@@ -1537,525 +1672,48 @@ const FileManagementScreen = ({
1537
1672
  renderJustifiedPhotoItem: renderJustifiedPhotoItem,
1538
1673
  renderSimplePhotoItem: renderPhotoItem,
1539
1674
  textColor: themeStyles.textColor,
1540
- containerWidth: containerWidth
1675
+ containerWidth: safeContainerWidth
1541
1676
  })]
1542
1677
  });
1543
- }, [filteredFiles, themeStyles, user?.id, targetUserId, uploading, handleFileUpload, refreshing, loadFiles, loadingDimensions, photoDimensions, loadPhotoDimensions, createJustifiedRows, renderJustifiedPhotoItem, renderPhotoItem, containerWidth]);
1678
+ }, [filteredFiles, themeStyles, user?.id, targetUserId, uploading, handleFileUpload, refreshing, loadFiles, loadingDimensions, photoDimensions, loadPhotoDimensions, createJustifiedRows, renderJustifiedPhotoItem, renderPhotoItem, safeContainerWidth]);
1544
1679
 
1545
1680
  // Inline justified grid removed (moved to components/photogrid/JustifiedPhotoGrid.tsx)
1546
1681
 
1547
- const renderFileDetailsModal = () => {
1548
- const backgroundColor = themeStyles.backgroundColor;
1549
- const borderColor = themeStyles.borderColor;
1550
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
1551
- visible: showFileDetails,
1552
- animationType: "slide",
1553
- presentationStyle: "pageSheet",
1554
- onRequestClose: () => setShowFileDetails(false),
1555
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1556
- style: [styles.modalContainer, {
1557
- backgroundColor
1558
- }],
1559
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1560
- style: [styles.modalHeader, {
1561
- borderBottomColor: borderColor
1562
- }],
1563
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1564
- style: styles.modalCloseButton,
1565
- onPress: () => setShowFileDetails(false),
1566
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1567
- name: "close",
1568
- size: 24,
1569
- color: themeStyles.textColor
1570
- })
1571
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1572
- style: [styles.modalTitle, {
1573
- color: themeStyles.textColor
1574
- }],
1575
- children: "File Details"
1576
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1577
- style: styles.modalPlaceholder
1578
- })]
1579
- }), selectedFile && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
1580
- style: styles.modalContent,
1581
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1582
- style: [styles.fileDetailCard, {
1583
- backgroundColor: themeStyles.secondaryBackgroundColor,
1584
- borderColor
1585
- }],
1586
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1587
- style: styles.fileDetailIcon,
1588
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1589
- name: getFileIcon(selectedFile.contentType),
1590
- size: 64,
1591
- color: themeStyles.primaryColor
1592
- })
1593
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1594
- style: [styles.fileDetailName, {
1595
- color: themeStyles.textColor
1596
- }],
1597
- children: selectedFile.filename
1598
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1599
- style: styles.fileDetailInfo,
1600
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1601
- style: styles.detailRow,
1602
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1603
- style: [styles.detailLabel, {
1604
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1605
- }],
1606
- children: "Size:"
1607
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1608
- style: [styles.detailValue, {
1609
- color: themeStyles.textColor
1610
- }],
1611
- children: formatFileSize(selectedFile.length)
1612
- })]
1613
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1614
- style: styles.detailRow,
1615
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1616
- style: [styles.detailLabel, {
1617
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1618
- }],
1619
- children: "Type:"
1620
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1621
- style: [styles.detailValue, {
1622
- color: themeStyles.textColor
1623
- }],
1624
- children: selectedFile.contentType
1625
- })]
1626
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1627
- style: styles.detailRow,
1628
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1629
- style: [styles.detailLabel, {
1630
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1631
- }],
1632
- children: "Uploaded:"
1633
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1634
- style: [styles.detailValue, {
1635
- color: themeStyles.textColor
1636
- }],
1637
- children: new Date(selectedFile.uploadDate).toLocaleString()
1638
- })]
1639
- }), selectedFile.metadata?.description && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1640
- style: styles.detailRow,
1641
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1642
- style: [styles.detailLabel, {
1643
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1644
- }],
1645
- children: "Description:"
1646
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1647
- style: [styles.detailValue, {
1648
- color: themeStyles.textColor
1649
- }],
1650
- children: selectedFile.metadata.description
1651
- })]
1652
- })]
1653
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1654
- style: styles.modalActions,
1655
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
1656
- style: [styles.modalActionButton, {
1657
- backgroundColor: themeStyles.primaryColor
1658
- }],
1659
- onPress: () => {
1660
- handleFileDownload(selectedFile.id, selectedFile.filename);
1661
- setShowFileDetails(false);
1662
- },
1663
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1664
- name: "download",
1665
- size: 20,
1666
- color: "#FFFFFF"
1667
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1668
- style: styles.modalActionText,
1669
- children: "Download"
1670
- })]
1671
- }), user?.id === targetUserId && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
1672
- style: [styles.modalActionButton, {
1673
- backgroundColor: themeStyles.dangerColor
1674
- }],
1675
- onPress: () => {
1676
- setShowFileDetails(false);
1677
- handleFileDelete(selectedFile.id, selectedFile.filename);
1678
- },
1679
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1680
- name: "trash",
1681
- size: 20,
1682
- color: "#FFFFFF"
1683
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1684
- style: styles.modalActionText,
1685
- children: "Delete"
1686
- })]
1687
- })]
1688
- })]
1689
- })
1690
- })]
1691
- })
1692
- });
1693
- };
1694
- const renderFileViewer = () => {
1695
- if (!openedFile) return null;
1696
- const backgroundColor = themeStyles.backgroundColor;
1697
- const borderColor = themeStyles.borderColor;
1698
- const isImage = openedFile.contentType.startsWith('image/');
1699
- const isText = openedFile.contentType.startsWith('text/') || openedFile.contentType.includes('json') || openedFile.contentType.includes('xml') || openedFile.contentType.includes('javascript') || openedFile.contentType.includes('typescript');
1700
- const isPDF = openedFile.contentType.includes('pdf');
1701
- const isVideo = openedFile.contentType.startsWith('video/');
1702
- const isAudio = openedFile.contentType.startsWith('audio/');
1703
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1704
- style: [styles.fileViewerContainer, {
1705
- backgroundColor
1706
- }],
1707
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1708
- style: [styles.fileViewerHeader, {
1709
- borderBottomColor: borderColor
1710
- }],
1711
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1712
- style: styles.backButton,
1713
- onPress: handleCloseFile,
1714
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1715
- name: "arrow-back",
1716
- size: 24,
1717
- color: themeStyles.textColor
1718
- })
1719
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1720
- style: styles.fileViewerTitleContainer,
1721
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1722
- style: [styles.fileViewerTitle, {
1723
- color: themeStyles.textColor
1724
- }],
1725
- numberOfLines: 1,
1726
- children: openedFile.filename
1727
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
1728
- style: [styles.fileViewerSubtitle, {
1729
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1730
- }],
1731
- children: [formatFileSize(openedFile.length), " \u2022 ", openedFile.contentType]
1732
- })]
1733
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1734
- style: styles.fileViewerActions,
1735
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1736
- style: [styles.actionButton, {
1737
- backgroundColor: themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
1738
- }],
1739
- onPress: () => handleFileDownload(openedFile.id, openedFile.filename),
1740
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1741
- name: "download",
1742
- size: 20,
1743
- color: themeStyles.primaryColor
1744
- })
1745
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1746
- style: [styles.actionButton, {
1747
- backgroundColor: showFileDetailsInViewer ? themeStyles.primaryColor : themeStyles.isDarkTheme ? '#333333' : '#F0F0F0'
1748
- }],
1749
- onPress: () => setShowFileDetailsInViewer(!showFileDetailsInViewer),
1750
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1751
- name: showFileDetailsInViewer ? "chevron-up" : "information-circle",
1752
- size: 20,
1753
- color: showFileDetailsInViewer ? "#FFFFFF" : themeStyles.primaryColor
1754
- })
1755
- })]
1756
- })]
1757
- }), showFileDetailsInViewer && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1758
- style: [styles.fileDetailsSection, {
1759
- backgroundColor: themeStyles.secondaryBackgroundColor,
1760
- borderColor
1761
- }],
1762
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1763
- style: styles.fileDetailsSectionHeader,
1764
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1765
- style: [styles.fileDetailsSectionTitle, {
1766
- color: themeStyles.textColor
1767
- }],
1768
- children: "File Details"
1769
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1770
- style: styles.fileDetailsSectionToggle,
1771
- onPress: () => setShowFileDetailsInViewer(false),
1772
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1773
- name: "chevron-up",
1774
- size: 20,
1775
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1776
- })
1777
- })]
1778
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1779
- style: styles.fileDetailInfo,
1780
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1781
- style: styles.detailRow,
1782
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1783
- style: [styles.detailLabel, {
1784
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1785
- }],
1786
- children: "File Name:"
1787
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1788
- style: [styles.detailValue, {
1789
- color: themeStyles.textColor
1790
- }],
1791
- children: openedFile.filename
1792
- })]
1793
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1794
- style: styles.detailRow,
1795
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1796
- style: [styles.detailLabel, {
1797
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1798
- }],
1799
- children: "Size:"
1800
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1801
- style: [styles.detailValue, {
1802
- color: themeStyles.textColor
1803
- }],
1804
- children: formatFileSize(openedFile.length)
1805
- })]
1806
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1807
- style: styles.detailRow,
1808
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1809
- style: [styles.detailLabel, {
1810
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1811
- }],
1812
- children: "Type:"
1813
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1814
- style: [styles.detailValue, {
1815
- color: themeStyles.textColor
1816
- }],
1817
- children: openedFile.contentType
1818
- })]
1819
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1820
- style: styles.detailRow,
1821
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1822
- style: [styles.detailLabel, {
1823
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1824
- }],
1825
- children: "Uploaded:"
1826
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1827
- style: [styles.detailValue, {
1828
- color: themeStyles.textColor
1829
- }],
1830
- children: new Date(openedFile.uploadDate).toLocaleString()
1831
- })]
1832
- }), openedFile.metadata?.description && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1833
- style: styles.detailRow,
1834
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1835
- style: [styles.detailLabel, {
1836
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1837
- }],
1838
- children: "Description:"
1839
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1840
- style: [styles.detailValue, {
1841
- color: themeStyles.textColor
1842
- }],
1843
- children: openedFile.metadata.description
1844
- })]
1845
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1846
- style: styles.detailRow,
1847
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1848
- style: [styles.detailLabel, {
1849
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
1850
- }],
1851
- children: "File ID:"
1852
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1853
- style: [styles.detailValue, {
1854
- color: themeStyles.textColor,
1855
- fontSize: 12,
1856
- fontFamily: _reactNative.Platform.OS === 'web' ? 'monospace' : 'Courier'
1857
- }],
1858
- children: openedFile.id
1859
- })]
1860
- })]
1861
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1862
- style: styles.fileDetailsActions,
1863
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
1864
- style: [styles.fileDetailsActionButton, {
1865
- backgroundColor: themeStyles.primaryColor
1866
- }],
1867
- onPress: () => handleFileDownload(openedFile.id, openedFile.filename),
1868
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1869
- name: "download",
1870
- size: 16,
1871
- color: "#FFFFFF"
1872
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1873
- style: styles.fileDetailsActionText,
1874
- children: "Download"
1875
- })]
1876
- }), user?.id === targetUserId && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
1877
- style: [styles.fileDetailsActionButton, {
1878
- backgroundColor: themeStyles.dangerColor
1879
- }],
1880
- onPress: () => {
1881
- handleCloseFile();
1882
- handleFileDelete(openedFile.id, openedFile.filename);
1883
- },
1884
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1885
- name: "trash",
1886
- size: 16,
1887
- color: "#FFFFFF"
1888
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1889
- style: styles.fileDetailsActionText,
1890
- children: "Delete"
1891
- })]
1892
- })]
1893
- })]
1894
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
1895
- style: [styles.fileViewerContent, showFileDetailsInViewer && styles.fileViewerContentWithDetails],
1896
- contentContainerStyle: styles.fileViewerContentContainer,
1897
- children: loadingFileContent ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1898
- style: styles.fileViewerLoading,
1899
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
1900
- size: "large",
1901
- color: themeStyles.primaryColor
1902
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1903
- style: [styles.fileViewerLoadingText, {
1904
- color: themeStyles.textColor
1905
- }],
1906
- children: "Loading file content..."
1907
- })]
1908
- }) : isImage && fileContent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1909
- style: styles.imageContainer,
1910
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_expoImage.Image, {
1911
- source: {
1912
- uri: fileContent
1913
- },
1914
- style: {
1915
- width: '100%',
1916
- height: 400,
1917
- borderRadius: 8
1918
- },
1919
- contentFit: "contain",
1920
- transition: 120,
1921
- cachePolicy: "memory-disk",
1922
- onError: () => {
1923
- // Image failed to load
1924
- },
1925
- accessibilityLabel: openedFile.filename
1926
- })
1927
- }) : isText && fileContent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1928
- style: [styles.textContainer, {
1929
- backgroundColor: themeStyles.secondaryBackgroundColor,
1930
- borderColor
1931
- }],
1932
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
1933
- style: {
1934
- flex: 1
1935
- },
1936
- nestedScrollEnabled: true,
1937
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1938
- style: [styles.textContent, {
1939
- color: themeStyles.textColor
1940
- }],
1941
- children: fileContent
1942
- })
1943
- })
1944
- }) : isPDF && fileContent && _reactNative.Platform.OS === 'web' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1945
- style: styles.pdfContainer,
1946
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("iframe", {
1947
- src: fileContent,
1948
- width: "100%",
1949
- height: "600px",
1950
- style: {
1951
- border: 'none',
1952
- borderRadius: 8
1953
- },
1954
- title: openedFile.filename
1955
- })
1956
- }) : isVideo && fileContent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1957
- style: styles.mediaContainer,
1958
- children: _reactNative.Platform.OS === 'web' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("video", {
1959
- controls: true,
1960
- style: {
1961
- width: '100%',
1962
- maxHeight: '70vh',
1963
- borderRadius: 8
1964
- },
1965
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("source", {
1966
- src: fileContent,
1967
- type: openedFile.contentType
1968
- }), "Your browser does not support the video tag."]
1969
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1970
- style: [styles.unsupportedText, {
1971
- color: themeStyles.textColor
1972
- }],
1973
- children: "Video playback not supported on mobile"
1974
- })
1975
- }) : isAudio && fileContent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1976
- style: styles.mediaContainer,
1977
- children: _reactNative.Platform.OS === 'web' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("audio", {
1978
- controls: true,
1979
- style: {
1980
- width: '100%',
1981
- borderRadius: 8
1982
- },
1983
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("source", {
1984
- src: fileContent,
1985
- type: openedFile.contentType
1986
- }), "Your browser does not support the audio tag."]
1987
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1988
- style: [styles.unsupportedText, {
1989
- color: themeStyles.textColor
1990
- }],
1991
- children: "Audio playback not supported on mobile"
1992
- })
1993
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1994
- style: styles.unsupportedFileContainer,
1995
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1996
- name: getFileIcon(openedFile.contentType),
1997
- size: 64,
1998
- color: themeStyles.isDarkTheme ? '#666666' : '#CCCCCC'
1999
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2000
- style: [styles.unsupportedFileTitle, {
2001
- color: themeStyles.textColor
2002
- }],
2003
- children: "Preview Not Available"
2004
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
2005
- style: [styles.unsupportedFileDescription, {
2006
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
2007
- }],
2008
- children: ["This file type cannot be previewed in the browser.", '\n', "Download the file to view its contents."]
2009
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
2010
- style: [styles.downloadButtonLarge, {
2011
- backgroundColor: themeStyles.primaryColor
2012
- }],
2013
- onPress: () => handleFileDownload(openedFile.id, openedFile.filename),
2014
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2015
- name: "download",
2016
- size: 20,
2017
- color: "#FFFFFF"
2018
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2019
- style: styles.downloadButtonText,
2020
- children: "Download File"
2021
- })]
2022
- })]
2023
- })
2024
- })]
2025
- });
2026
- };
2027
1682
  const renderEmptyState = () => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2028
- style: styles.emptyState,
1683
+ style: _styles.fileManagementStyles.emptyState,
2029
1684
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2030
1685
  name: "folder-open-outline",
2031
1686
  size: 64,
2032
1687
  color: themeStyles.isDarkTheme ? '#666666' : '#CCCCCC'
2033
1688
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2034
- style: [styles.emptyStateTitle, {
1689
+ style: [_styles.fileManagementStyles.emptyStateTitle, {
2035
1690
  color: themeStyles.textColor
2036
1691
  }],
2037
1692
  children: "No Files Yet"
2038
1693
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2039
- style: [styles.emptyStateDescription, {
1694
+ style: [_styles.fileManagementStyles.emptyStateDescription, {
2040
1695
  color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
2041
1696
  }],
2042
- children: user?.id === targetUserId ? `Upload files to get started. You can select multiple files at once${_reactNative.Platform.OS === 'web' ? ' or drag & drop them here.' : '.'}` : "This user hasn't uploaded any files yet"
1697
+ children: user?.id === targetUserId ? `Upload files to get started. You can select multiple files at once.` : "This user hasn't uploaded any files yet"
2043
1698
  }), user?.id === targetUserId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
2044
- style: [styles.emptyStateButton, {
1699
+ style: [_styles.fileManagementStyles.emptyStateButton, {
2045
1700
  backgroundColor: themeStyles.primaryColor
2046
1701
  }],
2047
1702
  onPress: handleFileUpload,
2048
- disabled: uploading,
1703
+ disabled: uploading || isPickingDocument,
2049
1704
  children: uploading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
2050
1705
  size: "small",
2051
1706
  color: "#FFFFFF"
1707
+ }) : isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
1708
+ size: "small",
1709
+ color: "#FFFFFF"
2052
1710
  }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
2053
1711
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2054
1712
  name: "cloud-upload",
2055
1713
  size: 20,
2056
1714
  color: "#FFFFFF"
2057
1715
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2058
- style: styles.emptyStateButtonText,
1716
+ style: _styles.fileManagementStyles.emptyStateButtonText,
2059
1717
  children: "Upload Files"
2060
1718
  })]
2061
1719
  })
@@ -2065,7 +1723,7 @@ const FileManagementScreen = ({
2065
1723
  // Professional Skeleton Loading Component with Advanced Shimmer Effect
2066
1724
  const SkeletonLoader = /*#__PURE__*/_react.default.memo(() => {
2067
1725
  const shimmerAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
2068
- const skeletonContainerWidth = containerWidth || 400;
1726
+ const skeletonContainerWidth = safeContainerWidth;
2069
1727
  (0, _react.useEffect)(() => {
2070
1728
  const shimmer = _reactNative.Animated.loop(_reactNative.Animated.timing(shimmerAnim, {
2071
1729
  toValue: 1,
@@ -2179,11 +1837,11 @@ const FileManagementScreen = ({
2179
1837
  })]
2180
1838
  });
2181
1839
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2182
- style: [styles.container, {
1840
+ style: [_styles.fileManagementStyles.container, {
2183
1841
  backgroundColor
2184
1842
  }],
2185
1843
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2186
- style: [styles.header, {
1844
+ style: [_styles.fileManagementStyles.header, {
2187
1845
  borderBottomColor: themeStyles.borderColor,
2188
1846
  borderBottomWidth: _reactNative.StyleSheet.hairlineWidth
2189
1847
  }],
@@ -2192,7 +1850,7 @@ const FileManagementScreen = ({
2192
1850
  height: 44,
2193
1851
  borderRadius: 12
2194
1852
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2195
- style: [styles.headerTitleContainer, {
1853
+ style: [_styles.fileManagementStyles.headerTitleContainer, {
2196
1854
  flex: 1
2197
1855
  }],
2198
1856
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
@@ -2211,7 +1869,7 @@ const FileManagementScreen = ({
2211
1869
  borderRadius: 12
2212
1870
  })]
2213
1871
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2214
- style: styles.controlsBar,
1872
+ style: _styles.fileManagementStyles.controlsBar,
2215
1873
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
2216
1874
  width: 100,
2217
1875
  height: 36,
@@ -2222,10 +1880,8 @@ const FileManagementScreen = ({
2222
1880
  borderRadius: 22
2223
1881
  })]
2224
1882
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
2225
- style: [styles.searchContainer, {
2226
- backgroundColor: themeStyles.isDarkTheme ? '#1A1A1A' : '#FFFFFF',
2227
- borderColor: themeStyles.borderColor,
2228
- borderWidth: _reactNative.StyleSheet.hairlineWidth
1883
+ style: [_styles.fileManagementStyles.searchContainer, {
1884
+ backgroundColor: themeStyles.colors.card
2229
1885
  }],
2230
1886
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
2231
1887
  width: "100%",
@@ -2233,13 +1889,11 @@ const FileManagementScreen = ({
2233
1889
  borderRadius: 12
2234
1890
  })
2235
1891
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
2236
- style: [styles.statsContainer, {
2237
- backgroundColor: themeStyles.isDarkTheme ? '#1A1A1A' : '#FFFFFF',
2238
- borderColor: themeStyles.borderColor,
2239
- borderWidth: _reactNative.StyleSheet.hairlineWidth
1892
+ style: [_styles.fileManagementStyles.statsContainer, {
1893
+ backgroundColor: themeStyles.colors.card
2240
1894
  }],
2241
1895
  children: [1, 2, 3].map(i => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2242
- style: styles.statItem,
1896
+ style: _styles.fileManagementStyles.statItem,
2243
1897
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonBox, {
2244
1898
  width: 50,
2245
1899
  height: 20,
@@ -2254,15 +1908,14 @@ const FileManagementScreen = ({
2254
1908
  })]
2255
1909
  }, i))
2256
1910
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
2257
- style: styles.scrollView,
2258
- contentContainerStyle: styles.scrollContainer,
1911
+ style: _styles.fileManagementStyles.scrollView,
1912
+ contentContainerStyle: _styles.fileManagementStyles.scrollContainer,
2259
1913
  showsVerticalScrollIndicator: false,
2260
1914
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
2261
1915
  style: {
2262
- backgroundColor: themeStyles.isDarkTheme ? '#121212' : '#FFFFFF',
2263
- borderRadius: 12,
1916
+ backgroundColor: themeStyles.colors.card,
1917
+ borderRadius: 18,
2264
1918
  overflow: 'hidden',
2265
- marginHorizontal: 16,
2266
1919
  marginTop: 8
2267
1920
  },
2268
1921
  children: [1, 2, 3, 4, 5, 6, 7, 8].map(i => /*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonFileItem, {
@@ -2279,12 +1932,54 @@ const FileManagementScreen = ({
2279
1932
  // If a file is opened, show the file viewer
2280
1933
  if (!selectMode && openedFile) {
2281
1934
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
2282
- children: [renderFileViewer(), renderFileDetailsModal()]
1935
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_FileViewer.FileViewer, {
1936
+ file: openedFile,
1937
+ fileContent: fileContent,
1938
+ loadingFileContent: loadingFileContent,
1939
+ showFileDetailsInViewer: showFileDetailsInViewer,
1940
+ onToggleDetails: () => setShowFileDetailsInViewer(!showFileDetailsInViewer),
1941
+ onClose: handleCloseFile,
1942
+ onDownload: handleFileDownload,
1943
+ onDelete: handleFileDelete,
1944
+ themeStyles: themeStyles,
1945
+ isOwner: user?.id === targetUserId
1946
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FileDetailsModal.FileDetailsModal, {
1947
+ visible: showFileDetails,
1948
+ file: selectedFile,
1949
+ onClose: () => setShowFileDetails(false),
1950
+ onDownload: handleFileDownload,
1951
+ onDelete: handleFileDelete,
1952
+ themeStyles: themeStyles,
1953
+ isOwner: user?.id === targetUserId
1954
+ })]
1955
+ });
1956
+ }
1957
+
1958
+ // If upload preview is showing, render it inline instead of the file list
1959
+ if (showUploadPreview) {
1960
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1961
+ style: _styles.fileManagementStyles.container,
1962
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.default, {
1963
+ title: "Review Files",
1964
+ subtitle: `${pendingFiles.length} file${pendingFiles.length !== 1 ? 's' : ''} ready to upload`,
1965
+ onBack: handleCancelUpload,
1966
+ showBackButton: true,
1967
+ variant: "minimal",
1968
+ elevation: "none",
1969
+ titleAlignment: "left"
1970
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_UploadPreview.UploadPreview, {
1971
+ visible: true,
1972
+ pendingFiles: pendingFiles,
1973
+ onConfirm: handleConfirmUpload,
1974
+ onCancel: handleCancelUpload,
1975
+ onRemoveFile: removePendingFile,
1976
+ themeStyles: themeStyles,
1977
+ inline: true
1978
+ })]
2283
1979
  });
2284
1980
  }
2285
1981
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2286
- ref: containerRef,
2287
- style: [styles.container, isDragging && _reactNative.Platform.OS === 'web' && styles.dragOverlay],
1982
+ style: _styles.fileManagementStyles.container,
2288
1983
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.default, {
2289
1984
  title: selectMode ? multiSelect ? `${selectedIds.size}${maxSelection ? '/' + maxSelection : ''} Selected` : 'Select a File' : viewMode === 'photos' ? 'Photos' : 'File Management',
2290
1985
  subtitle: selectMode ? multiSelect ? `${filteredFiles.length} available` : 'Tap to select' : `${filteredFiles.length} ${filteredFiles.length === 1 ? 'item' : 'items'}`,
@@ -2329,79 +2024,60 @@ const FileManagementScreen = ({
2329
2024
  icon: 'eye'
2330
2025
  }] : undefined,
2331
2026
  onBack: onClose || goBack,
2332
- theme: theme,
2333
2027
  showBackButton: true,
2334
2028
  variant: "minimal",
2335
2029
  elevation: "none",
2336
2030
  titleAlignment: "left"
2337
2031
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2338
- style: styles.controlsBar,
2032
+ style: _styles.fileManagementStyles.controlsBar,
2339
2033
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
2340
2034
  horizontal: true,
2341
2035
  showsHorizontalScrollIndicator: false,
2342
- style: styles.viewModeScroll,
2036
+ style: _styles.fileManagementStyles.viewModeScroll,
2343
2037
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2344
- style: [styles.viewModeToggle, {
2345
- backgroundColor: themeStyles.isDarkTheme ? '#181818' : '#FFFFFF',
2346
- borderWidth: 1,
2347
- borderColor: themeStyles.isDarkTheme ? '#2A2A2A' : '#E8E9EA'
2038
+ style: [_styles.fileManagementStyles.viewModeToggle, {
2039
+ backgroundColor: themeStyles.colors.card
2348
2040
  }],
2349
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
2350
- style: [styles.viewModeButton, viewMode === 'all' && {
2351
- backgroundColor: themeStyles.primaryColor
2352
- }],
2041
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedButton, {
2042
+ isSelected: viewMode === 'all',
2353
2043
  onPress: () => setViewMode('all'),
2354
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2355
- name: "folder",
2356
- size: 18,
2357
- color: viewMode === 'all' ? '#FFFFFF' : themeStyles.textColor
2358
- })
2359
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
2360
- style: [styles.viewModeButton, viewMode === 'photos' && {
2361
- backgroundColor: themeStyles.primaryColor
2362
- }],
2044
+ icon: viewMode === 'all' ? 'folder' : 'folder-outline',
2045
+ primaryColor: themeStyles.primaryColor,
2046
+ textColor: themeStyles.textColor,
2047
+ style: _styles.fileManagementStyles.viewModeButton
2048
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedButton, {
2049
+ isSelected: viewMode === 'photos',
2363
2050
  onPress: () => setViewMode('photos'),
2364
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2365
- name: "images",
2366
- size: 18,
2367
- color: viewMode === 'photos' ? '#FFFFFF' : themeStyles.textColor
2368
- })
2369
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
2370
- style: [styles.viewModeButton, viewMode === 'videos' && {
2371
- backgroundColor: themeStyles.primaryColor
2372
- }],
2051
+ icon: viewMode === 'photos' ? 'image-multiple' : 'image-multiple-outline',
2052
+ primaryColor: themeStyles.primaryColor,
2053
+ textColor: themeStyles.textColor,
2054
+ style: _styles.fileManagementStyles.viewModeButton
2055
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedButton, {
2056
+ isSelected: viewMode === 'videos',
2373
2057
  onPress: () => setViewMode('videos'),
2374
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2375
- name: "videocam",
2376
- size: 18,
2377
- color: viewMode === 'videos' ? '#FFFFFF' : themeStyles.textColor
2378
- })
2379
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
2380
- style: [styles.viewModeButton, viewMode === 'documents' && {
2381
- backgroundColor: themeStyles.primaryColor
2382
- }],
2058
+ icon: viewMode === 'videos' ? 'video' : 'video-outline',
2059
+ primaryColor: themeStyles.primaryColor,
2060
+ textColor: themeStyles.textColor,
2061
+ style: _styles.fileManagementStyles.viewModeButton
2062
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedButton, {
2063
+ isSelected: viewMode === 'documents',
2383
2064
  onPress: () => setViewMode('documents'),
2384
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2385
- name: "document-text",
2386
- size: 18,
2387
- color: viewMode === 'documents' ? '#FFFFFF' : themeStyles.textColor
2388
- })
2389
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
2390
- style: [styles.viewModeButton, viewMode === 'audio' && {
2391
- backgroundColor: themeStyles.primaryColor
2392
- }],
2065
+ icon: viewMode === 'documents' ? 'file-document' : 'file-document-outline',
2066
+ primaryColor: themeStyles.primaryColor,
2067
+ textColor: themeStyles.textColor,
2068
+ style: _styles.fileManagementStyles.viewModeButton
2069
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedButton, {
2070
+ isSelected: viewMode === 'audio',
2393
2071
  onPress: () => setViewMode('audio'),
2394
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2395
- name: "musical-notes",
2396
- size: 18,
2397
- color: viewMode === 'audio' ? '#FFFFFF' : themeStyles.textColor
2398
- })
2072
+ icon: viewMode === 'audio' ? 'music-note' : 'music-note-outline',
2073
+ primaryColor: themeStyles.primaryColor,
2074
+ textColor: themeStyles.textColor,
2075
+ style: _styles.fileManagementStyles.viewModeButton
2399
2076
  })]
2400
2077
  })
2401
2078
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
2402
- style: [styles.sortButton, {
2403
- backgroundColor: themeStyles.isDarkTheme ? '#181818' : '#FFFFFF',
2404
- borderColor: themeStyles.isDarkTheme ? '#2A2A2A' : '#E8E9EA'
2079
+ style: [_styles.fileManagementStyles.sortButton, {
2080
+ backgroundColor: themeStyles.colors.card
2405
2081
  }],
2406
2082
  onPress: () => {
2407
2083
  // Cycle through sort options: date -> size -> name -> type -> date
@@ -2414,33 +2090,33 @@ const FileManagementScreen = ({
2414
2090
  setSortOrder(prev => prev === 'asc' ? 'desc' : 'asc');
2415
2091
  }
2416
2092
  },
2417
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2418
- name: sortOrder === 'asc' ? 'arrow-up' : 'arrow-down',
2419
- size: 18,
2420
- color: themeStyles.textColor
2421
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2422
- name: sortBy === 'date' ? 'calendar' : sortBy === 'size' ? 'resize' : sortBy === 'name' ? 'text' : 'document',
2093
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
2094
+ name: sortBy === 'date' ? 'calendar' : sortBy === 'size' ? 'sort-numeric-variant' : sortBy === 'name' ? 'sort-alphabetical-variant' : 'file-document-outline',
2423
2095
  size: 16,
2424
- color: themeStyles.textColor,
2425
- style: {
2426
- marginLeft: 4
2427
- }
2096
+ color: themeStyles.textColor
2097
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
2098
+ name: sortOrder === 'asc' ? 'arrow-up' : 'arrow-down',
2099
+ size: 14,
2100
+ color: themeStyles.colors.secondaryText
2428
2101
  })]
2429
2102
  }), user?.id === targetUserId && (!selectMode || selectMode && allowUploadInSelectMode) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
2430
- style: [styles.uploadButton, {
2103
+ style: [_styles.fileManagementStyles.uploadButton, {
2431
2104
  backgroundColor: themeStyles.primaryColor
2432
2105
  }],
2433
2106
  onPress: handleFileUpload,
2434
- disabled: uploading,
2107
+ disabled: uploading || isPickingDocument,
2435
2108
  children: uploading ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2436
- style: styles.uploadProgress,
2109
+ style: _styles.fileManagementStyles.uploadProgress,
2437
2110
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
2438
2111
  size: "small",
2439
2112
  color: "#FFFFFF"
2440
2113
  }), uploadProgress && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
2441
- style: styles.uploadProgressText,
2114
+ style: _styles.fileManagementStyles.uploadProgressText,
2442
2115
  children: [uploadProgress.current, "/", uploadProgress.total]
2443
2116
  })]
2117
+ }) : isPickingDocument ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
2118
+ size: "small",
2119
+ color: "#FFFFFF"
2444
2120
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2445
2121
  name: "add",
2446
2122
  size: 22,
@@ -2448,80 +2124,78 @@ const FileManagementScreen = ({
2448
2124
  })
2449
2125
  })]
2450
2126
  }), files.length > 0 && (viewMode === 'all' || files.some(f => f.contentType.startsWith('image/'))) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2451
- style: [styles.searchContainer, {
2452
- backgroundColor: themeStyles.isDarkTheme ? '#1A1A1A' : '#FFFFFF',
2453
- borderColor: themeStyles.isDarkTheme ? '#3A3A3A' : '#E8E9EA'
2127
+ style: [_styles.fileManagementStyles.searchContainer, {
2128
+ backgroundColor: themeStyles.colors.card
2454
2129
  }],
2455
2130
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2456
2131
  name: "search",
2457
2132
  size: 22,
2458
- color: themeStyles.isDarkTheme ? '#888888' : '#666666'
2133
+ color: themeStyles.colors.icon
2459
2134
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
2460
- style: [styles.searchInput, {
2135
+ style: [_styles.fileManagementStyles.searchInput, {
2461
2136
  color: themeStyles.textColor
2462
2137
  }],
2463
2138
  placeholder: viewMode === 'photos' ? 'Search photos...' : 'Search files...',
2464
- placeholderTextColor: themeStyles.isDarkTheme ? '#888888' : '#999999',
2139
+ placeholderTextColor: themeStyles.colors.secondaryText,
2465
2140
  value: searchQuery,
2466
2141
  onChangeText: setSearchQuery
2467
2142
  }), searchQuery.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
2468
2143
  onPress: () => setSearchQuery(''),
2469
- style: styles.searchClearButton,
2144
+ style: _styles.fileManagementStyles.searchClearButton,
2470
2145
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2471
2146
  name: "close-circle",
2472
2147
  size: 22,
2473
- color: themeStyles.isDarkTheme ? '#888888' : '#666666'
2148
+ color: themeStyles.colors.icon
2474
2149
  })
2475
2150
  })]
2476
2151
  }), files.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2477
- style: [styles.statsContainer, {
2478
- backgroundColor: themeStyles.isDarkTheme ? '#1A1A1A' : '#FFFFFF',
2479
- borderColor: themeStyles.isDarkTheme ? '#3A3A3A' : '#E8E9EA'
2152
+ style: [_styles.fileManagementStyles.statsContainer, {
2153
+ backgroundColor: themeStyles.colors.card
2480
2154
  }],
2481
2155
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2482
- style: styles.statItem,
2156
+ style: _styles.fileManagementStyles.statItem,
2483
2157
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2484
- style: [styles.statValue, {
2158
+ style: [_styles.fileManagementStyles.statValue, {
2485
2159
  color: themeStyles.textColor
2486
2160
  }],
2487
2161
  children: filteredFiles.length
2488
2162
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2489
- style: [styles.statLabel, {
2490
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
2163
+ style: [_styles.fileManagementStyles.statLabel, {
2164
+ color: themeStyles.colors.secondaryText
2491
2165
  }],
2492
2166
  children: searchQuery.length > 0 ? 'Found' : filteredFiles.length === 1 ? viewMode === 'photos' ? 'Photo' : 'File' : viewMode === 'photos' ? 'Photos' : 'Files'
2493
2167
  })]
2494
2168
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2495
- style: styles.statItem,
2169
+ style: _styles.fileManagementStyles.statItem,
2496
2170
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2497
- style: [styles.statValue, {
2171
+ style: [_styles.fileManagementStyles.statValue, {
2498
2172
  color: themeStyles.textColor
2499
2173
  }],
2500
- children: formatFileSize(filteredFiles.reduce((total, file) => total + file.length, 0))
2174
+ children: (0, _fileManagement.formatFileSize)(filteredFiles.reduce((total, file) => total + file.length, 0))
2501
2175
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2502
- style: [styles.statLabel, {
2503
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
2176
+ style: [_styles.fileManagementStyles.statLabel, {
2177
+ color: themeStyles.colors.secondaryText
2504
2178
  }],
2505
2179
  children: searchQuery.length > 0 ? 'Size' : 'Total Size'
2506
2180
  })]
2507
2181
  }), searchQuery.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2508
- style: styles.statItem,
2182
+ style: _styles.fileManagementStyles.statItem,
2509
2183
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2510
- style: [styles.statValue, {
2184
+ style: [_styles.fileManagementStyles.statValue, {
2511
2185
  color: themeStyles.textColor
2512
2186
  }],
2513
2187
  children: files.length
2514
2188
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2515
- style: [styles.statLabel, {
2516
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
2189
+ style: [_styles.fileManagementStyles.statLabel, {
2190
+ color: themeStyles.colors.secondaryText
2517
2191
  }],
2518
2192
  children: "Total"
2519
2193
  })]
2520
2194
  })]
2521
2195
  }), viewMode === 'photos' ? renderPhotoGrid() : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
2522
2196
  ref: scrollViewRef,
2523
- style: styles.scrollView,
2524
- contentContainerStyle: styles.scrollContainer,
2197
+ style: _styles.fileManagementStyles.scrollView,
2198
+ contentContainerStyle: _styles.fileManagementStyles.scrollContainer,
2525
2199
  refreshControl: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.RefreshControl, {
2526
2200
  refreshing: refreshing,
2527
2201
  onRefresh: () => loadFiles('refresh'),
@@ -2542,23 +2216,23 @@ const FileManagementScreen = ({
2542
2216
  },
2543
2217
  scrollEventThrottle: 250,
2544
2218
  children: filteredFiles.length === 0 && searchQuery.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2545
- style: styles.emptyState,
2219
+ style: _styles.fileManagementStyles.emptyState,
2546
2220
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2547
2221
  name: "search",
2548
2222
  size: 64,
2549
2223
  color: themeStyles.isDarkTheme ? '#666666' : '#CCCCCC'
2550
2224
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2551
- style: [styles.emptyStateTitle, {
2225
+ style: [_styles.fileManagementStyles.emptyStateTitle, {
2552
2226
  color: themeStyles.textColor
2553
2227
  }],
2554
2228
  children: "No Results Found"
2555
2229
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
2556
- style: [styles.emptyStateDescription, {
2230
+ style: [_styles.fileManagementStyles.emptyStateDescription, {
2557
2231
  color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
2558
2232
  }],
2559
2233
  children: ["No files match your search for \"", searchQuery, "\""]
2560
2234
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
2561
- style: [styles.emptyStateButton, {
2235
+ style: [_styles.fileManagementStyles.emptyStateButton, {
2562
2236
  backgroundColor: themeStyles.primaryColor
2563
2237
  }],
2564
2238
  onPress: () => setSearchQuery(''),
@@ -2567,33 +2241,40 @@ const FileManagementScreen = ({
2567
2241
  size: 20,
2568
2242
  color: "#FFFFFF"
2569
2243
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2570
- style: styles.emptyStateButtonText,
2244
+ style: _styles.fileManagementStyles.emptyStateButtonText,
2571
2245
  children: "Clear Search"
2572
2246
  })]
2573
2247
  })]
2574
2248
  }) : filteredFiles.length === 0 ? renderEmptyState() : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
2575
2249
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
2576
- items: groupedFileItems,
2577
- theme: theme
2250
+ items: groupedFileItems
2578
2251
  }), paging.loadingMore && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2579
- style: styles.loadingMoreBar,
2252
+ style: _styles.fileManagementStyles.loadingMoreBar,
2580
2253
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
2581
2254
  size: "small",
2582
2255
  color: themeStyles.primaryColor
2583
2256
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2584
- style: [styles.loadingMoreText, {
2257
+ style: [_styles.fileManagementStyles.loadingMoreText, {
2585
2258
  color: themeStyles.textColor
2586
2259
  }],
2587
2260
  children: "Loading more..."
2588
2261
  })]
2589
2262
  })]
2590
2263
  })
2591
- }), !selectMode && renderFileDetailsModal(), !selectMode && uploading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
2592
- style: [styles.uploadBannerContainer, {
2264
+ }), !selectMode && /*#__PURE__*/(0, _jsxRuntime.jsx)(_FileDetailsModal.FileDetailsModal, {
2265
+ visible: showFileDetails,
2266
+ file: selectedFile,
2267
+ onClose: () => setShowFileDetails(false),
2268
+ onDownload: handleFileDownload,
2269
+ onDelete: handleFileDelete,
2270
+ themeStyles: themeStyles,
2271
+ isOwner: user?.id === targetUserId
2272
+ }), !selectMode && uploading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
2273
+ style: [_styles.fileManagementStyles.uploadBannerContainer, {
2593
2274
  pointerEvents: 'none'
2594
2275
  }],
2595
2276
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2596
- style: [styles.uploadBanner, {
2277
+ style: [_styles.fileManagementStyles.uploadBanner, {
2597
2278
  backgroundColor: themeStyles.isDarkTheme ? '#222831EE' : '#FFFFFFEE',
2598
2279
  borderColor: themeStyles.borderColor
2599
2280
  }],
@@ -2601,1008 +2282,33 @@ const FileManagementScreen = ({
2601
2282
  name: "cloud-upload",
2602
2283
  size: 18,
2603
2284
  color: themeStyles.primaryColor
2604
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
2605
- style: [styles.uploadBannerText, {
2606
- color: themeStyles.textColor
2607
- }],
2608
- children: ["Uploading", uploadProgress ? ` ${uploadProgress.current}/${uploadProgress.total}` : '...']
2609
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
2610
- style: styles.uploadBannerDots,
2611
- children: [0, 1, 2].map(i => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
2612
- style: [styles.dot, {
2613
- opacity: (Date.now() / 400 + i) % 3 < 1 ? 1 : 0.25
2614
- }]
2615
- }, i))
2616
- })]
2617
- })
2618
- }), isDragging && _reactNative.Platform.OS === 'web' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
2619
- style: styles.dragDropOverlay,
2620
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2621
- style: [styles.dragDropContent, {
2622
- backgroundColor: themeStyles.isDarkTheme ? 'rgba(30, 30, 30, 0.98)' : 'rgba(255, 255, 255, 0.98)',
2623
- borderColor: themeStyles.primaryColor
2624
- }],
2625
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
2626
- style: [styles.dragDropIconContainer, {
2627
- backgroundColor: `${themeStyles.primaryColor}15`
2628
- }],
2629
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
2630
- name: "cloud-upload",
2631
- size: 64,
2632
- color: themeStyles.primaryColor
2633
- })
2634
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2635
- style: [styles.dragDropTitle, {
2636
- color: themeStyles.primaryColor
2637
- }],
2638
- children: "Drop files to upload"
2639
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
2640
- style: [styles.dragDropSubtitle, {
2641
- color: themeStyles.isDarkTheme ? '#BBBBBB' : '#666666'
2642
- }],
2643
- children: "Release to upload multiple files"
2285
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
2286
+ style: _styles.fileManagementStyles.uploadBannerContent,
2287
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
2288
+ style: [_styles.fileManagementStyles.uploadBannerText, {
2289
+ color: themeStyles.textColor
2290
+ }],
2291
+ children: ["Uploading", uploadProgress ? ` ${uploadProgress.current}/${uploadProgress.total}` : '...']
2292
+ }), uploadProgress && uploadProgress.total > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
2293
+ style: [_styles.fileManagementStyles.uploadProgressBarContainer, {
2294
+ backgroundColor: themeStyles.isDarkTheme ? 'rgba(255,255,255,0.1)' : 'rgba(0,0,0,0.1)'
2295
+ }],
2296
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
2297
+ style: [_styles.fileManagementStyles.uploadProgressBar, {
2298
+ width: `${uploadProgress.current / uploadProgress.total * 100}%`,
2299
+ backgroundColor: themeStyles.primaryColor
2300
+ }]
2301
+ })
2302
+ })]
2303
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
2304
+ size: "small",
2305
+ color: themeStyles.primaryColor
2644
2306
  })]
2645
2307
  })
2646
2308
  })]
2647
2309
  });
2648
2310
  };
2649
- const styles = _reactNative.StyleSheet.create({
2650
- container: {
2651
- flex: 1
2652
- },
2653
- selectionBadge: {
2654
- position: 'absolute',
2655
- top: 4,
2656
- right: 4,
2657
- backgroundColor: 'rgba(0,0,0,0.4)',
2658
- borderRadius: 12,
2659
- padding: 2
2660
- },
2661
- selectionBar: {
2662
- position: 'absolute',
2663
- left: 0,
2664
- right: 0,
2665
- bottom: 0,
2666
- flexDirection: 'row',
2667
- justifyContent: 'space-between',
2668
- padding: 12,
2669
- backgroundColor: 'rgba(0,0,0,0.55)',
2670
- gap: 12
2671
- },
2672
- selectionBarButton: {
2673
- flex: 1,
2674
- paddingVertical: 14,
2675
- borderRadius: 10,
2676
- alignItems: 'center',
2677
- justifyContent: 'center'
2678
- },
2679
- selectionBarButtonText: {
2680
- color: '#FFFFFF',
2681
- fontSize: 15,
2682
- fontWeight: '600'
2683
- },
2684
- loadingMoreBar: {
2685
- flexDirection: 'row',
2686
- alignItems: 'center',
2687
- justifyContent: 'center',
2688
- paddingVertical: 12,
2689
- gap: 8
2690
- },
2691
- loadingMoreText: {
2692
- fontSize: 13,
2693
- fontWeight: '500'
2694
- },
2695
- dragOverlay: {
2696
- backgroundColor: 'rgba(0, 122, 255, 0.06)',
2697
- borderWidth: 1,
2698
- borderColor: '#66AFFF',
2699
- borderStyle: 'dashed'
2700
- },
2701
- centerContent: {
2702
- justifyContent: 'center',
2703
- alignItems: 'center'
2704
- },
2705
- header: {
2706
- flexDirection: 'row',
2707
- alignItems: 'center',
2708
- justifyContent: 'space-between',
2709
- paddingHorizontal: 16,
2710
- paddingVertical: 12,
2711
- borderBottomWidth: 1,
2712
- position: 'relative'
2713
- },
2714
- backButton: {
2715
- padding: 12,
2716
- borderRadius: 12,
2717
- alignItems: 'center',
2718
- justifyContent: 'center',
2719
- minWidth: 44,
2720
- minHeight: 44
2721
- },
2722
- headerTitleContainer: {
2723
- flex: 1,
2724
- alignItems: 'center',
2725
- justifyContent: 'center',
2726
- marginHorizontal: 16
2727
- },
2728
- headerTitle: {
2729
- fontSize: 22,
2730
- fontWeight: '700',
2731
- fontFamily: _fonts.fontFamilies.phuduBold,
2732
- letterSpacing: -0.5,
2733
- lineHeight: 28
2734
- },
2735
- headerSubtitle: {
2736
- fontSize: 13,
2737
- fontWeight: '500',
2738
- fontFamily: _fonts.fontFamilies.phuduMedium,
2739
- marginTop: 2,
2740
- letterSpacing: 0.2
2741
- },
2742
- uploadButton: {
2743
- width: 44,
2744
- height: 44,
2745
- borderRadius: 22,
2746
- alignItems: 'center',
2747
- justifyContent: 'center'
2748
- },
2749
- uploadProgress: {
2750
- alignItems: 'center',
2751
- justifyContent: 'center'
2752
- },
2753
- uploadProgressText: {
2754
- color: '#FFFFFF',
2755
- fontSize: 10,
2756
- fontWeight: '600',
2757
- marginTop: 2
2758
- },
2759
- uploadBannerContainer: {
2760
- position: 'absolute',
2761
- top: 72,
2762
- // below header
2763
- left: 0,
2764
- right: 0,
2765
- alignItems: 'center',
2766
- zIndex: 50
2767
- },
2768
- uploadBanner: {
2769
- flexDirection: 'row',
2770
- alignItems: 'center',
2771
- paddingHorizontal: 14,
2772
- paddingVertical: 8,
2773
- borderRadius: 24,
2774
- gap: 8,
2775
- borderWidth: 1,
2776
- shadowColor: '#000',
2777
- shadowOpacity: 0.1,
2778
- shadowRadius: 6,
2779
- shadowOffset: {
2780
- width: 0,
2781
- height: 2
2782
- },
2783
- elevation: 2
2784
- },
2785
- uploadBannerText: {
2786
- fontSize: 13,
2787
- fontWeight: '500'
2788
- },
2789
- uploadBannerDots: {
2790
- flexDirection: 'row',
2791
- gap: 4,
2792
- marginLeft: 2
2793
- },
2794
- dot: {
2795
- width: 6,
2796
- height: 6,
2797
- borderRadius: 3,
2798
- backgroundColor: '#007AFF'
2799
- },
2800
- searchContainer: {
2801
- flexDirection: 'row',
2802
- alignItems: 'center',
2803
- paddingHorizontal: 14,
2804
- paddingVertical: 10,
2805
- marginHorizontal: 16,
2806
- marginTop: 12,
2807
- borderRadius: 10,
2808
- borderWidth: 1,
2809
- gap: 10
2810
- },
2811
- searchInput: {
2812
- flex: 1,
2813
- fontSize: 16,
2814
- fontFamily: _fonts.fontFamilies.phudu,
2815
- lineHeight: 20
2816
- },
2817
- searchClearButton: {
2818
- padding: 4,
2819
- borderRadius: 12,
2820
- alignItems: 'center',
2821
- justifyContent: 'center'
2822
- },
2823
- searchIcon: {
2824
- marginRight: 8
2825
- },
2826
- statsContainer: {
2827
- flexDirection: 'row',
2828
- paddingHorizontal: 14,
2829
- paddingVertical: 10,
2830
- marginHorizontal: 16,
2831
- marginTop: 12,
2832
- borderRadius: 10,
2833
- borderWidth: 1
2834
- },
2835
- statItem: {
2836
- flex: 1,
2837
- alignItems: 'center',
2838
- paddingVertical: 4
2839
- },
2840
- statValue: {
2841
- fontSize: 20,
2842
- fontWeight: '800',
2843
- fontFamily: _fonts.fontFamilies.phuduBold,
2844
- letterSpacing: -0.5,
2845
- lineHeight: 24
2846
- },
2847
- statLabel: {
2848
- fontSize: 12,
2849
- fontWeight: '500',
2850
- fontFamily: _fonts.fontFamilies.phuduMedium,
2851
- marginTop: 2,
2852
- letterSpacing: 0.2
2853
- },
2854
- scrollView: {
2855
- flex: 1,
2856
- backgroundColor: '#e5f1ff'
2857
- },
2858
- scrollContainer: {
2859
- padding: 12
2860
- },
2861
- fileItem: {
2862
- flexDirection: 'row',
2863
- alignItems: 'center',
2864
- padding: 10,
2865
- marginBottom: 8,
2866
- borderRadius: 10,
2867
- borderWidth: 1
2868
- },
2869
- fileContent: {
2870
- flexDirection: 'row',
2871
- alignItems: 'center',
2872
- flex: 1
2873
- },
2874
- fileIconContainer: {
2875
- width: 50,
2876
- height: 50,
2877
- alignItems: 'center',
2878
- justifyContent: 'center',
2879
- marginRight: 12
2880
- },
2881
- filePreviewContainer: {
2882
- width: 52,
2883
- height: 52,
2884
- marginRight: 10
2885
- },
2886
- filePreview: {
2887
- width: '100%',
2888
- height: '100%',
2889
- borderRadius: 8,
2890
- backgroundColor: 'transparent',
2891
- alignItems: 'center',
2892
- justifyContent: 'center',
2893
- overflow: 'hidden',
2894
- position: 'relative'
2895
- },
2896
- previewImage: {
2897
- width: '100%',
2898
- height: '100%',
2899
- borderRadius: 8
2900
- },
2901
- pdfPreview: {
2902
- alignItems: 'center',
2903
- justifyContent: 'center',
2904
- width: '100%',
2905
- height: '100%',
2906
- backgroundColor: '#FF6B6B20'
2907
- },
2908
- pdfLabel: {
2909
- fontSize: 8,
2910
- fontWeight: 'bold',
2911
- marginTop: 2
2912
- },
2913
- videoPreview: {
2914
- alignItems: 'center',
2915
- justifyContent: 'center',
2916
- width: '100%',
2917
- height: '100%',
2918
- backgroundColor: '#4ECDC420'
2919
- },
2920
- videoLabel: {
2921
- fontSize: 8,
2922
- fontWeight: 'bold',
2923
- marginTop: 2
2924
- },
2925
- fallbackIcon: {
2926
- position: 'absolute',
2927
- top: 0,
2928
- left: 0,
2929
- right: 0,
2930
- bottom: 0,
2931
- alignItems: 'center',
2932
- justifyContent: 'center',
2933
- backgroundColor: 'transparent',
2934
- borderRadius: 8
2935
- },
2936
- previewOverlay: {
2937
- position: 'absolute',
2938
- top: 0,
2939
- left: 0,
2940
- right: 0,
2941
- bottom: 0,
2942
- backgroundColor: 'rgba(0, 0, 0, 0.25)',
2943
- alignItems: 'center',
2944
- justifyContent: 'center',
2945
- borderRadius: 8
2946
- },
2947
- groupedActions: {
2948
- flexDirection: 'row',
2949
- alignItems: 'center',
2950
- gap: 6,
2951
- marginLeft: 12
2952
- },
2953
- groupedActionBtn: {
2954
- width: 34,
2955
- height: 34,
2956
- borderRadius: 8,
2957
- alignItems: 'center',
2958
- justifyContent: 'center'
2959
- },
2960
- groupedDescription: {
2961
- fontSize: 12,
2962
- lineHeight: 16,
2963
- marginTop: 6
2964
- },
2965
- videoPreviewWrapper: {
2966
- width: '100%',
2967
- height: '100%',
2968
- borderRadius: 8,
2969
- overflow: 'hidden',
2970
- backgroundColor: '#000000',
2971
- alignItems: 'center',
2972
- justifyContent: 'center'
2973
- },
2974
- videoPosterImage: {
2975
- position: 'absolute',
2976
- top: 0,
2977
- left: 0,
2978
- right: 0,
2979
- bottom: 0,
2980
- width: '100%',
2981
- height: '100%'
2982
- },
2983
- videoOverlay: {
2984
- position: 'absolute',
2985
- top: 0,
2986
- left: 0,
2987
- right: 0,
2988
- bottom: 0,
2989
- alignItems: 'center',
2990
- justifyContent: 'center',
2991
- backgroundColor: 'rgba(0,0,0,0.25)'
2992
- },
2993
- fileInfo: {
2994
- flex: 1
2995
- },
2996
- fileName: {
2997
- fontSize: 16,
2998
- fontWeight: '600',
2999
- marginBottom: 4
3000
- },
3001
- fileDetails: {
3002
- fontSize: 14,
3003
- marginBottom: 2
3004
- },
3005
- fileDescription: {
3006
- fontSize: 12,
3007
- fontStyle: 'italic'
3008
- },
3009
- fileActions: {
3010
- flexDirection: 'row',
3011
- gap: 8
3012
- },
3013
- actionButton: {
3014
- width: 36,
3015
- height: 36,
3016
- borderRadius: 18,
3017
- alignItems: 'center',
3018
- justifyContent: 'center',
3019
- borderWidth: 1,
3020
- borderColor: '#E0E0E0',
3021
- backgroundColor: 'transparent'
3022
- },
3023
- emptyState: {
3024
- alignItems: 'center',
3025
- paddingVertical: 40,
3026
- paddingHorizontal: 24
3027
- },
3028
- emptyStateTitle: {
3029
- fontSize: 24,
3030
- fontWeight: 'bold',
3031
- fontFamily: _fonts.fontFamilies.phuduBold,
3032
- marginTop: 16,
3033
- marginBottom: 8
3034
- },
3035
- emptyStateDescription: {
3036
- fontSize: 16,
3037
- textAlign: 'center',
3038
- lineHeight: 24,
3039
- marginBottom: 32
3040
- },
3041
- emptyStateButton: {
3042
- flexDirection: 'row',
3043
- alignItems: 'center',
3044
- paddingHorizontal: 24,
3045
- paddingVertical: 12,
3046
- borderRadius: 24,
3047
- gap: 8
3048
- },
3049
- emptyStateButtonText: {
3050
- color: '#FFFFFF',
3051
- fontSize: 16,
3052
- fontWeight: '600'
3053
- },
3054
- loadingText: {
3055
- fontSize: 16,
3056
- marginTop: 16
3057
- },
3058
- // Modal styles
3059
- modalContainer: {
3060
- flex: 1
3061
- },
3062
- modalHeader: {
3063
- flexDirection: 'row',
3064
- alignItems: 'center',
3065
- justifyContent: 'space-between',
3066
- paddingHorizontal: 16,
3067
- paddingVertical: 12,
3068
- borderBottomWidth: 1
3069
- },
3070
- modalCloseButton: {
3071
- padding: 8
3072
- },
3073
- modalTitle: {
3074
- fontSize: 18,
3075
- fontWeight: '600',
3076
- fontFamily: _fonts.fontFamilies.phuduSemiBold
3077
- },
3078
- modalPlaceholder: {
3079
- width: 40
3080
- },
3081
- modalContent: {
3082
- flex: 1,
3083
- padding: 16
3084
- },
3085
- fileDetailCard: {
3086
- padding: 18,
3087
- borderRadius: 14,
3088
- borderWidth: 1,
3089
- alignItems: 'center'
3090
- },
3091
- fileDetailIcon: {
3092
- marginBottom: 16
3093
- },
3094
- fileDetailName: {
3095
- fontSize: 20,
3096
- fontWeight: 'bold',
3097
- fontFamily: _fonts.fontFamilies.phuduBold,
3098
- textAlign: 'center',
3099
- marginBottom: 24
3100
- },
3101
- fileDetailInfo: {
3102
- width: '100%',
3103
- marginBottom: 32
3104
- },
3105
- detailRow: {
3106
- flexDirection: 'row',
3107
- justifyContent: 'space-between',
3108
- alignItems: 'flex-start',
3109
- marginBottom: 12,
3110
- flexWrap: 'wrap'
3111
- },
3112
- detailLabel: {
3113
- fontSize: 16,
3114
- fontWeight: '500',
3115
- flex: 1,
3116
- minWidth: 100
3117
- },
3118
- detailValue: {
3119
- fontSize: 16,
3120
- flex: 2,
3121
- textAlign: 'right'
3122
- },
3123
- modalActions: {
3124
- flexDirection: 'row',
3125
- gap: 12,
3126
- width: '100%'
3127
- },
3128
- modalActionButton: {
3129
- flex: 1,
3130
- flexDirection: 'row',
3131
- alignItems: 'center',
3132
- justifyContent: 'center',
3133
- paddingVertical: 16,
3134
- borderRadius: 12,
3135
- gap: 8
3136
- },
3137
- modalActionText: {
3138
- color: '#FFFFFF',
3139
- fontSize: 16,
3140
- fontWeight: '600'
3141
- },
3142
- // Drag and Drop styles - Enhanced
3143
- dragDropOverlay: {
3144
- position: 'absolute',
3145
- top: 0,
3146
- left: 0,
3147
- right: 0,
3148
- bottom: 0,
3149
- backgroundColor: 'rgba(0, 0, 0, 0.6)',
3150
- justifyContent: 'center',
3151
- alignItems: 'center',
3152
- zIndex: 1000
3153
- },
3154
- dragDropContent: {
3155
- alignItems: 'center',
3156
- padding: 32,
3157
- borderRadius: 20,
3158
- borderWidth: 3,
3159
- borderStyle: 'dashed',
3160
- minWidth: 280,
3161
- shadowColor: '#000',
3162
- shadowOpacity: 0.3,
3163
- shadowRadius: 20,
3164
- shadowOffset: {
3165
- width: 0,
3166
- height: 10
3167
- },
3168
- elevation: 10
3169
- },
3170
- dragDropIconContainer: {
3171
- padding: 24,
3172
- borderRadius: 50,
3173
- marginBottom: 16
3174
- },
3175
- dragDropTitle: {
3176
- fontSize: 24,
3177
- fontWeight: '700',
3178
- fontFamily: _fonts.fontFamilies.phuduBold,
3179
- marginBottom: 8
3180
- },
3181
- dragDropSubtitle: {
3182
- fontSize: 16,
3183
- fontWeight: '500',
3184
- fontFamily: _fonts.fontFamilies.phuduMedium
3185
- },
3186
- // Upload Preview Modal styles
3187
- uploadPreviewContainer: {
3188
- flex: 1
3189
- },
3190
- uploadPreviewHeader: {
3191
- flexDirection: 'row',
3192
- alignItems: 'center',
3193
- justifyContent: 'space-between',
3194
- paddingHorizontal: 16,
3195
- paddingVertical: 16,
3196
- borderBottomWidth: 1
3197
- },
3198
- uploadPreviewTitle: {
3199
- fontSize: 20,
3200
- fontWeight: '700',
3201
- fontFamily: _fonts.fontFamilies.phuduBold
3202
- },
3203
- uploadPreviewList: {
3204
- flex: 1,
3205
- padding: 16
3206
- },
3207
- uploadPreviewItem: {
3208
- flexDirection: 'row',
3209
- alignItems: 'center',
3210
- padding: 12,
3211
- borderRadius: 12,
3212
- borderWidth: 1,
3213
- marginBottom: 12,
3214
- gap: 12
3215
- },
3216
- uploadPreviewThumbnail: {
3217
- width: 60,
3218
- height: 60,
3219
- borderRadius: 8
3220
- },
3221
- uploadPreviewIconContainer: {
3222
- width: 60,
3223
- height: 60,
3224
- borderRadius: 8,
3225
- alignItems: 'center',
3226
- justifyContent: 'center'
3227
- },
3228
- uploadPreviewInfo: {
3229
- flex: 1,
3230
- minWidth: 0
3231
- },
3232
- uploadPreviewName: {
3233
- fontSize: 16,
3234
- fontWeight: '600',
3235
- fontFamily: _fonts.fontFamilies.phuduSemiBold,
3236
- marginBottom: 4
3237
- },
3238
- uploadPreviewMeta: {
3239
- fontSize: 13,
3240
- fontFamily: _fonts.fontFamilies.phudu
3241
- },
3242
- uploadPreviewRemove: {
3243
- padding: 4
3244
- },
3245
- uploadPreviewFooter: {
3246
- padding: 16,
3247
- borderTopWidth: 1
3248
- },
3249
- uploadPreviewStats: {
3250
- flexDirection: 'row',
3251
- justifyContent: 'space-between',
3252
- marginBottom: 16
3253
- },
3254
- uploadPreviewStatsText: {
3255
- fontSize: 15,
3256
- fontWeight: '600',
3257
- fontFamily: _fonts.fontFamilies.phuduSemiBold
3258
- },
3259
- uploadPreviewActions: {
3260
- flexDirection: 'row',
3261
- gap: 12
3262
- },
3263
- uploadPreviewCancelButton: {
3264
- flex: 1,
3265
- paddingVertical: 14,
3266
- borderRadius: 12,
3267
- borderWidth: 1,
3268
- alignItems: 'center',
3269
- justifyContent: 'center'
3270
- },
3271
- uploadPreviewCancelText: {
3272
- fontSize: 16,
3273
- fontWeight: '600',
3274
- fontFamily: _fonts.fontFamilies.phuduSemiBold
3275
- },
3276
- uploadPreviewConfirmButton: {
3277
- flex: 2,
3278
- flexDirection: 'row',
3279
- alignItems: 'center',
3280
- justifyContent: 'center',
3281
- paddingVertical: 14,
3282
- borderRadius: 12,
3283
- gap: 8
3284
- },
3285
- uploadPreviewConfirmText: {
3286
- color: '#FFFFFF',
3287
- fontSize: 16,
3288
- fontWeight: '600',
3289
- fontFamily: _fonts.fontFamilies.phuduSemiBold
3290
- },
3291
- // File Viewer styles
3292
- fileViewerContainer: {
3293
- flex: 1
3294
- },
3295
- fileViewerHeader: {
3296
- flexDirection: 'row',
3297
- alignItems: 'center',
3298
- paddingHorizontal: 16,
3299
- paddingVertical: 12,
3300
- borderBottomWidth: 1
3301
- },
3302
- fileViewerTitleContainer: {
3303
- flex: 1,
3304
- marginHorizontal: 16
3305
- },
3306
- fileViewerTitle: {
3307
- fontSize: 18,
3308
- fontWeight: '600',
3309
- fontFamily: _fonts.fontFamilies.phuduSemiBold,
3310
- marginBottom: 2
3311
- },
3312
- fileViewerSubtitle: {
3313
- fontSize: 14
3314
- },
3315
- fileViewerActions: {
3316
- flexDirection: 'row',
3317
- gap: 8
3318
- },
3319
- fileViewerContent: {
3320
- flex: 1
3321
- },
3322
- fileViewerContentWithDetails: {
3323
- paddingBottom: 20
3324
- },
3325
- fileViewerContentContainer: {
3326
- flexGrow: 1,
3327
- padding: 14
3328
- },
3329
- fileViewerLoading: {
3330
- flex: 1,
3331
- justifyContent: 'center',
3332
- alignItems: 'center'
3333
- },
3334
- fileViewerLoadingText: {
3335
- fontSize: 16,
3336
- marginTop: 16
3337
- },
3338
- imageContainer: {
3339
- alignItems: 'center',
3340
- justifyContent: 'center',
3341
- flex: 1
3342
- },
3343
- textContainer: {
3344
- flex: 1,
3345
- borderRadius: 10,
3346
- borderWidth: 1,
3347
- padding: 12,
3348
- minHeight: 180,
3349
- maxHeight: '80%'
3350
- },
3351
- textContent: {
3352
- fontSize: 14,
3353
- fontFamily: _reactNative.Platform.OS === 'web' ? 'monospace' : 'Courier',
3354
- lineHeight: 20
3355
- },
3356
- unsupportedFileContainer: {
3357
- flex: 1,
3358
- justifyContent: 'center',
3359
- alignItems: 'center',
3360
- paddingVertical: 40,
3361
- paddingHorizontal: 24
3362
- },
3363
- unsupportedFileTitle: {
3364
- fontSize: 24,
3365
- fontWeight: 'bold',
3366
- fontFamily: _fonts.fontFamilies.phuduBold,
3367
- marginTop: 16,
3368
- marginBottom: 8,
3369
- textAlign: 'center'
3370
- },
3371
- unsupportedFileDescription: {
3372
- fontSize: 16,
3373
- textAlign: 'center',
3374
- lineHeight: 24,
3375
- marginBottom: 32
3376
- },
3377
- downloadButtonLarge: {
3378
- flexDirection: 'row',
3379
- alignItems: 'center',
3380
- paddingHorizontal: 18,
3381
- paddingVertical: 12,
3382
- borderRadius: 20,
3383
- gap: 8
3384
- },
3385
- downloadButtonText: {
3386
- color: '#FFFFFF',
3387
- fontSize: 16,
3388
- fontWeight: '600'
3389
- },
3390
- pdfContainer: {
3391
- flex: 1,
3392
- alignItems: 'center',
3393
- justifyContent: 'center'
3394
- },
3395
- mediaContainer: {
3396
- flex: 1,
3397
- alignItems: 'center',
3398
- justifyContent: 'center',
3399
- padding: 20
3400
- },
3401
- unsupportedText: {
3402
- fontSize: 16,
3403
- textAlign: 'center',
3404
- fontStyle: 'italic'
3405
- },
3406
- // File Details in Viewer styles
3407
- fileDetailsSection: {
3408
- margin: 12,
3409
- marginTop: 0,
3410
- padding: 14,
3411
- borderRadius: 10,
3412
- borderWidth: 1
3413
- },
3414
- fileDetailsSectionTitle: {
3415
- fontSize: 18,
3416
- fontWeight: '600',
3417
- fontFamily: _fonts.fontFamilies.phuduSemiBold,
3418
- flex: 1
3419
- },
3420
- fileDetailsSectionHeader: {
3421
- flexDirection: 'row',
3422
- alignItems: 'center',
3423
- justifyContent: 'space-between',
3424
- marginBottom: 16
3425
- },
3426
- fileDetailsSectionToggle: {
3427
- padding: 4
3428
- },
3429
- fileDetailsActions: {
3430
- flexDirection: 'row',
3431
- gap: 12,
3432
- marginTop: 16
3433
- },
3434
- fileDetailsActionButton: {
3435
- flex: 1,
3436
- flexDirection: 'row',
3437
- alignItems: 'center',
3438
- justifyContent: 'center',
3439
- paddingVertical: 12,
3440
- borderRadius: 8,
3441
- gap: 6
3442
- },
3443
- fileDetailsActionText: {
3444
- color: '#FFFFFF',
3445
- fontSize: 14,
3446
- fontWeight: '600'
3447
- },
3448
- // Header styles
3449
- headerActions: {
3450
- flexDirection: 'row',
3451
- alignItems: 'center',
3452
- gap: 16
3453
- },
3454
- controlsBar: {
3455
- flexDirection: 'row',
3456
- alignItems: 'center',
3457
- justifyContent: 'space-between',
3458
- paddingHorizontal: 16,
3459
- paddingTop: 8,
3460
- paddingBottom: 4,
3461
- gap: 12
3462
- },
3463
- viewModeScroll: {
3464
- flex: 1,
3465
- maxWidth: '80%'
3466
- },
3467
- viewModeToggle: {
3468
- flexDirection: 'row',
3469
- borderRadius: 24,
3470
- padding: 3,
3471
- overflow: 'hidden'
3472
- },
3473
- viewModeButton: {
3474
- paddingHorizontal: 14,
3475
- paddingVertical: 10,
3476
- borderRadius: 20,
3477
- minWidth: 44,
3478
- alignItems: 'center',
3479
- justifyContent: 'center',
3480
- marginHorizontal: 1
3481
- },
3482
- sortButton: {
3483
- flexDirection: 'row',
3484
- alignItems: 'center',
3485
- justifyContent: 'center',
3486
- paddingHorizontal: 12,
3487
- paddingVertical: 10,
3488
- borderRadius: 20,
3489
- borderWidth: 1,
3490
- minWidth: 44
3491
- },
3492
- // Photo Grid styles
3493
- photoScrollContainer: {
3494
- padding: 10
3495
- },
3496
- photoDateSection: {
3497
- marginBottom: 16
3498
- },
3499
- photoDateHeader: {
3500
- fontSize: 16,
3501
- fontWeight: '600',
3502
- fontFamily: _fonts.fontFamilies.phuduSemiBold,
3503
- marginBottom: 8,
3504
- paddingHorizontal: 2
3505
- },
3506
- photoGrid: {
3507
- flexDirection: 'row',
3508
- flexWrap: 'wrap',
3509
- gap: 4,
3510
- justifyContent: 'flex-start'
3511
- },
3512
- photoItem: {
3513
- borderRadius: 8,
3514
- overflow: 'hidden'
3515
- },
3516
- photoContainer: {
3517
- width: '100%',
3518
- height: '100%',
3519
- position: 'relative',
3520
- borderRadius: 8,
3521
- overflow: 'hidden'
3522
- },
3523
- photoImage: {
3524
- width: '100%',
3525
- height: '100%'
3526
- },
3527
- // Justified Grid styles
3528
- dimensionsLoadingIndicator: {
3529
- flexDirection: 'row',
3530
- alignItems: 'center',
3531
- justifyContent: 'center',
3532
- paddingVertical: 16,
3533
- gap: 8
3534
- },
3535
- dimensionsLoadingText: {
3536
- fontSize: 14,
3537
- fontStyle: 'italic'
3538
- },
3539
- justifiedPhotoGrid: {
3540
- gap: 4
3541
- },
3542
- justifiedPhotoRow: {
3543
- flexDirection: 'row'
3544
- },
3545
- justifiedPhotoItem: {
3546
- borderRadius: 6,
3547
- overflow: 'hidden',
3548
- position: 'relative'
3549
- },
3550
- justifiedPhotoContainer: {
3551
- width: '100%',
3552
- height: '100%',
3553
- position: 'relative',
3554
- borderRadius: 6,
3555
- overflow: 'hidden',
3556
- backgroundColor: 'transparent'
3557
- },
3558
- justifiedPhotoImage: {
3559
- width: '100%',
3560
- height: '100%',
3561
- borderRadius: 6
3562
- },
3563
- // Simple Photo Grid styles
3564
- simplePhotoItem: {
3565
- borderRadius: 8,
3566
- overflow: 'hidden',
3567
- backgroundColor: 'transparent'
3568
- },
3569
- simplePhotoContainer: {
3570
- width: '100%',
3571
- height: '100%',
3572
- position: 'relative',
3573
- borderRadius: 8,
3574
- overflow: 'hidden'
3575
- },
3576
- simplePhotoImage: {
3577
- width: '100%',
3578
- height: '100%',
3579
- borderRadius: 8
3580
- },
3581
- // Loading skeleton styles
3582
- photoSkeletonGrid: {
3583
- flexDirection: 'row',
3584
- flexWrap: 'wrap',
3585
- gap: 4,
3586
- marginTop: 20
3587
- },
3588
- photoSkeletonItem: {
3589
- width: '32%',
3590
- aspectRatio: 1,
3591
- borderRadius: 8,
3592
- marginBottom: 4
3593
- },
3594
- skeletonFileItem: {
3595
- flexDirection: 'row',
3596
- alignItems: 'center',
3597
- paddingHorizontal: 16,
3598
- paddingVertical: 12,
3599
- borderBottomWidth: 1,
3600
- gap: 12
3601
- },
3602
- skeletonFileInfo: {
3603
- flex: 1,
3604
- justifyContent: 'center'
3605
- }
3606
- });
2311
+
2312
+ // Styles have been moved to components/fileManagement/styles.ts
3607
2313
  var _default = exports.default = FileManagementScreen;
3608
2314
  //# sourceMappingURL=FileManagementScreen.js.map