@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
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChangeAvatarScreen — the single entry into changing a profile picture.
|
|
3
|
+
*
|
|
4
|
+
* Shows the current avatar large, then the four sources the user can pick from:
|
|
5
|
+
* device gallery, camera, their existing Oxy files, and removing the current
|
|
6
|
+
* photo. Every source that yields an image NAVIGATES WITHIN THIS SURFACE to
|
|
7
|
+
* `AvatarCrop` (never presents it on top), so the panel morphs from this list's
|
|
8
|
+
* size to the crop editor's and back — Cancel on the cropper returns here to
|
|
9
|
+
* re-pick. One container reshaping, not two sheets. The forward morph is
|
|
10
|
+
* flash-free because only the top frame renders and the cropper does all its own
|
|
11
|
+
* async work (URL resolution + measurement), so this list is never left on screen
|
|
12
|
+
* waiting.
|
|
13
|
+
*
|
|
14
|
+
* The surface resolves with an {@link AvatarCropResult} (the crop confirmed) or
|
|
15
|
+
* an {@link AvatarRemovalResult} (the user removed their photo). This screen
|
|
16
|
+
* performs NO writes: `useAvatarPicker` owns the single upload/removal path.
|
|
17
|
+
*
|
|
18
|
+
* `expo-image-picker` is an optional peer dependency — it is loaded with
|
|
19
|
+
* `await import(...)` so an app that never changes avatars need not install it,
|
|
20
|
+
* and a platform without a given source (camera on web) simply doesn't offer it.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import type React from 'react';
|
|
24
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
25
|
+
import { Linking, Platform, View } from 'react-native';
|
|
26
|
+
import { Avatar } from '@oxyhq/bloom/avatar';
|
|
27
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
28
|
+
import {
|
|
29
|
+
AdmonitionRoot,
|
|
30
|
+
AdmonitionRow,
|
|
31
|
+
AdmonitionIcon,
|
|
32
|
+
AdmonitionContent,
|
|
33
|
+
AdmonitionText,
|
|
34
|
+
AdmonitionButton,
|
|
35
|
+
} from '@oxyhq/bloom/admonition';
|
|
36
|
+
import { surfaces as bloomSurfaces } from '@oxyhq/bloom/surfaces';
|
|
37
|
+
import { useTheme } from '@oxyhq/bloom/theme';
|
|
38
|
+
import { toast } from '@oxyhq/bloom';
|
|
39
|
+
import { getAccountDisplayName, logger } from '@oxyhq/core';
|
|
40
|
+
import { useOxy } from '../context/OxyContext';
|
|
41
|
+
import { useI18n } from '../hooks/useI18n';
|
|
42
|
+
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
43
|
+
import { openWithinOrPresent } from '../navigation/surfaces';
|
|
44
|
+
import { SettingsIcon } from '../components/SettingsIcon';
|
|
45
|
+
import type { BaseScreenProps } from '../types/navigation';
|
|
46
|
+
|
|
47
|
+
/** Component name used in `logger` context for filtered diagnostics. */
|
|
48
|
+
const LOG_COMPONENT = 'ChangeAvatarScreen';
|
|
49
|
+
|
|
50
|
+
/** Diameter (dp) of the current-avatar hero at the top of the screen. */
|
|
51
|
+
const PREVIEW_SIZE = 132;
|
|
52
|
+
|
|
53
|
+
/** MIME families the Oxy-files picker hides so it renders as an image-only picker. */
|
|
54
|
+
const NON_IMAGE_MIME_TYPES = ['video/', 'audio/', 'application/pdf'];
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The surface resolves with this when the user confirms removing their photo.
|
|
58
|
+
* Distinguished from a crop result by the presence of `removed`, so the awaiting
|
|
59
|
+
* caller narrows without a cast.
|
|
60
|
+
*/
|
|
61
|
+
export interface AvatarRemovalResult {
|
|
62
|
+
removed: true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Which permission was refused, so the screen can explain the right thing. */
|
|
66
|
+
type DeniedSource = 'library' | 'camera';
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The slice of `expo-image-picker` this screen uses. Declared locally (rather
|
|
70
|
+
* than imported) because the module is an optional peer: a type-only import
|
|
71
|
+
* would still make `tsc` require it to be installed.
|
|
72
|
+
*/
|
|
73
|
+
interface ImagePickerAsset {
|
|
74
|
+
uri: string;
|
|
75
|
+
width: number;
|
|
76
|
+
height: number;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
interface ImagePickerResult {
|
|
80
|
+
canceled: boolean;
|
|
81
|
+
assets: ImagePickerAsset[] | null;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
interface ImagePickerPermission {
|
|
85
|
+
granted: boolean;
|
|
86
|
+
canAskAgain: boolean;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
interface ImagePickerOptions {
|
|
90
|
+
mediaTypes: 'images'[];
|
|
91
|
+
allowsMultipleSelection: false;
|
|
92
|
+
quality: number;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface ImagePickerModule {
|
|
96
|
+
launchImageLibraryAsync: (options: ImagePickerOptions) => Promise<ImagePickerResult>;
|
|
97
|
+
launchCameraAsync: (options: ImagePickerOptions) => Promise<ImagePickerResult>;
|
|
98
|
+
requestMediaLibraryPermissionsAsync: () => Promise<ImagePickerPermission>;
|
|
99
|
+
requestCameraPermissionsAsync: () => Promise<ImagePickerPermission>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Options shared by both launch paths — an image, one at a time, at full quality. */
|
|
103
|
+
const PICKER_OPTIONS: ImagePickerOptions = {
|
|
104
|
+
mediaTypes: ['images'],
|
|
105
|
+
allowsMultipleSelection: false,
|
|
106
|
+
// The crop editor downsamples to 512x512, so the source is taken untouched.
|
|
107
|
+
quality: 1,
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Resolve `expo-image-picker` on demand. Returns `null` when the app has not
|
|
112
|
+
* installed it, so the caller can explain that the source is unavailable rather
|
|
113
|
+
* than crashing.
|
|
114
|
+
*/
|
|
115
|
+
async function loadImagePicker(): Promise<ImagePickerModule | null> {
|
|
116
|
+
try {
|
|
117
|
+
const mod = (await import('expo-image-picker')) as unknown as ImagePickerModule;
|
|
118
|
+
if (typeof mod?.launchImageLibraryAsync !== 'function') return null;
|
|
119
|
+
return mod;
|
|
120
|
+
} catch (err) {
|
|
121
|
+
logger.debug(
|
|
122
|
+
'expo-image-picker unavailable',
|
|
123
|
+
{ component: LOG_COMPONENT },
|
|
124
|
+
{ reason: err instanceof Error ? err.message : String(err) },
|
|
125
|
+
);
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const ChangeAvatarScreen: React.FC<BaseScreenProps> = ({ navigate, dismiss }) => {
|
|
131
|
+
const bloomTheme = useTheme();
|
|
132
|
+
const { t, locale } = useI18n();
|
|
133
|
+
const { user, oxyServices } = useOxy();
|
|
134
|
+
|
|
135
|
+
/** Set when a permission was refused — drives the inline denied notice. */
|
|
136
|
+
const [denied, setDenied] = useState<DeniedSource | null>(null);
|
|
137
|
+
/** True while a source is being opened, so rows can't be double-fired. */
|
|
138
|
+
const [busy, setBusy] = useState(false);
|
|
139
|
+
|
|
140
|
+
useSurfaceHeader(useMemo(() => ({ title: t('changeAvatar.title') }), [t]));
|
|
141
|
+
|
|
142
|
+
const displayName = useMemo(() => getAccountDisplayName(user, locale), [user, locale]);
|
|
143
|
+
const avatarUri = useMemo(
|
|
144
|
+
// `thumb` is 256x256 — exactly a 2x source for the 132dp hero.
|
|
145
|
+
() => (user?.avatar ? oxyServices.getFileDownloadUrl(user.avatar, 'thumb') : undefined),
|
|
146
|
+
[user?.avatar, oxyServices],
|
|
147
|
+
);
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Hand a source to the crop editor by navigating WITHIN this surface (a push,
|
|
151
|
+
* so Cancel on the cropper morphs back to this source list to re-pick). The
|
|
152
|
+
* push is flash-free because only the top frame renders and the cropper does
|
|
153
|
+
* ALL its own async work: the device / camera sources pass a ready `imageUri`;
|
|
154
|
+
* the Oxy-files source passes only the file's `imageFileId`, which the cropper
|
|
155
|
+
* resolves to a private-safe download URL itself (resolving it HERE would keep
|
|
156
|
+
* this list on screen for the whole network round-trip — the flash the user
|
|
157
|
+
* reported).
|
|
158
|
+
*/
|
|
159
|
+
const goToCrop = useCallback(
|
|
160
|
+
(cropProps: Record<string, unknown>) => {
|
|
161
|
+
navigate?.('AvatarCrop', cropProps);
|
|
162
|
+
},
|
|
163
|
+
[navigate],
|
|
164
|
+
);
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Shared body of the two `expo-image-picker` sources. They differ only in
|
|
168
|
+
* which permission they ask for and which launcher they call.
|
|
169
|
+
*/
|
|
170
|
+
const pickFromDevice = useCallback(
|
|
171
|
+
async (source: DeniedSource) => {
|
|
172
|
+
if (busy) return;
|
|
173
|
+
setBusy(true);
|
|
174
|
+
try {
|
|
175
|
+
const picker = await loadImagePicker();
|
|
176
|
+
if (!picker) {
|
|
177
|
+
toast.error(
|
|
178
|
+
t(
|
|
179
|
+
source === 'camera'
|
|
180
|
+
? 'changeAvatar.errors.cameraUnavailable'
|
|
181
|
+
: 'changeAvatar.errors.pickerUnavailable',
|
|
182
|
+
),
|
|
183
|
+
);
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
const permission =
|
|
188
|
+
source === 'camera'
|
|
189
|
+
? await picker.requestCameraPermissionsAsync()
|
|
190
|
+
: await picker.requestMediaLibraryPermissionsAsync();
|
|
191
|
+
if (!permission.granted) {
|
|
192
|
+
setDenied(source);
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
setDenied(null);
|
|
196
|
+
|
|
197
|
+
const result =
|
|
198
|
+
source === 'camera'
|
|
199
|
+
? await picker.launchCameraAsync(PICKER_OPTIONS)
|
|
200
|
+
: await picker.launchImageLibraryAsync(PICKER_OPTIONS);
|
|
201
|
+
const asset = result.canceled ? undefined : result.assets?.[0];
|
|
202
|
+
if (!asset?.uri) return;
|
|
203
|
+
|
|
204
|
+
// The picker reports the asset's natural size, so the crop editor
|
|
205
|
+
// skips its own `Image.getSize` measurement round-trip.
|
|
206
|
+
goToCrop({
|
|
207
|
+
imageUri: asset.uri,
|
|
208
|
+
sourceWidth: asset.width > 0 ? asset.width : undefined,
|
|
209
|
+
sourceHeight: asset.height > 0 ? asset.height : undefined,
|
|
210
|
+
});
|
|
211
|
+
} catch (err) {
|
|
212
|
+
logger.error(
|
|
213
|
+
`${source} picker failed`,
|
|
214
|
+
err instanceof Error ? err : new Error(String(err)),
|
|
215
|
+
{ component: LOG_COMPONENT },
|
|
216
|
+
);
|
|
217
|
+
toast.error(
|
|
218
|
+
t(
|
|
219
|
+
source === 'camera'
|
|
220
|
+
? 'changeAvatar.errors.cameraFailed'
|
|
221
|
+
: 'changeAvatar.errors.pickFailed',
|
|
222
|
+
),
|
|
223
|
+
);
|
|
224
|
+
} finally {
|
|
225
|
+
setBusy(false);
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
[busy, goToCrop, t],
|
|
229
|
+
);
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Pick from the files the user already has on Oxy. The image-only media
|
|
233
|
+
* selector MORPHS into this surface (a nested sub-flow) like every other
|
|
234
|
+
* screen and resolves with the chosen file; picking one then morphs on to the
|
|
235
|
+
* crop editor. When triggered with no surface open it presents cold instead.
|
|
236
|
+
*/
|
|
237
|
+
const pickFromOxyFiles = useCallback(async () => {
|
|
238
|
+
if (busy) return;
|
|
239
|
+
setBusy(true);
|
|
240
|
+
try {
|
|
241
|
+
const file = await openWithinOrPresent('FileManagement', {
|
|
242
|
+
selectMode: true,
|
|
243
|
+
multiSelect: false,
|
|
244
|
+
disabledMimeTypes: NON_IMAGE_MIME_TYPES,
|
|
245
|
+
});
|
|
246
|
+
if (!file) return;
|
|
247
|
+
|
|
248
|
+
if (!file.contentType?.startsWith('image/')) {
|
|
249
|
+
toast.error(t('editProfile.toasts.selectImage'));
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// Hand the file's ID straight to the cropper WITHOUT resolving its
|
|
254
|
+
// (usually private) download URL here. The cropper resolves it — and
|
|
255
|
+
// shows its own loading state on the dark canvas while it does — so
|
|
256
|
+
// this source list is never left on screen for the network round-trip
|
|
257
|
+
// that resolution takes (the "goes back to the avatar screen" flash).
|
|
258
|
+
goToCrop({ imageFileId: file.id });
|
|
259
|
+
} catch (err) {
|
|
260
|
+
logger.error(
|
|
261
|
+
'Oxy files pick failed',
|
|
262
|
+
err instanceof Error ? err : new Error(String(err)),
|
|
263
|
+
{ component: LOG_COMPONENT },
|
|
264
|
+
);
|
|
265
|
+
toast.error(t('changeAvatar.errors.loadImageFailed'));
|
|
266
|
+
} finally {
|
|
267
|
+
setBusy(false);
|
|
268
|
+
}
|
|
269
|
+
}, [busy, goToCrop, t]);
|
|
270
|
+
|
|
271
|
+
/** Confirm, then resolve the surface with the removal so the caller writes it. */
|
|
272
|
+
const removeCurrentPhoto = useCallback(async () => {
|
|
273
|
+
const confirmed = await bloomSurfaces.confirm({
|
|
274
|
+
title: t('changeAvatar.remove.confirmTitle'),
|
|
275
|
+
message: t('changeAvatar.remove.confirmMessage'),
|
|
276
|
+
confirmLabel: t('changeAvatar.remove.confirmLabel'),
|
|
277
|
+
cancelLabel: t('common.cancel'),
|
|
278
|
+
destructive: true,
|
|
279
|
+
});
|
|
280
|
+
if (!confirmed) return;
|
|
281
|
+
const removal: AvatarRemovalResult = { removed: true };
|
|
282
|
+
dismiss?.(removal);
|
|
283
|
+
}, [dismiss, t]);
|
|
284
|
+
|
|
285
|
+
const openSystemSettings = useCallback(() => {
|
|
286
|
+
void Linking.openSettings();
|
|
287
|
+
}, []);
|
|
288
|
+
|
|
289
|
+
// The camera is a native-only source: on web `launchCameraAsync` has no
|
|
290
|
+
// meaningful surface to open, so the row is not offered at all.
|
|
291
|
+
const canUseCamera = Platform.OS !== 'web';
|
|
292
|
+
|
|
293
|
+
return (
|
|
294
|
+
<View className="px-screen-margin pt-space-8 pb-space-24 gap-space-16">
|
|
295
|
+
<View className="items-center" accessible accessibilityRole="image"
|
|
296
|
+
accessibilityLabel={t('changeAvatar.a11y.currentPhoto')}>
|
|
297
|
+
<Avatar source={avatarUri} name={displayName} size={PREVIEW_SIZE} />
|
|
298
|
+
</View>
|
|
299
|
+
|
|
300
|
+
{denied ? (
|
|
301
|
+
<AdmonitionRoot type="warning">
|
|
302
|
+
<AdmonitionRow>
|
|
303
|
+
<AdmonitionIcon />
|
|
304
|
+
<AdmonitionContent>
|
|
305
|
+
<AdmonitionText>
|
|
306
|
+
{t(
|
|
307
|
+
denied === 'camera'
|
|
308
|
+
? 'changeAvatar.permission.cameraDenied'
|
|
309
|
+
: 'changeAvatar.permission.libraryDenied',
|
|
310
|
+
)}
|
|
311
|
+
</AdmonitionText>
|
|
312
|
+
{Platform.OS === 'web' ? null : (
|
|
313
|
+
<AdmonitionButton onPress={openSystemSettings}>
|
|
314
|
+
{t('changeAvatar.permission.openSettings')}
|
|
315
|
+
</AdmonitionButton>
|
|
316
|
+
)}
|
|
317
|
+
</AdmonitionContent>
|
|
318
|
+
</AdmonitionRow>
|
|
319
|
+
</AdmonitionRoot>
|
|
320
|
+
) : null}
|
|
321
|
+
|
|
322
|
+
<SettingsListGroup>
|
|
323
|
+
<SettingsListItem
|
|
324
|
+
icon={<SettingsIcon name="image-outline" color={bloomTheme.colors.primary} />}
|
|
325
|
+
title={t('changeAvatar.sources.upload.title')}
|
|
326
|
+
description={t('changeAvatar.sources.upload.description')}
|
|
327
|
+
disabled={busy}
|
|
328
|
+
onPress={() => void pickFromDevice('library')}
|
|
329
|
+
/>
|
|
330
|
+
{canUseCamera ? (
|
|
331
|
+
<SettingsListItem
|
|
332
|
+
icon={<SettingsIcon name="camera-outline" color={bloomTheme.colors.info} />}
|
|
333
|
+
title={t('changeAvatar.sources.camera.title')}
|
|
334
|
+
description={t('changeAvatar.sources.camera.description')}
|
|
335
|
+
disabled={busy}
|
|
336
|
+
onPress={() => void pickFromDevice('camera')}
|
|
337
|
+
/>
|
|
338
|
+
) : null}
|
|
339
|
+
<SettingsListItem
|
|
340
|
+
icon={<SettingsIcon name="folder-image" color={bloomTheme.colors.success} />}
|
|
341
|
+
title={t('changeAvatar.sources.files.title')}
|
|
342
|
+
description={t('changeAvatar.sources.files.description')}
|
|
343
|
+
disabled={busy}
|
|
344
|
+
onPress={() => void pickFromOxyFiles()}
|
|
345
|
+
/>
|
|
346
|
+
<SettingsListItem
|
|
347
|
+
icon={<SettingsIcon name="trash-can-outline" color={bloomTheme.colors.error} />}
|
|
348
|
+
title={t('changeAvatar.sources.remove.title')}
|
|
349
|
+
description={t('changeAvatar.sources.remove.description')}
|
|
350
|
+
destructive
|
|
351
|
+
disabled={busy || !user?.avatar}
|
|
352
|
+
onPress={() => void removeCurrentPhoto()}
|
|
353
|
+
/>
|
|
354
|
+
</SettingsListGroup>
|
|
355
|
+
</View>
|
|
356
|
+
);
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
export default ChangeAvatarScreen;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import React, { useCallback, useState } from 'react';
|
|
2
2
|
import { ActivityIndicator, FlatList, RefreshControl, StyleSheet, View } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import { toast } from '@oxyhq/bloom';
|
|
4
|
+
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
4
5
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
5
6
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
7
|
import type { ConnectedApp } from '@oxyhq/core';
|
|
7
8
|
import { logger as loggerUtil } from '@oxyhq/core';
|
|
8
9
|
import type { BaseScreenProps } from '../types/navigation';
|
|
9
|
-
import Header from '../components/Header';
|
|
10
10
|
import { Avatar } from '@oxyhq/bloom/avatar';
|
|
11
11
|
import { Loading } from '@oxyhq/bloom/loading';
|
|
12
12
|
import { Text } from '@oxyhq/bloom/typography';
|
|
13
13
|
import { useI18n } from '../hooks/useI18n';
|
|
14
|
+
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
14
15
|
import { useOxy } from '../context/OxyContext';
|
|
15
16
|
import { useConnectedApps } from '../hooks/queries/useAccountQueries';
|
|
16
17
|
import { useRevokeConnectedApp } from '../hooks/mutations/useAccountMutations';
|
|
@@ -48,6 +49,8 @@ const formatRelative = (iso: string): string => {
|
|
|
48
49
|
const ConnectedAppsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) => {
|
|
49
50
|
const bloomTheme = useTheme();
|
|
50
51
|
const { t } = useI18n();
|
|
52
|
+
|
|
53
|
+
useSurfaceHeader({ title: t('connectedApps.title') || 'Connected apps' });
|
|
51
54
|
const { isAuthenticated } = useOxy();
|
|
52
55
|
const {
|
|
53
56
|
data: apps,
|
|
@@ -56,46 +59,46 @@ const ConnectedAppsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) =>
|
|
|
56
59
|
isRefetching,
|
|
57
60
|
} = useConnectedApps({ enabled: isAuthenticated });
|
|
58
61
|
const revokeMutation = useRevokeConnectedApp();
|
|
59
|
-
const revokeDialog = useDialogControl();
|
|
60
|
-
const [pendingRevoke, setPendingRevoke] = useState<ConnectedApp | null>(null);
|
|
61
62
|
const [revokingAppId, setRevokingAppId] = useState<string | null>(null);
|
|
62
63
|
|
|
63
64
|
const confirmRevoke = useCallback(
|
|
64
|
-
(app: ConnectedApp) => {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
async (app: ConnectedApp) => {
|
|
66
|
+
const confirmed = await surfaces.confirm({
|
|
67
|
+
title: t('connectedApps.confirm.title') || 'Revoke access',
|
|
68
|
+
message:
|
|
69
|
+
t('connectedApps.confirm.message', { name: app.name })
|
|
70
|
+
|| `Revoke ${app.name}'s access to your Oxy account?`,
|
|
71
|
+
confirmLabel: t('common.revoke') || 'Revoke',
|
|
72
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
73
|
+
destructive: true,
|
|
74
|
+
});
|
|
75
|
+
if (!confirmed) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
setRevokingAppId(app.applicationId);
|
|
79
|
+
try {
|
|
80
|
+
await revokeMutation.mutateAsync(app.applicationId);
|
|
81
|
+
toast.success(
|
|
82
|
+
t('connectedApps.toasts.revoked', { name: app.name })
|
|
83
|
+
|| `Revoked access for ${app.name}`,
|
|
84
|
+
);
|
|
85
|
+
} catch (error) {
|
|
86
|
+
loggerUtil.warn(
|
|
87
|
+
'Revoke connected app failed',
|
|
88
|
+
{ component: 'ConnectedAppsScreen' },
|
|
89
|
+
error,
|
|
90
|
+
);
|
|
91
|
+
toast.error(
|
|
92
|
+
t('connectedApps.toasts.revokeFailed')
|
|
93
|
+
|| 'Failed to revoke access',
|
|
94
|
+
);
|
|
95
|
+
} finally {
|
|
96
|
+
setRevokingAppId(null);
|
|
97
|
+
}
|
|
67
98
|
},
|
|
68
|
-
[
|
|
99
|
+
[revokeMutation, t],
|
|
69
100
|
);
|
|
70
101
|
|
|
71
|
-
const handleRevoke = useCallback(async () => {
|
|
72
|
-
if (!pendingRevoke) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
const target = pendingRevoke;
|
|
76
|
-
setRevokingAppId(target.applicationId);
|
|
77
|
-
try {
|
|
78
|
-
await revokeMutation.mutateAsync(target.applicationId);
|
|
79
|
-
toast.success(
|
|
80
|
-
t('connectedApps.toasts.revoked', { name: target.name })
|
|
81
|
-
|| `Revoked access for ${target.name}`,
|
|
82
|
-
);
|
|
83
|
-
} catch (error) {
|
|
84
|
-
loggerUtil.warn(
|
|
85
|
-
'Revoke connected app failed',
|
|
86
|
-
{ component: 'ConnectedAppsScreen' },
|
|
87
|
-
error,
|
|
88
|
-
);
|
|
89
|
-
toast.error(
|
|
90
|
-
t('connectedApps.toasts.revokeFailed')
|
|
91
|
-
|| 'Failed to revoke access',
|
|
92
|
-
);
|
|
93
|
-
} finally {
|
|
94
|
-
setRevokingAppId(null);
|
|
95
|
-
setPendingRevoke(null);
|
|
96
|
-
}
|
|
97
|
-
}, [pendingRevoke, revokeMutation, t]);
|
|
98
|
-
|
|
99
102
|
const renderEmpty = useCallback(
|
|
100
103
|
() => (
|
|
101
104
|
<View className="flex-1 items-center justify-center py-space-32">
|
|
@@ -142,12 +145,6 @@ const ConnectedAppsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) =>
|
|
|
142
145
|
|
|
143
146
|
return (
|
|
144
147
|
<View className="flex-1 bg-bg">
|
|
145
|
-
<Header
|
|
146
|
-
title={t('connectedApps.title') || 'Connected apps'}
|
|
147
|
-
onBack={goBack || onClose}
|
|
148
|
-
variant="minimal"
|
|
149
|
-
elevation="subtle"
|
|
150
|
-
/>
|
|
151
148
|
{isLoading && !apps ? (
|
|
152
149
|
<Loading size="large" color={bloomTheme.colors.primary} />
|
|
153
150
|
) : (
|
|
@@ -167,24 +164,6 @@ const ConnectedAppsScreen: React.FC<BaseScreenProps> = ({ onClose, goBack }) =>
|
|
|
167
164
|
}
|
|
168
165
|
/>
|
|
169
166
|
)}
|
|
170
|
-
<Dialog
|
|
171
|
-
control={revokeDialog}
|
|
172
|
-
title={t('connectedApps.confirm.title') || 'Revoke access'}
|
|
173
|
-
description={
|
|
174
|
-
pendingRevoke
|
|
175
|
-
? (t('connectedApps.confirm.message', { name: pendingRevoke.name })
|
|
176
|
-
|| `Revoke ${pendingRevoke.name}'s access to your Oxy account?`)
|
|
177
|
-
: ''
|
|
178
|
-
}
|
|
179
|
-
actions={[
|
|
180
|
-
{
|
|
181
|
-
label: t('common.revoke') || 'Revoke',
|
|
182
|
-
color: 'destructive',
|
|
183
|
-
onPress: handleRevoke,
|
|
184
|
-
},
|
|
185
|
-
{ label: t('common.cancel') || 'Cancel', color: 'cancel' },
|
|
186
|
-
]}
|
|
187
|
-
/>
|
|
188
167
|
</View>
|
|
189
168
|
);
|
|
190
169
|
};
|
|
@@ -2,20 +2,17 @@ import type React from 'react';
|
|
|
2
2
|
import { useState, useCallback, useRef, useEffect } from 'react';
|
|
3
3
|
import {
|
|
4
4
|
View,
|
|
5
|
-
Platform,
|
|
6
5
|
ActivityIndicator,
|
|
7
|
-
ScrollView,
|
|
8
|
-
KeyboardAvoidingView,
|
|
9
6
|
TouchableOpacity,
|
|
10
7
|
} from 'react-native';
|
|
11
8
|
import { Ionicons } from '@expo/vector-icons';
|
|
12
9
|
import type { AccountKind, CreateAccountInput, OrganizationCategory } from '@oxyhq/core';
|
|
13
10
|
import { ORGANIZATION_CATEGORIES } from '@oxyhq/core';
|
|
14
11
|
import type { BaseScreenProps } from '../types/navigation';
|
|
15
|
-
import Header from '../components/Header';
|
|
16
12
|
import { useI18n } from '../hooks/useI18n';
|
|
13
|
+
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
17
14
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
18
|
-
import {
|
|
15
|
+
import { Text } from '@oxyhq/bloom/typography';
|
|
19
16
|
import { Button } from '@oxyhq/bloom/button';
|
|
20
17
|
import { TextField, TextFieldInput } from '@oxyhq/bloom/text-field';
|
|
21
18
|
import { useOxy } from '../context/OxyContext';
|
|
@@ -106,6 +103,12 @@ const CreateAccountScreen: React.FC<BaseScreenProps> = ({
|
|
|
106
103
|
const { oxyServices, createAccount, switchToAccount } = useOxy();
|
|
107
104
|
const { t } = useI18n();
|
|
108
105
|
|
|
106
|
+
useSurfaceHeader({
|
|
107
|
+
title: t('accounts.create.title') || 'Create account',
|
|
108
|
+
subtitle: t('accounts.create.subtitle')
|
|
109
|
+
|| 'Create an account you control. It will have its own profile, members, and apps.',
|
|
110
|
+
});
|
|
111
|
+
|
|
109
112
|
const parentId = typeof parentAccountId === 'string' ? parentAccountId : undefined;
|
|
110
113
|
|
|
111
114
|
const [kind, setKind] = useState<CreatableAccountKind>('project');
|
|
@@ -231,37 +234,9 @@ const CreateAccountScreen: React.FC<BaseScreenProps> = ({
|
|
|
231
234
|
const title = t('accounts.create.title') || 'Create account';
|
|
232
235
|
|
|
233
236
|
return (
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
onBack={goBack}
|
|
238
|
-
onClose={onClose}
|
|
239
|
-
showBackButton={true}
|
|
240
|
-
showCloseButton={true}
|
|
241
|
-
elevation="subtle"
|
|
242
|
-
/>
|
|
243
|
-
|
|
244
|
-
<KeyboardAvoidingView
|
|
245
|
-
className="flex-1"
|
|
246
|
-
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
|
|
247
|
-
keyboardVerticalOffset={Platform.OS === 'ios' ? 88 : 0}
|
|
248
|
-
>
|
|
249
|
-
<ScrollView
|
|
250
|
-
className="flex-1"
|
|
251
|
-
contentContainerClassName="px-screen-margin pt-space-24 pb-space-32 gap-space-24"
|
|
252
|
-
showsVerticalScrollIndicator={false}
|
|
253
|
-
keyboardShouldPersistTaps="handled"
|
|
254
|
-
>
|
|
255
|
-
{/* Big Title */}
|
|
256
|
-
<View className="gap-space-8">
|
|
257
|
-
<H1 className="text-headerBold font-headerBold text-text">
|
|
258
|
-
{title}
|
|
259
|
-
</H1>
|
|
260
|
-
<Text className="text-body font-body text-text-secondary">
|
|
261
|
-
{t('accounts.create.subtitle')
|
|
262
|
-
|| 'Create an account you control. It will have its own profile, members, and apps.'}
|
|
263
|
-
</Text>
|
|
264
|
-
</View>
|
|
237
|
+
<>
|
|
238
|
+
|
|
239
|
+
<View className="px-screen-margin pt-space-16 pb-space-32 gap-space-24">
|
|
265
240
|
|
|
266
241
|
{/* Kind picker */}
|
|
267
242
|
<View className="gap-space-8">
|
|
@@ -419,9 +394,8 @@ const CreateAccountScreen: React.FC<BaseScreenProps> = ({
|
|
|
419
394
|
>
|
|
420
395
|
{title}
|
|
421
396
|
</Button>
|
|
422
|
-
</
|
|
423
|
-
|
|
424
|
-
</View>
|
|
397
|
+
</View>
|
|
398
|
+
</>
|
|
425
399
|
);
|
|
426
400
|
};
|
|
427
401
|
|