@oxyhq/services 26.0.1 → 26.0.4
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.
- package/README.md +2 -2
- package/android/src/main/java/so/oxy/identity/OxyIdentityStore.kt +21 -127
- package/android/src/main/java/so/oxy/session/OxyBackgroundSession.kt +184 -0
- package/android/src/main/java/so/oxy/session/OxyBackgroundSessionApi.kt +162 -0
- package/android/src/main/java/so/oxy/session/OxyBackgroundSessionModule.kt +116 -0
- package/android/src/main/java/so/oxy/session/OxyBackgroundSessionStore.kt +179 -0
- package/android/src/main/java/so/oxy/session/OxyBackgroundToken.kt +61 -0
- package/android/src/main/java/so/oxy/storage/OxyEncryptedPrefs.kt +241 -0
- package/expo-module.config.json +4 -1
- package/lib/commonjs/index.js +18 -49
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/deviceNotifications.js +63 -0
- package/lib/commonjs/notifications/deviceNotifications.js.map +1 -1
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +20 -64
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/commonjs/ui/components/AvatarCameraBadge.js +2 -2
- package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +4 -4
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +13 -1
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +29 -24
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +8 -7
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +20 -26
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +68 -58
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/types.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js +2 -2
- package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +2 -2
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +3 -1
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
- package/lib/commonjs/ui/components/logo/LogoText.js +4 -4
- package/lib/commonjs/ui/components/logo/LogoText.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +2 -2
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +2 -2
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/components/styles/shadow.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +32 -46
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/commitSessionFlow.js +3 -43
- package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +15 -2
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/context/useOxyAccountGraph.js +3 -4
- package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +5 -5
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +11 -11
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +9 -9
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +3 -2
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/userCache.js +17 -17
- package/lib/commonjs/ui/hooks/queries/userCache.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAsyncAction.js +7 -7
- package/lib/commonjs/ui/hooks/useAsyncAction.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +8 -4
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +5 -5
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/hooks/useOnlineStatus.js +3 -2
- package/lib/commonjs/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +0 -2
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSettingToggle.js +4 -4
- package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js +68 -11
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -1
- package/lib/commonjs/ui/navigation/accountDialogManager.js +2 -0
- package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/commonjs/ui/oauth/browserAuthTransport.js +66 -64
- package/lib/commonjs/ui/oauth/browserAuthTransport.js.map +1 -1
- package/lib/commonjs/ui/oauth/oauthPopup.js +47 -0
- package/lib/commonjs/ui/oauth/oauthPopup.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +10 -10
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +41 -19
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +4 -4
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +9 -9
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +3 -3
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js +6 -7
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +4 -4
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +46 -14
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +5 -5
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +2 -3
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +2 -2
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +90 -89
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +20 -20
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FollowersListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FollowingListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +7 -7
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +9 -34
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +3 -3
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +3 -3
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +15 -15
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +19 -19
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +15 -15
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +17 -7
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +2 -2
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +13 -7
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +5 -6
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +1 -4
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +34 -24
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +3 -4
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/session/backgroundSession.js +258 -0
- package/lib/commonjs/ui/session/backgroundSession.js.map +1 -0
- package/lib/commonjs/ui/session/index.js +7 -0
- package/lib/commonjs/ui/session/index.js.map +1 -1
- package/lib/commonjs/ui/session/useBackgroundSessionSync.js +81 -0
- package/lib/commonjs/ui/session/useBackgroundSessionSync.js.map +1 -0
- package/lib/commonjs/ui/utils/fileManagement.js +24 -24
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/commonjs/ui/utils/netConnectivity.js +28 -0
- package/lib/commonjs/ui/utils/netConnectivity.js.map +1 -0
- package/lib/commonjs/ui/utils/oauthReturn.js +19 -30
- package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
- package/lib/commonjs/ui/utils/userUtils.js +27 -28
- package/lib/commonjs/ui/utils/userUtils.js.map +1 -1
- package/lib/module/index.js +20 -8
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/deviceNotifications.js +62 -0
- package/lib/module/notifications/deviceNotifications.js.map +1 -1
- package/lib/module/ui/boot/runProviderColdBoot.js +21 -65
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +1 -1
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js +13 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +25 -20
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +7 -6
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +12 -18
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js +68 -58
- package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/module/ui/components/authChooser/types.js.map +1 -1
- package/lib/module/ui/components/authChooser/useUsernameAvailability.js +1 -1
- package/lib/module/ui/components/authChooser/useUsernameAvailability.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +3 -1
- package/lib/module/ui/components/internal/PinInput.js.map +1 -1
- package/lib/module/ui/components/logo/LogoText.js +4 -4
- package/lib/module/ui/components/logo/LogoText.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +2 -2
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/module/ui/components/styles/shadow.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +35 -49
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/commitSessionFlow.js +3 -42
- package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +15 -2
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/context/useOxyAccountGraph.js +3 -4
- package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/usePaymentQueries.js +3 -2
- package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/userCache.js +17 -17
- package/lib/module/ui/hooks/queries/userCache.js.map +1 -1
- package/lib/module/ui/hooks/useAssets.js.map +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +8 -4
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/hooks/useOnlineStatus.js +3 -2
- package/lib/module/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +0 -2
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/module/ui/hooks/useSurfaceHeader.js +68 -11
- package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -1
- package/lib/module/ui/navigation/accountDialogManager.js +2 -0
- package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/module/ui/oauth/browserAuthTransport.js +66 -64
- package/lib/module/ui/oauth/browserAuthTransport.js.map +1 -1
- package/lib/module/ui/oauth/oauthPopup.js +48 -1
- package/lib/module/ui/oauth/oauthPopup.js.map +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +37 -15
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ChangeAvatarScreen.js +4 -5
- package/lib/module/ui/screens/ChangeAvatarScreen.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +2 -2
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js +45 -13
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +4 -4
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +3 -4
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +1 -1
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +94 -91
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/FollowersListScreen.js.map +1 -1
- package/lib/module/ui/screens/FollowingListScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +5 -30
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +3 -3
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +4 -4
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +11 -11
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +18 -8
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +14 -8
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +5 -6
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +1 -4
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +15 -5
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +4 -5
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/session/backgroundSession.js +252 -0
- package/lib/module/ui/session/backgroundSession.js.map +1 -0
- package/lib/module/ui/session/index.js +1 -0
- package/lib/module/ui/session/index.js.map +1 -1
- package/lib/module/ui/session/useBackgroundSessionSync.js +76 -0
- package/lib/module/ui/session/useBackgroundSessionSync.js.map +1 -0
- package/lib/module/ui/utils/fileManagement.js +25 -25
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/utils/netConnectivity.js +23 -0
- package/lib/module/ui/utils/netConnectivity.js.map +1 -0
- package/lib/module/ui/utils/oauthReturn.js +20 -30
- package/lib/module/ui/utils/oauthReturn.js.map +1 -1
- package/lib/module/ui/utils/userUtils.js +27 -28
- package/lib/module/ui/utils/userUtils.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +1 -2
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +51 -0
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +11 -30
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AvatarCameraBadge.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +7 -0
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +3 -0
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +6 -0
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts +6 -6
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts +0 -40
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +11 -2
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +26 -7
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +0 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/paymentTypes.d.ts +3 -2
- package/lib/typescript/commonjs/ui/hooks/queries/paymentTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts +3 -2
- package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +10 -6
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts +3 -2
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +7 -2
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +8 -0
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts +6 -0
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts +2 -2
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts +3 -0
- package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts +3 -0
- package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts +7 -0
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts +42 -0
- package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/session/index.d.ts +1 -0
- package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/useBackgroundSessionSync.d.ts +23 -0
- package/lib/typescript/commonjs/ui/session/useBackgroundSessionSync.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +27 -19
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +5 -5
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts +17 -0
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +15 -12
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/userUtils.d.ts +7 -14
- package/lib/typescript/commonjs/ui/utils/userUtils.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +1 -2
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/notifications/deviceNotifications.d.ts +51 -0
- package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -1
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +11 -30
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AvatarCameraBadge.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +7 -0
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts +2 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts +3 -0
- package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/types.d.ts +6 -0
- package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts +1 -1
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/types.d.ts +6 -6
- package/lib/typescript/module/ui/components/payment/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts +0 -40
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +11 -2
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +26 -7
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +0 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/paymentTypes.d.ts +3 -2
- package/lib/typescript/module/ui/hooks/queries/paymentTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts +3 -2
- package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/userCache.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/queries/userCache.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +10 -6
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts +3 -2
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +7 -2
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +8 -0
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts +6 -0
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +2 -2
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts +3 -0
- package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts +3 -0
- package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts +7 -0
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/trustTier.d.ts +1 -1
- package/lib/typescript/module/ui/screens/trust/trustTier.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/backgroundSession.d.ts +42 -0
- package/lib/typescript/module/ui/session/backgroundSession.d.ts.map +1 -0
- package/lib/typescript/module/ui/session/index.d.ts +1 -0
- package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/useBackgroundSessionSync.d.ts +23 -0
- package/lib/typescript/module/ui/session/useBackgroundSessionSync.d.ts.map +1 -0
- package/lib/typescript/module/ui/types/navigation.d.ts +27 -19
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +5 -5
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts +17 -0
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts +15 -12
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/userUtils.d.ts +7 -14
- package/lib/typescript/module/ui/utils/userUtils.d.ts.map +1 -1
- package/lib/typescript/types/expo-image-picker.d.ts +35 -0
- package/package.json +32 -12
- package/src/index.ts +19 -16
- package/src/notifications/deviceNotifications.ts +82 -0
- package/src/types/expo-image-picker.d.ts +35 -0
- package/src/ui/boot/__tests__/coldBootNoIdpRedirect.test.ts +215 -0
- package/src/ui/boot/runProviderColdBoot.ts +24 -101
- package/src/ui/components/AvatarCameraBadge.tsx +2 -1
- package/src/ui/components/FollowButton.tsx +1 -1
- package/src/ui/components/OxyAccountDialogScreen.tsx +13 -1
- package/src/ui/components/OxyAuthChooser.tsx +31 -20
- package/src/ui/components/OxyProvider.tsx +8 -7
- package/src/ui/components/OxySignInButton.tsx +2 -1
- package/src/ui/components/ProfileButton.tsx +15 -20
- package/src/ui/components/authChooser/AccountsMenuView.tsx +66 -57
- package/src/ui/components/authChooser/types.ts +6 -0
- package/src/ui/components/authChooser/useUsernameAvailability.ts +1 -1
- package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
- package/src/ui/components/internal/PinInput.tsx +1 -0
- package/src/ui/components/logo/LogoText.tsx +4 -4
- package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSummaryStep.tsx +2 -2
- package/src/ui/components/payment/types.ts +24 -24
- package/src/ui/components/styles/shadow.tsx +2 -2
- package/src/ui/context/OxyContext.tsx +35 -46
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +13 -89
- package/src/ui/context/commitSessionFlow.ts +3 -61
- package/src/ui/context/hooks/useAuthOperations.ts +26 -1
- package/src/ui/context/oxyContextTypes.ts +26 -7
- package/src/ui/context/useOxyAccountGraph.ts +4 -4
- package/src/ui/hooks/mutations/mutationFactory.ts +1 -1
- package/src/ui/hooks/mutations/useAccountMutations.ts +1 -1
- package/src/ui/hooks/mutations/useServicesMutations.ts +1 -1
- package/src/ui/hooks/queries/paymentTypes.ts +3 -2
- package/src/ui/hooks/queries/usePaymentQueries.ts +3 -2
- package/src/ui/hooks/queries/userCache.ts +169 -148
- package/src/ui/hooks/useAssets.ts +1 -1
- package/src/ui/hooks/useAsyncAction.ts +3 -3
- package/src/ui/hooks/useAuth.ts +12 -6
- package/src/ui/hooks/useAvatarPicker.ts +1 -1
- package/src/ui/hooks/useOnlineStatus.ts +3 -2
- package/src/ui/hooks/useSessionManagement.ts +0 -2
- package/src/ui/hooks/useSettingToggle.ts +1 -1
- package/src/ui/hooks/useSurfaceHeader.ts +90 -15
- package/src/ui/navigation/accountDialogManager.ts +9 -0
- package/src/ui/oauth/__tests__/oauthPopup.test.ts +26 -0
- package/src/ui/oauth/browserAuthTransport.ts +55 -49
- package/src/ui/oauth/oauthPopup.ts +61 -3
- package/src/ui/screens/AccountMembersScreen.tsx +1 -1
- package/src/ui/screens/AccountSettingsScreen.tsx +45 -17
- package/src/ui/screens/AccountVerificationScreen.tsx +1 -1
- package/src/ui/screens/AppInfoScreen.tsx +1 -1
- package/src/ui/screens/AvatarCropScreen.tsx +1 -1
- package/src/ui/screens/ChangeAvatarScreen.tsx +7 -4
- package/src/ui/screens/ConnectedAppsScreen.tsx +2 -2
- package/src/ui/screens/CreateAccountScreen.tsx +55 -15
- package/src/ui/screens/EditProfileFieldScreen.tsx +4 -4
- package/src/ui/screens/EditProfileScreen.tsx +6 -3
- package/src/ui/screens/FAQScreen.tsx +1 -1
- package/src/ui/screens/FeedbackScreen.tsx +741 -575
- package/src/ui/screens/FileManagementScreen.tsx +1 -1
- package/src/ui/screens/FollowersListScreen.tsx +3 -0
- package/src/ui/screens/FollowingListScreen.tsx +3 -0
- package/src/ui/screens/HelpSupportScreen.tsx +1 -1
- package/src/ui/screens/HistoryViewScreen.tsx +5 -20
- package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
- package/src/ui/screens/LegalDocumentsScreen.tsx +1 -1
- package/src/ui/screens/ManageAccountScreen.tsx +9 -2
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +4 -4
- package/src/ui/screens/PrivacySettingsScreen.tsx +15 -12
- package/src/ui/screens/ProfileScreen.tsx +24 -6
- package/src/ui/screens/SavesCollectionsScreen.tsx +1 -1
- package/src/ui/screens/UserListScreen.tsx +18 -8
- package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +1 -1
- package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +14 -5
- package/src/ui/screens/trust/TrustCenterScreen.tsx +2 -2
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +6 -5
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustRulesScreen.tsx +1 -1
- package/src/ui/screens/trust/trustTier.ts +1 -1
- package/src/ui/session/__tests__/backgroundSession.test.ts +392 -0
- package/src/ui/session/backgroundSession.ts +313 -0
- package/src/ui/session/index.ts +1 -0
- package/src/ui/session/useBackgroundSessionSync.ts +92 -0
- package/src/ui/types/navigation.ts +27 -19
- package/src/ui/utils/fileManagement.ts +108 -92
- package/src/ui/utils/netConnectivity.ts +27 -0
- package/src/ui/utils/oauthReturn.ts +23 -33
- package/src/ui/utils/userUtils.ts +27 -32
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +0 -48
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/commonjs/ui/utils/crossOriginRestore.js +0 -140
- package/lib/commonjs/ui/utils/crossOriginRestore.js.map +0 -1
- package/lib/module/ui/oauth/legacyRedirectLanes.js +0 -44
- package/lib/module/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/module/ui/utils/crossOriginRestore.js +0 -131
- package/lib/module/ui/utils/crossOriginRestore.js.map +0 -1
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts +0 -43
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +0 -1
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts +0 -43
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +0 -1
- package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +0 -281
- package/src/ui/oauth/legacyRedirectLanes.ts +0 -43
- package/src/ui/utils/__tests__/crossOriginRestore.test.ts +0 -143
- package/src/ui/utils/crossOriginRestore.ts +0 -169
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import { useQueryClient } from '@tanstack/react-query';
|
|
15
15
|
import { Image as ExpoImage } from 'expo-image';
|
|
16
16
|
import type { FileManagementScreenProps } from '../types/fileManagement';
|
|
17
|
-
import { toast } from '@oxyhq/bloom';
|
|
17
|
+
import { toast } from '@oxyhq/bloom/toast';
|
|
18
18
|
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
19
19
|
import * as Skeleton from '@oxyhq/bloom/skeleton';
|
|
20
20
|
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import type { FollowGraphSort } from '@oxyhq/core';
|
|
2
3
|
import type { BaseScreenProps } from '../types/navigation';
|
|
3
4
|
import UserListScreen from './UserListScreen';
|
|
4
5
|
|
|
5
6
|
interface FollowersListScreenProps extends BaseScreenProps {
|
|
6
7
|
userId: string;
|
|
7
8
|
initialCount?: number;
|
|
9
|
+
/** List ordering — see `UserListScreen`. Omitted ⇒ the server default. */
|
|
10
|
+
sort?: FollowGraphSort;
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
const FollowersListScreen: React.FC<FollowersListScreenProps> = (props) => {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
+
import type { FollowGraphSort } from '@oxyhq/core';
|
|
2
3
|
import type { BaseScreenProps } from '../types/navigation';
|
|
3
4
|
import UserListScreen from './UserListScreen';
|
|
4
5
|
|
|
5
6
|
interface FollowingListScreenProps extends BaseScreenProps {
|
|
6
7
|
userId: string;
|
|
7
8
|
initialCount?: number;
|
|
9
|
+
/** List ordering — see `UserListScreen`. Omitted ⇒ the server default. */
|
|
10
|
+
sort?: FollowGraphSort;
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
const FollowingListScreen: React.FC<FollowingListScreenProps> = (props) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { View, Linking } from 'react-native';
|
|
3
3
|
import type { BaseScreenProps } from '../types/navigation';
|
|
4
|
-
import { toast } from '@oxyhq/bloom';
|
|
4
|
+
import { toast } from '@oxyhq/bloom/toast';
|
|
5
5
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
6
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
7
|
import { SettingsIcon } from '../components/SettingsIcon';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useCallback } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import type { BaseScreenProps } from '../types/navigation';
|
|
4
|
-
import { toast } from '@oxyhq/bloom';
|
|
4
|
+
import { toast } from '@oxyhq/bloom/toast';
|
|
5
5
|
import { Loading } from '@oxyhq/bloom/loading';
|
|
6
6
|
import { Text } from '@oxyhq/bloom/typography';
|
|
7
7
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
@@ -11,6 +11,7 @@ import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
|
11
11
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
12
12
|
import { useOxy } from '../context/OxyContext';
|
|
13
13
|
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
14
|
+
import { createPlatformStorage } from '../utils/storageHelpers';
|
|
14
15
|
|
|
15
16
|
interface HistoryItem { id: string; query: string; type: 'search' | 'browse'; timestamp: Date; }
|
|
16
17
|
|
|
@@ -26,27 +27,11 @@ const HistoryViewScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) => {
|
|
|
26
27
|
const [isLoading, setIsLoading] = useState(true);
|
|
27
28
|
const [isDeleting, setIsDeleting] = useState(false);
|
|
28
29
|
|
|
29
|
-
const getStorage = async () => {
|
|
30
|
-
const isRN = typeof navigator !== 'undefined' && navigator.product === 'ReactNative';
|
|
31
|
-
if (isRN) {
|
|
32
|
-
try {
|
|
33
|
-
const mod = await import('@react-native-async-storage/async-storage');
|
|
34
|
-
const s = mod.default as unknown as { getItem: (k: string) => Promise<string | null>; setItem: (k: string, v: string) => Promise<void>; removeItem: (k: string) => Promise<void> };
|
|
35
|
-
return { getItem: s.getItem.bind(s), setItem: s.setItem.bind(s), removeItem: s.removeItem.bind(s) };
|
|
36
|
-
} catch (e) { if (__DEV__) console.error('AsyncStorage not available:', e); throw new Error('AsyncStorage required'); }
|
|
37
|
-
}
|
|
38
|
-
return {
|
|
39
|
-
getItem: async (k: string) => typeof window !== 'undefined' && window.localStorage ? window.localStorage.getItem(k) : null,
|
|
40
|
-
setItem: async (k: string, v: string) => { if (typeof window !== 'undefined' && window.localStorage) window.localStorage.setItem(k, v); },
|
|
41
|
-
removeItem: async (k: string) => { if (typeof window !== 'undefined' && window.localStorage) window.localStorage.removeItem(k); },
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
|
|
45
30
|
React.useEffect(() => {
|
|
46
31
|
const load = async () => {
|
|
47
32
|
try {
|
|
48
33
|
setIsLoading(true);
|
|
49
|
-
const storage = await
|
|
34
|
+
const storage = await createPlatformStorage();
|
|
50
35
|
const stored = await storage.getItem(`history_${user?.id || 'guest'}`);
|
|
51
36
|
if (stored) { const parsed = JSON.parse(stored); setHistory(parsed.map((i: HistoryItem) => ({ ...i, timestamp: new Date(i.timestamp) }))); }
|
|
52
37
|
else setHistory([]);
|
|
@@ -69,7 +54,7 @@ const HistoryViewScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) => {
|
|
|
69
54
|
const cutoff = new Date(Date.now() - 15 * 60 * 1000);
|
|
70
55
|
const filtered = history.filter(item => item.timestamp < cutoff);
|
|
71
56
|
setHistory(filtered);
|
|
72
|
-
const storage = await
|
|
57
|
+
const storage = await createPlatformStorage();
|
|
73
58
|
await storage.setItem(`history_${user?.id || 'guest'}`, JSON.stringify(filtered));
|
|
74
59
|
toast.success(t('history.deleteLast15Minutes.success') || 'Last 15 minutes deleted');
|
|
75
60
|
} catch (e) { if (__DEV__) console.error('Failed to delete history:', e); toast.error(t('history.deleteLast15Minutes.error') || 'Failed to delete history'); }
|
|
@@ -87,7 +72,7 @@ const HistoryViewScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) => {
|
|
|
87
72
|
if (!confirmed) return;
|
|
88
73
|
try {
|
|
89
74
|
setIsDeleting(true); setHistory([]);
|
|
90
|
-
const storage = await
|
|
75
|
+
const storage = await createPlatformStorage();
|
|
91
76
|
await storage.removeItem(`history_${user?.id || 'guest'}`);
|
|
92
77
|
toast.success(t('history.clearAll.success') || 'History cleared');
|
|
93
78
|
} catch (e) { if (__DEV__) console.error('Failed to clear history:', e); toast.error(t('history.clearAll.error') || 'Failed to clear history'); }
|
|
@@ -3,7 +3,7 @@ import { View, StyleSheet, TouchableOpacity } from 'react-native';
|
|
|
3
3
|
import type { BaseScreenProps } from '../types/navigation';
|
|
4
4
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
5
5
|
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
6
|
-
import { toast } from '@oxyhq/bloom';
|
|
6
|
+
import { toast } from '@oxyhq/bloom/toast';
|
|
7
7
|
import { Text } from '@oxyhq/bloom/typography';
|
|
8
8
|
import { Search } from '@oxyhq/bloom/search';
|
|
9
9
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useCallback } from 'react';
|
|
2
2
|
import { View, Linking } from 'react-native';
|
|
3
|
-
import { toast } from '@oxyhq/bloom';
|
|
3
|
+
import { toast } from '@oxyhq/bloom/toast';
|
|
4
4
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
5
5
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
6
|
import { logger } from '@oxyhq/core';
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Platform,
|
|
8
8
|
} from 'react-native';
|
|
9
9
|
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
10
|
-
import { toast } from '@oxyhq/bloom';
|
|
10
|
+
import { toast } from '@oxyhq/bloom/toast';
|
|
11
11
|
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
12
12
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
13
13
|
import { Text } from '@oxyhq/bloom/typography';
|
|
@@ -15,6 +15,7 @@ import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list'
|
|
|
15
15
|
import {
|
|
16
16
|
getAccountDisplayName,
|
|
17
17
|
getAccountFallbackHandle,
|
|
18
|
+
getNormalizedUserHandle,
|
|
18
19
|
logger as loggerUtil,
|
|
19
20
|
packageInfo,
|
|
20
21
|
} from '@oxyhq/core';
|
|
@@ -120,7 +121,13 @@ const ManageAccountScreen: React.FC<BaseScreenProps> = ({
|
|
|
120
121
|
const [signingOutAllDevices, setSigningOutAllDevices] = useState(false);
|
|
121
122
|
const [signingOut, setSigningOut] = useState(false);
|
|
122
123
|
|
|
123
|
-
const displayName = useMemo(
|
|
124
|
+
const displayName = useMemo(
|
|
125
|
+
() =>
|
|
126
|
+
user?.name?.displayName ??
|
|
127
|
+
getNormalizedUserHandle(user) ??
|
|
128
|
+
getAccountDisplayName(null, locale),
|
|
129
|
+
[user, locale],
|
|
130
|
+
);
|
|
124
131
|
const handle = useMemo(() => getAccountFallbackHandle(user), [user]);
|
|
125
132
|
const avatarUri = useMemo(() => {
|
|
126
133
|
return user?.avatar
|
|
@@ -2,7 +2,7 @@ import type React from 'react';
|
|
|
2
2
|
import { useState, useEffect, useCallback } from 'react';
|
|
3
3
|
import { View, ScrollView, ActivityIndicator } from 'react-native';
|
|
4
4
|
import type { BaseScreenProps } from '../types/navigation';
|
|
5
|
-
import { toast } from '@oxyhq/bloom';
|
|
5
|
+
import { toast } from '@oxyhq/bloom/toast';
|
|
6
6
|
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
7
7
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
8
8
|
import { Button } from '@oxyhq/bloom/button';
|
|
@@ -343,7 +343,7 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
343
343
|
if (currentAppPackage) {
|
|
344
344
|
loadSubscriptionData();
|
|
345
345
|
}
|
|
346
|
-
}, [currentAppPackage
|
|
346
|
+
}, [currentAppPackage]);
|
|
347
347
|
|
|
348
348
|
const detectCurrentApp = () => {
|
|
349
349
|
const detectedApp = 'mention';
|
|
@@ -741,9 +741,9 @@ const PremiumSubscriptionScreen: React.FC<BaseScreenProps> = ({
|
|
|
741
741
|
</View>
|
|
742
742
|
|
|
743
743
|
<BenefitList className="mb-space-24">
|
|
744
|
-
{plan.features.map((feature
|
|
744
|
+
{plan.features.map((feature) => (
|
|
745
745
|
<BenefitRow
|
|
746
|
-
key={
|
|
746
|
+
key={feature}
|
|
747
747
|
icon={<Ionicons name="checkmark" size={18} color={colors.success} />}
|
|
748
748
|
label={feature}
|
|
749
749
|
/>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useCallback, useEffect } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import type { BaseScreenProps } from '../types/navigation';
|
|
4
|
-
import { toast } from '@oxyhq/bloom';
|
|
4
|
+
import { toast } from '@oxyhq/bloom/toast';
|
|
5
5
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
6
|
import { Switch } from '@oxyhq/bloom/switch';
|
|
7
7
|
import { Button } from '@oxyhq/bloom/button';
|
|
@@ -14,7 +14,7 @@ import { useI18n } from '../hooks/useI18n';
|
|
|
14
14
|
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
15
15
|
import { useSettingToggles } from '../hooks/useSettingToggle';
|
|
16
16
|
import type { BlockedUser, RestrictedUser } from '@oxyhq/core';
|
|
17
|
-
import {
|
|
17
|
+
import { getNormalizedUserHandle } from '@oxyhq/core';
|
|
18
18
|
import { useOxy } from '../context/OxyContext';
|
|
19
19
|
|
|
20
20
|
interface PrivacySettings {
|
|
@@ -68,7 +68,7 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
|
|
|
68
68
|
// Privacy settings belong to the ACTIVE account (the org/project/bot when
|
|
69
69
|
// switched, else the personal user).
|
|
70
70
|
const { oxyServices, user } = useOxy();
|
|
71
|
-
const { t
|
|
71
|
+
const { t } = useI18n();
|
|
72
72
|
|
|
73
73
|
useSurfaceHeader({ title: t('privacySettings.title') || 'Privacy Settings' });
|
|
74
74
|
const bloomTheme = useTheme();
|
|
@@ -114,6 +114,7 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
|
|
|
114
114
|
}, [user?.id, oxyServices, t, setValues]);
|
|
115
115
|
|
|
116
116
|
// Load blocked and restricted users
|
|
117
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: reload when active account switches
|
|
117
118
|
useEffect(() => {
|
|
118
119
|
const loadUsers = async () => {
|
|
119
120
|
if (!oxyServices) return;
|
|
@@ -175,35 +176,37 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
|
|
|
175
176
|
}, [oxyServices, t]);
|
|
176
177
|
|
|
177
178
|
// Helper to extract user info from blocked/restricted objects.
|
|
178
|
-
// Display names go through the canonical helper so the fallback chain is
|
|
179
|
-
// identical across every UI surface (name → username → publicKey → "Unnamed").
|
|
180
179
|
const extractUserInfo = useCallback((
|
|
181
180
|
item: BlockedUser | RestrictedUser,
|
|
182
181
|
idField: 'blockedId' | 'restrictedId'
|
|
183
182
|
) => {
|
|
184
|
-
let userIdField: string | { _id: string; username?: string; avatar?: string };
|
|
185
|
-
let userShape: { username?: string };
|
|
183
|
+
let userIdField: string | { _id: string; username?: string; avatar?: string; name?: { displayName?: string } };
|
|
184
|
+
let userShape: { username?: string; name?: { displayName?: string } };
|
|
186
185
|
let avatar: string | undefined;
|
|
187
186
|
|
|
188
187
|
if (idField === 'blockedId' && 'blockedId' in item) {
|
|
189
188
|
userIdField = item.blockedId;
|
|
190
189
|
userShape = typeof item.blockedId === 'string'
|
|
191
190
|
? { username: item.username }
|
|
192
|
-
: { username: item.blockedId.username };
|
|
191
|
+
: { username: item.blockedId.username, name: item.blockedId.name };
|
|
193
192
|
avatar = typeof item.blockedId === 'string' ? item.avatar : item.blockedId.avatar;
|
|
194
193
|
} else if (idField === 'restrictedId' && 'restrictedId' in item) {
|
|
195
194
|
userIdField = item.restrictedId;
|
|
196
195
|
userShape = typeof item.restrictedId === 'string'
|
|
197
196
|
? { username: item.username }
|
|
198
|
-
: { username: item.restrictedId.username };
|
|
197
|
+
: { username: item.restrictedId.username, name: item.restrictedId.name };
|
|
199
198
|
avatar = typeof item.restrictedId === 'string' ? item.avatar : item.restrictedId.avatar;
|
|
200
199
|
} else {
|
|
201
|
-
return { userId: '', displayName:
|
|
200
|
+
return { userId: '', displayName: getNormalizedUserHandle(null) ?? '', avatar: undefined };
|
|
202
201
|
}
|
|
203
202
|
|
|
204
203
|
const userId = typeof userIdField === 'string' ? userIdField : userIdField._id;
|
|
205
|
-
return {
|
|
206
|
-
|
|
204
|
+
return {
|
|
205
|
+
userId,
|
|
206
|
+
displayName: userShape.name?.displayName ?? getNormalizedUserHandle(userShape) ?? '',
|
|
207
|
+
avatar,
|
|
208
|
+
};
|
|
209
|
+
}, []);
|
|
207
210
|
|
|
208
211
|
if (isLoading) {
|
|
209
212
|
return (
|
|
@@ -14,7 +14,7 @@ import Ionicons from '@expo/vector-icons/Ionicons';
|
|
|
14
14
|
import { useI18n } from '../hooks/useI18n';
|
|
15
15
|
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
16
16
|
import { useOxy } from '../context/OxyContext';
|
|
17
|
-
import {
|
|
17
|
+
import { getNormalizedUserHandle, logger, normalizeProfileLinks } from '@oxyhq/core';
|
|
18
18
|
import { extractErrorMessage } from '../utils/errorHandlers';
|
|
19
19
|
|
|
20
20
|
interface ProfileScreenProps extends BaseScreenProps {
|
|
@@ -42,7 +42,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
42
42
|
} = useFollow(userId);
|
|
43
43
|
|
|
44
44
|
const bloomTheme = useTheme();
|
|
45
|
-
const { t
|
|
45
|
+
const { t } = useI18n();
|
|
46
46
|
|
|
47
47
|
// Check if current user is viewing their own profile
|
|
48
48
|
// Normalize IDs by trimming whitespace to handle format mismatches
|
|
@@ -78,7 +78,9 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
78
78
|
);
|
|
79
79
|
throw err;
|
|
80
80
|
}),
|
|
81
|
-
|
|
81
|
+
(isOwnProfile
|
|
82
|
+
? oxyServices.getMyReputationBalance()
|
|
83
|
+
: oxyServices.getReputationBalance(userId))
|
|
82
84
|
.then((balance): { total: number | undefined } => ({ total: balance.total }))
|
|
83
85
|
.catch((): { total: number | undefined } => ({ total: undefined })),
|
|
84
86
|
oxyServices.getUserStats
|
|
@@ -133,7 +135,14 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
133
135
|
// title (a stable "Profile" fallback before it resolves), so the banner +
|
|
134
136
|
// overlapping avatar scroll as content UNDER the shared gradient nav bar.
|
|
135
137
|
// `onImage` tone keeps the title + close legible over the colored banner.
|
|
136
|
-
|
|
138
|
+
// Ends in a string, deliberately: `getNormalizedUserHandle` answers `null` for a
|
|
139
|
+
// user it cannot normalise, and letting that null travel makes this `string | null`
|
|
140
|
+
// — which does not satisfy `Avatar.name` and does not typecheck. Empty is the honest
|
|
141
|
+
// bottom of the chain and every reader below already treats it as falsy
|
|
142
|
+
// (`displayName || t('profile.title')`), so nothing renders a literal "null".
|
|
143
|
+
const displayName = profile
|
|
144
|
+
? (profile.name?.displayName ?? getNormalizedUserHandle(profile) ?? '')
|
|
145
|
+
: username || '';
|
|
137
146
|
useSurfaceHeader({
|
|
138
147
|
title: displayName || t('profile.title'),
|
|
139
148
|
largeTitle: false,
|
|
@@ -187,8 +196,17 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
187
196
|
<View style={styles.avatarRow} className="px-screen-margin">
|
|
188
197
|
<View style={styles.avatarWrapper} className="border-bg bg-bg rounded-radius-max">
|
|
189
198
|
<Avatar
|
|
190
|
-
|
|
191
|
-
|
|
199
|
+
// `getFileDownloadUrl` answers `null` for a reference it cannot
|
|
200
|
+
// resolve, and `Avatar.source` takes `undefined` for "no picture" —
|
|
201
|
+
// the two spellings of absent do not meet, so the coalesce is the
|
|
202
|
+
// whole fix. Without it this file does not typecheck, which blocks
|
|
203
|
+
// `bun run build` and therefore every publish of this package.
|
|
204
|
+
source={
|
|
205
|
+
profile?.avatar
|
|
206
|
+
? (oxyServices.getFileDownloadUrl(profile.avatar, 'thumb') ?? undefined)
|
|
207
|
+
: undefined
|
|
208
|
+
}
|
|
209
|
+
name={displayName}
|
|
192
210
|
size={AVATAR_SIZE}
|
|
193
211
|
/>
|
|
194
212
|
</View>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import type { BaseScreenProps } from '../types/navigation';
|
|
4
|
-
import { toast } from '@oxyhq/bloom';
|
|
4
|
+
import { toast } from '@oxyhq/bloom/toast';
|
|
5
5
|
import {
|
|
6
6
|
SegmentedControl,
|
|
7
7
|
SegmentedControlItem,
|
|
@@ -18,8 +18,8 @@ import Ionicons from '@expo/vector-icons/Ionicons';
|
|
|
18
18
|
import { useI18n } from '../hooks/useI18n';
|
|
19
19
|
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
20
20
|
import { useOxy } from '../context/OxyContext';
|
|
21
|
-
import { logger,
|
|
22
|
-
import type { User } from '@oxyhq/core';
|
|
21
|
+
import { logger, getNormalizedUserHandle, getAccountFallbackHandle } from '@oxyhq/core';
|
|
22
|
+
import type { User, FollowGraphSort } from '@oxyhq/core';
|
|
23
23
|
|
|
24
24
|
type ListMode = 'followers' | 'following';
|
|
25
25
|
|
|
@@ -27,6 +27,12 @@ interface UserListScreenProps extends BaseScreenProps {
|
|
|
27
27
|
userId: string;
|
|
28
28
|
mode: ListMode;
|
|
29
29
|
initialCount?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Ordering of the list — `recent` (newest follow first) or `oldest`.
|
|
32
|
+
* Omitted ⇒ the server default (`recent`). Changing it re-fetches from
|
|
33
|
+
* offset 0, since a page boundary is meaningless across two orderings.
|
|
34
|
+
*/
|
|
35
|
+
sort?: FollowGraphSort;
|
|
30
36
|
}
|
|
31
37
|
|
|
32
38
|
const PAGE_SIZE = 20;
|
|
@@ -46,6 +52,7 @@ const UserListScreen: React.FC<UserListScreenProps> = ({
|
|
|
46
52
|
userId,
|
|
47
53
|
mode,
|
|
48
54
|
initialCount,
|
|
55
|
+
sort,
|
|
49
56
|
navigate,
|
|
50
57
|
}) => {
|
|
51
58
|
const { oxyServices, user: currentUser } = useOxy();
|
|
@@ -58,7 +65,7 @@ const UserListScreen: React.FC<UserListScreenProps> = ({
|
|
|
58
65
|
const [hasMore, setHasMore] = useState(true);
|
|
59
66
|
|
|
60
67
|
const bloomTheme = useTheme();
|
|
61
|
-
const { t
|
|
68
|
+
const { t } = useI18n();
|
|
62
69
|
|
|
63
70
|
const currentUserId = currentUser ? resolveUserId(currentUser) : '';
|
|
64
71
|
|
|
@@ -85,12 +92,12 @@ const UserListScreen: React.FC<UserListScreenProps> = ({
|
|
|
85
92
|
let hasMore: boolean;
|
|
86
93
|
|
|
87
94
|
if (mode === 'followers') {
|
|
88
|
-
const result = await oxyServices.getUserFollowers(userId, { limit: PAGE_SIZE, offset });
|
|
95
|
+
const result = await oxyServices.getUserFollowers(userId, { limit: PAGE_SIZE, offset, sort });
|
|
89
96
|
newUsers = result.followers;
|
|
90
97
|
total = result.total;
|
|
91
98
|
hasMore = result.hasMore;
|
|
92
99
|
} else {
|
|
93
|
-
const result = await oxyServices.getUserFollowing(userId, { limit: PAGE_SIZE, offset });
|
|
100
|
+
const result = await oxyServices.getUserFollowing(userId, { limit: PAGE_SIZE, offset, sort });
|
|
94
101
|
newUsers = result.following;
|
|
95
102
|
total = result.total;
|
|
96
103
|
hasMore = result.hasMore;
|
|
@@ -115,7 +122,10 @@ const UserListScreen: React.FC<UserListScreenProps> = ({
|
|
|
115
122
|
setIsRefreshing(false);
|
|
116
123
|
}
|
|
117
124
|
},
|
|
118
|
-
|
|
125
|
+
// `sort` belongs here: without it the callback would close over the first
|
|
126
|
+
// ordering forever, and the mount effect below (keyed on `fetchUsers`)
|
|
127
|
+
// would never re-run — flipping the control would change nothing.
|
|
128
|
+
[userId, mode, sort, oxyServices]
|
|
119
129
|
);
|
|
120
130
|
|
|
121
131
|
useEffect(() => {
|
|
@@ -147,7 +157,7 @@ const UserListScreen: React.FC<UserListScreenProps> = ({
|
|
|
147
157
|
const itemUserId = resolveUserId(item);
|
|
148
158
|
const isCurrentUser = itemUserId === currentUserId;
|
|
149
159
|
const description = typeof item.description === 'string' ? item.description : '';
|
|
150
|
-
const displayName =
|
|
160
|
+
const displayName = item.name?.displayName ?? getNormalizedUserHandle(item) ?? '';
|
|
151
161
|
const handle = getAccountFallbackHandle(item);
|
|
152
162
|
|
|
153
163
|
return (
|
|
@@ -189,7 +199,7 @@ const UserListScreen: React.FC<UserListScreenProps> = ({
|
|
|
189
199
|
</TouchableOpacity>
|
|
190
200
|
);
|
|
191
201
|
},
|
|
192
|
-
[handleUserPress, currentUserId, oxyServices
|
|
202
|
+
[handleUserPress, currentUserId, oxyServices]
|
|
193
203
|
);
|
|
194
204
|
|
|
195
205
|
const renderEmpty = useCallback(() => {
|
|
@@ -4,7 +4,7 @@ import { View, StyleSheet, Platform, Animated } from 'react-native';
|
|
|
4
4
|
import type { BaseScreenProps } from '../types/navigation';
|
|
5
5
|
import { Avatar } from '@oxyhq/bloom/avatar';
|
|
6
6
|
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
7
|
-
import { toast } from '@oxyhq/bloom';
|
|
7
|
+
import { toast } from '@oxyhq/bloom/toast';
|
|
8
8
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
9
9
|
import { Button } from '@oxyhq/bloom/button';
|
|
10
10
|
import { H1, Text } from '@oxyhq/bloom/typography';
|
|
@@ -13,7 +13,7 @@ import { useI18n } from '../hooks/useI18n';
|
|
|
13
13
|
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
14
14
|
import { useOxy } from '../context/OxyContext';
|
|
15
15
|
import { useUpdateProfile } from '../hooks/mutations/useAccountMutations';
|
|
16
|
-
import {
|
|
16
|
+
import { getNormalizedUserHandle, type User } from '@oxyhq/core';
|
|
17
17
|
|
|
18
18
|
const GAP = 12;
|
|
19
19
|
const INNER_GAP = 8;
|
|
@@ -63,10 +63,10 @@ const WelcomeNewUserScreen: React.FC<BaseScreenProps & { newUser?: User }> = ({
|
|
|
63
63
|
? oxyServices.getFileDownloadUrl(currentUser.avatar, 'thumb')
|
|
64
64
|
: undefined;
|
|
65
65
|
|
|
66
|
-
//
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const welcomeTitle = currentUser
|
|
66
|
+
// API DTO contract: explicit displayName, else the normalized handle.
|
|
67
|
+
const welcomeName =
|
|
68
|
+
currentUser?.name?.displayName ?? getNormalizedUserHandle(currentUser) ?? '';
|
|
69
|
+
const welcomeTitle = currentUser && welcomeName
|
|
70
70
|
? (t('welcomeNew.welcome.titleWithName', { username: welcomeName }) || `Welcome, ${welcomeName} 👋`)
|
|
71
71
|
: (t('welcomeNew.welcome.title') || 'Welcome 👋');
|
|
72
72
|
// Only ask the user for their name during onboarding when they don't have a
|
|
@@ -551,8 +551,8 @@ const PhotoPickerView: React.FC<PhotoPickerViewProps> = ({
|
|
|
551
551
|
importantForAccessibility="no-hide-descendants"
|
|
552
552
|
>
|
|
553
553
|
{Array.from({ length: skeletonTileCount }, (_, index) => (
|
|
554
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: fixed-size skeleton grid, order never changes
|
|
555
554
|
<Skeleton.Box
|
|
555
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: fixed-size skeleton grid, order never changes
|
|
556
556
|
key={`skeleton-${index}`}
|
|
557
557
|
width={cellSize}
|
|
558
558
|
height={cellSize}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { useQueryClient } from '@tanstack/react-query';
|
|
4
|
-
import { toast } from '@oxyhq/bloom';
|
|
4
|
+
import { toast } from '@oxyhq/bloom/toast';
|
|
5
5
|
import type { AssetUploadInput, FileMetadata } from '@oxyhq/core';
|
|
6
6
|
import type { useUploadFile } from '../../../hooks/mutations/useAccountMutations';
|
|
7
7
|
import { queryKeys } from '../../../hooks/queries/queryKeys';
|
|
@@ -411,7 +411,11 @@ export const useFileUploadState = ({
|
|
|
411
411
|
}
|
|
412
412
|
};
|
|
413
413
|
|
|
414
|
-
|
|
414
|
+
// Memoized because the orchestrator builds the upload-preview header's back
|
|
415
|
+
// NODE from it (`fmHeaderBack`): a node can only be compared by identity, so
|
|
416
|
+
// a fresh closure here re-creates the node every render and thrashes the
|
|
417
|
+
// surface-header bridge into an unbounded update loop (React error #185).
|
|
418
|
+
const handleCancelUpload = useCallback(() => {
|
|
415
419
|
clearPostSelectTimer();
|
|
416
420
|
|
|
417
421
|
// Cleanup preview URLs
|
|
@@ -420,7 +424,7 @@ export const useFileUploadState = ({
|
|
|
420
424
|
}
|
|
421
425
|
setPendingFiles([]);
|
|
422
426
|
setShowUploadPreview(false);
|
|
423
|
-
};
|
|
427
|
+
}, [clearPostSelectTimer, pendingFiles]);
|
|
424
428
|
|
|
425
429
|
const removePendingFile = (id: string) => {
|
|
426
430
|
const file = pendingFiles.find((pf) => pf.id === id);
|
|
@@ -438,8 +442,13 @@ export const useFileUploadState = ({
|
|
|
438
442
|
/**
|
|
439
443
|
* Handle file upload - opens document picker and processes selected files
|
|
440
444
|
* Expo 54 compatible - works on web, iOS, and Android
|
|
445
|
+
*
|
|
446
|
+
* Memoized because the orchestrator feeds it to the picker header's
|
|
447
|
+
* `primaryAction` (the Upload CTA) through a `useMemo`: a fresh closure each
|
|
448
|
+
* render invalidates that memo every render, which is the input the
|
|
449
|
+
* surface-header bridge is guarding against.
|
|
441
450
|
*/
|
|
442
|
-
const handleFileUpload = async () => {
|
|
451
|
+
const handleFileUpload = useCallback(async () => {
|
|
443
452
|
// Prevent concurrent document picker calls
|
|
444
453
|
if (isPickingDocument) {
|
|
445
454
|
toast.error(t('fileManagement.toasts.waitForSelection'));
|
|
@@ -538,7 +547,7 @@ export const useFileUploadState = ({
|
|
|
538
547
|
// Always reset the picking state, even if there was an error
|
|
539
548
|
setIsPickingDocument(false);
|
|
540
549
|
}
|
|
541
|
-
};
|
|
550
|
+
}, [isPickingDocument, imagesOnly, handleFileSelection, t]);
|
|
542
551
|
|
|
543
552
|
return {
|
|
544
553
|
isPickingDocument,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { View, StyleSheet } from 'react-native';
|
|
4
|
-
import type { ReputationTransaction, TrustTier } from '@oxyhq/
|
|
4
|
+
import type { ReputationTransaction, TrustTier } from '@oxyhq/contracts';
|
|
5
5
|
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
6
6
|
import { Chip } from '@oxyhq/bloom/chip';
|
|
7
7
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
@@ -36,7 +36,7 @@ const TrustCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
36
36
|
setIsLoading(true);
|
|
37
37
|
setError(null);
|
|
38
38
|
Promise.all([
|
|
39
|
-
oxyServices.
|
|
39
|
+
oxyServices.getMyReputationBalance(),
|
|
40
40
|
oxyServices.getReputationTransactions(user.id, 20, 0),
|
|
41
41
|
])
|
|
42
42
|
.then(([balance, txns]) => {
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
FlatList,
|
|
8
8
|
TouchableOpacity,
|
|
9
9
|
} from 'react-native';
|
|
10
|
-
import type { ReputationLeaderboardEntry } from '@oxyhq/
|
|
11
|
-
import {
|
|
10
|
+
import type { ReputationLeaderboardEntry } from '@oxyhq/contracts';
|
|
11
|
+
import { getNormalizedUserHandle, logger } from '@oxyhq/core';
|
|
12
12
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
13
13
|
import { H6, Text } from '@oxyhq/bloom/typography';
|
|
14
14
|
import { Chip } from '@oxyhq/bloom/chip';
|
|
@@ -29,7 +29,7 @@ const PODIUM_RANK = 3;
|
|
|
29
29
|
|
|
30
30
|
const TrustLeaderboardScreen: React.FC<BaseScreenProps> = ({ navigate }) => {
|
|
31
31
|
const { oxyServices, user: currentUser } = useOxy();
|
|
32
|
-
const { t
|
|
32
|
+
const { t } = useI18n();
|
|
33
33
|
const bloomTheme = useTheme();
|
|
34
34
|
|
|
35
35
|
const [leaderboard, setLeaderboard] = useState<ReputationLeaderboardEntry[]>([]);
|
|
@@ -72,7 +72,8 @@ const TrustLeaderboardScreen: React.FC<BaseScreenProps> = ({ navigate }) => {
|
|
|
72
72
|
|
|
73
73
|
const renderEntry = useCallback(
|
|
74
74
|
({ item }: { item: ReputationLeaderboardEntry }) => {
|
|
75
|
-
const displayName =
|
|
75
|
+
const displayName =
|
|
76
|
+
item.user.name?.displayName ?? getNormalizedUserHandle(item.user) ?? '';
|
|
76
77
|
const isViewer = currentUserId !== '' && item.user.id === currentUserId;
|
|
77
78
|
const isPodium = item.rank <= PODIUM_RANK;
|
|
78
79
|
// Viewer's own row and podium ranks get a subtle highlighted surface.
|
|
@@ -115,7 +116,7 @@ const TrustLeaderboardScreen: React.FC<BaseScreenProps> = ({ navigate }) => {
|
|
|
115
116
|
</TouchableOpacity>
|
|
116
117
|
);
|
|
117
118
|
},
|
|
118
|
-
[oxyServices,
|
|
119
|
+
[oxyServices, currentUserId, handleEntryPress, t],
|
|
119
120
|
);
|
|
120
121
|
|
|
121
122
|
const keyExtractor = useCallback(
|
|
@@ -97,7 +97,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = () => {
|
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
setIsLoading(true);
|
|
100
|
-
oxyServices.
|
|
100
|
+
oxyServices.getMyReputationBalance()
|
|
101
101
|
.then((balance) => {
|
|
102
102
|
setReputationTotal(balance.total || 0);
|
|
103
103
|
})
|
|
@@ -4,7 +4,7 @@ import { View, Text } from 'react-native';
|
|
|
4
4
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
5
5
|
import { Chip } from '@oxyhq/bloom/chip';
|
|
6
6
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
|
-
import type { ReputationRule, ReputationCategory } from '@oxyhq/
|
|
7
|
+
import type { ReputationRule, ReputationCategory } from '@oxyhq/contracts';
|
|
8
8
|
import type { BaseScreenProps } from '../../types/navigation';
|
|
9
9
|
import { useSurfaceHeader } from '../../hooks/useSurfaceHeader';
|
|
10
10
|
import { Loading } from '@oxyhq/bloom/loading';
|