@oxyhq/services 22.9.0 → 22.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/index.js +24 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +25 -125
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -0
- package/lib/commonjs/ui/components/OxyAuthChooser.js +137 -40
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyConsentScreen.js +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +1 -1
- package/lib/commonjs/ui/components/RequireOxyAuth.js +1 -1
- package/lib/commonjs/ui/components/SurfaceHeaderAction.js +63 -0
- package/lib/commonjs/ui/components/SurfaceHeaderAction.js.map +1 -0
- package/lib/commonjs/ui/components/SurfaceScreen.js +52 -5
- package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +46 -29
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +47 -23
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js +22 -12
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -1
- package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js +83 -0
- package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +23 -9
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +34 -39
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js +46 -0
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +1 -1
- package/lib/commonjs/ui/navigation/accountDialogManager.js +14 -2
- package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +3 -3
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaceBackBridge.js +68 -0
- package/lib/commonjs/ui/navigation/surfaceBackBridge.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaceRegistry.js +52 -8
- package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaces.js +42 -5
- package/lib/commonjs/ui/navigation/surfaces.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +214 -283
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +88 -118
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +22 -36
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +219 -226
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +10 -14
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +24 -39
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +136 -158
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +29 -36
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +101 -109
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +10 -15
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +8 -16
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +219 -206
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +62 -69
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +63 -79
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +69 -98
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +8 -14
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +77 -94
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +99 -134
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/NotificationsScreen.js +69 -76
- package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -8
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PreferencesScreen.js +67 -74
- package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +55 -91
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +291 -304
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +100 -114
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +38 -45
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +44 -57
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +24 -31
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +14 -24
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +66 -75
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +111 -139
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +13 -20
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +14 -27
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +68 -85
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +28 -36
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/module/index.js +12 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +27 -127
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -0
- package/lib/module/ui/components/OxyAuthChooser.js +137 -40
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyConsentScreen.js +1 -1
- package/lib/module/ui/components/ProfileButton.js +1 -1
- package/lib/module/ui/components/RequireOxyAuth.js +1 -1
- package/lib/module/ui/components/SurfaceHeaderAction.js +58 -0
- package/lib/module/ui/components/SurfaceHeaderAction.js.map +1 -0
- package/lib/module/ui/components/SurfaceScreen.js +53 -6
- package/lib/module/ui/components/SurfaceScreen.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +46 -29
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +46 -23
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/oxyAuthChooserStyles.js +22 -12
- package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -1
- package/lib/module/ui/components/surfaces/ActionSheetSurface.js +78 -0
- package/lib/module/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +23 -9
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +34 -39
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/hooks/useSurfaceHeader.js +42 -0
- package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -0
- package/lib/module/ui/hooks/useSwitchableAccounts.js +1 -1
- package/lib/module/ui/navigation/accountDialogManager.js +14 -2
- package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +3 -3
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/navigation/surfaceBackBridge.js +63 -0
- package/lib/module/ui/navigation/surfaceBackBridge.js.map +1 -0
- package/lib/module/ui/navigation/surfaceRegistry.js +52 -8
- package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -1
- package/lib/module/ui/navigation/surfaces.js +42 -5
- package/lib/module/ui/navigation/surfaces.js.map +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js +218 -286
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +92 -121
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +25 -38
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +220 -227
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +10 -14
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +26 -40
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js +139 -160
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +32 -38
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +102 -110
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +11 -15
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +10 -17
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +222 -208
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +64 -70
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +65 -81
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +71 -99
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +10 -15
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +78 -94
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +102 -137
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/NotificationsScreen.js +71 -77
- package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +4 -9
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PreferencesScreen.js +69 -75
- package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +58 -93
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +293 -305
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +102 -116
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +40 -46
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +46 -58
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +26 -32
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +14 -24
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +1 -1
- package/lib/module/ui/screens/trust/TrustAboutScreen.js +67 -75
- package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +112 -139
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustFAQScreen.js +15 -21
- package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +14 -26
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +69 -85
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRulesScreen.js +30 -37
- package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/{OxyAccountDialog.d.ts → OxyAccountDialogScreen.d.ts} +4 -4
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +3 -3
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts +16 -0
- package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts +4 -2
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +17 -2
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts +19 -9
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
- package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +7 -11
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +31 -0
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +14 -2
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts +16 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +31 -13
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts +0 -4
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.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/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.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/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +8 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/{OxyAccountDialog.d.ts → OxyAccountDialogScreen.d.ts} +4 -4
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +3 -3
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts +2 -2
- package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts +1 -1
- package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts +16 -0
- package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts +4 -2
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +17 -2
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts +19 -9
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
- package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +7 -11
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +31 -0
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +14 -2
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts +16 -0
- package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +31 -13
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +0 -4
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.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/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.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/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +8 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +12 -5
- package/src/ui/components/{OxyAccountDialog.tsx → OxyAccountDialogScreen.tsx} +21 -110
- package/src/ui/components/OxyAuthChooser.tsx +153 -33
- package/src/ui/components/OxyConsentScreen.tsx +1 -1
- package/src/ui/components/ProfileButton.tsx +2 -2
- package/src/ui/components/RequireOxyAuth.tsx +1 -1
- package/src/ui/components/SurfaceHeaderAction.tsx +60 -0
- package/src/ui/components/SurfaceScreen.tsx +66 -6
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +50 -36
- package/src/ui/components/modals/DeleteAccountModal.tsx +47 -26
- package/src/ui/components/oxyAuthChooserStyles.ts +22 -12
- package/src/ui/components/surfaces/ActionSheetSurface.tsx +98 -0
- package/src/ui/context/OxyContext.tsx +22 -8
- package/src/ui/hooks/useAvatarPicker.ts +53 -66
- package/src/ui/hooks/useSurfaceHeader.ts +56 -0
- package/src/ui/hooks/useSwitchableAccounts.ts +1 -1
- package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +68 -0
- package/src/ui/navigation/accountDialogManager.ts +14 -2
- package/src/ui/navigation/routes.ts +3 -3
- package/src/ui/navigation/surfaceBackBridge.ts +69 -0
- package/src/ui/navigation/surfaceRegistry.ts +80 -14
- package/src/ui/navigation/surfaces.ts +33 -5
- package/src/ui/screens/AccountMembersScreen.tsx +39 -100
- package/src/ui/screens/AccountSettingsScreen.tsx +32 -54
- package/src/ui/screens/AccountVerificationScreen.tsx +23 -51
- package/src/ui/screens/AppInfoScreen.tsx +6 -13
- package/src/ui/screens/AvatarCropScreen.tsx +8 -17
- package/src/ui/screens/ConnectedAppsScreen.tsx +39 -60
- package/src/ui/screens/CreateAccountScreen.tsx +13 -39
- package/src/ui/screens/EditProfileFieldScreen.tsx +30 -48
- package/src/ui/screens/EditProfileScreen.tsx +7 -16
- package/src/ui/screens/FAQScreen.tsx +9 -13
- package/src/ui/screens/FeedbackScreen.tsx +8 -22
- package/src/ui/screens/FileManagementScreen.tsx +191 -188
- package/src/ui/screens/HelpSupportScreen.tsx +7 -13
- package/src/ui/screens/HistoryViewScreen.tsx +26 -31
- package/src/ui/screens/LanguageSelectorScreen.tsx +12 -46
- package/src/ui/screens/LearnMoreUsernamesScreen.tsx +8 -16
- package/src/ui/screens/LegalDocumentsScreen.tsx +7 -22
- package/src/ui/screens/ManageAccountScreen.tsx +96 -165
- package/src/ui/screens/NotificationsScreen.tsx +7 -13
- package/src/ui/screens/PaymentGatewayScreen.tsx +3 -10
- package/src/ui/screens/PreferencesScreen.tsx +7 -13
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +52 -90
- package/src/ui/screens/PrivacySettingsScreen.tsx +9 -21
- package/src/ui/screens/ProfileScreen.tsx +9 -11
- package/src/ui/screens/SavesCollectionsScreen.tsx +7 -13
- package/src/ui/screens/SearchSettingsScreen.tsx +9 -21
- package/src/ui/screens/UserLinksScreen.tsx +7 -14
- package/src/ui/screens/UserListScreen.tsx +2 -5
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +1 -1
- package/src/ui/screens/trust/TrustAboutScreen.tsx +10 -17
- package/src/ui/screens/trust/TrustCenterScreen.tsx +9 -28
- package/src/ui/screens/trust/TrustFAQScreen.tsx +15 -18
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +3 -5
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +11 -26
- package/src/ui/screens/trust/TrustRulesScreen.tsx +10 -13
- package/src/ui/types/navigation.ts +8 -0
- package/lib/commonjs/ui/components/Header.js +0 -305
- package/lib/commonjs/ui/components/Header.js.map +0 -1
- package/lib/commonjs/ui/components/OxyAccountDialog.js.map +0 -1
- package/lib/module/ui/components/Header.js +0 -299
- package/lib/module/ui/components/Header.js.map +0 -1
- package/lib/module/ui/components/OxyAccountDialog.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/Header.d.ts +0 -33
- package/lib/typescript/commonjs/ui/components/Header.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Header.d.ts +0 -33
- package/lib/typescript/module/ui/components/Header.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +0 -1
- package/src/ui/components/Header.tsx +0 -224
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* OxyAccountDialogScreen — the ONE unified account dialog BODY for `@oxyhq/services`.
|
|
3
3
|
*
|
|
4
4
|
* The header (title/subtitle per view + back button) around the headless chooser
|
|
5
5
|
* logic, which lives in `OxyAuthChooser` — the account switcher, sign-in,
|
|
@@ -23,17 +23,13 @@
|
|
|
23
23
|
|
|
24
24
|
import type React from 'react';
|
|
25
25
|
import { useCallback, useSyncExternalStore } from 'react';
|
|
26
|
-
import {
|
|
27
|
-
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
28
|
-
import { Text } from '@oxyhq/bloom/typography';
|
|
29
|
-
import { useTheme } from '@oxyhq/bloom/theme';
|
|
26
|
+
import { StyleSheet, View } from 'react-native';
|
|
30
27
|
import type { AccountDialogSnapshot } from '@oxyhq/core';
|
|
31
28
|
import { useOxy } from '../context/OxyContext';
|
|
32
29
|
import { useI18n } from '../hooks/useI18n';
|
|
30
|
+
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
33
31
|
import OxyAuthChooser from './OxyAuthChooser';
|
|
34
|
-
import { LogoIcon } from './logo/LogoIcon';
|
|
35
32
|
|
|
36
|
-
type Theme = ReturnType<typeof useTheme>;
|
|
37
33
|
type Translate = ReturnType<typeof useI18n>['t'];
|
|
38
34
|
|
|
39
35
|
/**
|
|
@@ -49,9 +45,8 @@ type Translate = ReturnType<typeof useI18n>['t'];
|
|
|
49
45
|
* `@oxyhq/core`. Closing routes through `useOxy().closeAccountDialog`, which
|
|
50
46
|
* dismisses the surface and runs its exit animation.
|
|
51
47
|
*/
|
|
52
|
-
const
|
|
48
|
+
const OxyAccountDialogScreen: React.FC = () => {
|
|
53
49
|
const { accountDialogController: controller, closeAccountDialog } = useOxy();
|
|
54
|
-
const theme = useTheme();
|
|
55
50
|
const { t } = useI18n();
|
|
56
51
|
|
|
57
52
|
// A lightweight, header-only binding to the same controller `OxyAuthChooser`
|
|
@@ -67,79 +62,29 @@ const OxyAccountDialog: React.FC = () => {
|
|
|
67
62
|
);
|
|
68
63
|
const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
69
64
|
|
|
70
|
-
if (!controller) {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
65
|
const { view } = snapshot;
|
|
75
66
|
const showBack =
|
|
76
67
|
view === 'qr' || view === 'signup' || (view === 'add' && snapshot.accounts.length > 0);
|
|
68
|
+
const goToAccounts = useCallback(() => controller?.setView('accounts'), [controller]);
|
|
69
|
+
const { title, subtitle } = headerCopy(view, snapshot.accounts.length, t);
|
|
77
70
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/>
|
|
88
|
-
<ScrollView style={styles.body} contentContainerStyle={styles.bodyContent} showsVerticalScrollIndicator={false}>
|
|
89
|
-
<OxyAuthChooser onComplete={closeAccountDialog} />
|
|
90
|
-
</ScrollView>
|
|
91
|
-
</>
|
|
92
|
-
);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
// ---------------------------------------------------------------------------
|
|
96
|
-
// Header
|
|
97
|
-
// ---------------------------------------------------------------------------
|
|
71
|
+
// The account dialog uses the SHARED Dialog nav header like every other screen
|
|
72
|
+
// (the base): the large in-content title/subtitle that collapses into the nav
|
|
73
|
+
// bar on scroll (default `largeTitle`), its per-view copy, and a per-view back
|
|
74
|
+
// that returns to the account list (the Dialog renders the frosted back/close).
|
|
75
|
+
useSurfaceHeader({
|
|
76
|
+
title,
|
|
77
|
+
subtitle: subtitle ?? undefined,
|
|
78
|
+
onBack: showBack ? goToAccounts : undefined,
|
|
79
|
+
});
|
|
98
80
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
t: Translate;
|
|
103
|
-
showBack: boolean;
|
|
104
|
-
onBack: () => void;
|
|
105
|
-
onClose: () => void;
|
|
106
|
-
}
|
|
81
|
+
if (!controller) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
107
84
|
|
|
108
|
-
const DialogHeader: React.FC<HeaderProps> = ({ snapshot, theme, t, showBack, onBack, onClose }) => {
|
|
109
|
-
const { title, subtitle } = headerCopy(snapshot.view, snapshot.accounts.length, t);
|
|
110
85
|
return (
|
|
111
|
-
<View style={styles.
|
|
112
|
-
<
|
|
113
|
-
{showBack ? (
|
|
114
|
-
<Pressable
|
|
115
|
-
onPress={onBack}
|
|
116
|
-
style={[styles.iconButton, { backgroundColor: theme.colors.backgroundSecondary }]}
|
|
117
|
-
accessibilityRole="button"
|
|
118
|
-
accessibilityLabel={t('common.actions.back') || 'Back'}
|
|
119
|
-
>
|
|
120
|
-
<MaterialCommunityIcons name="chevron-left" size={22} color={theme.colors.textSecondary} />
|
|
121
|
-
</Pressable>
|
|
122
|
-
) : (
|
|
123
|
-
<View style={styles.iconButton} />
|
|
124
|
-
)}
|
|
125
|
-
<LogoIcon height={34} color={theme.colors.primary} />
|
|
126
|
-
<Pressable
|
|
127
|
-
onPress={onClose}
|
|
128
|
-
style={[styles.iconButton, { backgroundColor: theme.colors.backgroundSecondary }]}
|
|
129
|
-
accessibilityRole="button"
|
|
130
|
-
accessibilityLabel={t('common.actions.close') || 'Close'}
|
|
131
|
-
>
|
|
132
|
-
<MaterialCommunityIcons name="close" size={20} color={theme.colors.textSecondary} />
|
|
133
|
-
</Pressable>
|
|
134
|
-
</View>
|
|
135
|
-
<Text style={[styles.title, { color: theme.colors.text }]} numberOfLines={1}>
|
|
136
|
-
{title}
|
|
137
|
-
</Text>
|
|
138
|
-
{subtitle ? (
|
|
139
|
-
<Text style={[styles.subtitle, { color: theme.colors.textSecondary }]} numberOfLines={2}>
|
|
140
|
-
{subtitle}
|
|
141
|
-
</Text>
|
|
142
|
-
) : null}
|
|
86
|
+
<View style={styles.bodyContent}>
|
|
87
|
+
<OxyAuthChooser onComplete={closeAccountDialog} />
|
|
143
88
|
</View>
|
|
144
89
|
);
|
|
145
90
|
};
|
|
@@ -194,44 +139,10 @@ const EMPTY_SNAPSHOT: AccountDialogSnapshot = {
|
|
|
194
139
|
};
|
|
195
140
|
|
|
196
141
|
const styles = StyleSheet.create({
|
|
197
|
-
header: {
|
|
198
|
-
alignItems: 'center',
|
|
199
|
-
marginBottom: 12,
|
|
200
|
-
},
|
|
201
|
-
headerBar: {
|
|
202
|
-
width: '100%',
|
|
203
|
-
flexDirection: 'row',
|
|
204
|
-
alignItems: 'center',
|
|
205
|
-
justifyContent: 'space-between',
|
|
206
|
-
marginBottom: 8,
|
|
207
|
-
},
|
|
208
|
-
iconButton: {
|
|
209
|
-
width: 32,
|
|
210
|
-
height: 32,
|
|
211
|
-
borderRadius: 16,
|
|
212
|
-
alignItems: 'center',
|
|
213
|
-
justifyContent: 'center',
|
|
214
|
-
},
|
|
215
|
-
title: {
|
|
216
|
-
fontSize: 22,
|
|
217
|
-
fontWeight: '800',
|
|
218
|
-
letterSpacing: -0.4,
|
|
219
|
-
textAlign: 'center',
|
|
220
|
-
marginTop: 6,
|
|
221
|
-
},
|
|
222
|
-
subtitle: {
|
|
223
|
-
fontSize: 14,
|
|
224
|
-
lineHeight: 19,
|
|
225
|
-
textAlign: 'center',
|
|
226
|
-
marginTop: 4,
|
|
227
|
-
},
|
|
228
|
-
body: {
|
|
229
|
-
width: '100%',
|
|
230
|
-
},
|
|
231
142
|
bodyContent: {
|
|
232
143
|
paddingTop: 4,
|
|
233
144
|
paddingBottom: 4,
|
|
234
145
|
},
|
|
235
146
|
});
|
|
236
147
|
|
|
237
|
-
export default
|
|
148
|
+
export default OxyAccountDialogScreen;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* A thin React Native binding over the headless `AccountDialogController` in
|
|
6
6
|
* `@oxyhq/core` (bound via `useSyncExternalStore`) — the same data/state
|
|
7
|
-
* machine {@link
|
|
8
|
-
* TWO places: wrapped in Bloom's `<Dialog>` by `
|
|
7
|
+
* machine {@link OxyAccountDialogScreen} renders, extracted so it can be mounted in
|
|
8
|
+
* TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialogScreen` (the normal
|
|
9
9
|
* in-app surface), and mounted bare by a future auth.oxy.so hub page for the
|
|
10
10
|
* cross-origin passkey popup (b2) — same chooser, two hosts, two completion
|
|
11
11
|
* strategies via the `onComplete` prop. Neither host duplicates view logic.
|
|
@@ -61,6 +61,7 @@ import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
|
61
61
|
import QRCode from 'react-native-qrcode-svg';
|
|
62
62
|
import { Avatar } from '@oxyhq/bloom/avatar';
|
|
63
63
|
import { Button } from '@oxyhq/bloom/button';
|
|
64
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
64
65
|
import { toast } from '@oxyhq/bloom';
|
|
65
66
|
import { Text } from '@oxyhq/bloom/typography';
|
|
66
67
|
import {
|
|
@@ -81,6 +82,8 @@ import { authChooserStyles as styles } from './oxyAuthChooserStyles';
|
|
|
81
82
|
|
|
82
83
|
/** Diameter of a row avatar. */
|
|
83
84
|
const ROW_AVATAR_SIZE = 40;
|
|
85
|
+
/** Diameter of the prominent current-account avatar in the collapsed header. */
|
|
86
|
+
const HEADER_AVATAR_SIZE = 48;
|
|
84
87
|
/** High-contrast QR colors — intentionally fixed (NOT themed) for scan reliability. */
|
|
85
88
|
const QR_PLATE_BG = '#FFFFFF';
|
|
86
89
|
const QR_FOREGROUND = '#000000';
|
|
@@ -122,7 +125,7 @@ type Theme = ReturnType<typeof useTheme>;
|
|
|
122
125
|
type Translate = ReturnType<typeof useI18n>['t'];
|
|
123
126
|
|
|
124
127
|
/**
|
|
125
|
-
* The account switcher + sign-in/sign-up chooser. Mounted by `
|
|
128
|
+
* The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialogScreen`
|
|
126
129
|
* (wrapped in Bloom's `<Dialog>`) today; mountable bare by any future host that
|
|
127
130
|
* supplies its own `onComplete`.
|
|
128
131
|
*/
|
|
@@ -371,7 +374,24 @@ interface AccountsViewProps {
|
|
|
371
374
|
handlers: OxyAuthChooserHandlers;
|
|
372
375
|
}
|
|
373
376
|
|
|
377
|
+
/**
|
|
378
|
+
* The signed-in switcher, in the Google account-menu shape:
|
|
379
|
+
* - COLLAPSED (default): the active account is prominent at the top (avatar +
|
|
380
|
+
* name + email) with a trailing expand chevron, and a "Manage your Oxy
|
|
381
|
+
* account" outline button directly under it. Nothing else.
|
|
382
|
+
* - EXPANDED: the same header + button, then the full account list (current
|
|
383
|
+
* first with a check-circle, every other switchable account, "Add another
|
|
384
|
+
* account", and "Manage accounts on this device").
|
|
385
|
+
*
|
|
386
|
+
* Collapse state is a plain `useState` toggled in the header's press handler —
|
|
387
|
+
* no `useEffect`, no derived-from-props sync. When there is only ONE account
|
|
388
|
+
* (nothing to switch to) the chevron is hidden and the "Add another account" +
|
|
389
|
+
* "Manage accounts on this device" items render inline, so those affordances
|
|
390
|
+
* stay reachable without a pointless expand toggle.
|
|
391
|
+
*/
|
|
374
392
|
const AccountsView: React.FC<AccountsViewProps> = ({ snapshot, theme, t, handlers }) => {
|
|
393
|
+
const [expanded, setExpanded] = useState(false);
|
|
394
|
+
|
|
375
395
|
if (snapshot.loading && snapshot.accounts.length === 0) {
|
|
376
396
|
return (
|
|
377
397
|
<View style={styles.centeredBlock}>
|
|
@@ -383,40 +403,140 @@ const AccountsView: React.FC<AccountsViewProps> = ({ snapshot, theme, t, handler
|
|
|
383
403
|
);
|
|
384
404
|
}
|
|
385
405
|
|
|
406
|
+
const switchingDisabled = snapshot.switchingAccountId !== null;
|
|
407
|
+
const current = snapshot.accounts.find((account) => account.isCurrent) ?? snapshot.accounts[0];
|
|
408
|
+
const hasOtherAccounts = snapshot.accounts.some(
|
|
409
|
+
(account) => account.accountId !== current?.accountId,
|
|
410
|
+
);
|
|
411
|
+
// Current account first, then the rest — the expanded list order.
|
|
412
|
+
const orderedAccounts = current
|
|
413
|
+
? [current, ...snapshot.accounts.filter((account) => account.accountId !== current.accountId)]
|
|
414
|
+
: snapshot.accounts;
|
|
415
|
+
// Multi-account: reveal the list only when expanded. Single-account: no expand
|
|
416
|
+
// affordance, so surface add/manage inline.
|
|
417
|
+
const showList = hasOtherAccounts ? expanded : true;
|
|
418
|
+
|
|
419
|
+
const renderAccountItem = (account: SwitchableAccount) => {
|
|
420
|
+
const accent = resolveAccentHex(account.color, theme.colors.primary);
|
|
421
|
+
const isSwitching = snapshot.switchingAccountId === account.accountId;
|
|
422
|
+
return (
|
|
423
|
+
<SettingsListItem
|
|
424
|
+
key={account.accountId}
|
|
425
|
+
icon={
|
|
426
|
+
<View
|
|
427
|
+
style={[styles.avatarRing, { borderColor: account.isCurrent ? accent : 'transparent' }]}
|
|
428
|
+
>
|
|
429
|
+
<Avatar
|
|
430
|
+
source={account.avatarUrl ?? undefined}
|
|
431
|
+
variant="thumb"
|
|
432
|
+
name={account.displayName}
|
|
433
|
+
size={ROW_AVATAR_SIZE}
|
|
434
|
+
/>
|
|
435
|
+
</View>
|
|
436
|
+
}
|
|
437
|
+
title={account.displayName}
|
|
438
|
+
description={account.email ?? undefined}
|
|
439
|
+
onPress={() => handlers.onSwitch(account.accountId)}
|
|
440
|
+
disabled={switchingDisabled}
|
|
441
|
+
accessibilityLabel={account.displayName}
|
|
442
|
+
showChevron={false}
|
|
443
|
+
rightElement={
|
|
444
|
+
isSwitching ? (
|
|
445
|
+
<MaterialCommunityIcons name="loading" size={20} color={accent} />
|
|
446
|
+
) : account.isCurrent ? (
|
|
447
|
+
<MaterialCommunityIcons name="check-circle" size={20} color={accent} />
|
|
448
|
+
) : undefined
|
|
449
|
+
}
|
|
450
|
+
/>
|
|
451
|
+
);
|
|
452
|
+
};
|
|
453
|
+
|
|
386
454
|
return (
|
|
387
455
|
<View style={styles.rows}>
|
|
388
|
-
{
|
|
389
|
-
<
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
456
|
+
{current ? (
|
|
457
|
+
<Pressable
|
|
458
|
+
style={styles.currentAccountRow}
|
|
459
|
+
onPress={hasOtherAccounts ? () => setExpanded((value) => !value) : undefined}
|
|
460
|
+
disabled={hasOtherAccounts ? switchingDisabled : true}
|
|
461
|
+
accessibilityRole={hasOtherAccounts ? 'button' : undefined}
|
|
462
|
+
accessibilityState={hasOtherAccounts ? { expanded } : undefined}
|
|
463
|
+
accessibilityLabel={current.displayName}
|
|
464
|
+
>
|
|
465
|
+
<View
|
|
466
|
+
style={[
|
|
467
|
+
styles.avatarRing,
|
|
468
|
+
{ borderColor: resolveAccentHex(current.color, theme.colors.primary) },
|
|
469
|
+
]}
|
|
470
|
+
>
|
|
471
|
+
<Avatar
|
|
472
|
+
source={current.avatarUrl ?? undefined}
|
|
473
|
+
variant="thumb"
|
|
474
|
+
name={current.displayName}
|
|
475
|
+
size={HEADER_AVATAR_SIZE}
|
|
476
|
+
/>
|
|
477
|
+
</View>
|
|
478
|
+
<View style={styles.currentAccountMeta}>
|
|
479
|
+
<Text style={[styles.currentAccountName, { color: theme.colors.text }]} numberOfLines={1}>
|
|
480
|
+
{current.displayName}
|
|
481
|
+
</Text>
|
|
482
|
+
{current.email ? (
|
|
483
|
+
<Text
|
|
484
|
+
style={[styles.currentAccountEmail, { color: theme.colors.textSecondary }]}
|
|
485
|
+
numberOfLines={1}
|
|
486
|
+
>
|
|
487
|
+
{current.email}
|
|
488
|
+
</Text>
|
|
489
|
+
) : null}
|
|
490
|
+
</View>
|
|
491
|
+
{hasOtherAccounts ? (
|
|
492
|
+
<MaterialCommunityIcons
|
|
493
|
+
name={expanded ? 'chevron-up' : 'chevron-down'}
|
|
494
|
+
size={24}
|
|
495
|
+
color={theme.colors.textSecondary}
|
|
496
|
+
/>
|
|
497
|
+
) : null}
|
|
498
|
+
</Pressable>
|
|
499
|
+
) : null}
|
|
398
500
|
|
|
399
|
-
<
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
accessibilityRole="button"
|
|
403
|
-
accessibilityLabel={t('signin.addAccountTitle') || 'Add another account'}
|
|
404
|
-
>
|
|
405
|
-
<View style={[styles.addBadge, { borderColor: theme.colors.border }]}>
|
|
406
|
-
<MaterialCommunityIcons name="plus" size={20} color={theme.colors.textSecondary} />
|
|
407
|
-
</View>
|
|
408
|
-
<Text style={[styles.rowName, { color: theme.colors.textSecondary }]}>
|
|
409
|
-
{t('signin.addAccountTitle') || 'Add another account'}
|
|
410
|
-
</Text>
|
|
411
|
-
</Pressable>
|
|
501
|
+
<Button variant="outline" onPress={handlers.onManage} style={styles.manageButton}>
|
|
502
|
+
{t('accountMenu.manage') || 'Manage your Oxy account'}
|
|
503
|
+
</Button>
|
|
412
504
|
|
|
413
|
-
|
|
414
|
-
<
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
505
|
+
{showList ? (
|
|
506
|
+
<SettingsListGroup>
|
|
507
|
+
{hasOtherAccounts ? orderedAccounts.map(renderAccountItem) : null}
|
|
508
|
+
|
|
509
|
+
<SettingsListItem
|
|
510
|
+
icon={
|
|
511
|
+
<View style={[styles.addBadge, { borderColor: theme.colors.border }]}>
|
|
512
|
+
<MaterialCommunityIcons name="plus" size={20} color={theme.colors.textSecondary} />
|
|
513
|
+
</View>
|
|
514
|
+
}
|
|
515
|
+
title={t('signin.addAccountTitle') || 'Add another account'}
|
|
516
|
+
onPress={handlers.onAdd}
|
|
517
|
+
disabled={switchingDisabled}
|
|
518
|
+
accessibilityLabel={t('signin.addAccountTitle') || 'Add another account'}
|
|
519
|
+
showChevron={false}
|
|
520
|
+
/>
|
|
521
|
+
|
|
522
|
+
<SettingsListItem
|
|
523
|
+
icon={
|
|
524
|
+
<View style={[styles.addBadge, { borderColor: theme.colors.border }]}>
|
|
525
|
+
<MaterialCommunityIcons
|
|
526
|
+
name="cog-outline"
|
|
527
|
+
size={20}
|
|
528
|
+
color={theme.colors.textSecondary}
|
|
529
|
+
/>
|
|
530
|
+
</View>
|
|
531
|
+
}
|
|
532
|
+
title={t('accountSwitcher.manageOnDevice') || 'Manage accounts on this device'}
|
|
533
|
+
onPress={handlers.onManage}
|
|
534
|
+
disabled={switchingDisabled}
|
|
535
|
+
accessibilityLabel={t('accountSwitcher.manageOnDevice') || 'Manage accounts on this device'}
|
|
536
|
+
showChevron={false}
|
|
537
|
+
/>
|
|
538
|
+
</SettingsListGroup>
|
|
539
|
+
) : null}
|
|
420
540
|
</View>
|
|
421
541
|
);
|
|
422
542
|
};
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* and behavioral lockstep.
|
|
15
15
|
*
|
|
16
16
|
* Theming is `useTheme()` + a `StyleSheet` (the same approach as
|
|
17
|
-
* {@link
|
|
17
|
+
* {@link OxyAccountDialogScreen}) so it renders correctly in EVERY consumer, including
|
|
18
18
|
* apps that do not use NativeWind. Copy is localized through {@link useI18n}
|
|
19
19
|
* under the `consent.*` keys.
|
|
20
20
|
*/
|
|
@@ -65,7 +65,7 @@ export interface ProfileButtonProps {
|
|
|
65
65
|
onNavigateProfile?: () => void;
|
|
66
66
|
/**
|
|
67
67
|
* Retained for source compatibility. The trigger now opens the unified
|
|
68
|
-
* `
|
|
68
|
+
* `OxyAccountDialogScreen` (a centered / bottom-sheet modal) rather than an
|
|
69
69
|
* anchored popover, so popover placement no longer applies.
|
|
70
70
|
*/
|
|
71
71
|
placement?: 'up' | 'down' | 'auto';
|
|
@@ -82,7 +82,7 @@ export interface ProfileButtonProps {
|
|
|
82
82
|
/**
|
|
83
83
|
* Self-contained sidebar account trigger, modeled on Bluesky's ProfileCard and
|
|
84
84
|
* the Oxy inbox's `MailboxDrawer` footer. Pressing it opens the unified
|
|
85
|
-
* {@link
|
|
85
|
+
* {@link OxyAccountDialogScreen} — the single account switcher + sign-in surface — via
|
|
86
86
|
* `useOxy().openAccountDialog`.
|
|
87
87
|
*
|
|
88
88
|
* Three auth states from {@link useAuth}:
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* neutral loading state so the signed-out wall never flashes before the
|
|
16
16
|
* device-first cold boot concludes (the documented cold-boot race).
|
|
17
17
|
*
|
|
18
|
-
* Styling follows the sibling `
|
|
18
|
+
* Styling follows the sibling `OxyAccountDialogScreen`/`OxySignInButton` pattern —
|
|
19
19
|
* `useTheme()` + `StyleSheet` (NOT NativeWind), so the gate renders correctly in
|
|
20
20
|
* EVERY consumer, including apps that do not run NativeWind (e.g. the accounts
|
|
21
21
|
* app).
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { ActivityIndicator, StyleSheet } from 'react-native';
|
|
3
|
+
import { useTheme } from '@oxyhq/bloom/theme';
|
|
4
|
+
import { PressableScale } from '@oxyhq/bloom/pressable-scale';
|
|
5
|
+
import { Text } from '@oxyhq/bloom/typography';
|
|
6
|
+
|
|
7
|
+
export interface SurfaceHeaderActionProps {
|
|
8
|
+
/** Button label (e.g. a translated "Save"). */
|
|
9
|
+
label: string;
|
|
10
|
+
onPress: () => void;
|
|
11
|
+
/** Show a spinner instead of the label (also disables the button). */
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A filled pill action for a surface's nav-header right slot — the canonical
|
|
18
|
+
* "Save" affordance. Pass a memoized instance to `useSurfaceHeader({ right })`
|
|
19
|
+
* so the header does not thrash between renders.
|
|
20
|
+
*/
|
|
21
|
+
export const SurfaceHeaderAction: React.FC<SurfaceHeaderActionProps> = ({
|
|
22
|
+
label,
|
|
23
|
+
onPress,
|
|
24
|
+
loading,
|
|
25
|
+
disabled,
|
|
26
|
+
}) => {
|
|
27
|
+
const { colors } = useTheme();
|
|
28
|
+
const isDisabled = disabled || loading;
|
|
29
|
+
return (
|
|
30
|
+
<PressableScale
|
|
31
|
+
onPress={onPress}
|
|
32
|
+
disabled={isDisabled}
|
|
33
|
+
accessibilityRole="button"
|
|
34
|
+
accessibilityLabel={label}
|
|
35
|
+
style={[styles.button, { backgroundColor: colors.primary, opacity: isDisabled ? 0.5 : 1 }]}
|
|
36
|
+
>
|
|
37
|
+
{loading ? (
|
|
38
|
+
<ActivityIndicator size="small" color={colors.primaryForeground} />
|
|
39
|
+
) : (
|
|
40
|
+
<Text style={[styles.label, { color: colors.primaryForeground }]}>{label}</Text>
|
|
41
|
+
)}
|
|
42
|
+
</PressableScale>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const styles = StyleSheet.create({
|
|
47
|
+
button: {
|
|
48
|
+
height: 36,
|
|
49
|
+
minWidth: 64,
|
|
50
|
+
paddingHorizontal: 14,
|
|
51
|
+
borderRadius: 18,
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
justifyContent: 'center',
|
|
54
|
+
},
|
|
55
|
+
label: {
|
|
56
|
+
fontSize: 14,
|
|
57
|
+
fontWeight: '600',
|
|
58
|
+
letterSpacing: -0.2,
|
|
59
|
+
},
|
|
60
|
+
});
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useMemo, type ErrorInfo } from 'react';
|
|
1
|
+
import React, { useCallback, useEffect, useMemo, useState, type ErrorInfo } from 'react';
|
|
2
2
|
import { StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
import { useStore } from 'zustand';
|
|
4
4
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
5
|
+
import { useDialogHeader, type DialogHeaderConfig } from '@oxyhq/bloom/dialog';
|
|
5
6
|
import type { SurfaceControls } from '@oxyhq/bloom/surfaces';
|
|
6
7
|
import type { RouteName } from '../navigation/routes';
|
|
7
8
|
import { getScreenComponent } from '../navigation/routes';
|
|
9
|
+
import { pushSurfaceBackHandler } from '../navigation/surfaceBackBridge';
|
|
8
10
|
import type { SurfaceNavStack } from '../navigation/surfaceNavStack';
|
|
9
|
-
import type
|
|
11
|
+
import { getSurfaceConfig, type SurfacePresentation } from '../navigation/surfaceRegistry';
|
|
10
12
|
import {
|
|
11
13
|
closeAllRouteSurfaces,
|
|
12
14
|
navigateWithinOrPresent,
|
|
13
15
|
presentRoute,
|
|
14
16
|
replaceWithinOrPresent,
|
|
15
17
|
} from '../navigation/surfaces';
|
|
18
|
+
import {
|
|
19
|
+
SurfaceHeaderContext,
|
|
20
|
+
type SurfaceHeaderContent,
|
|
21
|
+
} from '../hooks/useSurfaceHeader';
|
|
16
22
|
import type { BaseScreenProps } from '../types/navigation';
|
|
17
23
|
|
|
18
24
|
/** Error boundary catching screen render failures (e.g. a lazy `require()` throw). */
|
|
@@ -72,6 +78,8 @@ export interface SurfaceScreenProps {
|
|
|
72
78
|
surface: SurfaceControls;
|
|
73
79
|
/** This surface's presentation, so `navigate` knows when to drill in vs. stack. */
|
|
74
80
|
presentation: SurfacePresentation;
|
|
81
|
+
/** Whether backdrop / Escape / back may dismiss at the root frame. Defaults to true. */
|
|
82
|
+
dismissOnBackdrop?: boolean;
|
|
75
83
|
}
|
|
76
84
|
|
|
77
85
|
/**
|
|
@@ -83,7 +91,12 @@ export interface SurfaceScreenProps {
|
|
|
83
91
|
* effect) rather than a captured-controls call, so a dismiss requested before
|
|
84
92
|
* this surface mounted still resolves the Bloom surface exactly once.
|
|
85
93
|
*/
|
|
86
|
-
function SurfaceScreen({
|
|
94
|
+
function SurfaceScreen({
|
|
95
|
+
navStack,
|
|
96
|
+
surface,
|
|
97
|
+
presentation,
|
|
98
|
+
dismissOnBackdrop = true,
|
|
99
|
+
}: SurfaceScreenProps) {
|
|
87
100
|
const theme = useTheme();
|
|
88
101
|
const state = useStore(navStack.store);
|
|
89
102
|
const top = state.frames[state.frames.length - 1];
|
|
@@ -124,11 +137,56 @@ function SurfaceScreen({ navStack, surface, presentation }: SurfaceScreenProps)
|
|
|
124
137
|
navStack.requestDismiss();
|
|
125
138
|
}, [navStack]);
|
|
126
139
|
|
|
140
|
+
const handleSystemBack = useCallback((): boolean => {
|
|
141
|
+
if (navStack.goBack()) return true;
|
|
142
|
+
const current = navStack.getTop();
|
|
143
|
+
if (current.step > 0) {
|
|
144
|
+
navStack.setStep(current.step - 1);
|
|
145
|
+
return true;
|
|
146
|
+
}
|
|
147
|
+
if (dismissOnBackdrop) navStack.requestDismiss();
|
|
148
|
+
return true;
|
|
149
|
+
}, [navStack, dismissOnBackdrop]);
|
|
150
|
+
|
|
151
|
+
useEffect(() => pushSurfaceBackHandler(handleSystemBack), [handleSystemBack]);
|
|
152
|
+
|
|
127
153
|
const present = useCallback(
|
|
128
154
|
(route: RouteName, props?: Record<string, unknown>) => presentRoute(route, props).result,
|
|
129
155
|
[],
|
|
130
156
|
);
|
|
131
157
|
|
|
158
|
+
// --- Dialog nav-header wiring ------------------------------------------
|
|
159
|
+
// Screens render NO header of their own: the Dialog owns a sticky gradient nav
|
|
160
|
+
// bar + a large collapsing title. Here the surface HOST supplies the back/close
|
|
161
|
+
// wiring and bridges the mounted screen's runtime contribution (its translated
|
|
162
|
+
// title/subtitle + any action slot, via `useSurfaceHeader`) into the Dialog's
|
|
163
|
+
// header. One writer to Bloom's header store — this merge — so back/close and
|
|
164
|
+
// the screen's content never race.
|
|
165
|
+
const [headerContent, setHeaderContent] = useState<SurfaceHeaderContent | null>(null);
|
|
166
|
+
const headerContext = useMemo(() => ({ setContent: setHeaderContent }), []);
|
|
167
|
+
|
|
168
|
+
const headerMode = useMemo(
|
|
169
|
+
() => getSurfaceConfig(top.route, top.props).header,
|
|
170
|
+
[top.route, top.props],
|
|
171
|
+
);
|
|
172
|
+
// Show a back affordance whenever the surface can navigate back — either an
|
|
173
|
+
// earlier frame in this surface's stack, or an earlier wizard step.
|
|
174
|
+
const canGoBackNow = state.frames.length > 1 || top.step > 0;
|
|
175
|
+
|
|
176
|
+
const dialogHeader = useMemo<DialogHeaderConfig | null>(() => {
|
|
177
|
+
if (!headerMode) return null;
|
|
178
|
+
return {
|
|
179
|
+
largeTitle: true,
|
|
180
|
+
...headerContent,
|
|
181
|
+
// A screen may own its back (e.g. the account dialog's per-view back via
|
|
182
|
+
// `useSurfaceHeader({ onBack })`); otherwise the surface's nav-stack back
|
|
183
|
+
// drives it (a drilled-in frame / wizard step).
|
|
184
|
+
onBack: headerContent?.onBack ?? (canGoBackNow ? goBack : undefined),
|
|
185
|
+
};
|
|
186
|
+
}, [headerMode, headerContent, canGoBackNow, goBack]);
|
|
187
|
+
|
|
188
|
+
useDialogHeader(dialogHeader);
|
|
189
|
+
|
|
132
190
|
const screenProps = useMemo<BaseScreenProps>(() => {
|
|
133
191
|
const { initialStep: _omitInitialStep, ...rest } = top.props;
|
|
134
192
|
return {
|
|
@@ -157,9 +215,11 @@ function SurfaceScreen({ navStack, surface, presentation }: SurfaceScreenProps)
|
|
|
157
215
|
if (!ScreenComponent) return null;
|
|
158
216
|
|
|
159
217
|
return (
|
|
160
|
-
<
|
|
161
|
-
<
|
|
162
|
-
|
|
218
|
+
<SurfaceHeaderContext.Provider value={headerContext}>
|
|
219
|
+
<ScreenErrorBoundary screenName={top.route}>
|
|
220
|
+
<ScreenComponent {...screenProps} />
|
|
221
|
+
</ScreenErrorBoundary>
|
|
222
|
+
</SurfaceHeaderContext.Provider>
|
|
163
223
|
);
|
|
164
224
|
}
|
|
165
225
|
|