@entropy-softworks/ui 2026.7.31
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/CHANGELOG.md +96 -0
- package/LICENSE +21 -0
- package/README.md +115 -0
- package/lib/components/auth/LockOverlay.d.ts +22 -0
- package/lib/components/auth/LockOverlay.d.ts.map +1 -0
- package/lib/components/auth/LockOverlay.jsx +82 -0
- package/lib/components/auth/LockOverlay.jsx.map +1 -0
- package/lib/components/auth/PasswordStrengthMeter.d.ts +12 -0
- package/lib/components/auth/PasswordStrengthMeter.d.ts.map +1 -0
- package/lib/components/auth/PasswordStrengthMeter.jsx +81 -0
- package/lib/components/auth/PasswordStrengthMeter.jsx.map +1 -0
- package/lib/components/auth/ProtectedRoute.d.ts +24 -0
- package/lib/components/auth/ProtectedRoute.d.ts.map +1 -0
- package/lib/components/auth/ProtectedRoute.jsx +56 -0
- package/lib/components/auth/ProtectedRoute.jsx.map +1 -0
- package/lib/components/auth/PwnedPasswordWarning.d.ts +13 -0
- package/lib/components/auth/PwnedPasswordWarning.d.ts.map +1 -0
- package/lib/components/auth/PwnedPasswordWarning.jsx +29 -0
- package/lib/components/auth/PwnedPasswordWarning.jsx.map +1 -0
- package/lib/components/auth/index.d.ts +5 -0
- package/lib/components/auth/index.d.ts.map +1 -0
- package/lib/components/auth/index.js +5 -0
- package/lib/components/auth/index.js.map +1 -0
- package/lib/components/bottom-nav.d.ts +25 -0
- package/lib/components/bottom-nav.d.ts.map +1 -0
- package/lib/components/bottom-nav.jsx +51 -0
- package/lib/components/bottom-nav.jsx.map +1 -0
- package/lib/components/button.d.ts +16 -0
- package/lib/components/button.d.ts.map +1 -0
- package/lib/components/button.jsx +73 -0
- package/lib/components/button.jsx.map +1 -0
- package/lib/components/card.d.ts +22 -0
- package/lib/components/card.d.ts.map +1 -0
- package/lib/components/card.jsx +36 -0
- package/lib/components/card.jsx.map +1 -0
- package/lib/components/checkbox.d.ts +12 -0
- package/lib/components/checkbox.d.ts.map +1 -0
- package/lib/components/checkbox.jsx +16 -0
- package/lib/components/checkbox.jsx.map +1 -0
- package/lib/components/connection-settings.d.ts +41 -0
- package/lib/components/connection-settings.d.ts.map +1 -0
- package/lib/components/connection-settings.jsx +354 -0
- package/lib/components/connection-settings.jsx.map +1 -0
- package/lib/components/context-menu.d.ts +52 -0
- package/lib/components/context-menu.d.ts.map +1 -0
- package/lib/components/context-menu.jsx +24 -0
- package/lib/components/context-menu.jsx.map +1 -0
- package/lib/components/data-table.d.ts +59 -0
- package/lib/components/data-table.d.ts.map +1 -0
- package/lib/components/data-table.jsx +101 -0
- package/lib/components/data-table.jsx.map +1 -0
- package/lib/components/dialog.d.ts +58 -0
- package/lib/components/dialog.d.ts.map +1 -0
- package/lib/components/dialog.jsx +197 -0
- package/lib/components/dialog.jsx.map +1 -0
- package/lib/components/dropdown-menu.d.ts +55 -0
- package/lib/components/dropdown-menu.d.ts.map +1 -0
- package/lib/components/dropdown-menu.jsx +38 -0
- package/lib/components/dropdown-menu.jsx.map +1 -0
- package/lib/components/entropy-boot-splash.d.ts +24 -0
- package/lib/components/entropy-boot-splash.d.ts.map +1 -0
- package/lib/components/entropy-boot-splash.jsx +83 -0
- package/lib/components/entropy-boot-splash.jsx.map +1 -0
- package/lib/components/entropy-mark-animated.d.ts +20 -0
- package/lib/components/entropy-mark-animated.d.ts.map +1 -0
- package/lib/components/entropy-mark-animated.jsx +148 -0
- package/lib/components/entropy-mark-animated.jsx.map +1 -0
- package/lib/components/entropy-mark-geometry.d.ts +8 -0
- package/lib/components/entropy-mark-geometry.d.ts.map +1 -0
- package/lib/components/entropy-mark-geometry.js +10 -0
- package/lib/components/entropy-mark-geometry.js.map +1 -0
- package/lib/components/entropy-mark-sequential.d.ts +12 -0
- package/lib/components/entropy-mark-sequential.d.ts.map +1 -0
- package/lib/components/entropy-mark-sequential.jsx +53 -0
- package/lib/components/entropy-mark-sequential.jsx.map +1 -0
- package/lib/components/entropy-mark.d.ts +29 -0
- package/lib/components/entropy-mark.d.ts.map +1 -0
- package/lib/components/entropy-mark.jsx +66 -0
- package/lib/components/entropy-mark.jsx.map +1 -0
- package/lib/components/error-boundary.d.ts +31 -0
- package/lib/components/error-boundary.d.ts.map +1 -0
- package/lib/components/error-boundary.jsx +40 -0
- package/lib/components/error-boundary.jsx.map +1 -0
- package/lib/components/index.d.ts +41 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +43 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/input.d.ts +26 -0
- package/lib/components/input.d.ts.map +1 -0
- package/lib/components/input.jsx +95 -0
- package/lib/components/input.jsx.map +1 -0
- package/lib/components/item-icon.d.ts +32 -0
- package/lib/components/item-icon.d.ts.map +1 -0
- package/lib/components/item-icon.jsx +54 -0
- package/lib/components/item-icon.jsx.map +1 -0
- package/lib/components/label.d.ts +13 -0
- package/lib/components/label.d.ts.map +1 -0
- package/lib/components/label.jsx +9 -0
- package/lib/components/label.jsx.map +1 -0
- package/lib/components/legal-dialog.d.ts +18 -0
- package/lib/components/legal-dialog.d.ts.map +1 -0
- package/lib/components/legal-dialog.jsx +31 -0
- package/lib/components/legal-dialog.jsx.map +1 -0
- package/lib/components/license-gate.d.ts +17 -0
- package/lib/components/license-gate.d.ts.map +1 -0
- package/lib/components/license-gate.jsx +21 -0
- package/lib/components/license-gate.jsx.map +1 -0
- package/lib/components/logo.d.ts +15 -0
- package/lib/components/logo.d.ts.map +1 -0
- package/lib/components/logo.jsx +20 -0
- package/lib/components/logo.jsx.map +1 -0
- package/lib/components/onboarding-wizard.d.ts +89 -0
- package/lib/components/onboarding-wizard.d.ts.map +1 -0
- package/lib/components/onboarding-wizard.jsx +185 -0
- package/lib/components/onboarding-wizard.jsx.map +1 -0
- package/lib/components/pagination.d.ts +43 -0
- package/lib/components/pagination.d.ts.map +1 -0
- package/lib/components/pagination.jsx +72 -0
- package/lib/components/pagination.jsx.map +1 -0
- package/lib/components/password-generator.d.ts +15 -0
- package/lib/components/password-generator.d.ts.map +1 -0
- package/lib/components/password-generator.jsx +273 -0
- package/lib/components/password-generator.jsx.map +1 -0
- package/lib/components/pin-pad.d.ts +20 -0
- package/lib/components/pin-pad.d.ts.map +1 -0
- package/lib/components/pin-pad.jsx +93 -0
- package/lib/components/pin-pad.jsx.map +1 -0
- package/lib/components/popover.d.ts +27 -0
- package/lib/components/popover.d.ts.map +1 -0
- package/lib/components/popover.jsx +18 -0
- package/lib/components/popover.jsx.map +1 -0
- package/lib/components/profile/ProfileDialog.d.ts +25 -0
- package/lib/components/profile/ProfileDialog.d.ts.map +1 -0
- package/lib/components/profile/ProfileDialog.jsx +71 -0
- package/lib/components/profile/ProfileDialog.jsx.map +1 -0
- package/lib/components/profile/ProfileTab.d.ts +12 -0
- package/lib/components/profile/ProfileTab.d.ts.map +1 -0
- package/lib/components/profile/ProfileTab.jsx +112 -0
- package/lib/components/profile/ProfileTab.jsx.map +1 -0
- package/lib/components/profile/SecurityTab.d.ts +32 -0
- package/lib/components/profile/SecurityTab.d.ts.map +1 -0
- package/lib/components/profile/SecurityTab.jsx +145 -0
- package/lib/components/profile/SecurityTab.jsx.map +1 -0
- package/lib/components/profile/index.d.ts +4 -0
- package/lib/components/profile/index.d.ts.map +1 -0
- package/lib/components/profile/index.js +4 -0
- package/lib/components/profile/index.js.map +1 -0
- package/lib/components/segmented-toggle.d.ts +28 -0
- package/lib/components/segmented-toggle.d.ts.map +1 -0
- package/lib/components/segmented-toggle.jsx +64 -0
- package/lib/components/segmented-toggle.jsx.map +1 -0
- package/lib/components/separator.d.ts +13 -0
- package/lib/components/separator.d.ts.map +1 -0
- package/lib/components/separator.jsx +16 -0
- package/lib/components/separator.jsx.map +1 -0
- package/lib/components/server-settings.d.ts +27 -0
- package/lib/components/server-settings.d.ts.map +1 -0
- package/lib/components/server-settings.jsx +307 -0
- package/lib/components/server-settings.jsx.map +1 -0
- package/lib/components/settings/AccountSection.d.ts +26 -0
- package/lib/components/settings/AccountSection.d.ts.map +1 -0
- package/lib/components/settings/AccountSection.jsx +32 -0
- package/lib/components/settings/AccountSection.jsx.map +1 -0
- package/lib/components/settings/DangerZoneSection.d.ts +13 -0
- package/lib/components/settings/DangerZoneSection.d.ts.map +1 -0
- package/lib/components/settings/DangerZoneSection.jsx +16 -0
- package/lib/components/settings/DangerZoneSection.jsx.map +1 -0
- package/lib/components/settings/GeneralSection.d.ts +11 -0
- package/lib/components/settings/GeneralSection.d.ts.map +1 -0
- package/lib/components/settings/GeneralSection.jsx +12 -0
- package/lib/components/settings/GeneralSection.jsx.map +1 -0
- package/lib/components/settings/SupportSection.d.ts +11 -0
- package/lib/components/settings/SupportSection.d.ts.map +1 -0
- package/lib/components/settings/SupportSection.jsx +22 -0
- package/lib/components/settings/SupportSection.jsx.map +1 -0
- package/lib/components/settings/index.d.ts +5 -0
- package/lib/components/settings/index.d.ts.map +1 -0
- package/lib/components/settings/index.js +5 -0
- package/lib/components/settings/index.js.map +1 -0
- package/lib/components/settings-row.d.ts +28 -0
- package/lib/components/settings-row.d.ts.map +1 -0
- package/lib/components/settings-row.jsx +68 -0
- package/lib/components/settings-row.jsx.map +1 -0
- package/lib/components/skeleton.d.ts +8 -0
- package/lib/components/skeleton.d.ts.map +1 -0
- package/lib/components/skeleton.jsx +24 -0
- package/lib/components/skeleton.jsx.map +1 -0
- package/lib/components/social-connections.d.ts +15 -0
- package/lib/components/social-connections.d.ts.map +1 -0
- package/lib/components/social-connections.jsx +31 -0
- package/lib/components/social-connections.jsx.map +1 -0
- package/lib/components/stat-card.d.ts +29 -0
- package/lib/components/stat-card.d.ts.map +1 -0
- package/lib/components/stat-card.jsx +36 -0
- package/lib/components/stat-card.jsx.map +1 -0
- package/lib/components/tag-chip.d.ts +18 -0
- package/lib/components/tag-chip.d.ts.map +1 -0
- package/lib/components/tag-chip.jsx +54 -0
- package/lib/components/tag-chip.jsx.map +1 -0
- package/lib/components/tag-multi-select.d.ts +27 -0
- package/lib/components/tag-multi-select.d.ts.map +1 -0
- package/lib/components/tag-multi-select.jsx +65 -0
- package/lib/components/tag-multi-select.jsx.map +1 -0
- package/lib/components/text.d.ts +22 -0
- package/lib/components/text.d.ts.map +1 -0
- package/lib/components/text.jsx +43 -0
- package/lib/components/text.jsx.map +1 -0
- package/lib/components/toast/ToastPortal.d.ts +11 -0
- package/lib/components/toast/ToastPortal.d.ts.map +1 -0
- package/lib/components/toast/ToastPortal.jsx +15 -0
- package/lib/components/toast/ToastPortal.jsx.map +1 -0
- package/lib/components/toast/ToastPortal.web.d.ts +14 -0
- package/lib/components/toast/ToastPortal.web.d.ts.map +1 -0
- package/lib/components/toast/ToastPortal.web.jsx +39 -0
- package/lib/components/toast/ToastPortal.web.jsx.map +1 -0
- package/lib/components/toast/index.d.ts +3 -0
- package/lib/components/toast/index.d.ts.map +1 -0
- package/lib/components/toast/index.js +3 -0
- package/lib/components/toast/index.js.map +1 -0
- package/lib/components/toast/toast-config.d.ts +14 -0
- package/lib/components/toast/toast-config.d.ts.map +1 -0
- package/lib/components/toast/toast-config.jsx +24 -0
- package/lib/components/toast/toast-config.jsx.map +1 -0
- package/lib/components/tooltip.d.ts +30 -0
- package/lib/components/tooltip.d.ts.map +1 -0
- package/lib/components/tooltip.jsx +14 -0
- package/lib/components/tooltip.jsx.map +1 -0
- package/lib/components/totp-display.d.ts +23 -0
- package/lib/components/totp-display.d.ts.map +1 -0
- package/lib/components/totp-display.jsx +132 -0
- package/lib/components/totp-display.jsx.map +1 -0
- package/lib/components/user-avatar.d.ts +18 -0
- package/lib/components/user-avatar.d.ts.map +1 -0
- package/lib/components/user-avatar.jsx +25 -0
- package/lib/components/user-avatar.jsx.map +1 -0
- package/lib/context/AppConfigContext.d.ts +56 -0
- package/lib/context/AppConfigContext.d.ts.map +1 -0
- package/lib/context/AppConfigContext.jsx +14 -0
- package/lib/context/AppConfigContext.jsx.map +1 -0
- package/lib/context/NavigationContext.d.ts +42 -0
- package/lib/context/NavigationContext.d.ts.map +1 -0
- package/lib/context/NavigationContext.jsx +53 -0
- package/lib/context/NavigationContext.jsx.map +1 -0
- package/lib/context/NotificationContext.d.ts +32 -0
- package/lib/context/NotificationContext.d.ts.map +1 -0
- package/lib/context/NotificationContext.jsx +49 -0
- package/lib/context/NotificationContext.jsx.map +1 -0
- package/lib/context/ThemeContext.d.ts +12 -0
- package/lib/context/ThemeContext.d.ts.map +1 -0
- package/lib/context/ThemeContext.jsx +66 -0
- package/lib/context/ThemeContext.jsx.map +1 -0
- package/lib/context/index.d.ts +5 -0
- package/lib/context/index.d.ts.map +1 -0
- package/lib/context/index.js +5 -0
- package/lib/context/index.js.map +1 -0
- package/lib/flags.d.ts +9 -0
- package/lib/flags.d.ts.map +1 -0
- package/lib/flags.js +37 -0
- package/lib/flags.js.map +1 -0
- package/lib/forms/form-error.d.ts +12 -0
- package/lib/forms/form-error.d.ts.map +1 -0
- package/lib/forms/form-error.jsx +14 -0
- package/lib/forms/form-error.jsx.map +1 -0
- package/lib/forms/index.d.ts +3 -0
- package/lib/forms/index.d.ts.map +1 -0
- package/lib/forms/index.js +3 -0
- package/lib/forms/index.js.map +1 -0
- package/lib/forms/shake-field.d.ts +18 -0
- package/lib/forms/shake-field.d.ts.map +1 -0
- package/lib/forms/shake-field.jsx +30 -0
- package/lib/forms/shake-field.jsx.map +1 -0
- package/lib/hooks/index.d.ts +6 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js +6 -0
- package/lib/hooks/index.js.map +1 -0
- package/lib/hooks/useAuth.d.ts +109 -0
- package/lib/hooks/useAuth.d.ts.map +1 -0
- package/lib/hooks/useAuth.jsx +404 -0
- package/lib/hooks/useAuth.jsx.map +1 -0
- package/lib/hooks/useAutoLock.d.ts +22 -0
- package/lib/hooks/useAutoLock.d.ts.map +1 -0
- package/lib/hooks/useAutoLock.js +85 -0
- package/lib/hooks/useAutoLock.js.map +1 -0
- package/lib/hooks/useDebouncedValue.d.ts +19 -0
- package/lib/hooks/useDebouncedValue.d.ts.map +1 -0
- package/lib/hooks/useDebouncedValue.js +29 -0
- package/lib/hooks/useDebouncedValue.js.map +1 -0
- package/lib/hooks/useShakeAnimation.d.ts +17 -0
- package/lib/hooks/useShakeAnimation.d.ts.map +1 -0
- package/lib/hooks/useShakeAnimation.js +22 -0
- package/lib/hooks/useShakeAnimation.js.map +1 -0
- package/lib/hooks/useUploadBlobUrl.d.ts +13 -0
- package/lib/hooks/useUploadBlobUrl.d.ts.map +1 -0
- package/lib/hooks/useUploadBlobUrl.js +60 -0
- package/lib/hooks/useUploadBlobUrl.js.map +1 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +47 -0
- package/lib/index.js.map +1 -0
- package/lib/screens/auth/AccountPickerScreen.d.ts +24 -0
- package/lib/screens/auth/AccountPickerScreen.d.ts.map +1 -0
- package/lib/screens/auth/AccountPickerScreen.jsx +47 -0
- package/lib/screens/auth/AccountPickerScreen.jsx.map +1 -0
- package/lib/screens/auth/AuthScreen.d.ts +59 -0
- package/lib/screens/auth/AuthScreen.d.ts.map +1 -0
- package/lib/screens/auth/AuthScreen.jsx +594 -0
- package/lib/screens/auth/AuthScreen.jsx.map +1 -0
- package/lib/screens/auth/ConsentScreen.d.ts +27 -0
- package/lib/screens/auth/ConsentScreen.d.ts.map +1 -0
- package/lib/screens/auth/ConsentScreen.jsx +55 -0
- package/lib/screens/auth/ConsentScreen.jsx.map +1 -0
- package/lib/screens/auth/ErrorScreen.d.ts +20 -0
- package/lib/screens/auth/ErrorScreen.d.ts.map +1 -0
- package/lib/screens/auth/ErrorScreen.jsx +43 -0
- package/lib/screens/auth/ErrorScreen.jsx.map +1 -0
- package/lib/screens/auth/ExpiredLinkScreen.d.ts +19 -0
- package/lib/screens/auth/ExpiredLinkScreen.d.ts.map +1 -0
- package/lib/screens/auth/ExpiredLinkScreen.jsx +38 -0
- package/lib/screens/auth/ExpiredLinkScreen.jsx.map +1 -0
- package/lib/screens/auth/ForgotPasswordScreen.d.ts +4 -0
- package/lib/screens/auth/ForgotPasswordScreen.d.ts.map +1 -0
- package/lib/screens/auth/ForgotPasswordScreen.jsx +123 -0
- package/lib/screens/auth/ForgotPasswordScreen.jsx.map +1 -0
- package/lib/screens/auth/ImportDataScreen.d.ts +17 -0
- package/lib/screens/auth/ImportDataScreen.d.ts.map +1 -0
- package/lib/screens/auth/ImportDataScreen.jsx +73 -0
- package/lib/screens/auth/ImportDataScreen.jsx.map +1 -0
- package/lib/screens/auth/LoginScreen.d.ts +38 -0
- package/lib/screens/auth/LoginScreen.d.ts.map +1 -0
- package/lib/screens/auth/LoginScreen.jsx +326 -0
- package/lib/screens/auth/LoginScreen.jsx.map +1 -0
- package/lib/screens/auth/MfaChallengeScreen.d.ts +4 -0
- package/lib/screens/auth/MfaChallengeScreen.d.ts.map +1 -0
- package/lib/screens/auth/MfaChallengeScreen.jsx +139 -0
- package/lib/screens/auth/MfaChallengeScreen.jsx.map +1 -0
- package/lib/screens/auth/MfaEnrollScreen.d.ts +12 -0
- package/lib/screens/auth/MfaEnrollScreen.d.ts.map +1 -0
- package/lib/screens/auth/MfaEnrollScreen.jsx +267 -0
- package/lib/screens/auth/MfaEnrollScreen.jsx.map +1 -0
- package/lib/screens/auth/PasskeyEnrollScreen.d.ts +18 -0
- package/lib/screens/auth/PasskeyEnrollScreen.d.ts.map +1 -0
- package/lib/screens/auth/PasskeyEnrollScreen.jsx +51 -0
- package/lib/screens/auth/PasskeyEnrollScreen.jsx.map +1 -0
- package/lib/screens/auth/PrivacyPolicyScreen.d.ts +19 -0
- package/lib/screens/auth/PrivacyPolicyScreen.d.ts.map +1 -0
- package/lib/screens/auth/PrivacyPolicyScreen.jsx +143 -0
- package/lib/screens/auth/PrivacyPolicyScreen.jsx.map +1 -0
- package/lib/screens/auth/RegisterScreen.d.ts +14 -0
- package/lib/screens/auth/RegisterScreen.d.ts.map +1 -0
- package/lib/screens/auth/RegisterScreen.jsx +296 -0
- package/lib/screens/auth/RegisterScreen.jsx.map +1 -0
- package/lib/screens/auth/ResetPasswordScreen.d.ts +12 -0
- package/lib/screens/auth/ResetPasswordScreen.d.ts.map +1 -0
- package/lib/screens/auth/ResetPasswordScreen.jsx +276 -0
- package/lib/screens/auth/ResetPasswordScreen.jsx.map +1 -0
- package/lib/screens/auth/ServerConfigScreen.d.ts +18 -0
- package/lib/screens/auth/ServerConfigScreen.d.ts.map +1 -0
- package/lib/screens/auth/ServerConfigScreen.jsx +259 -0
- package/lib/screens/auth/ServerConfigScreen.jsx.map +1 -0
- package/lib/screens/auth/TermsOfServiceScreen.d.ts +30 -0
- package/lib/screens/auth/TermsOfServiceScreen.d.ts.map +1 -0
- package/lib/screens/auth/TermsOfServiceScreen.jsx +130 -0
- package/lib/screens/auth/TermsOfServiceScreen.jsx.map +1 -0
- package/lib/screens/auth/VerifyEmailScreen.d.ts +4 -0
- package/lib/screens/auth/VerifyEmailScreen.d.ts.map +1 -0
- package/lib/screens/auth/VerifyEmailScreen.jsx +249 -0
- package/lib/screens/auth/VerifyEmailScreen.jsx.map +1 -0
- package/lib/screens/auth/WelcomeScreen.d.ts +17 -0
- package/lib/screens/auth/WelcomeScreen.d.ts.map +1 -0
- package/lib/screens/auth/WelcomeScreen.jsx +58 -0
- package/lib/screens/auth/WelcomeScreen.jsx.map +1 -0
- package/lib/screens/auth/index.d.ts +19 -0
- package/lib/screens/auth/index.d.ts.map +1 -0
- package/lib/screens/auth/index.js +19 -0
- package/lib/screens/auth/index.js.map +1 -0
- package/lib/screens/index.d.ts +2 -0
- package/lib/screens/index.d.ts.map +1 -0
- package/lib/screens/index.js +2 -0
- package/lib/screens/index.js.map +1 -0
- package/lib/services/api-config.d.ts +87 -0
- package/lib/services/api-config.d.ts.map +1 -0
- package/lib/services/api-config.js +202 -0
- package/lib/services/api-config.js.map +1 -0
- package/lib/services/auth.service.d.ts +140 -0
- package/lib/services/auth.service.d.ts.map +1 -0
- package/lib/services/auth.service.js +376 -0
- package/lib/services/auth.service.js.map +1 -0
- package/lib/services/favicon.d.ts +46 -0
- package/lib/services/favicon.d.ts.map +1 -0
- package/lib/services/favicon.js +84 -0
- package/lib/services/favicon.js.map +1 -0
- package/lib/services/hibp-cache.d.ts +23 -0
- package/lib/services/hibp-cache.d.ts.map +1 -0
- package/lib/services/hibp-cache.js +56 -0
- package/lib/services/hibp-cache.js.map +1 -0
- package/lib/services/hibp.d.ts +28 -0
- package/lib/services/hibp.d.ts.map +1 -0
- package/lib/services/hibp.js +92 -0
- package/lib/services/hibp.js.map +1 -0
- package/lib/services/index.d.ts +8 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +7 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/passkey.d.ts +10 -0
- package/lib/services/passkey.d.ts.map +1 -0
- package/lib/services/passkey.js +192 -0
- package/lib/services/passkey.js.map +1 -0
- package/lib/utils/api-fetch.d.ts +11 -0
- package/lib/utils/api-fetch.d.ts.map +1 -0
- package/lib/utils/api-fetch.js +52 -0
- package/lib/utils/api-fetch.js.map +1 -0
- package/lib/utils/clipboard.d.ts +31 -0
- package/lib/utils/clipboard.d.ts.map +1 -0
- package/lib/utils/clipboard.js +66 -0
- package/lib/utils/clipboard.js.map +1 -0
- package/lib/utils/cn.d.ts +9 -0
- package/lib/utils/cn.d.ts.map +1 -0
- package/lib/utils/cn.js +12 -0
- package/lib/utils/cn.js.map +1 -0
- package/lib/utils/debounce.d.ts +13 -0
- package/lib/utils/debounce.d.ts.map +1 -0
- package/lib/utils/debounce.js +28 -0
- package/lib/utils/debounce.js.map +1 -0
- package/lib/utils/error.d.ts +9 -0
- package/lib/utils/error.d.ts.map +1 -0
- package/lib/utils/error.js +11 -0
- package/lib/utils/error.js.map +1 -0
- package/lib/utils/fetch.d.ts +17 -0
- package/lib/utils/fetch.d.ts.map +1 -0
- package/lib/utils/fetch.js +29 -0
- package/lib/utils/fetch.js.map +1 -0
- package/lib/utils/http-error.d.ts +41 -0
- package/lib/utils/http-error.d.ts.map +1 -0
- package/lib/utils/http-error.js +63 -0
- package/lib/utils/http-error.js.map +1 -0
- package/lib/utils/index.d.ts +11 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +11 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/palette.d.ts +46 -0
- package/lib/utils/palette.d.ts.map +1 -0
- package/lib/utils/palette.js +75 -0
- package/lib/utils/palette.js.map +1 -0
- package/lib/utils/password.d.ts +20 -0
- package/lib/utils/password.d.ts.map +1 -0
- package/lib/utils/password.js +51 -0
- package/lib/utils/password.js.map +1 -0
- package/lib/utils/settings-storage.d.ts +3 -0
- package/lib/utils/settings-storage.d.ts.map +1 -0
- package/lib/utils/settings-storage.js +62 -0
- package/lib/utils/settings-storage.js.map +1 -0
- package/lib/utils/validation.d.ts +29 -0
- package/lib/utils/validation.d.ts.map +1 -0
- package/lib/utils/validation.js +58 -0
- package/lib/utils/validation.js.map +1 -0
- package/package.json +204 -0
- package/src/components/__tests__/data-table.test.ts +94 -0
- package/src/components/__tests__/pagination.test.ts +73 -0
- package/src/components/__tests__/stat-card.test.ts +21 -0
- package/src/components/auth/LockOverlay.tsx +122 -0
- package/src/components/auth/PasswordStrengthMeter.tsx +96 -0
- package/src/components/auth/ProtectedRoute.tsx +91 -0
- package/src/components/auth/PwnedPasswordWarning.tsx +54 -0
- package/src/components/auth/index.ts +10 -0
- package/src/components/bottom-nav.tsx +99 -0
- package/src/components/button.tsx +144 -0
- package/src/components/card.tsx +82 -0
- package/src/components/checkbox.tsx +48 -0
- package/src/components/connection-settings.tsx +583 -0
- package/src/components/context-menu.tsx +95 -0
- package/src/components/data-table.tsx +223 -0
- package/src/components/dialog.tsx +376 -0
- package/src/components/dropdown-menu.tsx +120 -0
- package/src/components/entropy-boot-splash.tsx +114 -0
- package/src/components/entropy-mark-animated.tsx +260 -0
- package/src/components/entropy-mark-geometry.ts +11 -0
- package/src/components/entropy-mark-sequential.tsx +132 -0
- package/src/components/entropy-mark.tsx +135 -0
- package/src/components/error-boundary.tsx +70 -0
- package/src/components/index.ts +156 -0
- package/src/components/input.tsx +246 -0
- package/src/components/item-icon.tsx +111 -0
- package/src/components/label.tsx +25 -0
- package/src/components/legal-dialog.tsx +47 -0
- package/src/components/license-gate.tsx +28 -0
- package/src/components/logo.tsx +34 -0
- package/src/components/onboarding-wizard.tsx +353 -0
- package/src/components/pagination.tsx +154 -0
- package/src/components/password-generator.tsx +393 -0
- package/src/components/pin-pad.tsx +156 -0
- package/src/components/popover.tsx +38 -0
- package/src/components/profile/ProfileDialog.tsx +129 -0
- package/src/components/profile/ProfileTab.tsx +151 -0
- package/src/components/profile/SecurityTab.tsx +229 -0
- package/src/components/profile/index.ts +3 -0
- package/src/components/segmented-toggle.tsx +119 -0
- package/src/components/separator.tsx +41 -0
- package/src/components/server-settings.tsx +442 -0
- package/src/components/settings/AccountSection.tsx +76 -0
- package/src/components/settings/DangerZoneSection.tsx +37 -0
- package/src/components/settings/GeneralSection.tsx +39 -0
- package/src/components/settings/SupportSection.tsx +53 -0
- package/src/components/settings/index.ts +4 -0
- package/src/components/settings-row.tsx +126 -0
- package/src/components/skeleton.tsx +48 -0
- package/src/components/social-connections.tsx +55 -0
- package/src/components/stat-card.tsx +64 -0
- package/src/components/tag-chip.tsx +78 -0
- package/src/components/tag-multi-select.tsx +136 -0
- package/src/components/text.tsx +77 -0
- package/src/components/toast/ToastPortal.tsx +16 -0
- package/src/components/toast/ToastPortal.web.tsx +47 -0
- package/src/components/toast/index.ts +2 -0
- package/src/components/toast/toast-config.tsx +31 -0
- package/src/components/tooltip.tsx +30 -0
- package/src/components/totp-display.tsx +207 -0
- package/src/components/user-avatar.tsx +46 -0
- package/src/context/AppConfigContext.tsx +76 -0
- package/src/context/NavigationContext.tsx +75 -0
- package/src/context/NotificationContext.tsx +69 -0
- package/src/context/ThemeContext.tsx +83 -0
- package/src/context/__tests__/NavigationContext.test.tsx +53 -0
- package/src/context/index.ts +24 -0
- package/src/flags.ts +44 -0
- package/src/forms/form-error.tsx +20 -0
- package/src/forms/index.ts +2 -0
- package/src/forms/shake-field.tsx +52 -0
- package/src/hooks/__tests__/useUploadBlobUrl.test.tsx +77 -0
- package/src/hooks/index.ts +18 -0
- package/src/hooks/useAuth.tsx +567 -0
- package/src/hooks/useAutoLock.ts +110 -0
- package/src/hooks/useDebouncedValue.ts +32 -0
- package/src/hooks/useShakeAnimation.ts +42 -0
- package/src/hooks/useUploadBlobUrl.ts +75 -0
- package/src/index.ts +48 -0
- package/src/screens/auth/AccountPickerScreen.tsx +103 -0
- package/src/screens/auth/AuthScreen.tsx +941 -0
- package/src/screens/auth/ConsentScreen.tsx +118 -0
- package/src/screens/auth/ErrorScreen.tsx +96 -0
- package/src/screens/auth/ExpiredLinkScreen.tsx +87 -0
- package/src/screens/auth/ForgotPasswordScreen.tsx +182 -0
- package/src/screens/auth/ImportDataScreen.tsx +112 -0
- package/src/screens/auth/LoginScreen.tsx +484 -0
- package/src/screens/auth/MfaChallengeScreen.tsx +216 -0
- package/src/screens/auth/MfaEnrollScreen.tsx +388 -0
- package/src/screens/auth/PasskeyEnrollScreen.tsx +96 -0
- package/src/screens/auth/PrivacyPolicyScreen.tsx +249 -0
- package/src/screens/auth/RegisterScreen.tsx +430 -0
- package/src/screens/auth/ResetPasswordScreen.tsx +377 -0
- package/src/screens/auth/ServerConfigScreen.tsx +388 -0
- package/src/screens/auth/TermsOfServiceScreen.tsx +236 -0
- package/src/screens/auth/VerifyEmailScreen.tsx +310 -0
- package/src/screens/auth/WelcomeScreen.tsx +78 -0
- package/src/screens/auth/index.ts +36 -0
- package/src/screens/index.ts +1 -0
- package/src/services/__tests__/api-config.test.ts +67 -0
- package/src/services/__tests__/favicon.test.ts +88 -0
- package/src/services/__tests__/hibp-cache.test.ts +37 -0
- package/src/services/__tests__/hibp.test.ts +39 -0
- package/src/services/api-config.ts +260 -0
- package/src/services/auth.service.ts +498 -0
- package/src/services/favicon.ts +102 -0
- package/src/services/hibp-cache.ts +71 -0
- package/src/services/hibp.ts +120 -0
- package/src/services/index.ts +52 -0
- package/src/services/passkey.ts +213 -0
- package/src/types/external.d.ts +24 -0
- package/src/utils/__tests__/clipboard.test.ts +59 -0
- package/src/utils/__tests__/cn.test.ts +24 -0
- package/src/utils/__tests__/debounce.test.ts +42 -0
- package/src/utils/__tests__/error.test.ts +18 -0
- package/src/utils/__tests__/http-error.test.ts +33 -0
- package/src/utils/__tests__/palette.test.ts +22 -0
- package/src/utils/__tests__/password.test.ts +55 -0
- package/src/utils/__tests__/settings-storage.test.ts +15 -0
- package/src/utils/__tests__/validation.test.ts +52 -0
- package/src/utils/api-fetch.ts +61 -0
- package/src/utils/clipboard.ts +69 -0
- package/src/utils/cn.ts +12 -0
- package/src/utils/debounce.ts +33 -0
- package/src/utils/error.ts +10 -0
- package/src/utils/fetch.ts +33 -0
- package/src/utils/http-error.ts +81 -0
- package/src/utils/index.ts +23 -0
- package/src/utils/palette.ts +105 -0
- package/src/utils/password.ts +64 -0
- package/src/utils/settings-storage.ts +68 -0
- package/src/utils/validation.ts +71 -0
- package/styles/globals.css +262 -0
- package/tailwind-preset.js +163 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/profile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/profile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwB,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,aAAa,EAA2B,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface SegmentedOption<T extends string> {
|
|
3
|
+
key: T;
|
|
4
|
+
label: string;
|
|
5
|
+
/** When false the segment is shown but not selectable (e.g. "coming soon"). */
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SegmentedToggleProps<T extends string> {
|
|
9
|
+
value: T;
|
|
10
|
+
options: SegmentedOption<T>[];
|
|
11
|
+
onChange: (next: T) => void;
|
|
12
|
+
/** Visual size — `sm` is used inside dialogs, `default` on the auth screen. */
|
|
13
|
+
size?: "sm" | "default";
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Themed segmented control with a sliding indicator (reanimated). Mirrors the
|
|
18
|
+
* website/simple-finance "Sign In / Sign Up" pill, but palette-driven so it
|
|
19
|
+
* tracks the active theme instead of hard-coded brand colors. Shared by the
|
|
20
|
+
* consolidated AuthScreen mode switch and the ConnectionSettings run-mode pills.
|
|
21
|
+
*
|
|
22
|
+
* Colors are applied via inline `style` (not className) on the Text so Android's
|
|
23
|
+
* NativeWind doesn't override the active/inactive foreground — see the
|
|
24
|
+
* android-nativewind-styling note.
|
|
25
|
+
*/
|
|
26
|
+
export declare function SegmentedToggle<T extends string>({ value, options, onChange, size, className, }: SegmentedToggleProps<T>): React.JSX.Element;
|
|
27
|
+
export default SegmentedToggle;
|
|
28
|
+
//# sourceMappingURL=segmented-toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-toggle.d.ts","sourceRoot":"","sources":["../../src/components/segmented-toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAUxC,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,MAAM;IAC/C,GAAG,EAAE,CAAC,CAAC;IACP,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,MAAM;IACpD,KAAK,EAAE,CAAC,CAAC;IACT,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;IAC5B,+EAA+E;IAC/E,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,EAChD,KAAK,EACL,OAAO,EACP,QAAQ,EACR,IAAgB,EAChB,SAAS,GACV,EAAE,oBAAoB,CAAC,CAAC,CAAC,qBA0EzB;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Pressable, Text, View } from "react-native";
|
|
3
|
+
import Animated, { Easing, useAnimatedStyle, useSharedValue, withTiming, } from "react-native-reanimated";
|
|
4
|
+
import { usePalette } from "../utils/palette";
|
|
5
|
+
/**
|
|
6
|
+
* Themed segmented control with a sliding indicator (reanimated). Mirrors the
|
|
7
|
+
* website/simple-finance "Sign In / Sign Up" pill, but palette-driven so it
|
|
8
|
+
* tracks the active theme instead of hard-coded brand colors. Shared by the
|
|
9
|
+
* consolidated AuthScreen mode switch and the ConnectionSettings run-mode pills.
|
|
10
|
+
*
|
|
11
|
+
* Colors are applied via inline `style` (not className) on the Text so Android's
|
|
12
|
+
* NativeWind doesn't override the active/inactive foreground — see the
|
|
13
|
+
* android-nativewind-styling note.
|
|
14
|
+
*/
|
|
15
|
+
export function SegmentedToggle({ value, options, onChange, size = "default", className, }) {
|
|
16
|
+
const { palette: p } = usePalette();
|
|
17
|
+
const [trackW, setTrackW] = useState(0);
|
|
18
|
+
const slide = useSharedValue(0);
|
|
19
|
+
const count = options.length;
|
|
20
|
+
const index = Math.max(0, options.findIndex((o) => o.key === value));
|
|
21
|
+
const pad = 4;
|
|
22
|
+
const segW = trackW > 0 ? (trackW - pad * 2) / count : 0;
|
|
23
|
+
// Drive the indicator off the selected index whenever it changes.
|
|
24
|
+
slide.value = withTiming(index * segW, { duration: 240, easing: Easing.out(Easing.cubic) });
|
|
25
|
+
const indicatorStyle = useAnimatedStyle(() => ({
|
|
26
|
+
width: segW,
|
|
27
|
+
transform: [{ translateX: slide.value }],
|
|
28
|
+
}));
|
|
29
|
+
const vPad = size === "sm" ? 9 : 11;
|
|
30
|
+
const fontSize = size === "sm" ? 14 : 15;
|
|
31
|
+
return (<View className={className} style={{ backgroundColor: p.muted, borderRadius: 999, padding: pad }} onLayout={(e) => setTrackW(e.nativeEvent.layout.width)}>
|
|
32
|
+
<View style={{ flexDirection: "row" }}>
|
|
33
|
+
<Animated.View style={[
|
|
34
|
+
{
|
|
35
|
+
position: "absolute",
|
|
36
|
+
top: 0,
|
|
37
|
+
bottom: 0,
|
|
38
|
+
borderRadius: 999,
|
|
39
|
+
backgroundColor: p.primary,
|
|
40
|
+
},
|
|
41
|
+
indicatorStyle,
|
|
42
|
+
]}/>
|
|
43
|
+
{options.map((opt) => {
|
|
44
|
+
const active = opt.key === value;
|
|
45
|
+
return (<Pressable key={opt.key} accessibilityRole="tab" accessibilityState={{ selected: active, disabled: !!opt.disabled }} disabled={opt.disabled} onPress={() => !opt.disabled && onChange(opt.key)} style={{
|
|
46
|
+
flex: 1,
|
|
47
|
+
alignItems: "center",
|
|
48
|
+
paddingVertical: vPad,
|
|
49
|
+
opacity: opt.disabled ? 0.45 : 1,
|
|
50
|
+
}}>
|
|
51
|
+
<Text style={{
|
|
52
|
+
fontSize,
|
|
53
|
+
fontWeight: active ? "700" : "500",
|
|
54
|
+
color: active ? p.primaryForeground : p.mutedForeground,
|
|
55
|
+
}}>
|
|
56
|
+
{opt.label}
|
|
57
|
+
</Text>
|
|
58
|
+
</Pressable>);
|
|
59
|
+
})}
|
|
60
|
+
</View>
|
|
61
|
+
</View>);
|
|
62
|
+
}
|
|
63
|
+
export default SegmentedToggle;
|
|
64
|
+
//# sourceMappingURL=segmented-toggle.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-toggle.jsx","sourceRoot":"","sources":["../../src/components/segmented-toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAA0B,MAAM,cAAc,CAAC;AAC7E,OAAO,QAAQ,EAAE,EACf,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAkB9C;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAmB,EAChD,KAAK,EACL,OAAO,EACP,QAAQ,EACR,IAAI,GAAG,SAAS,EAChB,SAAS,GACe;IACxB,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,UAAU,EAAE,CAAC;IACpC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IAEhC,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC;IAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CACpB,CAAC,EACD,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,CAAC,CAC1C,CAAC;IACF,MAAM,GAAG,GAAG,CAAC,CAAC;IACd,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;I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
|
|
4
|
+
orientation?: "horizontal" | "vertical";
|
|
5
|
+
decorative?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<View>>;
|
|
9
|
+
declare function SeparatorWithText({ text }: {
|
|
10
|
+
text?: string;
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
export { Separator, SeparatorWithText };
|
|
13
|
+
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAKpC,UAAU,cAAc;IACtB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,6EAeb,CAAC;AAGH,iBAAS,iBAAiB,CAAC,EAAE,IAAW,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,qBAQ5D;AAED,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import * as SeparatorPrimitive from "@rn-primitives/separator";
|
|
4
|
+
import { cn } from "../utils/cn";
|
|
5
|
+
import { MutedText } from "./text";
|
|
6
|
+
const Separator = React.forwardRef(({ orientation = "horizontal", decorative = true, className, ...props }, ref) => (<SeparatorPrimitive.Root ref={ref} orientation={orientation} decorative={decorative} className={cn("bg-border dark:bg-neutral-800", orientation === "horizontal" ? "h-px w-full" : "w-px h-full", className)} {...props}/>));
|
|
7
|
+
Separator.displayName = "Separator";
|
|
8
|
+
function SeparatorWithText({ text = "or" }) {
|
|
9
|
+
return (<View className="w-full flex-row items-center gap-3">
|
|
10
|
+
<View className="h-px flex-1 bg-border dark:bg-neutral-600"/>
|
|
11
|
+
<MutedText className="text-xs uppercase">{text}</MutedText>
|
|
12
|
+
<View className="h-px flex-1 bg-border dark:bg-neutral-600"/>
|
|
13
|
+
</View>);
|
|
14
|
+
}
|
|
15
|
+
export { Separator, SeparatorWithText };
|
|
16
|
+
//# sourceMappingURL=separator.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.jsx","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,kBAAkB,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAQnC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAGhC,CAAC,EAAE,WAAW,GAAG,YAAY,EAAE,UAAU,GAAG,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACjF,CAAC,kBAAkB,CAAC,IAAI,CACtB,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,SAAS,CAAC,CAAC,EAAE,CACX,+BAA+B,EAC/B,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,EAC5D,SAAS,CACV,CAAC,CACF,IAAI,KAAK,CAAC,EACV,CACH,CAAC,CAAC;AACH,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,SAAS,iBAAiB,CAAC,EAAE,IAAI,GAAG,IAAI,EAAqB;IAC3D,OAAO,CACL,CAAC,IAAI,CAAC,SAAS,CAAC,oCAAoC,CAClD;MAAA,CAAC,IAAI,CAAC,SAAS,CAAC,2CAA2C,EAC3D;MAAA,CAAC,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,EAAE,SAAS,CAC1D;MAAA,CAAC,IAAI,CAAC,SAAS,CAAC,2CAA2C,EAC7D;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ServerSettingsProps {
|
|
3
|
+
/**
|
|
4
|
+
* Health-check path appended to the entered server URL's origin.
|
|
5
|
+
* Default `/api/health`.
|
|
6
|
+
*/
|
|
7
|
+
healthCheckPath?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Validator the test step runs against the parsed JSON body of the
|
|
10
|
+
* health response. Default: requires `{ status, version }` (matches
|
|
11
|
+
* Entropy Softworks servers). Return `false` to mark the test failed.
|
|
12
|
+
*/
|
|
13
|
+
validateHealthResponse?: (body: unknown) => boolean;
|
|
14
|
+
/** Error message shown when validation fails. Default uses `appName`. */
|
|
15
|
+
validationFailureMessage?: string;
|
|
16
|
+
/** Override for the placeholder shown in the URL input. */
|
|
17
|
+
urlPlaceholder?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Settings gear icon that opens the server-configuration dialog.
|
|
21
|
+
* Renders as an absolute-positioned button in the top-right corner.
|
|
22
|
+
* Use on any auth screen to give users a self-hosted-server entry
|
|
23
|
+
* point.
|
|
24
|
+
*/
|
|
25
|
+
export declare function ServerSettings({ healthCheckPath, validateHealthResponse, validationFailureMessage, urlPlaceholder, }?: ServerSettingsProps): React.JSX.Element;
|
|
26
|
+
export default ServerSettings;
|
|
27
|
+
//# sourceMappingURL=server-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-settings.d.ts","sourceRoot":"","sources":["../../src/components/server-settings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAoBnD,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;IACpD,yEAAyE;IACzE,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,eAA+B,EAC/B,sBAAsB,EACtB,wBAAwB,EACxB,cAAsC,GACvC,GAAE,mBAAwB,qBAiV1B;AAuDD,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import { Platform, Pressable, TextInput, View } from "react-native";
|
|
3
|
+
import Animated, { cancelAnimation, Easing, useAnimatedStyle, useSharedValue, withRepeat, withTiming, } from "react-native-reanimated";
|
|
4
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
5
|
+
import { useColorScheme } from "nativewind";
|
|
6
|
+
import { Dialog, DialogContent, DialogFooter } from "./dialog";
|
|
7
|
+
import { Text } from "./text";
|
|
8
|
+
import AuthService from "../services/auth.service";
|
|
9
|
+
import { getDefaultBaseUrl } from "../services/api-config";
|
|
10
|
+
import { useAppConfig } from "../context/AppConfigContext";
|
|
11
|
+
const HOVER_COLOR = "#22C55E";
|
|
12
|
+
/**
|
|
13
|
+
* Settings gear icon that opens the server-configuration dialog.
|
|
14
|
+
* Renders as an absolute-positioned button in the top-right corner.
|
|
15
|
+
* Use on any auth screen to give users a self-hosted-server entry
|
|
16
|
+
* point.
|
|
17
|
+
*/
|
|
18
|
+
export function ServerSettings({ healthCheckPath = "/api/health", validateHealthResponse, validationFailureMessage, urlPlaceholder = "https://example.com", } = {}) {
|
|
19
|
+
const { colorScheme } = useColorScheme();
|
|
20
|
+
const isDark = colorScheme === "dark";
|
|
21
|
+
const { appName } = useAppConfig();
|
|
22
|
+
const [visible, setVisible] = useState(false);
|
|
23
|
+
const [serverUrl, setServerUrl] = useState("");
|
|
24
|
+
const [testingServer, setTestingServer] = useState(false);
|
|
25
|
+
const [testResult, setTestResult] = useState(null);
|
|
26
|
+
const [retryCount, setRetryCount] = useState(0);
|
|
27
|
+
const isOverridden = serverUrl !== getDefaultBaseUrl();
|
|
28
|
+
const progressAnimation = useSharedValue(0);
|
|
29
|
+
const shimmerAnimation = useSharedValue(0);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (visible) {
|
|
32
|
+
setServerUrl(AuthService.getBaseUrl());
|
|
33
|
+
setTestResult(null);
|
|
34
|
+
}
|
|
35
|
+
}, [visible]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (testingServer) {
|
|
38
|
+
progressAnimation.value = 0;
|
|
39
|
+
shimmerAnimation.value = 0;
|
|
40
|
+
shimmerAnimation.value = withRepeat(withTiming(1, { duration: 500, easing: Easing.linear }), -1);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
cancelAnimation(shimmerAnimation);
|
|
44
|
+
shimmerAnimation.value = 0;
|
|
45
|
+
}
|
|
46
|
+
}, [testingServer, progressAnimation, shimmerAnimation]);
|
|
47
|
+
const animatedProgressStyle = useAnimatedStyle(() => ({
|
|
48
|
+
width: `${progressAnimation.value}%`,
|
|
49
|
+
}));
|
|
50
|
+
const animatedShimmerStyle = useAnimatedStyle(() => ({
|
|
51
|
+
transform: [{ translateX: -50 + shimmerAnimation.value * 350 }],
|
|
52
|
+
}));
|
|
53
|
+
const defaultValidate = (body) => {
|
|
54
|
+
if (!body || typeof body !== "object") {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
const obj = body;
|
|
58
|
+
return Boolean(obj.status) && Boolean(obj.version);
|
|
59
|
+
};
|
|
60
|
+
const validate = validateHealthResponse ?? defaultValidate;
|
|
61
|
+
const invalidServerMessage = validationFailureMessage ?? `Not a valid ${appName} server`;
|
|
62
|
+
const handleTest = async () => {
|
|
63
|
+
setTestingServer(true);
|
|
64
|
+
setTestResult(null);
|
|
65
|
+
setRetryCount(0);
|
|
66
|
+
progressAnimation.value = 0;
|
|
67
|
+
const urlRegex = /^https?:\/\/[\w-]+(\.[\w-]+)*(:\d+)?(\/.*)?$/;
|
|
68
|
+
if (!urlRegex.test(serverUrl)) {
|
|
69
|
+
setTestResult({
|
|
70
|
+
success: false,
|
|
71
|
+
message: "Invalid URL format. Please use http:// or https://",
|
|
72
|
+
});
|
|
73
|
+
setTestingServer(false);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
let url;
|
|
77
|
+
try {
|
|
78
|
+
url = new URL(serverUrl);
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
setTestResult({ success: false, message: "Invalid URL format" });
|
|
82
|
+
setTestingServer(false);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const maxRetries = 3;
|
|
86
|
+
const retryDelay = 2000;
|
|
87
|
+
let attemptCount = 0;
|
|
88
|
+
let lastError = null;
|
|
89
|
+
const attemptConnection = async () => {
|
|
90
|
+
attemptCount++;
|
|
91
|
+
setRetryCount(attemptCount);
|
|
92
|
+
const controller = new AbortController();
|
|
93
|
+
const timeoutId = setTimeout(() => controller.abort(), 3000);
|
|
94
|
+
try {
|
|
95
|
+
const healthUrl = `${url.origin}${healthCheckPath}`;
|
|
96
|
+
const response = await fetch(healthUrl, {
|
|
97
|
+
method: "GET",
|
|
98
|
+
signal: controller.signal,
|
|
99
|
+
headers: { Accept: "application/json" },
|
|
100
|
+
});
|
|
101
|
+
if (response.ok) {
|
|
102
|
+
const data = await response.json();
|
|
103
|
+
if (!validate(data)) {
|
|
104
|
+
throw new Error(invalidServerMessage);
|
|
105
|
+
}
|
|
106
|
+
return true;
|
|
107
|
+
}
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
lastError = error;
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
finally {
|
|
115
|
+
clearTimeout(timeoutId);
|
|
116
|
+
progressAnimation.value = withTiming((attemptCount / maxRetries) * 100, {
|
|
117
|
+
duration: 300,
|
|
118
|
+
easing: Easing.out(Easing.cubic),
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
let success = false;
|
|
123
|
+
for (let i = 0; i < maxRetries; i++) {
|
|
124
|
+
if (i > 0) {
|
|
125
|
+
await new Promise((resolve) => setTimeout(resolve, retryDelay));
|
|
126
|
+
}
|
|
127
|
+
success = await attemptConnection();
|
|
128
|
+
if (success) {
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (success) {
|
|
133
|
+
setTestResult({ success: true, message: "Server is reachable!" });
|
|
134
|
+
}
|
|
135
|
+
else if (lastError instanceof Error && lastError.name === "AbortError") {
|
|
136
|
+
setTestResult({
|
|
137
|
+
success: false,
|
|
138
|
+
message: `Connection timeout after ${maxRetries} attempts`,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
setTestResult({
|
|
143
|
+
success: false,
|
|
144
|
+
message: `Cannot reach server after ${maxRetries} attempts`,
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
setTestingServer(false);
|
|
148
|
+
setRetryCount(0);
|
|
149
|
+
};
|
|
150
|
+
const handleSave = async () => {
|
|
151
|
+
try {
|
|
152
|
+
await AuthService.setBaseUrl(serverUrl);
|
|
153
|
+
setVisible(false);
|
|
154
|
+
}
|
|
155
|
+
catch (e) {
|
|
156
|
+
const msg = e instanceof Error ? e.message : "Invalid server URL";
|
|
157
|
+
setTestResult({ success: false, message: msg });
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
const handleReset = async () => {
|
|
161
|
+
await AuthService.resetBaseUrl();
|
|
162
|
+
setServerUrl(getDefaultBaseUrl());
|
|
163
|
+
setTestResult(null);
|
|
164
|
+
};
|
|
165
|
+
const close = () => setVisible(false);
|
|
166
|
+
return (<>
|
|
167
|
+
<Pressable onPress={() => setVisible(true)} style={{ position: "absolute", top: 16, right: 24, zIndex: 10 }} accessibilityLabel="Server settings" accessibilityRole="button">
|
|
168
|
+
{({ pressed, hovered }) => {
|
|
169
|
+
const active = pressed || hovered;
|
|
170
|
+
return (<View style={{
|
|
171
|
+
padding: 8,
|
|
172
|
+
borderRadius: 4,
|
|
173
|
+
backgroundColor: active ? HOVER_COLOR : "transparent",
|
|
174
|
+
}}>
|
|
175
|
+
<Ionicons name="settings-outline" size={24} color={active ? "#FFFFFF" : isDark ? "#FFFFFF" : "#000000"}/>
|
|
176
|
+
</View>);
|
|
177
|
+
}}
|
|
178
|
+
</Pressable>
|
|
179
|
+
|
|
180
|
+
<Dialog visible={visible} onClose={close} title="Server Configuration" draggable>
|
|
181
|
+
<DialogContent>
|
|
182
|
+
<Text className="font-mono text-sm mb-2" style={{ color: isDark ? "#FFFFFF" : "#000000" }}>
|
|
183
|
+
Configure your self-hosted server URL
|
|
184
|
+
</Text>
|
|
185
|
+
<View className="rounded-lg px-3 flex-row items-center" style={{
|
|
186
|
+
borderWidth: 1,
|
|
187
|
+
borderColor: isDark ? "#333333" : "#E5E5E5",
|
|
188
|
+
paddingVertical: Platform.OS === "ios" ? 12 : 8,
|
|
189
|
+
backgroundColor: isDark ? "#0A0A0A" : "#FAFAFA",
|
|
190
|
+
}}>
|
|
191
|
+
<Ionicons name="server-outline" size={20} color={isDark ? "#999999" : "#666666"} style={{ marginRight: 8 }}/>
|
|
192
|
+
<TextInput value={serverUrl} onChangeText={setServerUrl} placeholder={urlPlaceholder} placeholderTextColor={isDark ? "#666666" : "#999999"} className="font-sans flex-1 text-base" style={{ color: isDark ? "#FFFFFF" : "#000000" }} autoCapitalize="none" autoCorrect={false}/>
|
|
193
|
+
</View>
|
|
194
|
+
{(testingServer || testResult) && (<View style={{
|
|
195
|
+
marginTop: 8,
|
|
196
|
+
padding: 8,
|
|
197
|
+
borderRadius: 6,
|
|
198
|
+
backgroundColor: testingServer
|
|
199
|
+
? isDark
|
|
200
|
+
? "#22C55E20"
|
|
201
|
+
: "#22C55E10"
|
|
202
|
+
: testResult?.success
|
|
203
|
+
? isDark
|
|
204
|
+
? "#22C55E20"
|
|
205
|
+
: "#22C55E10"
|
|
206
|
+
: isDark
|
|
207
|
+
? "#EF444420"
|
|
208
|
+
: "#EF444410",
|
|
209
|
+
borderWidth: 1,
|
|
210
|
+
borderColor: testingServer
|
|
211
|
+
? isDark
|
|
212
|
+
? "#22C55E40"
|
|
213
|
+
: "#22C55E30"
|
|
214
|
+
: testResult?.success
|
|
215
|
+
? isDark
|
|
216
|
+
? "#22C55E40"
|
|
217
|
+
: "#22C55E30"
|
|
218
|
+
: isDark
|
|
219
|
+
? "#EF444440"
|
|
220
|
+
: "#EF444430",
|
|
221
|
+
}}>
|
|
222
|
+
<Text className="font-mono text-xs text-center" style={{
|
|
223
|
+
color: testingServer ? "#22C55E" : testResult?.success ? "#22C55E" : "#EF4444",
|
|
224
|
+
}}>
|
|
225
|
+
{testingServer
|
|
226
|
+
? `Testing server connection... (Attempt ${retryCount}/3)`
|
|
227
|
+
: testResult?.message}
|
|
228
|
+
</Text>
|
|
229
|
+
{testingServer && (<View style={{
|
|
230
|
+
height: 3,
|
|
231
|
+
backgroundColor: isDark ? "#22C55E20" : "#22C55E10",
|
|
232
|
+
borderRadius: 1.5,
|
|
233
|
+
marginTop: 6,
|
|
234
|
+
overflow: "hidden",
|
|
235
|
+
}}>
|
|
236
|
+
<Animated.View style={[
|
|
237
|
+
{
|
|
238
|
+
height: "100%",
|
|
239
|
+
backgroundColor: "#22C55E",
|
|
240
|
+
borderRadius: 1.5,
|
|
241
|
+
overflow: "hidden",
|
|
242
|
+
},
|
|
243
|
+
animatedProgressStyle,
|
|
244
|
+
]}>
|
|
245
|
+
<Animated.View style={[
|
|
246
|
+
{
|
|
247
|
+
position: "absolute",
|
|
248
|
+
top: 0,
|
|
249
|
+
left: 0,
|
|
250
|
+
width: 50,
|
|
251
|
+
height: "100%",
|
|
252
|
+
opacity: 0.4,
|
|
253
|
+
},
|
|
254
|
+
animatedShimmerStyle,
|
|
255
|
+
]}>
|
|
256
|
+
<View style={{
|
|
257
|
+
width: "100%",
|
|
258
|
+
height: "100%",
|
|
259
|
+
backgroundColor: "#FFFFFF",
|
|
260
|
+
transform: [{ skewX: "-20deg" }],
|
|
261
|
+
}}/>
|
|
262
|
+
</Animated.View>
|
|
263
|
+
</Animated.View>
|
|
264
|
+
</View>)}
|
|
265
|
+
</View>)}
|
|
266
|
+
</DialogContent>
|
|
267
|
+
<DialogFooter style={{ justifyContent: "space-between" }}>
|
|
268
|
+
<View className="flex-row gap-3">
|
|
269
|
+
<ServerSettingsButton label="Test" onPress={handleTest} disabled={testingServer} filled/>
|
|
270
|
+
{isOverridden && <ServerSettingsButton label="Reset" onPress={handleReset}/>}
|
|
271
|
+
</View>
|
|
272
|
+
<View className="flex-row gap-3">
|
|
273
|
+
<ServerSettingsButton label="Cancel" onPress={close}/>
|
|
274
|
+
<ServerSettingsButton label="Save" onPress={handleSave} filled/>
|
|
275
|
+
</View>
|
|
276
|
+
</DialogFooter>
|
|
277
|
+
</Dialog>
|
|
278
|
+
</>);
|
|
279
|
+
}
|
|
280
|
+
/** Reusable dialog button with green hover effect, used by the ServerSettings footer. */
|
|
281
|
+
function ServerSettingsButton({ label, onPress, disabled, filled, }) {
|
|
282
|
+
const { colorScheme } = useColorScheme();
|
|
283
|
+
const isDark = colorScheme === "dark";
|
|
284
|
+
return (<Pressable onPress={onPress} hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }} disabled={disabled}>
|
|
285
|
+
{({ pressed, hovered }) => {
|
|
286
|
+
const active = pressed || hovered;
|
|
287
|
+
const defaultBg = filled ? (isDark ? "#FFFFFF" : "#000000") : "transparent";
|
|
288
|
+
const defaultText = filled
|
|
289
|
+
? isDark
|
|
290
|
+
? "#000000"
|
|
291
|
+
: "#FFFFFF"
|
|
292
|
+
: isDark
|
|
293
|
+
? "#FFFFFF"
|
|
294
|
+
: "#000000";
|
|
295
|
+
return (<View className="px-4 rounded-lg" style={{
|
|
296
|
+
paddingVertical: 10,
|
|
297
|
+
backgroundColor: active ? HOVER_COLOR : defaultBg,
|
|
298
|
+
}}>
|
|
299
|
+
<Text className="font-mono-medium text-sm text-center" style={{ color: active ? "#FFFFFF" : defaultText }}>
|
|
300
|
+
{label}
|
|
301
|
+
</Text>
|
|
302
|
+
</View>);
|
|
303
|
+
}}
|
|
304
|
+
</Pressable>);
|
|
305
|
+
}
|
|
306
|
+
export default ServerSettings;
|
|
307
|
+
//# sourceMappingURL=server-settings.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-settings.jsx","sourceRoot":"","sources":["../../src/components/server-settings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,QAAQ,EAAE,EACf,eAAe,EACf,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,UAAU,GACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAA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EAAE,EAAE;oBACnB,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;iBAClD,CAAC,CAEF;YAAA,CAAC,IAAI,CACH,SAAS,CAAC,sCAAsC,CAChD,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAEnD;cAAA,CAAC,KAAK,CACR;YAAA,EAAE,IAAI,CACR;UAAA,EAAE,IAAI,CAAC,CACR,CAAC;QACJ,CAAC,CACH;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface AccountSectionProps {
|
|
3
|
+
/** Fires when the user closes the surrounding settings surface (dialog). */
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
/**
|
|
6
|
+
* Open the in-app profile dialog/screen. Apps wire this to whatever
|
|
7
|
+
* UI shell they use for profile editing. The `tab` argument signals
|
|
8
|
+
* which sub-tab to land on (`"profile"` for personal info, `"security"`
|
|
9
|
+
* for master-password change).
|
|
10
|
+
*/
|
|
11
|
+
onOpenProfile?: (tab?: "profile" | "security") => void;
|
|
12
|
+
/**
|
|
13
|
+
* Override the Server Configuration row. Default behavior navigates
|
|
14
|
+
* to `routes.serverConfig` from `AppConfig`. Pass `null` to hide the
|
|
15
|
+
* row entirely (apps with no self-hosted concept).
|
|
16
|
+
*/
|
|
17
|
+
onOpenServerConfig?: (() => void) | null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Generic ACCOUNT section used inside the settings dialog. Rows:
|
|
21
|
+
* • Profile (delegates to `onOpenProfile?.("profile")`)
|
|
22
|
+
* • Master Password (delegates to `onOpenProfile?.("security")`)
|
|
23
|
+
* • Server Configuration (default navigates to `routes.serverConfig`)
|
|
24
|
+
*/
|
|
25
|
+
export declare function AccountSection({ onClose, onOpenProfile, onOpenServerConfig, }: AccountSectionProps): React.JSX.Element;
|
|
26
|
+
//# sourceMappingURL=AccountSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountSection.d.ts","sourceRoot":"","sources":["../../../src/components/settings/AccountSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,mBAAmB;IAClC,4EAA4E;IAC5E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,GAAG,UAAU,KAAK,IAAI,CAAC;IACvD;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;CAC1C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,aAAa,EACb,kBAAkB,GACnB,EAAE,mBAAmB,qBA0CrB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useNavigation } from "../../context/NavigationContext";
|
|
3
|
+
import { SettingsRow, SettingsSection } from "../settings-row";
|
|
4
|
+
import { useAppConfig } from "../../context/AppConfigContext";
|
|
5
|
+
/**
|
|
6
|
+
* Generic ACCOUNT section used inside the settings dialog. Rows:
|
|
7
|
+
* • Profile (delegates to `onOpenProfile?.("profile")`)
|
|
8
|
+
* • Master Password (delegates to `onOpenProfile?.("security")`)
|
|
9
|
+
* • Server Configuration (default navigates to `routes.serverConfig`)
|
|
10
|
+
*/
|
|
11
|
+
export function AccountSection({ onClose, onOpenProfile, onOpenServerConfig, }) {
|
|
12
|
+
const router = useNavigation();
|
|
13
|
+
const { routes } = useAppConfig();
|
|
14
|
+
const handleServerConfig = onOpenServerConfig === undefined
|
|
15
|
+
? () => {
|
|
16
|
+
onClose();
|
|
17
|
+
router.push(routes.serverConfig);
|
|
18
|
+
}
|
|
19
|
+
: onOpenServerConfig;
|
|
20
|
+
return (<SettingsSection title="ACCOUNT">
|
|
21
|
+
<SettingsRow icon="person-outline" label="Profile" onPress={() => {
|
|
22
|
+
onClose();
|
|
23
|
+
onOpenProfile?.("profile");
|
|
24
|
+
}} showChevron/>
|
|
25
|
+
<SettingsRow icon="key-outline" label="Master Password" onPress={() => {
|
|
26
|
+
onClose();
|
|
27
|
+
onOpenProfile?.("security");
|
|
28
|
+
}} showChevron/>
|
|
29
|
+
{handleServerConfig ? (<SettingsRow icon="server-outline" label="Server Configuration" onPress={handleServerConfig} showChevron/>) : null}
|
|
30
|
+
</SettingsSection>);
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=AccountSection.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountSection.jsx","sourceRoot":"","sources":["../../../src/components/settings/AccountSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAoB9D;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,OAAO,EACP,aAAa,EACb,kBAAkB,GACE;IACpB,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,EAAE,CAAC;IAElC,MAAM,kBAAkB,GACtB,kBAAkB,KAAK,SAAS;QAC9B,CAAC,CAAC,GAAG,EAAE;YACH,OAAO,EAAE,CAAC;YACV,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QACnC,CAAC;QACH,CAAC,CAAC,kBAAkB,CAAC;IAEzB,OAAO,CACL,CAAC,eAAe,CAAC,KAAK,CAAC,SAAS,CAC9B;MAAA,CAAC,WAAW,CACV,IAAI,CAAC,gBAAgB,CACrB,KAAK,CAAC,SAAS,CACf,OAAO,CAAC,CAAC,GAAG,EAAE;YACZ,OAAO,EAAE,CAAC;YACV,aAAa,EAAE,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC,CAAC,CACF,WAAW,EAEb;MAAA,CAAC,WAAW,CACV,IAAI,CAAC,aAAa,CAClB,KAAK,CAAC,iBAAiB,CACvB,OAAO,CAAC,CAAC,GAAG,EAAE;YACZ,OAAO,EAAE,CAAC;YACV,aAAa,EAAE,CAAC,UAAU,CAAC,CAAC;QAC9B,CAAC,CAAC,CACF,WAAW,EAEb;MAAA,CAAC,kBAAkB,CAAC,CAAC,CAAC,CACpB,CAAC,WAAW,CACV,IAAI,CAAC,gBAAgB,CACrB,KAAK,CAAC,sBAAsB,CAC5B,OAAO,CAAC,CAAC,kBAAkB,CAAC,CAC5B,WAAW,EACX,CACH,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DangerZoneSectionProps {
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
/**
|
|
5
|
+
* Fires when the user taps Delete Account. Apps wire this to a
|
|
6
|
+
* confirm-and-delete dialog (which then calls
|
|
7
|
+
* `useAuth().deleteAccount(password)`). Without it the row is hidden.
|
|
8
|
+
*/
|
|
9
|
+
onRequestDeleteAccount?: () => void;
|
|
10
|
+
}
|
|
11
|
+
/** Generic DANGER ZONE section — Sign out + (optionally) Delete account. */
|
|
12
|
+
export declare function DangerZoneSection({ onClose, onRequestDeleteAccount }: DangerZoneSectionProps): React.JSX.Element;
|
|
13
|
+
//# sourceMappingURL=DangerZoneSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DangerZoneSection.d.ts","sourceRoot":"","sources":["../../../src/components/settings/DangerZoneSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;CACrC;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,EAAE,sBAAsB,qBAqB5F"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { useCallback } from "react";
|
|
2
|
+
import { useAuth } from "../../hooks/useAuth";
|
|
3
|
+
import { SettingsRow, SettingsSection } from "../settings-row";
|
|
4
|
+
/** Generic DANGER ZONE section — Sign out + (optionally) Delete account. */
|
|
5
|
+
export function DangerZoneSection({ onClose, onRequestDeleteAccount }) {
|
|
6
|
+
const { logout } = useAuth();
|
|
7
|
+
const handleSignOut = useCallback(() => {
|
|
8
|
+
onClose();
|
|
9
|
+
logout();
|
|
10
|
+
}, [onClose, logout]);
|
|
11
|
+
return (<SettingsSection title="DANGER ZONE" destructive>
|
|
12
|
+
<SettingsRow icon="log-out-outline" label="Sign Out" destructive onPress={handleSignOut}/>
|
|
13
|
+
{onRequestDeleteAccount ? (<SettingsRow icon="trash-outline" label="Delete Account" destructive onPress={onRequestDeleteAccount}/>) : null}
|
|
14
|
+
</SettingsSection>);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=DangerZoneSection.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DangerZoneSection.jsx","sourceRoot":"","sources":["../../../src/components/settings/DangerZoneSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAY/D,4EAA4E;AAC5E,MAAM,UAAU,iBAAiB,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAA0B;IAC3F,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC;IAE7B,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,EAAE;QACrC,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,CAAC;IACX,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAEtB,OAAO,CACL,CAAC,eAAe,CAAC,KAAK,CAAC,aAAa,CAAC,WAAW,CAC9C;MAAA,CAAC,WAAW,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,EACxF;MAAA,CAAC,sBAAsB,CAAC,CAAC,CAAC,CACxB,CAAC,WAAW,CACV,IAAI,CAAC,eAAe,CACpB,KAAK,CAAC,gBAAgB,CACtB,WAAW,CACX,OAAO,CAAC,CAAC,sBAAsB,CAAC,EAChC,CACH,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC"}
|