@oxyhq/services 22.9.0 → 22.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/index.js +24 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/AvatarCameraBadge.js +42 -0
- package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -0
- package/lib/commonjs/ui/components/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +55 -133
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -0
- package/lib/commonjs/ui/components/OxyAuthChooser.js +657 -88
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyConsentScreen.js +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +15 -1
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileSummaryCard.js +3 -23
- package/lib/commonjs/ui/components/ProfileSummaryCard.js.map +1 -1
- package/lib/commonjs/ui/components/RequireOxyAuth.js +1 -1
- package/lib/commonjs/ui/components/SurfaceHeaderAction.js +63 -0
- package/lib/commonjs/ui/components/SurfaceHeaderAction.js.map +1 -0
- package/lib/commonjs/ui/components/SurfaceScreen.js +91 -8
- package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +46 -29
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +47 -23
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js +81 -19
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +1 -1
- package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js +83 -23
- package/lib/commonjs/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
- package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js +83 -0
- package/lib/commonjs/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +79 -29
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +18 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useFileQueries.js +129 -0
- package/lib/commonjs/ui/hooks/queries/useFileQueries.js.map +1 -0
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +38 -55
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/hooks/useReduceMotion.js +57 -0
- package/lib/commonjs/ui/hooks/useReduceMotion.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js +46 -0
- package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +1 -1
- package/lib/commonjs/ui/navigation/accountDialogManager.js +36 -2
- package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/bottomSheetManager.js +5 -6
- package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +4 -3
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaceBackBridge.js +68 -0
- package/lib/commonjs/ui/navigation/surfaceBackBridge.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaceNavStack.js +62 -15
- package/lib/commonjs/ui/navigation/surfaceNavStack.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaceRegistry.js +84 -19
- package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaces.js +139 -25
- package/lib/commonjs/ui/navigation/surfaces.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +214 -283
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +88 -118
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +22 -36
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +219 -226
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +287 -289
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js +301 -0
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +24 -39
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +136 -158
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +29 -36
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +101 -109
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +10 -15
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +8 -16
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +403 -627
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +62 -69
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +63 -79
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +69 -98
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +8 -14
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +77 -94
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +99 -134
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/NotificationsScreen.js +69 -76
- package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -8
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PreferencesScreen.js +67 -74
- package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +55 -91
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +291 -304
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +100 -114
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +38 -45
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +44 -57
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +24 -31
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +14 -24
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +16 -48
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js +63 -0
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js.map +1 -0
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +54 -41
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +44 -81
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js +66 -75
- package/lib/commonjs/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +111 -139
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js +13 -20
- package/lib/commonjs/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +14 -27
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +68 -85
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +28 -36
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/resetSessionScopedStores.js +8 -3
- package/lib/commonjs/ui/stores/resetSessionScopedStores.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +11 -2
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +0 -79
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/index.js +12 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js +40 -0
- package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -0
- package/lib/module/ui/components/{OxyAccountDialog.js → OxyAccountDialogScreen.js} +57 -135
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -0
- package/lib/module/ui/components/OxyAuthChooser.js +659 -91
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyConsentScreen.js +1 -1
- package/lib/module/ui/components/ProfileButton.js +16 -2
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/ProfileSummaryCard.js +2 -23
- package/lib/module/ui/components/ProfileSummaryCard.js.map +1 -1
- package/lib/module/ui/components/RequireOxyAuth.js +1 -1
- package/lib/module/ui/components/SurfaceHeaderAction.js +58 -0
- package/lib/module/ui/components/SurfaceHeaderAction.js.map +1 -0
- package/lib/module/ui/components/SurfaceScreen.js +93 -10
- package/lib/module/ui/components/SurfaceScreen.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +46 -29
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +46 -23
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/oxyAuthChooserStyles.js +81 -19
- package/lib/module/ui/components/oxyAuthChooserStyles.js.map +1 -1
- package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js +83 -25
- package/lib/module/ui/components/photogrid/JustifiedPhotoGrid.js.map +1 -1
- package/lib/module/ui/components/surfaces/ActionSheetSurface.js +78 -0
- package/lib/module/ui/components/surfaces/ActionSheetSurface.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +80 -30
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +16 -0
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useFileQueries.js +120 -0
- package/lib/module/ui/hooks/queries/useFileQueries.js.map +1 -0
- package/lib/module/ui/hooks/useAvatarPicker.js +38 -55
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/hooks/useReduceMotion.js +53 -0
- package/lib/module/ui/hooks/useReduceMotion.js.map +1 -0
- package/lib/module/ui/hooks/useSurfaceHeader.js +42 -0
- package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -0
- package/lib/module/ui/hooks/useSwitchableAccounts.js +1 -1
- package/lib/module/ui/navigation/accountDialogManager.js +34 -2
- package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/module/ui/navigation/bottomSheetManager.js +6 -7
- package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +4 -3
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/navigation/surfaceBackBridge.js +63 -0
- package/lib/module/ui/navigation/surfaceBackBridge.js.map +1 -0
- package/lib/module/ui/navigation/surfaceNavStack.js +62 -15
- package/lib/module/ui/navigation/surfaceNavStack.js.map +1 -1
- package/lib/module/ui/navigation/surfaceRegistry.js +84 -19
- package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -1
- package/lib/module/ui/navigation/surfaces.js +138 -26
- package/lib/module/ui/navigation/surfaces.js.map +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js +218 -286
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +92 -121
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +25 -38
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +220 -227
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +289 -291
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ChangeAvatarScreen.js +298 -0
- package/lib/module/ui/screens/ChangeAvatarScreen.js.map +1 -0
- package/lib/module/ui/screens/ConnectedAppsScreen.js +26 -40
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js +139 -160
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +32 -38
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +102 -110
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +11 -15
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +10 -17
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +408 -631
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +64 -70
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +65 -81
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +71 -99
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +10 -15
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +78 -94
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +102 -137
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/NotificationsScreen.js +71 -77
- package/lib/module/ui/screens/NotificationsScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +4 -9
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PreferencesScreen.js +69 -75
- package/lib/module/ui/screens/PreferencesScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +58 -93
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +293 -305
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +102 -116
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +40 -46
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +46 -58
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +26 -32
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +14 -24
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +17 -49
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js +59 -0
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js.map +1 -0
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +54 -42
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +45 -81
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustAboutScreen.js +67 -75
- package/lib/module/ui/screens/trust/TrustAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +112 -139
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustFAQScreen.js +15 -21
- package/lib/module/ui/screens/trust/TrustFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +14 -26
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +69 -85
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRulesScreen.js +30 -37
- package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/module/ui/stores/resetSessionScopedStores.js +8 -3
- package/lib/module/ui/stores/resetSessionScopedStores.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +11 -2
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +0 -78
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AvatarCameraBadge.d.ts +4 -0
- package/lib/typescript/commonjs/ui/components/AvatarCameraBadge.d.ts.map +1 -0
- package/lib/typescript/{module/ui/components/OxyAccountDialog.d.ts → commonjs/ui/components/OxyAccountDialogScreen.d.ts} +5 -4
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +3 -3
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileSummaryCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts +16 -0
- package/lib/typescript/commonjs/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts +3 -4
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +17 -2
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts +75 -13
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/photogrid/JustifiedPhotoGrid.d.ts +10 -8
- package/lib/typescript/commonjs/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
- package/lib/typescript/commonjs/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +9 -0
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts +50 -0
- package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +17 -16
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useReduceMotion.d.ts +14 -0
- package/lib/typescript/commonjs/ui/hooks/useReduceMotion.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +31 -0
- package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +27 -2
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +4 -5
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts +16 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts +21 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +101 -23
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts +42 -11
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts +18 -9
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts +34 -0
- package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/FileLibraryError.d.ts +23 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/FileLibraryError.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts +4 -0
- package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts +10 -2
- package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/stores/resetSessionScopedStores.d.ts +8 -1
- package/lib/typescript/commonjs/ui/stores/resetSessionScopedStores.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +10 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +0 -48
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AvatarCameraBadge.d.ts +4 -0
- package/lib/typescript/module/ui/components/AvatarCameraBadge.d.ts.map +1 -0
- package/lib/typescript/{commonjs/ui/components/OxyAccountDialog.d.ts → module/ui/components/OxyAccountDialogScreen.d.ts} +5 -4
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +3 -3
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts +2 -2
- package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileSummaryCard.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts +1 -1
- package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts +16 -0
- package/lib/typescript/module/ui/components/SurfaceHeaderAction.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts +3 -4
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +14 -4
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +17 -2
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts +75 -13
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/photogrid/JustifiedPhotoGrid.d.ts +10 -8
- package/lib/typescript/module/ui/components/photogrid/JustifiedPhotoGrid.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts +38 -0
- package/lib/typescript/module/ui/components/surfaces/ActionSheetSurface.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +9 -0
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts +50 -0
- package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +17 -16
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useReduceMotion.d.ts +14 -0
- package/lib/typescript/module/ui/hooks/useReduceMotion.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +31 -0
- package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +27 -2
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +4 -5
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts +16 -0
- package/lib/typescript/module/ui/navigation/surfaceBackBridge.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts +21 -0
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +101 -23
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaces.d.ts +42 -11
- package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +18 -9
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts +34 -0
- package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/FileLibraryError.d.ts +23 -0
- package/lib/typescript/module/ui/screens/fileManagement/FileLibraryError.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts +4 -0
- package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts +10 -2
- package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/stores/resetSessionScopedStores.d.ts +8 -1
- package/lib/typescript/module/ui/stores/resetSessionScopedStores.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +10 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +0 -48
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/package.json +9 -5
- package/src/index.ts +12 -5
- package/src/ui/components/AvatarCameraBadge.tsx +35 -0
- package/src/ui/components/{OxyAccountDialog.tsx → OxyAccountDialogScreen.tsx} +50 -116
- package/src/ui/components/OxyAuthChooser.tsx +743 -86
- package/src/ui/components/OxyConsentScreen.tsx +1 -1
- package/src/ui/components/ProfileButton.tsx +18 -3
- package/src/ui/components/ProfileSummaryCard.tsx +2 -25
- package/src/ui/components/RequireOxyAuth.tsx +1 -1
- package/src/ui/components/SurfaceHeaderAction.tsx +60 -0
- package/src/ui/components/SurfaceScreen.tsx +108 -14
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +50 -36
- package/src/ui/components/modals/DeleteAccountModal.tsx +47 -26
- package/src/ui/components/oxyAuthChooserStyles.ts +78 -16
- package/src/ui/components/photogrid/JustifiedPhotoGrid.tsx +158 -84
- package/src/ui/components/photogrid/__tests__/chunkPhotos.test.ts +51 -0
- package/src/ui/components/surfaces/ActionSheetSurface.tsx +98 -0
- package/src/ui/context/OxyContext.tsx +79 -25
- package/src/ui/hooks/queries/queryKeys.ts +15 -0
- package/src/ui/hooks/queries/useFileQueries.ts +162 -0
- package/src/ui/hooks/useAvatarPicker.ts +46 -74
- package/src/ui/hooks/useReduceMotion.ts +58 -0
- package/src/ui/hooks/useSurfaceHeader.ts +57 -0
- package/src/ui/hooks/useSwitchableAccounts.ts +1 -1
- package/src/ui/navigation/__tests__/getSurfaceConfig.test.ts +55 -7
- package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +149 -0
- package/src/ui/navigation/accountDialogManager.ts +42 -2
- package/src/ui/navigation/bottomSheetManager.ts +6 -7
- package/src/ui/navigation/routes.ts +6 -4
- package/src/ui/navigation/surfaceBackBridge.ts +69 -0
- package/src/ui/navigation/surfaceNavStack.ts +72 -9
- package/src/ui/navigation/surfaceRegistry.ts +164 -24
- package/src/ui/navigation/surfaces.ts +137 -30
- package/src/ui/screens/AccountMembersScreen.tsx +39 -100
- package/src/ui/screens/AccountSettingsScreen.tsx +32 -54
- package/src/ui/screens/AccountVerificationScreen.tsx +23 -51
- package/src/ui/screens/AppInfoScreen.tsx +6 -13
- package/src/ui/screens/AvatarCropScreen.tsx +340 -311
- package/src/ui/screens/ChangeAvatarScreen.tsx +359 -0
- package/src/ui/screens/ConnectedAppsScreen.tsx +39 -60
- package/src/ui/screens/CreateAccountScreen.tsx +13 -39
- package/src/ui/screens/EditProfileFieldScreen.tsx +30 -48
- package/src/ui/screens/EditProfileScreen.tsx +7 -16
- package/src/ui/screens/FAQScreen.tsx +9 -13
- package/src/ui/screens/FeedbackScreen.tsx +8 -22
- package/src/ui/screens/FileManagementScreen.tsx +370 -610
- package/src/ui/screens/HelpSupportScreen.tsx +7 -13
- package/src/ui/screens/HistoryViewScreen.tsx +26 -31
- package/src/ui/screens/LanguageSelectorScreen.tsx +12 -46
- package/src/ui/screens/LearnMoreUsernamesScreen.tsx +8 -16
- package/src/ui/screens/LegalDocumentsScreen.tsx +7 -22
- package/src/ui/screens/ManageAccountScreen.tsx +96 -165
- package/src/ui/screens/NotificationsScreen.tsx +7 -13
- package/src/ui/screens/PaymentGatewayScreen.tsx +3 -10
- package/src/ui/screens/PreferencesScreen.tsx +7 -13
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +52 -90
- package/src/ui/screens/PrivacySettingsScreen.tsx +9 -21
- package/src/ui/screens/ProfileScreen.tsx +9 -11
- package/src/ui/screens/SavesCollectionsScreen.tsx +7 -13
- package/src/ui/screens/SearchSettingsScreen.tsx +9 -21
- package/src/ui/screens/UserLinksScreen.tsx +7 -14
- package/src/ui/screens/UserListScreen.tsx +2 -5
- package/src/ui/screens/WelcomeNewUserScreen.tsx +18 -48
- package/src/ui/screens/fileManagement/FileLibraryError.tsx +56 -0
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +56 -46
- package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +55 -71
- package/src/ui/screens/trust/TrustAboutScreen.tsx +10 -17
- package/src/ui/screens/trust/TrustCenterScreen.tsx +9 -28
- package/src/ui/screens/trust/TrustFAQScreen.tsx +15 -18
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +3 -5
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +11 -26
- package/src/ui/screens/trust/TrustRulesScreen.tsx +10 -13
- package/src/ui/stores/resetSessionScopedStores.ts +8 -3
- package/src/ui/types/navigation.ts +10 -0
- package/src/ui/utils/avatarUtils.ts +11 -2
- package/src/ui/utils/fileManagement.ts +1 -101
- package/lib/commonjs/ui/components/Header.js +0 -305
- package/lib/commonjs/ui/components/Header.js.map +0 -1
- package/lib/commonjs/ui/components/OxyAccountDialog.js.map +0 -1
- package/lib/commonjs/ui/stores/fileStore.js +0 -153
- package/lib/commonjs/ui/stores/fileStore.js.map +0 -1
- package/lib/module/ui/components/Header.js +0 -299
- package/lib/module/ui/components/Header.js.map +0 -1
- package/lib/module/ui/components/OxyAccountDialog.js.map +0 -1
- package/lib/module/ui/stores/fileStore.js +0 -145
- package/lib/module/ui/stores/fileStore.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/Header.d.ts +0 -33
- package/lib/typescript/commonjs/ui/components/Header.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/stores/fileStore.d.ts +0 -31
- package/lib/typescript/commonjs/ui/stores/fileStore.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Header.d.ts +0 -33
- package/lib/typescript/module/ui/components/Header.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +0 -1
- package/lib/typescript/module/ui/stores/fileStore.d.ts +0 -31
- package/lib/typescript/module/ui/stores/fileStore.d.ts.map +0 -1
- package/src/ui/components/Header.tsx +0 -224
- package/src/ui/stores/fileStore.ts +0 -118
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useEffect","useMemo","StyleSheet","Text","View","useStore","useTheme","getScreenComponent","closeAllRouteSurfaces","navigateWithinOrPresent","presentRoute","replaceWithinOrPresent","jsx","_jsx","jsxs","_jsxs","ScreenErrorBoundary","Component","state","error","getDerivedStateFromError","componentDidCatch","info","__DEV__","console","props","screenName","componentStack","componentDidUpdate","prevProps","setState","render","style","errorStyles","container","children","title","message","create","flex","alignItems","justifyContent","padding","fontSize","fontWeight","marginBottom","textAlign","SurfaceScreen","navStack","surface","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useMemo","useState","StyleSheet","Text","View","useWindowDimensions","useStore","useTheme","useDialogFrame","useDialogHeader","getScreenComponent","pushSurfaceBackHandler","getSurfaceConfig","closeAllRouteSurfaces","navigateWithinOrPresent","presentRoute","replaceWithinOrPresent","SurfaceHeaderContext","jsx","_jsx","jsxs","_jsxs","ScreenErrorBoundary","Component","state","error","getDerivedStateFromError","componentDidCatch","info","__DEV__","console","props","screenName","componentStack","componentDidUpdate","prevProps","setState","render","style","errorStyles","container","children","title","message","create","flex","alignItems","justifyContent","padding","fontSize","fontWeight","marginBottom","textAlign","SurfaceScreen","navStack","surface","dismissOnBackdrop","theme","store","top","frames","length","closing","dismiss","closeResult","ScreenComponent","route","navigate","replace","result","resolveFlowOrDismiss","canGoBack","setStep","step","goBack","current","getTop","requestDismiss","handleSystemBack","present","headerContent","setHeaderContent","headerContext","setContent","config","headerMode","header","height","viewportHeight","frameSize","spec","undefined","heightRatio","Math","round","maxWidth","key","morph","size","canGoBackNow","dialogHeader","largeTitle","onBack","screenProps","initialStep","_omitInitialStep","rest","onStepChange","currentScreen","onClose","onAuthenticated","mode","Provider","value"],"sourceRoot":"../../../../src","sources":["ui/components/SurfaceScreen.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAwB,OAAO;AACxF,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,EAAEC,mBAAmB,QAAQ,cAAc;AAC1E,SAASC,QAAQ,QAAQ,SAAS;AAClC,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SACEC,cAAc,EACdC,eAAe,QAEV,qBAAqB;AAG5B,SAASC,kBAAkB,QAAQ,yBAAsB;AACzD,SAASC,sBAAsB,QAAQ,oCAAiC;AAExE,SAASC,gBAAgB,QAAQ,kCAA+B;AAChE,SACEC,qBAAqB,EACrBC,uBAAuB,EACvBC,YAAY,EACZC,sBAAsB,QACjB,2BAAwB;AAC/B,SACEC,oBAAoB,QA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IAAI;MACrBA,IAAI,EAAEd,GAAG,CAACc,IAAI;MACdkC,YAAY,EAAEnC,OAAO;MACrBA,OAAO;MACPoC,aAAa,EAAEjD,GAAG,CAACO,KAAK;MACxB;MACA;MACA2C,OAAO,EAAEhG,qBAAqB;MAC9BiG,eAAe,EAAEjG,qBAAqB;MACtCkD,OAAO;MACPgB,OAAO;MACP;MACAtB,KAAK,EAAEA,KAAK,CAACsD,IAAI;MACjB,GAAGL;IACL,CAAC;EACH,CAAC,EAAE,CAACvC,QAAQ,EAAEO,MAAM,EAAEN,OAAO,EAAEG,SAAS,EAAEC,OAAO,EAAEO,OAAO,EAAEhB,OAAO,EAAEN,KAAK,CAACsD,IAAI,EAAEpD,GAAG,CAACO,KAAK,EAAEP,GAAG,CAACc,IAAI,EAAEd,GAAG,CAAC5B,KAAK,CAAC,CAAC;EAEjH,IAAI,CAACkC,eAAe,EAAE,OAAO,IAAI;EAEjC,oBACE9C,IAAA,CAACF,oBAAoB,CAAC+F,QAAQ;IAACC,KAAK,EAAE/B,aAAc;IAAAzC,QAAA,eAClDtB,IAAA,CAACG,mBAAmB;MAACU,UAAU,EAAE2B,GAAG,CAACO,KAAM;MAAAzB,QAAA,eACzCtB,IAAA,CAAC8C,eAAe;QAAA,GAAKsC;MAAW,CAAG;IAAC,CACjB;EAAC,CACO,CAAC;AAEpC;AAEA,eAAelD,aAAa","ignoreList":[]}
|
|
@@ -2,18 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
import { View, Text } from 'react-native';
|
|
4
4
|
import { Ionicons } from '@expo/vector-icons';
|
|
5
|
-
import {
|
|
5
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
6
6
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
|
+
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
7
8
|
import { useI18n } from "../../hooks/useI18n.js";
|
|
8
9
|
import { formatFileSize, getFileIcon } from "../../utils/fileManagement.js";
|
|
9
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
/**
|
|
12
|
+
* File-detail panel — a rich presented surface (NOT a yes/no confirm): a file's
|
|
13
|
+
* icon + metadata plus download / delete / cancel actions. Each action first
|
|
14
|
+
* dismisses this surface, then runs its handler, so a follow-up delete confirm
|
|
15
|
+
* stacks cleanly above whatever remains. Presented via {@link presentFileDetails}.
|
|
16
|
+
*/
|
|
10
17
|
export const FileDetailsModal = ({
|
|
11
|
-
|
|
18
|
+
surface,
|
|
12
19
|
file,
|
|
13
20
|
onDownload,
|
|
14
21
|
onDelete,
|
|
15
|
-
isOwner
|
|
16
|
-
onClose
|
|
22
|
+
isOwner
|
|
17
23
|
}) => {
|
|
18
24
|
const {
|
|
19
25
|
t
|
|
@@ -21,30 +27,8 @@ export const FileDetailsModal = ({
|
|
|
21
27
|
const {
|
|
22
28
|
colors
|
|
23
29
|
} = useTheme();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
label: t('fileManagement.details.download'),
|
|
27
|
-
onPress: () => onDownload(file.id, file.filename)
|
|
28
|
-
}, {
|
|
29
|
-
label: t('common.actions.delete'),
|
|
30
|
-
color: 'destructive',
|
|
31
|
-
onPress: () => onDelete(file.id, file.filename)
|
|
32
|
-
}, {
|
|
33
|
-
label: t('common.cancel'),
|
|
34
|
-
color: 'cancel'
|
|
35
|
-
}] : [{
|
|
36
|
-
label: t('fileManagement.details.download'),
|
|
37
|
-
onPress: () => onDownload(file.id, file.filename)
|
|
38
|
-
}, {
|
|
39
|
-
label: t('common.cancel'),
|
|
40
|
-
color: 'cancel'
|
|
41
|
-
}];
|
|
42
|
-
return /*#__PURE__*/_jsx(Dialog, {
|
|
43
|
-
control: control,
|
|
44
|
-
onClose: onClose,
|
|
45
|
-
label: t('fileManagement.details.title'),
|
|
46
|
-
actions: actions,
|
|
47
|
-
children: /*#__PURE__*/_jsxs(View, {
|
|
30
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
31
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
48
32
|
className: "bg-secondary border-border p-[18px] rounded-[14px] border items-center",
|
|
49
33
|
children: [/*#__PURE__*/_jsx(View, {
|
|
50
34
|
className: "mb-space-16",
|
|
@@ -96,7 +80,40 @@ export const FileDetailsModal = ({
|
|
|
96
80
|
})]
|
|
97
81
|
})]
|
|
98
82
|
})]
|
|
99
|
-
})
|
|
83
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
84
|
+
style: {
|
|
85
|
+
gap: 8
|
|
86
|
+
},
|
|
87
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
88
|
+
variant: "primary",
|
|
89
|
+
onPress: () => {
|
|
90
|
+
surface.dismiss();
|
|
91
|
+
onDownload(file.id, file.filename);
|
|
92
|
+
},
|
|
93
|
+
children: t('fileManagement.details.download')
|
|
94
|
+
}), isOwner ? /*#__PURE__*/_jsx(Button, {
|
|
95
|
+
variant: "destructive",
|
|
96
|
+
onPress: () => {
|
|
97
|
+
surface.dismiss();
|
|
98
|
+
onDelete(file.id, file.filename);
|
|
99
|
+
},
|
|
100
|
+
children: t('common.actions.delete')
|
|
101
|
+
}) : null, /*#__PURE__*/_jsx(Button, {
|
|
102
|
+
variant: "secondary",
|
|
103
|
+
onPress: () => surface.dismiss(),
|
|
104
|
+
children: t('common.cancel')
|
|
105
|
+
})]
|
|
106
|
+
})]
|
|
100
107
|
});
|
|
101
108
|
};
|
|
109
|
+
|
|
110
|
+
/** Options accepted by {@link presentFileDetails} (everything but `surface`). */
|
|
111
|
+
|
|
112
|
+
/** Present the file-detail panel on the shared surface stack. */
|
|
113
|
+
export function presentFileDetails(options) {
|
|
114
|
+
void surfaces.present(surface => /*#__PURE__*/_jsx(FileDetailsModal, {
|
|
115
|
+
surface: surface,
|
|
116
|
+
...options
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
102
119
|
//# sourceMappingURL=FileDetailsModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","Text","Ionicons","
|
|
1
|
+
{"version":3,"names":["View","Text","Ionicons","Button","useTheme","surfaces","useI18n","formatFileSize","getFileIcon","jsx","_jsx","jsxs","_jsxs","FileDetailsModal","surface","file","onDownload","onDelete","isOwner","t","colors","children","className","name","contentType","size","color","primary","filename","length","Date","uploadDate","toLocaleString","metadata","description","style","gap","variant","onPress","dismiss","id","presentFileDetails","options","present"],"sourceRoot":"../../../../../src","sources":["ui/components/fileManagement/FileDetailsModal.tsx"],"mappings":";;AACA,SAASA,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,QAAQ,QAA8B,uBAAuB;AAEtE,SAASC,OAAO,QAAQ,wBAAqB;AAC7C,SAASC,cAAc,EAAEC,WAAW,QAAQ,+BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAWzE;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAiD,GAAGA,CAAC;EAC9DC,OAAO;EACPC,IAAI;EACJC,UAAU;EACVC,QAAQ;EACRC;AACJ,CAAC,KAAK;EACF,MAAM;IAAEC;EAAE,CAAC,GAAGb,OAAO,CAAC,CAAC;EACvB,MAAM;IAAEc;EAAO,CAAC,GAAGhB,QAAQ,CAAC,CAAC;EAE7B,oBACIQ,KAAA,CAACZ,IAAI;IAAAqB,QAAA,gBACDT,KAAA,CAACZ,IAAI;MAACsB,SAAS,EAAC,wEAAwE;MAAAD,QAAA,gBACpFX,IAAA,CAACV,IAAI;QAACsB,SAAS,EAAC,aAAa;QAAAD,QAAA,eACzBX,IAAA,CAACR,QAAQ;UACLqB,IAAI,EAAEf,WAAW,CAACO,IAAI,CAACS,WAAW,CAAE;UACpCC,IAAI,EAAE,EAAG;UACTC,KAAK,EAAEN,MAAM,CAACO;QAAQ,CACzB;MAAC,CACA,CAAC,eAEPjB,I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C;;AAED;;AAGA;AACA,OAAO,SAASsB,kBAAkBA,CAACC,OAAkC,EAAQ;EACzE,KAAKrC,QAAQ,CAACsC,OAAO,CAAE7B,OAAO,iBAC1BJ,IAAA,CAACG,gBAAgB;IAACC,OAAO,EAAEA,OAAQ;IAAA,GAAK4B;EAAO,CAAG,CACrD,CAAC;AACN","ignoreList":[]}
|
|
@@ -3,11 +3,19 @@
|
|
|
3
3
|
import { useState, useCallback } from 'react';
|
|
4
4
|
import { View, Text, TextInput } from 'react-native';
|
|
5
5
|
import { Ionicons } from '@expo/vector-icons';
|
|
6
|
-
import {
|
|
6
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
7
7
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
8
|
+
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
8
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
/**
|
|
11
|
+
* Delete-account confirmation — a rich presented surface (NOT a yes/no confirm):
|
|
12
|
+
* the user must retype their username, then the destructive action runs
|
|
13
|
+
* `onDelete`. On success the surface is dismissed with `true` (the presenter
|
|
14
|
+
* then signs out + closes); cancel dismisses with `false`. Presented via
|
|
15
|
+
* {@link presentDeleteAccount}.
|
|
16
|
+
*/
|
|
9
17
|
const DeleteAccountModal = ({
|
|
10
|
-
|
|
18
|
+
surface,
|
|
11
19
|
username,
|
|
12
20
|
onDelete,
|
|
13
21
|
t
|
|
@@ -23,32 +31,18 @@ const DeleteAccountModal = ({
|
|
|
23
31
|
setIsDeleting(true);
|
|
24
32
|
try {
|
|
25
33
|
await onDelete(confirmUsername);
|
|
26
|
-
|
|
34
|
+
surface.dismiss(true);
|
|
27
35
|
} catch (err) {
|
|
28
36
|
setError((err instanceof Error ? err.message : null) || t('deleteAccount.error') || 'Failed to delete account');
|
|
29
37
|
} finally {
|
|
30
38
|
setIsDeleting(false);
|
|
31
39
|
}
|
|
32
|
-
}, [isValid, confirmUsername, onDelete, t]);
|
|
33
|
-
const
|
|
40
|
+
}, [isValid, confirmUsername, onDelete, surface, t]);
|
|
41
|
+
const handleCancel = useCallback(() => {
|
|
34
42
|
if (isDeleting) return;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return /*#__PURE__*/_jsxs(Dialog, {
|
|
39
|
-
control: control,
|
|
40
|
-
onClose: handleCleanup,
|
|
41
|
-
label: "Delete Account",
|
|
42
|
-
actions: [{
|
|
43
|
-
label: t('deleteAccount.confirm') || 'Delete Forever',
|
|
44
|
-
color: 'destructive',
|
|
45
|
-
onPress: handleDelete,
|
|
46
|
-
disabled: !isValid || isDeleting,
|
|
47
|
-
shouldCloseOnPress: false
|
|
48
|
-
}, {
|
|
49
|
-
label: t('common.cancel') || 'Cancel',
|
|
50
|
-
color: 'cancel'
|
|
51
|
-
}],
|
|
43
|
+
surface.dismiss(false);
|
|
44
|
+
}, [isDeleting, surface]);
|
|
45
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
52
46
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
53
47
|
className: "flex-row items-center mb-4 gap-3",
|
|
54
48
|
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
@@ -87,7 +81,7 @@ const DeleteAccountModal = ({
|
|
|
87
81
|
}), /*#__PURE__*/_jsx(TextInput, {
|
|
88
82
|
className: "text-text bg-bg text-base py-3 px-4 border rounded-lg",
|
|
89
83
|
style: {
|
|
90
|
-
borderColor:
|
|
84
|
+
borderColor: isValid ? theme.colors.success : theme.colors.border
|
|
91
85
|
},
|
|
92
86
|
value: confirmUsername,
|
|
93
87
|
onChangeText: setConfirmUsername,
|
|
@@ -97,8 +91,37 @@ const DeleteAccountModal = ({
|
|
|
97
91
|
autoCorrect: false,
|
|
98
92
|
editable: !isDeleting
|
|
99
93
|
})]
|
|
94
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
95
|
+
style: {
|
|
96
|
+
gap: 8
|
|
97
|
+
},
|
|
98
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
99
|
+
variant: "destructive",
|
|
100
|
+
onPress: handleDelete,
|
|
101
|
+
disabled: !isValid || isDeleting,
|
|
102
|
+
loading: isDeleting,
|
|
103
|
+
children: t('deleteAccount.confirm') || 'Delete Forever'
|
|
104
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
105
|
+
variant: "secondary",
|
|
106
|
+
onPress: handleCancel,
|
|
107
|
+
disabled: isDeleting,
|
|
108
|
+
children: t('common.cancel') || 'Cancel'
|
|
109
|
+
})]
|
|
100
110
|
})]
|
|
101
111
|
});
|
|
102
112
|
};
|
|
113
|
+
|
|
114
|
+
/** Options accepted by {@link presentDeleteAccount} (everything but `surface`). */
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Present the delete-account confirmation on the shared surface stack. Resolves
|
|
118
|
+
* `true` once the account is deleted, `false` if cancelled/dismissed.
|
|
119
|
+
*/
|
|
120
|
+
export function presentDeleteAccount(options) {
|
|
121
|
+
return surfaces.present(surface => /*#__PURE__*/_jsx(DeleteAccountModal, {
|
|
122
|
+
surface: surface,
|
|
123
|
+
...options
|
|
124
|
+
})).then(result => result === true);
|
|
125
|
+
}
|
|
103
126
|
export default DeleteAccountModal;
|
|
104
127
|
//# sourceMappingURL=DeleteAccountModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useState","useCallback","View","Text","TextInput","Ionicons","
|
|
1
|
+
{"version":3,"names":["useState","useCallback","View","Text","TextInput","Ionicons","Button","useTheme","surfaces","jsx","_jsx","jsxs","_jsxs","DeleteAccountModal","surface","username","onDelete","t","theme","confirmUsername","setConfirmUsername","isDeleting","setIsDeleting","error","setError","isValid","handleDelete","dismiss","err","Error","message","handleCancel","children","className","name","size","color","colors","style","backgroundColor","borderColor","success","border","value","onChangeText","placeholder","placeholderTextColor","textSecondary","autoCapitalize","autoCorrect","editable","gap","variant","onPress","disabled","loading","presentDeleteAccount","options","present","then","result"],"sourceRoot":"../../../../../src","sources":["ui/components/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ACL,CAAC;AAEf,CAAC;;AAED;;AAGA;AACA;AACA;AACA;AACA,OAAO,SAASuC,oBAAoBA,CAACC,OAAoC,EAAoB;EACzF,OAAOjD,QAAQ,CACVkD,OAAO,CAAW5C,OAAO,iBAAKJ,IAAA,CAACG,kBAAkB;IAACC,OAAO,EAAEA,OAAQ;IAAA,GAAK2C;EAAO,CAAG,CAAC,CAAC,CACpFE,IAAI,CAAEC,MAAM,IAAKA,MAAM,KAAK,IAAI,CAAC;AAC1C;AAEA,eAAe/C,kBAAkB","ignoreList":[]}
|
|
@@ -6,7 +6,7 @@ import { StyleSheet } from 'react-native';
|
|
|
6
6
|
const QR_PLATE_BG = '#FFFFFF';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Shared styles for `OxyAuthChooser`'s views. Extracted from `
|
|
9
|
+
* Shared styles for `OxyAuthChooser`'s views. Extracted from `OxyAccountDialogScreen`
|
|
10
10
|
* so both the Dialog-wrapped host and any bare host (e.g. a future
|
|
11
11
|
* auth.oxy.so hub page) render identically without duplicating a StyleSheet.
|
|
12
12
|
*/
|
|
@@ -44,28 +44,90 @@ export const authChooserStyles = StyleSheet.create({
|
|
|
44
44
|
fontSize: 12.5,
|
|
45
45
|
marginTop: 1
|
|
46
46
|
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
paddingHorizontal: 12,
|
|
56
|
-
marginTop: 8
|
|
47
|
+
/**
|
|
48
|
+
* Animated-collapse container for the account switch list — the outer clip and
|
|
49
|
+
* the inner measuring wrapper. Style-based (NOT NativeWind): the container
|
|
50
|
+
* carries the animated `height`/`opacity` off a reanimated style, and the
|
|
51
|
+
* measuring wrapper must stay className-free so its `onLayout` fires on RN-Web.
|
|
52
|
+
*/
|
|
53
|
+
collapse: {
|
|
54
|
+
overflow: 'hidden'
|
|
57
55
|
},
|
|
58
|
-
|
|
59
|
-
width:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
collapseMeasure: {
|
|
57
|
+
width: '100%'
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* The HERO block that opens the account menu: the current account's large
|
|
61
|
+
* avatar, a greeting, and the "Manage your Oxy account" pill — centred and
|
|
62
|
+
* deliberately chrome-free (no card, no grouped-section surface) so the
|
|
63
|
+
* grouped cards below read as the menu proper. The account's email sits above
|
|
64
|
+
* it in the Dialog's own nav bar, not here.
|
|
65
|
+
*/
|
|
66
|
+
hero: {
|
|
63
67
|
alignItems: 'center',
|
|
64
|
-
|
|
68
|
+
paddingTop: 4,
|
|
69
|
+
paddingBottom: 20,
|
|
70
|
+
gap: 12
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* The current account's accent ring in the switch list, drawn OUTSIDE its
|
|
74
|
+
* avatar as an overlay so it adds no width to the row — every avatar in the
|
|
75
|
+
* list keeps the same footprint and the same content line. The 3px offset is
|
|
76
|
+
* the ring's 2px stroke plus a 1px gap.
|
|
77
|
+
*/
|
|
78
|
+
currentAvatarRing: {
|
|
79
|
+
position: 'absolute',
|
|
80
|
+
top: -3,
|
|
81
|
+
left: -3,
|
|
82
|
+
right: -3,
|
|
83
|
+
bottom: -3,
|
|
84
|
+
borderWidth: 2,
|
|
85
|
+
borderRadius: 9999
|
|
86
|
+
},
|
|
87
|
+
/**
|
|
88
|
+
* The hero avatar's pressable wrapper — the "change your photo" entry point.
|
|
89
|
+
* `relative` so the accent ring + camera badge (both absolutely positioned)
|
|
90
|
+
* anchor to the avatar box.
|
|
91
|
+
*/
|
|
92
|
+
heroAvatarPressable: {
|
|
93
|
+
position: 'relative'
|
|
94
|
+
},
|
|
95
|
+
/** The hero avatar's accent ring — an overlay, like the row-level one. */
|
|
96
|
+
heroAvatarRing: {
|
|
97
|
+
position: 'absolute',
|
|
98
|
+
top: -4,
|
|
99
|
+
left: -4,
|
|
100
|
+
right: -4,
|
|
101
|
+
bottom: -4,
|
|
102
|
+
borderWidth: 3,
|
|
103
|
+
borderRadius: 9999
|
|
104
|
+
},
|
|
105
|
+
/** Greeting + address stacked tight, centred (the hero's own 12px gap sits
|
|
106
|
+
* between this block and the avatar / manage pill, not between these lines). */
|
|
107
|
+
heroNameBlock: {
|
|
108
|
+
alignItems: 'center',
|
|
109
|
+
gap: 2
|
|
110
|
+
},
|
|
111
|
+
heroGreeting: {
|
|
112
|
+
fontSize: 22,
|
|
113
|
+
fontWeight: '600',
|
|
114
|
+
textAlign: 'center'
|
|
65
115
|
},
|
|
66
|
-
|
|
116
|
+
/** The account address (`username@oxy.so` / `@handle`) under the greeting. */
|
|
117
|
+
heroAddress: {
|
|
118
|
+
fontSize: 14,
|
|
119
|
+
textAlign: 'center'
|
|
120
|
+
},
|
|
121
|
+
/**
|
|
122
|
+
* The switch row's disclosure affordance — a filled circle around the chevron,
|
|
123
|
+
* right-aligned to the same 12px row inset every other trailing element uses.
|
|
124
|
+
*/
|
|
125
|
+
chevronCircle: {
|
|
126
|
+
width: 32,
|
|
127
|
+
height: 32,
|
|
128
|
+
borderRadius: 16,
|
|
67
129
|
alignItems: 'center',
|
|
68
|
-
|
|
130
|
+
justifyContent: 'center'
|
|
69
131
|
},
|
|
70
132
|
footerLink: {
|
|
71
133
|
alignSelf: 'center',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","QR_PLATE_BG","authChooserStyles","create","rows","width","gap","accountRow","flexDirection","alignItems","borderWidth","hairlineWidth","borderRadius","paddingVertical","paddingHorizontal","rowDisabled","opacity","avatarRing","padding","rowMeta","flex","minWidth","rowName","fontSize","fontWeight","rowHandle","marginTop","
|
|
1
|
+
{"version":3,"names":["StyleSheet","QR_PLATE_BG","authChooserStyles","create","rows","width","gap","accountRow","flexDirection","alignItems","borderWidth","hairlineWidth","borderRadius","paddingVertical","paddingHorizontal","rowDisabled","opacity","avatarRing","padding","rowMeta","flex","minWidth","rowName","fontSize","fontWeight","rowHandle","marginTop","collapse","overflow","collapseMeasure","hero","paddingTop","paddingBottom","currentAvatarRing","position","top","left","right","bottom","heroAvatarPressable","heroAvatarRing","heroNameBlock","heroGreeting","textAlign","heroAddress","chevronCircle","height","justifyContent","footerLink","alignSelf","linkText","signInBlock","primaryButton","secondaryButton","usernameInput","dividerRow","marginVertical","dividerLine","dividerText","marginHorizontal","centeredBlock","mutedText","qrHeadline","qrPlate","backgroundColor"],"sourceRoot":"../../../../src","sources":["ui/components/oxyAuthChooserStyles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;;AAEzC;AACA,MAAMC,WAAW,GAAG,SAAS;;AAE7B;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGF,UAAU,CAACG,MAAM,CAAC;EACjDC,IAAI,EAAE;IACJC,KAAK,EAAE,MAAM;IACbC,GAAG,EAAE;EACP,CAAC;EACDC,UAAU,EAAE;IACVC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBH,GAAG,EAAE,EAAE;IACPI,WAAW,EAAEV,UAAU,CAACW,aAAa;IACrCC,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE;EACrB,CAAC;EACDC,WAAW,EAAE;IACXC,OAAO,EAAE;EACX,CAAC;EACDC,UAAU,EAAE;IACVL,YAAY,EAAE,IAAI;IAClBF,WAAW,EAAE,CAAC;IACdQ,OAAO,EAAE;EACX,CAAC;EACDC,OAAO,EAAE;IACPC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE;EACZ,CAAC;EACDC,OAAO,EAAE;IACPC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDC,SAAS,EAAE;IACTF,QAAQ,EAAE,IAAI;IACdG,SAAS,EAAE;EACb,CAAC;EACD;AACF;AACA;AACA;AACA;AACA;EACEC,QAAQ,EAAE;IACRC,QAAQ,EAAE;EACZ,CAAC;EACDC,eAAe,EAAE;IACfxB,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;IACXN,YAAY,EAAE,EAAE;IAChBoD,eAAe,EAAE/D;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,17 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React, {
|
|
4
|
-
import { View, Text, useWindowDimensions } from 'react-native';
|
|
3
|
+
import React, { useMemo, useState, useCallback } from 'react';
|
|
4
|
+
import { View, Text, Image, useWindowDimensions } from 'react-native';
|
|
5
|
+
import { useQuery, keepPreviousData } from '@tanstack/react-query';
|
|
5
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
/** Stable empty map so an unresolved query yields a referentially-stable value. */
|
|
8
|
+
const EMPTY_DIMENSIONS = {};
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Measure the intrinsic size of every photo whose thumbnail URL has resolved,
|
|
12
|
+
* via `Image.getSize`. Pure/async (no React state) so it can be a React Query
|
|
13
|
+
* `queryFn`. Photos without a resolved URL are skipped and re-measured on the
|
|
14
|
+
* next signature change; a load error falls back to 1×1 (→ the 4/3 default).
|
|
15
|
+
*/
|
|
16
|
+
async function measurePhotoDimensions(photos, getThumbUrl) {
|
|
17
|
+
const measured = {};
|
|
18
|
+
await Promise.all(photos.map(photo => new Promise(resolve => {
|
|
19
|
+
const url = getThumbUrl(photo);
|
|
20
|
+
if (!url) {
|
|
21
|
+
resolve();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
Image.getSize(url, (width, height) => {
|
|
25
|
+
measured[photo.id] = {
|
|
26
|
+
width,
|
|
27
|
+
height
|
|
28
|
+
};
|
|
29
|
+
resolve();
|
|
30
|
+
}, () => {
|
|
31
|
+
measured[photo.id] = {
|
|
32
|
+
width: 1,
|
|
33
|
+
height: 1
|
|
34
|
+
};
|
|
35
|
+
resolve();
|
|
36
|
+
});
|
|
37
|
+
})));
|
|
38
|
+
return measured;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Fixed photos-per-row for the justified grid (Apple Photos-style trio). */
|
|
42
|
+
export const PHOTOS_PER_ROW = 3;
|
|
43
|
+
|
|
44
|
+
/** Chunk a photo list into fixed-length rows (last row may be short). */
|
|
45
|
+
export function chunkPhotos(photos, perRow) {
|
|
46
|
+
const rows = [];
|
|
47
|
+
for (let i = 0; i < photos.length; i += perRow) {
|
|
48
|
+
rows.push(photos.slice(i, i + perRow));
|
|
49
|
+
}
|
|
50
|
+
return rows;
|
|
51
|
+
}
|
|
6
52
|
/**
|
|
7
53
|
* Responsive justified photo grid that stretches to the provided containerWidth.
|
|
8
54
|
* Uses flex rows with proportional children widths instead of absolute pixel widths so it always fills.
|
|
55
|
+
*
|
|
56
|
+
* Owns its own intrinsic-dimension measurement: it calls `Image.getSize` on each
|
|
57
|
+
* photo's resolved thumbnail URL and reflows once real aspect ratios are known
|
|
58
|
+
* (falling back to 4/3 until then). Measurement re-runs whenever a photo is added
|
|
59
|
+
* OR its (asynchronously-resolved) private-safe URL first appears.
|
|
9
60
|
*/
|
|
10
61
|
const JustifiedPhotoGrid = ({
|
|
11
62
|
photos,
|
|
12
|
-
|
|
13
|
-
loadPhotoDimensions,
|
|
14
|
-
createJustifiedRows,
|
|
63
|
+
getThumbUrl,
|
|
15
64
|
renderJustifiedPhotoItem,
|
|
16
65
|
textColor,
|
|
17
66
|
containerWidth: explicitWidth,
|
|
@@ -35,11 +84,24 @@ const JustifiedPhotoGrid = ({
|
|
|
35
84
|
const w = e.nativeEvent.layout.width;
|
|
36
85
|
setMeasuredWidth(prev => prev === w ? prev : w);
|
|
37
86
|
}, [resolvedExplicitWidth]);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
87
|
+
|
|
88
|
+
// Signature of every photo id + its currently-resolved URL — the measurement
|
|
89
|
+
// query key. A private tile's URL resolves asynchronously after it enters the
|
|
90
|
+
// list, so keying on THIS (not just the photo set) re-measures the moment a
|
|
91
|
+
// URL lands, not just when photos are added.
|
|
92
|
+
const urlSignature = useMemo(() => photos.map(p => `${p.id}:${getThumbUrl(p) ?? ''}`).join('|'), [photos, getThumbUrl]);
|
|
93
|
+
|
|
94
|
+
// Intrinsic dimensions via React Query (no effect): re-runs when the signature
|
|
95
|
+
// changes and reflows the justified rows. `keepPreviousData` holds the last
|
|
96
|
+
// measured map during a re-measure so tiles never flash back to the 4/3 default.
|
|
97
|
+
const dimensionsQuery = useQuery({
|
|
98
|
+
queryKey: ['justifiedPhotoDimensions', urlSignature],
|
|
99
|
+
queryFn: () => measurePhotoDimensions(photos, getThumbUrl),
|
|
100
|
+
placeholderData: keepPreviousData,
|
|
101
|
+
staleTime: Number.POSITIVE_INFINITY,
|
|
102
|
+
gcTime: 5 * 60 * 1000
|
|
103
|
+
});
|
|
104
|
+
const photoDimensions = dimensionsQuery.data ?? EMPTY_DIMENSIONS;
|
|
43
105
|
|
|
44
106
|
// Group photos by date first
|
|
45
107
|
const photosByDate = useMemo(() => {
|
|
@@ -67,10 +129,9 @@ const JustifiedPhotoGrid = ({
|
|
|
67
129
|
onLayout: onLayoutContainer,
|
|
68
130
|
children: sortedDates.map(date => {
|
|
69
131
|
const dayPhotos = photosByDate[date];
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
const rows = dateWidth > 0 ? createJustifiedRows(dayPhotos, dateWidth) : [];
|
|
132
|
+
// Fall back to the overall width until this section is measured.
|
|
133
|
+
const dateWidth = dateWidths[date] ?? effectiveWidth;
|
|
134
|
+
const rows = dateWidth > 0 ? chunkPhotos(dayPhotos, PHOTOS_PER_ROW) : [];
|
|
74
135
|
return /*#__PURE__*/_jsxs(View, {
|
|
75
136
|
style: {
|
|
76
137
|
marginBottom: 24,
|
|
@@ -95,7 +156,7 @@ const JustifiedPhotoGrid = ({
|
|
|
95
156
|
width: '100%'
|
|
96
157
|
},
|
|
97
158
|
children: rows.map((row, rowIndex) => {
|
|
98
|
-
//
|
|
159
|
+
// Total aspect ratio of the row, using measured dims (fallback 4/3).
|
|
99
160
|
const aspects = row.map(p => {
|
|
100
161
|
const dims = photoDimensions[p.id];
|
|
101
162
|
return dims ? dims.width / dims.height : 4 / 3;
|
|
@@ -103,32 +164,29 @@ const JustifiedPhotoGrid = ({
|
|
|
103
164
|
const totalAspect = aspects.reduce((a, b) => a + b, 0);
|
|
104
165
|
const gapsTotal = gap * (row.length - 1);
|
|
105
166
|
const availableWidth = dateWidth - gapsTotal;
|
|
106
|
-
// Ideal height that perfectly fills width when preserving aspect ratios
|
|
167
|
+
// Ideal height that perfectly fills width when preserving aspect ratios.
|
|
107
168
|
const idealHeight = availableWidth / totalAspect;
|
|
108
|
-
//
|
|
169
|
+
// Clamp to min/max, then distribute the leftover/overflow proportionally.
|
|
109
170
|
let rowHeight = idealHeight;
|
|
110
|
-
let widthAdjustment = 0;
|
|
171
|
+
let widthAdjustment = 0;
|
|
111
172
|
if (idealHeight < minRowHeight) {
|
|
112
173
|
rowHeight = minRowHeight;
|
|
113
|
-
widthAdjustment = availableWidth - rowHeight * totalAspect;
|
|
174
|
+
widthAdjustment = availableWidth - rowHeight * totalAspect;
|
|
114
175
|
} else if (idealHeight > maxRowHeight) {
|
|
115
176
|
rowHeight = maxRowHeight;
|
|
116
177
|
widthAdjustment = availableWidth - rowHeight * totalAspect;
|
|
117
178
|
}
|
|
118
|
-
|
|
119
|
-
// Pre-compute widths maintaining aspect ratios
|
|
120
179
|
let widths = aspects.map(ar => ar * rowHeight);
|
|
121
|
-
// If we have widthAdjustment (due to clamping) distribute proportionally so row still fills exactly
|
|
122
180
|
if (widthAdjustment !== 0) {
|
|
123
181
|
const widthSum = widths.reduce((a, b) => a + b, 0);
|
|
124
182
|
widths = widths.map(w => w + w / widthSum * widthAdjustment);
|
|
125
183
|
}
|
|
126
184
|
|
|
127
|
-
//
|
|
185
|
+
// Correct any rounding drift on the last tile so the row fills exactly.
|
|
128
186
|
const widthSumRounded = widths.reduce((a, b) => a + b, 0);
|
|
129
187
|
const roundingDiff = availableWidth - widthSumRounded;
|
|
130
188
|
if (Math.abs(roundingDiff) > 0.5) {
|
|
131
|
-
widths[widths.length - 1] += roundingDiff;
|
|
189
|
+
widths[widths.length - 1] += roundingDiff;
|
|
132
190
|
}
|
|
133
191
|
return /*#__PURE__*/_jsx(View, {
|
|
134
192
|
style: {
|
|
@@ -147,7 +205,7 @@ const JustifiedPhotoGrid = ({
|
|
|
147
205
|
children: renderJustifiedPhotoItem(p, photoWidth, rowHeight, i === row.length - 1)
|
|
148
206
|
}, p.id);
|
|
149
207
|
})
|
|
150
|
-
}, rowIndex);
|
|
208
|
+
}, row[0]?.id ?? rowIndex);
|
|
151
209
|
})
|
|
152
210
|
})]
|
|
153
211
|
}, date);
|