@oxyhq/services 22.8.7 → 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/OxyAccountDialogScreen.js +150 -0
- 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/OxyProvider.js +9 -29
- package/lib/commonjs/ui/components/OxyProvider.js.map +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 +193 -0
- package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -0
- 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 +49 -4
- 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/bottomSheetManager.js +38 -56
- package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +7 -57
- 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/surfaceNavStack.js +98 -0
- package/lib/commonjs/ui/navigation/surfaceNavStack.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaceRegistry.js +152 -0
- package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaces.js +256 -0
- package/lib/commonjs/ui/navigation/surfaces.js.map +1 -0
- 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/fileManagement/hooks/useFileUploadState.js +9 -7
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +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/commonjs/ui/types/surfaceScreen.js +6 -0
- package/lib/commonjs/ui/types/surfaceScreen.js.map +1 -0
- package/lib/module/index.js +12 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js +145 -0
- 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/OxyProvider.js +10 -30
- package/lib/module/ui/components/OxyProvider.js.map +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 +188 -0
- package/lib/module/ui/components/SurfaceScreen.js.map +1 -0
- 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 +49 -4
- 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/bottomSheetManager.js +37 -53
- package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +6 -56
- 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/surfaceNavStack.js +95 -0
- package/lib/module/ui/navigation/surfaceNavStack.js.map +1 -0
- package/lib/module/ui/navigation/surfaceRegistry.js +146 -0
- package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -0
- package/lib/module/ui/navigation/surfaces.js +244 -0
- package/lib/module/ui/navigation/surfaces.js.map +1 -0
- 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/fileManagement/hooks/useFileUploadState.js +8 -7
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +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/module/ui/types/surfaceScreen.js +4 -0
- package/lib/module/ui/types/surfaceScreen.js.map +1 -0
- 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/OxyAccountDialogScreen.d.ts +39 -0
- 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/OxyProvider.d.ts +3 -2
- package/lib/typescript/commonjs/ui/components/OxyProvider.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 +26 -0
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -0
- 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/bottomSheetManager.d.ts +24 -16
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +2 -60
- package/lib/typescript/commonjs/ui/navigation/routes.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/surfaceNavStack.d.ts +51 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +135 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts +79 -0
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -0
- 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/fileManagement/hooks/useFileUploadState.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/commonjs/ui/types/surfaceScreen.d.ts +38 -0
- package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts.map +1 -0
- 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/OxyAccountDialogScreen.d.ts +39 -0
- 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/OxyProvider.d.ts +3 -2
- package/lib/typescript/module/ui/components/OxyProvider.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 +26 -0
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -0
- 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/bottomSheetManager.d.ts +24 -16
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +2 -60
- package/lib/typescript/module/ui/navigation/routes.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/surfaceNavStack.d.ts +51 -0
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +135 -0
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaces.d.ts +79 -0
- package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -0
- 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/fileManagement/hooks/useFileUploadState.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/lib/typescript/module/ui/types/surfaceScreen.d.ts +38 -0
- package/lib/typescript/module/ui/types/surfaceScreen.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/index.ts +12 -5
- package/src/ui/components/OxyAccountDialogScreen.tsx +148 -0
- package/src/ui/components/OxyAuthChooser.tsx +153 -33
- package/src/ui/components/OxyConsentScreen.tsx +1 -1
- package/src/ui/components/OxyProvider.tsx +12 -34
- 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 +226 -0
- 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 +43 -3
- 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__/getSurfaceConfig.test.ts +39 -0
- package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +68 -0
- package/src/ui/navigation/accountDialogManager.ts +14 -2
- package/src/ui/navigation/bottomSheetManager.ts +46 -73
- package/src/ui/navigation/routes.ts +7 -106
- package/src/ui/navigation/surfaceBackBridge.ts +69 -0
- package/src/ui/navigation/surfaceNavStack.ts +110 -0
- package/src/ui/navigation/surfaceRegistry.ts +240 -0
- package/src/ui/navigation/surfaces.ts +272 -0
- 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/fileManagement/hooks/useFileUploadState.ts +9 -7
- 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/src/ui/types/surfaceScreen.ts +38 -0
- package/lib/commonjs/ui/components/BottomSheet.js +0 -49
- package/lib/commonjs/ui/components/BottomSheet.js.map +0 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +0 -298
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +0 -1
- 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 +0 -259
- package/lib/commonjs/ui/components/OxyAccountDialog.js.map +0 -1
- package/lib/module/ui/components/BottomSheet.js +0 -45
- package/lib/module/ui/components/BottomSheet.js.map +0 -1
- package/lib/module/ui/components/BottomSheetRouter.js +0 -292
- package/lib/module/ui/components/BottomSheetRouter.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 +0 -254
- package/lib/module/ui/components/OxyAccountDialog.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts +0 -29
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts +0 -9
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.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 +0 -37
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/BottomSheet.d.ts +0 -29
- package/lib/typescript/module/ui/components/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +0 -9
- package/lib/typescript/module/ui/components/BottomSheetRouter.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 +0 -37
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +0 -1
- package/src/ui/components/BottomSheet.tsx +0 -48
- package/src/ui/components/BottomSheetRouter.tsx +0 -310
- package/src/ui/components/Header.tsx +0 -224
- package/src/ui/components/OxyAccountDialog.tsx +0 -243
- package/src/ui/navigation/__tests__/getSheetConfig.test.ts +0 -36
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrustFAQScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustFAQScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;;
|
|
1
|
+
{"version":3,"file":"TrustFAQScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustFAQScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;;AAkG9D,wBAA0C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrustLeaderboardScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustLeaderboardScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AAa9D,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"TrustLeaderboardScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustLeaderboardScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AAa9D,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsJrD,CAAC;AA0CF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrustRewardsScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustRewardsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AA0E9D,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"TrustRewardsScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustRewardsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AA0E9D,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmXjD,CAAC;AAkIF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrustRulesScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustRulesScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AAiB9D,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"TrustRulesScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/trust/TrustRulesScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAAwB,CAAC;AAiB9D,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAqF/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -10,6 +10,14 @@ export interface BaseScreenProps {
|
|
|
10
10
|
goBack?: () => void;
|
|
11
11
|
onClose?: () => void;
|
|
12
12
|
onAuthenticated?: (payload?: unknown) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Dismiss THIS surface, resolving the `present()` promise that opened it
|
|
15
|
+
* with `result`. Injected by the surface host (the P1 surface stack). Picker
|
|
16
|
+
* and crop screens use it to hand a typed result back to the awaiting
|
|
17
|
+
* `surfaces.present(...)` call instead of an untyped `onSelect`/`onConfirm`
|
|
18
|
+
* callback prop.
|
|
19
|
+
*/
|
|
20
|
+
dismiss?: (result?: unknown) => void;
|
|
13
21
|
theme?: 'light' | 'dark' | string;
|
|
14
22
|
initialStep?: number;
|
|
15
23
|
stepControllerRef?: RefObject<StepController | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../../src/ui/types/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAsB,CAAC;AAItD,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAE5B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACxE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../../src/ui/types/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAsB,CAAC;AAItD,MAAM,WAAW,cAAc;IAC3B,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAE5B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACxE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAGrC,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAGlC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAGjE,aAAa,CAAC,EAAE,SAAS,CAAC;IAG1B,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAGnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IAMtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;CACzC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { RouteName } from '../navigation/routes.js';
|
|
2
|
+
import type { SurfaceProps, SurfaceResult } from '../navigation/surfaceRegistry.js';
|
|
3
|
+
/**
|
|
4
|
+
* The typed prop contract a screen receives when it is bound into an SDK surface.
|
|
5
|
+
*
|
|
6
|
+
* This is the successor to the grab-bag `BaseScreenProps`: `props` carries the
|
|
7
|
+
* route's own {@link SurfaceProps typed props}, and the navigation methods are
|
|
8
|
+
* split along the two axes the surface system models — NAV-WITHIN
|
|
9
|
+
* (`navigate`/`replace`/`goBack`/`step`) inside this surface, and DEPTH
|
|
10
|
+
* (`present`/`dismiss`) across the stack.
|
|
11
|
+
*
|
|
12
|
+
* In P1 the ~35 screens still consume the legacy `BaseScreenProps` shape (the
|
|
13
|
+
* `SurfaceScreen` binding passes a superset that satisfies both), so this type is
|
|
14
|
+
* the target contract for the per-screen migration in a later phase — it is not
|
|
15
|
+
* yet the render-time prop shape for existing screens.
|
|
16
|
+
*/
|
|
17
|
+
export interface SurfaceScreenProps<K extends RouteName> {
|
|
18
|
+
/** The route's typed props (from the {@link SurfaceProps registry}). */
|
|
19
|
+
props: SurfaceProps<K>;
|
|
20
|
+
/** Drill in to another route — WITHIN this surface, or a new surface if the
|
|
21
|
+
* target's presentation differs. */
|
|
22
|
+
navigate: <T extends RouteName>(route: T, props?: SurfaceProps<T>) => void;
|
|
23
|
+
/** Replace the current route in place (no history entry). */
|
|
24
|
+
replace: <T extends RouteName>(route: T, props?: SurfaceProps<T>) => void;
|
|
25
|
+
/** Pop one level; if at the root, dismiss the surface. */
|
|
26
|
+
goBack: () => void;
|
|
27
|
+
/** Whether a back is possible (a deeper route OR a prior wizard step). */
|
|
28
|
+
canGoBack: () => boolean;
|
|
29
|
+
/** Dismiss THIS surface, resolving its `present()` promise with `result`. */
|
|
30
|
+
dismiss: (result?: SurfaceResult<K>) => void;
|
|
31
|
+
/** Present a NEW surface on top of the stack (DEPTH); resolves with its result. */
|
|
32
|
+
present: <T extends RouteName>(route: T, props?: SurfaceProps<T>) => Promise<SurfaceResult<T> | undefined>;
|
|
33
|
+
/** The current wizard step of this frame. */
|
|
34
|
+
step: number;
|
|
35
|
+
/** Set the current wizard step. */
|
|
36
|
+
setStep: (step: number) => void;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=surfaceScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"surfaceScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/types/surfaceScreen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kCAA+B,CAAC;AAEjF;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,SAAS;IACrD,wEAAwE;IACxE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACvB;wCACoC;IACpC,QAAQ,EAAE,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC3E,6DAA6D;IAC7D,OAAO,EAAE,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC1E,0DAA0D;IAC1D,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,0EAA0E;IAC1E,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,6EAA6E;IAC7E,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC7C,mFAAmF;IACnF,OAAO,EAAE,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAC3G,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/services",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.10.0",
|
|
4
4
|
"description": "OxyHQ Expo/React Native SDK — UI components, screens, and native features",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
},
|
|
177
177
|
"peerDependencies": {
|
|
178
178
|
"@expo/vector-icons": "^15.0.3",
|
|
179
|
-
"@oxyhq/bloom": ">=0.
|
|
179
|
+
"@oxyhq/bloom": ">=0.48.0",
|
|
180
180
|
"@oxyhq/core": "^12.9.0",
|
|
181
181
|
"@react-native-async-storage/async-storage": "^2.0.0",
|
|
182
182
|
"@react-native-community/netinfo": "^11.4.1",
|
package/src/index.ts
CHANGED
|
@@ -236,15 +236,16 @@ export { LogoIcon } from './ui/components/logo/LogoIcon';
|
|
|
236
236
|
export { LogoText } from './ui/components/logo/LogoText';
|
|
237
237
|
|
|
238
238
|
// Sidebar account trigger. Pressing `ProfileButton` opens the unified
|
|
239
|
-
// `
|
|
239
|
+
// `OxyAccountDialogScreen` (the single account switcher + sign-in surface) via
|
|
240
240
|
// `useOxy().openAccountDialog`.
|
|
241
241
|
export { default as ProfileButton } from './ui/components/ProfileButton';
|
|
242
242
|
export type { ProfileButtonProps } from './ui/components/ProfileButton';
|
|
243
243
|
|
|
244
|
-
// The account switcher/sign-in/sign-up chooser WITHOUT dialog chrome —
|
|
245
|
-
//
|
|
246
|
-
// surface; exported directly so a bare
|
|
247
|
-
// page) can mount the exact same chooser
|
|
244
|
+
// The account switcher/sign-in/sign-up chooser WITHOUT dialog chrome — the
|
|
245
|
+
// surface stack presents `OxyAccountDialogScreen` (which renders this) into
|
|
246
|
+
// Bloom's `<Dialog>` for the normal in-app surface; exported directly so a bare
|
|
247
|
+
// host (e.g. a future auth.oxy.so hub page) can mount the exact same chooser
|
|
248
|
+
// with its own completion strategy.
|
|
248
249
|
export { default as OxyAuthChooser } from './ui/components/OxyAuthChooser';
|
|
249
250
|
export type { OxyAuthChooserProps } from './ui/components/OxyAuthChooser';
|
|
250
251
|
|
|
@@ -275,6 +276,12 @@ export { default as AccountSettingsScreen } from './ui/screens/AccountSettingsSc
|
|
|
275
276
|
export { showBottomSheet, closeBottomSheet } from './ui/navigation/bottomSheetManager';
|
|
276
277
|
export type { RouteName } from './ui/navigation/routes';
|
|
277
278
|
|
|
279
|
+
// Surface nav header — a surface screen declares its title/subtitle (+ any
|
|
280
|
+
// action slot) into the Dialog's OWN navigation header. Screens render no header
|
|
281
|
+
// of their own.
|
|
282
|
+
export { useSurfaceHeader, type SurfaceHeaderContent } from './ui/hooks/useSurfaceHeader';
|
|
283
|
+
export { SurfaceHeaderAction, type SurfaceHeaderActionProps } from './ui/components/SurfaceHeaderAction';
|
|
284
|
+
|
|
278
285
|
// ---------------------------------------------------------------------------
|
|
279
286
|
// Unified account dialog — imperative entry points
|
|
280
287
|
// ---------------------------------------------------------------------------
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OxyAccountDialogScreen — the ONE unified account dialog BODY for `@oxyhq/services`.
|
|
3
|
+
*
|
|
4
|
+
* The header (title/subtitle per view + back button) around the headless chooser
|
|
5
|
+
* logic, which lives in `OxyAuthChooser` — the account switcher, sign-in,
|
|
6
|
+
* sign-up, and QR views are ALL there, extracted so the same chooser can be
|
|
7
|
+
* mounted bare by a future host with no Dialog chrome (e.g. an auth.oxy.so hub
|
|
8
|
+
* page driving the cross-origin passkey popup, b2). This file owns ONLY the
|
|
9
|
+
* header + the scroll body.
|
|
10
|
+
*
|
|
11
|
+
* It is presented as the `AccountDialog` route on the shared Bloom SURFACE STACK
|
|
12
|
+
* (`@oxyhq/bloom/surfaces`) — `OxyContext.openAccountDialog` calls
|
|
13
|
+
* `presentDetached('AccountDialog', …, { placement: { base: 'bottom', md:
|
|
14
|
+
* 'center' }, dismissOnBackdrop: false, maxWidth: 420 })`, so the STACK owns the
|
|
15
|
+
* responsive `<Dialog>` chrome and this component renders only its content. That
|
|
16
|
+
* replaces the previous standalone controlled `<Dialog open={isAccountDialogOpen}>`
|
|
17
|
+
* mount: dismissal now flows through the stack (backdrop/swipe disabled), and the
|
|
18
|
+
* header close button (and `OxyAuthChooser`'s `onComplete`) drive
|
|
19
|
+
* `useOxy().closeAccountDialog`, which dismisses the surface and runs its exit
|
|
20
|
+
* animation. The view-enum (`accounts|signin|qr|add|signup`) stays internal here,
|
|
21
|
+
* driven by the shared `AccountDialogController` in `@oxyhq/core`.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import type React from 'react';
|
|
25
|
+
import { useCallback, useSyncExternalStore } from 'react';
|
|
26
|
+
import { StyleSheet, View } from 'react-native';
|
|
27
|
+
import type { AccountDialogSnapshot } from '@oxyhq/core';
|
|
28
|
+
import { useOxy } from '../context/OxyContext';
|
|
29
|
+
import { useI18n } from '../hooks/useI18n';
|
|
30
|
+
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
31
|
+
import OxyAuthChooser from './OxyAuthChooser';
|
|
32
|
+
|
|
33
|
+
type Translate = ReturnType<typeof useI18n>['t'];
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The unified account dialog BODY — the header + `OxyAuthChooser` chooser.
|
|
37
|
+
*
|
|
38
|
+
* Presented as the `AccountDialog` surface (route) on the shared Bloom surface
|
|
39
|
+
* stack; the surface owns the `<Dialog>` chrome (responsive `{ base: 'bottom',
|
|
40
|
+
* md: 'center' }` placement, `dismissOnBackdrop={false}`, `maxWidth={420}` — set
|
|
41
|
+
* by `OxyContext` when it presents this surface), so this component renders ONLY
|
|
42
|
+
* the content. Open it via `useOxy().openAccountDialog(view?)` or the imperative
|
|
43
|
+
* `openAccountDialog('signin')`; the view-enum (`accounts|signin|qr|add|signup`)
|
|
44
|
+
* stays internal here, driven by the shared `AccountDialogController` in
|
|
45
|
+
* `@oxyhq/core`. Closing routes through `useOxy().closeAccountDialog`, which
|
|
46
|
+
* dismisses the surface and runs its exit animation.
|
|
47
|
+
*/
|
|
48
|
+
const OxyAccountDialogScreen: React.FC = () => {
|
|
49
|
+
const { accountDialogController: controller, closeAccountDialog } = useOxy();
|
|
50
|
+
const { t } = useI18n();
|
|
51
|
+
|
|
52
|
+
// A lightweight, header-only binding to the same controller `OxyAuthChooser`
|
|
53
|
+
// binds independently — cheap, and the established pattern here (
|
|
54
|
+
// `useSwitchableAccounts` also binds to this controller on its own).
|
|
55
|
+
const subscribe = useCallback(
|
|
56
|
+
(listener: () => void) => (controller ? controller.subscribe(listener) : () => undefined),
|
|
57
|
+
[controller],
|
|
58
|
+
);
|
|
59
|
+
const getSnapshot = useCallback(
|
|
60
|
+
() => (controller ? controller.getSnapshot() : EMPTY_SNAPSHOT),
|
|
61
|
+
[controller],
|
|
62
|
+
);
|
|
63
|
+
const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
64
|
+
|
|
65
|
+
const { view } = snapshot;
|
|
66
|
+
const showBack =
|
|
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);
|
|
70
|
+
|
|
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
|
+
});
|
|
80
|
+
|
|
81
|
+
if (!controller) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<View style={styles.bodyContent}>
|
|
87
|
+
<OxyAuthChooser onComplete={closeAccountDialog} />
|
|
88
|
+
</View>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
// ---------------------------------------------------------------------------
|
|
93
|
+
// Copy + helpers
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
|
|
96
|
+
function headerCopy(
|
|
97
|
+
view: AccountDialogSnapshot['view'],
|
|
98
|
+
accountCount: number,
|
|
99
|
+
t: Translate,
|
|
100
|
+
): { title: string; subtitle: string | null } {
|
|
101
|
+
switch (view) {
|
|
102
|
+
case 'accounts':
|
|
103
|
+
return {
|
|
104
|
+
title: t('accountSwitcher.sections.yourAccounts') || 'Your accounts',
|
|
105
|
+
subtitle: t('signin.chooser.subtitle') || 'Choose which account to continue with.',
|
|
106
|
+
};
|
|
107
|
+
case 'qr':
|
|
108
|
+
return {
|
|
109
|
+
title: t('accountSwitcher.scanTitle') || 'Sign in with Oxy',
|
|
110
|
+
subtitle: t('accountSwitcher.scanSubtitle') || 'Scan with Commons on your phone.',
|
|
111
|
+
};
|
|
112
|
+
case 'signup':
|
|
113
|
+
return {
|
|
114
|
+
title: t('signup.title') || 'Create your account',
|
|
115
|
+
subtitle: t('signup.subtitle') || 'One identity for the whole ecosystem.',
|
|
116
|
+
};
|
|
117
|
+
default:
|
|
118
|
+
return accountCount > 0
|
|
119
|
+
? {
|
|
120
|
+
title: t('signin.addAccountTitle') || 'Add another account',
|
|
121
|
+
subtitle: t('signin.addAccountSubtitle') || 'Sign in with another account.',
|
|
122
|
+
}
|
|
123
|
+
: {
|
|
124
|
+
title: t('signin.title') || 'Sign in',
|
|
125
|
+
subtitle: t('signin.subtitle') || 'One identity for the whole ecosystem.',
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const EMPTY_SNAPSHOT: AccountDialogSnapshot = {
|
|
131
|
+
view: 'accounts',
|
|
132
|
+
accounts: [],
|
|
133
|
+
activeAccountId: null,
|
|
134
|
+
loading: false,
|
|
135
|
+
error: null,
|
|
136
|
+
switchingAccountId: null,
|
|
137
|
+
signIn: { phase: 'idle', authorizeCode: null, qrPayload: null, expiresAt: null, error: null },
|
|
138
|
+
commonsAvailability: 'unknown',
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const styles = StyleSheet.create({
|
|
142
|
+
bodyContent: {
|
|
143
|
+
paddingTop: 4,
|
|
144
|
+
paddingBottom: 4,
|
|
145
|
+
},
|
|
146
|
+
});
|
|
147
|
+
|
|
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
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect, useRef, useState, type FC, type ReactNode } from 'react';
|
|
2
2
|
import { AppState, Platform, StyleSheet, View } from 'react-native';
|
|
3
3
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
4
4
|
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
@@ -6,6 +6,7 @@ import type { OxyProviderProps } from '../types/navigation';
|
|
|
6
6
|
import { OxyContextProvider, type OxyContextProviderProps } from '../context/OxyContext';
|
|
7
7
|
import { QueryClientProvider, focusManager, onlineManager } from '@tanstack/react-query';
|
|
8
8
|
import { BloomDialogProvider } from '@oxyhq/bloom';
|
|
9
|
+
import { SurfaceProvider } from '@oxyhq/bloom/surfaces';
|
|
9
10
|
import { ToastOutlet } from '@oxyhq/bloom/toast';
|
|
10
11
|
import { logger as loggerUtil } from '@oxyhq/core';
|
|
11
12
|
import { RequireOxyAuth } from './RequireOxyAuth';
|
|
@@ -49,35 +50,14 @@ const isWeb = Platform.OS === 'web';
|
|
|
49
50
|
// static analyzer cannot trace this into the web bundle. Native-only.
|
|
50
51
|
const KEYBOARD_CONTROLLER_MODULE = 'react-native-keyboard-controller';
|
|
51
52
|
|
|
52
|
-
// Lazy-load optional components (avoids require() for ESM compatibility).
|
|
53
|
-
// The .then() extracts + casts the default export so that `lazy()` sees
|
|
54
|
-
// `Promise<{ default: ComponentType }>` instead of the full module namespace.
|
|
55
|
-
const LazyBottomSheetRouter = lazy((): Promise<{ default: ComponentType }> =>
|
|
56
|
-
import('./BottomSheetRouter').then(
|
|
57
|
-
(mod) => ({ default: mod.default as unknown as ComponentType }),
|
|
58
|
-
(error) => {
|
|
59
|
-
if (__DEV__) {
|
|
60
|
-
loggerUtil.error('Failed to load BottomSheetRouter', error instanceof Error ? error : new Error(String(error)), { component: 'OxyProvider' });
|
|
61
|
-
}
|
|
62
|
-
return { default: (() => null) as FC };
|
|
63
|
-
},
|
|
64
|
-
),
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
const LazyOxyAccountDialog = lazy((): Promise<{ default: ComponentType }> =>
|
|
68
|
-
import('./OxyAccountDialog').then(
|
|
69
|
-
(mod) => ({ default: mod.default as unknown as ComponentType }),
|
|
70
|
-
() => ({ default: (() => null) as FC }),
|
|
71
|
-
),
|
|
72
|
-
);
|
|
73
|
-
|
|
74
53
|
/**
|
|
75
54
|
* OxyProvider - Universal provider for Expo apps (native + web)
|
|
76
55
|
*
|
|
77
56
|
* Provides authentication, session management, query client, and UI overlays.
|
|
78
57
|
* Wraps its own overlay stack in SafeAreaProvider and GestureHandlerRootView so
|
|
79
|
-
*
|
|
80
|
-
*
|
|
58
|
+
* the shared Bloom SURFACE STACK (`<SurfaceProvider>` / `<SurfaceHost>`) — which
|
|
59
|
+
* hosts every SDK surface (the ~35 bottom-sheet routes + the AccountDialog) — can
|
|
60
|
+
* safely render even when a consuming app has not mounted those providers yet.
|
|
81
61
|
*
|
|
82
62
|
* Usage:
|
|
83
63
|
* ```tsx
|
|
@@ -316,15 +296,13 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
316
296
|
hubSync={hubSync}
|
|
317
297
|
onAuthStateChange={onAuthStateChange as OxyContextProviderProps['onAuthStateChange']}
|
|
318
298
|
>
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
<LazyOxyAccountDialog />
|
|
327
|
-
</Suspense>
|
|
299
|
+
<SurfaceProvider>
|
|
300
|
+
{requireAuth === 'off' ? (
|
|
301
|
+
children
|
|
302
|
+
) : (
|
|
303
|
+
<RequireOxyAuth prompt={requireAuth}>{children}</RequireOxyAuth>
|
|
304
|
+
)}
|
|
305
|
+
</SurfaceProvider>
|
|
328
306
|
<ToastOutlet />
|
|
329
307
|
</OxyContextProvider>
|
|
330
308
|
</BloomDialogProvider>
|
|
@@ -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).
|