@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,6 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { AccountDialogView } from '@oxyhq/core';
|
|
2
|
+
import type { AccountDialogView, FileMetadata } from '@oxyhq/core';
|
|
3
3
|
import type { RouteName } from './routes';
|
|
4
|
+
import type { AvatarCropResult } from '../screens/AvatarCropScreen';
|
|
5
|
+
import type { AvatarRemovalResult } from '../screens/ChangeAvatarScreen';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* The SDK's typed surface registry — the contract layer the SDK stacks on top of
|
|
@@ -28,7 +30,13 @@ export interface SurfaceRegistry {
|
|
|
28
30
|
LanguageSelector: SurfaceRoute;
|
|
29
31
|
PrivacySettings: SurfaceRoute;
|
|
30
32
|
SearchSettings: SurfaceRoute;
|
|
31
|
-
|
|
33
|
+
/**
|
|
34
|
+
* File picker / manager. In single-select picker mode the surface is
|
|
35
|
+
* dismissed with the picked {@link FileMetadata} (the avatar-picker promise
|
|
36
|
+
* flow); legacy callers that pass an `onSelect`/`onConfirmSelection` callback
|
|
37
|
+
* keep their callback behaviour and this result goes unread.
|
|
38
|
+
*/
|
|
39
|
+
FileManagement: SurfaceRoute<Record<string, unknown>, FileMetadata>;
|
|
32
40
|
HelpSupport: SurfaceRoute;
|
|
33
41
|
FAQ: SurfaceRoute;
|
|
34
42
|
Feedback: SurfaceRoute;
|
|
@@ -53,11 +61,22 @@ export interface SurfaceRegistry {
|
|
|
53
61
|
CreateAccount: SurfaceRoute;
|
|
54
62
|
AccountMembers: SurfaceRoute;
|
|
55
63
|
AccountSettings: SurfaceRoute;
|
|
56
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Profile-picture source list — the ONE entry into changing an avatar. Every
|
|
66
|
+
* source that yields an image navigates WITHIN this surface to `AvatarCrop`
|
|
67
|
+
* (so the panel morphs), and the crop's own dismissal resolves this surface.
|
|
68
|
+
* Hence the union: a confirmed crop, or the user removing their photo.
|
|
69
|
+
*/
|
|
70
|
+
ChangeAvatar: SurfaceRoute<Record<string, unknown>, AvatarCropResult | AvatarRemovalResult>;
|
|
71
|
+
/**
|
|
72
|
+
* Square-crop editor. Dismissed with the cropped {@link AvatarCropResult}.
|
|
73
|
+
* Reached only by navigating within a `ChangeAvatar` surface.
|
|
74
|
+
*/
|
|
75
|
+
AvatarCrop: SurfaceRoute<Record<string, unknown>, AvatarCropResult>;
|
|
57
76
|
Notifications: SurfaceRoute;
|
|
58
77
|
ConnectedApps: SurfaceRoute;
|
|
59
78
|
Preferences: SurfaceRoute;
|
|
60
|
-
/** Unified account switcher + sign-in surface (folded `
|
|
79
|
+
/** Unified account switcher + sign-in surface (folded `OxyAccountDialogScreen` body). */
|
|
61
80
|
AccountDialog: SurfaceRoute<{ initialView?: AccountDialogView }>;
|
|
62
81
|
}
|
|
63
82
|
|
|
@@ -83,15 +102,18 @@ export type SurfaceResult<K extends RouteName> = SurfaceRegistry[K]['result'];
|
|
|
83
102
|
* How a surface renders — the SDK's presentation taxonomy. Each value maps to a
|
|
84
103
|
* concrete Bloom `Dialog` placement/chrome in `surfaces.ts`:
|
|
85
104
|
*
|
|
86
|
-
* - `'sheet'` → responsive `{ base: 'bottom', md: 'center' }` (the default
|
|
87
|
-
*
|
|
88
|
-
*
|
|
105
|
+
* - `'sheet'` → responsive `{ base: 'bottom', md: 'center' }` (the default,
|
|
106
|
+
* and — since every screen morphs — the presentation of EVERY
|
|
107
|
+
* route today: a bottom sheet on narrow, a centered card wide).
|
|
108
|
+
* - `'center'` → a plain centered modal at every width. Currently unused.
|
|
89
109
|
* - `'drawer'` → responsive `{ base: 'bottom', md: 'left' }` side drawer.
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
110
|
+
* Currently unused.
|
|
111
|
+
* - `'fullScreen'` → a flush black-canvas surface (`contentPadding: 0`,
|
|
112
|
+
* programmatic-only dismiss). Currently unused: the flagship
|
|
113
|
+
* photo picker now MORPHS in place as a `sheet` (it paints its
|
|
114
|
+
* own black canvas + bar inside the themed panel), so nothing
|
|
115
|
+
* needs a stacked full-bleed surface. Retained for a future
|
|
116
|
+
* route that genuinely must be full-bleed.
|
|
95
117
|
*/
|
|
96
118
|
export type SurfacePresentation = 'sheet' | 'center' | 'drawer' | 'fullScreen';
|
|
97
119
|
|
|
@@ -99,22 +121,72 @@ export type SurfacePresentation = 'sheet' | 'center' | 'drawer' | 'fullScreen';
|
|
|
99
121
|
* Per-route surface configuration. Merges the historical `SheetRouteConfig`
|
|
100
122
|
* knobs with the new {@link SurfacePresentation}.
|
|
101
123
|
*
|
|
102
|
-
* NOTE: `scrollable`
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
* flush layout) is what actually drives the surface today.
|
|
124
|
+
* NOTE: `scrollable` is LIVE — it is threaded through `bloomOptionsFor` onto the
|
|
125
|
+
* Bloom `Dialog` surface (`scrollable` prop), so a route that owns its own scroll
|
|
126
|
+
* container opts OUT of the Dialog's internal ScrollView. `manualActivation` /
|
|
127
|
+
* `dynamicBackdrop` / `handleComponent` remain informational — reserved for a
|
|
128
|
+
* future Bloom bottom-placement passthrough; the shared `DialogBottomSheet`
|
|
129
|
+
* currently owns pan coordination itself.
|
|
109
130
|
*/
|
|
110
131
|
export interface SurfaceRouteConfig {
|
|
111
132
|
/** Which surface hosts the route. */
|
|
112
133
|
presentation: SurfacePresentation;
|
|
113
134
|
/**
|
|
114
135
|
* When `false`, the route owns its own scroll container (a FlatList /
|
|
115
|
-
* SectionList / VirtualizedList) and the host must not
|
|
136
|
+
* SectionList / VirtualizedList, or its own ScrollView) and the host must not
|
|
137
|
+
* wrap it in a ScrollView. Threaded onto Bloom's `Dialog` via `bloomOptionsFor`.
|
|
116
138
|
*/
|
|
117
139
|
scrollable: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Whether the surface MORPHS when this route is navigated to WITHIN it — the
|
|
142
|
+
* panel animates from the outgoing frame's size to this one's instead of
|
|
143
|
+
* hard-cutting (the in-place NAV-WITHIN size animation). `true` for every
|
|
144
|
+
* ordinary route screen; a wizard step swap counts as a frame here too.
|
|
145
|
+
*
|
|
146
|
+
* Distinct from {@link stacks}: `morph` tunes the size animation of an IN-PLACE
|
|
147
|
+
* frame swap; `stacks` decides whether the frame lands in place at all or opens
|
|
148
|
+
* a new surface. A stacked surface can still morph between ITS OWN frames.
|
|
149
|
+
*/
|
|
150
|
+
morph: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* An EXPLICIT target size the panel MORPHS to for this route, instead of the
|
|
153
|
+
* measured natural height / the surface width. This is how an own-scroller frame
|
|
154
|
+
* (its content owns its own scroll, so the panel can't measure it) still GROWS
|
|
155
|
+
* its container to a large declared size — the panel animates UP to it on entry
|
|
156
|
+
* and back DOWN on exit while the frame's inner list scrolls within. `heightRatio`
|
|
157
|
+
* is a fraction of the viewport height (clamped there); `maxWidth` (px) widens the
|
|
158
|
+
* centered card beyond the ordinary sheet. Omit for the normal measured behaviour.
|
|
159
|
+
*/
|
|
160
|
+
frameSize?: { heightRatio?: number; maxWidth?: number };
|
|
161
|
+
/**
|
|
162
|
+
* Whether navigating TO this route from INSIDE an existing surface opens a NEW
|
|
163
|
+
* stacked surface (its own backdrop + entry animation — the DEPTH axis) instead
|
|
164
|
+
* of morphing in place within the current one (the NAV-WITHIN axis).
|
|
165
|
+
*
|
|
166
|
+
* `false` (the DEFAULT) — morph in place: the route is pushed as a frame in the
|
|
167
|
+
* host surface's nav stack and the panel reshapes from the previous frame to it
|
|
168
|
+
* (size-animated per {@link morph}). Every ordinary screen. This is what makes
|
|
169
|
+
* morph the default: a drill-in navigates WITHIN unless the target opts out.
|
|
170
|
+
*
|
|
171
|
+
* `true` — the route's chrome is fundamentally incompatible with morphing into
|
|
172
|
+
* a host, so it must own its own surface: the full-bleed `fullScreen` image
|
|
173
|
+
* picker (black canvas, flush content, programmatic-only dismiss). Presented on
|
|
174
|
+
* top; dismissing it unwinds back to the surface that opened it.
|
|
175
|
+
*
|
|
176
|
+
* NOTE: the DEPTH `present` / `presentDetached` APIs ALWAYS open a new surface
|
|
177
|
+
* regardless of this flag — `stacks` only governs the in-surface drill-in
|
|
178
|
+
* (`navigate` / `showBottomSheet`) decision in `navigateWithinOrPresent`.
|
|
179
|
+
*/
|
|
180
|
+
stacks: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* Whether the surface renders the Dialog's OWN navigation header (sticky
|
|
183
|
+
* gradient nav bar + large collapsing title over the surface's scroll content).
|
|
184
|
+
* `true` for every route screen — screens render NO header of their own and
|
|
185
|
+
* declare their title/subtitle (+ any action slot) via `useSurfaceHeader`.
|
|
186
|
+
* `false` for surfaces with their own chrome (the account dialog, the flagship
|
|
187
|
+
* full-bleed image picker).
|
|
188
|
+
*/
|
|
189
|
+
header: boolean;
|
|
118
190
|
/** Body-pan activation strategy — reserved (owned by Bloom's Dialog surface). */
|
|
119
191
|
manualActivation: boolean;
|
|
120
192
|
/** Drag-proportional backdrop dim — reserved (owned by Bloom's Dialog surface). */
|
|
@@ -127,10 +199,37 @@ export interface SurfaceRouteConfig {
|
|
|
127
199
|
const DEFAULT_SURFACE_CONFIG: SurfaceRouteConfig = {
|
|
128
200
|
presentation: 'sheet',
|
|
129
201
|
scrollable: true,
|
|
202
|
+
header: true,
|
|
203
|
+
morph: true,
|
|
204
|
+
stacks: false,
|
|
130
205
|
manualActivation: true,
|
|
131
206
|
dynamicBackdrop: true,
|
|
132
207
|
};
|
|
133
208
|
|
|
209
|
+
/**
|
|
210
|
+
* Routes that render NO Dialog nav header — they own their chrome:
|
|
211
|
+
* - `PaymentGateway` — the payment surface owns its controls.
|
|
212
|
+
* - `WelcomeNewUser` — a full-bleed onboarding wizard with its own step chrome.
|
|
213
|
+
* - `Profile` — a full profile view, no nav-header chrome.
|
|
214
|
+
* (The flagship full-bleed image picker is handled separately below.)
|
|
215
|
+
*
|
|
216
|
+
* `AccountDialog` used to be here — it now uses the SHARED Dialog nav header like
|
|
217
|
+
* every other screen (its per-view title/subtitle + view-back go through
|
|
218
|
+
* `useSurfaceHeader`), so the account/sign-in surface no longer feels bespoke.
|
|
219
|
+
*
|
|
220
|
+
* `AvatarCrop` used to be here too, for its own translucent Cancel/title/Done
|
|
221
|
+
* bar. It is now reached ONLY by navigating within a `ChangeAvatar` surface, and
|
|
222
|
+
* the Dialog's `header` is fixed for a surface's whole life — a headerless frame
|
|
223
|
+
* inside a header-mode surface would stack two bars. So the crop declares its
|
|
224
|
+
* title + its "Use photo" action through `useSurfaceHeader` like every other
|
|
225
|
+
* screen, and keeps only its dark crop stage.
|
|
226
|
+
*/
|
|
227
|
+
const HEADERLESS_ROUTES: ReadonlySet<RouteName> = new Set<RouteName>([
|
|
228
|
+
'PaymentGateway',
|
|
229
|
+
'WelcomeNewUser',
|
|
230
|
+
'Profile',
|
|
231
|
+
]);
|
|
232
|
+
|
|
134
233
|
/**
|
|
135
234
|
* Predicate matching `FileManagementScreen`'s internal `isImageOnlyPicker`
|
|
136
235
|
* derivation. When the consumer restricts to image MIME types (no videos, no
|
|
@@ -153,16 +252,57 @@ const isFileManagementImageOnlyPicker = (props: Record<string, unknown>): boolea
|
|
|
153
252
|
};
|
|
154
253
|
|
|
155
254
|
/**
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
* `
|
|
255
|
+
* Routes whose screen owns its OWN scroll container — a FlatList /
|
|
256
|
+
* VirtualizedList (`ConnectedApps`, `TrustLeaderboard`, `FollowersList` /
|
|
257
|
+
* `FollowingList` via `UserListScreen`) or its own vertical `ScrollView`
|
|
258
|
+
* (`FileManagement`). These MUST opt out of the Dialog's internal ScrollView
|
|
259
|
+
* (`scrollable: false`) so there is exactly ONE scroll container — otherwise a
|
|
260
|
+
* VirtualizedList nests inside a plain ScrollView (RN warning) or a nested
|
|
261
|
+
* vertical scroll-in-scroll breaks windowing. Screens with only a HORIZONTAL
|
|
262
|
+
* ScrollView (FAQ's category row, Premium's plan carousel) are NOT listed — a
|
|
263
|
+
* horizontal scroller does not conflict with the Dialog's vertical scroll.
|
|
264
|
+
*/
|
|
265
|
+
const OWN_SCROLL_CONTAINER_ROUTES: ReadonlySet<RouteName> = new Set<RouteName>([
|
|
266
|
+
'FileManagement',
|
|
267
|
+
'ConnectedApps',
|
|
268
|
+
'TrustLeaderboard',
|
|
269
|
+
'FollowersList',
|
|
270
|
+
'FollowingList',
|
|
271
|
+
]);
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Resolve the surface configuration for a route + props. Every route defaults to
|
|
275
|
+
* the responsive sheet and MORPHS in place when navigated to from within a surface
|
|
276
|
+
* (no route stacks — genuine overlays are Bloom-raw `surfaces.present`/`confirm`
|
|
277
|
+
* calls, outside this registry). The image-only FileManagement picker is a normal
|
|
278
|
+
* sheet that owns its own scroll + translucent bar (no Dialog nav header); every
|
|
279
|
+
* other own-scroller is marked `scrollable: false`.
|
|
159
280
|
*/
|
|
160
281
|
export const getSurfaceConfig = (
|
|
161
282
|
route: RouteName,
|
|
162
283
|
props: Record<string, unknown>,
|
|
163
284
|
): SurfaceRouteConfig => {
|
|
164
285
|
if (route === 'FileManagement' && isFileManagementImageOnlyPicker(props)) {
|
|
165
|
-
|
|
286
|
+
// The flagship photo picker MORPHS in place like every other screen. It is an
|
|
287
|
+
// own-scroller (`PhotoPickerView`'s FlatList) that paints its OWN full-bleed
|
|
288
|
+
// black canvas + translucent top bar INSIDE the themed panel, so it takes no
|
|
289
|
+
// Dialog nav header. It needs ROOM for the photo grid, so it declares an
|
|
290
|
+
// explicit LARGE morph target — the panel grows UP to a near-full-height,
|
|
291
|
+
// wider card on entry (and back down on pick→crop), the grid scrolling within.
|
|
292
|
+
return {
|
|
293
|
+
...DEFAULT_SURFACE_CONFIG,
|
|
294
|
+
scrollable: false,
|
|
295
|
+
header: false,
|
|
296
|
+
frameSize: { heightRatio: 0.9, maxWidth: 640 },
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
if (HEADERLESS_ROUTES.has(route)) {
|
|
300
|
+
return { ...DEFAULT_SURFACE_CONFIG, header: false };
|
|
301
|
+
}
|
|
302
|
+
if (OWN_SCROLL_CONTAINER_ROUTES.has(route)) {
|
|
303
|
+
// Own-scroller list screens keep the nav header (static, non-collapsing —
|
|
304
|
+
// there is no Dialog scroll offset to drive the large-title collapse).
|
|
305
|
+
return { ...DEFAULT_SURFACE_CONFIG, scrollable: false };
|
|
166
306
|
}
|
|
167
307
|
return DEFAULT_SURFACE_CONFIG;
|
|
168
308
|
};
|
|
@@ -9,8 +9,6 @@ import SurfaceScreen from '../components/SurfaceScreen';
|
|
|
9
9
|
import type { RouteName } from './routes';
|
|
10
10
|
import {
|
|
11
11
|
getSurfaceConfig,
|
|
12
|
-
getSurfacePresentation,
|
|
13
|
-
type SurfacePresentation,
|
|
14
12
|
type SurfaceProps,
|
|
15
13
|
type SurfaceResult,
|
|
16
14
|
type SurfaceRouteConfig,
|
|
@@ -36,13 +34,42 @@ const SHEET_PLACEMENT = { base: 'bottom', md: 'center' } as const;
|
|
|
36
34
|
/** Full-bleed black canvas for the `'fullScreen'` approximation (image picker). */
|
|
37
35
|
const FULLSCREEN_SURFACE_STYLE: ViewStyle = { backgroundColor: '#000000', overflow: 'hidden' };
|
|
38
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Every SDK screen owns its own background + content padding + scroll region
|
|
39
|
+
* (they were authored for the bare `BottomSheet`). So the shared `Dialog` must
|
|
40
|
+
* NOT add its own `contentPadding` on top (that double-pads) — it owns only the
|
|
41
|
+
* structural chrome: the surface card, the size cap (`maxHeightRatio`) and the
|
|
42
|
+
* scroll boundary. `contentPadding: 0` makes the screen's own padding the single
|
|
43
|
+
* source, matching the image-picker (`fullScreen`) surface.
|
|
44
|
+
*/
|
|
45
|
+
const SDK_SURFACE_CHROME = { contentPadding: 0, maxHeightRatio: 0.9 } as const;
|
|
46
|
+
|
|
39
47
|
/** Map a route's presentation taxonomy onto concrete Bloom `Dialog` options. */
|
|
40
48
|
function bloomOptionsFor(config: SurfaceRouteConfig): PresentOptions {
|
|
49
|
+
// Threaded onto every placement so a route that owns its own scroll container
|
|
50
|
+
// (`scrollable: false`) opts out of the Dialog's internal ScrollView.
|
|
51
|
+
const scrollable = config.scrollable;
|
|
52
|
+
// Surface-level morph opt-out (the DEPTH axis is untouched — this only governs
|
|
53
|
+
// whether the panel reshapes when the content is swapped in place). Each frame
|
|
54
|
+
// additionally declares its own opt-out through `useDialogFrame` in
|
|
55
|
+
// `SurfaceScreen`, so a surface can morph for most routes and not for one.
|
|
56
|
+
const morph = config.morph;
|
|
57
|
+
// Nav-header mode marker: turns on the Dialog's OWN sticky gradient nav bar +
|
|
58
|
+
// large collapsing title over its scroll content. The title/subtitle/action
|
|
59
|
+
// slots are contributed at runtime by the mounted screen via `useSurfaceHeader`
|
|
60
|
+
// (resolved in `SurfaceScreen`), so the seed here just enables the scaffold.
|
|
61
|
+
const header = config.header ? { largeTitle: true } : undefined;
|
|
41
62
|
switch (config.presentation) {
|
|
42
63
|
case 'center':
|
|
43
|
-
return { placement: 'center' };
|
|
64
|
+
return { placement: 'center', scrollable, header, morph, ...SDK_SURFACE_CHROME };
|
|
44
65
|
case 'drawer':
|
|
45
|
-
return {
|
|
66
|
+
return {
|
|
67
|
+
placement: { base: 'bottom', md: 'left' },
|
|
68
|
+
scrollable,
|
|
69
|
+
header,
|
|
70
|
+
morph,
|
|
71
|
+
...SDK_SURFACE_CHROME,
|
|
72
|
+
};
|
|
46
73
|
case 'fullScreen':
|
|
47
74
|
// Approximate a full-screen surface with the shared `Dialog`: a tall
|
|
48
75
|
// sheet / large centered card, flush content, a black canvas and
|
|
@@ -53,11 +80,13 @@ function bloomOptionsFor(config: SurfaceRouteConfig): PresentOptions {
|
|
|
53
80
|
maxWidth: 640,
|
|
54
81
|
maxHeightRatio: 0.9,
|
|
55
82
|
dismissOnBackdrop: false,
|
|
83
|
+
scrollable,
|
|
84
|
+
morph,
|
|
56
85
|
style: FULLSCREEN_SURFACE_STYLE,
|
|
57
86
|
panelStyle: FULLSCREEN_SURFACE_STYLE,
|
|
58
87
|
};
|
|
59
88
|
default:
|
|
60
|
-
return { placement: SHEET_PLACEMENT };
|
|
89
|
+
return { placement: SHEET_PLACEMENT, scrollable, header, morph, ...SDK_SURFACE_CHROME };
|
|
61
90
|
}
|
|
62
91
|
}
|
|
63
92
|
|
|
@@ -69,12 +98,13 @@ function bloomOptionsFor(config: SurfaceRouteConfig): PresentOptions {
|
|
|
69
98
|
*/
|
|
70
99
|
export interface SurfaceInstance<K extends RouteName = RouteName> {
|
|
71
100
|
readonly route: RouteName;
|
|
72
|
-
readonly presentation: SurfacePresentation;
|
|
73
101
|
navigate: (route: RouteName, props?: Record<string, unknown>) => void;
|
|
74
102
|
replace: (route: RouteName, props?: Record<string, unknown>) => void;
|
|
75
103
|
goBack: () => boolean;
|
|
76
104
|
canGoBack: () => boolean;
|
|
77
105
|
setStep: (step: number) => void;
|
|
106
|
+
/** Open a result-bearing sub-flow WITHIN this surface (morph). See {@link openWithinOrPresent}. */
|
|
107
|
+
beginFlow: (route: RouteName, props?: Record<string, unknown>) => Promise<unknown>;
|
|
78
108
|
dismiss: (result?: SurfaceResult<K>) => void;
|
|
79
109
|
readonly result: Promise<SurfaceResult<K> | undefined>;
|
|
80
110
|
}
|
|
@@ -83,12 +113,15 @@ export interface SurfaceInstance<K extends RouteName = RouteName> {
|
|
|
83
113
|
* The type-erased handle the `showBottomSheet` adapter needs from a tracked
|
|
84
114
|
* surface: what it hosts, and how to drive/dismiss it. Kept result-type-free so
|
|
85
115
|
* the (generic) `SurfaceInstance<K>` never has to be widened into a shared array.
|
|
116
|
+
* Exported so `OxyContext` can hold the surface it MORPHS the account dialog into
|
|
117
|
+
* (see {@link topRouteSurface}).
|
|
86
118
|
*/
|
|
87
|
-
interface TrackedSurface {
|
|
119
|
+
export interface TrackedSurface {
|
|
88
120
|
readonly route: RouteName;
|
|
89
|
-
readonly presentation: SurfacePresentation;
|
|
90
121
|
navigate: (route: RouteName, props?: Record<string, unknown>) => void;
|
|
91
122
|
goBack: () => boolean;
|
|
123
|
+
/** Open a result-bearing sub-flow WITHIN this surface (morph). See {@link openWithinOrPresent}. */
|
|
124
|
+
beginFlow: (route: RouteName, props?: Record<string, unknown>) => Promise<unknown>;
|
|
92
125
|
dismiss: () => void;
|
|
93
126
|
}
|
|
94
127
|
|
|
@@ -100,6 +133,17 @@ interface TrackedSurface {
|
|
|
100
133
|
*/
|
|
101
134
|
const activeRouteSurfaces: TrackedSurface[] = [];
|
|
102
135
|
|
|
136
|
+
/**
|
|
137
|
+
* The frontmost DETACHED surface (the AccountDialog), while open. Detached
|
|
138
|
+
* surfaces are kept OUT of `activeRouteSurfaces` so `closeAllRouteSurfaces` never
|
|
139
|
+
* touches them — but the AccountDialog IS a valid morph target: a result-bearing
|
|
140
|
+
* flow opened from within it (the account-menu hero avatar → `ChangeAvatar`) must
|
|
141
|
+
* morph INTO it, not stack a new surface behind it. Invariant: whenever set, this
|
|
142
|
+
* surface is frontmost — every account-menu action that opens a tracked surface
|
|
143
|
+
* (Manage, Help, …) dismisses the dialog FIRST, so the two never overlap.
|
|
144
|
+
*/
|
|
145
|
+
let detachedFrontSurface: TrackedSurface | null = null;
|
|
146
|
+
|
|
103
147
|
function presentInternal<K extends RouteName>(
|
|
104
148
|
route: K,
|
|
105
149
|
props: Record<string, unknown>,
|
|
@@ -111,35 +155,55 @@ function presentInternal<K extends RouteName>(
|
|
|
111
155
|
const bloomOpts: PresentOptions = { label: route, ...bloomOptionsFor(config), ...opts };
|
|
112
156
|
|
|
113
157
|
const result = bloomSurfaces.present<SurfaceResult<K>>((surface: SurfaceControls) =>
|
|
114
|
-
createElement(SurfaceScreen, {
|
|
158
|
+
createElement(SurfaceScreen, {
|
|
159
|
+
navStack,
|
|
160
|
+
surface,
|
|
161
|
+
dismissOnBackdrop: bloomOpts.dismissOnBackdrop ?? true,
|
|
162
|
+
}),
|
|
115
163
|
bloomOpts,
|
|
116
164
|
);
|
|
117
165
|
|
|
118
166
|
const instance: SurfaceInstance<K> = {
|
|
119
167
|
route,
|
|
120
|
-
|
|
121
|
-
|
|
168
|
+
navigate: (nextRoute, nextProps) => {
|
|
169
|
+
const top = navStack.getTop();
|
|
170
|
+
if (top.route === nextRoute) navStack.replace(nextRoute, nextProps);
|
|
171
|
+
else navStack.navigate(nextRoute, nextProps);
|
|
172
|
+
},
|
|
122
173
|
replace: (nextRoute, nextProps) => navStack.replace(nextRoute, nextProps),
|
|
123
174
|
goBack: () => navStack.goBack(),
|
|
124
175
|
canGoBack: () => navStack.canGoBack(),
|
|
125
176
|
setStep: (step) => navStack.setStep(step),
|
|
177
|
+
beginFlow: (nextRoute, nextProps) => navStack.beginFlow(nextRoute, nextProps),
|
|
126
178
|
dismiss: (dismissResult) => navStack.requestDismiss(dismissResult),
|
|
127
179
|
result,
|
|
128
180
|
};
|
|
129
181
|
|
|
182
|
+
// If the surface is torn down (backdrop, `closeAll`, host unmount) while a
|
|
183
|
+
// result-bearing sub-flow is still open, settle that flow so an awaiting caller
|
|
184
|
+
// never hangs. Runs for tracked and detached surfaces alike.
|
|
185
|
+
result.finally(() => navStack.abandonActiveFlow());
|
|
186
|
+
|
|
187
|
+
const tracked: TrackedSurface = {
|
|
188
|
+
route: instance.route,
|
|
189
|
+
navigate: instance.navigate,
|
|
190
|
+
goBack: instance.goBack,
|
|
191
|
+
beginFlow: instance.beginFlow,
|
|
192
|
+
dismiss: () => instance.dismiss(),
|
|
193
|
+
};
|
|
130
194
|
if (track) {
|
|
131
|
-
const tracked: TrackedSurface = {
|
|
132
|
-
route: instance.route,
|
|
133
|
-
presentation: instance.presentation,
|
|
134
|
-
navigate: instance.navigate,
|
|
135
|
-
goBack: instance.goBack,
|
|
136
|
-
dismiss: () => instance.dismiss(),
|
|
137
|
-
};
|
|
138
195
|
activeRouteSurfaces.push(tracked);
|
|
139
196
|
result.finally(() => {
|
|
140
197
|
const index = activeRouteSurfaces.indexOf(tracked);
|
|
141
198
|
if (index >= 0) activeRouteSurfaces.splice(index, 1);
|
|
142
199
|
});
|
|
200
|
+
} else {
|
|
201
|
+
// Detached (the AccountDialog): NOT in the closeAll lineage, but recorded as
|
|
202
|
+
// the frontmost morph target so a flow opened from within it morphs IN.
|
|
203
|
+
detachedFrontSurface = tracked;
|
|
204
|
+
result.finally(() => {
|
|
205
|
+
if (detachedFrontSurface === tracked) detachedFrontSurface = null;
|
|
206
|
+
});
|
|
143
207
|
}
|
|
144
208
|
|
|
145
209
|
return instance;
|
|
@@ -182,6 +246,16 @@ export function topRouteSurface(): TrackedSurface | undefined {
|
|
|
182
246
|
return activeRouteSurfaces[activeRouteSurfaces.length - 1];
|
|
183
247
|
}
|
|
184
248
|
|
|
249
|
+
/**
|
|
250
|
+
* The frontmost surface a result-bearing flow should morph INTO: the detached
|
|
251
|
+
* AccountDialog if open (it sits on top of everything), else the top tracked
|
|
252
|
+
* route surface. Used by {@link openWithinOrPresent} so the account-menu hero
|
|
253
|
+
* avatar morphs the dialog into `ChangeAvatar` instead of stacking a new surface.
|
|
254
|
+
*/
|
|
255
|
+
export function topMorphableSurface(): TrackedSurface | undefined {
|
|
256
|
+
return detachedFrontSurface ?? topRouteSurface();
|
|
257
|
+
}
|
|
258
|
+
|
|
185
259
|
/**
|
|
186
260
|
* Dismiss every active route surface (the whole `showBottomSheet` session). The
|
|
187
261
|
* AccountDialog is untracked, so it is untouched. Iterates a snapshot because
|
|
@@ -192,37 +266,70 @@ export function closeAllRouteSurfaces(): void {
|
|
|
192
266
|
}
|
|
193
267
|
|
|
194
268
|
/**
|
|
195
|
-
* Drill in from a screen
|
|
196
|
-
*
|
|
197
|
-
*
|
|
269
|
+
* Drill in from a screen. From inside a surface the DEFAULT is to navigate WITHIN
|
|
270
|
+
* it — the panel MORPHS from the current frame's size to the next's. EVERY screen
|
|
271
|
+
* morphs; a NEW surface is stacked on top ONLY when the target route declares
|
|
272
|
+
* `stacks` (reserved for genuine overlays — none today, since action sheets /
|
|
273
|
+
* confirms / prompts are Bloom-raw `surfaces.present` calls outside this
|
|
274
|
+
* registry). A stacked surface gets its own backdrop + entry animation; dismissing
|
|
275
|
+
* it unwinds back to the surface that opened it.
|
|
198
276
|
*/
|
|
199
277
|
export function navigateWithinOrPresent(
|
|
200
|
-
currentPresentation: SurfacePresentation,
|
|
201
278
|
navStack: SurfaceNavStack,
|
|
202
279
|
route: RouteName,
|
|
203
280
|
props?: Record<string, unknown>,
|
|
204
281
|
): void {
|
|
205
282
|
const nextProps = props ?? {};
|
|
206
|
-
if (
|
|
207
|
-
navStack.navigate(route, nextProps);
|
|
208
|
-
} else {
|
|
283
|
+
if (getSurfaceConfig(route, nextProps).stacks) {
|
|
209
284
|
presentRoute(route, nextProps);
|
|
285
|
+
} else {
|
|
286
|
+
navStack.navigate(route, nextProps);
|
|
210
287
|
}
|
|
211
288
|
}
|
|
212
289
|
|
|
213
|
-
/** Replace variant of {@link navigateWithinOrPresent}. */
|
|
290
|
+
/** Replace variant of {@link navigateWithinOrPresent} (swaps the top frame). */
|
|
214
291
|
export function replaceWithinOrPresent(
|
|
215
|
-
currentPresentation: SurfacePresentation,
|
|
216
292
|
navStack: SurfaceNavStack,
|
|
217
293
|
route: RouteName,
|
|
218
294
|
props?: Record<string, unknown>,
|
|
219
295
|
): void {
|
|
220
296
|
const nextProps = props ?? {};
|
|
221
|
-
if (
|
|
222
|
-
navStack.replace(route, nextProps);
|
|
223
|
-
} else {
|
|
297
|
+
if (getSurfaceConfig(route, nextProps).stacks) {
|
|
224
298
|
presentRoute(route, nextProps);
|
|
299
|
+
} else {
|
|
300
|
+
navStack.replace(route, nextProps);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Open a result-bearing route the SAME way a drill-in navigates (the morph-by-
|
|
306
|
+
* default rule), but returning the route's dismissal RESULT to the caller.
|
|
307
|
+
*
|
|
308
|
+
* When a surface is already open and the target morphs into it (the default —
|
|
309
|
+
* anything not marked `stacks`), it runs as a SUB-FLOW inside that surface: the
|
|
310
|
+
* panel morphs from the current screen into the target, and the promise resolves
|
|
311
|
+
* with the target's `dismiss(result)` (or `undefined` when cancelled), popping
|
|
312
|
+
* back to the caller's frame WITHOUT closing the host. Otherwise (no surface, or a
|
|
313
|
+
* route that stacks) it presents a fresh surface and resolves with its dismissal —
|
|
314
|
+
* identical to the historical `present(route).result`.
|
|
315
|
+
*
|
|
316
|
+
* The entry seam for the avatar picker AND its nested "My Oxy files" media
|
|
317
|
+
* selector: each awaits its result whether it morphed into the caller's surface
|
|
318
|
+
* or opened cold, with no morph-vs-present branch of its own.
|
|
319
|
+
*/
|
|
320
|
+
export function openWithinOrPresent<K extends RouteName>(
|
|
321
|
+
route: K,
|
|
322
|
+
props?: SurfaceProps<K>,
|
|
323
|
+
): Promise<SurfaceResult<K> | undefined> {
|
|
324
|
+
const nextProps = (props ?? {}) as Record<string, unknown>;
|
|
325
|
+
const host = topMorphableSurface();
|
|
326
|
+
if (host && !getSurfaceConfig(route, nextProps).stacks) {
|
|
327
|
+
// Morph: run as a sub-flow inside the host. The erased `Promise<unknown>` is
|
|
328
|
+
// narrowed to this route's result at the typed boundary (the sub-flow resolves
|
|
329
|
+
// with exactly the value a descendant screen passes to `dismiss(result)`).
|
|
330
|
+
return host.beginFlow(route, nextProps) as Promise<SurfaceResult<K> | undefined>;
|
|
225
331
|
}
|
|
332
|
+
return present(route, props).result;
|
|
226
333
|
}
|
|
227
334
|
|
|
228
335
|
/**
|