@oxyhq/services 22.9.0 → 22.11.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/AvatarCameraBadge.js +42 -0
- package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -0
- package/lib/commonjs/ui/components/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +55 -133
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -0
- package/lib/commonjs/ui/components/OxyAuthChooser.js +657 -88
- 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 +15 -1
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileSummaryCard.js +3 -23
- package/lib/commonjs/ui/components/ProfileSummaryCard.js.map +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 +91 -8
- 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 +81 -19
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -1
- package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js +83 -23
- package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.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 +79 -29
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +18 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useFileQueries.js +129 -0
- package/lib/commonjs/ui/hooks/queries/useFileQueries.js.map +1 -0
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +38 -55
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/hooks/useReduceMotion.js +57 -0
- package/lib/commonjs/ui/hooks/useReduceMotion.js.map +1 -0
- 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 +36 -2
- package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/bottomSheetManager.js +5 -6
- package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +4 -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/surfaceNavStack.js +62 -15
- package/lib/commonjs/ui/navigation/surfaceNavStack.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaceRegistry.js +84 -19
- package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaces.js +139 -25
- 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 +287 -289
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js +301 -0
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js.map +1 -0
- 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 +403 -627
- 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/WelcomeNewUserScreen.js +16 -48
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js +63 -0
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js.map +1 -0
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +54 -41
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +44 -81
- 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/stores/resetSessionScopedStores.js +8 -3
- package/lib/commonjs/ui/stores/resetSessionScopedStores.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +11 -2
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +0 -79
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/index.js +12 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js +40 -0
- package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -0
- package/lib/module/ui/components/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +57 -135
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -0
- package/lib/module/ui/components/OxyAuthChooser.js +659 -91
- 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 +16 -2
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/ProfileSummaryCard.js +2 -23
- package/lib/module/ui/components/ProfileSummaryCard.js.map +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 +93 -10
- 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 +81 -19
- package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -1
- package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js +83 -25
- package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.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 +80 -30
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +16 -0
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useFileQueries.js +120 -0
- package/lib/module/ui/hooks/queries/useFileQueries.js.map +1 -0
- package/lib/module/ui/hooks/useAvatarPicker.js +38 -55
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/hooks/useReduceMotion.js +53 -0
- package/lib/module/ui/hooks/useReduceMotion.js.map +1 -0
- 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 +34 -2
- package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/module/ui/navigation/bottomSheetManager.js +6 -7
- package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +4 -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/surfaceNavStack.js +62 -15
- package/lib/module/ui/navigation/surfaceNavStack.js.map +1 -1
- package/lib/module/ui/navigation/surfaceRegistry.js +84 -19
- package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -1
- package/lib/module/ui/navigation/surfaces.js +138 -26
- 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 +289 -291
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ChangeAvatarScreen.js +298 -0
- package/lib/module/ui/screens/ChangeAvatarScreen.js.map +1 -0
- 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 +408 -631
- 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/WelcomeNewUserScreen.js +17 -49
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js +59 -0
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js.map +1 -0
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +54 -42
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +45 -81
- 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/stores/resetSessionScopedStores.js +8 -3
- package/lib/module/ui/stores/resetSessionScopedStores.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +11 -2
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +0 -78
- package/lib/module/ui/utils/fileManagement.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/AvatarCameraBadge.d.ts +4 -0
- package/lib/typescript/commonjs/ui/components/AvatarCameraBadge.d.ts.map +1 -0
- package/lib/typescript/{module/ui/components/OxyAccountDialog.d.ts → commonjs/ui/components/OxyAccountDialogScreen.d.ts} +5 -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/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileSummaryCard.d.ts.map +1 -1
- 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 +3 -4
- 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 +75 -13
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/photogrid/JustifiedPhotoGrid.d.ts +10 -8
- package/lib/typescript/commonjs/ui/components/photogrid/JustifiedPhotoGrid.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/queries/queryKeys.d.ts +9 -0
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts +50 -0
- package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +17 -16
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useReduceMotion.d.ts +14 -0
- package/lib/typescript/commonjs/ui/hooks/useReduceMotion.d.ts.map +1 -0
- 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 +27 -2
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +4 -5
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
- 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 +21 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +101 -23
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts +42 -11
- 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 +18 -9
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts +34 -0
- package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts.map +1 -0
- 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/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/FileLibraryError.d.ts +23 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/FileLibraryError.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts +4 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts +10 -2
- 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/stores/resetSessionScopedStores.d.ts +8 -1
- package/lib/typescript/commonjs/ui/stores/resetSessionScopedStores.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +10 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +0 -48
- package/lib/typescript/commonjs/ui/utils/fileManagement.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/AvatarCameraBadge.d.ts +4 -0
- package/lib/typescript/module/ui/components/AvatarCameraBadge.d.ts.map +1 -0
- package/lib/typescript/{commonjs/ui/components/OxyAccountDialog.d.ts → module/ui/components/OxyAccountDialogScreen.d.ts} +5 -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/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileSummaryCard.d.ts.map +1 -1
- 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 +3 -4
- 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 +75 -13
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/photogrid/JustifiedPhotoGrid.d.ts +10 -8
- package/lib/typescript/module/ui/components/photogrid/JustifiedPhotoGrid.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/queries/queryKeys.d.ts +9 -0
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts +50 -0
- package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +17 -16
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useReduceMotion.d.ts +14 -0
- package/lib/typescript/module/ui/hooks/useReduceMotion.d.ts.map +1 -0
- 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 +27 -2
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +4 -5
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
- 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 +21 -0
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +101 -23
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaces.d.ts +42 -11
- 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 +18 -9
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts +34 -0
- package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts.map +1 -0
- 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/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/FileLibraryError.d.ts +23 -0
- package/lib/typescript/module/ui/screens/fileManagement/FileLibraryError.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts +4 -0
- package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts +10 -2
- 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/stores/resetSessionScopedStores.d.ts +8 -1
- package/lib/typescript/module/ui/stores/resetSessionScopedStores.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +10 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +0 -48
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/package.json +9 -5
- package/src/index.ts +12 -5
- package/src/ui/components/AvatarCameraBadge.tsx +35 -0
- package/src/ui/components/{OxyAccountDialog.tsx → OxyAccountDialogScreen.tsx} +50 -116
- package/src/ui/components/OxyAuthChooser.tsx +743 -86
- package/src/ui/components/OxyConsentScreen.tsx +1 -1
- package/src/ui/components/ProfileButton.tsx +18 -3
- package/src/ui/components/ProfileSummaryCard.tsx +2 -25
- package/src/ui/components/RequireOxyAuth.tsx +1 -1
- package/src/ui/components/SurfaceHeaderAction.tsx +60 -0
- package/src/ui/components/SurfaceScreen.tsx +108 -14
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +50 -36
- package/src/ui/components/modals/DeleteAccountModal.tsx +47 -26
- package/src/ui/components/oxyAuthChooserStyles.ts +78 -16
- package/src/ui/components/photogrid/JustifiedPhotoGrid.tsx +158 -84
- package/src/ui/components/photogrid/__tests__/chunkPhotos.test.ts +51 -0
- package/src/ui/components/surfaces/ActionSheetSurface.tsx +98 -0
- package/src/ui/context/OxyContext.tsx +79 -25
- package/src/ui/hooks/queries/queryKeys.ts +15 -0
- package/src/ui/hooks/queries/useFileQueries.ts +162 -0
- package/src/ui/hooks/useAvatarPicker.ts +46 -74
- package/src/ui/hooks/useReduceMotion.ts +58 -0
- package/src/ui/hooks/useSurfaceHeader.ts +57 -0
- package/src/ui/hooks/useSwitchableAccounts.ts +1 -1
- package/src/ui/navigation/__tests__/getSurfaceConfig.test.ts +55 -7
- package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +149 -0
- package/src/ui/navigation/accountDialogManager.ts +42 -2
- package/src/ui/navigation/bottomSheetManager.ts +6 -7
- package/src/ui/navigation/routes.ts +6 -4
- package/src/ui/navigation/surfaceBackBridge.ts +69 -0
- package/src/ui/navigation/surfaceNavStack.ts +72 -9
- package/src/ui/navigation/surfaceRegistry.ts +164 -24
- package/src/ui/navigation/surfaces.ts +137 -30
- 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 +340 -311
- package/src/ui/screens/ChangeAvatarScreen.tsx +359 -0
- 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 +370 -610
- 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/WelcomeNewUserScreen.tsx +18 -48
- package/src/ui/screens/fileManagement/FileLibraryError.tsx +56 -0
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +56 -46
- package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +55 -71
- 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/stores/resetSessionScopedStores.ts +8 -3
- package/src/ui/types/navigation.ts +10 -0
- package/src/ui/utils/avatarUtils.ts +11 -2
- package/src/ui/utils/fileManagement.ts +1 -101
- 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/commonjs/ui/stores/fileStore.js +0 -153
- package/lib/commonjs/ui/stores/fileStore.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/module/ui/stores/fileStore.js +0 -145
- package/lib/module/ui/stores/fileStore.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/commonjs/ui/stores/fileStore.d.ts +0 -31
- package/lib/typescript/commonjs/ui/stores/fileStore.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/lib/typescript/module/ui/stores/fileStore.d.ts +0 -31
- package/lib/typescript/module/ui/stores/fileStore.d.ts.map +0 -1
- package/src/ui/components/Header.tsx +0 -224
- package/src/ui/stores/fileStore.ts +0 -118
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getSurfaceConfig, getSurfacePresentation } from '../surfaceRegistry';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* `getSurfaceConfig` resolves
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* `getSurfaceConfig` resolves how a route renders. EVERY route is a responsive
|
|
5
|
+
* `'sheet'` that MORPHS in place; NO route stacks (genuine overlays are Bloom-raw
|
|
6
|
+
* calls outside this registry). The flagship image picker is a sheet that owns its
|
|
7
|
+
* own scrolling + chrome. These guard the routing contract.
|
|
8
8
|
*/
|
|
9
9
|
describe('getSurfaceConfig presentation', () => {
|
|
10
10
|
const imageOnlyPickerProps = {
|
|
@@ -18,11 +18,59 @@ describe('getSurfaceConfig presentation', () => {
|
|
|
18
18
|
expect(getSurfacePresentation('ManageAccount', {})).toBe('sheet');
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
it('
|
|
21
|
+
it('renders the FileManagement image-only picker as a morphing own-scroller sheet', () => {
|
|
22
22
|
const config = getSurfaceConfig('FileManagement', imageOnlyPickerProps);
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
// It morphs in place like every screen — a sheet, not a stacked full-bleed.
|
|
24
|
+
expect(config.presentation).toBe('sheet');
|
|
25
|
+
expect(config.stacks).toBe(false);
|
|
26
|
+
// PhotoPickerView owns its own FlatList → the host must not wrap it in a
|
|
27
|
+
// ScrollView; and its own translucent bar → no Dialog nav header.
|
|
25
28
|
expect(config.scrollable).toBe(false);
|
|
29
|
+
expect(config.header).toBe(false);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('morphs the surface for every route, the picker included', () => {
|
|
33
|
+
// NAV-WITHIN: drilling into these swaps the content inside ONE surface,
|
|
34
|
+
// which reshapes the panel instead of hard-cutting.
|
|
35
|
+
expect(getSurfaceConfig('ManageAccount', {}).morph).toBe(true);
|
|
36
|
+
expect(getSurfaceConfig('FAQ', {}).morph).toBe(true);
|
|
37
|
+
expect(getSurfaceConfig('FollowersList', {}).morph).toBe(true);
|
|
38
|
+
expect(getSurfaceConfig('FileManagement', imageOnlyPickerProps).morph).toBe(true);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it('never stacks any route — every screen morphs in place', () => {
|
|
42
|
+
// `stacks` is the DECLARATIVE morph-vs-stack signal, and it is FALSE for
|
|
43
|
+
// every route: overlays (action sheets / confirm / prompt) are Bloom-raw
|
|
44
|
+
// `surfaces.present`/`confirm` calls outside this registry.
|
|
45
|
+
expect(getSurfaceConfig('ManageAccount', {}).stacks).toBe(false);
|
|
46
|
+
expect(getSurfaceConfig('AvatarCrop', {}).stacks).toBe(false);
|
|
47
|
+
expect(getSurfaceConfig('ChangeAvatar', {}).stacks).toBe(false);
|
|
48
|
+
expect(getSurfaceConfig('AccountDialog', {}).stacks).toBe(false);
|
|
49
|
+
expect(getSurfaceConfig('FileManagement', imageOnlyPickerProps).stacks).toBe(false);
|
|
50
|
+
expect(getSurfaceConfig('FileManagement', {}).stacks).toBe(false);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it('lets the avatar flow morph list → crop inside ONE surface', () => {
|
|
54
|
+
// ChangeAvatar navigates WITHIN its surface to AvatarCrop, so both frames
|
|
55
|
+
// must share a presentation (else the crop would open on top instead of
|
|
56
|
+
// morphing) and both must opt IN to the morph.
|
|
57
|
+
const list = getSurfaceConfig('ChangeAvatar', {});
|
|
58
|
+
const crop = getSurfaceConfig('AvatarCrop', {});
|
|
59
|
+
expect(crop.presentation).toBe(list.presentation);
|
|
60
|
+
expect(list.morph).toBe(true);
|
|
61
|
+
expect(crop.morph).toBe(true);
|
|
62
|
+
// The morph can only RESIZE the panel when the Dialog owns the scroll
|
|
63
|
+
// container — an own-scroller surface cross-fades but never reshapes.
|
|
64
|
+
expect(list.scrollable).toBe(true);
|
|
65
|
+
expect(crop.scrollable).toBe(true);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it('gives the avatar flow the Dialog nav header on both frames', () => {
|
|
69
|
+
// The Dialog's `header` is fixed for a surface's whole life, so a
|
|
70
|
+
// headerless crop frame inside a header-mode surface would stack two
|
|
71
|
+
// bars. Both frames declare their chrome through `useSurfaceHeader`.
|
|
72
|
+
expect(getSurfaceConfig('ChangeAvatar', {}).header).toBe(true);
|
|
73
|
+
expect(getSurfaceConfig('AvatarCrop', {}).header).toBe(true);
|
|
26
74
|
});
|
|
27
75
|
|
|
28
76
|
it('keeps FileManagement on the sheet when it is not an image-only picker', () => {
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { createSurfaceNavStack } from '../surfaceNavStack';
|
|
2
|
+
import { __resetSurfaceBackBridgeForTests, pushSurfaceBackHandler, __invokeTopSurfaceBackForTests } from '../surfaceBackBridge';
|
|
3
|
+
|
|
4
|
+
describe('createSurfaceNavStack', () => {
|
|
5
|
+
it('starts with a single root frame', () => {
|
|
6
|
+
const stack = createSurfaceNavStack('ManageAccount', { foo: 1 });
|
|
7
|
+
expect(stack.getTop().route).toBe('ManageAccount');
|
|
8
|
+
expect(stack.getTop().props).toEqual({ foo: 1 });
|
|
9
|
+
expect(stack.canGoBack()).toBe(false);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('navigate pushes frames and goBack pops them', () => {
|
|
13
|
+
const stack = createSurfaceNavStack('ManageAccount');
|
|
14
|
+
stack.navigate('EditProfile', { userId: 'u1' });
|
|
15
|
+
expect(stack.getTop().route).toBe('EditProfile');
|
|
16
|
+
expect(stack.canGoBack()).toBe(true);
|
|
17
|
+
expect(stack.goBack()).toBe(true);
|
|
18
|
+
expect(stack.getTop().route).toBe('ManageAccount');
|
|
19
|
+
expect(stack.goBack()).toBe(false);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('replace swaps the top frame without growing history', () => {
|
|
23
|
+
const stack = createSurfaceNavStack('ManageAccount');
|
|
24
|
+
stack.navigate('EditProfile');
|
|
25
|
+
stack.replace('PrivacySettings');
|
|
26
|
+
expect(stack.getTop().route).toBe('PrivacySettings');
|
|
27
|
+
expect(stack.goBack()).toBe(true);
|
|
28
|
+
expect(stack.getTop().route).toBe('ManageAccount');
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('tracks wizard steps on the current frame', () => {
|
|
32
|
+
const stack = createSurfaceNavStack('EditProfile', { initialStep: 2 });
|
|
33
|
+
expect(stack.getTop().step).toBe(2);
|
|
34
|
+
expect(stack.canGoBack()).toBe(true);
|
|
35
|
+
stack.setStep(1);
|
|
36
|
+
expect(stack.getTop().step).toBe(1);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('requestDismiss flips closing once', () => {
|
|
40
|
+
const stack = createSurfaceNavStack('ManageAccount');
|
|
41
|
+
stack.requestDismiss('done');
|
|
42
|
+
expect(stack.store.getState().closing).toBe(true);
|
|
43
|
+
expect(stack.store.getState().closeResult).toBe('done');
|
|
44
|
+
stack.requestDismiss('again');
|
|
45
|
+
expect(stack.store.getState().closeResult).toBe('done');
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
describe('result-bearing sub-flow (morphed-in avatar picker)', () => {
|
|
49
|
+
it('resolves with the descendant dismiss result and pops back to the caller frame', async () => {
|
|
50
|
+
const stack = createSurfaceNavStack('EditProfile');
|
|
51
|
+
const flow = stack.beginFlow('ChangeAvatar');
|
|
52
|
+
expect(stack.getTop().route).toBe('ChangeAvatar');
|
|
53
|
+
// Drill into the crop editor within the flow, then confirm.
|
|
54
|
+
stack.navigate('AvatarCrop', { imageUri: 'file:///x.jpg' });
|
|
55
|
+
stack.resolveFlowOrDismiss({ uri: 'file:///cropped.jpg' });
|
|
56
|
+
await expect(flow).resolves.toEqual({ uri: 'file:///cropped.jpg' });
|
|
57
|
+
// Popped back to the frame that started the flow — surface NOT dismissed.
|
|
58
|
+
expect(stack.getTop().route).toBe('EditProfile');
|
|
59
|
+
expect(stack.store.getState().closing).toBe(false);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('resolves undefined when the flow entry frame is backed out of', async () => {
|
|
63
|
+
const stack = createSurfaceNavStack('EditProfile');
|
|
64
|
+
const flow = stack.beginFlow('ChangeAvatar');
|
|
65
|
+
stack.navigate('AvatarCrop');
|
|
66
|
+
expect(stack.goBack()).toBe(true); // crop -> list (still in flow)
|
|
67
|
+
expect(stack.goBack()).toBe(true); // list -> EditProfile (cancels flow)
|
|
68
|
+
await expect(flow).resolves.toBeUndefined();
|
|
69
|
+
expect(stack.getTop().route).toBe('EditProfile');
|
|
70
|
+
expect(stack.store.getState().closing).toBe(false);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it('resolveFlowOrDismiss with NO active flow dismisses the surface (cold present)', () => {
|
|
74
|
+
const stack = createSurfaceNavStack('ChangeAvatar');
|
|
75
|
+
stack.resolveFlowOrDismiss({ removed: true });
|
|
76
|
+
expect(stack.store.getState().closing).toBe(true);
|
|
77
|
+
expect(stack.store.getState().closeResult).toEqual({ removed: true });
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it('abandons a pending flow (undefined) when the surface is torn down', async () => {
|
|
81
|
+
const stack = createSurfaceNavStack('EditProfile');
|
|
82
|
+
const flow = stack.beginFlow('ChangeAvatar');
|
|
83
|
+
stack.abandonActiveFlow();
|
|
84
|
+
await expect(flow).resolves.toBeUndefined();
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it('NESTS flows: the inner selector resolves first, then the outer avatar flow', async () => {
|
|
88
|
+
// ChangeAvatar (outer) → "My Oxy files" FileManagement (inner) → back → crop.
|
|
89
|
+
const stack = createSurfaceNavStack('EditProfile');
|
|
90
|
+
const avatarFlow = stack.beginFlow('ChangeAvatar');
|
|
91
|
+
const fileFlow = stack.beginFlow('FileManagement');
|
|
92
|
+
expect(stack.getTop().route).toBe('FileManagement');
|
|
93
|
+
// Pick a file → inner flow resolves, pops back to ChangeAvatar (outer still open).
|
|
94
|
+
stack.resolveFlowOrDismiss({ id: 'file-1' });
|
|
95
|
+
await expect(fileFlow).resolves.toEqual({ id: 'file-1' });
|
|
96
|
+
expect(stack.getTop().route).toBe('ChangeAvatar');
|
|
97
|
+
expect(stack.store.getState().closing).toBe(false);
|
|
98
|
+
// Now drill to crop and confirm → outer flow resolves, pops to EditProfile.
|
|
99
|
+
stack.navigate('AvatarCrop');
|
|
100
|
+
stack.resolveFlowOrDismiss({ uri: 'file:///c.jpg' });
|
|
101
|
+
await expect(avatarFlow).resolves.toEqual({ uri: 'file:///c.jpg' });
|
|
102
|
+
expect(stack.getTop().route).toBe('EditProfile');
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it('cancelling the inner selector returns to the outer flow, leaving it open', async () => {
|
|
106
|
+
const stack = createSurfaceNavStack('EditProfile');
|
|
107
|
+
const avatarFlow = stack.beginFlow('ChangeAvatar');
|
|
108
|
+
const fileFlow = stack.beginFlow('FileManagement');
|
|
109
|
+
expect(stack.goBack()).toBe(true); // FileManagement -> ChangeAvatar (cancels inner)
|
|
110
|
+
await expect(fileFlow).resolves.toBeUndefined();
|
|
111
|
+
expect(stack.getTop().route).toBe('ChangeAvatar');
|
|
112
|
+
// The outer avatar flow is still pending.
|
|
113
|
+
let outerSettled = false;
|
|
114
|
+
void avatarFlow.then(() => { outerSettled = true; });
|
|
115
|
+
await Promise.resolve();
|
|
116
|
+
expect(outerSettled).toBe(false);
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
it('tearing down the surface abandons ALL nested flows (undefined)', async () => {
|
|
120
|
+
const stack = createSurfaceNavStack('EditProfile');
|
|
121
|
+
const outer = stack.beginFlow('ChangeAvatar');
|
|
122
|
+
const inner = stack.beginFlow('FileManagement');
|
|
123
|
+
stack.abandonActiveFlow();
|
|
124
|
+
await expect(inner).resolves.toBeUndefined();
|
|
125
|
+
await expect(outer).resolves.toBeUndefined();
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
describe('pushSurfaceBackHandler', () => {
|
|
131
|
+
afterEach(() => {
|
|
132
|
+
__resetSurfaceBackBridgeForTests();
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
it('delegates to the topmost handler', () => {
|
|
136
|
+
const calls: string[] = [];
|
|
137
|
+
pushSurfaceBackHandler(() => {
|
|
138
|
+
calls.push('bottom');
|
|
139
|
+
return true;
|
|
140
|
+
});
|
|
141
|
+
pushSurfaceBackHandler(() => {
|
|
142
|
+
calls.push('top');
|
|
143
|
+
return true;
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
expect(__invokeTopSurfaceBackForTests()).toBe(true);
|
|
147
|
+
expect(calls).toEqual(['top']);
|
|
148
|
+
});
|
|
149
|
+
});
|
|
@@ -1,16 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Imperative
|
|
2
|
+
* Imperative, outside-React entry points for the unified `OxyAccountDialogScreen`.
|
|
3
|
+
*
|
|
4
|
+
* These delegate to the live handles the mounted `OxyProvider` registers via
|
|
5
|
+
* {@link registerAccountDialogControls}. Under the hood `open`/`close` present
|
|
6
|
+
* and dismiss the `AccountDialog` surface on the shared Bloom surface stack
|
|
7
|
+
* (`OxyContext.openAccountDialog` → `presentDetached('AccountDialog', …)`), so
|
|
8
|
+
* whether the dialog is open is owned by that stack — this module is only the
|
|
9
|
+
* thin bridge that reaches the provider's controller (which sets the dialog
|
|
10
|
+
* view) from a non-React call site.
|
|
3
11
|
*/
|
|
4
12
|
|
|
5
13
|
import type { AccountDialogView } from '@oxyhq/core';
|
|
6
14
|
|
|
7
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Live open/close handles registered by the mounted provider. `open` presents
|
|
17
|
+
* the `AccountDialog` surface (and points its view); `close` dismisses it. Both
|
|
18
|
+
* are stack operations — this interface never carries visibility state.
|
|
19
|
+
*/
|
|
8
20
|
export interface AccountDialogControls {
|
|
9
21
|
open: (view?: AccountDialogView) => void;
|
|
10
22
|
close: () => void;
|
|
11
23
|
}
|
|
12
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Optional consumer overrides for account-dialog actions. `ProfileButton` (and
|
|
27
|
+
* similar hosts) register these while mounted so inbox/accounts can route
|
|
28
|
+
* "Manage" / "Add account" to app-local navigation instead of the SDK default.
|
|
29
|
+
*/
|
|
30
|
+
export interface AccountDialogConsumerHooks {
|
|
31
|
+
onNavigateManage?: () => void;
|
|
32
|
+
onAddAccount?: () => void;
|
|
33
|
+
onNavigateProfile?: () => void;
|
|
34
|
+
}
|
|
35
|
+
|
|
13
36
|
let controls: AccountDialogControls | null = null;
|
|
37
|
+
let consumerHooks: AccountDialogConsumerHooks | null = null;
|
|
14
38
|
const visibilityListeners = new Set<(visible: boolean) => void>();
|
|
15
39
|
|
|
16
40
|
export function registerAccountDialogControls(next: AccountDialogControls): () => void {
|
|
@@ -22,6 +46,22 @@ export function registerAccountDialogControls(next: AccountDialogControls): () =
|
|
|
22
46
|
};
|
|
23
47
|
}
|
|
24
48
|
|
|
49
|
+
/** Register app-local manage/add/profile handlers for the account dialog. */
|
|
50
|
+
export function registerAccountDialogConsumerHooks(
|
|
51
|
+
next: AccountDialogConsumerHooks | null,
|
|
52
|
+
): () => void {
|
|
53
|
+
consumerHooks = next;
|
|
54
|
+
return () => {
|
|
55
|
+
if (consumerHooks === next) {
|
|
56
|
+
consumerHooks = null;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function getAccountDialogConsumerHooks(): AccountDialogConsumerHooks | null {
|
|
62
|
+
return consumerHooks;
|
|
63
|
+
}
|
|
64
|
+
|
|
25
65
|
/** Open the account dialog on `view` (default `accounts`). No-op before mount. */
|
|
26
66
|
export function openAccountDialog(view?: AccountDialogView): void {
|
|
27
67
|
controls?.open(view);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { RouteName } from './routes';
|
|
2
2
|
import { isValidRoute } from './routes';
|
|
3
|
-
import {
|
|
3
|
+
import { getSurfaceConfig } from './surfaceRegistry';
|
|
4
4
|
import { closeAllRouteSurfaces, presentRoute, topRouteSurface } from './surfaces';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -16,11 +16,10 @@ import { closeAllRouteSurfaces, presentRoute, topRouteSurface } from './surfaces
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* Open a bottom-sheet route.
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* first one.
|
|
19
|
+
* Open a bottom-sheet route. By DEFAULT it drills into the top-most active
|
|
20
|
+
* surface — morphing it in place (every screen morphs). A NEW surface is stacked
|
|
21
|
+
* on top only when the target route declares `stacks` (reserved for genuine
|
|
22
|
+
* overlays — none today). Opening with no active surface presents the first one.
|
|
24
23
|
*
|
|
25
24
|
* `fullScreen` is accepted for signature compatibility and ignored — a route's
|
|
26
25
|
* surface is now derived from its registry config, not a per-call flag.
|
|
@@ -39,7 +38,7 @@ export const showBottomSheet = (
|
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
const top = topRouteSurface();
|
|
42
|
-
if (top &&
|
|
41
|
+
if (top && !getSurfaceConfig(screen, props).stacks) {
|
|
43
42
|
top.navigate(screen, props);
|
|
44
43
|
} else {
|
|
45
44
|
presentRoute(screen, props);
|
|
@@ -39,11 +39,12 @@ export type RouteName =
|
|
|
39
39
|
| 'CreateAccount' // Create a new account (organization / project / bot)
|
|
40
40
|
| 'AccountMembers' // Manage an account's members (invite / roles / transfer)
|
|
41
41
|
| 'AccountSettings' // Per-account profile edit + members + danger zone
|
|
42
|
-
| '
|
|
42
|
+
| 'ChangeAvatar' // Profile-picture source list — the ONE entry into changing an avatar
|
|
43
|
+
| 'AvatarCrop' // Square-crop editor, reached by navigating within the ChangeAvatar surface
|
|
43
44
|
| 'Notifications' // Per-channel notification preferences
|
|
44
45
|
| 'ConnectedApps' // OAuth-authorized third-party apps the user can revoke
|
|
45
46
|
| 'Preferences' // General user preferences (theme, reduce-motion, etc.)
|
|
46
|
-
| 'AccountDialog'; // Unified account switcher + sign-in surface (
|
|
47
|
+
| 'AccountDialog'; // Unified account switcher + sign-in surface (OxyAccountDialogScreen body)
|
|
47
48
|
|
|
48
49
|
// Lazy screen loaders - functions that return screen components on-demand
|
|
49
50
|
// This breaks the require cycle by deferring imports until screens are actually needed
|
|
@@ -83,14 +84,15 @@ const screenLoaders: Record<RouteName, () => ComponentType<BaseScreenProps>> = {
|
|
|
83
84
|
CreateAccount: () => require('../screens/CreateAccountScreen').default,
|
|
84
85
|
AccountMembers: () => require('../screens/AccountMembersScreen').default,
|
|
85
86
|
AccountSettings: () => require('../screens/AccountSettingsScreen').default,
|
|
87
|
+
ChangeAvatar: () => require('../screens/ChangeAvatarScreen').default,
|
|
86
88
|
AvatarCrop: () => require('../screens/AvatarCropScreen').default,
|
|
87
89
|
Notifications: () => require('../screens/NotificationsScreen').default,
|
|
88
90
|
ConnectedApps: () => require('../screens/ConnectedAppsScreen').default,
|
|
89
91
|
Preferences: () => require('../screens/PreferencesScreen').default,
|
|
90
92
|
// Unified account switcher + sign-in surface. Its body lives in the
|
|
91
|
-
// `
|
|
93
|
+
// `OxyAccountDialogScreen` component (folded from the standalone dialog); the
|
|
92
94
|
// surface stack provides the Dialog chrome around it.
|
|
93
|
-
AccountDialog: () => require('../components/
|
|
95
|
+
AccountDialog: () => require('../components/OxyAccountDialogScreen').default,
|
|
94
96
|
};
|
|
95
97
|
|
|
96
98
|
// Cache loaded components to avoid re-requiring
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { BackHandler, Platform } from 'react-native';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Per-surface system-back handlers (Android hardware back + web Escape).
|
|
5
|
+
*
|
|
6
|
+
* Bloom's `SurfaceHost` dismisses the whole top surface on back/Escape. The SDK
|
|
7
|
+
* needs the old `BottomSheetRouter` semantics first: pop nav history, step a
|
|
8
|
+
* wizard back, then dismiss. A single global listener delegates to the topmost
|
|
9
|
+
* registered handler so stacked surfaces route correctly.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export type SurfaceBackHandler = () => boolean;
|
|
13
|
+
|
|
14
|
+
const handlerStack: SurfaceBackHandler[] = [];
|
|
15
|
+
let androidInstalled = false;
|
|
16
|
+
let escapeInstalled = false;
|
|
17
|
+
|
|
18
|
+
function invokeTopHandler(): boolean {
|
|
19
|
+
const handler = handlerStack[handlerStack.length - 1];
|
|
20
|
+
return handler ? handler() : false;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function installAndroidHandler(): void {
|
|
24
|
+
if (androidInstalled || Platform.OS !== 'android') return;
|
|
25
|
+
androidInstalled = true;
|
|
26
|
+
BackHandler.addEventListener('hardwareBackPress', () => {
|
|
27
|
+
if (handlerStack.length === 0) return false;
|
|
28
|
+
return invokeTopHandler();
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function installEscapeHandler(): void {
|
|
33
|
+
if (escapeInstalled || Platform.OS !== 'web') return;
|
|
34
|
+
if (typeof window === 'undefined') return;
|
|
35
|
+
escapeInstalled = true;
|
|
36
|
+
window.addEventListener(
|
|
37
|
+
'keydown',
|
|
38
|
+
(event) => {
|
|
39
|
+
if (event.key !== 'Escape' || handlerStack.length === 0) return;
|
|
40
|
+
invokeTopHandler();
|
|
41
|
+
event.stopImmediatePropagation();
|
|
42
|
+
event.preventDefault();
|
|
43
|
+
},
|
|
44
|
+
true,
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Register before Bloom's `SurfaceHost` mounts so Escape capture runs first. */
|
|
49
|
+
installEscapeHandler();
|
|
50
|
+
|
|
51
|
+
/** Push a handler for one live surface; returns unregister. */
|
|
52
|
+
export function pushSurfaceBackHandler(handler: SurfaceBackHandler): () => void {
|
|
53
|
+
handlerStack.push(handler);
|
|
54
|
+
installAndroidHandler();
|
|
55
|
+
return () => {
|
|
56
|
+
const index = handlerStack.lastIndexOf(handler);
|
|
57
|
+
if (index >= 0) handlerStack.splice(index, 1);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Test-only: invoke the top handler. */
|
|
62
|
+
export function __invokeTopSurfaceBackForTests(): boolean {
|
|
63
|
+
return invokeTopHandler();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Test-only reset. */
|
|
67
|
+
export function __resetSurfaceBackBridgeForTests(): void {
|
|
68
|
+
handlerStack.length = 0;
|
|
69
|
+
}
|
|
@@ -48,6 +48,27 @@ export interface SurfaceNavStack {
|
|
|
48
48
|
setStep(step: number): void;
|
|
49
49
|
/** Request dismissal of the whole surface, resolving its promise with `result`. */
|
|
50
50
|
requestDismiss(result?: unknown): void;
|
|
51
|
+
/**
|
|
52
|
+
* Begin a result-bearing SUB-FLOW inside this surface: push `route` as a frame
|
|
53
|
+
* and return a promise that settles when the flow finishes — a descendant's
|
|
54
|
+
* `dismiss(result)` resolves it with `result`, backing out of the flow's entry
|
|
55
|
+
* frame resolves it with `undefined` (cancelled) — popping the surface back to
|
|
56
|
+
* the frame that started the flow WITHOUT dismissing it. This is how a screen
|
|
57
|
+
* already living inside a surface (EditProfile, ManageAccount, ChangeAvatar)
|
|
58
|
+
* opens the avatar picker / media selector as a MORPH instead of a stacked
|
|
59
|
+
* surface while still awaiting its result. Flows NEST (ChangeAvatar → the "My
|
|
60
|
+
* Oxy files" selector → back), maintained as a stack.
|
|
61
|
+
*/
|
|
62
|
+
beginFlow(route: RouteName, props?: Record<string, unknown>): Promise<unknown>;
|
|
63
|
+
/**
|
|
64
|
+
* Resolve the INNERMOST active sub-flow with `result` and pop back to its entry
|
|
65
|
+
* (the frame that called {@link beginFlow}), leaving the surface open. With NO
|
|
66
|
+
* active flow this falls back to {@link requestDismiss} — so a screen presented
|
|
67
|
+
* as its OWN surface still dismisses it. Wired to every screen's `dismiss` prop.
|
|
68
|
+
*/
|
|
69
|
+
resolveFlowOrDismiss(result?: unknown): void;
|
|
70
|
+
/** Settle EVERY still-pending sub-flow with `undefined` (the surface is going away). */
|
|
71
|
+
abandonActiveFlow(): void;
|
|
51
72
|
/** The current (top) frame. */
|
|
52
73
|
getTop(): NavFrame;
|
|
53
74
|
}
|
|
@@ -73,9 +94,41 @@ export function createSurfaceNavStack(
|
|
|
73
94
|
return frames[frames.length - 1];
|
|
74
95
|
};
|
|
75
96
|
|
|
97
|
+
// Result-bearing sub-flows currently running in this surface (the morphed-in
|
|
98
|
+
// avatar picker, and — NESTED within it — the "My Oxy files" media selector).
|
|
99
|
+
// A STACK: flows nest (ChangeAvatar → FileManagement → back to ChangeAvatar).
|
|
100
|
+
// Held OUTSIDE the store (resolvers are functions; flow presence must not
|
|
101
|
+
// re-render frames). Each flow's `returnLength` is the frame count BEFORE its
|
|
102
|
+
// entry frame was pushed, so settling pops back to exactly the frame that
|
|
103
|
+
// started it. `flowStack` is ordered outer → inner; the top is the innermost.
|
|
104
|
+
const flowStack: { returnLength: number; resolve: (result: unknown) => void }[] = [];
|
|
105
|
+
|
|
106
|
+
const requestDismiss = (result?: unknown): void => {
|
|
107
|
+
// Dismissing the whole surface abandons EVERY pending sub-flow — settle each
|
|
108
|
+
// promise so an awaiting caller (the avatar picker) never hangs.
|
|
109
|
+
while (flowStack.length) flowStack.pop()?.resolve(undefined);
|
|
110
|
+
if (store.getState().closing) return;
|
|
111
|
+
store.setState({ closing: true, closeResult: result });
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
const goBack = (): boolean => {
|
|
115
|
+
const { frames } = store.getState();
|
|
116
|
+
if (frames.length <= 1) return false;
|
|
117
|
+
const nextLength = frames.length - 1;
|
|
118
|
+
store.setState({ frames: frames.slice(0, -1) });
|
|
119
|
+
// Backing out past a sub-flow's entry frame cancels it (resolve undefined).
|
|
120
|
+
// A single pop crosses at most one boundary, but loop for safety.
|
|
121
|
+
while (flowStack.length && nextLength <= flowStack[flowStack.length - 1].returnLength) {
|
|
122
|
+
flowStack.pop()?.resolve(undefined);
|
|
123
|
+
}
|
|
124
|
+
return true;
|
|
125
|
+
};
|
|
126
|
+
|
|
76
127
|
return {
|
|
77
128
|
store,
|
|
78
129
|
getTop,
|
|
130
|
+
requestDismiss,
|
|
131
|
+
goBack,
|
|
79
132
|
navigate(nextRoute, nextProps) {
|
|
80
133
|
store.setState((state) => ({ frames: [...state.frames, makeFrame(nextRoute, nextProps)] }));
|
|
81
134
|
},
|
|
@@ -84,12 +137,6 @@ export function createSurfaceNavStack(
|
|
|
84
137
|
frames: [...state.frames.slice(0, -1), makeFrame(nextRoute, nextProps)],
|
|
85
138
|
}));
|
|
86
139
|
},
|
|
87
|
-
goBack() {
|
|
88
|
-
const { frames } = store.getState();
|
|
89
|
-
if (frames.length <= 1) return false;
|
|
90
|
-
store.setState({ frames: frames.slice(0, -1) });
|
|
91
|
-
return true;
|
|
92
|
-
},
|
|
93
140
|
canGoBack() {
|
|
94
141
|
const { frames } = store.getState();
|
|
95
142
|
return frames.length > 1 || (frames[frames.length - 1]?.step ?? 0) > 0;
|
|
@@ -102,9 +149,25 @@ export function createSurfaceNavStack(
|
|
|
102
149
|
return { frames };
|
|
103
150
|
});
|
|
104
151
|
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
store.setState({
|
|
152
|
+
beginFlow(nextRoute, nextProps) {
|
|
153
|
+
const returnLength = store.getState().frames.length;
|
|
154
|
+
store.setState((state) => ({ frames: [...state.frames, makeFrame(nextRoute, nextProps)] }));
|
|
155
|
+
return new Promise<unknown>((resolve) => {
|
|
156
|
+
flowStack.push({ returnLength, resolve });
|
|
157
|
+
});
|
|
158
|
+
},
|
|
159
|
+
resolveFlowOrDismiss(result) {
|
|
160
|
+
const flow = flowStack.pop();
|
|
161
|
+
if (!flow) {
|
|
162
|
+
// No flow → this screen owns its surface; dismiss it as before.
|
|
163
|
+
requestDismiss(result);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
store.setState((state) => ({ frames: state.frames.slice(0, flow.returnLength) }));
|
|
167
|
+
flow.resolve(result);
|
|
168
|
+
},
|
|
169
|
+
abandonActiveFlow() {
|
|
170
|
+
while (flowStack.length) flowStack.pop()?.resolve(undefined);
|
|
108
171
|
},
|
|
109
172
|
};
|
|
110
173
|
}
|