@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,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React, { useState, useCallback } from 'react';
|
|
4
|
-
import { View
|
|
4
|
+
import { View } from 'react-native';
|
|
5
5
|
import { toast } from '@oxyhq/bloom';
|
|
6
|
-
import Header from "../components/Header.js";
|
|
7
6
|
import { Loading } from '@oxyhq/bloom/loading';
|
|
8
7
|
import { Text } from '@oxyhq/bloom/typography';
|
|
9
8
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
10
9
|
import { SettingsIcon } from "../components/SettingsIcon.js";
|
|
11
10
|
import { useI18n } from "../hooks/useI18n.js";
|
|
11
|
+
import { useSurfaceHeader } from "../hooks/useSurfaceHeader.js";
|
|
12
12
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
13
13
|
import { useOxy } from "../context/OxyContext.js";
|
|
14
|
-
import {
|
|
15
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
+
import { surfaces } from '@oxyhq/bloom/surfaces';
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
16
|
const HistoryViewScreen = ({
|
|
17
17
|
onClose,
|
|
18
18
|
goBack
|
|
@@ -25,12 +25,13 @@ const HistoryViewScreen = ({
|
|
|
25
25
|
const {
|
|
26
26
|
t
|
|
27
27
|
} = useI18n();
|
|
28
|
+
useSurfaceHeader({
|
|
29
|
+
title: t('history.title') || 'History'
|
|
30
|
+
});
|
|
28
31
|
const bloomTheme = useTheme();
|
|
29
32
|
const [history, setHistory] = useState([]);
|
|
30
33
|
const [isLoading, setIsLoading] = useState(true);
|
|
31
34
|
const [isDeleting, setIsDeleting] = useState(false);
|
|
32
|
-
const deleteLast15Dialog = useDialogControl();
|
|
33
|
-
const clearAllDialog = useDialogControl();
|
|
34
35
|
const getStorage = async () => {
|
|
35
36
|
const isRN = typeof navigator !== 'undefined' && navigator.product === 'ReactNative';
|
|
36
37
|
if (isRN) {
|
|
@@ -79,6 +80,14 @@ const HistoryViewScreen = ({
|
|
|
79
80
|
load();
|
|
80
81
|
}, [user?.id]);
|
|
81
82
|
const handleDeleteLast15Minutes = useCallback(async () => {
|
|
83
|
+
const confirmed = await surfaces.confirm({
|
|
84
|
+
title: t('history.deleteLast15Minutes.title') || 'Delete Last 15 Minutes',
|
|
85
|
+
message: t('history.deleteLast15Minutes.confirm') || 'Delete last 15 minutes of history?',
|
|
86
|
+
confirmLabel: t('common.actions.delete') || 'Delete',
|
|
87
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
88
|
+
destructive: true
|
|
89
|
+
});
|
|
90
|
+
if (!confirmed) return;
|
|
82
91
|
try {
|
|
83
92
|
setIsDeleting(true);
|
|
84
93
|
const cutoff = new Date(Date.now() - 15 * 60 * 1000);
|
|
@@ -95,6 +104,14 @@ const HistoryViewScreen = ({
|
|
|
95
104
|
}
|
|
96
105
|
}, [history, user?.id, t]);
|
|
97
106
|
const handleClearAll = useCallback(async () => {
|
|
107
|
+
const confirmed = await surfaces.confirm({
|
|
108
|
+
title: t('history.clearAll.title') || 'Clear All History',
|
|
109
|
+
message: t('history.clearAll.confirm') || 'Clear all history? This cannot be undone.',
|
|
110
|
+
confirmLabel: t('history.clearAll.title') || 'Clear All',
|
|
111
|
+
cancelLabel: t('common.cancel') || 'Cancel',
|
|
112
|
+
destructive: true
|
|
113
|
+
});
|
|
114
|
+
if (!confirmed) return;
|
|
98
115
|
try {
|
|
99
116
|
setIsDeleting(true);
|
|
100
117
|
setHistory([]);
|
|
@@ -119,82 +136,49 @@ const HistoryViewScreen = ({
|
|
|
119
136
|
if (days < 7) return `${days} ${t('history.daysAgo') || 'days ago'}`;
|
|
120
137
|
return date.toLocaleDateString();
|
|
121
138
|
};
|
|
122
|
-
return /*#__PURE__*/
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
146
|
-
name: "delete-outline",
|
|
147
|
-
color: bloomTheme.colors.error
|
|
148
|
-
}),
|
|
149
|
-
title: t('history.clearAll.title') || 'Clear All History',
|
|
150
|
-
description: t('history.clearAll.subtitle') || 'Remove all history entries',
|
|
151
|
-
onPress: () => clearAllDialog.open(),
|
|
152
|
-
disabled: isDeleting || history.length === 0
|
|
153
|
-
})]
|
|
154
|
-
}), /*#__PURE__*/_jsx(SettingsListGroup, {
|
|
155
|
-
title: t('history.recent') || 'Recent History',
|
|
156
|
-
children: isLoading ? /*#__PURE__*/_jsx(Loading, {
|
|
157
|
-
size: "large",
|
|
158
|
-
color: bloomTheme.colors.text,
|
|
159
|
-
text: t('history.loading') || 'Loading history...'
|
|
160
|
-
}) : history.length === 0 ? /*#__PURE__*/_jsx(Text, {
|
|
161
|
-
className: "text-text-secondary text-center p-space-40",
|
|
162
|
-
children: t('history.empty') || 'No history yet'
|
|
163
|
-
}) : history.map(item => /*#__PURE__*/_jsx(SettingsListItem, {
|
|
164
|
-
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
165
|
-
name: item.type === 'search' ? 'magnify' : 'earth',
|
|
166
|
-
color: item.type === 'search' ? bloomTheme.colors.info : bloomTheme.colors.primary
|
|
167
|
-
}),
|
|
168
|
-
title: item.query,
|
|
169
|
-
description: formatTime(item.timestamp)
|
|
170
|
-
}, item.id))
|
|
139
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
140
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
141
|
+
className: "px-screen-margin pb-space-24",
|
|
142
|
+
children: [/*#__PURE__*/_jsxs(SettingsListGroup, {
|
|
143
|
+
title: t('history.actions') || 'Actions',
|
|
144
|
+
children: [/*#__PURE__*/_jsx(SettingsListItem, {
|
|
145
|
+
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
146
|
+
name: "clock-outline",
|
|
147
|
+
color: bloomTheme.colors.warning
|
|
148
|
+
}),
|
|
149
|
+
title: t('history.deleteLast15Minutes.title') || 'Delete Last 15 Minutes',
|
|
150
|
+
description: t('history.deleteLast15Minutes.subtitle') || 'Remove recent history entries',
|
|
151
|
+
onPress: handleDeleteLast15Minutes,
|
|
152
|
+
disabled: isDeleting || history.length === 0
|
|
153
|
+
}), /*#__PURE__*/_jsx(SettingsListItem, {
|
|
154
|
+
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
155
|
+
name: "delete-outline",
|
|
156
|
+
color: bloomTheme.colors.error
|
|
157
|
+
}),
|
|
158
|
+
title: t('history.clearAll.title') || 'Clear All History',
|
|
159
|
+
description: t('history.clearAll.subtitle') || 'Remove all history entries',
|
|
160
|
+
onPress: handleClearAll,
|
|
161
|
+
disabled: isDeleting || history.length === 0
|
|
171
162
|
})]
|
|
172
|
-
})
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
color: 'destructive',
|
|
192
|
-
onPress: handleClearAll
|
|
193
|
-
}, {
|
|
194
|
-
label: t('common.cancel') || 'Cancel',
|
|
195
|
-
color: 'cancel'
|
|
196
|
-
}]
|
|
197
|
-
})]
|
|
163
|
+
}), /*#__PURE__*/_jsx(SettingsListGroup, {
|
|
164
|
+
title: t('history.recent') || 'Recent History',
|
|
165
|
+
children: isLoading ? /*#__PURE__*/_jsx(Loading, {
|
|
166
|
+
size: "large",
|
|
167
|
+
color: bloomTheme.colors.text,
|
|
168
|
+
text: t('history.loading') || 'Loading history...'
|
|
169
|
+
}) : history.length === 0 ? /*#__PURE__*/_jsx(Text, {
|
|
170
|
+
className: "text-text-secondary text-center p-space-40",
|
|
171
|
+
children: t('history.empty') || 'No history yet'
|
|
172
|
+
}) : history.map(item => /*#__PURE__*/_jsx(SettingsListItem, {
|
|
173
|
+
icon: /*#__PURE__*/_jsx(SettingsIcon, {
|
|
174
|
+
name: item.type === 'search' ? 'magnify' : 'earth',
|
|
175
|
+
color: item.type === 'search' ? bloomTheme.colors.info : bloomTheme.colors.primary
|
|
176
|
+
}),
|
|
177
|
+
title: item.query,
|
|
178
|
+
description: formatTime(item.timestamp)
|
|
179
|
+
}, item.id))
|
|
180
|
+
})]
|
|
181
|
+
})
|
|
198
182
|
});
|
|
199
183
|
};
|
|
200
184
|
export default /*#__PURE__*/React.memo(HistoryViewScreen);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","useCallback","View","
|
|
1
|
+
{"version":3,"names":["React","useState","useCallback","View","toast","Loading","Text","SettingsListGroup","SettingsListItem","SettingsIcon","useI18n","useSurfaceHeader","useTheme","useOxy","surfaces","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","HistoryViewScreen","onClose","goBack","user","t","title","bloomTheme","history","setHistory","isLoading","setIsLoading","isDeleting","setIsDeleting","getStorage","isRN","navigator","product","mod","s","default","getItem","bind","setItem","removeItem","e","__DEV__","console","error","Error","k","window","localStorage","v","useEffect","load","storage","stored","id","parsed","JSON","parse","map","i","timestamp","Date","handleDeleteLast15Minutes","confirmed","confirm","message","confirmLabel","cancelLabel","destructive","cutoff","now","filtered","filter","item","stringify","success","handleClearAll","formatTime","date","diff","getTime","min","Math","floor","hrs","days","toLocaleDateString","children","className","icon","name","color","colors","warning","description","onPress","disabled","length","size","text","type","info","primary","query","memo"],"sourceRoot":"../../../../src","sources":["ui/screens/HistoryViewScreen.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AACpD,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,KAAK,QAAQ,cAAc;AACpC,SAASC,OAAO,QAAQ,sBAAsB;AAC9C,SAASC,IAAI,QAAQ,yBAAyB;AAC9C,SAASC,iBAAiB,EAAEC,gBAAgB,QAAQ,4BAA4B;AAChF,SAASC,YAAY,QAAQ,+BAA4B;AACzD,SAASC,OAAO,QAAQ,qBAAkB;AAC1C,SAASC,gBAAgB,QAAQ,8BAA2B;AAC5D,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,MAAM,QAAQ,0BAAuB;AAC9C,SAASC,QAAQ,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAIjD,MAAMC,iBAA4C,GAAGA,CAAC;EAAEC,OAAO;EAAEC;AAAO,CAAC,KAAK;EAC1E;EACA;EACA,MAAM;IAA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AI,KAAK,QAAQ,GAAG,SAAS,GAAG,OAAQ;YAACT,KAAK,EAAElB,IAAI,CAAC2B,IAAI,KAAK,QAAQ,GAAG7E,UAAU,CAACqE,MAAM,CAACS,IAAI,GAAG9E,UAAU,CAACqE,MAAM,CAACU;UAAQ,CAAE,CAAE;UAC/JhF,KAAK,EAAEmD,IAAI,CAAC8B,KAAM;UAClBT,WAAW,EAAEjB,UAAU,CAACJ,IAAI,CAACb,SAAS;QAAE,GAHnCa,IAAI,CAACnB,EAIb,CACJ;MAAC,CACa,CAAC;IAAA,CAClB;EAAC,CACb,CAAC;AAEX,CAAC;AAED,4BAAe1D,KAAK,CAAC4G,IAAI,CAACvF,iBAAiB,CAAC","ignoreList":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
4
|
-
import { View, StyleSheet,
|
|
4
|
+
import { View, StyleSheet, TouchableOpacity } from 'react-native';
|
|
5
5
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
6
6
|
import { Ionicons } from '@expo/vector-icons';
|
|
7
7
|
import { toast } from '@oxyhq/bloom';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { Text } from '@oxyhq/bloom/typography';
|
|
9
|
+
import { Search } from '@oxyhq/bloom/search';
|
|
10
10
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
11
11
|
import { SUPPORTED_LANGUAGES, getNativeLanguageName } from '@oxyhq/core';
|
|
12
|
-
import Header from "../components/Header.js";
|
|
13
12
|
import { useI18n } from "../hooks/useI18n.js";
|
|
13
|
+
import { useSurfaceHeader } from "../hooks/useSurfaceHeader.js";
|
|
14
14
|
import { useOxy } from "../context/OxyContext.js";
|
|
15
15
|
import { addLocale, removeLocale, setPrimaryLocale } from "../hooks/useLanguageManagement.js";
|
|
16
16
|
import { useUpdateProfile } from "../hooks/mutations/useAccountMutations.js";
|
|
@@ -31,10 +31,7 @@ const CATALOG_BY_CODE = new Map(SUPPORTED_LANGUAGES.map(entry => [entry.code, en
|
|
|
31
31
|
* (`updateProfile({ languages })`, primary first) and every Oxy app follows it;
|
|
32
32
|
* when signed out a single local override is stored on-device.
|
|
33
33
|
*/
|
|
34
|
-
const LanguageSelectorScreen = ({
|
|
35
|
-
goBack,
|
|
36
|
-
onClose
|
|
37
|
-
}) => {
|
|
34
|
+
const LanguageSelectorScreen = () => {
|
|
38
35
|
const {
|
|
39
36
|
user,
|
|
40
37
|
isAuthenticated,
|
|
@@ -50,6 +47,13 @@ const LanguageSelectorScreen = ({
|
|
|
50
47
|
const [query, setQuery] = useState('');
|
|
51
48
|
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
52
49
|
|
|
50
|
+
// The Dialog owns the nav header + large collapsing title; this screen just
|
|
51
|
+
// declares its title/subtitle.
|
|
52
|
+
useSurfaceHeader({
|
|
53
|
+
title: t('language.title'),
|
|
54
|
+
subtitle: t('language.subtitle') || undefined
|
|
55
|
+
});
|
|
56
|
+
|
|
53
57
|
// The current ordered selection: the account locales when signed in, else
|
|
54
58
|
// the single guest/device locale. Always non-empty (`currentLanguage`
|
|
55
59
|
// resolves to the device or fallback locale).
|
|
@@ -135,108 +139,76 @@ const LanguageSelectorScreen = ({
|
|
|
135
139
|
})
|
|
136
140
|
});
|
|
137
141
|
return /*#__PURE__*/_jsxs(View, {
|
|
138
|
-
className: "
|
|
139
|
-
children: [/*#__PURE__*/_jsx(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
className: "text-text",
|
|
154
|
-
style: styles.bigTitle,
|
|
155
|
-
children: t('language.title')
|
|
156
|
-
}), t('language.subtitle') ? /*#__PURE__*/_jsx(Text, {
|
|
157
|
-
className: "text-text-secondary mt-space-2",
|
|
158
|
-
style: styles.bigSubtitle,
|
|
159
|
-
children: t('language.subtitle')
|
|
160
|
-
}) : null]
|
|
161
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
162
|
-
className: "mb-space-16",
|
|
163
|
-
children: /*#__PURE__*/_jsx(SearchInput, {
|
|
164
|
-
value: query,
|
|
165
|
-
onChangeText: setQuery,
|
|
166
|
-
onClearText: () => setQuery(''),
|
|
167
|
-
label: t('language.search') || 'Search languages'
|
|
168
|
-
})
|
|
169
|
-
}), /*#__PURE__*/_jsx(SettingsListGroup, {
|
|
170
|
-
title: t('language.selected'),
|
|
171
|
-
children: selectedEntries.map((entry, index) => {
|
|
172
|
-
const isPrimary = index === 0;
|
|
173
|
-
const canRemove = selected.length > 1;
|
|
174
|
-
return /*#__PURE__*/_jsx(SettingsListItem, {
|
|
175
|
-
icon: renderChip(entry),
|
|
176
|
-
title: entry.nativeName,
|
|
177
|
-
description: entry.name,
|
|
178
|
-
onPress: isPrimary ? undefined : () => handleSetPrimary(entry.code),
|
|
179
|
-
disabled: isBusy,
|
|
180
|
-
accessibilityLabel: isPrimary ? `${entry.name} — ${t('language.primary')}` : entry.name,
|
|
181
|
-
rightElement: isPrimary ? /*#__PURE__*/_jsx(View, {
|
|
182
|
-
className: "bg-fill-secondary rounded-full px-space-8 py-space-2",
|
|
183
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
184
|
-
className: "text-primary",
|
|
185
|
-
style: styles.primaryBadge,
|
|
186
|
-
children: t('language.primary')
|
|
187
|
-
})
|
|
188
|
-
}) : canRemove ? /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
189
|
-
onPress: () => handleRemove(entry.code),
|
|
190
|
-
disabled: isBusy,
|
|
191
|
-
hitSlop: {
|
|
192
|
-
top: 8,
|
|
193
|
-
bottom: 8,
|
|
194
|
-
left: 8,
|
|
195
|
-
right: 8
|
|
196
|
-
},
|
|
197
|
-
accessibilityRole: "button",
|
|
198
|
-
accessibilityLabel: `${t('language.remove')} ${entry.name}`,
|
|
199
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
200
|
-
name: "close-circle",
|
|
201
|
-
size: REMOVE_ICON_SIZE,
|
|
202
|
-
color: bloomTheme.colors.textSecondary
|
|
203
|
-
})
|
|
204
|
-
}) : undefined,
|
|
205
|
-
showChevron: false
|
|
206
|
-
}, entry.code);
|
|
207
|
-
})
|
|
208
|
-
}), /*#__PURE__*/_jsx(SettingsListGroup, {
|
|
209
|
-
title: t('language.available'),
|
|
210
|
-
children: availableEntries.map(entry => /*#__PURE__*/_jsx(SettingsListItem, {
|
|
142
|
+
className: "pt-space-24 pb-space-24 px-screen-margin",
|
|
143
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
144
|
+
className: "mb-space-16",
|
|
145
|
+
children: /*#__PURE__*/_jsx(Search, {
|
|
146
|
+
value: query,
|
|
147
|
+
onChangeText: setQuery,
|
|
148
|
+
onClearText: () => setQuery(''),
|
|
149
|
+
label: t('language.search') || 'Search languages'
|
|
150
|
+
})
|
|
151
|
+
}), /*#__PURE__*/_jsx(SettingsListGroup, {
|
|
152
|
+
title: t('language.selected'),
|
|
153
|
+
children: selectedEntries.map((entry, index) => {
|
|
154
|
+
const isPrimary = index === 0;
|
|
155
|
+
const canRemove = selected.length > 1;
|
|
156
|
+
return /*#__PURE__*/_jsx(SettingsListItem, {
|
|
211
157
|
icon: renderChip(entry),
|
|
212
158
|
title: entry.nativeName,
|
|
213
159
|
description: entry.name,
|
|
214
|
-
onPress: () =>
|
|
160
|
+
onPress: isPrimary ? undefined : () => handleSetPrimary(entry.code),
|
|
215
161
|
disabled: isBusy,
|
|
216
|
-
accessibilityLabel: entry.name,
|
|
217
|
-
rightElement: /*#__PURE__*/_jsx(
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
162
|
+
accessibilityLabel: isPrimary ? `${entry.name} — ${t('language.primary')}` : entry.name,
|
|
163
|
+
rightElement: isPrimary ? /*#__PURE__*/_jsx(View, {
|
|
164
|
+
className: "bg-fill-secondary rounded-full px-space-8 py-space-2",
|
|
165
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
166
|
+
className: "text-primary",
|
|
167
|
+
style: styles.primaryBadge,
|
|
168
|
+
children: t('language.primary')
|
|
169
|
+
})
|
|
170
|
+
}) : canRemove ? /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
171
|
+
onPress: () => handleRemove(entry.code),
|
|
172
|
+
disabled: isBusy,
|
|
173
|
+
hitSlop: {
|
|
174
|
+
top: 8,
|
|
175
|
+
bottom: 8,
|
|
176
|
+
left: 8,
|
|
177
|
+
right: 8
|
|
178
|
+
},
|
|
179
|
+
accessibilityRole: "button",
|
|
180
|
+
accessibilityLabel: `${t('language.remove')} ${entry.name}`,
|
|
181
|
+
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
182
|
+
name: "close-circle",
|
|
183
|
+
size: REMOVE_ICON_SIZE,
|
|
184
|
+
color: bloomTheme.colors.textSecondary
|
|
185
|
+
})
|
|
186
|
+
}) : undefined,
|
|
222
187
|
showChevron: false
|
|
223
|
-
}, entry.code)
|
|
224
|
-
})
|
|
188
|
+
}, entry.code);
|
|
189
|
+
})
|
|
190
|
+
}), /*#__PURE__*/_jsx(SettingsListGroup, {
|
|
191
|
+
title: t('language.available'),
|
|
192
|
+
children: availableEntries.map(entry => /*#__PURE__*/_jsx(SettingsListItem, {
|
|
193
|
+
icon: renderChip(entry),
|
|
194
|
+
title: entry.nativeName,
|
|
195
|
+
description: entry.name,
|
|
196
|
+
onPress: () => handleAdd(entry.code),
|
|
197
|
+
disabled: isBusy,
|
|
198
|
+
accessibilityLabel: entry.name,
|
|
199
|
+
rightElement: /*#__PURE__*/_jsx(Ionicons, {
|
|
200
|
+
name: "add-circle-outline",
|
|
201
|
+
size: REMOVE_ICON_SIZE,
|
|
202
|
+
color: bloomTheme.colors.textSecondary
|
|
203
|
+
}),
|
|
204
|
+
showChevron: false
|
|
205
|
+
}, entry.code))
|
|
225
206
|
})]
|
|
226
207
|
});
|
|
227
208
|
};
|
|
228
209
|
|
|
229
210
|
// StyleSheet retained ONLY for measured layout (sizes / line metrics) — no colors.
|
|
230
211
|
const styles = StyleSheet.create({
|
|
231
|
-
bigTitle: {
|
|
232
|
-
fontSize: 34,
|
|
233
|
-
lineHeight: 40,
|
|
234
|
-
letterSpacing: -0.5
|
|
235
|
-
},
|
|
236
|
-
bigSubtitle: {
|
|
237
|
-
fontSize: 16,
|
|
238
|
-
lineHeight: 22
|
|
239
|
-
},
|
|
240
212
|
chip: {
|
|
241
213
|
width: CHIP_SIZE,
|
|
242
214
|
height: CHIP_SIZE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useMemo","useState","View","StyleSheet","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useMemo","useState","View","StyleSheet","TouchableOpacity","useTheme","Ionicons","toast","Text","Search","SettingsListGroup","SettingsListItem","SUPPORTED_LANGUAGES","getNativeLanguageName","useI18n","useSurfaceHeader","useOxy","addLocale","removeLocale","setPrimaryLocale","useUpdateProfile","jsx","_jsx","jsxs","_jsxs","CHIP_SIZE","REMOVE_ICON_SIZE","CATALOG_BY_CODE","Map","map","entry","code","LanguageSelectorScreen","user","isAuthenticated","currentLanguage","currentLanguages","setLanguage","t","bloomTheme","updateProfile","query","setQuery","isSubmitting","setIsSubmitting","title","subtitle","undefined","selected","length","selectedSet","Set","selectedEntries","get","filter","availableEntries","normalizedQuery","trim","toLowerCase","has","name","includes","nativeName","isBusy","isPending","commitSelection","next","announceCode","id","mutateAsync","languages","success","lang","error","__DEV__","console","handleAdd","handleSetPrimary","handleRemove","renderChip","className","style","styles","chip","children","chipLabel","language","toUpperCase","value","onChangeText","onClearText","label","index","isPrimary","canRemove","icon","description","onPress","disabled","accessibilityLabel","rightElement","primaryBadge","hitSlop","top","bottom","left","right","accessibilityRole","size","color","colors","textSecondary","showChevron","create","width","height","borderRadius","fontSize","fontWeight","memo"],"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AAC8B,IAAK;QACxBqC,OAAO,EAAEA,CAAA,KAAMrB,SAAS,CAAC9C,KAAK,CAACC,IAAI,CAAE;QACrCmE,QAAQ,EAAEnC,MAAO;QACjBoC,kBAAkB,EAAErE,KAAK,CAAC8B,IAAK;QAC/BwC,YAAY,eACR9E,IAAA,CAAChB,QAAQ;UACLsD,IAAI,EAAC,oBAAoB;UACzBgD,IAAI,EAAElF,gBAAiB;UACvBmF,KAAK,EAAEtE,UAAU,CAACuE,MAAM,CAACC;QAAc,CAC1C,CACJ;QACDC,WAAW,EAAE;MAAM,GAddlF,KAAK,CAACC,IAed,CACJ;IAAC,CACa,CAAC;EAAA,CACtB,CAAC;AAEf,CAAC;;AAED;AACA,MAAMmD,MAAM,GAAG/E,UAAU,CAAC8G,MAAM,CAAC;EAC7B9B,IAAI,EAAE;IACF+B,KAAK,EAAEzF,SAAS;IAChB0F,MAAM,EAAE1F,SAAS;IACjB2F,YAAY,EAAE3F,SAAS,GAAG;EAC9B,CAAC;EACD4D,SAAS,EAAE;IACPgC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EAChB,CAAC;EACDjB,YAAY,EAAE;IACVgB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EAChB;AACJ,CAAC,CAAC;;AAEF;AACA,4BAAexH,KAAK,CAACyH,IAAI,CAACvF,sBAAsB,CAAC","ignoreList":[]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useCallback, useState } from 'react';
|
|
4
|
-
import { View,
|
|
4
|
+
import { View, StyleSheet } from 'react-native';
|
|
5
5
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
6
6
|
import { Text } from '@oxyhq/bloom/typography';
|
|
7
7
|
import { IconCircle } from '@oxyhq/bloom/icon-circle';
|
|
8
8
|
import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from '@oxyhq/bloom/accordion';
|
|
9
9
|
import * as Icons from '@oxyhq/bloom/icons';
|
|
10
|
-
import Header from "../components/Header.js";
|
|
11
10
|
import { useI18n } from "../hooks/useI18n.js";
|
|
12
|
-
import {
|
|
11
|
+
import { useSurfaceHeader } from "../hooks/useSurfaceHeader.js";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
const INFO_SECTIONS = [{
|
|
14
14
|
id: 'what',
|
|
15
15
|
titleKey: 'learnMoreUsernames.sections.what.title',
|
|
@@ -44,6 +44,9 @@ const LearnMoreUsernamesScreen = ({
|
|
|
44
44
|
const {
|
|
45
45
|
t
|
|
46
46
|
} = useI18n();
|
|
47
|
+
useSurfaceHeader({
|
|
48
|
+
title: t('learnMoreUsernames.introTitle')
|
|
49
|
+
});
|
|
47
50
|
// Start with the first section expanded.
|
|
48
51
|
const [expandedIds, setExpandedIds] = useState(['what']);
|
|
49
52
|
const handleAccordionChange = useCallback(value => {
|
|
@@ -55,17 +58,9 @@ const LearnMoreUsernamesScreen = ({
|
|
|
55
58
|
setExpandedIds([value]);
|
|
56
59
|
}
|
|
57
60
|
}, []);
|
|
58
|
-
return /*#__PURE__*/
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
title: t('learnMoreUsernames.introTitle'),
|
|
62
|
-
onBack: goBack || onClose,
|
|
63
|
-
variant: "minimal",
|
|
64
|
-
elevation: "subtle"
|
|
65
|
-
}), /*#__PURE__*/_jsxs(ScrollView, {
|
|
66
|
-
className: "flex-1 px-screen-margin",
|
|
67
|
-
showsVerticalScrollIndicator: false,
|
|
68
|
-
contentContainerClassName: "pb-space-32",
|
|
61
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
62
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
63
|
+
className: "px-screen-margin pb-space-32",
|
|
69
64
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
70
65
|
className: "items-center py-space-24 gap-space-12",
|
|
71
66
|
children: [/*#__PURE__*/_jsx(IconCircle, {
|
|
@@ -108,7 +103,7 @@ const LearnMoreUsernamesScreen = ({
|
|
|
108
103
|
className: "font-sans text-caption text-text-tertiary text-center mt-space-16",
|
|
109
104
|
children: t('learnMoreUsernames.footer')
|
|
110
105
|
})]
|
|
111
|
-
})
|
|
106
|
+
})
|
|
112
107
|
});
|
|
113
108
|
};
|
|
114
109
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useState","View","
|
|
1
|
+
{"version":3,"names":["useCallback","useState","View","StyleSheet","useTheme","Text","IconCircle","Accordion","AccordionItem","AccordionTrigger","AccordionContent","Icons","useI18n","useSurfaceHeader","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","INFO_SECTIONS","id","titleKey","contentKey","Icon","At_Stroke2_Corner0_Rounded","BulletList_Stroke2_Corner0_Rounded","Key_Stroke2_Corner2_Rounded","ArrowRotateClockwise_Stroke2_Corner0_Rounded","Sparkle_Stroke2_Corner0_Rounded","LearnMoreUsernamesScreen","onClose","goBack","bloomTheme","t","title","expandedIds","setExpandedIds","handleAccordionChange","value","Array","isArray","children","className","icon","type","onValueChange","map","style","styles","iconSquare","size","color","colors","primary","create","width","height","alignItems","justifyContent"],"sourceRoot":"../../../../src","sources":["ui/screens/LearnMoreUsernamesScreen.tsx"],"mappings":";;AACA,SAASA,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAC7C,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,IAAI,QAAQ,yBAAyB;AAC9C,SAASC,UAAU,QAAQ,0BAA0B;AACrD,SACIC,SAAS,EACTC,aAAa,EACbC,gBAAgB,EAChBC,gBAAgB,QACb,wBAAwB;AAC/B,OAAO,KAAKC,KAAK,MAAM,oBAAoB;AAG3C,SAASC,OAAO,QAAQ,qBAAkB;AAC1C,SAASC,gBAAgB,QAAQ,8BAA2B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,E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