@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,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Text as RNText } from "react-native";
|
|
3
|
+
import { cn } from "../utils/cn";
|
|
4
|
+
/**
|
|
5
|
+
* Text component with NativeWind styling. Provides consistent typography
|
|
6
|
+
* across consumer apps with dark-mode support.
|
|
7
|
+
*/
|
|
8
|
+
export function Text({ className, children, ...props }) {
|
|
9
|
+
return (<RNText className={cn("text-base text-foreground dark:text-white", className)} {...props}>
|
|
10
|
+
{children}
|
|
11
|
+
</RNText>);
|
|
12
|
+
}
|
|
13
|
+
/** Heading variant with larger size and bold weight. */
|
|
14
|
+
export function Heading({ className, children, ...props }) {
|
|
15
|
+
return (<RNText className={cn("text-2xl font-bold text-foreground dark:text-white", className)} {...props}>
|
|
16
|
+
{children}
|
|
17
|
+
</RNText>);
|
|
18
|
+
}
|
|
19
|
+
/** Label variant for form labels and small text. */
|
|
20
|
+
export function Label({ className, children, ...props }) {
|
|
21
|
+
return (<RNText className={cn("text-sm text-muted-foreground dark:text-neutral-400", className)} {...props}>
|
|
22
|
+
{children}
|
|
23
|
+
</RNText>);
|
|
24
|
+
}
|
|
25
|
+
/** Muted text variant for less prominent content. */
|
|
26
|
+
export function MutedText({ className, children, ...props }) {
|
|
27
|
+
return (<RNText className={cn("text-base text-muted-foreground dark:text-neutral-400", className)} {...props}>
|
|
28
|
+
{children}
|
|
29
|
+
</RNText>);
|
|
30
|
+
}
|
|
31
|
+
/** Monospace text variant for codes, passwords, and technical content. */
|
|
32
|
+
export function MonoText({ className, children, ...props }) {
|
|
33
|
+
return (<RNText className={cn("font-mono text-base text-foreground dark:text-white", className)} {...props}>
|
|
34
|
+
{children}
|
|
35
|
+
</RNText>);
|
|
36
|
+
}
|
|
37
|
+
/** Error text variant for validation messages. */
|
|
38
|
+
export function ErrorText({ className, children, ...props }) {
|
|
39
|
+
return (<RNText className={cn("text-sm text-destructive dark:text-red-400", className)} {...props}>
|
|
40
|
+
{children}
|
|
41
|
+
</RNText>);
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=text.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.jsx","sourceRoot":"","sources":["../../src/components/text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,IAAI,MAAM,EAAiC,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAOjC;;;GAGG;AACH,MAAM,UAAU,IAAI,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAa;IAC/D,OAAO,CACL,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,2CAA2C,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CACvF;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,MAAM,CA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,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAa;IACpE,OAAO,CACL,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,4CAA4C,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CACxF;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Native toast portal — renders `Toast` directly in the component tree.
|
|
4
|
+
* Toast uses absolute positioning + a high zIndex to float above most
|
|
5
|
+
* content. Note: Toast will not appear above a React Native `Modal`
|
|
6
|
+
* (dialogs); wrapping in a Modal to force that would block all touches
|
|
7
|
+
* on the screen.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ToastPortal(): React.JSX.Element;
|
|
10
|
+
export default ToastPortal;
|
|
11
|
+
//# sourceMappingURL=ToastPortal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastPortal.d.ts","sourceRoot":"","sources":["../../../src/components/toast/ToastPortal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;;;;GAMG;AACH,wBAAgB,WAAW,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAE/C;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Toast from "react-native-toast-message";
|
|
3
|
+
import { toastConfig } from "./toast-config";
|
|
4
|
+
/**
|
|
5
|
+
* Native toast portal — renders `Toast` directly in the component tree.
|
|
6
|
+
* Toast uses absolute positioning + a high zIndex to float above most
|
|
7
|
+
* content. Note: Toast will not appear above a React Native `Modal`
|
|
8
|
+
* (dialogs); wrapping in a Modal to force that would block all touches
|
|
9
|
+
* on the screen.
|
|
10
|
+
*/
|
|
11
|
+
export function ToastPortal() {
|
|
12
|
+
return <Toast config={toastConfig} position="top" visibilityTime={3000} topOffset={50}/>;
|
|
13
|
+
}
|
|
14
|
+
export default ToastPortal;
|
|
15
|
+
//# sourceMappingURL=ToastPortal.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastPortal.jsx","sourceRoot":"","sources":["../../../src/components/toast/ToastPortal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,4BAA4B,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,UAAU,WAAW;IACzB,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAG,CAAC;AAC5F,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Web toast portal — mounts `Toast` into a div appended directly to
|
|
4
|
+
* `document.body` so it renders above React Native Web's `Modal`
|
|
5
|
+
* portals (which also target body).
|
|
6
|
+
*
|
|
7
|
+
* The container div uses `pointer-events:none` so the transparent
|
|
8
|
+
* overlay never intercepts clicks. HTML `pointer-events` does NOT
|
|
9
|
+
* inherit to children (unlike SVG), so the visible toast pill itself
|
|
10
|
+
* remains fully interactive via its own event handlers.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ToastPortal(): React.JSX.Element | null;
|
|
13
|
+
export default ToastPortal;
|
|
14
|
+
//# sourceMappingURL=ToastPortal.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastPortal.web.d.ts","sourceRoot":"","sources":["../../../src/components/toast/ToastPortal.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD;;;;;;;;;GASG;AACH,wBAAgB,WAAW,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA6BtD;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from "react";
|
|
2
|
+
import { createPortal } from "react-dom";
|
|
3
|
+
import Toast from "react-native-toast-message";
|
|
4
|
+
import { toastConfig } from "./toast-config";
|
|
5
|
+
/**
|
|
6
|
+
* Web toast portal — mounts `Toast` into a div appended directly to
|
|
7
|
+
* `document.body` so it renders above React Native Web's `Modal`
|
|
8
|
+
* portals (which also target body).
|
|
9
|
+
*
|
|
10
|
+
* The container div uses `pointer-events:none` so the transparent
|
|
11
|
+
* overlay never intercepts clicks. HTML `pointer-events` does NOT
|
|
12
|
+
* inherit to children (unlike SVG), so the visible toast pill itself
|
|
13
|
+
* remains fully interactive via its own event handlers.
|
|
14
|
+
*/
|
|
15
|
+
export function ToastPortal() {
|
|
16
|
+
const containerRef = useRef(null);
|
|
17
|
+
if (!containerRef.current) {
|
|
18
|
+
const div = document.createElement("div");
|
|
19
|
+
div.style.cssText =
|
|
20
|
+
"position:fixed;top:0;bottom:0;right:0;left:var(--sidebar-width,0px);z-index:999999;pointer-events:none;";
|
|
21
|
+
containerRef.current = div;
|
|
22
|
+
}
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
const container = containerRef.current;
|
|
25
|
+
if (!container) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
document.body.appendChild(container);
|
|
29
|
+
return () => {
|
|
30
|
+
document.body.removeChild(container);
|
|
31
|
+
};
|
|
32
|
+
}, []);
|
|
33
|
+
if (!containerRef.current) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return createPortal(<Toast config={toastConfig} position="top" visibilityTime={3000} topOffset={50}/>, containerRef.current);
|
|
37
|
+
}
|
|
38
|
+
export default ToastPortal;
|
|
39
|
+
//# sourceMappingURL=ToastPortal.web.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastPortal.web.jsx","sourceRoot":"","sources":["../../../src/components/toast/ToastPortal.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,MAAM,4BAA4B,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,YAAY,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IAEzD,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;QAC1B,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC1C,GAAG,CAAC,KAAK,CAAC,OAAO;YACf,yGAAyG,CAAC;QAC5G,YAAY,CAAC,OAAO,GAAG,GAAG,CAAC;IAC7B,CAAC;IAED,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,SAAS,GAAG,YAAY,CAAC,OAAO,CAAC;QACvC,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,OAAO;QACT,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACrC,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACvC,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,YAAY,CACjB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAG,EAClF,YAAY,CAAC,OAAO,CACrB,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { BaseToastProps } from "react-native-toast-message";
|
|
3
|
+
/**
|
|
4
|
+
* Shared toast renderer config for `react-native-toast-message`. Three
|
|
5
|
+
* variants (success / error / info) rendered as pill cards in the
|
|
6
|
+
* package's standard token palette. Used by `ToastPortal` on both
|
|
7
|
+
* native and web.
|
|
8
|
+
*/
|
|
9
|
+
export declare const toastConfig: {
|
|
10
|
+
success: ({ text1, text2 }: BaseToastProps) => React.JSX.Element;
|
|
11
|
+
error: ({ text1, text2 }: BaseToastProps) => React.JSX.Element;
|
|
12
|
+
info: ({ text1, text2 }: BaseToastProps) => React.JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=toast-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-config.d.ts","sourceRoot":"","sources":["../../../src/components/toast/toast-config.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE;;;;;GAKG;AACH,eAAO,MAAM,WAAW;gCACM,cAAc;8BAMhB,cAAc;6BAMf,cAAc;CAMxC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import { Text } from "../text";
|
|
4
|
+
/**
|
|
5
|
+
* Shared toast renderer config for `react-native-toast-message`. Three
|
|
6
|
+
* variants (success / error / info) rendered as pill cards in the
|
|
7
|
+
* package's standard token palette. Used by `ToastPortal` on both
|
|
8
|
+
* native and web.
|
|
9
|
+
*/
|
|
10
|
+
export const toastConfig = {
|
|
11
|
+
success: ({ text1, text2 }) => (<View className="self-center bg-green-500 dark:bg-green-600 px-4 py-3 rounded-lg mx-4 mt-4">
|
|
12
|
+
<Text className="text-white font-semibold">{text1}</Text>
|
|
13
|
+
{text2 && <Text className="text-white/80 text-sm mt-1">{text2}</Text>}
|
|
14
|
+
</View>),
|
|
15
|
+
error: ({ text1, text2 }) => (<View className="self-center bg-destructive dark:bg-red-600 px-4 py-3 rounded-lg mx-4 mt-4">
|
|
16
|
+
<Text className="text-white font-semibold">{text1}</Text>
|
|
17
|
+
{text2 && <Text className="text-white/80 text-sm mt-1">{text2}</Text>}
|
|
18
|
+
</View>),
|
|
19
|
+
info: ({ text1, text2 }) => (<View className="self-center bg-blue-500 dark:bg-blue-600 px-4 py-3 rounded-lg mx-4 mt-4">
|
|
20
|
+
<Text className="text-white font-semibold">{text1}</Text>
|
|
21
|
+
{text2 && <Text className="text-white/80 text-sm mt-1">{text2}</Text>}
|
|
22
|
+
</View>),
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=toast-config.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-config.jsx","sourceRoot":"","sources":["../../../src/components/toast/toast-config.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MA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|
2
|
+
declare const Tooltip: {
|
|
3
|
+
({ asChild, delayDuration: _delayDuration, skipDelayDuration: _skipDelayDuration, disableHoverableContent: _disableHoverableContent, onOpenChange: onOpenChangeProp, ref, ...viewProps }: import("react-native").ViewProps & {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
} & {
|
|
6
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
|
+
delayDuration?: number;
|
|
8
|
+
skipDelayDuration?: number;
|
|
9
|
+
disableHoverableContent?: boolean;
|
|
10
|
+
} & React.RefAttributes<import("react-native").View>): React.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
declare const TooltipTrigger: {
|
|
14
|
+
({ asChild, onPress: onPressProp, disabled, ref, ...props }: Omit<import("react-native").PressableProps & React.RefAttributes<import("react-native").View>, "ref"> & {
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
} & {
|
|
17
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
18
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
19
|
+
} & React.RefAttributes<import("@rn-primitives/tooltip").TriggerRef>): React.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<import("react-native").ViewProps & {
|
|
23
|
+
asChild?: boolean;
|
|
24
|
+
} & Omit<import("@rn-primitives/types").PositionedContentProps, "side"> & {
|
|
25
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
26
|
+
} & React.RefAttributes<import("react-native").View>, "ref"> & {
|
|
27
|
+
className?: string;
|
|
28
|
+
} & React.RefAttributes<import("react-native").View>>;
|
|
29
|
+
export { Tooltip, TooltipTrigger, TooltipContent };
|
|
30
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,QAAA,MAAM,OAAO;;;;;;;;;;CAAwB,CAAC;AACtC,QAAA,MAAM,cAAc;;;;;;;;CAA2B,CAAC;AAEhD,QAAA,MAAM,cAAc;;;;;gBAE8D,MAAM;qDAgBtF,CAAC;AAGH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@rn-primitives/tooltip";
|
|
3
|
+
import { cn } from "../utils/cn";
|
|
4
|
+
import { Text } from "./text";
|
|
5
|
+
const Tooltip = TooltipPrimitive.Root;
|
|
6
|
+
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
7
|
+
const TooltipContent = React.forwardRef(({ className, sideOffset = 6, children, ...props }, ref) => (<TooltipPrimitive.Portal>
|
|
8
|
+
<TooltipPrimitive.Content ref={ref} sideOffset={sideOffset} className={cn("z-50 rounded-md px-3 py-1.5", "bg-foreground dark:bg-white", className)} {...props}>
|
|
9
|
+
{typeof children === "string" ? (<Text className="text-xs text-background dark:text-black">{children}</Text>) : (children)}
|
|
10
|
+
</TooltipPrimitive.Content>
|
|
11
|
+
</TooltipPrimitive.Portal>));
|
|
12
|
+
TooltipContent.displayName = "TooltipContent";
|
|
13
|
+
export { Tooltip, TooltipTrigger, TooltipContent };
|
|
14
|
+
//# sourceMappingURL=tooltip.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.jsx","sourceRoot":"","sources":["../../src/components/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,gBAAgB,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC;AACtC,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAEhD,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC5D,CAAC,gBAAgB,CAAC,MAAM,CACtB;IAAA,CAAC,gBAAgB,CAAC,OAAO,CACvB,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,SAAS,CAAC,CAAC,EAAE,CAAC,6BAA6B,EAAE,6BAA6B,EAAE,SAAS,CAAC,CAAC,CACvF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAC9B,CAAC,IAAI,CAAC,SAAS,CAAC,yCAAyC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAC5E,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,CACH;IAAA,EAAE,gBAAgB,CAAC,OAAO,CAC5B;EAAA,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAC3B,CAAC,CAAC;AACH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface TotpDisplayProps {
|
|
3
|
+
/** Base32-encoded TOTP secret. Empty string disables the display. */
|
|
4
|
+
secret: string;
|
|
5
|
+
/**
|
|
6
|
+
* Pure function that computes the current TOTP code from `secret`.
|
|
7
|
+
* Apps inject their own implementation so this widget stays decoupled
|
|
8
|
+
* from the crypto module — e.g. vault wires
|
|
9
|
+
* `@vault/shared/crypto/totp.computeTotpCode`.
|
|
10
|
+
*/
|
|
11
|
+
computeCode: (secret: string) => string;
|
|
12
|
+
/** TOTP step period in seconds. Defaults to 30. */
|
|
13
|
+
period?: number;
|
|
14
|
+
/** Optional callback fired after a successful clipboard write. */
|
|
15
|
+
onCopy?: (code: string) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* TOTP code display with a circular countdown ring. Recomputes the code
|
|
19
|
+
* on each 30s window boundary; ticks the remaining-seconds value once
|
|
20
|
+
* per second to drive the ring animation.
|
|
21
|
+
*/
|
|
22
|
+
export declare function TotpDisplay({ secret, computeCode, period, onCopy, }: TotpDisplayProps): React.JSX.Element | null;
|
|
23
|
+
//# sourceMappingURL=totp-display.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"totp-display.d.ts","sourceRoot":"","sources":["../../src/components/totp-display.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,MAAM,WAAW,gBAAgB;IAC/B,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAID;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,WAAW,EACX,MAAW,EACX,MAAM,GACP,EAAE,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA4G7C"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import { Pressable, View } from "react-native";
|
|
3
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
4
|
+
import { useColorScheme } from "nativewind";
|
|
5
|
+
import { MutedText, Text } from "./text";
|
|
6
|
+
import { copyToClipboard } from "../utils/clipboard";
|
|
7
|
+
const PLACEHOLDER = "------";
|
|
8
|
+
/**
|
|
9
|
+
* TOTP code display with a circular countdown ring. Recomputes the code
|
|
10
|
+
* on each 30s window boundary; ticks the remaining-seconds value once
|
|
11
|
+
* per second to drive the ring animation.
|
|
12
|
+
*/
|
|
13
|
+
export function TotpDisplay({ secret, computeCode, period = 30, onCopy, }) {
|
|
14
|
+
const { colorScheme } = useColorScheme();
|
|
15
|
+
const isDark = colorScheme === "dark";
|
|
16
|
+
const safeCompute = (s) => {
|
|
17
|
+
if (!s) {
|
|
18
|
+
return PLACEHOLDER;
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
return computeCode(s);
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return PLACEHOLDER;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const [code, setCode] = useState(() => safeCompute(secret));
|
|
28
|
+
const [remaining, setRemaining] = useState(() => {
|
|
29
|
+
const now = Math.floor(Date.now() / 1000);
|
|
30
|
+
return period - (now % period);
|
|
31
|
+
});
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (!secret) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
let lastWindow = -1;
|
|
37
|
+
const tick = () => {
|
|
38
|
+
const now = Math.floor(Date.now() / 1000);
|
|
39
|
+
const window = Math.floor(now / period);
|
|
40
|
+
setRemaining(period - (now % period));
|
|
41
|
+
if (window !== lastWindow) {
|
|
42
|
+
lastWindow = window;
|
|
43
|
+
setCode(safeCompute(secret));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
tick();
|
|
47
|
+
const id = setInterval(tick, 1000);
|
|
48
|
+
return () => clearInterval(id);
|
|
49
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
50
|
+
}, [secret, period]);
|
|
51
|
+
if (!secret) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
const copy = async () => {
|
|
55
|
+
if (!code || code === PLACEHOLDER) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
// Route through the shared helper so the 30s auto-clear applies.
|
|
59
|
+
// TOTP codes rotate every 30s anyway, but the clipboard residue
|
|
60
|
+
// still leaks the code to whatever the user pastes next (or to
|
|
61
|
+
// a shoulder-surfer hitting paste).
|
|
62
|
+
const ok = await copyToClipboard(code);
|
|
63
|
+
if (ok) {
|
|
64
|
+
onCopy?.(code);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const urgent = remaining <= 5;
|
|
68
|
+
const foreground = isDark ? "rgb(255, 255, 255)" : "rgb(0, 0, 0)";
|
|
69
|
+
const destructive = "rgb(239, 68, 68)";
|
|
70
|
+
const border = isDark ? "rgb(38, 38, 38)" : "rgb(229, 229, 229)";
|
|
71
|
+
const card = isDark ? "rgb(0, 0, 0)" : "rgb(255, 255, 255)";
|
|
72
|
+
const secondary = isDark ? "rgb(38, 38, 38)" : "rgb(245, 245, 245)";
|
|
73
|
+
const accent = urgent ? destructive : foreground;
|
|
74
|
+
return (<Pressable onPress={copy} accessibilityRole="button" accessibilityLabel="Copy TOTP code" accessibilityHint="Copies the current one-time code to the clipboard" style={({ pressed }) => ({
|
|
75
|
+
flexDirection: "row",
|
|
76
|
+
alignItems: "center",
|
|
77
|
+
gap: 12,
|
|
78
|
+
padding: 12,
|
|
79
|
+
borderRadius: 8,
|
|
80
|
+
borderWidth: 1,
|
|
81
|
+
borderColor: border,
|
|
82
|
+
backgroundColor: pressed ? secondary : card,
|
|
83
|
+
})}>
|
|
84
|
+
<CountdownRing remaining={remaining} total={period} color={accent} backgroundColor={border}/>
|
|
85
|
+
<View style={{ flex: 1 }}>
|
|
86
|
+
<MutedText className="text-xs" style={{ marginBottom: 2 }}>
|
|
87
|
+
TOTP code
|
|
88
|
+
</MutedText>
|
|
89
|
+
<Text style={{
|
|
90
|
+
color: accent,
|
|
91
|
+
fontSize: 22,
|
|
92
|
+
fontWeight: "600",
|
|
93
|
+
letterSpacing: 4,
|
|
94
|
+
fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
95
|
+
}}>
|
|
96
|
+
{`${code.slice(0, 3)} ${code.slice(3)}`}
|
|
97
|
+
</Text>
|
|
98
|
+
</View>
|
|
99
|
+
<Ionicons name="copy-outline" size={16} color={isDark ? "rgb(163, 163, 163)" : "rgb(115, 115, 115)"}/>
|
|
100
|
+
</Pressable>);
|
|
101
|
+
}
|
|
102
|
+
function CountdownRing({ remaining, total, color, backgroundColor }) {
|
|
103
|
+
const size = 36;
|
|
104
|
+
const stroke = 3;
|
|
105
|
+
const radius = (size - stroke) / 2;
|
|
106
|
+
const circumference = 2 * Math.PI * radius;
|
|
107
|
+
const fraction = Math.max(0, Math.min(1, remaining / total));
|
|
108
|
+
const dashOffset = circumference * (1 - fraction);
|
|
109
|
+
// Cast raw SVG tags through React.createElement so RN-Web renders them
|
|
110
|
+
// as real <svg> / <circle> elements without depending on
|
|
111
|
+
// `react-native-svg`. Native targets fall back to the View at the
|
|
112
|
+
// outer level — apps that want native parity should overlay this with
|
|
113
|
+
// an SVG-backed implementation in their own component layer.
|
|
114
|
+
const Svg = "svg";
|
|
115
|
+
const Circle = "circle";
|
|
116
|
+
return (<View style={{ width: size, height: size, alignItems: "center", justifyContent: "center" }}>
|
|
117
|
+
<Svg width={size} height={size} viewBox={`0 0 ${size} ${size}`}>
|
|
118
|
+
<Circle cx={size / 2} cy={size / 2} r={radius} fill="none" stroke={backgroundColor} strokeWidth={stroke}/>
|
|
119
|
+
<Circle cx={size / 2} cy={size / 2} r={radius} fill="none" stroke={color} strokeWidth={stroke} strokeLinecap="round" strokeDasharray={circumference} strokeDashoffset={dashOffset} transform={`rotate(-90 ${size / 2} ${size / 2})`} style={{ transition: "stroke-dashoffset 1s linear" }}/>
|
|
120
|
+
</Svg>
|
|
121
|
+
<Text style={{
|
|
122
|
+
position: "absolute",
|
|
123
|
+
color,
|
|
124
|
+
fontSize: 11,
|
|
125
|
+
fontWeight: "600",
|
|
126
|
+
fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
127
|
+
}}>
|
|
128
|
+
{remaining}
|
|
129
|
+
</Text>
|
|
130
|
+
</View>);
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=totp-display.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"totp-display.jsx","sourceRoot":"","sources":["../../src/components/totp-display.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAkBrD,MAAM,WAAW,GAAG,QAAQ,CAAC;AAE7B;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,MAAM,EACN,WAAW,EACX,MAAM,GAAG,EAAE,EACX,MAAM,GACW;IACjB,MAAM,EAAE,WAAW,EAAE,GAAG,cAAc,EAAE,CAAC;IACzC,MAAM,MAAM,GAAG,WAAW,KAAK,MAAM,CAAC;IAEtC,MAAM,WAAW,GAAG,CAAC,CAAS,EAAU,EAAE;QACxC,IAAI,CAAC,CAAC,EAAE,CAAC;YACP,OAAO,WAAW,CAAC;QACrB,CAAC;QACD,IAAI,CAAC;YACH,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC;QACxB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,WAAW,CAAC;QACrB,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAS,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAA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,eAAe,CAAC,CAAC,aAAa,CAAC,CAC/B,gBAAgB,CAAC,CAAC,UAAU,CAAC,CAC7B,SAAS,CAAC,CAAC,cAAc,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,GAAG,CAAC,CACjD,KAAK,CAAC,CAAC,EAAE,UAAU,EAAE,6BAA6B,EAAE,CAAC,EAEzD;MAAA,EAAE,GAAG,CACL;MAAA,CAAC,IAAI,CACH,KAAK,CAAC,CAAC;YACL,QAAQ,EAAE,UAAU;YACpB,KAAK;YACL,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,KAAK;YACjB,UAAU,EAAE,gDAAgD;SAC7D,CAAC,CAEF;QAAA,CAAC,SAAS,CACZ;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface UserAvatarProps {
|
|
3
|
+
/** Square pixel size. Defaults to 36. */
|
|
4
|
+
size?: number;
|
|
5
|
+
/**
|
|
6
|
+
* Override for the initial letter. By default the avatar pulls the
|
|
7
|
+
* first character of `display_name`, falling back to `username`, then
|
|
8
|
+
* `email`, then `?`.
|
|
9
|
+
*/
|
|
10
|
+
initial?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Initial-letter circular avatar. Pulls the current user from
|
|
14
|
+
* `useAuth()` and renders a foreground-on-primary disc. Apps that want
|
|
15
|
+
* a static initial (e.g. an icon strip) pass `initial` explicitly.
|
|
16
|
+
*/
|
|
17
|
+
export declare const UserAvatar: React.NamedExoticComponent<UserAvatarProps>;
|
|
18
|
+
//# sourceMappingURL=user-avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-avatar.d.ts","sourceRoot":"","sources":["../../src/components/user-avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,6CAsBrB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import { useColorScheme } from "nativewind";
|
|
4
|
+
import { cn } from "../utils/cn";
|
|
5
|
+
import { useAuth } from "../hooks/useAuth";
|
|
6
|
+
import { Text } from "./text";
|
|
7
|
+
/**
|
|
8
|
+
* Initial-letter circular avatar. Pulls the current user from
|
|
9
|
+
* `useAuth()` and renders a foreground-on-primary disc. Apps that want
|
|
10
|
+
* a static initial (e.g. an icon strip) pass `initial` explicitly.
|
|
11
|
+
*/
|
|
12
|
+
export const UserAvatar = React.memo(function UserAvatar({ size = 36, initial }) {
|
|
13
|
+
const { user } = useAuth();
|
|
14
|
+
const { colorScheme } = useColorScheme();
|
|
15
|
+
const isDark = colorScheme === "dark";
|
|
16
|
+
const resolved = initial ??
|
|
17
|
+
(user?.display_name || user?.username || user?.email || "?")[0]?.toUpperCase() ??
|
|
18
|
+
"?";
|
|
19
|
+
return (<View className={cn("items-center justify-center rounded-full", isDark ? "bg-white" : "bg-black")} style={{ width: size, height: size }}>
|
|
20
|
+
<Text className="font-bold" style={{ fontSize: size * 0.44, color: isDark ? "#000000" : "#FFFFFF" }}>
|
|
21
|
+
{resolved}
|
|
22
|
+
</Text>
|
|
23
|
+
</View>);
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=user-avatar.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-avatar.jsx","sourceRoot":"","sources":["../../src/components/user-avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OA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|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type Href } from "expo-router";
|
|
3
|
+
import { type ImageStyle, type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
+
/**
|
|
5
|
+
* Per-app route map consumed by the entropy-ui auth screens / hooks.
|
|
6
|
+
* Apps supply this so the shared screens can navigate without hard-coding
|
|
7
|
+
* vault- or bootstrap-specific paths.
|
|
8
|
+
*/
|
|
9
|
+
export interface AppRoutes {
|
|
10
|
+
welcome: Href;
|
|
11
|
+
login: Href;
|
|
12
|
+
register: Href;
|
|
13
|
+
forgotPassword: Href;
|
|
14
|
+
resetPassword: Href;
|
|
15
|
+
verifyEmail: Href;
|
|
16
|
+
mfaChallenge: Href;
|
|
17
|
+
mfaEnroll: Href;
|
|
18
|
+
termsOfService: Href;
|
|
19
|
+
privacyPolicy: Href;
|
|
20
|
+
serverConfig: Href;
|
|
21
|
+
importData: Href;
|
|
22
|
+
/** Where to land authenticated users with no pending onboarding step. */
|
|
23
|
+
home: Href;
|
|
24
|
+
}
|
|
25
|
+
export type LogoComponent = React.ComponentType<{
|
|
26
|
+
width?: number;
|
|
27
|
+
height?: number;
|
|
28
|
+
style?: StyleProp<ViewStyle> | StyleProp<ImageStyle>;
|
|
29
|
+
}>;
|
|
30
|
+
export interface AppConfig {
|
|
31
|
+
/** User-facing brand name. Renders in headings, toasts, MFA issuer, etc. */
|
|
32
|
+
appName: string;
|
|
33
|
+
/** Brand logo as a React component (SVG / Image). */
|
|
34
|
+
Logo: LogoComponent;
|
|
35
|
+
/** Per-app route map. */
|
|
36
|
+
routes: AppRoutes;
|
|
37
|
+
/**
|
|
38
|
+
* Tagline rendered under the brand on the welcome screen. Defaults to
|
|
39
|
+
* a generic "An Entropy Softworks platform".
|
|
40
|
+
*/
|
|
41
|
+
tagline?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Optional terms-of-service markdown / plain text. Welcome screen and
|
|
44
|
+
* the dedicated terms screen render this. When omitted, the screens
|
|
45
|
+
* render a generic stub.
|
|
46
|
+
*/
|
|
47
|
+
termsText?: string;
|
|
48
|
+
/** Optional privacy-policy markdown / plain text. */
|
|
49
|
+
privacyText?: string;
|
|
50
|
+
}
|
|
51
|
+
export declare function AppConfigProvider({ config, children, }: {
|
|
52
|
+
config: AppConfig;
|
|
53
|
+
children: React.ReactNode;
|
|
54
|
+
}): React.JSX.Element;
|
|
55
|
+
export declare function useAppConfig(): AppConfig;
|
|
56
|
+
//# sourceMappingURL=AppConfigContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppConfigContext.d.ts","sourceRoot":"","sources":["../../src/context/AppConfigContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/E;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,EAAE,IAAI,CAAC;IACf,cAAc,EAAE,IAAI,CAAC;IACrB,aAAa,EAAE,IAAI,CAAC;IACpB,WAAW,EAAE,IAAI,CAAC;IAClB,YAAY,EAAE,IAAI,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,cAAc,EAAE,IAAI,CAAC;IACrB,aAAa,EAAE,IAAI,CAAC;IACpB,YAAY,EAAE,IAAI,CAAC;IACnB,UAAU,EAAE,IAAI,CAAC;IACjB,yEAAyE;IACzE,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;CACtD,CAAC,CAAC;AAEH,MAAM,WAAW,SAAS;IACxB,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,IAAI,EAAE,aAAa,CAAC;IACpB,yBAAyB;IACzB,MAAM,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAID,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAGA;AAED,wBAAgB,YAAY,IAAI,SAAS,CAQxC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { createContext, useContext, useMemo } from "react";
|
|
2
|
+
const AppConfigContext = createContext(null);
|
|
3
|
+
export function AppConfigProvider({ config, children, }) {
|
|
4
|
+
const value = useMemo(() => config, [config]);
|
|
5
|
+
return <AppConfigContext.Provider value={value}>{children}</AppConfigContext.Provider>;
|
|
6
|
+
}
|
|
7
|
+
export function useAppConfig() {
|
|
8
|
+
const ctx = useContext(AppConfigContext);
|
|
9
|
+
if (!ctx) {
|
|
10
|
+
throw new Error("entropy-ui: useAppConfig must be used inside <AppConfigProvider config={...}>.");
|
|
11
|
+
}
|
|
12
|
+
return ctx;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=AppConfigContext.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppConfigContext.jsx","sourceRoot":"","sources":["../../src/context/AppConfigContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAsDlE,MAAM,gBAAgB,GAAG,aAAa,CAAmB,IAAI,CAAC,CAAC;AAE/D,MAAM,UAAU,iBAAiB,CAAC,EAChC,MAAM,EACN,QAAQ,GAIT;IACC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9C,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;AACzF,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,MAAM,GAAG,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;IACzC,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACb,gFAAgF,CACjF,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pluggable navigation surface used by entropy-ui's auth screens.
|
|
3
|
+
*
|
|
4
|
+
* The shared screens used to call `useRouter()` from `expo-router`
|
|
5
|
+
* directly, which made them un-usable in non-Expo bundles (the browser-
|
|
6
|
+
* extension popup, future Electron / web targets without the Expo
|
|
7
|
+
* router runtime). Routing through this context lets every consumer
|
|
8
|
+
* supply its own router implementation — expo-router on mobile / web,
|
|
9
|
+
* a stack-reducer adapter inside the extension popup, etc.
|
|
10
|
+
*
|
|
11
|
+
* When no consumer is wrapped in `<NavigationProvider>`, `useNavigation`
|
|
12
|
+
* falls back to `expo-router`'s `useRouter()`, so the existing mobile
|
|
13
|
+
* client keeps working unchanged.
|
|
14
|
+
*/
|
|
15
|
+
import React from "react";
|
|
16
|
+
import { type Href } from "expo-router";
|
|
17
|
+
export interface RouteTarget {
|
|
18
|
+
pathname: Href | string;
|
|
19
|
+
params?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
export interface AppRouter {
|
|
22
|
+
push(target: Href | string | RouteTarget): void;
|
|
23
|
+
replace(target: Href | string | RouteTarget): void;
|
|
24
|
+
back(): void;
|
|
25
|
+
}
|
|
26
|
+
export interface NavigationProviderProps {
|
|
27
|
+
router: AppRouter;
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Override the default expo-router-backed navigation for everything
|
|
32
|
+
* rendered below this provider. Apps without expo-router supply this
|
|
33
|
+
* with their own stack-reducer adapter; everyone else can ignore it.
|
|
34
|
+
*/
|
|
35
|
+
export declare function NavigationProvider({ router, children }: NavigationProviderProps): React.JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* Hook used by entropy-ui screens to navigate. Returns the override
|
|
38
|
+
* router supplied by `NavigationProvider` when present; otherwise
|
|
39
|
+
* delegates to `expo-router`'s `useRouter()`.
|
|
40
|
+
*/
|
|
41
|
+
export declare function useNavigation(): AppRouter;
|
|
42
|
+
//# sourceMappingURL=NavigationContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationContext.d.ts","sourceRoot":"","sources":["../../src/context/NavigationContext.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,KAAK,IAAI,EAAa,MAAM,aAAa,CAAC;AAEnD,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,WAAW,GAAG,IAAI,CAAC;IAChD,OAAO,CAAC,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,WAAW,GAAG,IAAI,CAAC;IACnD,IAAI,IAAI,IAAI,CAAC;CACd;AAID,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,uBAAuB,qBAG/E;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,SAAS,CAuBzC"}
|