@oxyhq/services 26.0.1 → 26.0.3
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 +33 -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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.ensureNotificationChannel = ensureNotificationChannel;
|
|
6
7
|
exports.getExpoPushToken = getExpoPushToken;
|
|
7
8
|
exports.hasNotificationPermission = hasNotificationPermission;
|
|
8
9
|
exports.installForegroundNotificationHandler = installForegroundNotificationHandler;
|
|
@@ -22,6 +23,25 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
22
23
|
* already lives in `@oxyhq/core`; core may never import an `expo-*` module, and
|
|
23
24
|
* this adapter is the Expo-side half that closes that gap.
|
|
24
25
|
*
|
|
26
|
+
* ## Reached through its OWN entry point, never the root barrel
|
|
27
|
+
*
|
|
28
|
+
* ```ts
|
|
29
|
+
* import { getExpoPushToken } from '@oxyhq/services/notifications';
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* This is the only module in the package that depends on peers an app which
|
|
33
|
+
* does not use push genuinely never installs, and a barrel export would put it
|
|
34
|
+
* in EVERY consumer's import graph. `tsc` resolves the specifier of an
|
|
35
|
+
* `import()` even when the call is lazy and inside a try/catch, so a barrel
|
|
36
|
+
* export turned "optional peer" into a hard requirement: consumers with no
|
|
37
|
+
* interest in push failed to type-check with TS2307. The subpath is what keeps
|
|
38
|
+
* the optionality honest — see the note in `src/index.ts`.
|
|
39
|
+
*
|
|
40
|
+
* Metro is the resolver that behaves differently here, and in the useful
|
|
41
|
+
* direction: an unresolvable DYNAMIC `import()` bundles fine (the `catch` below
|
|
42
|
+
* takes over at runtime), where a static import fails the build outright. That
|
|
43
|
+
* is why the runtime shape below must stay dynamic-and-guarded.
|
|
44
|
+
*
|
|
25
45
|
* ## Native-only by construction
|
|
26
46
|
*
|
|
27
47
|
* Every entry point resolves its null/no-op result from `Platform.OS` BEFORE the
|
|
@@ -290,6 +310,49 @@ async function takeLaunchNotificationData() {
|
|
|
290
310
|
*/
|
|
291
311
|
let foregroundHandlerAttempted = false;
|
|
292
312
|
|
|
313
|
+
/** How prominently Android surfaces a channel's notifications. */
|
|
314
|
+
|
|
315
|
+
/** An Android notification channel this app delivers on. */
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Create (or update) an Android notification channel.
|
|
319
|
+
*
|
|
320
|
+
* A no-op everywhere but Android: iOS has no channels, and web never loads the
|
|
321
|
+
* native module. Call it BEFORE registering a push token, so the very first
|
|
322
|
+
* notification the server sends already has a channel to land on.
|
|
323
|
+
*
|
|
324
|
+
* Failure is non-fatal and logged: a missing channel costs visibility, and
|
|
325
|
+
* refusing to register a token over it would cost the feature entirely.
|
|
326
|
+
*
|
|
327
|
+
* @returns Whether the channel was actually created (`false` off Android, or
|
|
328
|
+
* when the native module is unavailable, or when creation failed).
|
|
329
|
+
*/
|
|
330
|
+
async function ensureNotificationChannel(spec) {
|
|
331
|
+
if (_reactNative.Platform.OS !== 'android') {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
const notifications = await loadNotifications();
|
|
335
|
+
if (!notifications) {
|
|
336
|
+
return false;
|
|
337
|
+
}
|
|
338
|
+
try {
|
|
339
|
+
await notifications.setNotificationChannelAsync(spec.id, {
|
|
340
|
+
name: spec.name,
|
|
341
|
+
importance: spec.importance === 'high' ? notifications.AndroidImportance.HIGH : notifications.AndroidImportance.DEFAULT,
|
|
342
|
+
...(spec.description ? {
|
|
343
|
+
description: spec.description
|
|
344
|
+
} : {})
|
|
345
|
+
});
|
|
346
|
+
return true;
|
|
347
|
+
} catch (error) {
|
|
348
|
+
log.warn('could not create the notification channel', {
|
|
349
|
+
method: 'ensureNotificationChannel',
|
|
350
|
+
channelId: spec.id
|
|
351
|
+
}, error);
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
293
356
|
/**
|
|
294
357
|
* Install the ONE process-wide handler that decides whether an incoming
|
|
295
358
|
* notification is shown while the app is in the FOREGROUND.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_reactNative","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","log","createLogger","isRecord","value","loadNotifications","Platform","OS","Promise","resolve","then","error","warn","method","easProjectId","constants","debug","fromEasConfig","easConfig","projectId","length","extra","expoConfig","eas","undefined","pushTokenPlatform","hasNotificationPermission","notifications","permissions","getPermissionsAsync","granted","requestNotificationPermission","existing","canAskAgain","requested","requestPermissionsAsync","getExpoPushToken","token","getExpoPushTokenAsync","data","takeLaunchNotificationData","response","getLastNotificationResponse","notification","request","content","clearLastNotificationResponse","clearError","foregroundHandlerAttempted","installForegroundNotificationHandler","decide","setNotificationHandler","handleNotification","show","shouldShowBanner","shouldShowList","shouldPlaySound","shouldSetBadge","subscribeToNotificationResponses","listener","subscription","addNotificationResponseReceivedListener","remove"],"sourceRoot":"../../../src","sources":["notifications/deviceNotifications.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_core","require","_reactNative","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","log","createLogger","isRecord","value","loadNotifications","Platform","OS","Promise","resolve","then","error","warn","method","easProjectId","constants","debug","fromEasConfig","easConfig","projectId","length","extra","expoConfig","eas","undefined","pushTokenPlatform","hasNotificationPermission","notifications","permissions","getPermissionsAsync","granted","requestNotificationPermission","existing","canAskAgain","requested","requestPermissionsAsync","getExpoPushToken","token","getExpoPushTokenAsync","data","takeLaunchNotificationData","response","getLastNotificationResponse","notification","request","content","clearLastNotificationResponse","clearError","foregroundHandlerAttempted","ensureNotificationChannel","spec","setNotificationChannelAsync","id","name","importance","AndroidImportance","HIGH","DEFAULT","description","channelId","installForegroundNotificationHandler","decide","setNotificationHandler","handleNotification","show","shouldShowBanner","shouldShowList","shouldPlaySound","shouldSetBadge","subscribeToNotificationResponses","listener","subscription","addNotificationResponseReceivedListener","remove"],"sourceRoot":"../../../src","sources":["notifications/deviceNotifications.ts"],"mappings":";;;;;;;;;;;;;AAyDA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAAwC,SAAAE,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAH,uBAAA,YAAAA,CAAAC,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAA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,MAAMgC,YAAY,CAACE,MAAM,CAAC,CAAC;EACpC,CAAC,CAAC,OAAO9D,KAAK,EAAE;IACdV,GAAG,CAACW,IAAI,CACN,0CAA0C,EAC1C;MAAEC,MAAM,EAAE;IAAmC,CAAC,EAC9CF,KACF,CAAC;IACD,OAAO,MAAMa,SAAS;EACxB;AACF","ignoreList":[]}
|
|
@@ -7,10 +7,9 @@ exports.SESSION_HANDOFF_DEADLINE_MS = exports.COLD_BOOT_OVERALL_DEADLINE_MS = vo
|
|
|
7
7
|
exports.runProviderColdBoot = runProviderColdBoot;
|
|
8
8
|
var _core = require("@oxyhq/core");
|
|
9
9
|
var _deviceCredential = require("../utils/deviceCredential.js");
|
|
10
|
-
var _crossOriginRestore = require("../utils/crossOriginRestore.js");
|
|
11
10
|
var _oauthReturn = require("../utils/oauthReturn.js");
|
|
12
11
|
var _isWebBrowser = require("../utils/isWebBrowser.js");
|
|
13
|
-
var
|
|
12
|
+
var _netConnectivity = require("../utils/netConnectivity.js");
|
|
14
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
14
|
/** How long the cold boot waits for the post-boot SessionClient handoff (ms). */
|
|
16
15
|
const SESSION_HANDOFF_DEADLINE_MS = exports.SESSION_HANDOFF_DEADLINE_MS = 6000;
|
|
@@ -57,8 +56,8 @@ async function detectOfflineHint() {
|
|
|
57
56
|
setTimeout(() => resolve(null), OFFLINE_PROBE_TIMEOUT_MS);
|
|
58
57
|
})]);
|
|
59
58
|
// `null` ⇒ the probe timed out (unknown → assume online). Only an explicit
|
|
60
|
-
//
|
|
61
|
-
return state
|
|
59
|
+
// disconnected / unreachable verdict disables the network steps.
|
|
60
|
+
return (0, _netConnectivity.isNetConnectivityExplicitlyOffline)(state);
|
|
62
61
|
} catch {
|
|
63
62
|
// NetInfo missing / probe threw — never block sign-in on a probe failure.
|
|
64
63
|
return false;
|
|
@@ -68,19 +67,19 @@ async function detectOfflineHint() {
|
|
|
68
67
|
* Device-first cold boot for `@oxyhq/services` providers.
|
|
69
68
|
*
|
|
70
69
|
* Ordered pipeline:
|
|
71
|
-
* 1. Complete OAuth authorization-code return (web)
|
|
70
|
+
* 1. Complete an OAuth authorization-code return already on the URL (web)
|
|
72
71
|
* 2. `runSessionColdBoot` — device-secret mint (+ native shared-key, or the
|
|
73
72
|
* primary-identity-key lane in `sessionMode: 'identity'`)
|
|
74
|
-
* 3. Silent OAuth for all web apps when mint finds no session
|
|
75
73
|
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
74
|
+
* Step 1 is ACCOUNT-MODE ONLY: it commits whichever account the IdP resolves,
|
|
75
|
+
* which for an identity-bound client is somebody else's account by construction.
|
|
76
|
+
* In `'identity'` mode the boot is exactly step 2.
|
|
79
77
|
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
78
|
+
* The boot NEVER navigates the top-level window. There is no automatic
|
|
79
|
+
* `prompt=none` bounce to the IdP: a web origin with no local device credential
|
|
80
|
+
* resolves SIGNED OUT and waits for the user's next explicit "Continue with
|
|
81
|
+
* Oxy", which opens a popup from a real gesture (#691 phase 7b). Step 1 is not a
|
|
82
|
+
* navigation — it only consumes a code that is already in the address bar.
|
|
84
83
|
*/
|
|
85
84
|
async function runProviderColdBoot(opts) {
|
|
86
85
|
const {
|
|
@@ -88,10 +87,8 @@ async function runProviderColdBoot(opts) {
|
|
|
88
87
|
authStore,
|
|
89
88
|
clientId,
|
|
90
89
|
authRedirectUri,
|
|
91
|
-
authorizeBaseUrl,
|
|
92
90
|
sessionMode = 'account',
|
|
93
91
|
identity,
|
|
94
|
-
webAuthMode = 'redirect',
|
|
95
92
|
sessionClient,
|
|
96
93
|
syncDeviceCredentialToHost,
|
|
97
94
|
commitSession,
|
|
@@ -101,28 +98,18 @@ async function runProviderColdBoot(opts) {
|
|
|
101
98
|
const identityBound = sessionMode === 'identity';
|
|
102
99
|
setTokenReady(false);
|
|
103
100
|
try {
|
|
104
|
-
//
|
|
105
|
-
//
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
//
|
|
109
|
-
//
|
|
110
|
-
(0, _crossOriginRestore.consumeSilentOAuthError)();
|
|
111
|
-
(0, _oauthReturn.consumeHubSyncFailure)();
|
|
112
|
-
|
|
113
|
-
// The redirect transport's RETURN leg — also NOT gated on `webAuthMode`. A
|
|
114
|
-
// popup-mode app legitimately lands here with `?code=` whenever the browser
|
|
115
|
-
// blocked the popup and `startWebOAuthSignIn` fell back to a full-page
|
|
116
|
-
// redirect (`popup-blocked` / `popup-navigation-failed`), and an app that
|
|
117
|
-
// switched modes mid-flight must not be stranded with a dead `?code=`
|
|
118
|
-
// either. It consumes a code already on the URL; it never starts one.
|
|
101
|
+
// The redirect transport's RETURN leg. An app reaches it whenever the browser
|
|
102
|
+
// BLOCKED the sign-in popup and `startWebOAuthSignIn` fell back to a
|
|
103
|
+
// full-page redirect (`popup-blocked` / `popup-navigation-failed`), so it is
|
|
104
|
+
// load-bearing even though nothing here ever starts a redirect. It consumes a
|
|
105
|
+
// code (or a stale OAuth `error`) already in the address bar and rewrites the
|
|
106
|
+
// URL via `history.replaceState`; it never begins a navigation.
|
|
119
107
|
const oauthCompleted = identityBound ? false : await (0, _oauthReturn.tryCompleteOAuthReturn)({
|
|
120
108
|
oxyServices,
|
|
121
109
|
clientId,
|
|
122
110
|
authRedirectUri,
|
|
123
111
|
commitSession: input => commitSession(input, {
|
|
124
|
-
activate: true
|
|
125
|
-
hubSync: false
|
|
112
|
+
activate: true
|
|
126
113
|
})
|
|
127
114
|
});
|
|
128
115
|
if (oauthCompleted) {
|
|
@@ -136,7 +123,7 @@ async function runProviderColdBoot(opts) {
|
|
|
136
123
|
// burning the overall deadline on a mint that cannot succeed. Any ambiguity
|
|
137
124
|
// resolves to "online" — the network steps still run.
|
|
138
125
|
const offline = await detectOfflineHint();
|
|
139
|
-
|
|
126
|
+
await (0, _core.runSessionColdBoot)({
|
|
140
127
|
oxy: oxyServices,
|
|
141
128
|
store: authStore,
|
|
142
129
|
platform: {
|
|
@@ -198,37 +185,6 @@ async function runProviderColdBoot(opts) {
|
|
|
198
185
|
}
|
|
199
186
|
}
|
|
200
187
|
});
|
|
201
|
-
|
|
202
|
-
// Silent cross-origin OAuth restore (web cross-app SSO): a full-page
|
|
203
|
-
// `prompt=none` bounce to the IdP when the mint found no local session.
|
|
204
|
-
//
|
|
205
|
-
// TRANSPORT gate (`allowsAutomaticIdpRedirect`): `webAuthMode: 'popup'`
|
|
206
|
-
// FORBIDS this lane. It navigates the top-level window with no user gesture
|
|
207
|
-
// behind it, which is precisely what popup mode exists to eliminate — a
|
|
208
|
-
// popup-mode domain without a local credential resolves signed out right
|
|
209
|
-
// here and waits for the user's next explicit "Continue with Oxy" (issue
|
|
210
|
-
// #691, "Cold boot and cross-domain behavior"). `'redirect'` — still the
|
|
211
|
-
// default and the compatibility path — reaches this lane unchanged, and this
|
|
212
|
-
// whole block disappears with the transport in phase 7b.
|
|
213
|
-
//
|
|
214
|
-
// ORIGIN gate: same as the hub-sync WRITE side (`syncHubAfterSignIn`) —
|
|
215
|
-
// official web origins only, never the IdP hub itself, and — unlike the
|
|
216
|
-
// write side — never a loopback / local-dev origin (which must not be
|
|
217
|
-
// bounced to a hosted IdP on cold boot). The authorize endpoint is
|
|
218
|
-
// env-configurable so a local/staging app targets its own IdP instead of
|
|
219
|
-
// production.
|
|
220
|
-
const webOrigin = (0, _isWebBrowser.isWebBrowser)() ? globalThis.location?.origin : undefined;
|
|
221
|
-
if (!identityBound && (0, _legacyRedirectLanes.allowsAutomaticIdpRedirect)(webAuthMode) && clientId && outcome.kind !== 'session' && webOrigin && (0, _crossOriginRestore.isSilentRestoreEligibleOrigin)(webOrigin)) {
|
|
222
|
-
const redirected = await (0, _crossOriginRestore.maybeStartSilentOAuthRestore)({
|
|
223
|
-
oxyServices,
|
|
224
|
-
clientId,
|
|
225
|
-
redirectUri: authRedirectUri,
|
|
226
|
-
authorizeBaseUrl
|
|
227
|
-
});
|
|
228
|
-
if (redirected) {
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
188
|
} catch (error) {
|
|
233
189
|
if (__DEV__) {
|
|
234
190
|
_core.logger.error('Cold boot error', error instanceof Error ? error : new Error(String(error)), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_deviceCredential","
|
|
1
|
+
{"version":3,"names":["_core","require","_deviceCredential","_oauthReturn","_isWebBrowser","_netConnectivity","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SESSION_HANDOFF_DEADLINE_MS","exports","COLD_BOOT_OVERALL_DEADLINE_MS","OFFLINE_PROBE_TIMEOUT_MS","detectOfflineHint","isWebBrowser","online","globalThis","navigator","onLine","NetInfo","Promise","resolve","then","state","race","fetch","setTimeout","isNetConnectivityExplicitlyOffline","runProviderColdBoot","opts","oxyServices","authStore","clientId","authRedirectUri","sessionMode","identity","sessionClient","syncDeviceCredentialToHost","commitSession","markAuthResolved","setTokenReady","identityBound","oauthCompleted","tryCompleteOAuthReturn","input","activate","offline","runSessionColdBoot","oxy","store","platform","isWeb","isNative","overallDeadlineMs","isOffline","onStepDeadline","stepId","loggerUtil","warn","component","method","onSession","session","handoff","sessionId","accessToken","userId","handoffDeadlineId","finally","undefined","clearTimeout","onSignedOut","cred","loadPersistedDeviceCredential","start","socketError","__DEV__","debug","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,KAAK,YAAYC,KAAK,GAAGD,KAAK,GAAG,IAAIC,KAAK,CAACC,MAAM,CAACF,KAAK,CAAC,CAAC,EACzD;QAAErB,SAAS,EAAE;MAAsB,CACrC,CAAC;IACH;EACF,CAAC,SAAS;IACRpB,gBAAgB,CAAC,CAAC;EACpB;AACF","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _components = require("react-native-css/components");
|
|
8
8
|
var _Ionicons = _interopRequireDefault(require("@expo/vector-icons/Ionicons"));
|
|
9
9
|
var _theme = require("@oxyhq/bloom/theme");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -29,7 +29,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
29
29
|
};
|
|
30
30
|
const AvatarCameraBadge = () => {
|
|
31
31
|
const theme = (0, _theme.useTheme)();
|
|
32
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.View, {
|
|
33
33
|
style: badgeStyle,
|
|
34
34
|
className: "bg-fill-brand border-border-image",
|
|
35
35
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Ionicons.default, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_components","require","_Ionicons","_interopRequireDefault","_theme","_jsxRuntime","e","__esModule","default","badgeStyle","position","right","bottom","width","height","borderRadius","alignItems","justifyContent","borderWidth","AvatarCameraBadge","theme","useTheme","jsx","View","style","className","children","name","size","color","colors","primaryForeground","_default","exports"],"sourceRoot":"../../../../src","sources":["ui/components/AvatarCameraBadge.tsx"],"mappings":";;;;;;AAEA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAA8C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAMG,UAAqB,GAAG;EAC5BC,QAAQ,EAAE,UAAU;EACpBC,KAAK,EAAE,CAAC;EACRC,MAAM,EAAE,CAAC;EACTC,KAAK,EAAE,EAAE;EACTC,MAAM,EAAE,EAAE;EACVC,YAAY,EAAE,EAAE;EAChBC,UAAU,EAAE,QAAQ;EACpBC,cAAc,EAAE,QAAQ;EACxBC,WAAW,EAAE;AACf,CAAC;AAED,MAAMC,iBAA2B,GAAGA,CAAA,KAAM;EACxC,MAAMC,KAAK,GAAG,IAAAC,eAAQ,EAAC,CAAC;EACxB,oBACE,IAAAhB,WAAA,CAAAiB,GAAA,EAACtB,WAAA,CAAAuB,IAAI;IAACC,KAAK,EAAEf,UAAW;IAACgB,SAAS,EAAC,mCAAmC;IAAAC,QAAA,eACpE,IAAArB,WAAA,CAAAiB,GAAA,EAACpB,SAAA,CAAAM,OAAQ;MAACmB,IAAI,EAAC,QAAQ;MAACC,IAAI,EAAE,EAAG;MAACC,KAAK,EAAET,KAAK,CAACU,MAAM,CAACC;IAAkB,CAAE;EAAC,CACvE,CAAC;AAEX,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GAEaW,iBAAiB","ignoreList":[]}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = exports.FollowButton = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _OxyContext = require("../context/OxyContext.js");
|
|
9
|
-
var
|
|
9
|
+
var _toast = require("@oxyhq/bloom/toast");
|
|
10
10
|
var _button = require("@oxyhq/bloom/button");
|
|
11
11
|
var _loading = require("@oxyhq/bloom/loading");
|
|
12
12
|
var _useFollow = require("../hooks/useFollow.js");
|
|
@@ -63,7 +63,7 @@ const FollowButtonInner = /*#__PURE__*/(0, _react.memo)(function FollowButtonInn
|
|
|
63
63
|
onFollowChange?.(!isFollowing);
|
|
64
64
|
} catch (err) {
|
|
65
65
|
const error = err instanceof Error ? err : new Error(String(err));
|
|
66
|
-
|
|
66
|
+
_toast.toast.error(error.message || 'Failed to update follow status');
|
|
67
67
|
}
|
|
68
68
|
}, [disabled, isLoading, isKnown, toggleFollow, onFollowChange, isFollowing, preventParentActions]);
|
|
69
69
|
|
|
@@ -164,7 +164,7 @@ const FollowButtonMultiInner = /*#__PURE__*/(0, _react.memo)(function FollowButt
|
|
|
164
164
|
onBulkUnfollow?.(result);
|
|
165
165
|
} catch (err) {
|
|
166
166
|
const error = err instanceof Error ? err : new Error(String(err));
|
|
167
|
-
|
|
167
|
+
_toast.toast.error(error.message || 'Failed to update follow status');
|
|
168
168
|
} finally {
|
|
169
169
|
setIsSubmitting(false);
|
|
170
170
|
}
|
|
@@ -185,7 +185,7 @@ const FollowButtonMultiInner = /*#__PURE__*/(0, _react.memo)(function FollowButt
|
|
|
185
185
|
onBulkFollow?.(result);
|
|
186
186
|
} catch (err) {
|
|
187
187
|
const error = err instanceof Error ? err : new Error(String(err));
|
|
188
|
-
|
|
188
|
+
_toast.toast.error(error.message || 'Failed to update follow status');
|
|
189
189
|
} finally {
|
|
190
190
|
setIsSubmitting(false);
|
|
191
191
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_OxyContext","
|
|
1
|
+
{"version":3,"names":["_react","require","_OxyContext","_toast","_button","_loading","_useFollow","_followStore","_theme","_shallow","_jsxRuntime","DEFAULT_FOLLOW_ALL_LABEL","DEFAULT_FOLLOWED_ALL_LABEL","isMultiMode","props","Array","isArray","userIds","FollowButtonInner","memo","userId","oxyServices","initiallyFollowing","size","onFollowChange","style","textStyle","disabled","showLoadingState","preventParentActions","colors","useTheme","isFollowing","isKnown","isLoading","toggleFollow","resolveStatus","useFollowForButton","handlePress","useCallback","event","preventDefault","stopPropagation","err","error","Error","String","toast","message","useEffect","isBusy","showFollowing","showSpinner","jsx","Button","variant","onPress","icon","Loading","color","text","primaryForeground","undefined","children","FollowButtonMultiInner","initiallyAllFollowing","followAllLabel","followedAllLabel","onBulkFollow","onBulkUnfollow","follow","useFollow","followAllUsers","unfollowAllUsers","isAnyLoading","initialFollowStatuses","useFollowStore","useShallow","state","statuses","uid","Object","prototype","hasOwnProperty","call","followingUsers","hasKnownNotFollowing","some","storeAllFollowing","allFollowing","fetchAllStatuses","isSubmitting","setIsSubmitting","useState","result","allAlreadyFollowing","followedCount","results","length","every","entry","alreadyFollowing","anyFollowed","success","FollowButton","canUsePrivateApi","user","currentUser","useOxy","currentUserId","id","trim","rawUserIds","multiUserIds","useMemo","seen","Set","cleaned","raw","has","add","push","targetUserId","exports","_default","default"],"sourceRoot":"../../../../src","sources":["ui/components/FollowButton.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAMA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAEA,IAAAQ,QAAA,GAAAR,OAAA;AAAmD,IAAAS,WAAA,GAAAT,OAAA;AAEnD,MAAMU,wBAAwB,GAAG,YAAY;AAC7C,MAAMC,0BAA0B,GAAG,WAAW;;AAE9C;;AAYA;;AAOA;;AAWA;AACA;AACA;AACA;;AAGA,MAAMC,WAAW,GAAIC,KAAwB,IAC3C,SAAS,IAAIA,KAAK,IAAIC,KAAK,CAACC,OAAO,CAACF,KAAK,CAACG,OAAO,CAAC;AAEpD,MAAMC,iBAAiB,gBAAG,IAAAC,WAAI,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OAAO,CAACI,IAAI,CAACX,EAAE,CAAC;IAClB;IACA,OAAOO,OAAO;EAChB,CAAC,EAAE,CAACL,UAAU,EAAEH,aAAa,CAAC,CAAC;EAE/B,IAAI,CAACJ,gBAAgB,EAAE;IACrB,OAAO,IAAI;EACb;EAEA,IAAI5F,WAAW,CAACC,KAAK,CAAC,EAAE;IACtB,IAAImG,YAAY,CAACf,MAAM,KAAK,CAAC,EAAE;MAC7B,OAAO,IAAI;IACb;IACA,oBACE,IAAAxF,WAAA,CAAA2C,GAAA,EAACW,sBAAsB;MAAA,GACjBlD,KAAK;MACTG,OAAO,EAAEgG;IAAa,CACvB,CAAC;EAEN;EAEA,MAAMS,YAAY,GAAG5G,KAAK,CAACM,MAAM,GAAG0B,MAAM,CAAChC,KAAK,CAACM,MAAM,CAAC,CAAC2F,IAAI,CAAC,CAAC,GAAG,EAAE;EACpE,IAAI,CAACW,YAAY,IAAKb,aAAa,IAAIA,aAAa,KAAKa,YAAa,EAAE;IACtE,OAAO,IAAI;EACb;EAEA,oBACE,IAAAhH,WAAA,CAAA2C,GAAA,EAACnC,iBAAiB;IAAA,GACZJ,KAAK;IACTM,MAAM,EAAEsG,YAAa;IACrBrG,WAAW,EAAEA;EAAY,CAC1B,CAAC;AAEN,CAAC;AAACsG,OAAA,CAAAnB,YAAA,GAAAA,YAAA;AAAA,IAAAoB,QAAA,GAAAD,OAAA,CAAAE,OAAA,GAGarB,YAAY","ignoreList":[]}
|
|
@@ -80,7 +80,19 @@ const OxyAccountDialogScreen = ({
|
|
|
80
80
|
view
|
|
81
81
|
} = snapshot;
|
|
82
82
|
const showBack = view === 'qr' || view === 'signup' || view === 'add' && snapshot.accounts.length > 0;
|
|
83
|
-
const goToAccounts = (0, _react.useCallback)(() =>
|
|
83
|
+
const goToAccounts = (0, _react.useCallback)(() => {
|
|
84
|
+
if (!controller) return;
|
|
85
|
+
const {
|
|
86
|
+
view: currentView,
|
|
87
|
+
signIn
|
|
88
|
+
} = controller.getSnapshot();
|
|
89
|
+
// Backing out of an active request must withdraw it — otherwise the
|
|
90
|
+
// authorizeCode stays approvable until expiry (issue #691 phase 5).
|
|
91
|
+
if ((currentView === 'qr' || currentView === 'add') && (signIn.phase === 'starting' || signIn.phase === 'waiting')) {
|
|
92
|
+
controller.cancelSignIn();
|
|
93
|
+
}
|
|
94
|
+
controller.setView('accounts');
|
|
95
|
+
}, [controller]);
|
|
84
96
|
// An ENTRY view (accounts / signin — no in-dialog back of its own) that is
|
|
85
97
|
// MORPHED into a host surface (ManageAccount → switcher) has a frame beneath it,
|
|
86
98
|
// so its back CLOSES the dialog and reshapes back to the host — routed through
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_OxyContext","_useI18n","_useSurfaceHeader","_LogoText","_interopRequireDefault","_OxyAuthChooser","_jsxRuntime","e","__esModule","default","NAV_LOGO","jsx","height","OxyAccountDialogScreen","canGoBack","accountDialogController","controller","closeAccountDialog","useOxy","t","useI18n","subscribe","useCallback","listener","undefined","getSnapshot","EMPTY_SNAPSHOT","snapshot","useSyncExternalStore","view","showBack","accounts","length","goToAccounts","setView","backsToHost","copy","headerCopy","useSurfaceHeader","titleContent","title","subtitle","onBack","View","style","styles","bodyContent","children","onComplete","accountCount","activeAccountId","loading","error","switchingAccountId","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_OxyContext","_useI18n","_useSurfaceHeader","_LogoText","_interopRequireDefault","_OxyAuthChooser","_jsxRuntime","e","__esModule","default","NAV_LOGO","jsx","height","OxyAccountDialogScreen","canGoBack","accountDialogController","controller","closeAccountDialog","useOxy","t","useI18n","subscribe","useCallback","listener","undefined","getSnapshot","EMPTY_SNAPSHOT","snapshot","useSyncExternalStore","view","showBack","accounts","length","goToAccounts","currentView","signIn","phase","cancelSignIn","setView","backsToHost","copy","headerCopy","useSurfaceHeader","titleContent","title","subtitle","onBack","View","style","styles","bodyContent","children","onComplete","accountCount","activeAccountId","loading","error","switchingAccountId","authorizeCode","qrPayload","expiresAt","route","routeFailed","pushSentAt","openedAt","progress","commonsAvailability","SCREEN_MARGIN","StyleSheet","create","paddingTop","paddingBottom","paddingHorizontal","_default","exports"],"sourceRoot":"../../../../src","sources":["ui/components/OxyAccountDialogScreen.tsx"],"mappings":";;;;;;AAwBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAEA,IAAAK,SAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,eAAA,GAAAD,sBAAA,CAAAN,OAAA;AAA8C,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAM,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAhC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,QAAQ,gBAAG,IAAAJ,WAAA,CAAAK,GAAA,EAACR,SAAA,CAAAM,OAAQ;EAACG,MAAM,EAAE;AAAG,CAAE,CAAC;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,sBAAiD,GAAGA,CAAC;EAAEC;AAAU,CAAC,KAAK;EAC3E,MAAM;IAAEC,uBAAuB,EAAEC,UAAU;IAAEC;EAAmB,CAAC,GAAG,IAAAC,kBAAM,EAAC,CAAC;EAC5E,MAAM;IAAEC;EAAE,CAAC,GAAG,IAAAC,gBAAO,EAAC,CAAC;;EAEvB;EACA;EACA;EACA,MAAMC,SAAS,GAAG,IAAAC,kBAAW,EAC1BC,QAAoB,IAAMP,UAAU,GAAGA,UAAU,CAACK,SAAS,CAACE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rC0B,QAAQ,EAAE1B,CAAC,CAAC,iBAAiB,CAAC,IAAI;MACpC,CAAC;EACT;AACF;AAEA,MAAMO,cAAqC,GAAG;EAC5CG,IAAI,EAAE,UAAU;EAChBE,QAAQ,EAAE,EAAE;EACZuB,eAAe,EAAE,IAAI;EACrBC,OAAO,EAAE,KAAK;EACdC,KAAK,EAAE,IAAI;EACXC,kBAAkB,EAAE,IAAI;EACxBtB,MAAM,EAAE;IACNC,KAAK,EAAE,MAAM;IACbsB,aAAa,EAAE,IAAI;IACnBC,SAAS,EAAE,IAAI;IACfC,SAAS,EAAE,IAAI;IACfJ,KAAK,EAAE,IAAI;IACXK,KAAK,EAAE,IAAI;IACXC,WAAW,EAAE,KAAK;IAClBC,UAAU,EAAE,IAAI;IAChBC,QAAQ,EAAE,IAAI;IACdC,QAAQ,EAAE;EACZ,CAAC;EACDC,mBAAmB,EAAE;AACvB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,aAAa,GAAG,EAAE;AAExB,MAAMlB,MAAM,GAAGmB,uBAAU,CAACC,MAAM,CAAC;EAC/BnB,WAAW,EAAE;IACXoB,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE,CAAC;IAChBC,iBAAiB,EAAEL;EACrB;AACF,CAAC,CAAC;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAjE,OAAA,GAEYI,sBAAsB","ignoreList":[]}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var
|
|
9
|
+
var _toast = require("@oxyhq/bloom/toast");
|
|
10
10
|
var _theme = require("@oxyhq/bloom/theme");
|
|
11
11
|
var _core = require("@oxyhq/core");
|
|
12
12
|
var _reactQuery = require("@tanstack/react-query");
|
|
@@ -72,7 +72,8 @@ const ACCOUNTS_APP_URL = 'https://accounts.oxy.so';
|
|
|
72
72
|
* supplies its own `onComplete`.
|
|
73
73
|
*/
|
|
74
74
|
const OxyAuthChooser = ({
|
|
75
|
-
onComplete
|
|
75
|
+
onComplete,
|
|
76
|
+
autoStartSignIn: autoStartSignInEnabled = true
|
|
76
77
|
}) => {
|
|
77
78
|
const {
|
|
78
79
|
accountDialogController: controller,
|
|
@@ -114,7 +115,7 @@ const OxyAuthChooser = ({
|
|
|
114
115
|
// A cancelled/failed ceremony keeps the view open so the user can retry
|
|
115
116
|
// or fall back to the QR — surface the reason as a toast (owner mandate:
|
|
116
117
|
// errors never render inline inside the dialog), never swallow.
|
|
117
|
-
|
|
118
|
+
_toast.toast.error(error instanceof Error && error.message ? error.message : t('accountSwitcher.toasts.passkeySignInFailed'));
|
|
118
119
|
} finally {
|
|
119
120
|
setSignInPasskeyPending(false);
|
|
120
121
|
}
|
|
@@ -129,7 +130,7 @@ const OxyAuthChooser = ({
|
|
|
129
130
|
});
|
|
130
131
|
onComplete?.();
|
|
131
132
|
} catch (error) {
|
|
132
|
-
|
|
133
|
+
_toast.toast.error(error instanceof Error && error.message ? error.message : t('signup.toasts.passkeyCreateFailed'));
|
|
133
134
|
} finally {
|
|
134
135
|
setCreatePasskeyPending(false);
|
|
135
136
|
}
|
|
@@ -146,14 +147,14 @@ const OxyAuthChooser = ({
|
|
|
146
147
|
// a no-op on native (button-driven). Reads the live snapshot at call time (an
|
|
147
148
|
// event callback, not render), so it is stable across renders.
|
|
148
149
|
const autoStartSignIn = (0, _react.useCallback)(() => {
|
|
149
|
-
if (!controller || !(0, _isWebBrowser.isWebBrowser)()) return;
|
|
150
|
+
if (!autoStartSignInEnabled || !controller || !(0, _isWebBrowser.isWebBrowser)()) return;
|
|
150
151
|
const {
|
|
151
152
|
view: currentView,
|
|
152
153
|
signIn
|
|
153
154
|
} = controller.getSnapshot();
|
|
154
155
|
if (currentView !== 'signin' && currentView !== 'add' || signIn.phase !== 'idle') return;
|
|
155
156
|
void controller.signInWithOxy();
|
|
156
|
-
}, [controller]);
|
|
157
|
+
}, [autoStartSignInEnabled, controller]);
|
|
157
158
|
|
|
158
159
|
// Bind the headless controller. `getSnapshot` returns a stable reference
|
|
159
160
|
// between changes, so it is `useSyncExternalStore`-safe. Guard the no-provider
|
|
@@ -178,7 +179,7 @@ const OxyAuthChooser = ({
|
|
|
178
179
|
} = controller.getSnapshot();
|
|
179
180
|
if (signIn.phase === 'error' && signIn.error && signIn.error !== lastToastedSignInError) {
|
|
180
181
|
lastToastedSignInError = signIn.error;
|
|
181
|
-
|
|
182
|
+
_toast.toast.error(signIn.error);
|
|
182
183
|
} else if (signIn.phase !== 'error') {
|
|
183
184
|
lastToastedSignInError = null;
|
|
184
185
|
}
|
|
@@ -195,34 +196,29 @@ const OxyAuthChooser = ({
|
|
|
195
196
|
const {
|
|
196
197
|
view
|
|
197
198
|
} = snapshot;
|
|
198
|
-
const [switching, setSwitching] = (0, _react.useState)(false);
|
|
199
199
|
const handleSwitch = (0, _react.useCallback)(async accountId => {
|
|
200
|
-
if (!controller
|
|
201
|
-
if (
|
|
200
|
+
if (!controller) return;
|
|
201
|
+
if (controller.getSnapshot().switchingAccountId) return;
|
|
202
|
+
if (accountId === controller.getSnapshot().activeAccountId) {
|
|
202
203
|
onComplete?.();
|
|
203
204
|
return;
|
|
204
205
|
}
|
|
205
|
-
setSwitching(true);
|
|
206
206
|
try {
|
|
207
207
|
await controller.switchTo(accountId);
|
|
208
|
-
// `switchTo`
|
|
209
|
-
//
|
|
210
|
-
//
|
|
211
|
-
// and NOT a snapshot-reaction). On success reload the app's account
|
|
212
|
-
// graph and drop cached account-scoped data so the new active identity
|
|
213
|
-
// re-fetches — the same side effects the context's own
|
|
214
|
-
// `switchToAccount` performs.
|
|
208
|
+
// `switchTo` records failures on the controller snapshot. Read that
|
|
209
|
+
// state after the operation so the same path works with both the real
|
|
210
|
+
// controller and framework test doubles that return void.
|
|
215
211
|
if (controller.getSnapshot().error) {
|
|
216
|
-
|
|
212
|
+
_toast.toast.error(t('accountSwitcher.toasts.switchFailed'));
|
|
217
213
|
return;
|
|
218
214
|
}
|
|
219
215
|
void refreshAccounts();
|
|
220
216
|
queryClient.invalidateQueries();
|
|
221
217
|
onComplete?.();
|
|
222
|
-
}
|
|
223
|
-
|
|
218
|
+
} catch {
|
|
219
|
+
// `switchTo` is documented as non-throwing; guard against regressions.
|
|
224
220
|
}
|
|
225
|
-
}, [controller,
|
|
221
|
+
}, [controller, onComplete, refreshAccounts, queryClient, t]);
|
|
226
222
|
const handleManage = (0, _react.useCallback)(() => {
|
|
227
223
|
onComplete?.();
|
|
228
224
|
const hooks = (0, _accountDialogManager.getAccountDialogConsumerHooks)();
|
|
@@ -279,7 +275,9 @@ const OxyAuthChooser = ({
|
|
|
279
275
|
// Real storage usage for the account menu's "Oxy storage" block. Disabled
|
|
280
276
|
// (no fetch) until a private-API session exists, so it is inert on the
|
|
281
277
|
// sign-in/request/sign-up views; when present the block shows live used/total.
|
|
282
|
-
const storageQuery = (0, _useServicesQueries.useAccountStorageUsage)(
|
|
278
|
+
const storageQuery = (0, _useServicesQueries.useAccountStorageUsage)({
|
|
279
|
+
enabled: view === 'accounts'
|
|
280
|
+
});
|
|
283
281
|
const storage = (0, _react.useMemo)(() => storageQuery.data ? {
|
|
284
282
|
usedBytes: storageQuery.data.totalUsedBytes,
|
|
285
283
|
limitBytes: storageQuery.data.totalLimitBytes
|
|
@@ -319,7 +317,14 @@ const OxyAuthChooser = ({
|
|
|
319
317
|
onSignOut: () => {
|
|
320
318
|
void logout();
|
|
321
319
|
onComplete?.();
|
|
322
|
-
}
|
|
320
|
+
},
|
|
321
|
+
customItems: ((0, _accountDialogManager.getAccountDialogConsumerHooks)()?.menuItems ?? []).map(item => ({
|
|
322
|
+
...item,
|
|
323
|
+
onPress: () => {
|
|
324
|
+
onComplete?.();
|
|
325
|
+
item.onPress();
|
|
326
|
+
}
|
|
327
|
+
}))
|
|
323
328
|
};
|
|
324
329
|
}, [onComplete, showBottomSheet, logout]);
|
|
325
330
|
if (!controller) {
|