@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":"data-table.jsx","sourceRoot":"","sources":["../../src/components/data-table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAuC,MAAM,cAAc,CAAC;AAC9F,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAmCtC,MAAM,UAAU,GAAG;IACjB,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,YAAY;CACX,CAAC;AAEX,MAAM,UAAU,GAGZ;IACF,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,QAAQ;IAChB,KAAK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ACH,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,SAAS,CAAC,gFAAgF,CAE1F;cAAA,CAAC,QAAQ,CAAC,SAAS,CAAC,YAAY,EAClC;YAAA,EAAE,IAAI,CAAC,CACR,CAAC,CACJ;QAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CACrB,CAAC,IAAI,CAAC,SAAS,CAAC,wCAAwC,CACtD;UAAA,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC,CAC1E;QAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,CACF,CAAC,QAAQ,CACP,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,SAAS,CAAC,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,EACjC,CACH,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type ViewStyle } from "react-native";
|
|
3
|
+
interface DialogProps {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
title?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
showCloseButton?: boolean;
|
|
9
|
+
draggable?: boolean;
|
|
10
|
+
maxWidth?: number;
|
|
11
|
+
/**
|
|
12
|
+
* When false, clicking the backdrop does NOT dismiss the dialog —
|
|
13
|
+
* required for any dialog that holds an unrecoverable input
|
|
14
|
+
* (master password, step-up confirmation, half-typed import). An
|
|
15
|
+
* accidental drag-then-click on the backdrop otherwise loses the
|
|
16
|
+
* user's typing with no undo. Defaults to true to keep the simple
|
|
17
|
+
* "click outside to cancel" pattern for non-input dialogs.
|
|
18
|
+
*/
|
|
19
|
+
dismissOnBackdrop?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function Dialog({ visible, onClose, title, children, showCloseButton, draggable, maxWidth, dismissOnBackdrop, }: DialogProps): React.JSX.Element;
|
|
22
|
+
interface DialogContentProps {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function DialogContent({ children, className }: DialogContentProps): React.JSX.Element;
|
|
27
|
+
interface DialogFooterProps {
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
className?: string;
|
|
30
|
+
style?: ViewStyle;
|
|
31
|
+
}
|
|
32
|
+
export declare function DialogFooter({ children, className, style }: DialogFooterProps): React.JSX.Element;
|
|
33
|
+
interface DialogButtonProps {
|
|
34
|
+
onPress: () => void;
|
|
35
|
+
variant?: "primary" | "secondary" | "ghost" | "destructive";
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
accessibilityLabel?: string;
|
|
38
|
+
accessibilityRole?: "button" | "link" | "none";
|
|
39
|
+
}
|
|
40
|
+
export declare function DialogButton({ onPress, variant, children, accessibilityLabel, accessibilityRole, }: DialogButtonProps): React.JSX.Element;
|
|
41
|
+
interface ConfirmDialogProps {
|
|
42
|
+
visible: boolean;
|
|
43
|
+
title: string;
|
|
44
|
+
message?: string;
|
|
45
|
+
/** Confirm-button label. Defaults to "Confirm". */
|
|
46
|
+
confirmLabel?: string;
|
|
47
|
+
/** Cancel-button label. Defaults to "Cancel". */
|
|
48
|
+
cancelLabel?: string;
|
|
49
|
+
/** Render the confirm button in the destructive (red) style. */
|
|
50
|
+
destructive?: boolean;
|
|
51
|
+
/** Hide the cancel button — useful for one-button info prompts. */
|
|
52
|
+
hideCancel?: boolean;
|
|
53
|
+
onConfirm: () => void;
|
|
54
|
+
onCancel: () => void;
|
|
55
|
+
}
|
|
56
|
+
export declare function ConfirmDialog({ visible, title, message, confirmLabel, cancelLabel, destructive, hideCancel, onConfirm, onCancel, }: ConfirmDialogProps): React.JSX.Element;
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,EASL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAQtB,UAAU,WAAW;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,wBAAgB,MAAM,CAAC,EACrB,OAAO,EACP,OAAO,EACP,KAAK,EACL,QAAQ,EACR,eAAsB,EACtB,SAAiB,EACjB,QAAc,EACd,iBAAwB,GACzB,EAAE,WAAW,qBA0Lb;AAID,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,kBAAkB,qBAExE;AAED,UAAU,iBAAiB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,iBAAiB,qBAM7E;AAED,UAAU,iBAAiB;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,aAAa,CAAC;IAC5D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;CAChD;AAED,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,OAAmB,EACnB,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,GAClB,EAAE,iBAAiB,qBA2CnB;AAQD,UAAU,kBAAkB;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mEAAmE;IACnE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,KAAK,EACL,OAAO,EACP,YAAwB,EACxB,WAAsB,EACtB,WAAmB,EACnB,UAAkB,EAClB,SAAS,EACT,QAAQ,GACT,EAAE,kBAAkB,qBAwBpB"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import React, { useRef, useState } from "react";
|
|
2
|
+
import { PanResponder, Platform, Pressable, Text as RNText, useWindowDimensions, View, } from "react-native";
|
|
3
|
+
import * as DialogPrimitive from "@rn-primitives/dialog";
|
|
4
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
5
|
+
import { useColorScheme } from "nativewind";
|
|
6
|
+
import { cn } from "../utils/cn";
|
|
7
|
+
export function Dialog({ visible, onClose, title, children, showCloseButton = true, draggable = false, maxWidth = 400, dismissOnBackdrop = true, }) {
|
|
8
|
+
const { colorScheme } = useColorScheme();
|
|
9
|
+
const isDark = colorScheme === "dark";
|
|
10
|
+
const { width: winW, height: winH } = useWindowDimensions();
|
|
11
|
+
// Drag state
|
|
12
|
+
const [offset, setOffset] = useState({ x: 0, y: 0 });
|
|
13
|
+
const offsetRef = useRef({ x: 0, y: 0 });
|
|
14
|
+
const dragStart = useRef({ x: 0, y: 0 });
|
|
15
|
+
// Reset position when the dialog opens.
|
|
16
|
+
const prevVisible = useRef(visible);
|
|
17
|
+
if (visible && !prevVisible.current) {
|
|
18
|
+
offsetRef.current = { x: 0, y: 0 };
|
|
19
|
+
setOffset({ x: 0, y: 0 });
|
|
20
|
+
}
|
|
21
|
+
prevVisible.current = visible;
|
|
22
|
+
const winWRef = useRef(winW);
|
|
23
|
+
const winHRef = useRef(winH);
|
|
24
|
+
const maxWidthRef = useRef(maxWidth);
|
|
25
|
+
winWRef.current = winW;
|
|
26
|
+
winHRef.current = winH;
|
|
27
|
+
maxWidthRef.current = maxWidth;
|
|
28
|
+
const dialogLayoutRef = useRef({ width: 0, height: 0 });
|
|
29
|
+
// Measured height also lives in state: the centering transform reads it at
|
|
30
|
+
// render time, and a ref alone never re-renders after onLayout — so tall
|
|
31
|
+
// dialogs (e.g. the legal popup) stayed pinned at the fallback height and
|
|
32
|
+
// rendered vertically off-center until a drag forced a re-render.
|
|
33
|
+
const [dialogH, setDialogH] = useState(0);
|
|
34
|
+
const onDialogLayout = React.useCallback((e) => {
|
|
35
|
+
const { width, height } = e.nativeEvent.layout;
|
|
36
|
+
dialogLayoutRef.current = { width, height };
|
|
37
|
+
if (height > 0) {
|
|
38
|
+
setDialogH(height);
|
|
39
|
+
}
|
|
40
|
+
}, []);
|
|
41
|
+
const clampOffset = (raw) => {
|
|
42
|
+
const w = winWRef.current;
|
|
43
|
+
const h = winHRef.current;
|
|
44
|
+
const dw = dialogLayoutRef.current.width || Math.min(maxWidthRef.current, w * 0.9);
|
|
45
|
+
const dh = dialogLayoutRef.current.height || 200;
|
|
46
|
+
const pad = 0.25;
|
|
47
|
+
const maxX = (w - dw * pad) / 2;
|
|
48
|
+
const maxY = (h - dh * pad) / 2;
|
|
49
|
+
return {
|
|
50
|
+
x: Math.max(-maxX, Math.min(maxX, raw.x)),
|
|
51
|
+
y: Math.max(-maxY, Math.min(maxY, raw.y)),
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
const activePanResponder = useRef(PanResponder.create({
|
|
55
|
+
onStartShouldSetPanResponder: (evt) => {
|
|
56
|
+
if (Platform.OS === "web") {
|
|
57
|
+
const webEvent = evt.nativeEvent;
|
|
58
|
+
const target = webEvent.target;
|
|
59
|
+
if (target && typeof target.closest === "function") {
|
|
60
|
+
const interactive = target.closest('input, textarea, select, button, a, label, [role="button"], [role="textbox"], [contenteditable="true"]');
|
|
61
|
+
if (interactive) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
},
|
|
68
|
+
onMoveShouldSetPanResponder: (_, gesture) => Math.abs(gesture.dx) > 8 || Math.abs(gesture.dy) > 8,
|
|
69
|
+
onPanResponderGrant: () => {
|
|
70
|
+
dragStart.current = { x: offsetRef.current.x, y: offsetRef.current.y };
|
|
71
|
+
},
|
|
72
|
+
onPanResponderMove: (_, gesture) => {
|
|
73
|
+
const next = {
|
|
74
|
+
x: dragStart.current.x + gesture.dx,
|
|
75
|
+
y: dragStart.current.y + gesture.dy,
|
|
76
|
+
};
|
|
77
|
+
const clamped = clampOffset(next);
|
|
78
|
+
offsetRef.current = clamped;
|
|
79
|
+
setOffset(clamped);
|
|
80
|
+
},
|
|
81
|
+
})).current;
|
|
82
|
+
return (<DialogPrimitive.Root open={visible} onOpenChange={(open) => {
|
|
83
|
+
if (!open) {
|
|
84
|
+
onClose();
|
|
85
|
+
}
|
|
86
|
+
}}>
|
|
87
|
+
<DialogPrimitive.Portal>
|
|
88
|
+
<DialogPrimitive.Overlay className="absolute inset-0 bg-black/50" closeOnPress={dismissOnBackdrop}/>
|
|
89
|
+
<DialogPrimitive.Content onLayout={onDialogLayout} className={cn("absolute self-center rounded-xl p-5", isDark ? "bg-neutral-900" : "bg-white", Platform.OS === "web" && "shadow-lg")} style={{
|
|
90
|
+
width: "90%",
|
|
91
|
+
maxWidth,
|
|
92
|
+
top: "50%",
|
|
93
|
+
left: "50%",
|
|
94
|
+
// Web: center with a CSS percentage translate of the element's
|
|
95
|
+
// OWN size — no height measurement (onLayout doesn't reliably
|
|
96
|
+
// fire for the portaled content, which left tall dialogs like the
|
|
97
|
+
// legal popup pinned to a stale fallback height and off-center).
|
|
98
|
+
// Native: RN has no % translate, so keep the measured math.
|
|
99
|
+
transform: Platform.OS === "web"
|
|
100
|
+
? `translate(calc(-50% + ${offset.x}px), calc(-50% + ${offset.y}px))`
|
|
101
|
+
: [
|
|
102
|
+
{ translateX: -(Math.min(maxWidth, winW * 0.9) / 2) + offset.x },
|
|
103
|
+
{ translateY: -(dialogH || 100) / 2 + offset.y },
|
|
104
|
+
],
|
|
105
|
+
}}>
|
|
106
|
+
{/* Radix accessibility: always render a Title. */}
|
|
107
|
+
{title ? null : (<DialogPrimitive.Title className="absolute h-px w-px overflow-hidden" style={{ clip: "rect(0,0,0,0)" }}>
|
|
108
|
+
Dialog
|
|
109
|
+
</DialogPrimitive.Title>)}
|
|
110
|
+
|
|
111
|
+
{title || showCloseButton ? (<View className="mb-4 flex-row items-center justify-between" {...(draggable ? activePanResponder.panHandlers : {})} {...(draggable && Platform.OS === "web"
|
|
112
|
+
? {
|
|
113
|
+
draggable: false,
|
|
114
|
+
onDragStart: (e) => {
|
|
115
|
+
e.preventDefault?.();
|
|
116
|
+
},
|
|
117
|
+
}
|
|
118
|
+
: {})} style={draggable
|
|
119
|
+
? {
|
|
120
|
+
cursor: "grab",
|
|
121
|
+
userSelect: "none",
|
|
122
|
+
WebkitUserDrag: "none",
|
|
123
|
+
userDrag: "none",
|
|
124
|
+
}
|
|
125
|
+
: undefined}>
|
|
126
|
+
{title ? (<DialogPrimitive.Title className="flex-1 text-xl font-bold text-foreground dark:text-white">
|
|
127
|
+
{title}
|
|
128
|
+
</DialogPrimitive.Title>) : null}
|
|
129
|
+
{showCloseButton ? (<DialogPrimitive.Close asChild>
|
|
130
|
+
<Pressable onPress={onClose} hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }} className="rounded p-2 active:opacity-70">
|
|
131
|
+
<Ionicons name="close" size={24} color={isDark ? "#999999" : "#666666"}/>
|
|
132
|
+
</Pressable>
|
|
133
|
+
</DialogPrimitive.Close>) : null}
|
|
134
|
+
</View>) : null}
|
|
135
|
+
|
|
136
|
+
{children}
|
|
137
|
+
</DialogPrimitive.Content>
|
|
138
|
+
</DialogPrimitive.Portal>
|
|
139
|
+
</DialogPrimitive.Root>);
|
|
140
|
+
}
|
|
141
|
+
export function DialogContent({ children, className }) {
|
|
142
|
+
return <View className={cn("py-2", className)}>{children}</View>;
|
|
143
|
+
}
|
|
144
|
+
export function DialogFooter({ children, className, style }) {
|
|
145
|
+
return (<View className={cn("mt-5 flex-row items-center justify-end gap-3", className)} style={style}>
|
|
146
|
+
{children}
|
|
147
|
+
</View>);
|
|
148
|
+
}
|
|
149
|
+
export function DialogButton({ onPress, variant = "primary", children, accessibilityLabel, accessibilityRole, }) {
|
|
150
|
+
const { colorScheme } = useColorScheme();
|
|
151
|
+
const isDark = colorScheme === "dark";
|
|
152
|
+
const base = "rounded-lg px-4 py-2.5 active:opacity-70";
|
|
153
|
+
const variantClass = (() => {
|
|
154
|
+
switch (variant) {
|
|
155
|
+
case "primary":
|
|
156
|
+
return isDark ? "bg-white" : "bg-black";
|
|
157
|
+
case "secondary":
|
|
158
|
+
return cn("border", isDark ? "border-neutral-600" : "border-neutral-300");
|
|
159
|
+
case "ghost":
|
|
160
|
+
return "";
|
|
161
|
+
case "destructive":
|
|
162
|
+
return "bg-destructive";
|
|
163
|
+
}
|
|
164
|
+
})();
|
|
165
|
+
const textColor = (() => {
|
|
166
|
+
switch (variant) {
|
|
167
|
+
case "primary":
|
|
168
|
+
return isDark ? "#000000" : "#FFFFFF";
|
|
169
|
+
case "secondary":
|
|
170
|
+
case "ghost":
|
|
171
|
+
return isDark ? "#FFFFFF" : "#000000";
|
|
172
|
+
case "destructive":
|
|
173
|
+
return "#FFFFFF";
|
|
174
|
+
}
|
|
175
|
+
})();
|
|
176
|
+
return (<Pressable onPress={onPress} className={cn(base, variantClass)} accessibilityLabel={accessibilityLabel} accessibilityRole={accessibilityRole}>
|
|
177
|
+
<RNText style={{ color: textColor, fontSize: 14, fontWeight: "600", textAlign: "center" }}>
|
|
178
|
+
{children}
|
|
179
|
+
</RNText>
|
|
180
|
+
</Pressable>);
|
|
181
|
+
}
|
|
182
|
+
export function ConfirmDialog({ visible, title, message, confirmLabel = "Confirm", cancelLabel = "Cancel", destructive = false, hideCancel = false, onConfirm, onCancel, }) {
|
|
183
|
+
return (<Dialog visible={visible} onClose={onCancel} title={title} maxWidth={400}>
|
|
184
|
+
{message ? (<DialogContent>
|
|
185
|
+
<RNText className="text-sm text-foreground dark:text-white">{message}</RNText>
|
|
186
|
+
</DialogContent>) : null}
|
|
187
|
+
<DialogFooter>
|
|
188
|
+
{!hideCancel && (<DialogButton variant="secondary" onPress={onCancel} accessibilityLabel={cancelLabel}>
|
|
189
|
+
{cancelLabel}
|
|
190
|
+
</DialogButton>)}
|
|
191
|
+
<DialogButton variant={destructive ? "destructive" : "primary"} onPress={onConfirm} accessibilityLabel={confirmLabel}>
|
|
192
|
+
{confirmLabel}
|
|
193
|
+
</DialogButton>
|
|
194
|
+
</DialogFooter>
|
|
195
|
+
</Dialog>);
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=dialog.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.jsx","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CACvE;MAAA,CAAC,OAAO,CAAC,CAAC,CAAC,CACT,CAAC,aAAa,CACZ;UAAA,CAAC,MAAM,CAAC,SAAS,CAAC,yCAAyC,CAAC,CAAC,OAAO,CAAC,EAAE,MAAM,CAC/E;QAAA,EAAE,aAAa,CAAC,CACjB,CAAC,CAAC,CAAC,IAAI,CACR;MAAA,CAAC,YAAY,CACX;QAAA,CAAC,CAAC,UAAU,IAAI,CACd,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,kBAAkB,CAAC,CAAC,WAAW,CAAC,CACnF;YAAA,CAAC,WAAW,CACd;UAAA,EAAE,YAAY,CAAC,CAChB,CACD;QAAA,CAAC,YAAY,CACX,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CACjD,OAAO,CAAC,CAAC,SAAS,CAAC,CACnB,kBAAkB,CAAC,CAAC,YAAY,CAAC,CAEjC;UAAA,CAAC,YAAY,CACf;QAAA,EAAE,YAAY,CAChB;MAAA,EAAE,YAAY,CAChB;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
declare const DropdownMenu: {
|
|
4
|
+
({ asChild, onOpenChange: onOpenChangeProp, ref, ...viewProps }: import("react-native").ViewProps & {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
} & {
|
|
7
|
+
onOpenChange?: (open: boolean) => void;
|
|
8
|
+
} & React.RefAttributes<View>): React.JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
declare const DropdownMenuTrigger: {
|
|
12
|
+
({ asChild, onPress: onPressProp, disabled, ref, ...props }: Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
} & {
|
|
15
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
16
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
17
|
+
} & React.RefAttributes<import("@rn-primitives/dropdown-menu").TriggerRef>): React.JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
|
|
21
|
+
asChild?: boolean;
|
|
22
|
+
} & {
|
|
23
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
24
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
25
|
+
} & import("@rn-primitives/types").PositionedContentProps & React.RefAttributes<View>, "ref"> & React.RefAttributes<View>>;
|
|
26
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
|
|
27
|
+
asChild?: boolean;
|
|
28
|
+
} & {
|
|
29
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
30
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
31
|
+
} & {
|
|
32
|
+
textValue?: string;
|
|
33
|
+
closeOnPress?: boolean;
|
|
34
|
+
} & React.RefAttributes<View>, "ref"> & React.RefAttributes<View>>;
|
|
35
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<Omit<import("react-native").PressableProps & React.RefAttributes<View>, "ref"> & {
|
|
36
|
+
asChild?: boolean;
|
|
37
|
+
} & {
|
|
38
|
+
onKeyDown?: (ev: React.KeyboardEvent) => void;
|
|
39
|
+
onKeyUp?: (ev: React.KeyboardEvent) => void;
|
|
40
|
+
} & {
|
|
41
|
+
checked: boolean;
|
|
42
|
+
onCheckedChange: (checked: boolean) => void;
|
|
43
|
+
closeOnPress?: boolean;
|
|
44
|
+
textValue?: string;
|
|
45
|
+
} & React.RefAttributes<View>, "ref"> & React.RefAttributes<View>>;
|
|
46
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<import("react-native").TextProps & {
|
|
47
|
+
asChild?: boolean;
|
|
48
|
+
} & React.RefAttributes<import("react-native").Text>, "ref"> & React.RefAttributes<import("react-native").Text>>;
|
|
49
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<import("react-native").ViewProps & {
|
|
50
|
+
asChild?: boolean;
|
|
51
|
+
} & {
|
|
52
|
+
decorative?: boolean;
|
|
53
|
+
} & React.RefAttributes<View>, "ref"> & React.RefAttributes<View>>;
|
|
54
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuLabel, DropdownMenuSeparator, };
|
|
55
|
+
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/components/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAY,IAAI,EAAkB,MAAM,cAAc,CAAC;AAE9D,QAAA,MAAM,YAAY;;;;;;;CAA6B,CAAC;AAChD,QAAA,MAAM,mBAAmB;;;;;;;;CAAgC,CAAC;AAE1D,QAAA,MAAM,mBAAmB;;;;;0HAkCvB,CAAC;AAGH,QAAA,MAAM,gBAAgB;;;;;;;;kEAcpB,CAAC;AAGH,QAAA,MAAM,wBAAwB;;;;;;;;;;kEAsB5B,CAAC;AAGH,QAAA,MAAM,iBAAiB;;gHASrB,CAAC;AAGH,QAAA,MAAM,qBAAqB;;;;kEASzB,CAAC;AAGH,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,GACtB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from "@rn-primitives/dropdown-menu";
|
|
2
|
+
import { cn } from "../utils/cn";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Platform, View } from "react-native";
|
|
5
|
+
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
6
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
7
|
+
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
|
|
8
|
+
const content = (<DropdownMenuPrimitive.Content ref={ref} sideOffset={sideOffset} className={cn("z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1", className)} style={Platform.OS === "web"
|
|
9
|
+
? { boxShadow: "0px 4px 12px rgba(0, 0, 0, 0.15)" }
|
|
10
|
+
: undefined} {...props}/>);
|
|
11
|
+
if (Platform.OS === "web") {
|
|
12
|
+
// On web, Portal expects exactly one child — skip the Overlay (Radix
|
|
13
|
+
// handles dismiss-on-click-outside internally).
|
|
14
|
+
return <DropdownMenuPrimitive.Portal>{content}</DropdownMenuPrimitive.Portal>;
|
|
15
|
+
}
|
|
16
|
+
return (<DropdownMenuPrimitive.Portal>
|
|
17
|
+
<DropdownMenuPrimitive.Overlay className="animate-in fade-in-0"/>
|
|
18
|
+
{content}
|
|
19
|
+
</DropdownMenuPrimitive.Portal>);
|
|
20
|
+
});
|
|
21
|
+
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
22
|
+
const DropdownMenuItem = React.forwardRef(({ className, ...props }, ref) => (<DropdownMenuPrimitive.Item ref={ref} className={cn("relative flex flex-row items-center rounded-sm px-2 py-1.5 web:cursor-pointer web:outline-none active:bg-accent", "web:hover:bg-accent web:focus:bg-accent", props.disabled && "opacity-50 web:pointer-events-none", className)} {...props}/>));
|
|
23
|
+
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
24
|
+
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (<DropdownMenuPrimitive.CheckboxItem ref={ref} className={cn("relative flex flex-row items-center rounded-sm py-1.5 pl-8 pr-2 web:cursor-pointer web:outline-none active:bg-accent", "web:hover:bg-accent web:focus:bg-accent", props.disabled && "opacity-50 web:pointer-events-none", className)} checked={checked} {...props}>
|
|
25
|
+
<View className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
|
|
26
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
27
|
+
{/* Checkmark indicator */}
|
|
28
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
29
|
+
</View>
|
|
30
|
+
{children}
|
|
31
|
+
</DropdownMenuPrimitive.CheckboxItem>));
|
|
32
|
+
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
33
|
+
const DropdownMenuLabel = React.forwardRef(({ className, ...props }, ref) => (<DropdownMenuPrimitive.Label ref={ref} className={cn("px-2 py-1.5 text-sm font-semibold text-foreground", className)} {...props}/>));
|
|
34
|
+
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
35
|
+
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (<DropdownMenuPrimitive.Separator ref={ref} className={cn("-mx-1 my-1 h-px bg-border", className)} {...props}/>));
|
|
36
|
+
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
37
|
+
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuLabel, DropdownMenuSeparator, };
|
|
38
|
+
//# sourceMappingURL=dropdown-menu.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.jsx","sourceRoot":"","sources":["../../src/components/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,qBAAqB,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,MAA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S,CAAC,CAAC,EAAE,CAAC,mDAAmD,EAAE,SAAS,CAAC,CAAC,CAC9E,IAAI,KAAK,CAAC,EACV,CACH,CAAC,CAAC;AACH,iBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAC;AAEpD,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAG5C,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,CAAC,qBAAqB,CAAC,SAAS,CAC9B,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,SAAS,CAAC,CAAC,EAAE,CAAC,2BAA2B,EAAE,SAAS,CAAC,CAAC,CACtD,IAAI,KAAK,CAAC,EACV,CACH,CAAC,CAAC;AACH,qBAAqB,CAAC,WAAW,GAAG,uBAAuB,CAAC;AAE5D,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,GACtB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface EntropyBootSplashProps {
|
|
3
|
+
/** Called once the intro + hold + fade-out finishes. */
|
|
4
|
+
onFinish?: () => void;
|
|
5
|
+
/** Mark height in px. */
|
|
6
|
+
size?: number;
|
|
7
|
+
/** "chroma" (default) shows the faint cyan/red fringe; "mono" is plain. */
|
|
8
|
+
variant?: "mono" | "chroma";
|
|
9
|
+
/** Override background; defaults to themed near-black / white. */
|
|
10
|
+
background?: string;
|
|
11
|
+
/** ms to hold fully-drifted before fading out. Default 550. */
|
|
12
|
+
holdMs?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Company boot splash — the website's logo motion as a launch animation: the
|
|
16
|
+
* mark fades in flat, the three echoes drift apart + breathe (driven by
|
|
17
|
+
* EntropyMarkAnimated's `active` state — the same motion source as the
|
|
18
|
+
* website hover), hold, then the whole thing fades out and calls `onFinish`.
|
|
19
|
+
* Subtle corporate recognition at launch; each product keeps its own
|
|
20
|
+
* icon/splash for the OS-level launch screen — this is an in-app overlay.
|
|
21
|
+
*/
|
|
22
|
+
export declare function EntropyBootSplash({ onFinish, size, background, holdMs, }: EntropyBootSplashProps): React.JSX.Element | null;
|
|
23
|
+
export default EntropyBootSplash;
|
|
24
|
+
//# sourceMappingURL=entropy-boot-splash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entropy-boot-splash.d.ts","sourceRoot":"","sources":["../../src/components/entropy-boot-splash.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAYjD,MAAM,WAAW,sBAAsB;IACrC,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,IAAS,EAGT,UAAU,EACV,MAAY,GACb,EAAE,sBAAsB,4BAuExB;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from "react";
|
|
2
|
+
import { Animated, Easing, Platform, StyleSheet, View } from "react-native";
|
|
3
|
+
import { useColorScheme } from "nativewind";
|
|
4
|
+
import Svg, { Path } from "react-native-svg";
|
|
5
|
+
import { ENTROPY_MARK_ASPECT, ENTROPY_MARK_PATH, ENTROPY_MARK_VIEWBOX } from "./entropy-mark";
|
|
6
|
+
import { usePalette } from "../utils/palette";
|
|
7
|
+
import { DISABLE_BRANDING } from "../flags";
|
|
8
|
+
// Web has no native animated module; requesting the native driver there just
|
|
9
|
+
// warns and falls back to JS. Gate it so the console stays clean.
|
|
10
|
+
const USE_NATIVE_DRIVER = Platform.OS !== "web";
|
|
11
|
+
/**
|
|
12
|
+
* Company boot splash — the website's logo motion as a launch animation: the
|
|
13
|
+
* mark fades in flat, the three echoes drift apart + breathe (driven by
|
|
14
|
+
* EntropyMarkAnimated's `active` state — the same motion source as the
|
|
15
|
+
* website hover), hold, then the whole thing fades out and calls `onFinish`.
|
|
16
|
+
* Subtle corporate recognition at launch; each product keeps its own
|
|
17
|
+
* icon/splash for the OS-level launch screen — this is an in-app overlay.
|
|
18
|
+
*/
|
|
19
|
+
export function EntropyBootSplash({ onFinish, size = 96,
|
|
20
|
+
// `variant` is retained on the props interface for API compatibility but the
|
|
21
|
+
// current flat-mark splash renders the same regardless, so it isn't read.
|
|
22
|
+
background, holdMs = 550, }) {
|
|
23
|
+
const { colorScheme } = useColorScheme();
|
|
24
|
+
const isDark = colorScheme === "dark";
|
|
25
|
+
const { palette } = usePalette();
|
|
26
|
+
// Match the app's themed background exactly (bg-background) so there's no
|
|
27
|
+
// color seam when the splash dismisses into the screen behind it.
|
|
28
|
+
const bg = background ?? palette.background;
|
|
29
|
+
const fade = useRef(new Animated.Value(0)).current;
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
// Self-host branding opt-out: skip the splash entirely, let the app proceed.
|
|
32
|
+
if (DISABLE_BRANDING) {
|
|
33
|
+
onFinish?.();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const anim = Animated.sequence([
|
|
37
|
+
Animated.timing(fade, {
|
|
38
|
+
toValue: 1,
|
|
39
|
+
duration: 320,
|
|
40
|
+
easing: Easing.out(Easing.quad),
|
|
41
|
+
useNativeDriver: USE_NATIVE_DRIVER,
|
|
42
|
+
}),
|
|
43
|
+
// mark's own open-ease (~450ms) + breathing run during the hold
|
|
44
|
+
Animated.delay(900 + holdMs),
|
|
45
|
+
Animated.timing(fade, {
|
|
46
|
+
toValue: 0,
|
|
47
|
+
duration: 420,
|
|
48
|
+
easing: Easing.in(Easing.quad),
|
|
49
|
+
useNativeDriver: USE_NATIVE_DRIVER,
|
|
50
|
+
}),
|
|
51
|
+
]);
|
|
52
|
+
anim.start(({ finished }) => {
|
|
53
|
+
if (finished) {
|
|
54
|
+
onFinish?.();
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
return () => anim.stop();
|
|
58
|
+
// run once on mount
|
|
59
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
60
|
+
}, []);
|
|
61
|
+
if (DISABLE_BRANDING) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return (<View style={[
|
|
65
|
+
StyleSheet.absoluteFill,
|
|
66
|
+
{
|
|
67
|
+
backgroundColor: bg,
|
|
68
|
+
alignItems: "center",
|
|
69
|
+
justifyContent: "center",
|
|
70
|
+
pointerEvents: "none",
|
|
71
|
+
},
|
|
72
|
+
]}>
|
|
73
|
+
{/* Static flat source mark — the topmost layer only, monochromatic to the
|
|
74
|
+
theme (black in light, white in dark). No echoes, no motion. */}
|
|
75
|
+
<Animated.View style={{ opacity: fade }}>
|
|
76
|
+
<Svg width={Math.round(size * ENTROPY_MARK_ASPECT)} height={size} viewBox={ENTROPY_MARK_VIEWBOX}>
|
|
77
|
+
<Path d={ENTROPY_MARK_PATH} fillRule="evenodd" fill={isDark ? "#ffffff" : "#000000"}/>
|
|
78
|
+
</Svg>
|
|
79
|
+
</Animated.View>
|
|
80
|
+
</View>);
|
|
81
|
+
}
|
|
82
|
+
export default EntropyBootSplash;
|
|
83
|
+
//# sourceMappingURL=entropy-boot-splash.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entropy-boot-splash.jsx","sourceRoot":"","sources":["../../src/components/entropy-boot-splash.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,M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O,CAAC,CAAC,oBAAoB,CAAC,CAE9B;UAAA,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,EACtF;QAAA,EAAE,GAAG,CACP;MAAA,EAAE,QAAQ,CAAC,IAAI,CACjB;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface EntropyMarkAnimatedProps {
|
|
3
|
+
/** Rendered height in px. Width follows the ~1.63:1 aspect. */
|
|
4
|
+
size?: number;
|
|
5
|
+
/** "mono" = grey echoes only; "chroma" = adds the faint cyan/red fringe. */
|
|
6
|
+
variant?: "mono" | "chroma";
|
|
7
|
+
/** Override the theme; defaults to the active color scheme. */
|
|
8
|
+
scheme?: "light" | "dark";
|
|
9
|
+
/** Force the drifted-apart state (e.g. boot splash drives this). */
|
|
10
|
+
active?: boolean;
|
|
11
|
+
/** Drift apart while touched (default true). */
|
|
12
|
+
animateOnPress?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Touch-interactive company `>_` mark — flat at rest, echo-cascade + parallax
|
|
16
|
+
* while pressed, clean collapse on release. The RN twin of the website logo.
|
|
17
|
+
*/
|
|
18
|
+
export declare function EntropyMarkAnimated({ size, variant, scheme, active, animateOnPress, }: EntropyMarkAnimatedProps): React.JSX.Element;
|
|
19
|
+
export default EntropyMarkAnimated;
|
|
20
|
+
//# sourceMappingURL=entropy-mark-animated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entropy-mark-animated.d.ts","sourceRoot":"","sources":["../../src/components/entropy-mark-animated.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AA8DzC,MAAM,WAAW,wBAAwB;IACvC,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B,+DAA+D;IAC/D,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,oEAAoE;IACpE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA6DD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,IAAS,EACT,OAAgB,EAChB,MAAM,EACN,MAAc,EACd,cAAqB,GACtB,EAAE,wBAAwB,qBAiH1B;AAED,eAAe,mBAAmB,CAAC"}
|