@passflow/react 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +43 -0
- package/README.md +21 -8
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.es.js +146 -143
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/error/index.d.cts +7 -0
- package/dist/src/components/error/index.d.ts +1 -1
- package/dist/src/components/error/index.d.ts.map +1 -1
- package/dist/src/components/flow/consent/index.d.cts +13 -0
- package/dist/src/components/flow/consent/index.d.ts +1 -1
- package/dist/src/components/flow/consent/index.d.ts.map +1 -1
- package/dist/src/components/flow/consent/screen.d.cts +9 -0
- package/dist/src/components/flow/consent/screen.d.ts +2 -2
- package/dist/src/components/flow/consent/screen.d.ts.map +1 -1
- package/dist/src/components/flow/device-verify/index.d.cts +10 -0
- package/dist/src/components/flow/device-verify/index.d.ts +1 -1
- package/dist/src/components/flow/device-verify/index.d.ts.map +1 -1
- package/dist/src/components/flow/device-verify/screen.d.cts +4 -0
- package/dist/src/components/flow/device-verify/screen.d.ts +2 -2
- package/dist/src/components/flow/device-verify/screen.d.ts.map +1 -1
- package/dist/src/components/flow/index.d.cts +5 -0
- package/dist/src/components/flow/index.d.ts +4 -4
- package/dist/src/components/flow/index.d.ts.map +1 -1
- package/dist/src/components/flow/passflow/index.d.cts +16 -0
- package/dist/src/components/flow/passflow/index.d.ts +5 -1
- package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-setup/index.d.cts +10 -0
- package/dist/src/components/flow/two-factor-setup/index.d.ts +2 -2
- package/dist/src/components/flow/two-factor-setup/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-setup-magic-link/index.d.cts +35 -0
- package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts +2 -2
- package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-verify/index.d.cts +11 -0
- package/dist/src/components/flow/two-factor-verify/index.d.ts +2 -2
- package/dist/src/components/flow/two-factor-verify/index.d.ts.map +1 -1
- package/dist/src/components/form/forgot-password/forgot-password-success.d.cts +2 -0
- package/dist/src/components/form/forgot-password/forgot-password-success.d.ts +1 -1
- package/dist/src/components/form/forgot-password/forgot-password-success.d.ts.map +1 -1
- package/dist/src/components/form/forgot-password/forgot-password.d.cts +9 -0
- package/dist/src/components/form/forgot-password/forgot-password.d.ts +1 -1
- package/dist/src/components/form/forgot-password/forgot-password.d.ts.map +1 -1
- package/dist/src/components/form/forgot-password/index.d.cts +3 -0
- package/dist/src/components/form/forgot-password/index.d.ts +2 -2
- package/dist/src/components/form/index.d.cts +10 -0
- package/dist/src/components/form/index.d.ts +9 -9
- package/dist/src/components/form/index.d.ts.map +1 -1
- package/dist/src/components/form/invitation-join/index.d.cts +7 -0
- package/dist/src/components/form/invitation-join/index.d.ts +1 -2
- package/dist/src/components/form/invitation-join/index.d.ts.map +1 -1
- package/dist/src/components/form/reset-password/index.d.cts +9 -0
- package/dist/src/components/form/reset-password/index.d.ts +2 -2
- package/dist/src/components/form/reset-password/index.d.ts.map +1 -1
- package/dist/src/components/form/signin/index.d.cts +15 -0
- package/dist/src/components/form/signin/index.d.ts +2 -2
- package/dist/src/components/form/signin/index.d.ts.map +1 -1
- package/dist/src/components/form/signup/index.d.cts +14 -0
- package/dist/src/components/form/signup/index.d.ts +2 -2
- package/dist/src/components/form/signup/index.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-challenge/index.d.cts +10 -0
- package/dist/src/components/form/two-factor-challenge/index.d.ts +1 -1
- package/dist/src/components/form/two-factor-challenge/index.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-challenge/method-selector.d.cts +12 -0
- package/dist/src/components/form/two-factor-challenge/method-selector.d.ts +2 -2
- package/dist/src/components/form/two-factor-setup/index.d.cts +2 -0
- package/dist/src/components/form/two-factor-setup/index.d.ts +1 -1
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.cts +9 -0
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts +1 -1
- package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-verify/index.d.cts +3 -0
- package/dist/src/components/form/two-factor-verify/index.d.ts +2 -2
- package/dist/src/components/form/two-factor-verify/index.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.cts +13 -0
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts +1 -1
- package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts.map +1 -1
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.cts +16 -0
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts +1 -1
- package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/index.d.cts +3 -0
- package/dist/src/components/form/verify-challenge/index.d.ts +2 -2
- package/dist/src/components/form/verify-challenge/timer-button.d.cts +9 -0
- package/dist/src/components/form/verify-challenge/timer-button.d.ts +1 -1
- package/dist/src/components/form/verify-challenge/timer-button.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.cts +2 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.ts +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.cts +16 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.ts +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.cts +9 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.ts +1 -2
- package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-otp.d.cts +12 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-otp.d.ts +2 -2
- package/dist/src/components/form/verify-challenge/verify-challenge-otp.d.ts.map +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-success.d.cts +3 -0
- package/dist/src/components/form/verify-challenge/verify-challenge-success.d.ts +1 -1
- package/dist/src/components/form/verify-challenge/verify-challenge-success.d.ts.map +1 -1
- package/dist/src/components/form/wrapper/index.d.cts +2 -0
- package/dist/src/components/form/wrapper/index.d.ts +1 -1
- package/dist/src/components/passkey/index.d.cts +7 -0
- package/dist/src/components/passkey/index.d.ts +1 -1
- package/dist/src/components/passkey/index.d.ts.map +1 -1
- package/dist/src/components/passkey/passkey-actions.d.cts +13 -0
- package/dist/src/components/passkey/passkey-actions.d.ts +1 -1
- package/dist/src/components/passkey/passkey-actions.d.ts.map +1 -1
- package/dist/src/components/passkey/passkey-dialog.d.cts +10 -0
- package/dist/src/components/passkey/passkey-dialog.d.ts +1 -1
- package/dist/src/components/passkey/passkey-list.d.cts +9 -0
- package/dist/src/components/passkey/passkey-list.d.ts +2 -2
- package/dist/src/components/passkey/passkey-list.d.ts.map +1 -1
- package/dist/src/components/provider/index.d.cts +4 -0
- package/dist/src/components/provider/index.d.ts +3 -3
- package/dist/src/components/provider/index.d.ts.map +1 -1
- package/dist/src/components/provider/passflow-provider.d.cts +160 -0
- package/dist/src/components/provider/passflow-provider.d.ts +24 -4
- package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
- package/dist/src/components/provider/upgrade-provider.d.cts +85 -0
- package/dist/src/components/provider/upgrade-provider.d.ts +39 -3
- package/dist/src/components/provider/upgrade-provider.d.ts.map +1 -1
- package/dist/src/components/ui/button/index.d.cts +34 -0
- package/dist/src/components/ui/button/index.d.ts +3 -2
- package/dist/src/components/ui/button/index.d.ts.map +1 -1
- package/dist/src/components/ui/continuing-status/index.d.cts +8 -0
- package/dist/src/components/ui/continuing-status/index.d.ts +8 -0
- package/dist/src/components/ui/continuing-status/index.d.ts.map +1 -0
- package/dist/src/components/ui/country-flag/index.d.cts +7 -0
- package/dist/src/components/ui/country-flag/index.d.ts +1 -1
- package/dist/src/components/ui/country-flag/index.d.ts.map +1 -1
- package/dist/src/components/ui/country-flag/positions.d.cts +245 -0
- package/dist/src/components/ui/country-flag/positions.d.ts +241 -241
- package/dist/src/components/ui/country-flag/positions.d.ts.map +1 -1
- package/dist/src/components/ui/dialog/index.d.cts +20 -0
- package/dist/src/components/ui/dialog/index.d.ts +18 -18
- package/dist/src/components/ui/dialog/index.d.ts.map +1 -1
- package/dist/src/components/ui/fields/field-otp.d.cts +35 -0
- package/dist/src/components/ui/fields/field-otp.d.ts +35 -0
- package/dist/src/components/ui/fields/field-otp.d.ts.map +1 -0
- package/dist/src/components/ui/fields/field-password.d.cts +13 -0
- package/dist/src/components/ui/fields/field-password.d.ts +4 -4
- package/dist/src/components/ui/fields/field-password.d.ts.map +1 -1
- package/dist/src/components/ui/fields/field-phone.d.cts +11 -0
- package/dist/src/components/ui/fields/field-phone.d.ts +1 -1
- package/dist/src/components/ui/fields/field-phone.d.ts.map +1 -1
- package/dist/src/components/ui/fields/field-text.d.cts +8 -0
- package/dist/src/components/ui/fields/field-text.d.ts +3 -3
- package/dist/src/components/ui/fields/field-text.d.ts.map +1 -1
- package/dist/src/components/ui/fields/index.d.cts +5 -0
- package/dist/src/components/ui/fields/index.d.ts +4 -3
- package/dist/src/components/ui/fields/index.d.ts.map +1 -1
- package/dist/src/components/ui/icon/index.d.cts +11 -0
- package/dist/src/components/ui/icon/index.d.ts +1 -1
- package/dist/src/components/ui/icon/index.d.ts.map +1 -1
- package/dist/src/components/ui/index.d.cts +14 -0
- package/dist/src/components/ui/index.d.ts +13 -12
- package/dist/src/components/ui/index.d.ts.map +1 -1
- package/dist/src/components/ui/link/index.d.cts +11 -0
- package/dist/src/components/ui/link/index.d.ts +1 -1
- package/dist/src/components/ui/link/index.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/code-entry.d.cts +4 -0
- package/dist/src/components/ui/login-screen/code-entry.d.ts +2 -2
- package/dist/src/components/ui/login-screen/consent.d.cts +15 -0
- package/dist/src/components/ui/login-screen/consent.d.ts +2 -2
- package/dist/src/components/ui/login-screen/credentials.d.cts +4 -0
- package/dist/src/components/ui/login-screen/credentials.d.ts +2 -2
- package/dist/src/components/ui/login-screen/credentials.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/device-approval.d.cts +4 -0
- package/dist/src/components/ui/login-screen/device-approval.d.ts +2 -2
- package/dist/src/components/ui/login-screen/general-error.d.cts +4 -0
- package/dist/src/components/ui/login-screen/general-error.d.ts +2 -2
- package/dist/src/components/ui/login-screen/index.d.cts +4 -0
- package/dist/src/components/ui/login-screen/index.d.ts +3 -3
- package/dist/src/components/ui/login-screen/index.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/invitation.d.cts +4 -0
- package/dist/src/components/ui/login-screen/invitation.d.ts +2 -2
- package/dist/src/components/ui/login-screen/login-screen.d.cts +4 -0
- package/dist/src/components/ui/login-screen/login-screen.d.ts +2 -2
- package/dist/src/components/ui/login-screen/passkey-progress.d.cts +4 -0
- package/dist/src/components/ui/login-screen/passkey-progress.d.ts +2 -2
- package/dist/src/components/ui/login-screen/second-factor.d.cts +4 -0
- package/dist/src/components/ui/login-screen/second-factor.d.ts +2 -2
- package/dist/src/components/ui/login-screen/shared.d.cts +15 -0
- package/dist/src/components/ui/login-screen/shared.d.ts +2 -2
- package/dist/src/components/ui/login-screen/shell.d.cts +13 -0
- package/dist/src/components/ui/login-screen/shell.d.ts +1 -1
- package/dist/src/components/ui/login-screen/shell.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/status.d.cts +4 -0
- package/dist/src/components/ui/login-screen/status.d.ts +2 -2
- package/dist/src/components/ui/login-screen/types.d.cts +192 -0
- package/dist/src/components/ui/login-screen/types.d.ts +2 -2
- package/dist/src/components/ui/login-screen/types.d.ts.map +1 -1
- package/dist/src/components/ui/popover/index.d.cts +7 -0
- package/dist/src/components/ui/popover/index.d.ts +5 -5
- package/dist/src/components/ui/popover/index.d.ts.map +1 -1
- package/dist/src/components/ui/providers-box/index.d.cts +10 -0
- package/dist/src/components/ui/providers-box/index.d.ts +2 -2
- package/dist/src/components/ui/providers-box/index.d.ts.map +1 -1
- package/dist/src/components/ui/spinner/index.d.cts +23 -0
- package/dist/src/components/ui/spinner/index.d.ts +1 -1
- package/dist/src/components/ui/spinner/index.d.ts.map +1 -1
- package/dist/src/components/ui/switch/index.d.cts +22 -0
- package/dist/src/components/ui/switch/index.d.ts +1 -1
- package/dist/src/components/ui/switch/index.d.ts.map +1 -1
- package/dist/src/components/ui/upgrade-dialog/challenge.d.cts +12 -0
- package/dist/src/components/ui/upgrade-dialog/challenge.d.ts +2 -2
- package/dist/src/components/ui/upgrade-dialog/factor-list.d.cts +20 -0
- package/dist/src/components/ui/upgrade-dialog/factor-list.d.ts +2 -2
- package/dist/src/components/ui/upgrade-dialog/index.d.cts +8 -0
- package/dist/src/components/ui/upgrade-dialog/index.d.ts +7 -7
- package/dist/src/components/ui/upgrade-dialog/index.d.ts.map +1 -1
- package/dist/src/components/ui/upgrade-dialog/state-mapping.d.cts +130 -0
- package/dist/src/components/ui/upgrade-dialog/state-mapping.d.ts +12 -1
- package/dist/src/components/ui/upgrade-dialog/state-mapping.d.ts.map +1 -1
- package/dist/src/components/ui/upgrade-dialog/status.d.cts +27 -0
- package/dist/src/components/ui/upgrade-dialog/status.d.ts +2 -2
- package/dist/src/components/ui/upgrade-dialog/types.d.cts +188 -0
- package/dist/src/components/ui/upgrade-dialog/upgrade-dialog.d.cts +13 -0
- package/dist/src/components/ui/upgrade-dialog/upgrade-dialog.d.ts +2 -2
- package/dist/src/components/ui/visually-hidden/index.d.cts +17 -0
- package/dist/src/components/ui/visually-hidden/index.d.ts +17 -0
- package/dist/src/components/ui/visually-hidden/index.d.ts.map +1 -0
- package/dist/src/constants/countries-phone-code.d.cts +253 -0
- package/dist/src/constants/countries-phone-code.d.ts.map +1 -1
- package/dist/src/constants/formats.d.cts +4 -0
- package/dist/src/constants/formats.d.ts.map +1 -1
- package/dist/src/constants/index.d.cts +3 -0
- package/dist/src/constants/index.d.ts +2 -2
- package/dist/src/context/auth-context.d.cts +23 -0
- package/dist/src/context/auth-context.d.ts +3 -3
- package/dist/src/context/auth-context.d.ts.map +1 -1
- package/dist/src/context/index.d.cts +6 -0
- package/dist/src/context/index.d.ts +5 -5
- package/dist/src/context/index.d.ts.map +1 -1
- package/dist/src/context/navigation-context.d.cts +25 -0
- package/dist/src/context/navigation-context.d.ts +1 -1
- package/dist/src/context/passflow-context.d.cts +26 -0
- package/dist/src/context/passflow-context.d.ts +3 -3
- package/dist/src/context/passflow-context.d.ts.map +1 -1
- package/dist/src/context/router-context.d.cts +42 -0
- package/dist/src/context/router-context.d.ts.map +1 -1
- package/dist/src/context/upgrade-context.d.cts +107 -0
- package/dist/src/context/upgrade-context.d.ts +24 -2
- package/dist/src/hocs/index.d.cts +2 -0
- package/dist/src/hocs/index.d.ts +1 -1
- package/dist/src/hocs/with-error.d.cts +8 -0
- package/dist/src/hocs/with-error.d.ts +5 -5
- package/dist/src/hocs/with-error.d.ts.map +1 -1
- package/dist/src/hooks/index.d.cts +28 -0
- package/dist/src/hooks/index.d.ts +27 -27
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/use-app-settings.d.cts +16 -0
- package/dist/src/hooks/use-app-settings.d.ts +1 -1
- package/dist/src/hooks/use-app-settings.d.ts.map +1 -1
- package/dist/src/hooks/use-auth-cloud-redirect.d.cts +4 -0
- package/dist/src/hooks/use-auth.d.cts +3 -0
- package/dist/src/hooks/use-auth.d.ts +1 -1
- package/dist/src/hooks/use-auth.d.ts.map +1 -1
- package/dist/src/hooks/use-consent.d.cts +68 -0
- package/dist/src/hooks/use-device-verify.d.cts +96 -0
- package/dist/src/hooks/use-device-verify.d.ts +1 -1
- package/dist/src/hooks/use-device-verify.d.ts.map +1 -1
- package/dist/src/hooks/use-forgot-password.d.cts +10 -0
- package/dist/src/hooks/use-forgot-password.d.ts +1 -1
- package/dist/src/hooks/use-join-invite.d.cts +8 -0
- package/dist/src/hooks/use-logout.d.cts +8 -0
- package/dist/src/hooks/use-navigation.d.cts +29 -0
- package/dist/src/hooks/use-navigation.d.ts +2 -2
- package/dist/src/hooks/use-navigation.d.ts.map +1 -1
- package/dist/src/hooks/use-outsideclick.d.cts +3 -0
- package/dist/src/hooks/use-outsideclick.d.ts +2 -2
- package/dist/src/hooks/use-outsideclick.d.ts.map +1 -1
- package/dist/src/hooks/use-passflow-store.d.cts +3 -0
- package/dist/src/hooks/use-passflow-store.d.ts +1 -1
- package/dist/src/hooks/use-passflow.d.cts +3 -0
- package/dist/src/hooks/use-passflow.d.ts +1 -1
- package/dist/src/hooks/use-passflow.d.ts.map +1 -1
- package/dist/src/hooks/use-passwordless-complete.d.cts +10 -0
- package/dist/src/hooks/use-passwordless-complete.d.ts +1 -1
- package/dist/src/hooks/use-passwordless-complete.d.ts.map +1 -1
- package/dist/src/hooks/use-provider.d.cts +7 -0
- package/dist/src/hooks/use-provider.d.ts +1 -1
- package/dist/src/hooks/use-provider.d.ts.map +1 -1
- package/dist/src/hooks/use-reset-password.d.cts +9 -0
- package/dist/src/hooks/use-session-expired.d.cts +49 -0
- package/dist/src/hooks/use-signin.d.cts +11 -0
- package/dist/src/hooks/use-signin.d.ts +2 -2
- package/dist/src/hooks/use-signin.d.ts.map +1 -1
- package/dist/src/hooks/use-signup.d.cts +11 -0
- package/dist/src/hooks/use-signup.d.ts +2 -2
- package/dist/src/hooks/use-signup.d.ts.map +1 -1
- package/dist/src/hooks/use-trusted-devices.d.cts +21 -0
- package/dist/src/hooks/use-trusted-devices.d.ts +1 -1
- package/dist/src/hooks/use-two-factor-challenge.d.cts +16 -0
- package/dist/src/hooks/use-two-factor-challenge.d.ts +1 -1
- package/dist/src/hooks/use-two-factor-manage.d.cts +15 -0
- package/dist/src/hooks/use-two-factor-manage.d.ts +1 -1
- package/dist/src/hooks/use-two-factor-methods.d.cts +14 -0
- package/dist/src/hooks/use-two-factor-methods.d.ts +1 -1
- package/dist/src/hooks/use-two-factor-setup-magic-link.d.cts +55 -0
- package/dist/src/hooks/use-two-factor-setup-magic-link.d.ts.map +1 -1
- package/dist/src/hooks/use-two-factor-setup.d.cts +18 -0
- package/dist/src/hooks/use-two-factor-setup.d.ts +1 -1
- package/dist/src/hooks/use-two-factor-status.d.cts +13 -0
- package/dist/src/hooks/use-two-factor-status.d.ts +1 -1
- package/dist/src/hooks/use-two-factor-verify.d.cts +20 -0
- package/dist/src/hooks/use-two-factor-verify.d.ts +2 -2
- package/dist/src/hooks/use-two-factor-verify.d.ts.map +1 -1
- package/dist/src/hooks/use-upgrade.d.cts +53 -0
- package/dist/src/hooks/use-upgrade.d.ts +12 -2
- package/dist/src/hooks/use-upgrade.d.ts.map +1 -1
- package/dist/src/hooks/use-user-passkeys.d.cts +12 -0
- package/dist/src/hooks/use-user-passkeys.d.ts +1 -1
- package/dist/src/index.d.cts +10 -0
- package/dist/src/index.d.ts +8 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types/auth-errors.d.cts +8 -0
- package/dist/src/types/device-errors.d.cts +95 -0
- package/dist/src/types/index.d.cts +26 -0
- package/dist/src/types/index.d.ts +4 -4
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/two-factor-errors.d.cts +14 -0
- package/dist/src/utils/auth-error.d.cts +7 -0
- package/dist/src/utils/auth-error.d.ts +1 -1
- package/dist/src/utils/auth-error.d.ts.map +1 -1
- package/dist/src/utils/classify-device-error.d.cts +35 -0
- package/dist/src/utils/classify-device-error.d.ts +1 -1
- package/dist/src/utils/classify-device-error.d.ts.map +1 -1
- package/dist/src/utils/classify-two-factor-error.d.cts +13 -0
- package/dist/src/utils/classify-two-factor-error.d.ts +1 -1
- package/dist/src/utils/cn.d.cts +3 -0
- package/dist/src/utils/cn.d.ts +1 -1
- package/dist/src/utils/cn.d.ts.map +1 -1
- package/dist/src/utils/dayjs/format.d.cts +8 -0
- package/dist/src/utils/dayjs/format.d.ts.map +1 -1
- package/dist/src/utils/dayjs/index.d.cts +2 -0
- package/dist/src/utils/dayjs/index.d.ts +1 -1
- package/dist/src/utils/get-app-version.d.cts +7 -0
- package/dist/src/utils/get-auth-methods.d.cts +30 -0
- package/dist/src/utils/get-auth-methods.d.ts +1 -1
- package/dist/src/utils/get-auth-methods.d.ts.map +1 -1
- package/dist/src/utils/get-form-labels.d.cts +10 -0
- package/dist/src/utils/get-form-labels.d.ts +5 -5
- package/dist/src/utils/get-form-labels.d.ts.map +1 -1
- package/dist/src/utils/get-url-errors.d.cts +5 -0
- package/dist/src/utils/get-url-errors.d.ts.map +1 -1
- package/dist/src/utils/get-url-with-tokens.d.cts +4 -0
- package/dist/src/utils/get-url-with-tokens.d.ts +1 -1
- package/dist/src/utils/get-url-with-tokens.d.ts.map +1 -1
- package/dist/src/utils/index.d.cts +18 -0
- package/dist/src/utils/index.d.ts +17 -17
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/invitation-auth-chrome.d.cts +8 -0
- package/dist/src/utils/invitation-auth-chrome.d.ts.map +1 -1
- package/dist/src/utils/login-theme.d.cts +8 -0
- package/dist/src/utils/login-theme.d.ts +1 -1
- package/dist/src/utils/login-theme.d.ts.map +1 -1
- package/dist/src/utils/second-factor.d.cts +21 -0
- package/dist/src/utils/second-factor.d.ts +3 -3
- package/dist/src/utils/second-factor.d.ts.map +1 -1
- package/dist/src/utils/two-factor-loop-prevention.d.cts +40 -0
- package/dist/src/utils/two-factor-loop-prevention.d.ts.map +1 -1
- package/dist/src/utils/undefined-on-catch.d.cts +2 -0
- package/dist/src/utils/upgrade-auth.d.cts +82 -0
- package/dist/src/utils/upgrade-auth.d.ts +45 -1
- package/dist/src/utils/upgrade-auth.d.ts.map +1 -1
- package/dist/src/utils/url-params.d.cts +14 -0
- package/dist/src/utils/url-params.d.ts.map +1 -1
- package/dist/src/utils/validate-url.d.cts +2 -0
- package/dist/src/utils/validate-url.d.ts.map +1 -1
- package/dist/src/utils/validation-schemas/index.d.cts +6 -0
- package/dist/src/utils/validation-schemas/index.d.ts +1 -1
- package/dist/src/utils/validation-schemas/index.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +54 -59
- package/dist/index.cjs.js +0 -2
- package/dist/index.cjs.js.map +0 -1
- package/dist/src/components/form/two-factor-challenge/otp-input.d.ts +0 -12
- package/dist/src/components/form/two-factor-challenge/otp-input.d.ts.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { UpgradeDialogState } from './types.cjs';
|
|
3
|
+
/** Every state that is not the collecting challenge. */
|
|
4
|
+
export type UpgradeStatusState = Exclude<UpgradeDialogState, {
|
|
5
|
+
kind: 'challenge';
|
|
6
|
+
}>;
|
|
7
|
+
/**
|
|
8
|
+
* How long `success` stays on screen before it closes itself (§13.4: "reports
|
|
9
|
+
* success and closes"). Long enough to be read, short enough that the app is
|
|
10
|
+
* never held behind a modal the user cannot see a reason for.
|
|
11
|
+
*/
|
|
12
|
+
export declare const UPGRADE_SUCCESS_AUTO_CLOSE_MS = 1800;
|
|
13
|
+
/**
|
|
14
|
+
* The non-collecting views: `working`, `success` and the six terminal outcomes
|
|
15
|
+
* of §13.3's settlement table.
|
|
16
|
+
*
|
|
17
|
+
* `insufficient` is deliberately rendered in the problem tone with both bars
|
|
18
|
+
* shown: the elevation succeeded and the action still did not, and the dialog
|
|
19
|
+
* must not report success when the replay was re-challenged (§13.4).
|
|
20
|
+
*
|
|
21
|
+
* `success` owns its own exit: a Done control and an auto-close timer, both
|
|
22
|
+
* calling the state's `onDismiss`. The affordance lives here rather than in the
|
|
23
|
+
* provider because a modal that cannot be closed is a property of this
|
|
24
|
+
* component, and the Storybook story for the state has to show the way out.
|
|
25
|
+
*/
|
|
26
|
+
export declare const UpgradeStatus: FC<UpgradeStatusState>;
|
|
27
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { UpgradeDialogState } from './types';
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { UpgradeDialogState } from './types.js';
|
|
3
3
|
/** Every state that is not the collecting challenge. */
|
|
4
4
|
export type UpgradeStatusState = Exclude<UpgradeDialogState, {
|
|
5
5
|
kind: 'challenge';
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presentational contract for the assurance-upgrade dialog.
|
|
3
|
+
*
|
|
4
|
+
* The dialog is a pure projection: it takes a discriminated state and emits
|
|
5
|
+
* callbacks. Every transition belongs to the controller (architecture §13.2),
|
|
6
|
+
* so nothing here is a state machine — it is the rendering union.
|
|
7
|
+
*
|
|
8
|
+
* `UpgradeFactorType` is declared locally on purpose: P4a must build and run
|
|
9
|
+
* with no `@passflow/core` runtime import, and the union is the only type the
|
|
10
|
+
* dialog needs from the protocol. A later phase re-points it at the package.
|
|
11
|
+
*/
|
|
12
|
+
/** Factor types the upgrade protocol understands, named as `upgrade.type` on the wire. */
|
|
13
|
+
export type UpgradeFactorType = 'totp' | 'recovery_codes' | 'passkey' | 'email_otp' | 'sms_otp';
|
|
14
|
+
/** What the UI must collect before the factor can be asserted. */
|
|
15
|
+
export type UpgradeFactorInput = 'code' | 'none';
|
|
16
|
+
/**
|
|
17
|
+
* An assurance requirement or achievement, carrying both axes (§13.4).
|
|
18
|
+
* `level` is the parsed bar, `acrValues` the raw winning list, `maxAge` the
|
|
19
|
+
* freshness constraint when freshness is what was demanded.
|
|
20
|
+
*/
|
|
21
|
+
export type AssuranceBar = {
|
|
22
|
+
acrValues?: string;
|
|
23
|
+
level?: number;
|
|
24
|
+
maxAge?: number;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* What a factor's typed answer actually accepts — the factor's own contract,
|
|
28
|
+
* not the dialog's guess.
|
|
29
|
+
*
|
|
30
|
+
* It exists because the field used to cap input at a TOTP-shaped six
|
|
31
|
+
* characters for every factor, which silently truncated a recovery code: the
|
|
32
|
+
* server issues those from `services/totp/recovery.go` at
|
|
33
|
+
* `DefaultRecoveryCodeLength` (12) and validates a configured length anywhere
|
|
34
|
+
* in 6..16 (`model/two_factor.go`), from an alphanumeric charset. A six-digit
|
|
35
|
+
* numeric keypad is wrong for that answer on every axis — length, charset and
|
|
36
|
+
* autofill — so all three travel together with the factor instead of being
|
|
37
|
+
* restated at the input.
|
|
38
|
+
*/
|
|
39
|
+
export type UpgradeFactorCodeContract = {
|
|
40
|
+
/** The longest answer the server can accept for this factor. */
|
|
41
|
+
maxLength: number;
|
|
42
|
+
/** A numeric OTP gets the numeric keypad; a recovery code is alphanumeric. */
|
|
43
|
+
inputMode: 'numeric' | 'text';
|
|
44
|
+
/** Only a genuine one-time code claims the OTP autofill contract. */
|
|
45
|
+
autoComplete: 'one-time-code' | 'off';
|
|
46
|
+
/** Recovery codes are issued upper-case; an OTP must not be re-cased. */
|
|
47
|
+
autoCapitalize: 'off' | 'characters';
|
|
48
|
+
};
|
|
49
|
+
type UpgradeDialogFactorBase = {
|
|
50
|
+
type: UpgradeFactorType;
|
|
51
|
+
/** 'Authenticator app' */
|
|
52
|
+
label: string;
|
|
53
|
+
/** 'Enter the code from your authenticator app' */
|
|
54
|
+
hint?: string;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* A factor as the dialog renders it. The `input` discriminant carries the code
|
|
58
|
+
* contract rather than leaving it optional: a `'code'` factor with no contract
|
|
59
|
+
* is unrepresentable, so the truncation defect cannot return by omission.
|
|
60
|
+
*/
|
|
61
|
+
export type UpgradeDialogFactor = (UpgradeDialogFactorBase & {
|
|
62
|
+
input: 'none';
|
|
63
|
+
}) | (UpgradeDialogFactorBase & {
|
|
64
|
+
input: 'code';
|
|
65
|
+
code: UpgradeFactorCodeContract;
|
|
66
|
+
});
|
|
67
|
+
export type UpgradeDialogChallengeState = {
|
|
68
|
+
kind: 'challenge';
|
|
69
|
+
/** Already ranked; index 0 is the suggested factor. */
|
|
70
|
+
factors: readonly UpgradeDialogFactor[];
|
|
71
|
+
selected: UpgradeFactorType;
|
|
72
|
+
reason?: string;
|
|
73
|
+
busy?: boolean;
|
|
74
|
+
error?: string | null;
|
|
75
|
+
showAlternatives?: boolean;
|
|
76
|
+
submitLabel?: string;
|
|
77
|
+
cancelLabel?: string;
|
|
78
|
+
alternativesLabel?: string;
|
|
79
|
+
testId?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Reports the user's factor choice. Called the moment a factor is picked and
|
|
82
|
+
* always before `onSubmit`, which is the late-join boundary of §13.2 (T3).
|
|
83
|
+
*/
|
|
84
|
+
onSelectFactor: (factor: UpgradeFactorType) => void;
|
|
85
|
+
onToggleAlternatives: () => void;
|
|
86
|
+
onSubmit: (code?: string) => void;
|
|
87
|
+
onCancel: () => void;
|
|
88
|
+
};
|
|
89
|
+
export type UpgradeDialogWorkingState = {
|
|
90
|
+
kind: 'working';
|
|
91
|
+
message: string;
|
|
92
|
+
detail?: string;
|
|
93
|
+
testId?: string;
|
|
94
|
+
onCancel?: () => void;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Every waiter replayed cleanly and no stated bar went unmet (§13.4).
|
|
98
|
+
*
|
|
99
|
+
* Success is the happy path, so it is the one state that must never be able to
|
|
100
|
+
* trap the user: §13.4's story table says the modal "reports success and
|
|
101
|
+
* closes". `onDismiss` is therefore required, not optional — it is what Escape,
|
|
102
|
+
* an overlay click, the Done control and the auto-close timer all call.
|
|
103
|
+
* `autoCloseMs` is the timer's dwell; `0` disables it and leaves the explicit
|
|
104
|
+
* control as the only path out.
|
|
105
|
+
*/
|
|
106
|
+
export type UpgradeDialogSuccessState = {
|
|
107
|
+
kind: 'success';
|
|
108
|
+
message: string;
|
|
109
|
+
detail?: string;
|
|
110
|
+
dismissLabel?: string;
|
|
111
|
+
/** Milliseconds before the dialog closes itself. Omitted: the component's default. */
|
|
112
|
+
autoCloseMs?: number;
|
|
113
|
+
testId?: string;
|
|
114
|
+
onDismiss: () => void;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Elevated, and still not enough: the replay was re-challenged (§13.3, §13.4).
|
|
118
|
+
* This state must never read as success — it is the honest
|
|
119
|
+
* "elevated to AAL2; this action requires AAL3" message.
|
|
120
|
+
*/
|
|
121
|
+
export type UpgradeDialogInsufficientState = {
|
|
122
|
+
kind: 'insufficient';
|
|
123
|
+
message: string;
|
|
124
|
+
obtained: AssuranceBar;
|
|
125
|
+
required: AssuranceBar;
|
|
126
|
+
detail?: string;
|
|
127
|
+
dismissLabel?: string;
|
|
128
|
+
testId?: string;
|
|
129
|
+
onDismiss: () => void;
|
|
130
|
+
};
|
|
131
|
+
/** The offered factor list is empty — `no usable factor` of §13.3's table. */
|
|
132
|
+
export type UpgradeDialogUnsatisfiableState = {
|
|
133
|
+
kind: 'unsatisfiable';
|
|
134
|
+
message: string;
|
|
135
|
+
/** The diagnostic line: what was demanded, and why nothing could answer it. */
|
|
136
|
+
detail?: string;
|
|
137
|
+
required?: AssuranceBar;
|
|
138
|
+
dismissLabel?: string;
|
|
139
|
+
testId?: string;
|
|
140
|
+
onDismiss: () => void;
|
|
141
|
+
};
|
|
142
|
+
/** 501 / BFF — the deployment cannot elevate at all. */
|
|
143
|
+
export type UpgradeDialogUnavailableState = {
|
|
144
|
+
kind: 'unavailable';
|
|
145
|
+
message: string;
|
|
146
|
+
detail?: string;
|
|
147
|
+
dismissLabel?: string;
|
|
148
|
+
testId?: string;
|
|
149
|
+
onDismiss: () => void;
|
|
150
|
+
};
|
|
151
|
+
/** The attempt budget ran out. */
|
|
152
|
+
export type UpgradeDialogExhaustedState = {
|
|
153
|
+
kind: 'exhausted';
|
|
154
|
+
message: string;
|
|
155
|
+
detail?: string;
|
|
156
|
+
dismissLabel?: string;
|
|
157
|
+
testId?: string;
|
|
158
|
+
onDismiss: () => void;
|
|
159
|
+
};
|
|
160
|
+
/** A transport failure — FR1's non-retryable 400, or a retryable network fault. */
|
|
161
|
+
export type UpgradeDialogTransportState = {
|
|
162
|
+
kind: 'transport';
|
|
163
|
+
message: string;
|
|
164
|
+
detail?: string;
|
|
165
|
+
retryable?: boolean;
|
|
166
|
+
retryLabel?: string;
|
|
167
|
+
dismissLabel?: string;
|
|
168
|
+
testId?: string;
|
|
169
|
+
onRetry?: () => void;
|
|
170
|
+
onDismiss: () => void;
|
|
171
|
+
};
|
|
172
|
+
/** The user dismissed the dialog, or a passkey ceremony was cancelled. */
|
|
173
|
+
export type UpgradeDialogCancelledState = {
|
|
174
|
+
kind: 'cancelled';
|
|
175
|
+
message: string;
|
|
176
|
+
detail?: string;
|
|
177
|
+
dismissLabel?: string;
|
|
178
|
+
testId?: string;
|
|
179
|
+
onDismiss: () => void;
|
|
180
|
+
};
|
|
181
|
+
export type UpgradeDialogState = UpgradeDialogChallengeState | UpgradeDialogWorkingState | UpgradeDialogSuccessState | UpgradeDialogInsufficientState | UpgradeDialogUnsatisfiableState | UpgradeDialogUnavailableState | UpgradeDialogExhaustedState | UpgradeDialogTransportState | UpgradeDialogCancelledState;
|
|
182
|
+
export type UpgradeDialogProps = {
|
|
183
|
+
open: boolean;
|
|
184
|
+
title?: string;
|
|
185
|
+
state: UpgradeDialogState;
|
|
186
|
+
};
|
|
187
|
+
export {};
|
|
188
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { UpgradeDialogProps } from './types.cjs';
|
|
3
|
+
/**
|
|
4
|
+
* The assurance-upgrade modal. A switch over `state.kind`, modelled on
|
|
5
|
+
* `LoginScreen`: one discriminated union, one view per state, no transitions of
|
|
6
|
+
* its own.
|
|
7
|
+
*
|
|
8
|
+
* Escape and an overlay click route to the state's cancel or dismiss callback,
|
|
9
|
+
* never to a bare close — cancellation must reach the controller or the
|
|
10
|
+
* caller's promise never settles (§8.1).
|
|
11
|
+
*/
|
|
12
|
+
export declare const UpgradeDialog: FC<UpgradeDialogProps>;
|
|
13
|
+
//# sourceMappingURL=upgrade-dialog.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { UpgradeDialogProps } from './types';
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { UpgradeDialogProps } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* The assurance-upgrade modal. A switch over `state.kind`, modelled on
|
|
5
5
|
* `LoginScreen`: one discriminated union, one view per state, no transitions of
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
export type VisuallyHiddenProps = {
|
|
3
|
+
/** Referenced by a control's `aria-labelledby` or `aria-describedby`. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** The text read by assistive technology. Plain text only. */
|
|
6
|
+
children: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Text that screen readers announce and sighted users do not see.
|
|
10
|
+
*
|
|
11
|
+
* For a control whose purpose the screen already shows another way, for
|
|
12
|
+
* example a row of code boxes under a "We sent a code" subtitle, so it still
|
|
13
|
+
* has an accessible name. Prefer pointing the control at visible text when
|
|
14
|
+
* the screen has some.
|
|
15
|
+
*/
|
|
16
|
+
export declare const VisuallyHidden: FC<VisuallyHiddenProps>;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
export type VisuallyHiddenProps = {
|
|
3
|
+
/** Referenced by a control's `aria-labelledby` or `aria-describedby`. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** The text read by assistive technology. Plain text only. */
|
|
6
|
+
children: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Text that screen readers announce and sighted users do not see.
|
|
10
|
+
*
|
|
11
|
+
* For a control whose purpose the screen already shows another way, for
|
|
12
|
+
* example a row of code boxes under a "We sent a code" subtitle, so it still
|
|
13
|
+
* has an accessible name. Prefer pointing the control at visible text when
|
|
14
|
+
* the screen has some.
|
|
15
|
+
*/
|
|
16
|
+
export declare const VisuallyHidden: FC<VisuallyHiddenProps>;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/visually-hidden/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,uBAAuB,CAAC;AAE/B,MAAM,MAAM,mBAAmB,GAAG;IAChC,yEAAyE;IACzE,EAAE,EAAE,MAAM,CAAC;IACX,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAIlD,CAAC"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
export declare const countriesPhoneCode: {
|
|
2
|
+
AD: string;
|
|
3
|
+
AE: string;
|
|
4
|
+
AF: string;
|
|
5
|
+
AG: string;
|
|
6
|
+
AI: string;
|
|
7
|
+
AL: string;
|
|
8
|
+
AM: string;
|
|
9
|
+
AO: string;
|
|
10
|
+
AQ: string;
|
|
11
|
+
AR: string;
|
|
12
|
+
AS: string;
|
|
13
|
+
AT: string;
|
|
14
|
+
AU: string;
|
|
15
|
+
AW: string;
|
|
16
|
+
AX: string;
|
|
17
|
+
AZ: string;
|
|
18
|
+
BA: string;
|
|
19
|
+
BB: string;
|
|
20
|
+
BD: string;
|
|
21
|
+
BE: string;
|
|
22
|
+
BF: string;
|
|
23
|
+
BG: string;
|
|
24
|
+
BH: string;
|
|
25
|
+
BI: string;
|
|
26
|
+
BJ: string;
|
|
27
|
+
BL: string;
|
|
28
|
+
BM: string;
|
|
29
|
+
BN: string;
|
|
30
|
+
BO: string;
|
|
31
|
+
BQ: string;
|
|
32
|
+
BR: string;
|
|
33
|
+
BS: string;
|
|
34
|
+
BT: string;
|
|
35
|
+
BV: null;
|
|
36
|
+
BW: string;
|
|
37
|
+
BY: string;
|
|
38
|
+
BZ: string;
|
|
39
|
+
CA: string;
|
|
40
|
+
CC: string;
|
|
41
|
+
CD: string;
|
|
42
|
+
CF: string;
|
|
43
|
+
CG: string;
|
|
44
|
+
CH: string;
|
|
45
|
+
CI: string;
|
|
46
|
+
CK: string;
|
|
47
|
+
CL: string;
|
|
48
|
+
CM: string;
|
|
49
|
+
CN: string;
|
|
50
|
+
CO: string;
|
|
51
|
+
CR: string;
|
|
52
|
+
CU: string;
|
|
53
|
+
CV: string;
|
|
54
|
+
CW: string;
|
|
55
|
+
CX: string;
|
|
56
|
+
CY: string;
|
|
57
|
+
CZ: string;
|
|
58
|
+
DE: string;
|
|
59
|
+
DJ: string;
|
|
60
|
+
DK: string;
|
|
61
|
+
DM: string;
|
|
62
|
+
DO: string;
|
|
63
|
+
DZ: string;
|
|
64
|
+
EC: string;
|
|
65
|
+
EE: string;
|
|
66
|
+
EG: string;
|
|
67
|
+
EH: string;
|
|
68
|
+
ER: string;
|
|
69
|
+
ES: string;
|
|
70
|
+
ET: string;
|
|
71
|
+
FI: string;
|
|
72
|
+
FJ: string;
|
|
73
|
+
FK: string;
|
|
74
|
+
FM: string;
|
|
75
|
+
FO: string;
|
|
76
|
+
FR: string;
|
|
77
|
+
GA: string;
|
|
78
|
+
GB: string;
|
|
79
|
+
GD: string;
|
|
80
|
+
GE: string;
|
|
81
|
+
GF: string;
|
|
82
|
+
GG: string;
|
|
83
|
+
GH: string;
|
|
84
|
+
GI: string;
|
|
85
|
+
GL: string;
|
|
86
|
+
GM: string;
|
|
87
|
+
GN: string;
|
|
88
|
+
GP: string;
|
|
89
|
+
GQ: string;
|
|
90
|
+
GR: string;
|
|
91
|
+
GS: null;
|
|
92
|
+
GT: string;
|
|
93
|
+
GU: string;
|
|
94
|
+
GW: string;
|
|
95
|
+
GY: string;
|
|
96
|
+
HK: string;
|
|
97
|
+
HM: null;
|
|
98
|
+
HN: string;
|
|
99
|
+
HR: string;
|
|
100
|
+
HT: string;
|
|
101
|
+
HU: string;
|
|
102
|
+
ID: string;
|
|
103
|
+
IE: string;
|
|
104
|
+
IL: string;
|
|
105
|
+
IM: string;
|
|
106
|
+
IN: string;
|
|
107
|
+
IO: string;
|
|
108
|
+
IQ: string;
|
|
109
|
+
IR: string;
|
|
110
|
+
IS: string;
|
|
111
|
+
IT: string;
|
|
112
|
+
JE: string;
|
|
113
|
+
JM: string;
|
|
114
|
+
JO: string;
|
|
115
|
+
JP: string;
|
|
116
|
+
KE: string;
|
|
117
|
+
KG: string;
|
|
118
|
+
KH: string;
|
|
119
|
+
KI: string;
|
|
120
|
+
KM: string;
|
|
121
|
+
KN: string;
|
|
122
|
+
KP: string;
|
|
123
|
+
KR: string;
|
|
124
|
+
KW: string;
|
|
125
|
+
KY: string;
|
|
126
|
+
KZ: string;
|
|
127
|
+
LA: string;
|
|
128
|
+
LB: string;
|
|
129
|
+
LC: string;
|
|
130
|
+
LI: string;
|
|
131
|
+
LK: string;
|
|
132
|
+
LR: string;
|
|
133
|
+
LS: string;
|
|
134
|
+
LT: string;
|
|
135
|
+
LU: string;
|
|
136
|
+
LV: string;
|
|
137
|
+
LY: string;
|
|
138
|
+
MA: string;
|
|
139
|
+
MC: string;
|
|
140
|
+
MD: string;
|
|
141
|
+
ME: string;
|
|
142
|
+
MF: string;
|
|
143
|
+
MG: string;
|
|
144
|
+
MH: string;
|
|
145
|
+
MK: string;
|
|
146
|
+
ML: string;
|
|
147
|
+
MM: string;
|
|
148
|
+
MN: string;
|
|
149
|
+
MO: string;
|
|
150
|
+
MP: string;
|
|
151
|
+
MQ: string;
|
|
152
|
+
MR: string;
|
|
153
|
+
MS: string;
|
|
154
|
+
MT: string;
|
|
155
|
+
MU: string;
|
|
156
|
+
MV: string;
|
|
157
|
+
MW: string;
|
|
158
|
+
MX: string;
|
|
159
|
+
MY: string;
|
|
160
|
+
MZ: string;
|
|
161
|
+
NA: string;
|
|
162
|
+
NC: string;
|
|
163
|
+
NE: string;
|
|
164
|
+
NF: string;
|
|
165
|
+
NG: string;
|
|
166
|
+
NI: string;
|
|
167
|
+
NL: string;
|
|
168
|
+
NO: string;
|
|
169
|
+
NP: string;
|
|
170
|
+
NR: string;
|
|
171
|
+
NU: string;
|
|
172
|
+
NZ: string;
|
|
173
|
+
OM: string;
|
|
174
|
+
PA: string;
|
|
175
|
+
PE: string;
|
|
176
|
+
PF: string;
|
|
177
|
+
PG: string;
|
|
178
|
+
PH: string;
|
|
179
|
+
PK: string;
|
|
180
|
+
PL: string;
|
|
181
|
+
PM: string;
|
|
182
|
+
PN: string;
|
|
183
|
+
PR: string;
|
|
184
|
+
PS: string;
|
|
185
|
+
PT: string;
|
|
186
|
+
PW: string;
|
|
187
|
+
PY: string;
|
|
188
|
+
QA: string;
|
|
189
|
+
RE: string;
|
|
190
|
+
RO: string;
|
|
191
|
+
RS: string;
|
|
192
|
+
RU: string;
|
|
193
|
+
RW: string;
|
|
194
|
+
SA: string;
|
|
195
|
+
SB: string;
|
|
196
|
+
SC: string;
|
|
197
|
+
SD: string;
|
|
198
|
+
SE: string;
|
|
199
|
+
SG: string;
|
|
200
|
+
SH: string;
|
|
201
|
+
SI: string;
|
|
202
|
+
SJ: string;
|
|
203
|
+
SK: string;
|
|
204
|
+
SL: string;
|
|
205
|
+
SM: string;
|
|
206
|
+
SN: string;
|
|
207
|
+
SO: string;
|
|
208
|
+
SR: string;
|
|
209
|
+
SS: string;
|
|
210
|
+
ST: string;
|
|
211
|
+
SV: string;
|
|
212
|
+
SX: string;
|
|
213
|
+
SY: string;
|
|
214
|
+
SZ: string;
|
|
215
|
+
TC: string;
|
|
216
|
+
TD: string;
|
|
217
|
+
TF: null;
|
|
218
|
+
TG: string;
|
|
219
|
+
TH: string;
|
|
220
|
+
TJ: string;
|
|
221
|
+
TK: string;
|
|
222
|
+
TL: string;
|
|
223
|
+
TM: string;
|
|
224
|
+
TN: string;
|
|
225
|
+
TO: string;
|
|
226
|
+
TR: string;
|
|
227
|
+
TT: string;
|
|
228
|
+
TV: string;
|
|
229
|
+
TW: string;
|
|
230
|
+
TZ: string;
|
|
231
|
+
UA: string;
|
|
232
|
+
UG: string;
|
|
233
|
+
UM: string;
|
|
234
|
+
US: string;
|
|
235
|
+
UY: string;
|
|
236
|
+
UZ: string;
|
|
237
|
+
VA: string;
|
|
238
|
+
VC: string;
|
|
239
|
+
VE: string;
|
|
240
|
+
VG: string;
|
|
241
|
+
VI: string;
|
|
242
|
+
VN: string;
|
|
243
|
+
VU: string;
|
|
244
|
+
WF: string;
|
|
245
|
+
WS: string;
|
|
246
|
+
XK: string;
|
|
247
|
+
YE: string;
|
|
248
|
+
YT: string;
|
|
249
|
+
ZA: string;
|
|
250
|
+
ZM: string;
|
|
251
|
+
ZW: string;
|
|
252
|
+
};
|
|
253
|
+
//# sourceMappingURL=countries-phone-code.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"countries-phone-code.d.ts","sourceRoot":"","sources":["../../../src/constants/countries-phone-code.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"countries-phone-code.d.ts","sourceRoot":"","sources":["../../../src/constants/countries-phone-code.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;IAC7B,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;IACF,EAAE;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formats.d.ts","sourceRoot":"","sources":["../../../src/constants/formats.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"formats.d.ts","sourceRoot":"","sources":["../../../src/constants/formats.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;IAClB,gBAAgB;CACjB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { countriesPhoneCode } from './countries-phone-code';
|
|
2
|
-
export { FORMATS } from './formats';
|
|
1
|
+
export { countriesPhoneCode } from './countries-phone-code.js';
|
|
2
|
+
export { FORMATS } from './formats.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ParsedTokens, type Tokens } from '@passflow/core';
|
|
2
|
+
import { type FC, type PropsWithChildren } from 'react';
|
|
3
|
+
export type SessionExpiredHandler = (reason: 'refresh_failed' | 'token_invalid' | 'logged_out') => void;
|
|
4
|
+
export type AuthContextValue = {
|
|
5
|
+
isAuthenticated: () => boolean;
|
|
6
|
+
logout: () => void;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
isSessionExpired: boolean;
|
|
9
|
+
getTokens: (doRefresh: boolean) => Promise<{
|
|
10
|
+
tokens: Tokens | undefined;
|
|
11
|
+
parsedTokens: ParsedTokens | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
export declare const AuthContext: import("react").Context<AuthContextValue | undefined>;
|
|
15
|
+
export type AuthProviderProps = PropsWithChildren<{
|
|
16
|
+
/**
|
|
17
|
+
* Called when the session expires (token refresh failed).
|
|
18
|
+
* Use this to redirect to your login page.
|
|
19
|
+
*/
|
|
20
|
+
onSessionExpired?: SessionExpiredHandler;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const AuthProvider: FC<AuthProviderProps>;
|
|
23
|
+
//# sourceMappingURL=auth-context.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ParsedTokens, Tokens } from '@passflow/core';
|
|
2
|
-
import {
|
|
1
|
+
import { type ParsedTokens, type Tokens } from '@passflow/core';
|
|
2
|
+
import { type FC, type PropsWithChildren } from 'react';
|
|
3
3
|
export type SessionExpiredHandler = (reason: 'refresh_failed' | 'token_invalid' | 'logged_out') => void;
|
|
4
4
|
export type AuthContextValue = {
|
|
5
5
|
isAuthenticated: () => boolean;
|
|
@@ -11,7 +11,7 @@ export type AuthContextValue = {
|
|
|
11
11
|
parsedTokens: ParsedTokens | undefined;
|
|
12
12
|
}>;
|
|
13
13
|
};
|
|
14
|
-
export declare const AuthContext:
|
|
14
|
+
export declare const AuthContext: import("react").Context<AuthContextValue | undefined>;
|
|
15
15
|
export type AuthProviderProps = PropsWithChildren<{
|
|
16
16
|
/**
|
|
17
17
|
* Called when the session expires (token refresh failed).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-context.d.ts","sourceRoot":"","sources":["../../../src/context/auth-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAA0C,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxG,OAAO,
|
|
1
|
+
{"version":3,"file":"auth-context.d.ts","sourceRoot":"","sources":["../../../src/context/auth-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAA0C,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxG,OAAO,EAAiB,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAoC,MAAM,OAAO,CAAC;AAGzG,MAAM,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,gBAAgB,GAAG,eAAe,GAAG,YAAY,KAAK,IAAI,CAAC;AAExG,MAAM,MAAM,gBAAgB,GAAG;IAC7B,eAAe,EAAE,MAAM,OAAO,CAAC;IAC/B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,YAAY,EAAE,YAAY,GAAG,SAAS,CAAA;KAAE,CAAC,CAAC;CACpH,CAAC;AAEF,eAAO,MAAM,WAAW,uDAAyD,CAAC;AAElF,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;IAChD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;CAC1C,CAAC,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAmE9C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './upgrade-context';
|
|
1
|
+
export * from './auth-context.js';
|
|
2
|
+
export * from './navigation-context.js';
|
|
3
|
+
export * from './passflow-context.js';
|
|
4
|
+
export * from './router-context.js';
|
|
5
|
+
export * from './upgrade-context.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type NavigateOptions = {
|
|
2
|
+
to: string;
|
|
3
|
+
search?: string;
|
|
4
|
+
replace?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export type RouterType = 'default' | 'react-router' | 'tanstack-router' | 'wouter';
|
|
7
|
+
export type NavigateFunction = (options: NavigateOptions) => void;
|
|
8
|
+
export type NavigationContextType = {
|
|
9
|
+
navigate: NavigateFunction;
|
|
10
|
+
setNavigate: (navigate: NavigateFunction | null) => void;
|
|
11
|
+
router: RouterType;
|
|
12
|
+
/**
|
|
13
|
+
* Where a sign-in that owes its second factor is sent when it lands on a
|
|
14
|
+
* page outside the forms (a federated redirect carrying `#tfa_token=`).
|
|
15
|
+
* `PassflowProvider` resolves it: a mounted `PassflowFlow` registers its own
|
|
16
|
+
* (prefixed) route, else the provider's `twoFactorVerifyPath` prop, else
|
|
17
|
+
* `routes.two_factor_verify.path`.
|
|
18
|
+
*/
|
|
19
|
+
twoFactorVerifyPath?: string;
|
|
20
|
+
/** Registers the 2FA route of a mounted flow; `null` withdraws it. */
|
|
21
|
+
setTwoFactorVerifyPath?: (path: string | null) => void;
|
|
22
|
+
};
|
|
23
|
+
export declare const defaultNavigate: NavigateFunction;
|
|
24
|
+
export declare const NavigationContext: import("react").Context<NavigationContextType>;
|
|
25
|
+
//# sourceMappingURL=navigation-context.d.ts.map
|