@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
|
@@ -3,20 +3,71 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.PHOTOS_PER_ROW = void 0;
|
|
7
|
+
exports.chunkPhotos = chunkPhotos;
|
|
6
8
|
exports.default = void 0;
|
|
7
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
10
|
var _reactNative = require("react-native");
|
|
11
|
+
var _reactQuery = require("@tanstack/react-query");
|
|
9
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
13
|
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); }
|
|
14
|
+
/** Stable empty map so an unresolved query yields a referentially-stable value. */
|
|
15
|
+
const EMPTY_DIMENSIONS = {};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Measure the intrinsic size of every photo whose thumbnail URL has resolved,
|
|
19
|
+
* via `Image.getSize`. Pure/async (no React state) so it can be a React Query
|
|
20
|
+
* `queryFn`. Photos without a resolved URL are skipped and re-measured on the
|
|
21
|
+
* next signature change; a load error falls back to 1×1 (→ the 4/3 default).
|
|
22
|
+
*/
|
|
23
|
+
async function measurePhotoDimensions(photos, getThumbUrl) {
|
|
24
|
+
const measured = {};
|
|
25
|
+
await Promise.all(photos.map(photo => new Promise(resolve => {
|
|
26
|
+
const url = getThumbUrl(photo);
|
|
27
|
+
if (!url) {
|
|
28
|
+
resolve();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
_reactNative.Image.getSize(url, (width, height) => {
|
|
32
|
+
measured[photo.id] = {
|
|
33
|
+
width,
|
|
34
|
+
height
|
|
35
|
+
};
|
|
36
|
+
resolve();
|
|
37
|
+
}, () => {
|
|
38
|
+
measured[photo.id] = {
|
|
39
|
+
width: 1,
|
|
40
|
+
height: 1
|
|
41
|
+
};
|
|
42
|
+
resolve();
|
|
43
|
+
});
|
|
44
|
+
})));
|
|
45
|
+
return measured;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Fixed photos-per-row for the justified grid (Apple Photos-style trio). */
|
|
49
|
+
const PHOTOS_PER_ROW = exports.PHOTOS_PER_ROW = 3;
|
|
50
|
+
|
|
51
|
+
/** Chunk a photo list into fixed-length rows (last row may be short). */
|
|
52
|
+
function chunkPhotos(photos, perRow) {
|
|
53
|
+
const rows = [];
|
|
54
|
+
for (let i = 0; i < photos.length; i += perRow) {
|
|
55
|
+
rows.push(photos.slice(i, i + perRow));
|
|
56
|
+
}
|
|
57
|
+
return rows;
|
|
58
|
+
}
|
|
11
59
|
/**
|
|
12
60
|
* Responsive justified photo grid that stretches to the provided containerWidth.
|
|
13
61
|
* Uses flex rows with proportional children widths instead of absolute pixel widths so it always fills.
|
|
62
|
+
*
|
|
63
|
+
* Owns its own intrinsic-dimension measurement: it calls `Image.getSize` on each
|
|
64
|
+
* photo's resolved thumbnail URL and reflows once real aspect ratios are known
|
|
65
|
+
* (falling back to 4/3 until then). Measurement re-runs whenever a photo is added
|
|
66
|
+
* OR its (asynchronously-resolved) private-safe URL first appears.
|
|
14
67
|
*/
|
|
15
68
|
const JustifiedPhotoGrid = ({
|
|
16
69
|
photos,
|
|
17
|
-
|
|
18
|
-
loadPhotoDimensions,
|
|
19
|
-
createJustifiedRows,
|
|
70
|
+
getThumbUrl,
|
|
20
71
|
renderJustifiedPhotoItem,
|
|
21
72
|
textColor,
|
|
22
73
|
containerWidth: explicitWidth,
|
|
@@ -40,11 +91,24 @@ const JustifiedPhotoGrid = ({
|
|
|
40
91
|
const w = e.nativeEvent.layout.width;
|
|
41
92
|
setMeasuredWidth(prev => prev === w ? prev : w);
|
|
42
93
|
}, [resolvedExplicitWidth]);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
94
|
+
|
|
95
|
+
// Signature of every photo id + its currently-resolved URL — the measurement
|
|
96
|
+
// query key. A private tile's URL resolves asynchronously after it enters the
|
|
97
|
+
// list, so keying on THIS (not just the photo set) re-measures the moment a
|
|
98
|
+
// URL lands, not just when photos are added.
|
|
99
|
+
const urlSignature = (0, _react.useMemo)(() => photos.map(p => `${p.id}:${getThumbUrl(p) ?? ''}`).join('|'), [photos, getThumbUrl]);
|
|
100
|
+
|
|
101
|
+
// Intrinsic dimensions via React Query (no effect): re-runs when the signature
|
|
102
|
+
// changes and reflows the justified rows. `keepPreviousData` holds the last
|
|
103
|
+
// measured map during a re-measure so tiles never flash back to the 4/3 default.
|
|
104
|
+
const dimensionsQuery = (0, _reactQuery.useQuery)({
|
|
105
|
+
queryKey: ['justifiedPhotoDimensions', urlSignature],
|
|
106
|
+
queryFn: () => measurePhotoDimensions(photos, getThumbUrl),
|
|
107
|
+
placeholderData: _reactQuery.keepPreviousData,
|
|
108
|
+
staleTime: Number.POSITIVE_INFINITY,
|
|
109
|
+
gcTime: 5 * 60 * 1000
|
|
110
|
+
});
|
|
111
|
+
const photoDimensions = dimensionsQuery.data ?? EMPTY_DIMENSIONS;
|
|
48
112
|
|
|
49
113
|
// Group photos by date first
|
|
50
114
|
const photosByDate = (0, _react.useMemo)(() => {
|
|
@@ -72,10 +136,9 @@ const JustifiedPhotoGrid = ({
|
|
|
72
136
|
onLayout: onLayoutContainer,
|
|
73
137
|
children: sortedDates.map(date => {
|
|
74
138
|
const dayPhotos = photosByDate[date];
|
|
75
|
-
//
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
const rows = dateWidth > 0 ? createJustifiedRows(dayPhotos, dateWidth) : [];
|
|
139
|
+
// Fall back to the overall width until this section is measured.
|
|
140
|
+
const dateWidth = dateWidths[date] ?? effectiveWidth;
|
|
141
|
+
const rows = dateWidth > 0 ? chunkPhotos(dayPhotos, PHOTOS_PER_ROW) : [];
|
|
79
142
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
80
143
|
style: {
|
|
81
144
|
marginBottom: 24,
|
|
@@ -100,7 +163,7 @@ const JustifiedPhotoGrid = ({
|
|
|
100
163
|
width: '100%'
|
|
101
164
|
},
|
|
102
165
|
children: rows.map((row, rowIndex) => {
|
|
103
|
-
//
|
|
166
|
+
// Total aspect ratio of the row, using measured dims (fallback 4/3).
|
|
104
167
|
const aspects = row.map(p => {
|
|
105
168
|
const dims = photoDimensions[p.id];
|
|
106
169
|
return dims ? dims.width / dims.height : 4 / 3;
|
|
@@ -108,32 +171,29 @@ const JustifiedPhotoGrid = ({
|
|
|
108
171
|
const totalAspect = aspects.reduce((a, b) => a + b, 0);
|
|
109
172
|
const gapsTotal = gap * (row.length - 1);
|
|
110
173
|
const availableWidth = dateWidth - gapsTotal;
|
|
111
|
-
// Ideal height that perfectly fills width when preserving aspect ratios
|
|
174
|
+
// Ideal height that perfectly fills width when preserving aspect ratios.
|
|
112
175
|
const idealHeight = availableWidth / totalAspect;
|
|
113
|
-
//
|
|
176
|
+
// Clamp to min/max, then distribute the leftover/overflow proportionally.
|
|
114
177
|
let rowHeight = idealHeight;
|
|
115
|
-
let widthAdjustment = 0;
|
|
178
|
+
let widthAdjustment = 0;
|
|
116
179
|
if (idealHeight < minRowHeight) {
|
|
117
180
|
rowHeight = minRowHeight;
|
|
118
|
-
widthAdjustment = availableWidth - rowHeight * totalAspect;
|
|
181
|
+
widthAdjustment = availableWidth - rowHeight * totalAspect;
|
|
119
182
|
} else if (idealHeight > maxRowHeight) {
|
|
120
183
|
rowHeight = maxRowHeight;
|
|
121
184
|
widthAdjustment = availableWidth - rowHeight * totalAspect;
|
|
122
185
|
}
|
|
123
|
-
|
|
124
|
-
// Pre-compute widths maintaining aspect ratios
|
|
125
186
|
let widths = aspects.map(ar => ar * rowHeight);
|
|
126
|
-
// If we have widthAdjustment (due to clamping) distribute proportionally so row still fills exactly
|
|
127
187
|
if (widthAdjustment !== 0) {
|
|
128
188
|
const widthSum = widths.reduce((a, b) => a + b, 0);
|
|
129
189
|
widths = widths.map(w => w + w / widthSum * widthAdjustment);
|
|
130
190
|
}
|
|
131
191
|
|
|
132
|
-
//
|
|
192
|
+
// Correct any rounding drift on the last tile so the row fills exactly.
|
|
133
193
|
const widthSumRounded = widths.reduce((a, b) => a + b, 0);
|
|
134
194
|
const roundingDiff = availableWidth - widthSumRounded;
|
|
135
195
|
if (Math.abs(roundingDiff) > 0.5) {
|
|
136
|
-
widths[widths.length - 1] += roundingDiff;
|
|
196
|
+
widths[widths.length - 1] += roundingDiff;
|
|
137
197
|
}
|
|
138
198
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
139
199
|
style: {
|
|
@@ -152,7 +212,7 @@ const JustifiedPhotoGrid = ({
|
|
|
152
212
|
children: renderJustifiedPhotoItem(p, photoWidth, rowHeight, i === row.length - 1)
|
|
153
213
|
}, p.id);
|
|
154
214
|
})
|
|
155
|
-
}, rowIndex);
|
|
215
|
+
}, row[0]?.id ?? rowIndex);
|
|
156
216
|
})
|
|
157
217
|
})]
|
|
158
218
|
}, date);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactQuery","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EMPTY_DIMENSIONS","measurePhotoDimensions","photos","getThumbUrl","measured","Promise","all","map","photo","resolve","url","Image","getSize","width","height","id","PHOTOS_PER_ROW","exports","chunkPhotos","perRow","rows","length","push","slice","JustifiedPhotoGrid","renderJustifiedPhotoItem","textColor","containerWidth","explicitWidth","gap","minRowHeight","maxRowHeight","dateFormatLocale","windowWidth","useWindowDimensions","measuredWidth","setMeasuredWidth","useState","resolvedExplicitWidth","resolvedMeasuredWidth","effectiveWidth","onLayoutContainer","useCallback","w","nativeEvent","layout","prev","urlSignature","useMemo","p","join","dimensionsQuery","useQuery","queryKey","queryFn","placeholderData","keepPreviousData","staleTime","Number","POSITIVE_INFINITY","gcTime","photoDimensions","data","photosByDate","reduce","groups","date","Date","uploadDate","toDateString","sortedDates","keys","sort","a","b","getTime","dateWidths","setDateWidths","onLayoutDate","jsx","View","style","onLayout","children","dayPhotos","dateWidth","jsxs","marginBottom","Text","fontSize","fontWeight","color","toLocaleDateString","weekday","year","month","day","row","rowIndex","aspects","dims","totalAspect","gapsTotal","availableWidth","idealHeight","rowHeight","widthAdjustment","widths","ar","widthSum","widthSumRounded","roundingDiff","Math","abs","flexDirection","photoWidth","marginRight","_default","React","memo"],"sourceRoot":"../../../../../src","sources":["ui/components/photogrid/JustifiedPhotoGrid.tsx"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAAmE,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAA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AY,EAAE;cAAE,CAAE;cAAAJ,QAAA,EAC9Fc,GAAG,CAAC1F,GAAG,CAAC,CAAC0C,CAAC,EAAE7D,CAAC,KAAK;gBACf,MAAM+H,UAAU,GAAGR,MAAM,CAACvH,CAAC,CAAC;gBAC5B,oBACI,IAAAR,WAAA,CAAAmG,GAAA,EAACrG,YAAA,CAAAsG,IAAI;kBAEDC,KAAK,EAAE;oBAAEpE,KAAK,EAAEsG,UAAU;oBAAErG,MAAM,EAAE2F,SAAS;oBAAEW,WAAW,EAAEhI,CAAC,KAAK6G,GAAG,CAAC5E,MAAM,GAAG,CAAC,GAAG,CAAC,GAAGQ;kBAAI,CAAE;kBAAAsD,QAAA,EAE5F1D,wBAAwB,CAACwB,CAAC,EAAEkE,UAAU,EAAEV,SAAS,EAAErH,CAAC,KAAK6G,GAAG,CAAC5E,MAAM,GAAG,CAAC;gBAAC,GAHpE4B,CAAC,CAAClC,EAIL,CAAC;cAEf,CAAC;YAAC,GAXKkF,GAAG,CAAC,CAAC,CAAC,EAAElF,EAAE,IAAImF,QAYnB,CAAC;UAEf,CAAC;QAAC,CACA,CAAC;MAAA,GA3DFhC,IA4DH,CAAC;IAEf,CAAC;EAAC,CACA,CAAC;AAEf,CAAC;AAAC,IAAAmD,QAAA,GAAApG,OAAA,CAAA1B,OAAA,gBAEa+H,cAAK,CAACC,IAAI,CAAC/F,kBAAkB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ActionSheetSurface = ActionSheetSurface;
|
|
7
|
+
exports.presentActionSheet = presentActionSheet;
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _button = require("@oxyhq/bloom/button");
|
|
10
|
+
var _theme = require("@oxyhq/bloom/theme");
|
|
11
|
+
var _surfaces = require("@oxyhq/bloom/surfaces");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
/**
|
|
14
|
+
* A single choice in an {@link ActionSheetSurface} — a labelled button that
|
|
15
|
+
* resolves the surface with `value` when pressed.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const TITLE_STYLE = {
|
|
19
|
+
fontSize: 22,
|
|
20
|
+
fontWeight: '600',
|
|
21
|
+
lineHeight: 30
|
|
22
|
+
};
|
|
23
|
+
const MESSAGE_STYLE = {
|
|
24
|
+
fontSize: 16,
|
|
25
|
+
lineHeight: 22
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* A multi-choice action sheet rendered as a shared-stack surface — the
|
|
30
|
+
* many-option counterpart to Bloom's two-way `surfaces.confirm`. Each option
|
|
31
|
+
* button resolves the surface's `present()` promise with that option's `value`;
|
|
32
|
+
* cancel / backdrop / Escape resolve `undefined`. Presented via
|
|
33
|
+
* {@link presentActionSheet}.
|
|
34
|
+
*/
|
|
35
|
+
function ActionSheetSurface({
|
|
36
|
+
surface,
|
|
37
|
+
title,
|
|
38
|
+
message,
|
|
39
|
+
options,
|
|
40
|
+
cancelLabel
|
|
41
|
+
}) {
|
|
42
|
+
const theme = (0, _theme.useTheme)();
|
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
44
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
45
|
+
style: [TITLE_STYLE, {
|
|
46
|
+
color: theme.colors.text,
|
|
47
|
+
paddingBottom: message ? 4 : 16
|
|
48
|
+
}],
|
|
49
|
+
children: title
|
|
50
|
+
}), message ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
51
|
+
style: [MESSAGE_STYLE, {
|
|
52
|
+
color: theme.colors.textSecondary,
|
|
53
|
+
paddingBottom: 16
|
|
54
|
+
}],
|
|
55
|
+
children: message
|
|
56
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
57
|
+
style: {
|
|
58
|
+
gap: 8
|
|
59
|
+
},
|
|
60
|
+
children: [options.map(option => /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
61
|
+
variant: option.destructive ? 'destructive' : 'primary',
|
|
62
|
+
onPress: () => surface.dismiss(option.value),
|
|
63
|
+
children: option.label
|
|
64
|
+
}, option.value)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
65
|
+
variant: "secondary",
|
|
66
|
+
onPress: () => surface.dismiss(undefined),
|
|
67
|
+
children: cancelLabel
|
|
68
|
+
})]
|
|
69
|
+
})]
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Present an {@link ActionSheetSurface} on the shared stack and resolve with the
|
|
75
|
+
* chosen option `value`, or `undefined` if cancelled/dismissed.
|
|
76
|
+
*/
|
|
77
|
+
function presentActionSheet(options) {
|
|
78
|
+
return _surfaces.surfaces.present(surface => /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionSheetSurface, {
|
|
79
|
+
surface: surface,
|
|
80
|
+
...options
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=ActionSheetSurface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_button","_theme","_surfaces","_jsxRuntime","TITLE_STYLE","fontSize","fontWeight","lineHeight","MESSAGE_STYLE","ActionSheetSurface","surface","title","message","options","cancelLabel","theme","useTheme","jsxs","View","children","jsx","Text","style","color","colors","text","paddingBottom","textSecondary","gap","map","option","Button","variant","destructive","onPress","dismiss","value","label","undefined","presentActionSheet","surfaces","present"],"sourceRoot":"../../../../../src","sources":["ui/components/surfaces/ActionSheetSurface.tsx"],"mappings":";;;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAC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AAiB,GAAA,EAACpB,OAAA,CAAA+B,MAAM;QAEHC,OAAO,EAAEF,MAAM,CAACG,WAAW,GAAG,aAAa,GAAG,SAAU;QACxDC,OAAO,EAAEA,CAAA,KAAMxB,OAAO,CAACyB,OAAO,CAACL,MAAM,CAACM,KAAK,CAAE;QAAAjB,QAAA,EAE5CW,MAAM,CAACO;MAAK,GAJRP,MAAM,CAACM,KAKR,CACX,CAAC,eACF,IAAAjC,WAAA,CAAAiB,GAAA,EAACpB,OAAA,CAAA+B,MAAM;QAACC,OAAO,EAAC,WAAW;QAACE,OAAO,EAAEA,CAAA,KAAMxB,OAAO,CAACyB,OAAO,CAACG,SAAS,CAAE;QAAAnB,QAAA,EACjEL;MAAW,CACR,CAAC;IAAA,CACP,CAAC;EAAA,CACL,CAAC;AAEf;;AAEA;AACA;AACA;AACA;AACO,SAASyB,kBAAkBA,CAC9B1B,OAAoD,EAC9B;EACtB,OAAO2B,kBAAQ,CAACC,OAAO,CAAiB/B,OAAO,iBAC3C,IAAAP,WAAA,CAAAiB,GAAA,EAACX,kBAAkB;IAACC,OAAO,EAAEA,OAAQ;IAAA,GAAKG;EAAO,CAAG,CACvD,CAAC;AACN","ignoreList":[]}
|
|
@@ -587,10 +587,35 @@ const OxyProvider = ({
|
|
|
587
587
|
const commitSwitchedSessionRef = (0, _react.useRef)(commitSwitchedSession);
|
|
588
588
|
commitSwitchedSessionRef.current = commitSwitchedSession;
|
|
589
589
|
|
|
590
|
-
// The live AccountDialog surface (a stacked Bloom surface), while open
|
|
590
|
+
// The live AccountDialog surface (a stacked Bloom surface), while open — the
|
|
591
|
+
// SINGLE source of truth for "is the account dialog open". Held so
|
|
591
592
|
// `openAccountDialog` can no-op when already open and `closeAccountDialog` /
|
|
592
|
-
// `onSignedIn` can dismiss it.
|
|
593
|
+
// `onSignedIn` can dismiss it. Its present→settle lifecycle is what drives the
|
|
594
|
+
// reactive `accountDialogOpen` mirror below: presenting flips it true, the
|
|
595
|
+
// surface settling (`result.finally`) flips it false — no other write site.
|
|
593
596
|
const accountDialogSurfaceRef = (0, _react.useRef)(null);
|
|
597
|
+
|
|
598
|
+
// When the account dialog is shown by MORPHING an already-open route surface
|
|
599
|
+
// (e.g. ManageAccount → the account switcher) it is pushed as a frame ONTO that
|
|
600
|
+
// surface rather than presented as its own. This holds that host surface so the
|
|
601
|
+
// close path can pop the AccountDialog frame back to it. `null` when the dialog
|
|
602
|
+
// is its OWN detached surface (opened cold, with no surface underneath).
|
|
603
|
+
const accountDialogHostRef = (0, _react.useRef)(null);
|
|
604
|
+
|
|
605
|
+
// The single teardown for the account dialog wherever it lives: pop the morphed
|
|
606
|
+
// frame back to its host surface (reshaping Manage ← switcher), or dismiss the
|
|
607
|
+
// detached surface (whose settle then flips `accountDialogOpen`). Reads only
|
|
608
|
+
// stable refs + `setAccountDialogOpen`, so its identity never changes.
|
|
609
|
+
const dismissAccountDialogSurface = (0, _react.useCallback)(() => {
|
|
610
|
+
const host = accountDialogHostRef.current;
|
|
611
|
+
if (host) {
|
|
612
|
+
accountDialogHostRef.current = null;
|
|
613
|
+
setAccountDialogOpen(false);
|
|
614
|
+
host.goBack();
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
accountDialogSurfaceRef.current?.dismiss();
|
|
618
|
+
}, []);
|
|
594
619
|
const accountDialogControllerRef = (0, _react.useRef)(null);
|
|
595
620
|
if (!accountDialogControllerRef.current) {
|
|
596
621
|
accountDialogControllerRef.current = (0, _core.createAccountDialogController)({
|
|
@@ -604,8 +629,9 @@ const OxyProvider = ({
|
|
|
604
629
|
commitSession: session => handleWebSessionRef.current(session),
|
|
605
630
|
commitSwitchedSession: session => commitSwitchedSessionRef.current(session),
|
|
606
631
|
onSignedIn: () => {
|
|
607
|
-
|
|
608
|
-
|
|
632
|
+
// Close the dialog: pop the morphed frame back to its host surface, or
|
|
633
|
+
// dismiss the detached surface (whose settle flips `accountDialogOpen`).
|
|
634
|
+
dismissAccountDialogSurface();
|
|
609
635
|
},
|
|
610
636
|
openUrl: url => {
|
|
611
637
|
if ((0, _isWebBrowser.isWebBrowser)()) {
|
|
@@ -629,35 +655,60 @@ const OxyProvider = ({
|
|
|
629
655
|
}
|
|
630
656
|
const accountDialogController = accountDialogControllerRef.current;
|
|
631
657
|
const openAccountDialog = (0, _react.useCallback)(view => {
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
//
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
658
|
+
const nextView = view ?? 'accounts';
|
|
659
|
+
accountDialogControllerRef.current?.setView(nextView);
|
|
660
|
+
|
|
661
|
+
// Its own detached surface is already open → just re-point the view above.
|
|
662
|
+
if (accountDialogSurfaceRef.current) {
|
|
663
|
+
setAccountDialogOpen(true);
|
|
664
|
+
return;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
// When a route surface (e.g. ManageAccount) is already open, MORPH it in
|
|
668
|
+
// place: push the AccountDialog as a frame ONTO that surface, so the panel
|
|
669
|
+
// reshapes from that surface to the switcher and a back returns to it. With no
|
|
670
|
+
// surface open (opened cold from a sign-in button), present the dialog as its
|
|
671
|
+
// OWN detached surface — kept OUT of the `showBottomSheet` route-surface
|
|
672
|
+
// lineage so closing the bottom-sheet session never touches it and vice-versa.
|
|
673
|
+
// `navigate` is idempotent for the top frame (it replaces rather than
|
|
674
|
+
// duplicates), so calling this while already morphed in just re-points the
|
|
675
|
+
// view, and calling it after a back re-pushes the frame — no stale guard.
|
|
676
|
+
const host = (0, _surfaces.topRouteSurface)();
|
|
677
|
+
if (host) {
|
|
678
|
+
accountDialogHostRef.current = host;
|
|
679
|
+
host.navigate('AccountDialog', {
|
|
680
|
+
initialView: nextView
|
|
652
681
|
});
|
|
682
|
+
setAccountDialogOpen(true);
|
|
683
|
+
return;
|
|
653
684
|
}
|
|
685
|
+
const instance = (0, _surfaces.presentDetached)('AccountDialog', {
|
|
686
|
+
initialView: nextView
|
|
687
|
+
}, {
|
|
688
|
+
placement: {
|
|
689
|
+
base: 'bottom',
|
|
690
|
+
md: 'center'
|
|
691
|
+
},
|
|
692
|
+
dismissOnBackdrop: false,
|
|
693
|
+
maxWidth: 420
|
|
694
|
+
});
|
|
695
|
+
accountDialogSurfaceRef.current = instance;
|
|
696
|
+
// The surface settling is the ONE place `accountDialogOpen` flips false for
|
|
697
|
+
// the detached path — covering every dismiss (close button, `onSignedIn`,
|
|
698
|
+
// programmatic `closeAccountDialog`, host unmount). The morphed path clears
|
|
699
|
+
// its own state in `dismissAccountDialogSurface`.
|
|
700
|
+
instance.result.finally(() => {
|
|
701
|
+
if (accountDialogSurfaceRef.current === instance) {
|
|
702
|
+
accountDialogSurfaceRef.current = null;
|
|
703
|
+
setAccountDialogOpen(false);
|
|
704
|
+
}
|
|
705
|
+
});
|
|
654
706
|
setAccountDialogOpen(true);
|
|
655
707
|
}, []);
|
|
656
708
|
const closeAccountDialog = (0, _react.useCallback)(() => {
|
|
657
709
|
accountDialogControllerRef.current?.cancelSignIn();
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
}, []);
|
|
710
|
+
dismissAccountDialogSurface();
|
|
711
|
+
}, [dismissAccountDialogSurface]);
|
|
661
712
|
|
|
662
713
|
// Start driving the dialog on mount; tear it down on unmount.
|
|
663
714
|
(0, _react.useEffect)(() => {
|
|
@@ -885,8 +936,7 @@ const OxyProvider = ({
|
|
|
885
936
|
oxyServices,
|
|
886
937
|
currentLanguage,
|
|
887
938
|
activeSessionId,
|
|
888
|
-
queryClient
|
|
889
|
-
showBottomSheet: showBottomSheetForContext
|
|
939
|
+
queryClient
|
|
890
940
|
});
|
|
891
941
|
const {
|
|
892
942
|
accounts,
|