@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
|
@@ -4,7 +4,7 @@ import { StyleSheet } from 'react-native';
|
|
|
4
4
|
const QR_PLATE_BG = '#FFFFFF';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Shared styles for `OxyAuthChooser`'s views. Extracted from `
|
|
7
|
+
* Shared styles for `OxyAuthChooser`'s views. Extracted from `OxyAccountDialogScreen`
|
|
8
8
|
* so both the Dialog-wrapped host and any bare host (e.g. a future
|
|
9
9
|
* auth.oxy.so hub page) render identically without duplicating a StyleSheet.
|
|
10
10
|
*/
|
|
@@ -42,28 +42,90 @@ export const authChooserStyles = StyleSheet.create({
|
|
|
42
42
|
fontSize: 12.5,
|
|
43
43
|
marginTop: 1,
|
|
44
44
|
},
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Animated-collapse container for the account switch list — the outer clip and
|
|
47
|
+
* the inner measuring wrapper. Style-based (NOT NativeWind): the container
|
|
48
|
+
* carries the animated `height`/`opacity` off a reanimated style, and the
|
|
49
|
+
* measuring wrapper must stay className-free so its `onLayout` fires on RN-Web.
|
|
50
|
+
*/
|
|
51
|
+
collapse: {
|
|
52
|
+
overflow: 'hidden',
|
|
53
|
+
},
|
|
54
|
+
collapseMeasure: {
|
|
55
|
+
width: '100%',
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* The HERO block that opens the account menu: the current account's large
|
|
59
|
+
* avatar, a greeting, and the "Manage your Oxy account" pill — centred and
|
|
60
|
+
* deliberately chrome-free (no card, no grouped-section surface) so the
|
|
61
|
+
* grouped cards below read as the menu proper. The account's email sits above
|
|
62
|
+
* it in the Dialog's own nav bar, not here.
|
|
63
|
+
*/
|
|
64
|
+
hero: {
|
|
47
65
|
alignItems: 'center',
|
|
66
|
+
paddingTop: 4,
|
|
67
|
+
paddingBottom: 20,
|
|
48
68
|
gap: 12,
|
|
49
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
50
|
-
borderStyle: 'dashed',
|
|
51
|
-
borderRadius: 16,
|
|
52
|
-
paddingVertical: 10,
|
|
53
|
-
paddingHorizontal: 12,
|
|
54
|
-
marginTop: 8,
|
|
55
69
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
70
|
+
/**
|
|
71
|
+
* The current account's accent ring in the switch list, drawn OUTSIDE its
|
|
72
|
+
* avatar as an overlay so it adds no width to the row — every avatar in the
|
|
73
|
+
* list keeps the same footprint and the same content line. The 3px offset is
|
|
74
|
+
* the ring's 2px stroke plus a 1px gap.
|
|
75
|
+
*/
|
|
76
|
+
currentAvatarRing: {
|
|
77
|
+
position: 'absolute',
|
|
78
|
+
top: -3,
|
|
79
|
+
left: -3,
|
|
80
|
+
right: -3,
|
|
81
|
+
bottom: -3,
|
|
82
|
+
borderWidth: 2,
|
|
59
83
|
borderRadius: 9999,
|
|
60
|
-
|
|
84
|
+
},
|
|
85
|
+
/**
|
|
86
|
+
* The hero avatar's pressable wrapper — the "change your photo" entry point.
|
|
87
|
+
* `relative` so the accent ring + camera badge (both absolutely positioned)
|
|
88
|
+
* anchor to the avatar box.
|
|
89
|
+
*/
|
|
90
|
+
heroAvatarPressable: {
|
|
91
|
+
position: 'relative',
|
|
92
|
+
},
|
|
93
|
+
/** The hero avatar's accent ring — an overlay, like the row-level one. */
|
|
94
|
+
heroAvatarRing: {
|
|
95
|
+
position: 'absolute',
|
|
96
|
+
top: -4,
|
|
97
|
+
left: -4,
|
|
98
|
+
right: -4,
|
|
99
|
+
bottom: -4,
|
|
100
|
+
borderWidth: 3,
|
|
101
|
+
borderRadius: 9999,
|
|
102
|
+
},
|
|
103
|
+
/** Greeting + address stacked tight, centred (the hero's own 12px gap sits
|
|
104
|
+
* between this block and the avatar / manage pill, not between these lines). */
|
|
105
|
+
heroNameBlock: {
|
|
61
106
|
alignItems: 'center',
|
|
62
|
-
|
|
107
|
+
gap: 2,
|
|
108
|
+
},
|
|
109
|
+
heroGreeting: {
|
|
110
|
+
fontSize: 22,
|
|
111
|
+
fontWeight: '600',
|
|
112
|
+
textAlign: 'center',
|
|
63
113
|
},
|
|
64
|
-
|
|
114
|
+
/** The account address (`username@oxy.so` / `@handle`) under the greeting. */
|
|
115
|
+
heroAddress: {
|
|
116
|
+
fontSize: 14,
|
|
117
|
+
textAlign: 'center',
|
|
118
|
+
},
|
|
119
|
+
/**
|
|
120
|
+
* The switch row's disclosure affordance — a filled circle around the chevron,
|
|
121
|
+
* right-aligned to the same 12px row inset every other trailing element uses.
|
|
122
|
+
*/
|
|
123
|
+
chevronCircle: {
|
|
124
|
+
width: 32,
|
|
125
|
+
height: 32,
|
|
126
|
+
borderRadius: 16,
|
|
65
127
|
alignItems: 'center',
|
|
66
|
-
|
|
128
|
+
justifyContent: 'center',
|
|
67
129
|
},
|
|
68
130
|
footerLink: {
|
|
69
131
|
alignSelf: 'center',
|
|
@@ -1,12 +1,70 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import { View, Text, useWindowDimensions, type LayoutChangeEvent } from 'react-native';
|
|
1
|
+
import React, { useMemo, useState, useCallback } from 'react';
|
|
2
|
+
import { View, Text, Image, useWindowDimensions, type LayoutChangeEvent } from 'react-native';
|
|
3
|
+
import { useQuery, keepPreviousData } from '@tanstack/react-query';
|
|
3
4
|
import type { FileMetadata } from '@oxyhq/core';
|
|
4
5
|
|
|
6
|
+
type PhotoSize = { width: number; height: number };
|
|
7
|
+
|
|
8
|
+
/** Stable empty map so an unresolved query yields a referentially-stable value. */
|
|
9
|
+
const EMPTY_DIMENSIONS: Record<string, PhotoSize> = {};
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Measure the intrinsic size of every photo whose thumbnail URL has resolved,
|
|
13
|
+
* via `Image.getSize`. Pure/async (no React state) so it can be a React Query
|
|
14
|
+
* `queryFn`. Photos without a resolved URL are skipped and re-measured on the
|
|
15
|
+
* next signature change; a load error falls back to 1×1 (→ the 4/3 default).
|
|
16
|
+
*/
|
|
17
|
+
async function measurePhotoDimensions(
|
|
18
|
+
photos: FileMetadata[],
|
|
19
|
+
getThumbUrl: (photo: FileMetadata) => string | undefined,
|
|
20
|
+
): Promise<Record<string, PhotoSize>> {
|
|
21
|
+
const measured: Record<string, PhotoSize> = {};
|
|
22
|
+
await Promise.all(
|
|
23
|
+
photos.map(
|
|
24
|
+
(photo) =>
|
|
25
|
+
new Promise<void>((resolve) => {
|
|
26
|
+
const url = getThumbUrl(photo);
|
|
27
|
+
if (!url) {
|
|
28
|
+
resolve();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
Image.getSize(
|
|
32
|
+
url,
|
|
33
|
+
(width, height) => {
|
|
34
|
+
measured[photo.id] = { width, height };
|
|
35
|
+
resolve();
|
|
36
|
+
},
|
|
37
|
+
() => {
|
|
38
|
+
measured[photo.id] = { width: 1, height: 1 };
|
|
39
|
+
resolve();
|
|
40
|
+
},
|
|
41
|
+
);
|
|
42
|
+
}),
|
|
43
|
+
),
|
|
44
|
+
);
|
|
45
|
+
return measured;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** Fixed photos-per-row for the justified grid (Apple Photos-style trio). */
|
|
49
|
+
export const PHOTOS_PER_ROW = 3;
|
|
50
|
+
|
|
51
|
+
/** Chunk a photo list into fixed-length rows (last row may be short). */
|
|
52
|
+
export function chunkPhotos(photos: FileMetadata[], perRow: number): FileMetadata[][] {
|
|
53
|
+
const rows: FileMetadata[][] = [];
|
|
54
|
+
for (let i = 0; i < photos.length; i += perRow) {
|
|
55
|
+
rows.push(photos.slice(i, i + perRow));
|
|
56
|
+
}
|
|
57
|
+
return rows;
|
|
58
|
+
}
|
|
59
|
+
|
|
5
60
|
export interface JustifiedPhotoGridProps {
|
|
6
61
|
photos: FileMetadata[];
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Resolve a private-safe thumbnail URL for a photo (or `undefined` while the
|
|
64
|
+
* URL is still resolving). The grid measures each photo's intrinsic size from
|
|
65
|
+
* this URL and re-measures automatically once a pending URL resolves.
|
|
66
|
+
*/
|
|
67
|
+
getThumbUrl: (photo: FileMetadata) => string | undefined;
|
|
10
68
|
renderJustifiedPhotoItem: (photo: FileMetadata, width: number, height: number, isLast: boolean) => React.ReactElement;
|
|
11
69
|
textColor: string;
|
|
12
70
|
/**
|
|
@@ -22,12 +80,15 @@ export interface JustifiedPhotoGridProps {
|
|
|
22
80
|
/**
|
|
23
81
|
* Responsive justified photo grid that stretches to the provided containerWidth.
|
|
24
82
|
* Uses flex rows with proportional children widths instead of absolute pixel widths so it always fills.
|
|
83
|
+
*
|
|
84
|
+
* Owns its own intrinsic-dimension measurement: it calls `Image.getSize` on each
|
|
85
|
+
* photo's resolved thumbnail URL and reflows once real aspect ratios are known
|
|
86
|
+
* (falling back to 4/3 until then). Measurement re-runs whenever a photo is added
|
|
87
|
+
* OR its (asynchronously-resolved) private-safe URL first appears.
|
|
25
88
|
*/
|
|
26
89
|
const JustifiedPhotoGrid: React.FC<JustifiedPhotoGridProps> = ({
|
|
27
90
|
photos,
|
|
28
|
-
|
|
29
|
-
loadPhotoDimensions,
|
|
30
|
-
createJustifiedRows,
|
|
91
|
+
getThumbUrl,
|
|
31
92
|
renderJustifiedPhotoItem,
|
|
32
93
|
textColor,
|
|
33
94
|
containerWidth: explicitWidth,
|
|
@@ -52,11 +113,27 @@ const JustifiedPhotoGrid: React.FC<JustifiedPhotoGridProps> = ({
|
|
|
52
113
|
const w = e.nativeEvent.layout.width;
|
|
53
114
|
setMeasuredWidth(prev => (prev === w ? prev : w));
|
|
54
115
|
}, [resolvedExplicitWidth]);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
116
|
+
|
|
117
|
+
// Signature of every photo id + its currently-resolved URL — the measurement
|
|
118
|
+
// query key. A private tile's URL resolves asynchronously after it enters the
|
|
119
|
+
// list, so keying on THIS (not just the photo set) re-measures the moment a
|
|
120
|
+
// URL lands, not just when photos are added.
|
|
121
|
+
const urlSignature = useMemo(
|
|
122
|
+
() => photos.map((p) => `${p.id}:${getThumbUrl(p) ?? ''}`).join('|'),
|
|
123
|
+
[photos, getThumbUrl],
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
// Intrinsic dimensions via React Query (no effect): re-runs when the signature
|
|
127
|
+
// changes and reflows the justified rows. `keepPreviousData` holds the last
|
|
128
|
+
// measured map during a re-measure so tiles never flash back to the 4/3 default.
|
|
129
|
+
const dimensionsQuery = useQuery({
|
|
130
|
+
queryKey: ['justifiedPhotoDimensions', urlSignature],
|
|
131
|
+
queryFn: () => measurePhotoDimensions(photos, getThumbUrl),
|
|
132
|
+
placeholderData: keepPreviousData,
|
|
133
|
+
staleTime: Number.POSITIVE_INFINITY,
|
|
134
|
+
gcTime: 5 * 60 * 1000,
|
|
135
|
+
});
|
|
136
|
+
const photoDimensions = dimensionsQuery.data ?? EMPTY_DIMENSIONS;
|
|
60
137
|
|
|
61
138
|
// Group photos by date first
|
|
62
139
|
const photosByDate = useMemo(() => {
|
|
@@ -80,77 +157,74 @@ const JustifiedPhotoGrid: React.FC<JustifiedPhotoGridProps> = ({
|
|
|
80
157
|
<View style={{ width: '100%' }} onLayout={onLayoutContainer}>
|
|
81
158
|
{sortedDates.map((date: string) => {
|
|
82
159
|
const dayPhotos = photosByDate[date];
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
</View>
|
|
152
|
-
);
|
|
153
|
-
})}
|
|
160
|
+
// Fall back to the overall width until this section is measured.
|
|
161
|
+
const dateWidth = dateWidths[date] ?? effectiveWidth;
|
|
162
|
+
const rows = dateWidth > 0 ? chunkPhotos(dayPhotos, PHOTOS_PER_ROW) : [];
|
|
163
|
+
return (
|
|
164
|
+
<View
|
|
165
|
+
key={date}
|
|
166
|
+
style={{ marginBottom: 24, width: '100%' }}
|
|
167
|
+
onLayout={e => onLayoutDate(date, e.nativeEvent.layout.width)}
|
|
168
|
+
>
|
|
169
|
+
<Text style={{ fontSize: 14, fontWeight: '600', marginBottom: 12, color: textColor }}>
|
|
170
|
+
{new Date(date).toLocaleDateString(dateFormatLocale, { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })}
|
|
171
|
+
</Text>
|
|
172
|
+
<View style={{ width: '100%' }}>
|
|
173
|
+
{rows.map((row, rowIndex) => {
|
|
174
|
+
// Total aspect ratio of the row, using measured dims (fallback 4/3).
|
|
175
|
+
const aspects = row.map(p => {
|
|
176
|
+
const dims = photoDimensions[p.id];
|
|
177
|
+
return dims ? dims.width / dims.height : 4 / 3;
|
|
178
|
+
});
|
|
179
|
+
const totalAspect = aspects.reduce((a, b) => a + b, 0);
|
|
180
|
+
const gapsTotal = gap * (row.length - 1);
|
|
181
|
+
const availableWidth = dateWidth - gapsTotal;
|
|
182
|
+
// Ideal height that perfectly fills width when preserving aspect ratios.
|
|
183
|
+
const idealHeight = availableWidth / totalAspect;
|
|
184
|
+
// Clamp to min/max, then distribute the leftover/overflow proportionally.
|
|
185
|
+
let rowHeight = idealHeight;
|
|
186
|
+
let widthAdjustment = 0;
|
|
187
|
+
if (idealHeight < minRowHeight) {
|
|
188
|
+
rowHeight = minRowHeight;
|
|
189
|
+
widthAdjustment = availableWidth - rowHeight * totalAspect;
|
|
190
|
+
} else if (idealHeight > maxRowHeight) {
|
|
191
|
+
rowHeight = maxRowHeight;
|
|
192
|
+
widthAdjustment = availableWidth - rowHeight * totalAspect;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
let widths = aspects.map(ar => ar * rowHeight);
|
|
196
|
+
if (widthAdjustment !== 0) {
|
|
197
|
+
const widthSum = widths.reduce((a, b) => a + b, 0);
|
|
198
|
+
widths = widths.map(w => w + (w / widthSum) * widthAdjustment);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Correct any rounding drift on the last tile so the row fills exactly.
|
|
202
|
+
const widthSumRounded = widths.reduce((a, b) => a + b, 0);
|
|
203
|
+
const roundingDiff = availableWidth - widthSumRounded;
|
|
204
|
+
if (Math.abs(roundingDiff) > 0.5) {
|
|
205
|
+
widths[widths.length - 1] += roundingDiff;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return (
|
|
209
|
+
<View key={row[0]?.id ?? rowIndex} style={{ flexDirection: 'row', width: '100%', marginBottom: 4 }}>
|
|
210
|
+
{row.map((p, i) => {
|
|
211
|
+
const photoWidth = widths[i];
|
|
212
|
+
return (
|
|
213
|
+
<View
|
|
214
|
+
key={p.id}
|
|
215
|
+
style={{ width: photoWidth, height: rowHeight, marginRight: i === row.length - 1 ? 0 : gap }}
|
|
216
|
+
>
|
|
217
|
+
{renderJustifiedPhotoItem(p, photoWidth, rowHeight, i === row.length - 1)}
|
|
218
|
+
</View>
|
|
219
|
+
);
|
|
220
|
+
})}
|
|
221
|
+
</View>
|
|
222
|
+
);
|
|
223
|
+
})}
|
|
224
|
+
</View>
|
|
225
|
+
</View>
|
|
226
|
+
);
|
|
227
|
+
})}
|
|
154
228
|
</View>
|
|
155
229
|
);
|
|
156
230
|
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { FileMetadata } from '@oxyhq/core';
|
|
2
|
+
import { chunkPhotos, PHOTOS_PER_ROW } from '../JustifiedPhotoGrid';
|
|
3
|
+
|
|
4
|
+
// `chunkPhotos` is the row-building logic the justified photo grid owns (moved
|
|
5
|
+
// out of FileManagementScreen's former `createJustifiedRows`). It is pure, so it
|
|
6
|
+
// is unit-testable — unlike the grid's intrinsic-dimension measurement, which
|
|
7
|
+
// depends on native `Image.getSize`.
|
|
8
|
+
const photo = (id: string): FileMetadata => ({
|
|
9
|
+
id,
|
|
10
|
+
filename: `${id}.jpg`,
|
|
11
|
+
contentType: 'image/jpeg',
|
|
12
|
+
length: 1,
|
|
13
|
+
chunkSize: 0,
|
|
14
|
+
uploadDate: '2026-01-01T00:00:00.000Z',
|
|
15
|
+
metadata: {},
|
|
16
|
+
variants: [],
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const ids = (rows: FileMetadata[][]): string[][] => rows.map((row) => row.map((p) => p.id));
|
|
20
|
+
|
|
21
|
+
describe('chunkPhotos', () => {
|
|
22
|
+
it('returns no rows for an empty list', () => {
|
|
23
|
+
expect(chunkPhotos([], PHOTOS_PER_ROW)).toEqual([]);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('groups photos into full rows of the given size', () => {
|
|
27
|
+
const photos = ['a', 'b', 'c', 'd', 'e', 'f'].map(photo);
|
|
28
|
+
expect(ids(chunkPhotos(photos, PHOTOS_PER_ROW))).toEqual([
|
|
29
|
+
['a', 'b', 'c'],
|
|
30
|
+
['d', 'e', 'f'],
|
|
31
|
+
]);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it('leaves the final row short when the count is not a multiple of the row size', () => {
|
|
35
|
+
const photos = ['a', 'b', 'c', 'd'].map(photo);
|
|
36
|
+
expect(ids(chunkPhotos(photos, PHOTOS_PER_ROW))).toEqual([
|
|
37
|
+
['a', 'b', 'c'],
|
|
38
|
+
['d'],
|
|
39
|
+
]);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('preserves order and never drops or duplicates a photo', () => {
|
|
43
|
+
const photos = Array.from({ length: 10 }, (_, i) => photo(`p${i}`));
|
|
44
|
+
const flat = chunkPhotos(photos, PHOTOS_PER_ROW).flat().map((p) => p.id);
|
|
45
|
+
expect(flat).toEqual(photos.map((p) => p.id));
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('defaults to a trio per row', () => {
|
|
49
|
+
expect(PHOTOS_PER_ROW).toBe(3);
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import { Text, View } from 'react-native';
|
|
3
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
4
|
+
import { useTheme } from '@oxyhq/bloom/theme';
|
|
5
|
+
import { surfaces, type SurfaceControls } from '@oxyhq/bloom/surfaces';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A single choice in an {@link ActionSheetSurface} — a labelled button that
|
|
9
|
+
* resolves the surface with `value` when pressed.
|
|
10
|
+
*/
|
|
11
|
+
export interface ActionSheetOption<T extends string> {
|
|
12
|
+
label: string;
|
|
13
|
+
value: T;
|
|
14
|
+
/** Render as a destructive (negative) button. */
|
|
15
|
+
destructive?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ActionSheetSurfaceProps<T extends string> {
|
|
19
|
+
/** The presenting surface's controls (from `surfaces.present`). */
|
|
20
|
+
surface: SurfaceControls;
|
|
21
|
+
/** Headline. */
|
|
22
|
+
title: string;
|
|
23
|
+
/** Optional supporting copy. */
|
|
24
|
+
message?: string;
|
|
25
|
+
/** The choices; each dismisses the surface with its `value`. */
|
|
26
|
+
options: ActionSheetOption<T>[];
|
|
27
|
+
/** Cancel button label — dismisses with `undefined`. */
|
|
28
|
+
cancelLabel: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const TITLE_STYLE = { fontSize: 22, fontWeight: '600' as const, lineHeight: 30 };
|
|
32
|
+
const MESSAGE_STYLE = { fontSize: 16, lineHeight: 22 };
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A multi-choice action sheet rendered as a shared-stack surface — the
|
|
36
|
+
* many-option counterpart to Bloom's two-way `surfaces.confirm`. Each option
|
|
37
|
+
* button resolves the surface's `present()` promise with that option's `value`;
|
|
38
|
+
* cancel / backdrop / Escape resolve `undefined`. Presented via
|
|
39
|
+
* {@link presentActionSheet}.
|
|
40
|
+
*/
|
|
41
|
+
export function ActionSheetSurface<T extends string>({
|
|
42
|
+
surface,
|
|
43
|
+
title,
|
|
44
|
+
message,
|
|
45
|
+
options,
|
|
46
|
+
cancelLabel,
|
|
47
|
+
}: ActionSheetSurfaceProps<T>): React.ReactElement {
|
|
48
|
+
const theme = useTheme();
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<View>
|
|
52
|
+
<Text
|
|
53
|
+
style={[
|
|
54
|
+
TITLE_STYLE,
|
|
55
|
+
{ color: theme.colors.text, paddingBottom: message ? 4 : 16 },
|
|
56
|
+
]}
|
|
57
|
+
>
|
|
58
|
+
{title}
|
|
59
|
+
</Text>
|
|
60
|
+
{message ? (
|
|
61
|
+
<Text
|
|
62
|
+
style={[
|
|
63
|
+
MESSAGE_STYLE,
|
|
64
|
+
{ color: theme.colors.textSecondary, paddingBottom: 16 },
|
|
65
|
+
]}
|
|
66
|
+
>
|
|
67
|
+
{message}
|
|
68
|
+
</Text>
|
|
69
|
+
) : null}
|
|
70
|
+
<View style={{ gap: 8 }}>
|
|
71
|
+
{options.map((option) => (
|
|
72
|
+
<Button
|
|
73
|
+
key={option.value}
|
|
74
|
+
variant={option.destructive ? 'destructive' : 'primary'}
|
|
75
|
+
onPress={() => surface.dismiss(option.value)}
|
|
76
|
+
>
|
|
77
|
+
{option.label}
|
|
78
|
+
</Button>
|
|
79
|
+
))}
|
|
80
|
+
<Button variant="secondary" onPress={() => surface.dismiss(undefined)}>
|
|
81
|
+
{cancelLabel}
|
|
82
|
+
</Button>
|
|
83
|
+
</View>
|
|
84
|
+
</View>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Present an {@link ActionSheetSurface} on the shared stack and resolve with the
|
|
90
|
+
* chosen option `value`, or `undefined` if cancelled/dismissed.
|
|
91
|
+
*/
|
|
92
|
+
export function presentActionSheet<T extends string>(
|
|
93
|
+
options: Omit<ActionSheetSurfaceProps<T>, 'surface'>,
|
|
94
|
+
): Promise<T | undefined> {
|
|
95
|
+
return surfaces.present<T | undefined>((surface) => (
|
|
96
|
+
<ActionSheetSurface surface={surface} {...options} />
|
|
97
|
+
));
|
|
98
|
+
}
|