@oxyhq/services 22.8.7 → 22.10.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/OxyAccountDialogScreen.js +150 -0
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -0
- package/lib/commonjs/ui/components/OxyAuthChooser.js +137 -40
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyConsentScreen.js +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +9 -29
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +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 +193 -0
- package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -0
- 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 +22 -12
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.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 +49 -4
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +34 -39
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- 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 +14 -2
- package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/bottomSheetManager.js +38 -56
- package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +7 -57
- 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 +98 -0
- package/lib/commonjs/ui/navigation/surfaceNavStack.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaceRegistry.js +152 -0
- package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -0
- package/lib/commonjs/ui/navigation/surfaces.js +256 -0
- package/lib/commonjs/ui/navigation/surfaces.js.map +1 -0
- 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 +10 -14
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- 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 +219 -206
- 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/fileManagement/PhotoPickerSection.js +1 -1
- package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +9 -7
- 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/types/surfaceScreen.js +6 -0
- package/lib/commonjs/ui/types/surfaceScreen.js.map +1 -0
- package/lib/module/index.js +12 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js +145 -0
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -0
- package/lib/module/ui/components/OxyAuthChooser.js +137 -40
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyConsentScreen.js +1 -1
- package/lib/module/ui/components/OxyProvider.js +10 -30
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +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 +188 -0
- package/lib/module/ui/components/SurfaceScreen.js.map +1 -0
- 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 +22 -12
- package/lib/module/ui/components/oxyAuthChooserStyles.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 +49 -4
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +34 -39
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- 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 +14 -2
- package/lib/module/ui/navigation/accountDialogManager.js.map +1 -1
- package/lib/module/ui/navigation/bottomSheetManager.js +37 -53
- package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +6 -56
- 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 +95 -0
- package/lib/module/ui/navigation/surfaceNavStack.js.map +1 -0
- package/lib/module/ui/navigation/surfaceRegistry.js +146 -0
- package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -0
- package/lib/module/ui/navigation/surfaces.js +244 -0
- package/lib/module/ui/navigation/surfaces.js.map +1 -0
- 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 +10 -14
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- 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 +222 -208
- 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/fileManagement/PhotoPickerSection.js +1 -1
- package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +8 -7
- 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/types/surfaceScreen.js +4 -0
- package/lib/module/ui/types/surfaceScreen.js.map +1 -0
- 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/OxyAccountDialogScreen.d.ts +39 -0
- 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/OxyProvider.d.ts +3 -2
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +2 -2
- 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 +26 -0
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -0
- 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 +19 -9
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.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/useAvatarPicker.d.ts +7 -11
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- 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 +14 -2
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +24 -16
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +2 -60
- 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 +51 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceNavStack.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +135 -0
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts +79 -0
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -0
- 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 +0 -4
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- 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/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/types/navigation.d.ts +8 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts +38 -0
- package/lib/typescript/commonjs/ui/types/surfaceScreen.d.ts.map +1 -0
- 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/OxyAccountDialogScreen.d.ts +39 -0
- 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/OxyProvider.d.ts +3 -2
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts +2 -2
- 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 +26 -0
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -0
- 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 +19 -9
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.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/useAvatarPicker.d.ts +7 -11
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- 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 +14 -2
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +24 -16
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +2 -60
- 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 +51 -0
- package/lib/typescript/module/ui/navigation/surfaceNavStack.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +135 -0
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/surfaces.d.ts +79 -0
- package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -0
- 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 +0 -4
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- 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/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/types/navigation.d.ts +8 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/surfaceScreen.d.ts +38 -0
- package/lib/typescript/module/ui/types/surfaceScreen.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/index.ts +12 -5
- package/src/ui/components/OxyAccountDialogScreen.tsx +148 -0
- package/src/ui/components/OxyAuthChooser.tsx +153 -33
- package/src/ui/components/OxyConsentScreen.tsx +1 -1
- package/src/ui/components/OxyProvider.tsx +12 -34
- package/src/ui/components/ProfileButton.tsx +2 -2
- package/src/ui/components/RequireOxyAuth.tsx +1 -1
- package/src/ui/components/SurfaceHeaderAction.tsx +60 -0
- package/src/ui/components/SurfaceScreen.tsx +226 -0
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +50 -36
- package/src/ui/components/modals/DeleteAccountModal.tsx +47 -26
- package/src/ui/components/oxyAuthChooserStyles.ts +22 -12
- package/src/ui/components/surfaces/ActionSheetSurface.tsx +98 -0
- package/src/ui/context/OxyContext.tsx +43 -3
- package/src/ui/hooks/useAvatarPicker.ts +53 -66
- package/src/ui/hooks/useSurfaceHeader.ts +56 -0
- package/src/ui/hooks/useSwitchableAccounts.ts +1 -1
- package/src/ui/navigation/__tests__/getSurfaceConfig.test.ts +39 -0
- package/src/ui/navigation/__tests__/surfaceNavStack.test.ts +68 -0
- package/src/ui/navigation/accountDialogManager.ts +14 -2
- package/src/ui/navigation/bottomSheetManager.ts +46 -73
- package/src/ui/navigation/routes.ts +7 -106
- package/src/ui/navigation/surfaceBackBridge.ts +69 -0
- package/src/ui/navigation/surfaceNavStack.ts +110 -0
- package/src/ui/navigation/surfaceRegistry.ts +240 -0
- package/src/ui/navigation/surfaces.ts +272 -0
- 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 +8 -17
- 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 +191 -188
- 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/fileManagement/PhotoPickerSection.tsx +1 -1
- package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +9 -7
- 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/types/navigation.ts +8 -0
- package/src/ui/types/surfaceScreen.ts +38 -0
- package/lib/commonjs/ui/components/BottomSheet.js +0 -49
- package/lib/commonjs/ui/components/BottomSheet.js.map +0 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +0 -298
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +0 -1
- 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 +0 -259
- package/lib/commonjs/ui/components/OxyAccountDialog.js.map +0 -1
- package/lib/module/ui/components/BottomSheet.js +0 -45
- package/lib/module/ui/components/BottomSheet.js.map +0 -1
- package/lib/module/ui/components/BottomSheetRouter.js +0 -292
- package/lib/module/ui/components/BottomSheetRouter.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 +0 -254
- package/lib/module/ui/components/OxyAccountDialog.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts +0 -29
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts +0 -9
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.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 +0 -37
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/BottomSheet.d.ts +0 -29
- package/lib/typescript/module/ui/components/BottomSheet.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +0 -9
- package/lib/typescript/module/ui/components/BottomSheetRouter.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 +0 -37
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +0 -1
- package/src/ui/components/BottomSheet.tsx +0 -48
- package/src/ui/components/BottomSheetRouter.tsx +0 -310
- package/src/ui/components/Header.tsx +0 -224
- package/src/ui/components/OxyAccountDialog.tsx +0 -243
- package/src/ui/navigation/__tests__/getSheetConfig.test.ts +0 -36
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OxyAccountDialog — the ONE unified account dialog for `@oxyhq/services`.
|
|
3
|
-
*
|
|
4
|
-
* Bloom `<Dialog>` chrome (header, back button, placement, scroll body) around
|
|
5
|
-
* the headless chooser logic, which lives in `OxyAuthChooser` — the account
|
|
6
|
-
* switcher, sign-in, sign-up, and QR views are ALL there, extracted so the
|
|
7
|
-
* same chooser can be mounted bare by a future host with no Dialog chrome
|
|
8
|
-
* (e.g. an auth.oxy.so hub page driving the cross-origin passkey popup, b2).
|
|
9
|
-
* This file owns ONLY the chrome: the title/subtitle per view, the back
|
|
10
|
-
* button, and the Bloom `<Dialog>` surface itself.
|
|
11
|
-
*
|
|
12
|
-
* The surface is Bloom's `<Dialog>` (`@oxyhq/bloom/dialog`) with a responsive
|
|
13
|
-
* `placement` — a bottom sheet on narrow viewports, a centered card on wide ones.
|
|
14
|
-
* It REPLACES the hand-rolled RN `<Modal>` + `<GestureHandlerRootView>` + manual
|
|
15
|
-
* backdrop/card wrapper this component used before. That RN `<Modal>` is invisible
|
|
16
|
-
* under React StrictMode on web: react-native-web's `ModalPortal` appends its host
|
|
17
|
-
* node during render but removes it in an effect cleanup and never re-attaches, so
|
|
18
|
-
* the dialog never paints in a dev Vite build. Bloom's `<Dialog>` renders through
|
|
19
|
-
* its own Portal and has no such lifecycle hazard.
|
|
20
|
-
*
|
|
21
|
-
* Open/close is CONTROLLED by `isAccountDialogOpen` (the `open` prop); the Dialog
|
|
22
|
-
* stays mounted whenever the controller exists so it can animate its own close.
|
|
23
|
-
* Backdrop / swipe-to-dismiss is disabled (`dismissOnBackdrop={false}`) on purpose:
|
|
24
|
-
* Bloom's controlled `bottom` placement does not fire `onClose` on a gesture or
|
|
25
|
-
* backdrop dismissal, so allowing it would desync `isAccountDialogOpen` from the
|
|
26
|
-
* sheet and block reopening. The header close button (and `OxyAuthChooser`'s
|
|
27
|
-
* `onComplete`) drive `closeAccountDialog`, which flips `open` and runs the exit
|
|
28
|
-
* animation.
|
|
29
|
-
*/
|
|
30
|
-
import type React from 'react';
|
|
31
|
-
/**
|
|
32
|
-
* The unified account dialog. Mounted once by `OxyProvider`; opened imperatively
|
|
33
|
-
* via `useOxy().openAccountDialog(view?)` or imperative `openAccountDialog('signin')`.
|
|
34
|
-
*/
|
|
35
|
-
declare const OxyAccountDialog: React.FC;
|
|
36
|
-
export default OxyAccountDialog;
|
|
37
|
-
//# sourceMappingURL=OxyAccountDialog.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OxyAccountDialog.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAccountDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B;;;GAGG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAgD7B,CAAC;AAgJF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type BottomSheetProps as BloomBottomSheetProps, type BottomSheetRef } from '@oxyhq/bloom/bottom-sheet';
|
|
2
|
-
/**
|
|
3
|
-
* Thin wrapper around `@oxyhq/bloom`'s `BottomSheet` (>=0.4.0).
|
|
4
|
-
*
|
|
5
|
-
* Bloom is the canonical bottom-sheet primitive for the Oxy ecosystem; this
|
|
6
|
-
* wrapper exists only to inject service-specific defaults so the 29+ screens
|
|
7
|
-
* mounted by `BottomSheetRouter` keep the exact UX they had under the
|
|
8
|
-
* pre-refactor in-tree implementation:
|
|
9
|
-
*
|
|
10
|
-
* - `manualActivation: true` — the body pan uses RNGH's manualActivation
|
|
11
|
-
* with scroll-handoff, the only RNGH 2.x pattern that doesn't steal
|
|
12
|
-
* vertical events from inner scrollers on Android. The previous in-tree
|
|
13
|
-
* implementation always ran in this mode.
|
|
14
|
-
* - `dynamicBackdrop: true` — backdrop dims proportionally with drag
|
|
15
|
-
* distance (iOS Photos style). The previous in-tree implementation
|
|
16
|
-
* always did this.
|
|
17
|
-
*
|
|
18
|
-
* Consumers (`BottomSheetRouter`, primarily) can still override either default
|
|
19
|
-
* by passing the prop explicitly — for example, per-route via `getSheetConfig`.
|
|
20
|
-
*
|
|
21
|
-
* Public API (name + ref shape) is identical to the previous in-tree
|
|
22
|
-
* implementation, so external consumers and `BottomSheetRouter` need no
|
|
23
|
-
* changes beyond the new pass-through props.
|
|
24
|
-
*/
|
|
25
|
-
export type BottomSheetProps = BloomBottomSheetProps;
|
|
26
|
-
export type { BottomSheetRef };
|
|
27
|
-
declare const BottomSheet: import("react").ForwardRefExoticComponent<BloomBottomSheetProps & import("react").RefAttributes<BottomSheetRef>>;
|
|
28
|
-
export default BottomSheet;
|
|
29
|
-
//# sourceMappingURL=BottomSheet.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/BottomSheet.tsx"],"names":[],"mappings":"AACA,OAAO,EAEH,KAAK,gBAAgB,IAAI,qBAAqB,EAC9C,KAAK,cAAc,EACtB,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;AACrD,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,QAAA,MAAM,WAAW,kHAUf,CAAC;AAIH,eAAe,WAAW,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { RouteName } from '../navigation/routes.js';
|
|
3
|
-
export interface BottomSheetRouterProps {
|
|
4
|
-
onScreenChange?: (screen: RouteName | null) => void;
|
|
5
|
-
onDismiss?: () => void;
|
|
6
|
-
}
|
|
7
|
-
declare const _default: React.NamedExoticComponent<BottomSheetRouterProps>;
|
|
8
|
-
export default _default;
|
|
9
|
-
//# sourceMappingURL=BottomSheetRouter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetRouter.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/BottomSheetRouter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAC;AAGvF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAsB,CAAC;AA4EtD,MAAM,WAAW,sBAAsB;IACnC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IACpD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;;AAmOD,wBAA6C"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import { type SharedValue } from 'react-native-reanimated';
|
|
3
|
-
export interface HeaderAction {
|
|
4
|
-
/** Ionicons name — rendered as a circular icon button when no `text` is set. */
|
|
5
|
-
icon?: string;
|
|
6
|
-
/** Label — rendered as a filled pill button (takes precedence over `icon`). */
|
|
7
|
-
text?: string;
|
|
8
|
-
onPress: () => void;
|
|
9
|
-
loading?: boolean;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
/** Stable identity for lists; falls back to the array index. */
|
|
12
|
-
key?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface HeaderProps {
|
|
15
|
-
title: string;
|
|
16
|
-
subtitle?: string;
|
|
17
|
-
onBack?: () => void;
|
|
18
|
-
onClose?: () => void;
|
|
19
|
-
/** Trailing action buttons, rendered left-to-right before the close button. */
|
|
20
|
-
actions?: HeaderAction[];
|
|
21
|
-
showBackButton?: boolean;
|
|
22
|
-
showCloseButton?: boolean;
|
|
23
|
-
variant?: 'default' | 'minimal';
|
|
24
|
-
elevation?: 'none' | 'subtle' | 'prominent';
|
|
25
|
-
subtitleVariant?: 'default' | 'small' | 'large' | 'muted';
|
|
26
|
-
titleAlignment?: 'left' | 'center' | 'right';
|
|
27
|
-
/** Shared scroll offset — enables sticky translate-up behavior on native. */
|
|
28
|
-
scrollY?: SharedValue<number>;
|
|
29
|
-
}
|
|
30
|
-
export declare const getHeaderHeight: (variant?: HeaderProps["variant"], safeAreaTop?: number) => number;
|
|
31
|
-
declare const Header: React.FC<HeaderProps>;
|
|
32
|
-
export default Header;
|
|
33
|
-
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAA2B,EAAgD,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAS7H,MAAM,WAAW,YAAY;IACzB,gFAAgF;IAChF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gEAAgE;IAChE,GAAG,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC5C,eAAe,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IAC1D,cAAc,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC7C,6EAA6E;IAC7E,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,eAAe,GAAI,UAAS,WAAW,CAAC,SAAS,CAAa,EAAE,oBAAe,KAAG,MAK9F,CAAC;AAyBF,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAgGjC,CAAC;AAkDF,eAAe,MAAM,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OxyAccountDialog — the ONE unified account dialog for `@oxyhq/services`.
|
|
3
|
-
*
|
|
4
|
-
* Bloom `<Dialog>` chrome (header, back button, placement, scroll body) around
|
|
5
|
-
* the headless chooser logic, which lives in `OxyAuthChooser` — the account
|
|
6
|
-
* switcher, sign-in, sign-up, and QR views are ALL there, extracted so the
|
|
7
|
-
* same chooser can be mounted bare by a future host with no Dialog chrome
|
|
8
|
-
* (e.g. an auth.oxy.so hub page driving the cross-origin passkey popup, b2).
|
|
9
|
-
* This file owns ONLY the chrome: the title/subtitle per view, the back
|
|
10
|
-
* button, and the Bloom `<Dialog>` surface itself.
|
|
11
|
-
*
|
|
12
|
-
* The surface is Bloom's `<Dialog>` (`@oxyhq/bloom/dialog`) with a responsive
|
|
13
|
-
* `placement` — a bottom sheet on narrow viewports, a centered card on wide ones.
|
|
14
|
-
* It REPLACES the hand-rolled RN `<Modal>` + `<GestureHandlerRootView>` + manual
|
|
15
|
-
* backdrop/card wrapper this component used before. That RN `<Modal>` is invisible
|
|
16
|
-
* under React StrictMode on web: react-native-web's `ModalPortal` appends its host
|
|
17
|
-
* node during render but removes it in an effect cleanup and never re-attaches, so
|
|
18
|
-
* the dialog never paints in a dev Vite build. Bloom's `<Dialog>` renders through
|
|
19
|
-
* its own Portal and has no such lifecycle hazard.
|
|
20
|
-
*
|
|
21
|
-
* Open/close is CONTROLLED by `isAccountDialogOpen` (the `open` prop); the Dialog
|
|
22
|
-
* stays mounted whenever the controller exists so it can animate its own close.
|
|
23
|
-
* Backdrop / swipe-to-dismiss is disabled (`dismissOnBackdrop={false}`) on purpose:
|
|
24
|
-
* Bloom's controlled `bottom` placement does not fire `onClose` on a gesture or
|
|
25
|
-
* backdrop dismissal, so allowing it would desync `isAccountDialogOpen` from the
|
|
26
|
-
* sheet and block reopening. The header close button (and `OxyAuthChooser`'s
|
|
27
|
-
* `onComplete`) drive `closeAccountDialog`, which flips `open` and runs the exit
|
|
28
|
-
* animation.
|
|
29
|
-
*/
|
|
30
|
-
import type React from 'react';
|
|
31
|
-
/**
|
|
32
|
-
* The unified account dialog. Mounted once by `OxyProvider`; opened imperatively
|
|
33
|
-
* via `useOxy().openAccountDialog(view?)` or imperative `openAccountDialog('signin')`.
|
|
34
|
-
*/
|
|
35
|
-
declare const OxyAccountDialog: React.FC;
|
|
36
|
-
export default OxyAccountDialog;
|
|
37
|
-
//# sourceMappingURL=OxyAccountDialog.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OxyAccountDialog.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAccountDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B;;;GAGG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAgD7B,CAAC;AAgJF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { forwardRef } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
BottomSheet as BloomBottomSheet,
|
|
4
|
-
type BottomSheetProps as BloomBottomSheetProps,
|
|
5
|
-
type BottomSheetRef,
|
|
6
|
-
} from '@oxyhq/bloom/bottom-sheet';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Thin wrapper around `@oxyhq/bloom`'s `BottomSheet` (>=0.4.0).
|
|
10
|
-
*
|
|
11
|
-
* Bloom is the canonical bottom-sheet primitive for the Oxy ecosystem; this
|
|
12
|
-
* wrapper exists only to inject service-specific defaults so the 29+ screens
|
|
13
|
-
* mounted by `BottomSheetRouter` keep the exact UX they had under the
|
|
14
|
-
* pre-refactor in-tree implementation:
|
|
15
|
-
*
|
|
16
|
-
* - `manualActivation: true` — the body pan uses RNGH's manualActivation
|
|
17
|
-
* with scroll-handoff, the only RNGH 2.x pattern that doesn't steal
|
|
18
|
-
* vertical events from inner scrollers on Android. The previous in-tree
|
|
19
|
-
* implementation always ran in this mode.
|
|
20
|
-
* - `dynamicBackdrop: true` — backdrop dims proportionally with drag
|
|
21
|
-
* distance (iOS Photos style). The previous in-tree implementation
|
|
22
|
-
* always did this.
|
|
23
|
-
*
|
|
24
|
-
* Consumers (`BottomSheetRouter`, primarily) can still override either default
|
|
25
|
-
* by passing the prop explicitly — for example, per-route via `getSheetConfig`.
|
|
26
|
-
*
|
|
27
|
-
* Public API (name + ref shape) is identical to the previous in-tree
|
|
28
|
-
* implementation, so external consumers and `BottomSheetRouter` need no
|
|
29
|
-
* changes beyond the new pass-through props.
|
|
30
|
-
*/
|
|
31
|
-
export type BottomSheetProps = BloomBottomSheetProps;
|
|
32
|
-
export type { BottomSheetRef };
|
|
33
|
-
|
|
34
|
-
const BottomSheet = forwardRef<BottomSheetRef, BottomSheetProps>((props, ref) => {
|
|
35
|
-
const { manualActivation = true, dynamicBackdrop = true, ...rest } = props;
|
|
36
|
-
return (
|
|
37
|
-
<BloomBottomSheet
|
|
38
|
-
ref={ref}
|
|
39
|
-
manualActivation={manualActivation}
|
|
40
|
-
dynamicBackdrop={dynamicBackdrop}
|
|
41
|
-
{...rest}
|
|
42
|
-
/>
|
|
43
|
-
);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
BottomSheet.displayName = 'BottomSheet';
|
|
47
|
-
|
|
48
|
-
export default BottomSheet;
|
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
import React, { useRef, useEffect, useCallback, useMemo, type ErrorInfo } from 'react';
|
|
2
|
-
import { BackHandler, Platform, View, StyleSheet, Text, type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
-
import { useStore } from 'zustand';
|
|
4
|
-
import type { RouteName } from '../navigation/routes';
|
|
5
|
-
import { getScreenComponent, getSheetConfig, isValidRoute } from '../navigation/routes';
|
|
6
|
-
import type { BaseScreenProps } from '../types/navigation';
|
|
7
|
-
import { useTheme } from '@oxyhq/bloom/theme';
|
|
8
|
-
import { Dialog } from '@oxyhq/bloom/dialog';
|
|
9
|
-
import BottomSheet, { type BottomSheetRef } from './BottomSheet';
|
|
10
|
-
import {
|
|
11
|
-
bottomSheetStore,
|
|
12
|
-
getState,
|
|
13
|
-
showBottomSheet,
|
|
14
|
-
closeBottomSheet,
|
|
15
|
-
goBack,
|
|
16
|
-
updateState,
|
|
17
|
-
} from '../navigation/bottomSheetManager';
|
|
18
|
-
|
|
19
|
-
/** Error boundary to catch screen rendering failures (e.g. lazy require() throws) */
|
|
20
|
-
interface ScreenErrorBoundaryState {
|
|
21
|
-
error: Error | null;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
class ScreenErrorBoundary extends React.Component<
|
|
25
|
-
{ screenName: string; children: React.ReactNode },
|
|
26
|
-
ScreenErrorBoundaryState
|
|
27
|
-
> {
|
|
28
|
-
state: ScreenErrorBoundaryState = { error: null };
|
|
29
|
-
|
|
30
|
-
static getDerivedStateFromError(error: Error): ScreenErrorBoundaryState {
|
|
31
|
-
return { error };
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
componentDidCatch(error: Error, info: ErrorInfo): void {
|
|
35
|
-
if (__DEV__) {
|
|
36
|
-
console.error(
|
|
37
|
-
`[BottomSheetRouter] Screen "${this.props.screenName}" crashed:`,
|
|
38
|
-
error,
|
|
39
|
-
info.componentStack,
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
componentDidUpdate(prevProps: { screenName: string }): void {
|
|
45
|
-
if (prevProps.screenName !== this.props.screenName && this.state.error) {
|
|
46
|
-
this.setState({ error: null });
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
render(): React.ReactNode {
|
|
51
|
-
if (this.state.error) {
|
|
52
|
-
return (
|
|
53
|
-
<View style={errorStyles.container}>
|
|
54
|
-
<Text style={errorStyles.title}>Something went wrong</Text>
|
|
55
|
-
{__DEV__ && (
|
|
56
|
-
<Text style={errorStyles.message}>{this.state.error.message}</Text>
|
|
57
|
-
)}
|
|
58
|
-
</View>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
return this.props.children;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const errorStyles = StyleSheet.create({
|
|
66
|
-
container: { flex: 1, alignItems: 'center', justifyContent: 'center', padding: 24 },
|
|
67
|
-
title: { fontSize: 16, fontWeight: '600', marginBottom: 8 },
|
|
68
|
-
message: { fontSize: 13, textAlign: 'center' },
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Responsive placement for `presentation: 'dialog'` routes: a bottom-sheet on
|
|
73
|
-
* narrow viewports, a centered card at `md+` (≥768dp). Module-scoped so the
|
|
74
|
-
* object identity is stable across renders (Bloom's placement resolver memoizes
|
|
75
|
-
* on it). PhotoPickerSection keys its center-vs-bottom layout off the SAME `md`
|
|
76
|
-
* breakpoint — keep the two in sync if this map changes.
|
|
77
|
-
*/
|
|
78
|
-
const DIALOG_PLACEMENT = { base: 'bottom', md: 'center' } as const;
|
|
79
|
-
|
|
80
|
-
export interface BottomSheetRouterProps {
|
|
81
|
-
onScreenChange?: (screen: RouteName | null) => void;
|
|
82
|
-
onDismiss?: () => void;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* BottomSheetRouter - Navigation container for bottom sheet screens
|
|
87
|
-
*/
|
|
88
|
-
const BottomSheetRouter: React.FC<BottomSheetRouterProps> = ({ onScreenChange, onDismiss }) => {
|
|
89
|
-
const sheetRef = useRef<BottomSheetRef>(null);
|
|
90
|
-
const theme = useTheme();
|
|
91
|
-
const prevScreenRef = useRef<RouteName | null>(null);
|
|
92
|
-
|
|
93
|
-
const { currentScreen, screenProps, currentStep, isOpen } = useStore(bottomSheetStore);
|
|
94
|
-
|
|
95
|
-
const ScreenComponent = useMemo(() => {
|
|
96
|
-
if (!currentScreen) return null;
|
|
97
|
-
const component = getScreenComponent(currentScreen);
|
|
98
|
-
if (__DEV__ && !component) {
|
|
99
|
-
console.error(
|
|
100
|
-
`[BottomSheetRouter] getScreenComponent("${currentScreen}") returned undefined — the screen's lazy require() likely failed.`,
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
return component ?? null;
|
|
104
|
-
}, [currentScreen]);
|
|
105
|
-
|
|
106
|
-
// Route-level sheet config (which surface hosts the route, whether the sheet
|
|
107
|
-
// provides its own ScrollView, etc.). Computed early so the visibility
|
|
108
|
-
// effect can gate the in-tree sheet on the resolved presentation.
|
|
109
|
-
const sheetConfig = useMemo(
|
|
110
|
-
() => getSheetConfig(currentScreen, screenProps),
|
|
111
|
-
[currentScreen, screenProps],
|
|
112
|
-
);
|
|
113
|
-
const isDialogPresentation = sheetConfig.presentation === 'dialog';
|
|
114
|
-
|
|
115
|
-
// Notify screen changes
|
|
116
|
-
useEffect(() => {
|
|
117
|
-
if (prevScreenRef.current !== currentScreen) {
|
|
118
|
-
onScreenChange?.(currentScreen);
|
|
119
|
-
prevScreenRef.current = currentScreen;
|
|
120
|
-
}
|
|
121
|
-
}, [currentScreen, onScreenChange]);
|
|
122
|
-
|
|
123
|
-
// Control visibility. The in-tree BottomSheet only ever presents for
|
|
124
|
-
// 'sheet'-presentation routes — 'dialog' routes render in the Bloom
|
|
125
|
-
// `<Dialog>` below, so the sheet stays dismissed for them (both surfaces
|
|
126
|
-
// remain mounted, so the pick→crop dialog→sheet handoff has no unmount jank).
|
|
127
|
-
useEffect(() => {
|
|
128
|
-
if (!sheetRef.current) return;
|
|
129
|
-
|
|
130
|
-
if (isOpen && !isDialogPresentation) {
|
|
131
|
-
sheetRef.current.present();
|
|
132
|
-
} else {
|
|
133
|
-
sheetRef.current.dismiss();
|
|
134
|
-
}
|
|
135
|
-
}, [isOpen, isDialogPresentation]);
|
|
136
|
-
|
|
137
|
-
// Android back button
|
|
138
|
-
useEffect(() => {
|
|
139
|
-
if (!isOpen) return;
|
|
140
|
-
if (Platform.OS !== 'android') return;
|
|
141
|
-
const handler = BackHandler.addEventListener('hardwareBackPress', () => {
|
|
142
|
-
handleGoBack();
|
|
143
|
-
return true;
|
|
144
|
-
});
|
|
145
|
-
return () => handler.remove();
|
|
146
|
-
}, [isOpen]);
|
|
147
|
-
|
|
148
|
-
const navigate = useCallback((screen: RouteName, props?: Record<string, unknown>) => {
|
|
149
|
-
if (!isValidRoute(screen)) {
|
|
150
|
-
if (__DEV__) console.warn(`[BottomSheetRouter] Invalid route: ${screen}`);
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
showBottomSheet({ screen, props });
|
|
154
|
-
}, []);
|
|
155
|
-
|
|
156
|
-
const handleGoBack = useCallback(() => {
|
|
157
|
-
const state = getState();
|
|
158
|
-
|
|
159
|
-
// Try history first
|
|
160
|
-
if (state.history.length > 0) {
|
|
161
|
-
goBack();
|
|
162
|
-
return true;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// Try step back
|
|
166
|
-
const step = state.currentStep ?? 0;
|
|
167
|
-
if (step > 0) {
|
|
168
|
-
updateState({
|
|
169
|
-
currentStep: step - 1,
|
|
170
|
-
screenProps: { ...state.screenProps, initialStep: step - 1 },
|
|
171
|
-
});
|
|
172
|
-
return true;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// Close
|
|
176
|
-
closeBottomSheet();
|
|
177
|
-
return true;
|
|
178
|
-
}, []);
|
|
179
|
-
|
|
180
|
-
const canDismiss = useCallback((): boolean => {
|
|
181
|
-
const state = getState();
|
|
182
|
-
if (state.history.length > 0) return false;
|
|
183
|
-
const step = state.currentStep ?? 0;
|
|
184
|
-
return step <= 0;
|
|
185
|
-
}, []);
|
|
186
|
-
|
|
187
|
-
const handleDismissAttempt = useCallback((): boolean => {
|
|
188
|
-
if (!canDismiss()) {
|
|
189
|
-
handleGoBack();
|
|
190
|
-
return false;
|
|
191
|
-
}
|
|
192
|
-
return true;
|
|
193
|
-
}, [canDismiss, handleGoBack]);
|
|
194
|
-
|
|
195
|
-
const handleDismiss = useCallback(() => {
|
|
196
|
-
closeBottomSheet();
|
|
197
|
-
onDismiss?.();
|
|
198
|
-
}, [onDismiss]);
|
|
199
|
-
|
|
200
|
-
const handleStepChange = useCallback((step: number) => {
|
|
201
|
-
const state = getState();
|
|
202
|
-
updateState({
|
|
203
|
-
currentStep: step,
|
|
204
|
-
screenProps: { ...state.screenProps, initialStep: step },
|
|
205
|
-
});
|
|
206
|
-
}, []);
|
|
207
|
-
|
|
208
|
-
const scrollTo = useCallback((y: number, animated?: boolean) => {
|
|
209
|
-
sheetRef.current?.scrollTo(y, animated);
|
|
210
|
-
}, []);
|
|
211
|
-
|
|
212
|
-
const renderBackground = useCallback(
|
|
213
|
-
(props: { style?: StyleProp<ViewStyle> }) => (
|
|
214
|
-
<View style={[styles.background, { backgroundColor: theme.colors.background }, props.style]} />
|
|
215
|
-
),
|
|
216
|
-
[theme.colors.background]
|
|
217
|
-
);
|
|
218
|
-
|
|
219
|
-
const screenPropsValue = useMemo((): BaseScreenProps & { scrollTo: typeof scrollTo } => {
|
|
220
|
-
const { initialStep: _, ...rest } = screenProps;
|
|
221
|
-
return {
|
|
222
|
-
navigate,
|
|
223
|
-
goBack: handleGoBack,
|
|
224
|
-
onClose: closeBottomSheet,
|
|
225
|
-
onAuthenticated: closeBottomSheet,
|
|
226
|
-
theme: theme.mode,
|
|
227
|
-
currentScreen: currentScreen ?? undefined,
|
|
228
|
-
initialStep: currentStep ?? (screenProps?.initialStep as number | undefined),
|
|
229
|
-
onStepChange: handleStepChange,
|
|
230
|
-
scrollTo,
|
|
231
|
-
...rest,
|
|
232
|
-
};
|
|
233
|
-
}, [navigate, handleGoBack, theme.mode, currentScreen, currentStep, screenProps, handleStepChange, scrollTo]);
|
|
234
|
-
|
|
235
|
-
// The active screen, wrapped in its error boundary. Routed into EXACTLY ONE
|
|
236
|
-
// surface (the in-tree sheet OR the Dialog) based on the resolved
|
|
237
|
-
// presentation, so it never double-mounts.
|
|
238
|
-
const screenNode =
|
|
239
|
-
ScreenComponent && currentScreen ? (
|
|
240
|
-
<ScreenErrorBoundary screenName={currentScreen}>
|
|
241
|
-
<ScreenComponent {...screenPropsValue} />
|
|
242
|
-
</ScreenErrorBoundary>
|
|
243
|
-
) : null;
|
|
244
|
-
|
|
245
|
-
return (
|
|
246
|
-
<>
|
|
247
|
-
<BottomSheet
|
|
248
|
-
ref={sheetRef}
|
|
249
|
-
enablePanDownToClose
|
|
250
|
-
enableHandlePanningGesture
|
|
251
|
-
backgroundComponent={renderBackground}
|
|
252
|
-
style={styles.container}
|
|
253
|
-
onDismiss={handleDismiss}
|
|
254
|
-
onDismissAttempt={handleDismissAttempt}
|
|
255
|
-
scrollable={sheetConfig.scrollable}
|
|
256
|
-
manualActivation={sheetConfig.manualActivation}
|
|
257
|
-
dynamicBackdrop={sheetConfig.dynamicBackdrop}
|
|
258
|
-
handleComponent={sheetConfig.handleComponent}
|
|
259
|
-
>
|
|
260
|
-
{!isDialogPresentation && screenNode}
|
|
261
|
-
</BottomSheet>
|
|
262
|
-
{/* Always-mounted responsive Dialog surface for `presentation:
|
|
263
|
-
'dialog'` routes (currently the flagship photo picker). It stays
|
|
264
|
-
inert (`open={false}`, no child) for the ~28 sheet routes, so they
|
|
265
|
-
keep byte-for-byte identical behavior. `contentPadding={0}` +
|
|
266
|
-
the full-bleed black, rounded, clipped surface let the picker
|
|
267
|
-
paint edge-to-edge; `dismissOnBackdrop={false}` keeps the
|
|
268
|
-
controlled open state authoritative (dismissal flows through the
|
|
269
|
-
store, matching OxyAccountDialog). */}
|
|
270
|
-
<Dialog
|
|
271
|
-
open={isOpen && isDialogPresentation}
|
|
272
|
-
onClose={handleDismiss}
|
|
273
|
-
placement={DIALOG_PLACEMENT}
|
|
274
|
-
dismissOnBackdrop={false}
|
|
275
|
-
contentPadding={0}
|
|
276
|
-
maxWidth={640}
|
|
277
|
-
maxHeightRatio={0.9}
|
|
278
|
-
style={styles.dialogSurface}
|
|
279
|
-
panelStyle={styles.dialogSurface}
|
|
280
|
-
label={currentScreen ?? undefined}
|
|
281
|
-
>
|
|
282
|
-
{isDialogPresentation ? screenNode : null}
|
|
283
|
-
</Dialog>
|
|
284
|
-
</>
|
|
285
|
-
);
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
const styles = StyleSheet.create({
|
|
289
|
-
container: {
|
|
290
|
-
maxWidth: 800,
|
|
291
|
-
width: '100%',
|
|
292
|
-
alignSelf: 'center',
|
|
293
|
-
marginHorizontal: 'auto',
|
|
294
|
-
},
|
|
295
|
-
background: {
|
|
296
|
-
borderTopLeftRadius: 20,
|
|
297
|
-
borderTopRightRadius: 20,
|
|
298
|
-
overflow: 'hidden',
|
|
299
|
-
},
|
|
300
|
-
// Full-bleed black surface for `presentation: 'dialog'` routes. `overflow:
|
|
301
|
-
// 'hidden'` clips the picker's edge-to-edge black content to the panel's
|
|
302
|
-
// rounded corners (Dialog supplies the radius per placement); the black
|
|
303
|
-
// fill covers any sub-pixel gap behind the picker during entrance.
|
|
304
|
-
dialogSurface: {
|
|
305
|
-
backgroundColor: '#000000',
|
|
306
|
-
overflow: 'hidden',
|
|
307
|
-
},
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
export default React.memo(BottomSheetRouter);
|