@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_completeOAuthCode","_isWebBrowser","tryCompleteOAuthReturn","opts","isWebBrowser","location","globalThis","params","URLSearchParams","search","code","get","oauthError","stripOAuthParamsFromUrl","clearOAuthHandshake","clientId","logger","warn","component","
|
|
1
|
+
{"version":3,"names":["_core","require","_completeOAuthCode","_isWebBrowser","tryCompleteOAuthReturn","opts","isWebBrowser","location","globalThis","params","URLSearchParams","search","code","get","oauthError","stripOAuthParamsFromUrl","clearOAuthHandshake","clientId","logger","warn","component","handshake","readOAuthHandshake","redirectUri","canonicalizeOAuthRedirectUri","authRedirectUri","origin","result","completeOAuthCode","oxyServices","returnedState","commitSession","cleanup","ok","replaceUrlAfterOAuthReturn","fallbackUrl","history","replaceState","current","pathname","hash","target","consumeOAuthReturnPath","state","dispatch","dispatchEvent","event","PopStateEvent","Event","call","error","url","URL","href","searchParams","delete"],"sourceRoot":"../../../../src","sources":["ui/utils/oauthReturn.ts"],"mappings":";;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAOA,IAAAC,kBAAA,GAAAD,OAAA;AAEA,IAAAE,aAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeG,sBAAsBA,CAACC,IAK5C,EAAoB;EACnB,IAAI,CAAC,IAAAC,0BAAY,EAAC,CAAC,EAAE,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C,UAAU,CAAgDD,QAAQ;EACpF,MAAM6B,OAAO,GAAI5B,UAAU,CAA2B4B,OAAO;EAC7D,IAAI,CAAC7B,QAAQ,IAAI,CAAC6B,OAAO,EAAEC,YAAY,EAAE;EACzC,MAAMc,GAAG,GAAG,IAAIC,GAAG,CAAC7C,QAAQ,CAAC8C,IAAI,CAAC;EAClCF,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,MAAM,CAAC;EAC/BJ,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,OAAO,CAAC;EAChCJ,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,OAAO,CAAC;EAChCJ,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,mBAAmB,CAAC;EAC5CrB,0BAA0B,CAAC,GAAGiB,GAAG,CAACZ,QAAQ,GAAGY,GAAG,CAACxC,MAAM,GAAGwC,GAAG,CAACX,IAAI,EAAE,CAAC;AACvE","ignoreList":[]}
|
|
@@ -8,9 +8,9 @@ var _core = require("@oxyhq/core");
|
|
|
8
8
|
/**
|
|
9
9
|
* User display name and date formatting utilities.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* Display-name helpers follow the API contract: prefer `name.displayName` when
|
|
12
|
+
* present, otherwise fall back to the normalized handle via
|
|
13
|
+
* `getNormalizedUserHandle`.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -30,41 +30,40 @@ const formatDate = dateString => {
|
|
|
30
30
|
return '';
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
+
exports.formatDate = formatDate;
|
|
34
|
+
function readDisplayName(user) {
|
|
35
|
+
const name = user?.name;
|
|
36
|
+
if (!name || typeof name !== 'object') return '';
|
|
37
|
+
return typeof name.displayName === 'string' ? name.displayName.trim() : '';
|
|
38
|
+
}
|
|
33
39
|
|
|
34
40
|
/**
|
|
35
41
|
* Gets a display name from user data.
|
|
36
42
|
*
|
|
37
|
-
* Prefers
|
|
38
|
-
* (derived from publicKey) → translated "Unnamed".
|
|
39
|
-
*
|
|
40
|
-
* @param user - User-like object with optional name/username/publicKey
|
|
41
|
-
* @param locale - Optional locale for the final fallback label
|
|
43
|
+
* Prefers API `name.displayName`, then the normalized handle.
|
|
42
44
|
*/
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
+
const getDisplayName = user => {
|
|
46
|
+
const displayName = readDisplayName(user);
|
|
47
|
+
if (displayName) return displayName;
|
|
48
|
+
return (0, _core.getNormalizedUserHandle)(user) ?? '';
|
|
49
|
+
};
|
|
45
50
|
|
|
46
51
|
/**
|
|
47
|
-
* Gets a short display name (first
|
|
48
|
-
*
|
|
49
|
-
* Used for compact UI (e.g. greetings). Falls back to the full display name
|
|
50
|
-
* helper, which also handles publicKey-only accounts.
|
|
52
|
+
* Gets a short display name (first token) for compact UI.
|
|
51
53
|
*/
|
|
52
54
|
exports.getDisplayName = getDisplayName;
|
|
53
|
-
const getShortDisplayName =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if (first) return first;
|
|
59
|
-
const full = typeof name.full === 'string' ? name.full.trim() : '';
|
|
60
|
-
if (full) return full.split(' ')[0];
|
|
61
|
-
} else if (typeof name === 'string' && name.trim()) {
|
|
62
|
-
return name.trim().split(' ')[0];
|
|
55
|
+
const getShortDisplayName = user => {
|
|
56
|
+
const displayName = readDisplayName(user);
|
|
57
|
+
if (displayName) {
|
|
58
|
+
const firstToken = displayName.split(/\s+/).find(Boolean);
|
|
59
|
+
if (firstToken) return firstToken;
|
|
63
60
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
61
|
+
const handle = (0, _core.getNormalizedUserHandle)(user);
|
|
62
|
+
if (handle) {
|
|
63
|
+
const firstToken = handle.split(/\s+/).find(Boolean);
|
|
64
|
+
return firstToken ?? handle;
|
|
65
|
+
}
|
|
66
|
+
return '';
|
|
68
67
|
};
|
|
69
68
|
exports.getShortDisplayName = getShortDisplayName;
|
|
70
69
|
//# sourceMappingURL=userUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","formatDate","dateString","date","Date","Number","isNaN","getTime","toLocaleDateString","month","day","year","exports","
|
|
1
|
+
{"version":3,"names":["_core","require","formatDate","dateString","date","Date","Number","isNaN","getTime","toLocaleDateString","month","day","year","exports","readDisplayName","user","name","displayName","trim","getDisplayName","getNormalizedUserHandle","getShortDisplayName","firstToken","split","find","Boolean","handle"],"sourceRoot":"../../../../src","sources":["ui/utils/userUtils.ts"],"mappings":";;;;;;AAQA,IAAAA,KAAA,GAAAC,OAAA;AARA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACO,MAAMC,UAAU,GAAIC,UAA4C,IAAa;EAClF,IAAI,CAACA,UAAU,EAAE,OAAO,EAAE;EAE1B,IAAI;IACF,MAAMC,IAAI,GAAGD,UAAU,YAAYE,IAAI,GAAGF,UAAU,GAAG,IAAIE,IAAI,CAACF,UAAU,CAAC;IAC3E,IAAIG,MAAM,CAACC,KAAK,CAACH,IAAI,CAACI,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE;IAE3C,OAAOJ,IAAI,CAACK,kBAAkB,CAAC,OAAO,EAAE;MACtCC,KAAK,EAAE,OAAO;MACdC,GAAG,EAAE,SAAS;MACdC,IAAI,EAAE;IACR,CAAC,CAAC;EACJ,CAAC,CAAC,MAAM;IACN,OAAO,EAAE;EACX;AACF,CAAC;AAACC,OAAA,CAAAX,UAAA,GAAAA,UAAA;AAEF,SAASY,eAAeA,CAACC,IAA6C,EAAU;EAC9E,MAAMC,IAAI,GAAGD,IAAI,EAAEC,IAAI;EACvB,IAAI,CAACA,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE,OAAO,EAAE;EAChD,OAAO,OAAOA,IAAI,CAACC,WAAW,KAAK,QAAQ,GAAGD,IAAI,CAACC,WAAW,CAACC,IAAI,CAAC,CAAC,GAAG,EAAE;AAC5E;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMC,cAAc,GACzBJ,IAA6C,IAClC;EACX,MAAME,WAAW,GAAGH,eAAe,CAACC,IAAI,CAAC;EACzC,IAAIE,WAAW,EAAE,OAAOA,WAAW;EACnC,OAAO,IAAAG,6BAAuB,EAACL,IAAI,CAAC,IAAI,EAAE;AAC5C,CAAC;;AAED;AACA;AACA;AAFAF,OAAA,CAAAM,cAAA,GAAAA,cAAA;AAGO,MAAME,mBAAmB,GAC9BN,IAA6C,IAClC;EACX,MAAME,WAAW,GAAGH,eAAe,CAACC,IAAI,CAAC;EACzC,IAAIE,WAAW,EAAE;IACf,MAAMK,UAAU,GAAGL,WAAW,CAACM,KAAK,CAAC,KAAK,CAAC,CAACC,IAAI,CAACC,OAAO,CAAC;IACzD,IAAIH,UAAU,EAAE,OAAOA,UAAU;EACnC;EAEA,MAAMI,MAAM,GAAG,IAAAN,6BAAuB,EAACL,IAAI,CAAC;EAC5C,IAAIW,MAAM,EAAE;IACV,MAAMJ,UAAU,GAAGI,MAAM,CAACH,KAAK,CAAC,KAAK,CAAC,CAACC,IAAI,CAACC,OAAO,CAAC;IACpD,OAAOH,UAAU,IAAII,MAAM;EAC7B;EAEA,OAAO,EAAE;AACX,CAAC;AAACb,OAAA,CAAAQ,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -103,14 +103,26 @@ export { handleAuthError, isInvalidSessionError, isTimeoutOrNetworkError, extrac
|
|
|
103
103
|
// ---------------------------------------------------------------------------
|
|
104
104
|
export { useFileFiltering } from "./ui/hooks/useFileFiltering.js";
|
|
105
105
|
// ---------------------------------------------------------------------------
|
|
106
|
-
// Device notifications
|
|
107
|
-
// ---------------------------------------------------------------------------
|
|
108
|
-
// The
|
|
109
|
-
//
|
|
110
|
-
//
|
|
111
|
-
//
|
|
112
|
-
//
|
|
113
|
-
|
|
106
|
+
// Device notifications — DELIBERATELY NOT EXPORTED HERE
|
|
107
|
+
// ---------------------------------------------------------------------------
|
|
108
|
+
// The `expo-notifications` adapter lives behind its own entry point:
|
|
109
|
+
//
|
|
110
|
+
// import { getExpoPushToken } from '@oxyhq/services/notifications';
|
|
111
|
+
//
|
|
112
|
+
// It is the one module in this package whose dependencies (`expo-notifications`
|
|
113
|
+
// and `expo-constants`) are optional peers that an app which does not use push
|
|
114
|
+
// genuinely never installs. Re-exporting it from THIS barrel is what made that
|
|
115
|
+
// optionality a lie: a barrel export puts the module in the import graph of
|
|
116
|
+
// every consumer, and `tsc` must resolve the specifier of an `import()` even
|
|
117
|
+
// when the call is lazy and wrapped in try/catch — so every consumer without
|
|
118
|
+
// `expo-notifications` failed with TS2307 (plus TS7006 cascades) whether or not
|
|
119
|
+
// it had ever heard of push. Behind a subpath the module is only ever pulled in
|
|
120
|
+
// by an app that asked for it, which is what "optional peer" is supposed to
|
|
121
|
+
// mean.
|
|
122
|
+
//
|
|
123
|
+
// Do NOT re-add these exports here. `__tests__/notifications/barrelIsolation.test.ts`
|
|
124
|
+
// fails if you do.
|
|
125
|
+
|
|
114
126
|
// ---------------------------------------------------------------------------
|
|
115
127
|
// UI components
|
|
116
128
|
// ---------------------------------------------------------------------------
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["setPlatformOS","Platform","OS","default","OxyProvider","useOxy","useAuth","IdentityBoundSessionError","useAuthStore","useAccountStore","useAssetStore","useAssets","useAssetsStore","useAsset","useUploadProgress","useAssetLoading","useAssetErrors","useAssetsByApp","useAssetsByEntity","useAssetUsageCount","useIsAssetLinked","setOxyAssetInstance","useFileDownloadUrl","useFollow","useFollowerCounts","useSeedFollowStatuses","useStorage","useUserProfile","useUserProfiles","useCurrentUser","useUserById","useUserByUsername","useUsersBySessions","usePrivacySettings","useConnectedApps","useSessions","useSession","useDeviceSessions","useUserDevices","useSecurityInfo","useAccountStorageUsage","useSecurityActivity","useRecentSecurityActivity","useInfiniteSecurityActivity","useAuthMethods","useUserSubscription","useUserPayments","useUserWallet","useUserWalletTransactions","useUpdateProfile","useUploadAvatar","useUpdateAccountSettings","useUpdatePrivacySettings","useUpdateNotificationPreferences","useUpdateUserPreferences","useRevokeConnectedApp","useUploadFile","useSwitchSession","useLogoutSession","useLogoutAll","useUpdateDeviceName","useRemoveDevice","createProfileMutation","createGenericMutation","mutationKeys","queryKeys","invalidateAccountQueries","invalidateUserQueries","invalidateSessionQueries","invalidateDeviceQueries","invalidatePrivacyQueries","invalidateSecurityQueries","invalidateStorageQueries","invalidatePaymentsQueries","invalidateConnectedAppsQueries","invalidateAuthMethodsQueries","upsertCachedUser","upsertCachedUsers","useMutationStatus","useOnlineStatus","useOxyEvent","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage","useFileFiltering","
|
|
1
|
+
{"version":3,"names":["setPlatformOS","Platform","OS","default","OxyProvider","useOxy","useAuth","IdentityBoundSessionError","useAuthStore","useAccountStore","useAssetStore","useAssets","useAssetsStore","useAsset","useUploadProgress","useAssetLoading","useAssetErrors","useAssetsByApp","useAssetsByEntity","useAssetUsageCount","useIsAssetLinked","setOxyAssetInstance","useFileDownloadUrl","useFollow","useFollowerCounts","useSeedFollowStatuses","useStorage","useUserProfile","useUserProfiles","useCurrentUser","useUserById","useUserByUsername","useUsersBySessions","usePrivacySettings","useConnectedApps","useSessions","useSession","useDeviceSessions","useUserDevices","useSecurityInfo","useAccountStorageUsage","useSecurityActivity","useRecentSecurityActivity","useInfiniteSecurityActivity","useAuthMethods","useUserSubscription","useUserPayments","useUserWallet","useUserWalletTransactions","useUpdateProfile","useUploadAvatar","useUpdateAccountSettings","useUpdatePrivacySettings","useUpdateNotificationPreferences","useUpdateUserPreferences","useRevokeConnectedApp","useUploadFile","useSwitchSession","useLogoutSession","useLogoutAll","useUpdateDeviceName","useRemoveDevice","createProfileMutation","createGenericMutation","mutationKeys","queryKeys","invalidateAccountQueries","invalidateUserQueries","invalidateSessionQueries","invalidateDeviceQueries","invalidatePrivacyQueries","invalidateSecurityQueries","invalidateStorageQueries","invalidatePaymentsQueries","invalidateConnectedAppsQueries","invalidateAuthMethodsQueries","upsertCachedUser","upsertCachedUsers","useMutationStatus","useOnlineStatus","useOxyEvent","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage","useFileFiltering","OXY_OAUTH_STATE_STORAGE_KEY","OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY","OxySignInButton","openOAuthPopup","OxyAuthPrompt","OxyOAuthCallback","OxyConsentScreen","RequireOxyAuth","FollowButton","OxyPayButton","LogoIcon","LogoText","ProfileButton","OxyAuthChooser","OxySignInRequestSurface","useSwitchableAccounts","ProfileScreen","ManageAccountScreen","NotificationsScreen","PreferencesScreen","ConnectedAppsScreen","CreateAccountScreen","AccountMembersScreen","AccountSettingsScreen","showBottomSheet","closeBottomSheet","useSurfaceHeader","SurfaceHeaderAction","openAccountDialog","closeAccountDialog","subscribeToAccountDialog"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,SAASA,aAAa,QAAyB,aAAa;AAC5D,SAASC,QAAQ,QAAQ,cAAc;AACvCD,aAAa,CAACC,QAAQ,CAACC,EAAgB,CAAC;;AAExC;AACA;AACA;AACA,SAASC,OAAO,IAAIC,WAAW,QAAQ,gCAA6B;AACpE,SAASC,MAAM,QAAQ,4BAAyB;AAEhD,SAASC,OAAO,QAAQ,uBAAoB;AAE5C;AACA;AACA;AACA,SAASC,yBAAyB,QAAQ,iCAA8B;;AAExE;AACA;AACA;AACA,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SAASC,eAAe,QAAQ,6BAA0B;AAC1D,SACIC,aAAa,EACbC,SAAS,IAAIC,cAAc,EAC3BC,QAAQ,EACRC,iBAAiB,EACjBC,eAAe,E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ACA,SAASC,qBAAqB,QAAQ,qCAAkC;AAGxE;AACA,SAASlG,OAAO,IAAImG,aAAa,QAAQ,+BAA4B;AACrE,SAASnG,OAAO,IAAIoG,mBAAmB,QAAQ,qCAAkC;AACjF,SAASpG,OAAO,IAAIqG,mBAAmB,QAAQ,qCAAkC;AACjF,SAASrG,OAAO,IAAIsG,iBAAiB,QAAQ,mCAAgC;AAC7E,SAAStG,OAAO,IAAIuG,mBAAmB,QAAQ,qCAAkC;;AAEjF;AACA,SAASvG,OAAO,IAAIwG,mBAAmB,QAAQ,qCAAkC;AACjF,SAASxG,OAAO,IAAIyG,oBAAoB,QAAQ,sCAAmC;AACnF,SAASzG,OAAO,IAAI0G,qBAAqB,QAAQ,uCAAoC;;AAErF;AACA;AACA;AACA,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,uCAAoC;AAGtF;AACA;AACA;AACA,SAASC,gBAAgB,QAAmC,gCAA6B;AACzF,SAASC,mBAAmB,QAAuC,wCAAqC;;AAExG;AACA;AACA;AACA;AACA,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,wBAAwB,QACnB,yCAAsC","ignoreList":[]}
|
|
@@ -10,6 +10,25 @@
|
|
|
10
10
|
* already lives in `@oxyhq/core`; core may never import an `expo-*` module, and
|
|
11
11
|
* this adapter is the Expo-side half that closes that gap.
|
|
12
12
|
*
|
|
13
|
+
* ## Reached through its OWN entry point, never the root barrel
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* import { getExpoPushToken } from '@oxyhq/services/notifications';
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* This is the only module in the package that depends on peers an app which
|
|
20
|
+
* does not use push genuinely never installs, and a barrel export would put it
|
|
21
|
+
* in EVERY consumer's import graph. `tsc` resolves the specifier of an
|
|
22
|
+
* `import()` even when the call is lazy and inside a try/catch, so a barrel
|
|
23
|
+
* export turned "optional peer" into a hard requirement: consumers with no
|
|
24
|
+
* interest in push failed to type-check with TS2307. The subpath is what keeps
|
|
25
|
+
* the optionality honest — see the note in `src/index.ts`.
|
|
26
|
+
*
|
|
27
|
+
* Metro is the resolver that behaves differently here, and in the useful
|
|
28
|
+
* direction: an unresolvable DYNAMIC `import()` bundles fine (the `catch` below
|
|
29
|
+
* takes over at runtime), where a static import fails the build outright. That
|
|
30
|
+
* is why the runtime shape below must stay dynamic-and-guarded.
|
|
31
|
+
*
|
|
13
32
|
* ## Native-only by construction
|
|
14
33
|
*
|
|
15
34
|
* Every entry point resolves its null/no-op result from `Platform.OS` BEFORE the
|
|
@@ -281,6 +300,49 @@ export async function takeLaunchNotificationData() {
|
|
|
281
300
|
*/
|
|
282
301
|
let foregroundHandlerAttempted = false;
|
|
283
302
|
|
|
303
|
+
/** How prominently Android surfaces a channel's notifications. */
|
|
304
|
+
|
|
305
|
+
/** An Android notification channel this app delivers on. */
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Create (or update) an Android notification channel.
|
|
309
|
+
*
|
|
310
|
+
* A no-op everywhere but Android: iOS has no channels, and web never loads the
|
|
311
|
+
* native module. Call it BEFORE registering a push token, so the very first
|
|
312
|
+
* notification the server sends already has a channel to land on.
|
|
313
|
+
*
|
|
314
|
+
* Failure is non-fatal and logged: a missing channel costs visibility, and
|
|
315
|
+
* refusing to register a token over it would cost the feature entirely.
|
|
316
|
+
*
|
|
317
|
+
* @returns Whether the channel was actually created (`false` off Android, or
|
|
318
|
+
* when the native module is unavailable, or when creation failed).
|
|
319
|
+
*/
|
|
320
|
+
export async function ensureNotificationChannel(spec) {
|
|
321
|
+
if (Platform.OS !== 'android') {
|
|
322
|
+
return false;
|
|
323
|
+
}
|
|
324
|
+
const notifications = await loadNotifications();
|
|
325
|
+
if (!notifications) {
|
|
326
|
+
return false;
|
|
327
|
+
}
|
|
328
|
+
try {
|
|
329
|
+
await notifications.setNotificationChannelAsync(spec.id, {
|
|
330
|
+
name: spec.name,
|
|
331
|
+
importance: spec.importance === 'high' ? notifications.AndroidImportance.HIGH : notifications.AndroidImportance.DEFAULT,
|
|
332
|
+
...(spec.description ? {
|
|
333
|
+
description: spec.description
|
|
334
|
+
} : {})
|
|
335
|
+
});
|
|
336
|
+
return true;
|
|
337
|
+
} catch (error) {
|
|
338
|
+
log.warn('could not create the notification channel', {
|
|
339
|
+
method: 'ensureNotificationChannel',
|
|
340
|
+
channelId: spec.id
|
|
341
|
+
}, error);
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
284
346
|
/**
|
|
285
347
|
* Install the ONE process-wide handler that decides whether an incoming
|
|
286
348
|
* notification is shown while the app is in the FOREGROUND.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createLogger","Platform","log","isRecord","value","loadNotifications","OS","error","warn","method","easProjectId","constants","default","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":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,aAAa;AAE1C,SAASC,QAAQ,QAAQ,cAAc;AAEvC,MAAMC,GAAG,GAAGF,YAAY,CAAC,qBAAqB,CAAC;AAK/C,SAASG,QAAQA,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nE,MAAMb,aAAa,GAAG,MAAMnB,iBAAiB,CAAC,CAAC;EAC/C,IAAI,CAACmB,aAAa,EAAE;IAClB,OAAO,IAAI;EACb;EACA,IAAI;IACF,MAAMc,QAAQ,GAAGd,aAAa,CAACe,2BAA2B,CAAC,CAAC;IAC5D,IAAI,CAACD,QAAQ,EAAE;MACb,OAAO,IAAI;IACb;IACA,MAAMF,IAAa,GAAGE,QAAQ,CAACE,YAAY,CAACC,OAAO,CAACC,OAAO,CAACN,IAAI;IAChE,IAAI;MACFZ,aAAa,CAACmB,6BAA6B,CAAC,CAAC;IAC/C,CAAC,CAAC,OAAOC,UAAU,EAAE;MACnB1C,GAAG,CAACM,IAAI,CACN,qDAAqD,EACrD;QAAEC,MAAM,EAAE;MAA6B,CAAC,EACxCmC,UACF,CAAC;IACH;IACA,OAAOR,IAAI;EACb,CAAC,CAAC,OAAO7B,KAAK,EAAE;IACdL,GAAG,CAACM,IAAI,CACN,2CAA2C,EAC3C;MAAEC,MAAM,EAAE;IAA6B,CAAC,EACxCF,KACF,CAAC;IACD,OAAO,IAAI;EACb;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIsC,0BAA0B,GAAG,KAAK;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,
|
|
1
|
+
{"version":3,"names":["createLogger","Platform","log","isRecord","value","loadNotifications","OS","error","warn","method","easProjectId","constants","default","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":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,aAAa;AAE1C,SAASC,QAAQ,QAAQ,cAAc;AAEvC,MAAMC,GAAG,GAAGF,YAAY,CAAC,qBAAqB,CAAC;AAK/C,SAASG,QAAQA,CAACC,KAAc,EAAoC;EAClE,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeC,iBAAiBA,CAAA,EAAwC;EACtE,IAAIJ,QAAQ,CAACK,EAAE,KAAK,KAAK,EAAE;IACzB,OAAO,IAAI;EACb;EACA,IAAI;IACF,OAAO,MAAM,MAAM,CAAC,oBAAoB,CAAC;EAC3C,CAAC,CAAC,OAAOC,KAAK,EAAE;IACdL,GAAG,CAACM,IAAI,CACN,oEAAoE,EACpE;MAAEC,MAAM,EAAE;IAAoB,CAAC,EAC/BF,KACF,CAAC;IACD,OAAO,IAAI;EACb;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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Y,CAACC,OAAO,CAACC,OAAO,CAACN,IAAI,CAAC;IACtD,CAAC,CAAC;IACF,OAAO,MAAMgC,YAAY,CAACE,MAAM,CAAC,CAAC;EACpC,CAAC,CAAC,OAAO/D,KAAK,EAAE;IACdL,GAAG,CAACM,IAAI,CACN,0CAA0C,EAC1C;MAAEC,MAAM,EAAE;IAAmC,CAAC,EAC9CF,KACF,CAAC;IACD,OAAO,MAAMc,SAAS;EACxB;AACF","ignoreList":[]}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { logger as loggerUtil, runSessionColdBoot } from '@oxyhq/core';
|
|
4
4
|
import { loadPersistedDeviceCredential } from "../utils/deviceCredential.js";
|
|
5
|
-
import {
|
|
6
|
-
import { tryCompleteOAuthReturn, consumeHubSyncFailure } from "../utils/oauthReturn.js";
|
|
5
|
+
import { tryCompleteOAuthReturn } from "../utils/oauthReturn.js";
|
|
7
6
|
import { isWebBrowser } from "../utils/isWebBrowser.js";
|
|
8
|
-
import {
|
|
7
|
+
import { isNetConnectivityExplicitlyOffline } from "../utils/netConnectivity.js";
|
|
9
8
|
/** How long the cold boot waits for the post-boot SessionClient handoff (ms). */
|
|
10
9
|
export const SESSION_HANDOFF_DEADLINE_MS = 6000;
|
|
11
10
|
|
|
@@ -51,8 +50,8 @@ async function detectOfflineHint() {
|
|
|
51
50
|
setTimeout(() => resolve(null), OFFLINE_PROBE_TIMEOUT_MS);
|
|
52
51
|
})]);
|
|
53
52
|
// `null` ⇒ the probe timed out (unknown → assume online). Only an explicit
|
|
54
|
-
//
|
|
55
|
-
return state
|
|
53
|
+
// disconnected / unreachable verdict disables the network steps.
|
|
54
|
+
return isNetConnectivityExplicitlyOffline(state);
|
|
56
55
|
} catch {
|
|
57
56
|
// NetInfo missing / probe threw — never block sign-in on a probe failure.
|
|
58
57
|
return false;
|
|
@@ -62,19 +61,19 @@ async function detectOfflineHint() {
|
|
|
62
61
|
* Device-first cold boot for `@oxyhq/services` providers.
|
|
63
62
|
*
|
|
64
63
|
* Ordered pipeline:
|
|
65
|
-
* 1. Complete OAuth authorization-code return (web)
|
|
64
|
+
* 1. Complete an OAuth authorization-code return already on the URL (web)
|
|
66
65
|
* 2. `runSessionColdBoot` — device-secret mint (+ native shared-key, or the
|
|
67
66
|
* primary-identity-key lane in `sessionMode: 'identity'`)
|
|
68
|
-
* 3. Silent OAuth for all web apps when mint finds no session
|
|
69
67
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
68
|
+
* Step 1 is ACCOUNT-MODE ONLY: it commits whichever account the IdP resolves,
|
|
69
|
+
* which for an identity-bound client is somebody else's account by construction.
|
|
70
|
+
* In `'identity'` mode the boot is exactly step 2.
|
|
73
71
|
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
72
|
+
* The boot NEVER navigates the top-level window. There is no automatic
|
|
73
|
+
* `prompt=none` bounce to the IdP: a web origin with no local device credential
|
|
74
|
+
* resolves SIGNED OUT and waits for the user's next explicit "Continue with
|
|
75
|
+
* Oxy", which opens a popup from a real gesture (#691 phase 7b). Step 1 is not a
|
|
76
|
+
* navigation — it only consumes a code that is already in the address bar.
|
|
78
77
|
*/
|
|
79
78
|
export async function runProviderColdBoot(opts) {
|
|
80
79
|
const {
|
|
@@ -82,10 +81,8 @@ export async function runProviderColdBoot(opts) {
|
|
|
82
81
|
authStore,
|
|
83
82
|
clientId,
|
|
84
83
|
authRedirectUri,
|
|
85
|
-
authorizeBaseUrl,
|
|
86
84
|
sessionMode = 'account',
|
|
87
85
|
identity,
|
|
88
|
-
webAuthMode = 'redirect',
|
|
89
86
|
sessionClient,
|
|
90
87
|
syncDeviceCredentialToHost,
|
|
91
88
|
commitSession,
|
|
@@ -95,28 +92,18 @@ export async function runProviderColdBoot(opts) {
|
|
|
95
92
|
const identityBound = sessionMode === 'identity';
|
|
96
93
|
setTokenReady(false);
|
|
97
94
|
try {
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
consumeSilentOAuthError();
|
|
105
|
-
consumeHubSyncFailure();
|
|
106
|
-
|
|
107
|
-
// The redirect transport's RETURN leg — also NOT gated on `webAuthMode`. A
|
|
108
|
-
// popup-mode app legitimately lands here with `?code=` whenever the browser
|
|
109
|
-
// blocked the popup and `startWebOAuthSignIn` fell back to a full-page
|
|
110
|
-
// redirect (`popup-blocked` / `popup-navigation-failed`), and an app that
|
|
111
|
-
// switched modes mid-flight must not be stranded with a dead `?code=`
|
|
112
|
-
// either. It consumes a code already on the URL; it never starts one.
|
|
95
|
+
// The redirect transport's RETURN leg. An app reaches it whenever the browser
|
|
96
|
+
// BLOCKED the sign-in popup and `startWebOAuthSignIn` fell back to a
|
|
97
|
+
// full-page redirect (`popup-blocked` / `popup-navigation-failed`), so it is
|
|
98
|
+
// load-bearing even though nothing here ever starts a redirect. It consumes a
|
|
99
|
+
// code (or a stale OAuth `error`) already in the address bar and rewrites the
|
|
100
|
+
// URL via `history.replaceState`; it never begins a navigation.
|
|
113
101
|
const oauthCompleted = identityBound ? false : await tryCompleteOAuthReturn({
|
|
114
102
|
oxyServices,
|
|
115
103
|
clientId,
|
|
116
104
|
authRedirectUri,
|
|
117
105
|
commitSession: input => commitSession(input, {
|
|
118
|
-
activate: true
|
|
119
|
-
hubSync: false
|
|
106
|
+
activate: true
|
|
120
107
|
})
|
|
121
108
|
});
|
|
122
109
|
if (oauthCompleted) {
|
|
@@ -130,7 +117,7 @@ export async function runProviderColdBoot(opts) {
|
|
|
130
117
|
// burning the overall deadline on a mint that cannot succeed. Any ambiguity
|
|
131
118
|
// resolves to "online" — the network steps still run.
|
|
132
119
|
const offline = await detectOfflineHint();
|
|
133
|
-
|
|
120
|
+
await runSessionColdBoot({
|
|
134
121
|
oxy: oxyServices,
|
|
135
122
|
store: authStore,
|
|
136
123
|
platform: {
|
|
@@ -192,37 +179,6 @@ export async function runProviderColdBoot(opts) {
|
|
|
192
179
|
}
|
|
193
180
|
}
|
|
194
181
|
});
|
|
195
|
-
|
|
196
|
-
// Silent cross-origin OAuth restore (web cross-app SSO): a full-page
|
|
197
|
-
// `prompt=none` bounce to the IdP when the mint found no local session.
|
|
198
|
-
//
|
|
199
|
-
// TRANSPORT gate (`allowsAutomaticIdpRedirect`): `webAuthMode: 'popup'`
|
|
200
|
-
// FORBIDS this lane. It navigates the top-level window with no user gesture
|
|
201
|
-
// behind it, which is precisely what popup mode exists to eliminate — a
|
|
202
|
-
// popup-mode domain without a local credential resolves signed out right
|
|
203
|
-
// here and waits for the user's next explicit "Continue with Oxy" (issue
|
|
204
|
-
// #691, "Cold boot and cross-domain behavior"). `'redirect'` — still the
|
|
205
|
-
// default and the compatibility path — reaches this lane unchanged, and this
|
|
206
|
-
// whole block disappears with the transport in phase 7b.
|
|
207
|
-
//
|
|
208
|
-
// ORIGIN gate: same as the hub-sync WRITE side (`syncHubAfterSignIn`) —
|
|
209
|
-
// official web origins only, never the IdP hub itself, and — unlike the
|
|
210
|
-
// write side — never a loopback / local-dev origin (which must not be
|
|
211
|
-
// bounced to a hosted IdP on cold boot). The authorize endpoint is
|
|
212
|
-
// env-configurable so a local/staging app targets its own IdP instead of
|
|
213
|
-
// production.
|
|
214
|
-
const webOrigin = isWebBrowser() ? globalThis.location?.origin : undefined;
|
|
215
|
-
if (!identityBound && allowsAutomaticIdpRedirect(webAuthMode) && clientId && outcome.kind !== 'session' && webOrigin && isSilentRestoreEligibleOrigin(webOrigin)) {
|
|
216
|
-
const redirected = await maybeStartSilentOAuthRestore({
|
|
217
|
-
oxyServices,
|
|
218
|
-
clientId,
|
|
219
|
-
redirectUri: authRedirectUri,
|
|
220
|
-
authorizeBaseUrl
|
|
221
|
-
});
|
|
222
|
-
if (redirected) {
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
182
|
} catch (error) {
|
|
227
183
|
if (__DEV__) {
|
|
228
184
|
loggerUtil.error('Cold boot error', error instanceof Error ? error : new Error(String(error)), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["logger","loggerUtil","runSessionColdBoot","loadPersistedDeviceCredential","
|
|
1
|
+
{"version":3,"names":["logger","loggerUtil","runSessionColdBoot","loadPersistedDeviceCredential","tryCompleteOAuthReturn","isWebBrowser","isNetConnectivityExplicitlyOffline","SESSION_HANDOFF_DEADLINE_MS","COLD_BOOT_OVERALL_DEADLINE_MS","OFFLINE_PROBE_TIMEOUT_MS","detectOfflineHint","online","globalThis","navigator","onLine","NetInfo","state","Promise","race","default","fetch","resolve","setTimeout","runProviderColdBoot","opts","oxyServices","authStore","clientId","authRedirectUri","sessionMode","identity","sessionClient","syncDeviceCredentialToHost","commitSession","markAuthResolved","setTokenReady","identityBound","oauthCompleted","input","activate","offline","oxy","store","platform","isWeb","isNative","overallDeadlineMs","isOffline","onStepDeadline","stepId","warn","component","method","onSession","session","handoff","sessionId","accessToken","userId","handoffDeadlineId","finally","undefined","clearTimeout","onSignedOut","cred","start","socketError","__DEV__","debug","onStepError","id","error","Error","String"],"sourceRoot":"../../../../src","sources":["ui/boot/runProviderColdBoot.ts"],"mappings":";;AAAA,SACEA,MAAM,IAAIC,UAAU,EACpBC,kBAAkB,QAKb,aAAa;AAEpB,SAASC,6BAA6B,QAAQ,8BAA2B;AACzE,SAASC,sBAAsB,QAAQ,yBAAsB;AAC7D,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SAASC,kCAAkC,QAAQ,6BAA0B;AAG7E;AACA,OAAO,MAAMC,2BAA2B,GAAG,IAAI;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,6BAA6B,GAAG,MAAM;;AAEnD;AACA;AACA;AACA;AACA;AACA,MAAMC,wBAAwB,GAAG,GAAG;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeC,iBAAiBA,CAAA,EAAqB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AY,CAACH,iBAAiB,CAAC;UACjC;QACF,CAAC,CAAC;QACFzB,gBAAgB,CAAC,CAAC;MACpB,CAAC;MACD6B,WAAW,EAAE,MAAAA,CAAA,KAAY;QACvB,MAAM/B,0BAA0B,CAAC,CAAC;QAClC,MAAMgC,IAAI,GAAG,MAAM7D,6BAA6B,CAACuB,SAAS,CAAC;QAC3D,IAAIsC,IAAI,EAAE;UACR,IAAI;YACF,MAAMjC,aAAa,CAACkC,KAAK,CAAC,CAAC;UAC7B,CAAC,CAAC,OAAOC,WAAW,EAAE;YACpB,IAAIC,OAAO,EAAE;cACXlE,UAAU,CAACmE,KAAK,CACd,wCAAwC,EACxC;gBAAEjB,SAAS,EAAE;cAAsB,CAAC,EACpCe,WACF,CAAC;YACH;UACF;QACF;QACAhC,gBAAgB,CAAC,CAAC;MACpB,CAAC;MACDmC,WAAW,EAAEA,CAACC,EAAE,EAAEC,KAAK,KAAK;QAC1B,IAAIJ,OAAO,EAAE;UACXlE,UAAU,CAACmE,KAAK,CACd,mBAAmBE,EAAE,wCAAwC,EAC7D;YAAEnB,SAAS,EAAE;UAAsB,CAAC,EACpCoB,KACF,CAAC;QACH;MACF;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,OAAOA,KAAK,EAAE;IACd,IAAIJ,OAAO,EAAE;MACXlE,UAAU,CAACsE,KAAK,CACd,iBAAiB,EACjBA,KAAK,YAAYC,KAAK,GAAGD,KAAK,GAAG,IAAIC,KAAK,CAACC,MAAM,CAACF,KAAK,CAAC,CAAC,EACzD;QAAEpB,SAAS,EAAE;MAAsB,CACrC,CAAC;IACH;EACF,CAAC,SAAS;IACRjB,gBAAgB,CAAC,CAAC;EACpB;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","Ionicons","useTheme","jsx","_jsx","badgeStyle","position","right","bottom","width","height","borderRadius","alignItems","justifyContent","borderWidth","AvatarCameraBadge","theme","style","className","children","name","size","color","colors","primaryForeground"],"sourceRoot":"../../../../src","sources":["ui/components/AvatarCameraBadge.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["View","Ionicons","useTheme","jsx","_jsx","badgeStyle","position","right","bottom","width","height","borderRadius","alignItems","justifyContent","borderWidth","AvatarCameraBadge","theme","style","className","children","name","size","color","colors","primaryForeground"],"sourceRoot":"../../../../src","sources":["ui/components/AvatarCameraBadge.tsx"],"mappings":";;AAEA,SAASA,IAAI,QAAQ,6BAA6B;AAClD,OAAOC,QAAQ,MAAM,6BAA6B;AAClD,SAASC,QAAQ,QAAQ,oBAAoB;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,SAAAC,GAAA,IAAAC,IAAA;AAQA,MAAMC,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,GAAGd,QAAQ,CAAC,CAAC;EACxB,oBACEE,IAAA,CAACJ,IAAI;IAACiB,KAAK,EAAEZ,UAAW;IAACa,SAAS,EAAC,mCAAmC;IAAAC,QAAA,eACpEf,IAAA,CAACH,QAAQ;MAACmB,IAAI,EAAC,QAAQ;MAACC,IAAI,EAAE,EAAG;MAACC,KAAK,EAAEN,KAAK,CAACO,MAAM,CAACC;IAAkB,CAAE;EAAC,CACvE,CAAC;AAEX,CAAC;AAED,eAAeT,iBAAiB","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useEffect, useCallback, useMemo, useState, memo } from 'react';
|
|
4
4
|
import { useOxy } from "../context/OxyContext.js";
|
|
5
|
-
import { toast } from '@oxyhq/bloom';
|
|
5
|
+
import { toast } from '@oxyhq/bloom/toast';
|
|
6
6
|
import { Button } from '@oxyhq/bloom/button';
|
|
7
7
|
import { Loading } from '@oxyhq/bloom/loading';
|
|
8
8
|
import { useFollow, useFollowForButton } from "../hooks/useFollow.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useCallback","useMemo","useState","memo","useOxy","toast","Button","Loading","useFollow","useFollowForButton","useFollowStore","useTheme","useShallow","jsx","_jsx","DEFAULT_FOLLOW_ALL_LABEL","DEFAULT_FOLLOWED_ALL_LABEL","isMultiMode","props","Array","isArray","userIds","FollowButtonInner","userId","oxyServices","initiallyFollowing","size","onFollowChange","style","textStyle","disabled","showLoadingState","preventParentActions","colors","isFollowing","isKnown","isLoading","toggleFollow","resolveStatus","handlePress","event","preventDefault","stopPropagation","err","error","Error","String","message","isBusy","showFollowing","showSpinner","variant","onPress","icon","color","text","primaryForeground","undefined","children","FollowButtonMultiInner","initiallyAllFollowing","followAllLabel","followedAllLabel","onBulkFollow","onBulkUnfollow","follow","followAllUsers","unfollowAllUsers","isAnyLoading","initialFollowStatuses","state","statuses","uid","Object","prototype","hasOwnProperty","call","followingUsers","hasKnownNotFollowing","some","storeAllFollowing","allFollowing","fetchAllStatuses","isSubmitting","setIsSubmitting","result","allAlreadyFollowing","followedCount","results","length","every","entry","alreadyFollowing","anyFollowed","success","FollowButton","canUsePrivateApi","user","currentUser","currentUserId","id","trim","rawUserIds","multiUserIds","seen","Set","cleaned","raw","has","add","push","targetUserId"],"sourceRoot":"../../../../src","sources":["ui/components/FollowButton.tsx"],"mappings":";;AACA,SAASA,SAAS,EAAEC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,OAAO;AAMvE,SAASC,MAAM,QAAQ,0BAAuB;AAC9C,SAASC,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"names":["useEffect","useCallback","useMemo","useState","memo","useOxy","toast","Button","Loading","useFollow","useFollowForButton","useFollowStore","useTheme","useShallow","jsx","_jsx","DEFAULT_FOLLOW_ALL_LABEL","DEFAULT_FOLLOWED_ALL_LABEL","isMultiMode","props","Array","isArray","userIds","FollowButtonInner","userId","oxyServices","initiallyFollowing","size","onFollowChange","style","textStyle","disabled","showLoadingState","preventParentActions","colors","isFollowing","isKnown","isLoading","toggleFollow","resolveStatus","handlePress","event","preventDefault","stopPropagation","err","error","Error","String","message","isBusy","showFollowing","showSpinner","variant","onPress","icon","color","text","primaryForeground","undefined","children","FollowButtonMultiInner","initiallyAllFollowing","followAllLabel","followedAllLabel","onBulkFollow","onBulkUnfollow","follow","followAllUsers","unfollowAllUsers","isAnyLoading","initialFollowStatuses","state","statuses","uid","Object","prototype","hasOwnProperty","call","followingUsers","hasKnownNotFollowing","some","storeAllFollowing","allFollowing","fetchAllStatuses","isSubmitting","setIsSubmitting","result","allAlreadyFollowing","followedCount","results","length","every","entry","alreadyFollowing","anyFollowed","success","FollowButton","canUsePrivateApi","user","currentUser","currentUserId","id","trim","rawUserIds","multiUserIds","seen","Set","cleaned","raw","has","add","push","targetUserId"],"sourceRoot":"../../../../src","sources":["ui/components/FollowButton.tsx"],"mappings":";;AACA,SAASA,SAAS,EAAEC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,IAAI,QAAQ,OAAO;AAMvE,SAASC,MAAM,QAAQ,0BAAuB;AAC9C,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,OAAO,QAAQ,sBAAsB;AAC9C,SAASC,SAAS,EAAEC,kBAAkB,QAAQ,uBAAoB;AAClE,SAASC,cAAc,QAAQ,0BAAuB;AACtD,SAASC,QAAQ,QAAQ,oBAAoB;AAE7C,SAASC,UAAU,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnD,MAAMC,wBAAwB,GAAG,YAAY;AAC7C,MAAMC,0BAA0B,GAAG,WAAW;;AAE9C;;AAYA;;AAOA;;AAWA;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O;EAChB,CAAC,EAAE,CAACJ,UAAU,EAAEH,aAAa,CAAC,CAAC;EAE/B,IAAI,CAACH,gBAAgB,EAAE;IACrB,OAAO,IAAI;EACb;EAEA,IAAI/E,WAAW,CAACC,KAAK,CAAC,EAAE;IACtB,IAAIqF,YAAY,CAACd,MAAM,KAAK,CAAC,EAAE;MAC7B,OAAO,IAAI;IACb;IACA,oBACE3E,IAAA,CAAC6C,sBAAsB;MAAA,GACjBzC,KAAK;MACTG,OAAO,EAAEkF;IAAa,CACvB,CAAC;EAEN;EAEA,MAAMQ,YAAY,GAAG7F,KAAK,CAACK,MAAM,GAAGuB,MAAM,CAAC5B,KAAK,CAACK,MAAM,CAAC,CAAC8E,IAAI,CAAC,CAAC,GAAG,EAAE;EACpE,IAAI,CAACU,YAAY,IAAKZ,aAAa,IAAIA,aAAa,KAAKY,YAAa,EAAE;IACtE,OAAO,IAAI;EACb;EAEA,oBACEjG,IAAA,CAACQ,iBAAiB;IAAA,GACZJ,KAAK;IACTK,MAAM,EAAEwF,YAAa;IACrBvF,WAAW,EAAEA;EAAY,CAC1B,CAAC;AAEN,CAAC;AAED,SAASuE,YAAY;AACrB,eAAeA,YAAY","ignoreList":[]}
|
|
@@ -75,7 +75,19 @@ const OxyAccountDialogScreen = ({
|
|
|
75
75
|
view
|
|
76
76
|
} = snapshot;
|
|
77
77
|
const showBack = view === 'qr' || view === 'signup' || view === 'add' && snapshot.accounts.length > 0;
|
|
78
|
-
const goToAccounts = useCallback(() =>
|
|
78
|
+
const goToAccounts = useCallback(() => {
|
|
79
|
+
if (!controller) return;
|
|
80
|
+
const {
|
|
81
|
+
view: currentView,
|
|
82
|
+
signIn
|
|
83
|
+
} = controller.getSnapshot();
|
|
84
|
+
// Backing out of an active request must withdraw it — otherwise the
|
|
85
|
+
// authorizeCode stays approvable until expiry (issue #691 phase 5).
|
|
86
|
+
if ((currentView === 'qr' || currentView === 'add') && (signIn.phase === 'starting' || signIn.phase === 'waiting')) {
|
|
87
|
+
controller.cancelSignIn();
|
|
88
|
+
}
|
|
89
|
+
controller.setView('accounts');
|
|
90
|
+
}, [controller]);
|
|
79
91
|
// An ENTRY view (accounts / signin — no in-dialog back of its own) that is
|
|
80
92
|
// MORPHED into a host surface (ManageAccount → switcher) has a frame beneath it,
|
|
81
93
|
// so its back CLOSES the dialog and reshapes back to the host — routed through
|