@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,299 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { useMemo } from 'react';
|
|
4
|
-
import { View, TouchableOpacity, StyleSheet, Platform, ActivityIndicator } from 'react-native';
|
|
5
|
-
import AnimatedReanimated, { useAnimatedStyle, interpolate, Extrapolation } from 'react-native-reanimated';
|
|
6
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
7
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
8
|
-
import { useTheme } from '@oxyhq/bloom/theme';
|
|
9
|
-
import { PressableScale } from '@oxyhq/bloom/pressable-scale';
|
|
10
|
-
import { H4, Text } from '@oxyhq/bloom/typography';
|
|
11
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
export const getHeaderHeight = (variant = 'default', safeAreaTop = 0) => {
|
|
13
|
-
const paddingTop = Platform.OS === 'ios' ? Math.max(safeAreaTop, 50) : 16;
|
|
14
|
-
const paddingBottom = 12;
|
|
15
|
-
const contentHeight = variant === 'minimal' ? 36 : 40;
|
|
16
|
-
return paddingTop + contentHeight + paddingBottom;
|
|
17
|
-
};
|
|
18
|
-
const HeaderActionButton = ({
|
|
19
|
-
action,
|
|
20
|
-
colors
|
|
21
|
-
}) => {
|
|
22
|
-
const isText = !!action.text;
|
|
23
|
-
return /*#__PURE__*/_jsx(PressableScale, {
|
|
24
|
-
onPress: action.onPress,
|
|
25
|
-
disabled: action.disabled || action.loading,
|
|
26
|
-
style: [styles.actionButton, isText ? styles.textActionButton : styles.iconActionButton, {
|
|
27
|
-
backgroundColor: isText ? colors.tint : colors.card,
|
|
28
|
-
opacity: action.disabled ? 0.5 : 1
|
|
29
|
-
}],
|
|
30
|
-
children: action.loading ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
31
|
-
size: "small",
|
|
32
|
-
color: isText ? colors.card : colors.tint
|
|
33
|
-
}) : isText ? /*#__PURE__*/_jsx(Text, {
|
|
34
|
-
style: [styles.actionText, {
|
|
35
|
-
color: colors.card
|
|
36
|
-
}],
|
|
37
|
-
children: action.text
|
|
38
|
-
}) : /*#__PURE__*/_jsx(Ionicons, {
|
|
39
|
-
name: action.icon,
|
|
40
|
-
size: 18,
|
|
41
|
-
color: colors.tint
|
|
42
|
-
})
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
const Header = ({
|
|
46
|
-
title,
|
|
47
|
-
subtitle,
|
|
48
|
-
onBack,
|
|
49
|
-
onClose,
|
|
50
|
-
actions,
|
|
51
|
-
showBackButton = true,
|
|
52
|
-
showCloseButton = false,
|
|
53
|
-
variant = 'default',
|
|
54
|
-
elevation = 'subtle',
|
|
55
|
-
subtitleVariant = 'default',
|
|
56
|
-
titleAlignment = 'left',
|
|
57
|
-
scrollY
|
|
58
|
-
}) => {
|
|
59
|
-
const {
|
|
60
|
-
colors,
|
|
61
|
-
mode
|
|
62
|
-
} = useTheme();
|
|
63
|
-
const insets = useSafeAreaInsets();
|
|
64
|
-
const headerHeight = getHeaderHeight(variant, insets.top);
|
|
65
|
-
const isDark = mode === 'dark';
|
|
66
|
-
|
|
67
|
-
// Sticky behavior on native: header translates up as content scrolls, clamped
|
|
68
|
-
// so it never leaves the viewport. No-op on web (uses CSS `position: sticky`).
|
|
69
|
-
const animatedHeaderStyle = useAnimatedStyle(() => {
|
|
70
|
-
if (Platform.OS === 'web' || !scrollY) return {};
|
|
71
|
-
const translateY = interpolate(scrollY.value, [0, headerHeight], [0, -headerHeight], Extrapolation.CLAMP);
|
|
72
|
-
return {
|
|
73
|
-
transform: [{
|
|
74
|
-
translateY
|
|
75
|
-
}]
|
|
76
|
-
};
|
|
77
|
-
}, [scrollY, headerHeight]);
|
|
78
|
-
const elevationStyle = useMemo(() => {
|
|
79
|
-
switch (elevation) {
|
|
80
|
-
case 'subtle':
|
|
81
|
-
return Platform.select({
|
|
82
|
-
web: {
|
|
83
|
-
boxShadow: isDark ? '0 1px 3px rgba(0,0,0,0.3)' : '0 1px 3px rgba(0,0,0,0.1)'
|
|
84
|
-
},
|
|
85
|
-
default: {
|
|
86
|
-
shadowColor: '#000000',
|
|
87
|
-
shadowOffset: {
|
|
88
|
-
width: 0,
|
|
89
|
-
height: 1
|
|
90
|
-
},
|
|
91
|
-
shadowOpacity: isDark ? 0.3 : 0.1,
|
|
92
|
-
shadowRadius: 3,
|
|
93
|
-
elevation: 2
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
case 'prominent':
|
|
97
|
-
return Platform.select({
|
|
98
|
-
web: {
|
|
99
|
-
boxShadow: isDark ? '0 4px 12px rgba(0,0,0,0.4)' : '0 4px 12px rgba(0,0,0,0.15)'
|
|
100
|
-
},
|
|
101
|
-
default: {
|
|
102
|
-
shadowColor: '#000000',
|
|
103
|
-
shadowOffset: {
|
|
104
|
-
width: 0,
|
|
105
|
-
height: 4
|
|
106
|
-
},
|
|
107
|
-
shadowOpacity: isDark ? 0.4 : 0.15,
|
|
108
|
-
shadowRadius: 12,
|
|
109
|
-
elevation: 8
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
default:
|
|
113
|
-
return {};
|
|
114
|
-
}
|
|
115
|
-
}, [elevation, isDark]);
|
|
116
|
-
const containerStyle = useMemo(() => [styles.container, {
|
|
117
|
-
paddingTop: Platform.OS === 'ios' ? Math.max(insets.top, 50) : 16
|
|
118
|
-
},
|
|
119
|
-
// Header inside a ScrollView (scrollY provided) must not be absolutely positioned.
|
|
120
|
-
!scrollY && Platform.OS !== 'web' ? styles.absolute : null, {
|
|
121
|
-
borderBottomWidth: elevation === 'none' ? 0 : 1
|
|
122
|
-
}, elevationStyle], [insets.top, elevation, elevationStyle, scrollY]);
|
|
123
|
-
const titleAlign = titleAlignment === 'center' ? styles.alignCenter : titleAlignment === 'right' ? styles.alignRight : styles.alignLeft;
|
|
124
|
-
const HeaderContainer = Platform.OS === 'web' || !scrollY ? View : AnimatedReanimated.View;
|
|
125
|
-
const headerStyle = Platform.OS !== 'web' && scrollY !== undefined ? [containerStyle, animatedHeaderStyle] : containerStyle;
|
|
126
|
-
return /*#__PURE__*/_jsx(HeaderContainer, {
|
|
127
|
-
className: "bg-bg border-border",
|
|
128
|
-
style: headerStyle,
|
|
129
|
-
children: /*#__PURE__*/_jsxs(View, {
|
|
130
|
-
style: [styles.content, variant === 'minimal' && styles.contentMinimal],
|
|
131
|
-
children: [showBackButton && onBack ? /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
132
|
-
className: "bg-card",
|
|
133
|
-
style: styles.circleButton,
|
|
134
|
-
onPress: onBack,
|
|
135
|
-
activeOpacity: 0.7,
|
|
136
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
137
|
-
name: "chevron-back",
|
|
138
|
-
size: 18,
|
|
139
|
-
color: colors.tint
|
|
140
|
-
})
|
|
141
|
-
}) : null, /*#__PURE__*/_jsxs(View, {
|
|
142
|
-
style: [styles.titleContainer, titleAlign, variant === 'minimal' && styles.titleContainerMinimal],
|
|
143
|
-
children: [/*#__PURE__*/_jsx(H4, {
|
|
144
|
-
className: "text-text",
|
|
145
|
-
style: variant === 'minimal' ? styles.titleMinimal : styles.titleDefault,
|
|
146
|
-
numberOfLines: 1,
|
|
147
|
-
children: title
|
|
148
|
-
}), subtitle ? /*#__PURE__*/_jsx(Text, {
|
|
149
|
-
className: "text-text-secondary",
|
|
150
|
-
style: subtitleStyles[subtitleVariant],
|
|
151
|
-
numberOfLines: 1,
|
|
152
|
-
children: subtitle
|
|
153
|
-
}) : null]
|
|
154
|
-
}), actions?.length ? /*#__PURE__*/_jsx(View, {
|
|
155
|
-
style: styles.actionsRow,
|
|
156
|
-
children: actions.map((action, idx) => /*#__PURE__*/_jsx(HeaderActionButton, {
|
|
157
|
-
action: action,
|
|
158
|
-
colors: colors
|
|
159
|
-
}, action.key ?? idx))
|
|
160
|
-
}) : null, showCloseButton && onClose ? /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
161
|
-
className: "bg-card",
|
|
162
|
-
style: [styles.circleButton, styles.closeButton],
|
|
163
|
-
onPress: onClose,
|
|
164
|
-
activeOpacity: 0.7,
|
|
165
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
166
|
-
name: "close",
|
|
167
|
-
size: 18,
|
|
168
|
-
color: colors.text
|
|
169
|
-
})
|
|
170
|
-
}) : null]
|
|
171
|
-
})
|
|
172
|
-
});
|
|
173
|
-
};
|
|
174
|
-
const styles = StyleSheet.create({
|
|
175
|
-
container: {
|
|
176
|
-
paddingBottom: 12,
|
|
177
|
-
zIndex: 1000,
|
|
178
|
-
...Platform.select({
|
|
179
|
-
web: {
|
|
180
|
-
position: 'sticky',
|
|
181
|
-
top: 0,
|
|
182
|
-
left: 0,
|
|
183
|
-
right: 0
|
|
184
|
-
},
|
|
185
|
-
default: {}
|
|
186
|
-
})
|
|
187
|
-
},
|
|
188
|
-
absolute: {
|
|
189
|
-
position: 'absolute',
|
|
190
|
-
top: 0,
|
|
191
|
-
left: 0,
|
|
192
|
-
right: 0
|
|
193
|
-
},
|
|
194
|
-
content: {
|
|
195
|
-
flexDirection: 'row',
|
|
196
|
-
alignItems: 'center',
|
|
197
|
-
paddingHorizontal: 16,
|
|
198
|
-
position: 'relative',
|
|
199
|
-
minHeight: 40
|
|
200
|
-
},
|
|
201
|
-
contentMinimal: {
|
|
202
|
-
paddingHorizontal: 12,
|
|
203
|
-
minHeight: 36
|
|
204
|
-
},
|
|
205
|
-
circleButton: {
|
|
206
|
-
width: 32,
|
|
207
|
-
height: 32,
|
|
208
|
-
borderRadius: 16,
|
|
209
|
-
alignItems: 'center',
|
|
210
|
-
justifyContent: 'center',
|
|
211
|
-
marginRight: 10
|
|
212
|
-
},
|
|
213
|
-
closeButton: {
|
|
214
|
-
marginRight: 0,
|
|
215
|
-
marginLeft: 10
|
|
216
|
-
},
|
|
217
|
-
titleContainer: {
|
|
218
|
-
flex: 1,
|
|
219
|
-
justifyContent: 'center'
|
|
220
|
-
},
|
|
221
|
-
alignLeft: {
|
|
222
|
-
alignItems: 'flex-start'
|
|
223
|
-
},
|
|
224
|
-
alignCenter: {
|
|
225
|
-
alignItems: 'center'
|
|
226
|
-
},
|
|
227
|
-
alignRight: {
|
|
228
|
-
alignItems: 'flex-end'
|
|
229
|
-
},
|
|
230
|
-
titleContainerMinimal: {
|
|
231
|
-
alignItems: 'center',
|
|
232
|
-
marginHorizontal: 16
|
|
233
|
-
},
|
|
234
|
-
titleDefault: {
|
|
235
|
-
fontSize: 18,
|
|
236
|
-
fontWeight: '700',
|
|
237
|
-
letterSpacing: -0.5,
|
|
238
|
-
lineHeight: 22
|
|
239
|
-
},
|
|
240
|
-
titleMinimal: {
|
|
241
|
-
fontSize: 16,
|
|
242
|
-
fontWeight: '600',
|
|
243
|
-
letterSpacing: -0.3,
|
|
244
|
-
lineHeight: 20
|
|
245
|
-
},
|
|
246
|
-
actionsRow: {
|
|
247
|
-
flexDirection: 'row',
|
|
248
|
-
alignItems: 'center'
|
|
249
|
-
},
|
|
250
|
-
actionButton: {
|
|
251
|
-
alignItems: 'center',
|
|
252
|
-
justifyContent: 'center',
|
|
253
|
-
marginLeft: 10
|
|
254
|
-
},
|
|
255
|
-
iconActionButton: {
|
|
256
|
-
width: 32,
|
|
257
|
-
height: 32,
|
|
258
|
-
borderRadius: 16
|
|
259
|
-
},
|
|
260
|
-
textActionButton: {
|
|
261
|
-
paddingHorizontal: 14,
|
|
262
|
-
paddingVertical: 6,
|
|
263
|
-
borderRadius: 18,
|
|
264
|
-
minWidth: 56
|
|
265
|
-
},
|
|
266
|
-
actionText: {
|
|
267
|
-
fontSize: 14,
|
|
268
|
-
fontWeight: '600',
|
|
269
|
-
letterSpacing: -0.2
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
const subtitleStyles = StyleSheet.create({
|
|
273
|
-
default: {
|
|
274
|
-
fontSize: 14,
|
|
275
|
-
fontWeight: '400',
|
|
276
|
-
lineHeight: 17,
|
|
277
|
-
marginTop: 1
|
|
278
|
-
},
|
|
279
|
-
small: {
|
|
280
|
-
fontSize: 12,
|
|
281
|
-
fontWeight: '400',
|
|
282
|
-
lineHeight: 14
|
|
283
|
-
},
|
|
284
|
-
large: {
|
|
285
|
-
fontSize: 16,
|
|
286
|
-
fontWeight: '400',
|
|
287
|
-
lineHeight: 19,
|
|
288
|
-
marginTop: 3
|
|
289
|
-
},
|
|
290
|
-
muted: {
|
|
291
|
-
fontSize: 14,
|
|
292
|
-
fontWeight: '400',
|
|
293
|
-
lineHeight: 17,
|
|
294
|
-
marginTop: 1,
|
|
295
|
-
opacity: 0.7
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
export default Header;
|
|
299
|
-
//# sourceMappingURL=Header.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","View","TouchableOpacity","StyleSheet","Platform","ActivityIndicator","AnimatedReanimated","useAnimatedStyle","interpolate","Extrapolation","useSafeAreaInsets","Ionicons","useTheme","PressableScale","H4","Text","jsx","_jsx","jsxs","_jsxs","getHeaderHeight","variant","safeAreaTop","paddingTop","OS","Math","max","paddingBottom","contentHeight","HeaderActionButton","action","colors","isText","text","onPress","disabled","loading","style","styles","actionButton","textActionButton","iconActionButton","backgroundColor","tint","card","opacity","children","size","color","actionText","name","icon","Header","title","subtitle","onBack","onClose","actions","showBackButton","showCloseButton","elevation","subtitleVariant","titleAlignment","scrollY","mode","insets","headerHeight","top","isDark","animatedHeaderStyle","translateY","value","CLAMP","transform","elevationStyle","select","web","boxShadow","default","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","containerStyle","container","absolute","borderBottomWidth","titleAlign","alignCenter","alignRight","alignLeft","HeaderContainer","headerStyle","undefined","className","content","contentMinimal","circleButton","activeOpacity","titleContainer","titleContainerMinimal","titleMinimal","titleDefault","numberOfLines","subtitleStyles","length","actionsRow","map","idx","key","closeButton","create","zIndex","position","left","right","flexDirection","alignItems","paddingHorizontal","minHeight","borderRadius","justifyContent","marginRight","marginLeft","flex","marginHorizontal","fontSize","fontWeight","letterSpacing","lineHeight","paddingVertical","minWidth","marginTop","small","large","muted"],"sourceRoot":"../../../../src","sources":["ui/components/Header.tsx"],"mappings":";;AACA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SACIC,IAAI,EACJC,gBAAgB,EAChBC,UAAU,EACVC,QAAQ,EACRC,iBAAiB,QACd,cAAc;AACrB,OAAOC,kBAAkB,IAAIC,gBAAgB,EAAEC,WAAW,EAAEC,aAAa,QAA0B,yBAAyB;AAC5H,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,EAAE,EAAEC,IAAI,QAAQ,yBAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAiCnD,OAAO,MAAMC,eAAe,GAAGA,CAACC,OAA+B,GAAG,SAAS,EAAEC,WAAW,GAAG,CAAC,KAAa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AAE,KAAK;IAAEE,UAAU,EAAE,EAAE;IAAEG,SAAS,EAAE;EAAE,CAAC;EACxEG,KAAK,EAAE;IAAET,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE,KAAK;IAAEE,UAAU,EAAE,EAAE;IAAEG,SAAS,EAAE,CAAC;IAAEzF,OAAO,EAAE;EAAI;AACzF,CAAC,CAAC;AAEF,eAAeO,MAAM","ignoreList":[]}
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* OxyAccountDialog — the ONE unified account dialog for `@oxyhq/services`.
|
|
5
|
-
*
|
|
6
|
-
* Bloom `<Dialog>` chrome (header, back button, placement, scroll body) around
|
|
7
|
-
* the headless chooser logic, which lives in `OxyAuthChooser` — the account
|
|
8
|
-
* switcher, sign-in, sign-up, and QR views are ALL there, extracted so the
|
|
9
|
-
* same chooser can be mounted bare by a future host with no Dialog chrome
|
|
10
|
-
* (e.g. an auth.oxy.so hub page driving the cross-origin passkey popup, b2).
|
|
11
|
-
* This file owns ONLY the chrome: the title/subtitle per view, the back
|
|
12
|
-
* button, and the Bloom `<Dialog>` surface itself.
|
|
13
|
-
*
|
|
14
|
-
* The surface is Bloom's `<Dialog>` (`@oxyhq/bloom/dialog`) with a responsive
|
|
15
|
-
* `placement` — a bottom sheet on narrow viewports, a centered card on wide ones.
|
|
16
|
-
* It REPLACES the hand-rolled RN `<Modal>` + `<GestureHandlerRootView>` + manual
|
|
17
|
-
* backdrop/card wrapper this component used before. That RN `<Modal>` is invisible
|
|
18
|
-
* under React StrictMode on web: react-native-web's `ModalPortal` appends its host
|
|
19
|
-
* node during render but removes it in an effect cleanup and never re-attaches, so
|
|
20
|
-
* the dialog never paints in a dev Vite build. Bloom's `<Dialog>` renders through
|
|
21
|
-
* its own Portal and has no such lifecycle hazard.
|
|
22
|
-
*
|
|
23
|
-
* Open/close is CONTROLLED by `isAccountDialogOpen` (the `open` prop); the Dialog
|
|
24
|
-
* stays mounted whenever the controller exists so it can animate its own close.
|
|
25
|
-
* Backdrop / swipe-to-dismiss is disabled (`dismissOnBackdrop={false}`) on purpose:
|
|
26
|
-
* Bloom's controlled `bottom` placement does not fire `onClose` on a gesture or
|
|
27
|
-
* backdrop dismissal, so allowing it would desync `isAccountDialogOpen` from the
|
|
28
|
-
* sheet and block reopening. The header close button (and `OxyAuthChooser`'s
|
|
29
|
-
* `onComplete`) drive `closeAccountDialog`, which flips `open` and runs the exit
|
|
30
|
-
* animation.
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
import { useCallback, useSyncExternalStore } from 'react';
|
|
34
|
-
import { Pressable, ScrollView, StyleSheet, View } from 'react-native';
|
|
35
|
-
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
36
|
-
import { Dialog } from '@oxyhq/bloom/dialog';
|
|
37
|
-
import { Text } from '@oxyhq/bloom/typography';
|
|
38
|
-
import { useTheme } from '@oxyhq/bloom/theme';
|
|
39
|
-
import { useOxy } from "../context/OxyContext.js";
|
|
40
|
-
import { useI18n } from "../hooks/useI18n.js";
|
|
41
|
-
import OxyAuthChooser from "./OxyAuthChooser.js";
|
|
42
|
-
import { LogoIcon } from "./logo/LogoIcon.js";
|
|
43
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
44
|
-
/**
|
|
45
|
-
* The unified account dialog. Mounted once by `OxyProvider`; opened imperatively
|
|
46
|
-
* via `useOxy().openAccountDialog(view?)` or imperative `openAccountDialog('signin')`.
|
|
47
|
-
*/
|
|
48
|
-
const OxyAccountDialog = () => {
|
|
49
|
-
const {
|
|
50
|
-
accountDialogController: controller,
|
|
51
|
-
isAccountDialogOpen,
|
|
52
|
-
closeAccountDialog
|
|
53
|
-
} = useOxy();
|
|
54
|
-
const theme = useTheme();
|
|
55
|
-
const {
|
|
56
|
-
t
|
|
57
|
-
} = useI18n();
|
|
58
|
-
|
|
59
|
-
// A lightweight, header-only binding to the same controller `OxyAuthChooser`
|
|
60
|
-
// binds independently — cheap, and the established pattern here (
|
|
61
|
-
// `useSwitchableAccounts` also binds to this controller on its own).
|
|
62
|
-
const subscribe = useCallback(listener => controller ? controller.subscribe(listener) : () => undefined, [controller]);
|
|
63
|
-
const getSnapshot = useCallback(() => controller ? controller.getSnapshot() : EMPTY_SNAPSHOT, [controller]);
|
|
64
|
-
const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
65
|
-
if (!controller) {
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
const {
|
|
69
|
-
view
|
|
70
|
-
} = snapshot;
|
|
71
|
-
const showBack = view === 'qr' || view === 'signup' || view === 'add' && snapshot.accounts.length > 0;
|
|
72
|
-
return /*#__PURE__*/_jsxs(Dialog, {
|
|
73
|
-
open: isAccountDialogOpen,
|
|
74
|
-
onClose: closeAccountDialog,
|
|
75
|
-
placement: {
|
|
76
|
-
base: 'bottom',
|
|
77
|
-
md: 'center'
|
|
78
|
-
},
|
|
79
|
-
dismissOnBackdrop: false,
|
|
80
|
-
maxWidth: 420,
|
|
81
|
-
label: headerCopy(view, snapshot.accounts.length, t).title,
|
|
82
|
-
children: [/*#__PURE__*/_jsx(DialogHeader, {
|
|
83
|
-
snapshot: snapshot,
|
|
84
|
-
theme: theme,
|
|
85
|
-
t: t,
|
|
86
|
-
showBack: showBack,
|
|
87
|
-
onBack: () => controller.setView('accounts'),
|
|
88
|
-
onClose: closeAccountDialog
|
|
89
|
-
}), /*#__PURE__*/_jsx(ScrollView, {
|
|
90
|
-
style: styles.body,
|
|
91
|
-
contentContainerStyle: styles.bodyContent,
|
|
92
|
-
showsVerticalScrollIndicator: false,
|
|
93
|
-
children: /*#__PURE__*/_jsx(OxyAuthChooser, {
|
|
94
|
-
onComplete: closeAccountDialog
|
|
95
|
-
})
|
|
96
|
-
})]
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
// ---------------------------------------------------------------------------
|
|
101
|
-
// Header
|
|
102
|
-
// ---------------------------------------------------------------------------
|
|
103
|
-
|
|
104
|
-
const DialogHeader = ({
|
|
105
|
-
snapshot,
|
|
106
|
-
theme,
|
|
107
|
-
t,
|
|
108
|
-
showBack,
|
|
109
|
-
onBack,
|
|
110
|
-
onClose
|
|
111
|
-
}) => {
|
|
112
|
-
const {
|
|
113
|
-
title,
|
|
114
|
-
subtitle
|
|
115
|
-
} = headerCopy(snapshot.view, snapshot.accounts.length, t);
|
|
116
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
117
|
-
style: styles.header,
|
|
118
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
119
|
-
style: styles.headerBar,
|
|
120
|
-
children: [showBack ? /*#__PURE__*/_jsx(Pressable, {
|
|
121
|
-
onPress: onBack,
|
|
122
|
-
style: [styles.iconButton, {
|
|
123
|
-
backgroundColor: theme.colors.backgroundSecondary
|
|
124
|
-
}],
|
|
125
|
-
accessibilityRole: "button",
|
|
126
|
-
accessibilityLabel: t('common.actions.back') || 'Back',
|
|
127
|
-
children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
128
|
-
name: "chevron-left",
|
|
129
|
-
size: 22,
|
|
130
|
-
color: theme.colors.textSecondary
|
|
131
|
-
})
|
|
132
|
-
}) : /*#__PURE__*/_jsx(View, {
|
|
133
|
-
style: styles.iconButton
|
|
134
|
-
}), /*#__PURE__*/_jsx(LogoIcon, {
|
|
135
|
-
height: 34,
|
|
136
|
-
color: theme.colors.primary
|
|
137
|
-
}), /*#__PURE__*/_jsx(Pressable, {
|
|
138
|
-
onPress: onClose,
|
|
139
|
-
style: [styles.iconButton, {
|
|
140
|
-
backgroundColor: theme.colors.backgroundSecondary
|
|
141
|
-
}],
|
|
142
|
-
accessibilityRole: "button",
|
|
143
|
-
accessibilityLabel: t('common.actions.close') || 'Close',
|
|
144
|
-
children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
145
|
-
name: "close",
|
|
146
|
-
size: 20,
|
|
147
|
-
color: theme.colors.textSecondary
|
|
148
|
-
})
|
|
149
|
-
})]
|
|
150
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
151
|
-
style: [styles.title, {
|
|
152
|
-
color: theme.colors.text
|
|
153
|
-
}],
|
|
154
|
-
numberOfLines: 1,
|
|
155
|
-
children: title
|
|
156
|
-
}), subtitle ? /*#__PURE__*/_jsx(Text, {
|
|
157
|
-
style: [styles.subtitle, {
|
|
158
|
-
color: theme.colors.textSecondary
|
|
159
|
-
}],
|
|
160
|
-
numberOfLines: 2,
|
|
161
|
-
children: subtitle
|
|
162
|
-
}) : null]
|
|
163
|
-
});
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
// ---------------------------------------------------------------------------
|
|
167
|
-
// Copy + helpers
|
|
168
|
-
// ---------------------------------------------------------------------------
|
|
169
|
-
|
|
170
|
-
function headerCopy(view, accountCount, t) {
|
|
171
|
-
switch (view) {
|
|
172
|
-
case 'accounts':
|
|
173
|
-
return {
|
|
174
|
-
title: t('accountSwitcher.sections.yourAccounts') || 'Your accounts',
|
|
175
|
-
subtitle: t('signin.chooser.subtitle') || 'Choose which account to continue with.'
|
|
176
|
-
};
|
|
177
|
-
case 'qr':
|
|
178
|
-
return {
|
|
179
|
-
title: t('accountSwitcher.scanTitle') || 'Sign in with Oxy',
|
|
180
|
-
subtitle: t('accountSwitcher.scanSubtitle') || 'Scan with Commons on your phone.'
|
|
181
|
-
};
|
|
182
|
-
case 'signup':
|
|
183
|
-
return {
|
|
184
|
-
title: t('signup.title') || 'Create your account',
|
|
185
|
-
subtitle: t('signup.subtitle') || 'One identity for the whole ecosystem.'
|
|
186
|
-
};
|
|
187
|
-
default:
|
|
188
|
-
return accountCount > 0 ? {
|
|
189
|
-
title: t('signin.addAccountTitle') || 'Add another account',
|
|
190
|
-
subtitle: t('signin.addAccountSubtitle') || 'Sign in with another account.'
|
|
191
|
-
} : {
|
|
192
|
-
title: t('signin.title') || 'Sign in',
|
|
193
|
-
subtitle: t('signin.subtitle') || 'One identity for the whole ecosystem.'
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
const EMPTY_SNAPSHOT = {
|
|
198
|
-
view: 'accounts',
|
|
199
|
-
accounts: [],
|
|
200
|
-
activeAccountId: null,
|
|
201
|
-
loading: false,
|
|
202
|
-
error: null,
|
|
203
|
-
switchingAccountId: null,
|
|
204
|
-
signIn: {
|
|
205
|
-
phase: 'idle',
|
|
206
|
-
authorizeCode: null,
|
|
207
|
-
qrPayload: null,
|
|
208
|
-
expiresAt: null,
|
|
209
|
-
error: null
|
|
210
|
-
},
|
|
211
|
-
commonsAvailability: 'unknown'
|
|
212
|
-
};
|
|
213
|
-
const styles = StyleSheet.create({
|
|
214
|
-
header: {
|
|
215
|
-
alignItems: 'center',
|
|
216
|
-
marginBottom: 12
|
|
217
|
-
},
|
|
218
|
-
headerBar: {
|
|
219
|
-
width: '100%',
|
|
220
|
-
flexDirection: 'row',
|
|
221
|
-
alignItems: 'center',
|
|
222
|
-
justifyContent: 'space-between',
|
|
223
|
-
marginBottom: 8
|
|
224
|
-
},
|
|
225
|
-
iconButton: {
|
|
226
|
-
width: 32,
|
|
227
|
-
height: 32,
|
|
228
|
-
borderRadius: 16,
|
|
229
|
-
alignItems: 'center',
|
|
230
|
-
justifyContent: 'center'
|
|
231
|
-
},
|
|
232
|
-
title: {
|
|
233
|
-
fontSize: 22,
|
|
234
|
-
fontWeight: '800',
|
|
235
|
-
letterSpacing: -0.4,
|
|
236
|
-
textAlign: 'center',
|
|
237
|
-
marginTop: 6
|
|
238
|
-
},
|
|
239
|
-
subtitle: {
|
|
240
|
-
fontSize: 14,
|
|
241
|
-
lineHeight: 19,
|
|
242
|
-
textAlign: 'center',
|
|
243
|
-
marginTop: 4
|
|
244
|
-
},
|
|
245
|
-
body: {
|
|
246
|
-
width: '100%'
|
|
247
|
-
},
|
|
248
|
-
bodyContent: {
|
|
249
|
-
paddingTop: 4,
|
|
250
|
-
paddingBottom: 4
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
export default OxyAccountDialog;
|
|
254
|
-
//# sourceMappingURL=OxyAccountDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useSyncExternalStore","Pressable","ScrollView","StyleSheet","View","MaterialCommunityIcons","Dialog","Text","useTheme","useOxy","useI18n","OxyAuthChooser","LogoIcon","jsx","_jsx","jsxs","_jsxs","OxyAccountDialog","accountDialogController","controller","isAccountDialogOpen","closeAccountDialog","theme","t","subscribe","listener","undefined","getSnapshot","EMPTY_SNAPSHOT","snapshot","view","showBack","accounts","length","open","onClose","placement","base","md","dismissOnBackdrop","maxWidth","label","headerCopy","title","children","DialogHeader","onBack","setView","style","styles","body","contentContainerStyle","bodyContent","showsVerticalScrollIndicator","onComplete","subtitle","header","headerBar","onPress","iconButton","backgroundColor","colors","backgroundSecondary","accessibilityRole","accessibilityLabel","name","size","color","textSecondary","height","primary","text","numberOfLines","accountCount","activeAccountId","loading","error","switchingAccountId","signIn","phase","authorizeCode","qrPayload","expiresAt","commonsAvailability","create","alignItems","marginBottom","width","flexDirection","justifyContent","borderRadius","fontSize","fontWeight","letterSpacing","textAlign","marginTop","lineHeight","paddingTop","paddingBottom"],"sourceRoot":"../../../../src","sources":["ui/components/OxyAccountDialog.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,WAAW,EAAEC,oBAAoB,QAAQ,OAAO;AACzD,SAASC,SAAS,EAAEC,UAAU,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AACtE,SAASC,sBAAsB,QAAQ,oBAAoB;AAC3D,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,IAAI,QAAQ,yBAAyB;AAC9C,SAASC,QAAQ,QAAQ,oBAAoB;A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@@
|
|
|
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';
|
|
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,sBAAsB,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,C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