@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
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* A thin React Native binding over the headless `AccountDialogController` in
|
|
8
8
|
* `@oxyhq/core` (bound via `useSyncExternalStore`) — the same data/state
|
|
9
|
-
* machine {@link
|
|
10
|
-
* TWO places: wrapped in Bloom's `<Dialog>` by `
|
|
9
|
+
* machine {@link OxyAccountDialogScreen} renders, extracted so it can be mounted in
|
|
10
|
+
* TWO places: wrapped in Bloom's `<Dialog>` by `OxyAccountDialogScreen` (the normal
|
|
11
11
|
* in-app surface), and mounted bare by a future auth.oxy.so hub page for the
|
|
12
12
|
* cross-origin passkey popup (b2) — same chooser, two hosts, two completion
|
|
13
13
|
* strategies via the `onComplete` prop. Neither host duplicates view logic.
|
|
@@ -48,25 +48,33 @@
|
|
|
48
48
|
* that do not use NativeWind (e.g. the accounts app).
|
|
49
49
|
*/
|
|
50
50
|
|
|
51
|
-
import {
|
|
51
|
+
import { Fragment, useCallback, useMemo, useRef, useState, useSyncExternalStore } from 'react';
|
|
52
52
|
import { Linking, Platform, Pressable, TextInput, View } from 'react-native';
|
|
53
|
+
import Animated, { Extrapolation, interpolate, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
53
54
|
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
54
55
|
import QRCode from 'react-native-qrcode-svg';
|
|
55
56
|
import { Avatar } from '@oxyhq/bloom/avatar';
|
|
57
|
+
import { AvatarGroup } from '@oxyhq/bloom/avatar-group';
|
|
56
58
|
import { Button } from '@oxyhq/bloom/button';
|
|
59
|
+
import { PressableScale } from '@oxyhq/bloom/pressable-scale';
|
|
60
|
+
import { CompositionBar } from '@oxyhq/bloom/composition-bar';
|
|
61
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
57
62
|
import { toast } from '@oxyhq/bloom';
|
|
58
63
|
import { Text } from '@oxyhq/bloom/typography';
|
|
59
64
|
import { useTheme, BloomColorScope, APP_COLOR_NAMES, APP_COLOR_PRESETS } from '@oxyhq/bloom/theme';
|
|
60
|
-
import { isOxyRpOrigin } from '@oxyhq/core';
|
|
65
|
+
import { getNormalizedUserHandle, isOxyRpOrigin } from '@oxyhq/core';
|
|
61
66
|
import { useQueryClient } from '@tanstack/react-query';
|
|
62
67
|
import { useOxy } from "../context/OxyContext.js";
|
|
63
68
|
import { useI18n } from "../hooks/useI18n.js";
|
|
69
|
+
import { getAccountDialogConsumerHooks } from "../navigation/accountDialogManager.js";
|
|
64
70
|
import { isWebBrowser } from "../utils/isWebBrowser.js";
|
|
65
71
|
import { getCommonsAcquisitionUrl } from "../utils/commonsStoreLinks.js";
|
|
72
|
+
import { useAccountStorageUsage } from "../hooks/queries/useServicesQueries.js";
|
|
66
73
|
import { authChooserStyles as styles } from "./oxyAuthChooserStyles.js";
|
|
74
|
+
import AvatarCameraBadge from "./AvatarCameraBadge.js";
|
|
67
75
|
|
|
68
|
-
/** Diameter of a row avatar. */
|
|
69
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
76
|
+
/** Diameter of a row avatar (the sign-in view's account rows). */
|
|
77
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
70
78
|
const ROW_AVATAR_SIZE = 40;
|
|
71
79
|
/** High-contrast QR colors — intentionally fixed (NOT themed) for scan reliability. */
|
|
72
80
|
const QR_PLATE_BG = '#FFFFFF';
|
|
@@ -74,6 +82,13 @@ const QR_FOREGROUND = '#000000';
|
|
|
74
82
|
const QR_SIZE = 196;
|
|
75
83
|
/** Commons' own identity-creation deep link (mirrors the `approve`/`attest`/`card` intents). */
|
|
76
84
|
const COMMONS_CREATE_IDENTITY_URL = 'oxycommons://create-identity';
|
|
85
|
+
/**
|
|
86
|
+
* "Accounts by Oxy" management app — the canonical home for account settings,
|
|
87
|
+
* data export, and storage management. The account-menu rows deep-link into it
|
|
88
|
+
* (`/data`, `/storage`, or its root) the same way `getCommonsAcquisitionUrl`
|
|
89
|
+
* hands off to Commons; nothing here invents new API endpoints.
|
|
90
|
+
*/
|
|
91
|
+
const ACCOUNTS_APP_URL = 'https://accounts.oxy.so';
|
|
77
92
|
/**
|
|
78
93
|
* Resolve an account's stored color (a named Bloom preset, e.g. `'purple'`) to
|
|
79
94
|
* a concrete brand hex for the row accent. Falls back to the theme primary when
|
|
@@ -91,7 +106,7 @@ function toPreset(color) {
|
|
|
91
106
|
return APP_COLOR_NAMES.includes(color) ? color : undefined;
|
|
92
107
|
}
|
|
93
108
|
/**
|
|
94
|
-
* The account switcher + sign-in/sign-up chooser. Mounted by `
|
|
109
|
+
* The account switcher + sign-in/sign-up chooser. Mounted by `OxyAccountDialogScreen`
|
|
95
110
|
* (wrapped in Bloom's `<Dialog>`) today; mountable bare by any future host that
|
|
96
111
|
* supplies its own `onComplete`.
|
|
97
112
|
*/
|
|
@@ -104,7 +119,9 @@ const OxyAuthChooser = ({
|
|
|
104
119
|
refreshAccounts,
|
|
105
120
|
signInWithPasskey,
|
|
106
121
|
registerWithPasskey,
|
|
107
|
-
oxyServices
|
|
122
|
+
oxyServices,
|
|
123
|
+
logout,
|
|
124
|
+
openAvatarPicker
|
|
108
125
|
} = useOxy();
|
|
109
126
|
const theme = useTheme();
|
|
110
127
|
const {
|
|
@@ -158,21 +175,41 @@ const OxyAuthChooser = ({
|
|
|
158
175
|
}
|
|
159
176
|
}, [createPasskeyPending, registerWithPasskey, onComplete, t]);
|
|
160
177
|
|
|
178
|
+
// Web: auto-start "Sign in with Oxy" when the sign-in entry becomes the shown
|
|
179
|
+
// view — the QR handoff is the PRIMARY web surface, not a button behind a tap.
|
|
180
|
+
// `signInWithOxy()` tries the shared keychain first (silently, native-only)
|
|
181
|
+
// then falls to the QR handoff, which is what actually renders. Driven from the
|
|
182
|
+
// EVENTS that reach that view — the initial `subscribe` pass below (an
|
|
183
|
+
// open-to-sign-in) and the add / back-to-sign-in handlers — never a watcher
|
|
184
|
+
// effect. Guarded so it never restarts a live flow (phase must be idle) and is a
|
|
185
|
+
// no-op on native (button-driven). Reads the live snapshot at call time (an
|
|
186
|
+
// event callback, not render), so it is stable across renders.
|
|
187
|
+
const autoStartSignIn = useCallback(() => {
|
|
188
|
+
if (!controller || !isWebBrowser()) return;
|
|
189
|
+
const {
|
|
190
|
+
view: currentView,
|
|
191
|
+
signIn
|
|
192
|
+
} = controller.getSnapshot();
|
|
193
|
+
if (currentView !== 'signin' && currentView !== 'add' || signIn.phase !== 'idle') return;
|
|
194
|
+
void controller.signInWithOxy();
|
|
195
|
+
}, [controller]);
|
|
196
|
+
|
|
161
197
|
// Bind the headless controller. `getSnapshot` returns a stable reference
|
|
162
198
|
// between changes, so it is `useSyncExternalStore`-safe. Guard the no-provider
|
|
163
199
|
// loading state (`controller` is `null`) with an inert store.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
//
|
|
172
|
-
//
|
|
173
|
-
//
|
|
174
|
-
|
|
175
|
-
|
|
200
|
+
//
|
|
201
|
+
// The subscribe callback ALSO carries two owner-mandated reactions to the
|
|
202
|
+
// controller. These run in the subscribe / notification callbacks — EVENT
|
|
203
|
+
// callbacks, not render/effect — so neither is a React effect hook:
|
|
204
|
+
// 1. Sign-in device-flow failures (poll / socket / popup-cancel land on
|
|
205
|
+
// `signIn` asynchronously) are toasted at the notification site, deduped
|
|
206
|
+
// per subscription — NEVER an inline banner in the QR view (owner mandate,
|
|
207
|
+
// same contract as account-switch).
|
|
208
|
+
// 2. On subscribe (mount / re-subscribe — a passive effect, the SAME timing
|
|
209
|
+
// the removed effects had) the web sign-in flow auto-starts if the opening
|
|
210
|
+
// view is the sign-in entry.
|
|
211
|
+
const subscribe = useCallback(listener => {
|
|
212
|
+
if (!controller) return () => undefined;
|
|
176
213
|
let lastToastedSignInError = null;
|
|
177
214
|
const maybeToastSignInError = () => {
|
|
178
215
|
const {
|
|
@@ -180,29 +217,23 @@ const OxyAuthChooser = ({
|
|
|
180
217
|
} = controller.getSnapshot();
|
|
181
218
|
if (signIn.phase === 'error' && signIn.error && signIn.error !== lastToastedSignInError) {
|
|
182
219
|
lastToastedSignInError = signIn.error;
|
|
183
|
-
toast.error(signIn.error
|
|
184
|
-
}
|
|
185
|
-
if (signIn.phase !== 'error') {
|
|
220
|
+
toast.error(signIn.error);
|
|
221
|
+
} else if (signIn.phase !== 'error') {
|
|
186
222
|
lastToastedSignInError = null;
|
|
187
223
|
}
|
|
188
224
|
};
|
|
189
225
|
maybeToastSignInError();
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
useEffect(() => {
|
|
202
|
-
if (!controller || !isWebBrowser()) return;
|
|
203
|
-
if (view !== 'signin' && view !== 'add' || snapshot.signIn.phase !== 'idle') return;
|
|
204
|
-
void controller.signInWithOxy();
|
|
205
|
-
}, [controller, view, snapshot.signIn.phase]);
|
|
226
|
+
autoStartSignIn();
|
|
227
|
+
return controller.subscribe(() => {
|
|
228
|
+
maybeToastSignInError();
|
|
229
|
+
listener();
|
|
230
|
+
});
|
|
231
|
+
}, [controller, autoStartSignIn]);
|
|
232
|
+
const getSnapshot = useCallback(() => controller ? controller.getSnapshot() : EMPTY_SNAPSHOT, [controller]);
|
|
233
|
+
const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
234
|
+
const {
|
|
235
|
+
view
|
|
236
|
+
} = snapshot;
|
|
206
237
|
const [switching, setSwitching] = useState(false);
|
|
207
238
|
const handleSwitch = useCallback(async accountId => {
|
|
208
239
|
if (!controller || switching) return;
|
|
@@ -233,15 +264,81 @@ const OxyAuthChooser = ({
|
|
|
233
264
|
}, [controller, switching, snapshot.activeAccountId, onComplete, refreshAccounts, queryClient, t]);
|
|
234
265
|
const handleManage = useCallback(() => {
|
|
235
266
|
onComplete?.();
|
|
267
|
+
const hooks = getAccountDialogConsumerHooks();
|
|
268
|
+
if (hooks?.onNavigateManage) {
|
|
269
|
+
hooks.onNavigateManage();
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
236
272
|
showBottomSheet?.('ManageAccount');
|
|
237
273
|
}, [onComplete, showBottomSheet]);
|
|
274
|
+
const handleAdd = useCallback(() => {
|
|
275
|
+
const hooks = getAccountDialogConsumerHooks();
|
|
276
|
+
if (hooks?.onAddAccount) {
|
|
277
|
+
hooks.onAddAccount();
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
// No consumer override: enter the "add account" view and auto-start the web
|
|
281
|
+
// sign-in flow, from this handler (the event that reaches the view).
|
|
282
|
+
controller?.add();
|
|
283
|
+
autoStartSignIn();
|
|
284
|
+
}, [controller, autoStartSignIn]);
|
|
238
285
|
const handlers = useMemo(() => ({
|
|
239
286
|
onSwitch: accountId => {
|
|
240
287
|
void handleSwitch(accountId);
|
|
241
288
|
},
|
|
242
|
-
onAdd:
|
|
243
|
-
onManage: handleManage
|
|
244
|
-
|
|
289
|
+
onAdd: handleAdd,
|
|
290
|
+
onManage: handleManage,
|
|
291
|
+
// Morphs the AccountDialog surface into `ChangeAvatar` (and back), then
|
|
292
|
+
// uploads / clears the picked photo — the single shared avatar write path.
|
|
293
|
+
onEditAvatar: () => openAvatarPicker()
|
|
294
|
+
}), [handleSwitch, handleAdd, handleManage, openAvatarPicker]);
|
|
295
|
+
|
|
296
|
+
// Real storage usage for the account menu's "Oxy storage" block. Disabled
|
|
297
|
+
// (no fetch) until a private-API session exists, so it is inert on the
|
|
298
|
+
// sign-in/QR/sign-up views; when present the block shows live used/total.
|
|
299
|
+
const storageQuery = useAccountStorageUsage();
|
|
300
|
+
const storage = useMemo(() => storageQuery.data ? {
|
|
301
|
+
usedBytes: storageQuery.data.totalUsedBytes,
|
|
302
|
+
limitBytes: storageQuery.data.totalLimitBytes
|
|
303
|
+
} : null, [storageQuery.data]);
|
|
304
|
+
|
|
305
|
+
// The account-menu rows below the switcher: storage + data + settings + help
|
|
306
|
+
// deep-link into the "Accounts by Oxy" app or open the matching in-app sheet
|
|
307
|
+
// (Help, Legal); sign-out uses the SDK's own per-account sign-out. No new
|
|
308
|
+
// endpoints — the same handoff pattern `handleManage`/`getCommonsAcquisitionUrl`
|
|
309
|
+
// already use.
|
|
310
|
+
const accountMenu = useMemo(() => {
|
|
311
|
+
const openUrl = url => {
|
|
312
|
+
void Linking.openURL(url);
|
|
313
|
+
};
|
|
314
|
+
const openSheet = config => {
|
|
315
|
+
onComplete?.();
|
|
316
|
+
showBottomSheet?.(config);
|
|
317
|
+
};
|
|
318
|
+
return {
|
|
319
|
+
onOpenSettings: () => openUrl(ACCOUNTS_APP_URL),
|
|
320
|
+
onOpenData: () => openUrl(`${ACCOUNTS_APP_URL}/data`),
|
|
321
|
+
onManageStorage: () => openUrl(`${ACCOUNTS_APP_URL}/storage`),
|
|
322
|
+
onUpgradeStorage: () => openUrl(`${ACCOUNTS_APP_URL}/storage`),
|
|
323
|
+
onHelp: () => openSheet('HelpSupport'),
|
|
324
|
+
onPrivacy: () => openSheet({
|
|
325
|
+
screen: 'LegalDocuments',
|
|
326
|
+
props: {
|
|
327
|
+
initialStep: 1
|
|
328
|
+
}
|
|
329
|
+
}),
|
|
330
|
+
onTerms: () => openSheet({
|
|
331
|
+
screen: 'LegalDocuments',
|
|
332
|
+
props: {
|
|
333
|
+
initialStep: 2
|
|
334
|
+
}
|
|
335
|
+
}),
|
|
336
|
+
onSignOut: () => {
|
|
337
|
+
void logout();
|
|
338
|
+
onComplete?.();
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
}, [onComplete, showBottomSheet, logout]);
|
|
245
342
|
if (!controller) {
|
|
246
343
|
return null;
|
|
247
344
|
}
|
|
@@ -250,7 +347,9 @@ const OxyAuthChooser = ({
|
|
|
250
347
|
snapshot: snapshot,
|
|
251
348
|
theme: theme,
|
|
252
349
|
t: t,
|
|
253
|
-
handlers: handlers
|
|
350
|
+
handlers: handlers,
|
|
351
|
+
storage: storage,
|
|
352
|
+
menu: accountMenu
|
|
254
353
|
});
|
|
255
354
|
}
|
|
256
355
|
if (view === 'qr') {
|
|
@@ -280,7 +379,10 @@ const OxyAuthChooser = ({
|
|
|
280
379
|
onCreateWithPasskey: handleCreateWithPasskey,
|
|
281
380
|
createPending: createPasskeyPending,
|
|
282
381
|
onOpenHub: () => void controller.startPasskeyHubSignIn(),
|
|
283
|
-
onBackToSignIn: () =>
|
|
382
|
+
onBackToSignIn: () => {
|
|
383
|
+
controller.setView('signin');
|
|
384
|
+
autoStartSignIn();
|
|
385
|
+
}
|
|
284
386
|
});
|
|
285
387
|
}
|
|
286
388
|
return /*#__PURE__*/_jsx(SignInView, {
|
|
@@ -295,75 +397,541 @@ const OxyAuthChooser = ({
|
|
|
295
397
|
};
|
|
296
398
|
|
|
297
399
|
// ---------------------------------------------------------------------------
|
|
298
|
-
// Accounts view
|
|
400
|
+
// Accounts view — the signed-in Oxy account MENU (NativeWind)
|
|
299
401
|
// ---------------------------------------------------------------------------
|
|
300
402
|
|
|
403
|
+
/** Used/total storage bytes for the "Oxy storage" block, or `null` when unknown. */
|
|
404
|
+
|
|
405
|
+
/** The account-menu row actions the container wires (deep-links / sheets / sign-out). */
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Leading glyph for the rows that live in a Bloom grouped section (the MENU
|
|
409
|
+
* block) and for the storage card's cloud, which lines its title up with them.
|
|
410
|
+
* It is Bloom's OWN icon-slot size: `SettingsListItem` reserves a fixed 20px
|
|
411
|
+
* leading column and Bloom is consumed exactly as it ships, so a menu glyph
|
|
412
|
+
* larger than this would overhang into the row's title.
|
|
413
|
+
*/
|
|
414
|
+
const ROW_ICON_SIZE = 20;
|
|
415
|
+
/**
|
|
416
|
+
* The switch card's two corner states. Collapsed it is one row and reads as a
|
|
417
|
+
* PILL; opened it is a card holding rows, on the same 16px corner the Bloom
|
|
418
|
+
* grouped section below it uses. Interpolated across the reveal, never snapped.
|
|
419
|
+
*/
|
|
420
|
+
const SWITCH_CARD_PILL_RADIUS = 999;
|
|
421
|
+
const SWITCH_CARD_RADIUS = 16;
|
|
422
|
+
/**
|
|
423
|
+
* The fraction of the reveal over which the corner resolves. The corner is a
|
|
424
|
+
* FASTER gesture than the reveal — it has to be finished before the rows read as
|
|
425
|
+
* rows, or the card still looks like a pill while a list falls out of it — so it
|
|
426
|
+
* is clamped to the reveal's opening fraction instead of tracking it end to end.
|
|
427
|
+
* Measured in a browser against the 240ms reveal: the corner reaches its card
|
|
428
|
+
* value ~120ms in, with the list only ~20% revealed, and (mirrored) the pill is
|
|
429
|
+
* back ~250ms into the close, with the list already down to ~0.
|
|
430
|
+
*/
|
|
431
|
+
const SWITCH_CARD_RADIUS_SETTLE = 0.2;
|
|
432
|
+
/** Diameter of an account row's avatar in the switch list (own markup). */
|
|
433
|
+
const SWITCH_AVATAR_SIZE = 36;
|
|
434
|
+
/** Glyph inside a bordered affordance badge, sized to the avatar it stands in for. */
|
|
435
|
+
const BADGE_GLYPH_SIZE = 19;
|
|
436
|
+
/** The hero block's large current-account avatar. */
|
|
437
|
+
const HERO_AVATAR_SIZE = 72;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* The hero's address line, shown under the "Hi, <name>!" greeting: the account's
|
|
441
|
+
* canonical `@oxy.so` email when it has one, else its normalized `@handle`. Never
|
|
442
|
+
* synthesizes a `username@oxy.so` address (the identity contract forbids it) — a
|
|
443
|
+
* non-Oxy or missing email falls back to `getNormalizedUserHandle`.
|
|
444
|
+
*/
|
|
445
|
+
function heroAddressLine(account) {
|
|
446
|
+
if (account.email?.toLowerCase().endsWith('@oxy.so')) {
|
|
447
|
+
return account.email;
|
|
448
|
+
}
|
|
449
|
+
const handle = getNormalizedUserHandle(account.user);
|
|
450
|
+
return handle ? `@${handle}` : null;
|
|
451
|
+
}
|
|
452
|
+
/** Avatars shown in the switch row's facepile before it collapses into `+N`. */
|
|
453
|
+
const FACEPILE_MAX = 2;
|
|
454
|
+
/** Facepile avatar diameter — one clear step down from a switch-list avatar. */
|
|
455
|
+
const FACEPILE_AVATAR_SIZE = 32;
|
|
456
|
+
/**
|
|
457
|
+
* Facepile overlap. Well under Bloom's `size / 3` default: the stack draws the
|
|
458
|
+
* FIRST item on top, so a deep overlap would bury the trailing `+N` chip's own
|
|
459
|
+
* label under the avatar before it.
|
|
460
|
+
*/
|
|
461
|
+
const FACEPILE_OVERLAP = 4;
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* `bytes` → `"11.6 GB"`. Whole plan sizes read as whole numbers (`"17 GB"`, not
|
|
465
|
+
* `"17.0 GB"`), and anything ≥ 100 GB drops the decimal entirely.
|
|
466
|
+
*/
|
|
467
|
+
function formatStorageGb(bytes) {
|
|
468
|
+
const gb = bytes / 1024 ** 3;
|
|
469
|
+
if (gb >= 100 || Number.isInteger(gb)) return `${Math.round(gb)} GB`;
|
|
470
|
+
return `${gb.toFixed(1)} GB`;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* A `Pressable` that appends a hover-tint NativeWind token while pointer-hovered.
|
|
474
|
+
* The Metro web pipeline here does NOT emit NativeWind `hover:` variants, so hover
|
|
475
|
+
* is driven by RN's cross-platform `onHoverIn`/`onHoverOut` (they fire only on web
|
|
476
|
+
* via react-native-web; a no-op on native) toggling a plain background token —
|
|
477
|
+
* the tint stays a NativeWind class, only the trigger is JS.
|
|
478
|
+
*/
|
|
479
|
+
const HoverPressable = ({
|
|
480
|
+
baseClassName,
|
|
481
|
+
hoverClassName,
|
|
482
|
+
...rest
|
|
483
|
+
}) => {
|
|
484
|
+
const [hovered, setHovered] = useState(false);
|
|
485
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
486
|
+
...rest,
|
|
487
|
+
className: hovered ? `${baseClassName} ${hoverClassName}` : baseClassName,
|
|
488
|
+
onHoverIn: () => setHovered(true),
|
|
489
|
+
onHoverOut: () => setHovered(false)
|
|
490
|
+
});
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* The signed-in Oxy account MENU — a Google-account-menu-style full menu built
|
|
495
|
+
* entirely with NativeWind `className` (the dynamic per-account accent hex is
|
|
496
|
+
* the one inline style NativeWind can't express). Structure mirrors the
|
|
497
|
+
* approved demo:
|
|
498
|
+
* - ACCOUNT on its own distinct panel surface: a COMPACT current-account row
|
|
499
|
+
* (avatar + name + email + expand chevron) that toggles the switch list, a
|
|
500
|
+
* "Manage your Oxy account" pill, and — when expanded — the other switchable
|
|
501
|
+
* accounts + "Add another account" + "Manage accounts on this device".
|
|
502
|
+
* - OXY STORAGE: cloud + used/total + a progress bar + Upgrade / Manage chips.
|
|
503
|
+
* - MENU rows: Your data in Oxy · Oxy settings · Help & feedback · Sign out —
|
|
504
|
+
* Bloom's grouped section (`SettingsListGroup`/`SettingsListItem`), the same
|
|
505
|
+
* component every other SDK settings surface uses, not a local row copy.
|
|
506
|
+
* - FOOTER: Privacy Policy · Terms of Service.
|
|
507
|
+
*
|
|
508
|
+
* All three blocks share ONE rhythm taken from that grouped section: a 12px
|
|
509
|
+
* content inset, a 12px gap after the leading element, 16px between blocks, and
|
|
510
|
+
* a 16px trailing chevron column.
|
|
511
|
+
*
|
|
512
|
+
* Collapse state is a plain `useState` toggled in the current row's press
|
|
513
|
+
* handler — no effect hook, no derived-from-props sync. With only ONE account
|
|
514
|
+
* (nothing to switch to) the chevron is hidden and the list renders inline so
|
|
515
|
+
* "Add another account" stays reachable without a pointless toggle.
|
|
516
|
+
*/
|
|
301
517
|
const AccountsView = ({
|
|
302
518
|
snapshot,
|
|
303
519
|
theme,
|
|
304
520
|
t,
|
|
305
|
-
handlers
|
|
521
|
+
handlers,
|
|
522
|
+
storage,
|
|
523
|
+
menu
|
|
306
524
|
}) => {
|
|
525
|
+
const [expanded, setExpanded] = useState(false);
|
|
526
|
+
// Measured natural height of the switch list, so the reveal animates to an
|
|
527
|
+
// exact height (and the content below reflows down smoothly) instead of a
|
|
528
|
+
// guessed max. The measuring wrapper is style-based, NOT className'd — on
|
|
529
|
+
// RN-Web `onLayout` never fires for className'd Views (see AGENTS.md).
|
|
530
|
+
const [listContentHeight, setListContentHeight] = useState(0);
|
|
531
|
+
// 0 = collapsed, 1 = expanded. Set imperatively in the toggle handler (no
|
|
532
|
+
// effect hook). On RN-Web there is no worklets plugin, so every shared value a
|
|
533
|
+
// mapper reads MUST be in its deps array or it freezes on the first frame
|
|
534
|
+
// (AGENTS.md "Reanimated (web)").
|
|
535
|
+
const listProgress = useSharedValue(0);
|
|
536
|
+
const listStyle = useAnimatedStyle(() => ({
|
|
537
|
+
height: listProgress.value * listContentHeight,
|
|
538
|
+
opacity: listProgress.value
|
|
539
|
+
}), [listProgress, listContentHeight]);
|
|
540
|
+
const chevronStyle = useAnimatedStyle(() => ({
|
|
541
|
+
transform: [{
|
|
542
|
+
rotate: `${listProgress.value * 180}deg`
|
|
543
|
+
}]
|
|
544
|
+
}), [listProgress]);
|
|
545
|
+
// Collapsed, the switch card is a single row and reads as a PILL; opened, it
|
|
546
|
+
// becomes a card holding rows and takes the grouped-section corner. The corner
|
|
547
|
+
// is driven off the SAME `listProgress` as the reveal — but clamped to its
|
|
548
|
+
// opening fraction, so it resolves early instead of trailing the rows: the
|
|
549
|
+
// card already reads as a card by the time they are visible. Collapsing is the
|
|
550
|
+
// mirror image, the pill returning over the closing tail.
|
|
551
|
+
const switchCardStyle = useAnimatedStyle(() => ({
|
|
552
|
+
borderRadius: interpolate(listProgress.value, [0, SWITCH_CARD_RADIUS_SETTLE], [SWITCH_CARD_PILL_RADIUS, SWITCH_CARD_RADIUS], Extrapolation.CLAMP)
|
|
553
|
+
}), [listProgress]);
|
|
554
|
+
// `CompositionBar` ships as an interactive breakdown: a selected segment
|
|
555
|
+
// replaces its hint line with that segment's readout. Tapping the selected one
|
|
556
|
+
// again clears it.
|
|
557
|
+
const [storageSegment, setStorageSegment] = useState(null);
|
|
558
|
+
const toggleStorageSegment = useCallback(key => setStorageSegment(previous => previous === key ? null : key), []);
|
|
559
|
+
const toggleExpanded = useCallback(() => {
|
|
560
|
+
const next = !expanded;
|
|
561
|
+
setExpanded(next);
|
|
562
|
+
listProgress.value = withTiming(next ? 1 : 0, {
|
|
563
|
+
duration: 240
|
|
564
|
+
});
|
|
565
|
+
}, [expanded, listProgress]);
|
|
307
566
|
if (snapshot.loading && snapshot.accounts.length === 0) {
|
|
308
567
|
return /*#__PURE__*/_jsxs(View, {
|
|
309
|
-
|
|
568
|
+
className: "items-center justify-center gap-space-12 py-space-24",
|
|
310
569
|
children: [/*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
311
570
|
name: "loading",
|
|
312
571
|
size: 24,
|
|
313
572
|
color: theme.colors.textSecondary
|
|
314
573
|
}), /*#__PURE__*/_jsx(Text, {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
}],
|
|
318
|
-
children: t('accountSwitcher.loading') || 'Loading accounts…'
|
|
574
|
+
className: "text-body text-text-secondary text-center",
|
|
575
|
+
children: t('accountSwitcher.loading')
|
|
319
576
|
})]
|
|
320
577
|
});
|
|
321
578
|
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
579
|
+
const switchingDisabled = snapshot.switchingAccountId !== null;
|
|
580
|
+
const current = snapshot.accounts.find(account => account.isCurrent) ?? snapshot.accounts[0];
|
|
581
|
+
const others = current ? snapshot.accounts.filter(account => account.accountId !== current.accountId) : snapshot.accounts;
|
|
582
|
+
const currentAccent = current ? resolveAccentHex(current.color, theme.colors.primary) : theme.colors.primary;
|
|
583
|
+
// The hero's address line under the greeting: the account's canonical @oxy.so
|
|
584
|
+
// email when it has one, else its normalized `@handle` (never a synthesized
|
|
585
|
+
// `username@oxy.so`, per the identity contract — `getNormalizedUserHandle`).
|
|
586
|
+
const currentAddress = current ? heroAddressLine(current) : null;
|
|
587
|
+
// The switch list repeats the CURRENT account (first, ringed) — unlike the old
|
|
588
|
+
// compact header it is not represented anywhere else once the hero moved out
|
|
589
|
+
// of the card, and the list is where you switch back to it.
|
|
590
|
+
const switchableAccounts = current ? [current, ...others] : others;
|
|
591
|
+
const facepile = switchableAccounts.map(account => ({
|
|
592
|
+
id: account.accountId,
|
|
593
|
+
uri: account.avatarUrl ?? undefined,
|
|
594
|
+
displayName: account.displayName
|
|
595
|
+
}));
|
|
596
|
+
|
|
597
|
+
// Used vs free is a two-part COMPOSITION (the parts always fill the bar), not
|
|
598
|
+
// a progress value — exactly what Bloom's `CompositionBar` models. Both colors
|
|
599
|
+
// are theme tokens, so the bar is correct in light and dark.
|
|
600
|
+
const storageCategories = storage ? [{
|
|
601
|
+
key: 'used',
|
|
602
|
+
name: t('accountMenu.storage.used'),
|
|
603
|
+
amount: storage.usedBytes,
|
|
604
|
+
color: theme.colors.primary
|
|
605
|
+
}, {
|
|
606
|
+
key: 'free',
|
|
607
|
+
name: t('accountMenu.storage.free'),
|
|
608
|
+
amount: Math.max(0, storage.limitBytes - storage.usedBytes),
|
|
609
|
+
color: theme.colors.contrast50
|
|
610
|
+
}] : [];
|
|
611
|
+
const usageLabel = storage ? t('accountMenu.storage.usage', {
|
|
612
|
+
used: formatStorageGb(storage.usedBytes),
|
|
613
|
+
total: formatStorageGb(storage.limitBytes)
|
|
614
|
+
}) : t('accountMenu.storage.unavailable');
|
|
615
|
+
|
|
616
|
+
// The switch list body, revealed under the "Switch account" row. Own markup,
|
|
617
|
+
// not a Bloom grouped section: this is not a list of settings rows and the
|
|
618
|
+
// component is not a card container. It mirrors the section's rhythm by hand —
|
|
619
|
+
// 12px content inset, 12px after the avatar, a hairline between rows — and
|
|
620
|
+
// draws those hairlines INSIDE the animated clip, so a collapsed list never
|
|
621
|
+
// strands one against the header row.
|
|
622
|
+
const listItems = /*#__PURE__*/_jsxs(_Fragment, {
|
|
623
|
+
children: [switchableAccounts.map((account, index) => {
|
|
624
|
+
const accent = resolveAccentHex(account.color, theme.colors.primary);
|
|
625
|
+
const isSwitching = snapshot.switchingAccountId === account.accountId;
|
|
626
|
+
return /*#__PURE__*/_jsxs(Fragment, {
|
|
627
|
+
children: [index > 0 ? /*#__PURE__*/_jsx(View, {
|
|
628
|
+
className: "h-px bg-border opacity-30 ml-space-12"
|
|
629
|
+
}) : null, /*#__PURE__*/_jsxs(HoverPressable, {
|
|
630
|
+
baseClassName: `flex-row items-center gap-space-12 px-space-12 py-[10px]${switchingDisabled ? ' opacity-60' : ''}`,
|
|
631
|
+
hoverClassName: "bg-fill-secondary",
|
|
632
|
+
onPress: () => handlers.onSwitch(account.accountId),
|
|
633
|
+
disabled: switchingDisabled,
|
|
634
|
+
accessibilityRole: "button",
|
|
635
|
+
accessibilityLabel: account.displayName,
|
|
636
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
637
|
+
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
638
|
+
source: account.avatarUrl ?? undefined,
|
|
639
|
+
variant: "thumb",
|
|
640
|
+
name: account.displayName,
|
|
641
|
+
size: SWITCH_AVATAR_SIZE
|
|
642
|
+
}), account.isCurrent ? /*#__PURE__*/_jsx(View, {
|
|
643
|
+
style: [styles.currentAvatarRing, {
|
|
644
|
+
borderColor: accent
|
|
645
|
+
}],
|
|
646
|
+
pointerEvents: "none"
|
|
647
|
+
}) : null]
|
|
648
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
649
|
+
className: "flex-1 min-w-0",
|
|
650
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
651
|
+
className: "text-body font-semibold text-text",
|
|
652
|
+
numberOfLines: 1,
|
|
653
|
+
children: account.displayName
|
|
654
|
+
}), account.email ? /*#__PURE__*/_jsx(Text, {
|
|
655
|
+
className: "text-caption text-text-secondary",
|
|
656
|
+
numberOfLines: 1,
|
|
657
|
+
children: account.email
|
|
658
|
+
}) : null]
|
|
659
|
+
}), isSwitching ? /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
660
|
+
name: "loading",
|
|
661
|
+
size: 20,
|
|
662
|
+
color: accent
|
|
663
|
+
}) : null]
|
|
664
|
+
})]
|
|
665
|
+
}, account.accountId);
|
|
666
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
667
|
+
className: "h-px bg-border opacity-30 ml-space-12"
|
|
668
|
+
}), /*#__PURE__*/_jsx(AccountAffordanceRow, {
|
|
669
|
+
icon: "plus",
|
|
670
|
+
label: t('accountMenu.addAnother'),
|
|
334
671
|
onPress: handlers.onAdd,
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
338
|
-
style: [styles.addBadge, {
|
|
339
|
-
borderColor: theme.colors.border
|
|
340
|
-
}],
|
|
341
|
-
children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
342
|
-
name: "plus",
|
|
343
|
-
size: 20,
|
|
344
|
-
color: theme.colors.textSecondary
|
|
345
|
-
})
|
|
346
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
347
|
-
style: [styles.rowName, {
|
|
348
|
-
color: theme.colors.textSecondary
|
|
349
|
-
}],
|
|
350
|
-
children: t('signin.addAccountTitle') || 'Add another account'
|
|
351
|
-
})]
|
|
672
|
+
disabled: switchingDisabled,
|
|
673
|
+
theme: theme
|
|
352
674
|
}), /*#__PURE__*/_jsx(View, {
|
|
353
|
-
|
|
354
|
-
|
|
675
|
+
className: "h-px bg-border opacity-30 ml-space-12"
|
|
676
|
+
}), /*#__PURE__*/_jsx(AccountAffordanceRow, {
|
|
677
|
+
icon: "account-multiple-outline",
|
|
678
|
+
label: t('accountSwitcher.manageOnDevice'),
|
|
679
|
+
onPress: handlers.onManage,
|
|
680
|
+
disabled: switchingDisabled,
|
|
681
|
+
theme: theme
|
|
682
|
+
})]
|
|
683
|
+
});
|
|
684
|
+
const manageLabel = t('accountMenu.manage');
|
|
685
|
+
const switchLabel = t('accountMenu.switchAccount');
|
|
686
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
687
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
688
|
+
style: styles.hero,
|
|
689
|
+
children: [current ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
690
|
+
children: [/*#__PURE__*/_jsxs(PressableScale, {
|
|
691
|
+
onPress: handlers.onEditAvatar,
|
|
692
|
+
accessibilityRole: "button",
|
|
693
|
+
accessibilityLabel: t('editProfile.changeAvatar'),
|
|
694
|
+
style: styles.heroAvatarPressable,
|
|
695
|
+
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
696
|
+
source: current.avatarUrl ?? undefined,
|
|
697
|
+
name: current.displayName,
|
|
698
|
+
size: HERO_AVATAR_SIZE
|
|
699
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
700
|
+
style: [styles.heroAvatarRing, {
|
|
701
|
+
borderColor: currentAccent
|
|
702
|
+
}],
|
|
703
|
+
pointerEvents: "none"
|
|
704
|
+
}), /*#__PURE__*/_jsx(AvatarCameraBadge, {})]
|
|
705
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
706
|
+
style: styles.heroNameBlock,
|
|
707
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
708
|
+
style: [styles.heroGreeting, {
|
|
709
|
+
color: theme.colors.text
|
|
710
|
+
}],
|
|
711
|
+
numberOfLines: 2,
|
|
712
|
+
children: t('accountMenu.greeting', {
|
|
713
|
+
name: current.displayName
|
|
714
|
+
})
|
|
715
|
+
}), currentAddress ? /*#__PURE__*/_jsx(Text, {
|
|
716
|
+
style: [styles.heroAddress, {
|
|
717
|
+
color: theme.colors.textSecondary
|
|
718
|
+
}],
|
|
719
|
+
numberOfLines: 1,
|
|
720
|
+
children: currentAddress
|
|
721
|
+
}) : null]
|
|
722
|
+
})]
|
|
723
|
+
}) : null, /*#__PURE__*/_jsx(Button, {
|
|
724
|
+
variant: "secondary",
|
|
725
|
+
size: "small",
|
|
355
726
|
onPress: handlers.onManage,
|
|
356
|
-
|
|
357
|
-
children:
|
|
358
|
-
|
|
359
|
-
|
|
727
|
+
accessibilityLabel: manageLabel,
|
|
728
|
+
children: manageLabel
|
|
729
|
+
})]
|
|
730
|
+
}), /*#__PURE__*/_jsxs(Animated.View, {
|
|
731
|
+
className: "bg-fill overflow-hidden mb-space-16",
|
|
732
|
+
style: switchCardStyle,
|
|
733
|
+
children: [/*#__PURE__*/_jsxs(HoverPressable, {
|
|
734
|
+
baseClassName: `flex-row items-center gap-space-12 px-space-12 py-[10px] min-h-[44px]${switchingDisabled ? ' opacity-60' : ''}`,
|
|
735
|
+
hoverClassName: "bg-fill-secondary",
|
|
736
|
+
onPress: toggleExpanded,
|
|
737
|
+
disabled: switchingDisabled,
|
|
738
|
+
accessibilityRole: "button"
|
|
739
|
+
// The ARIA prop, not `accessibilityState`: react-native-web 0.21
|
|
740
|
+
// forwards only this one, and RN maps it to
|
|
741
|
+
// `accessibilityState.expanded` natively — so the disclosure state
|
|
742
|
+
// reaches assistive tech on BOTH platforms.
|
|
743
|
+
,
|
|
744
|
+
"aria-expanded": expanded,
|
|
745
|
+
accessibilityLabel: switchLabel,
|
|
746
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
747
|
+
className: "flex-1 text-body text-text",
|
|
748
|
+
numberOfLines: 1,
|
|
749
|
+
children: switchLabel
|
|
750
|
+
}), expanded ? null : /*#__PURE__*/_jsx(AvatarGroup, {
|
|
751
|
+
items: facepile,
|
|
752
|
+
layout: "stack",
|
|
753
|
+
size: FACEPILE_AVATAR_SIZE,
|
|
754
|
+
max: FACEPILE_MAX,
|
|
755
|
+
overlap: FACEPILE_OVERLAP,
|
|
756
|
+
variant: "thumb",
|
|
757
|
+
showInitials: true,
|
|
758
|
+
ringColor: theme.colors.card
|
|
759
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
760
|
+
style: [styles.chevronCircle, {
|
|
761
|
+
backgroundColor: theme.colors.contrast50
|
|
360
762
|
}],
|
|
361
|
-
children:
|
|
763
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
764
|
+
style: chevronStyle,
|
|
765
|
+
children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
766
|
+
name: "chevron-down",
|
|
767
|
+
size: 20,
|
|
768
|
+
color: theme.colors.text
|
|
769
|
+
})
|
|
770
|
+
})
|
|
771
|
+
})]
|
|
772
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
773
|
+
style: [styles.collapse, listStyle],
|
|
774
|
+
pointerEvents: expanded ? 'auto' : 'none',
|
|
775
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
776
|
+
style: styles.collapseMeasure,
|
|
777
|
+
onLayout: event => setListContentHeight(event.nativeEvent.layout.height),
|
|
778
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
779
|
+
children: listItems
|
|
780
|
+
})
|
|
362
781
|
})
|
|
363
|
-
})
|
|
782
|
+
})]
|
|
783
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
784
|
+
className: "bg-fill rounded-[16px] overflow-hidden mb-space-16 px-space-12 py-[10px] gap-space-12",
|
|
785
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
786
|
+
className: "flex-row items-center gap-space-12 min-h-[24px]",
|
|
787
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
788
|
+
className: "w-[20px] items-center",
|
|
789
|
+
children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
790
|
+
name: "cloud-outline",
|
|
791
|
+
size: ROW_ICON_SIZE,
|
|
792
|
+
color: theme.colors.textSecondary
|
|
793
|
+
})
|
|
794
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
795
|
+
className: "flex-1 text-body font-semibold text-text",
|
|
796
|
+
numberOfLines: 1,
|
|
797
|
+
children: t('accountMenu.storage.title')
|
|
798
|
+
})]
|
|
799
|
+
}), /*#__PURE__*/_jsx(CompositionBar, {
|
|
800
|
+
categories: storageCategories,
|
|
801
|
+
selectedKey: storageSegment,
|
|
802
|
+
onSelect: toggleStorageSegment,
|
|
803
|
+
hintLabel: usageLabel,
|
|
804
|
+
formatReadout: (bytes, percent) => `${formatStorageGb(bytes)} · ${percent}%`
|
|
805
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
806
|
+
className: "flex-row gap-space-8",
|
|
807
|
+
children: [/*#__PURE__*/_jsx(StorageChip, {
|
|
808
|
+
label: t('accountMenu.storage.upgrade'),
|
|
809
|
+
onPress: menu.onUpgradeStorage
|
|
810
|
+
}), /*#__PURE__*/_jsx(StorageChip, {
|
|
811
|
+
label: t('accountMenu.storage.manage'),
|
|
812
|
+
onPress: menu.onManageStorage
|
|
813
|
+
})]
|
|
814
|
+
})]
|
|
815
|
+
}), /*#__PURE__*/_jsxs(SettingsListGroup, {
|
|
816
|
+
children: [/*#__PURE__*/_jsx(SettingsListItem, {
|
|
817
|
+
icon: /*#__PURE__*/_jsx(MenuIcon, {
|
|
818
|
+
name: "tray-arrow-down",
|
|
819
|
+
theme: theme
|
|
820
|
+
}),
|
|
821
|
+
title: t('accountMenu.data'),
|
|
822
|
+
onPress: menu.onOpenData
|
|
823
|
+
}), /*#__PURE__*/_jsx(SettingsListItem, {
|
|
824
|
+
icon: /*#__PURE__*/_jsx(MenuIcon, {
|
|
825
|
+
name: "cog-outline",
|
|
826
|
+
theme: theme
|
|
827
|
+
}),
|
|
828
|
+
title: t('accountMenu.settings'),
|
|
829
|
+
onPress: menu.onOpenSettings
|
|
830
|
+
}), /*#__PURE__*/_jsx(SettingsListItem, {
|
|
831
|
+
icon: /*#__PURE__*/_jsx(MenuIcon, {
|
|
832
|
+
name: "help-circle-outline",
|
|
833
|
+
theme: theme
|
|
834
|
+
}),
|
|
835
|
+
title: t('accountMenu.help'),
|
|
836
|
+
onPress: menu.onHelp
|
|
837
|
+
}), /*#__PURE__*/_jsx(SettingsListItem, {
|
|
838
|
+
icon: /*#__PURE__*/_jsx(MenuIcon, {
|
|
839
|
+
name: "logout",
|
|
840
|
+
theme: theme
|
|
841
|
+
}),
|
|
842
|
+
title: t('accountMenu.signOut'),
|
|
843
|
+
onPress: menu.onSignOut,
|
|
844
|
+
showChevron: false
|
|
845
|
+
})]
|
|
846
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
847
|
+
className: "flex-row items-center justify-center gap-space-12 px-space-12 pb-space-8",
|
|
848
|
+
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
849
|
+
onPress: menu.onPrivacy,
|
|
850
|
+
accessibilityRole: "link",
|
|
851
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
852
|
+
className: "text-bodySmall text-text-secondary",
|
|
853
|
+
children: t('accountMenu.privacy')
|
|
854
|
+
})
|
|
855
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
856
|
+
className: "text-bodySmall text-text-tertiary",
|
|
857
|
+
children: "\xB7"
|
|
858
|
+
}), /*#__PURE__*/_jsx(Pressable, {
|
|
859
|
+
onPress: menu.onTerms,
|
|
860
|
+
accessibilityRole: "link",
|
|
861
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
862
|
+
className: "text-bodySmall text-text-secondary",
|
|
863
|
+
children: t('accountMenu.terms')
|
|
864
|
+
})
|
|
865
|
+
})]
|
|
364
866
|
})]
|
|
365
867
|
});
|
|
366
868
|
};
|
|
869
|
+
|
|
870
|
+
// ---------------------------------------------------------------------------
|
|
871
|
+
// Account-menu row building blocks (NativeWind)
|
|
872
|
+
// ---------------------------------------------------------------------------
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* An account-list AFFORDANCE row ("Add another account", "Manage accounts on
|
|
876
|
+
* this device") — a bordered circle sized to the avatar it stands in for, so its
|
|
877
|
+
* label lands on the same line as every account name above it. Own markup, like
|
|
878
|
+
* the account rows it closes: this list is not a Bloom grouped section.
|
|
879
|
+
*/
|
|
880
|
+
const AccountAffordanceRow = ({
|
|
881
|
+
icon,
|
|
882
|
+
label,
|
|
883
|
+
onPress,
|
|
884
|
+
disabled,
|
|
885
|
+
theme
|
|
886
|
+
}) => /*#__PURE__*/_jsxs(HoverPressable, {
|
|
887
|
+
baseClassName: `flex-row items-center gap-space-12 px-space-12 py-[10px]${disabled ? ' opacity-60' : ''}`,
|
|
888
|
+
hoverClassName: "bg-fill-secondary",
|
|
889
|
+
onPress: onPress,
|
|
890
|
+
disabled: disabled,
|
|
891
|
+
accessibilityRole: "button",
|
|
892
|
+
accessibilityLabel: label,
|
|
893
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
894
|
+
className: "w-[36px] h-[36px] items-center justify-center rounded-radius-max border border-border",
|
|
895
|
+
children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
896
|
+
name: icon,
|
|
897
|
+
size: BADGE_GLYPH_SIZE,
|
|
898
|
+
color: theme.colors.textSecondary
|
|
899
|
+
})
|
|
900
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
901
|
+
className: "flex-1 text-body font-semibold text-text",
|
|
902
|
+
numberOfLines: 1,
|
|
903
|
+
children: label
|
|
904
|
+
})]
|
|
905
|
+
});
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* The leading glyph for a grouped-section menu row, sized to Bloom's 20px icon
|
|
909
|
+
* column so the icons, the storage block's cloud and every row title align.
|
|
910
|
+
*/
|
|
911
|
+
const MenuIcon = ({
|
|
912
|
+
name,
|
|
913
|
+
theme
|
|
914
|
+
}) => /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
915
|
+
name: name,
|
|
916
|
+
size: ROW_ICON_SIZE,
|
|
917
|
+
color: theme.colors.textSecondary
|
|
918
|
+
});
|
|
919
|
+
|
|
920
|
+
/** A storage action chip — a bordered pill on the sheet background. */
|
|
921
|
+
const StorageChip = ({
|
|
922
|
+
label,
|
|
923
|
+
onPress
|
|
924
|
+
}) => /*#__PURE__*/_jsx(HoverPressable, {
|
|
925
|
+
baseClassName: "rounded-radius-max border border-border bg-bg py-[9px] px-[14px]",
|
|
926
|
+
hoverClassName: "bg-fill-secondary",
|
|
927
|
+
onPress: onPress,
|
|
928
|
+
accessibilityRole: "button",
|
|
929
|
+
accessibilityLabel: label,
|
|
930
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
931
|
+
className: "text-bodySmall font-semibold text-text",
|
|
932
|
+
children: label
|
|
933
|
+
})
|
|
934
|
+
});
|
|
367
935
|
const AccountRow = ({
|
|
368
936
|
account,
|
|
369
937
|
theme,
|
|
@@ -432,9 +1000,9 @@ const AccountRow = ({
|
|
|
432
1000
|
};
|
|
433
1001
|
|
|
434
1002
|
// ---------------------------------------------------------------------------
|
|
435
|
-
// Sign-in view (add / signin) — NATIVE-facing today: on web
|
|
436
|
-
//
|
|
437
|
-
// only for a brief instant there.
|
|
1003
|
+
// Sign-in view (add / signin) — NATIVE-facing today: on web `autoStartSignIn`
|
|
1004
|
+
// (fired from the subscribe pass / the add / back-to-sign-in handlers) moves the
|
|
1005
|
+
// view to `qr` almost immediately, so this renders only for a brief instant there.
|
|
438
1006
|
// ---------------------------------------------------------------------------
|
|
439
1007
|
|
|
440
1008
|
const SignInView = ({
|