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