@passflow/react 0.14.0 → 0.15.1
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 +66 -0
- package/README.md +29 -16
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.es.js +143 -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 +4 -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 +1 -1
- 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 +48 -0
- package/dist/src/components/ui/fields/field-otp.d.ts +48 -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 -13
- 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 -56
- 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
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,72 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@passflow/react` are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.15.1] - 2026-11-02
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- `PassflowFlow` navigates through its own router whatever the provider's `router` prop says. With the default value, every step inside the flow did a full page load through `window.location` to an unprefixed path, leaving a memory, hash or host router. Hosts that pass `router="react-router"` were not affected.
|
|
10
|
+
- A navigation asked for with `replace: true` inside `PassflowFlow` replaces the history entry. It pushed a new one, because `replace` was handed to React Router as part of the destination.
|
|
11
|
+
- The passwordless OTP screen and the 2FA verify form name the code field with a visible "Verification code" label. They used hidden text only, which fails WCAG labelling (axe `label-title-only`) once a wrong code shows an error.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `FieldOtp` takes an optional `label`: the field then draws its own visible label above the boxes. `labelledBy` still works; a field takes one or the other. New stories: With label, With label error.
|
|
16
|
+
- `PassflowProps`, the props of `PassflowFlow`, is exported from the package root.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- `lodash` and `tailwind-merge` are no longer dependencies. lodash is CommonJS, so it could not be tree-shaken and added about 70 KB minified to an app's bundle; tailwind-merge resolved Tailwind class conflicts in a library that styles only with `passflow-*` classes.
|
|
21
|
+
|
|
22
|
+
### Internal
|
|
23
|
+
|
|
24
|
+
- CI loads the packed package in plain Node through both `require` and `import`, and fails if either throws or the two expose different exports.
|
|
25
|
+
- README examples import from `@passflow/react` instead of the old package name.
|
|
26
|
+
- Two flaky UI tests fixed: the Storybook audits wait for the theme to settle, and the FieldOtp length test no longer depends on keystroke timing.
|
|
27
|
+
|
|
28
|
+
## [0.15.0] - 2026-11-02
|
|
29
|
+
|
|
30
|
+
### Breaking
|
|
31
|
+
|
|
32
|
+
- `react-router` is now a required peer dependency, `^7.0.0 || ^8.0.0`, and is no longer bundled, so the SDK and the host share one router. `react-router-dom` is not a peer. A host on React Router 7 adds `react-router`, which `react-router-dom` 7 already installs; a host on React Router 8 needs React 19.2.7 or later, as React Router 8 itself does. Hosts on React Router 6 are no longer supported. A host that routes with Wouter or TanStack Router installs `react-router` too, because the package imports it.
|
|
33
|
+
- `PassflowFlow` inside a host React Router `<Router>` now uses that router. Mount it under a splat route, `<Route path="/auth/*" element={<PassflowFlow />} />`; `pathPrefix` is then relative to that route, and `routerType` is ignored with a console warning. Before, a nested flow ran a private router of its own. A flow with no host router behaves as before.
|
|
34
|
+
- The CommonJS entry is `dist/index.cjs`, renamed from `dist/index.cjs.js`. Under the package's `"type": "module"`, Node loaded the old file as an empty module, so `require('@passflow/react')` returned nothing; it now returns the full export set. React Router 8 is ESM-only, so a CommonJS consumer on it relies on Node's `require(esm)`.
|
|
35
|
+
- Requires Node `^22.12.0 || ^24.0.0 || >=26.0.0` (`engines`), the same lines as `@passflow/core`.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- Requires `@passflow/core` 0.20.1 or later, up from 0.19.0.
|
|
40
|
+
- One-time-code fields are one input instead of one per digit. The browser's one-time-code autofill works, a whole code pastes in one go, and numeric codes accept digits only, with the numeric keypad on phones. The boxes look as before, and `custom_css` aimed at `.passflow-field-otp` still styles each box.
|
|
41
|
+
- An app's `customCss` is rendered as a `<style>` element inside `#passflow-wrapper`, and only when it is set, instead of in `document.head`. No `HelmetProvider` is needed.
|
|
42
|
+
- Developed on React 19. React 18 is still supported and tested in CI.
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- `FieldOtp`, the code field above, with its Storybook stories.
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- `TwoFactorSetupMagicLinkFlow` reads `:token` from the host's router. With the router bundled it read a separate copy and never saw the host's route params.
|
|
51
|
+
- Type declarations resolve under `moduleResolution` `node16`, `nodenext` and `bundler`, and the `require` entry has its own `.d.cts` declarations. CI type-checks the packed package as a consumer would, on TypeScript 5.9 and 7, with React 19 and React Router 8 and with React 18 and React Router 7.
|
|
52
|
+
- The ESM and CommonJS entries load in plain Node with no DOM, as server rendering needs. 0.14.0 threw `window is not defined` at module load, and its ESM entry failed to link its named imports from `lodash`.
|
|
53
|
+
- The `option` button's accessible name is all of its visible text, label and hint, so a voice-control user can say what they see (WCAG 2.5.3, flagged by axe 4.14).
|
|
54
|
+
|
|
55
|
+
### Removed
|
|
56
|
+
|
|
57
|
+
- The runtime dependencies `react-otp-input`, `react-helmet-async`, `history` and `tailwindcss-scoped-preflight`. `terser` is build-only, and React Router is no longer bundled.
|
|
58
|
+
|
|
59
|
+
Dependencies: `@simplewebauthn/browser` 14, `react-error-boundary` 6, `query-string` 10 and `tailwind-merge` 3 at runtime, with `input-otp` new. The toolchain moves to TypeScript 7, Vite 8.3, Vitest 5, Biome 2, pnpm 12 and Storybook 10.6; none of it ships.
|
|
60
|
+
|
|
61
|
+
## [0.14.0] - 2026-11-02
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- Password sign-up under an OIDC parent reaches the relying party. The provider's interceptor now covers `/auth/register`, so a sign-up on a PKCE app carries `parent_challenge_id` like sign-in does and follows the server's redirect back to the app.
|
|
66
|
+
- The line shown while a session is handed over to the app is `ContinuingStatus`, a themed library component, instead of an inline-styled placeholder.
|
|
67
|
+
- Requires `@passflow/core` 0.19.0 or later, up from 0.18.0.
|
|
68
|
+
|
|
69
|
+
Needs a server that accepts an OIDC parent on password sign-up (Passflow `src/v0.22.0`).
|
|
70
|
+
|
|
5
71
|
## [0.13.0] - 2026-10-30
|
|
6
72
|
|
|
7
73
|
### Added
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# @passflow/
|
|
1
|
+
# @passflow/react
|
|
2
2
|
|
|
3
3
|
This is a SDK for react application.
|
|
4
4
|
|
|
5
5
|
## Table of Contents
|
|
6
6
|
|
|
7
|
-
- [@passflow/
|
|
7
|
+
- [@passflow/react](#passflowreact)
|
|
8
8
|
- [Table of Contents](#table-of-contents)
|
|
9
9
|
- [Local Development](#local-development)
|
|
10
10
|
- [Using Local Passflow JS SDK](#using-local-passflow-js-sdk)
|
|
@@ -16,7 +16,7 @@ This is a SDK for react application.
|
|
|
16
16
|
- [Integration](#integration)
|
|
17
17
|
- [Passflow Cloud](#passflow-cloud)
|
|
18
18
|
- [PassflowFlow](#passflowflow)
|
|
19
|
-
- [React Router
|
|
19
|
+
- [React Router](#react-router)
|
|
20
20
|
- [Wouter](#wouter)
|
|
21
21
|
- [TanStack Router](#tanstack-router)
|
|
22
22
|
- [Props](#props)
|
|
@@ -137,13 +137,17 @@ Both scripts automatically start the demo app and Storybook. `pnpm test` uses th
|
|
|
137
137
|
## Installation
|
|
138
138
|
|
|
139
139
|
```bash
|
|
140
|
-
pnpm add @passflow/
|
|
140
|
+
pnpm add @passflow/react react-router
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
+
`react-router` (`^7.0.0 || ^8.0.0`) is a required peer dependency and is not bundled, so install it even when the app routes with Wouter or TanStack Router. `react-router-dom` is not needed: from v7 on, `BrowserRouter` and the rest are exported by `react-router`.
|
|
144
|
+
|
|
143
145
|
## Requirements
|
|
144
146
|
|
|
145
|
-
- React 18+
|
|
146
|
-
- React Router
|
|
147
|
+
- React 18+ (React 19.2.7+ with React Router 8)
|
|
148
|
+
- React Router 7 or 8 (React Router 6 is not supported)
|
|
149
|
+
- Node `^22.12.0 || ^24.0.0 || >=26.0.0`
|
|
150
|
+
- Your app may route with React Router, Wouter or TanStack Router
|
|
147
151
|
|
|
148
152
|
## Integration
|
|
149
153
|
|
|
@@ -162,7 +166,7 @@ const passflowConfig: PassflowConfig = {
|
|
|
162
166
|
export const PassflowProviderWrapper: FC<PropsWithChildren> = ({
|
|
163
167
|
children,
|
|
164
168
|
}) => {
|
|
165
|
-
const navigate = useNavigate(); // from react-router
|
|
169
|
+
const navigate = useNavigate(); // from react-router
|
|
166
170
|
|
|
167
171
|
return (
|
|
168
172
|
<PassflowProvider
|
|
@@ -248,9 +252,18 @@ authentication-context claims those tokens carry.
|
|
|
248
252
|
| federatedDisplayMode | "popup" \| "redirect" | Federated authentication display mode |
|
|
249
253
|
| pathPrefix | string | Prefix for all routes (optional) |
|
|
250
254
|
|
|
251
|
-
|
|
255
|
+
Inside an app that already has a React Router `<Router>`, `PassflowFlow` uses that router rather than its own (`routerType` is ignored). Mount it under a splat route so its own routes can match, and `pathPrefix` is relative to that route:
|
|
256
|
+
|
|
257
|
+
```tsx
|
|
258
|
+
<Routes>
|
|
259
|
+
<Route path="/" element={<Home />} />
|
|
260
|
+
<Route path="/auth/*" element={<PassflowFlow successAuthRedirect="/" />} />
|
|
261
|
+
</Routes>
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### React Router
|
|
252
265
|
|
|
253
|
-
Example of integration with React Router
|
|
266
|
+
Example of integration with React Router:
|
|
254
267
|
PS: The example uses the Declarative approach.
|
|
255
268
|
|
|
256
269
|
```tsx
|
|
@@ -260,8 +273,8 @@ import {
|
|
|
260
273
|
SignUp,
|
|
261
274
|
ForgotPassword,
|
|
262
275
|
ForgotPasswordSuccess,
|
|
263
|
-
} from "@passflow/
|
|
264
|
-
import { BrowserRouter, Routes, Route, useNavigate } from "react-router
|
|
276
|
+
} from "@passflow/react";
|
|
277
|
+
import { BrowserRouter, Routes, Route, useNavigate } from "react-router";
|
|
265
278
|
|
|
266
279
|
const passflowConfig = {
|
|
267
280
|
url: import.meta.env.VITE_PASSFLOW_URL,
|
|
@@ -331,7 +344,7 @@ import {
|
|
|
331
344
|
SignUp,
|
|
332
345
|
ForgotPassword,
|
|
333
346
|
ForgotPasswordSuccess,
|
|
334
|
-
} from "@passflow/
|
|
347
|
+
} from "@passflow/react";
|
|
335
348
|
import { Switch, Route, useLocation } from "wouter";
|
|
336
349
|
|
|
337
350
|
const passflowConfig = {
|
|
@@ -397,7 +410,7 @@ export const App = () => (
|
|
|
397
410
|
);
|
|
398
411
|
|
|
399
412
|
// PassflowProviderWrapper.tsx
|
|
400
|
-
import { PassflowProvider } from '@passflow/
|
|
413
|
+
import { PassflowProvider } from '@passflow/react';
|
|
401
414
|
|
|
402
415
|
const passflowConfig = {
|
|
403
416
|
url: import.meta.env.VITE_PASSFLOW_URL,
|
|
@@ -419,7 +432,7 @@ export const PassflowProviderWrapper = ({ children }) => (
|
|
|
419
432
|
);
|
|
420
433
|
|
|
421
434
|
// router/root.tsx
|
|
422
|
-
import { useNavigation } from '@passflow/
|
|
435
|
+
import { useNavigation } from '@passflow/react';
|
|
423
436
|
import { Outlet, useNavigate } from '@tanstack/react-router';
|
|
424
437
|
|
|
425
438
|
export const Root = () => {
|
|
@@ -438,7 +451,7 @@ import { QueryClient } from '@tanstack/react-query';
|
|
|
438
451
|
import { createRouter } from '@tanstack/react-router';
|
|
439
452
|
import { queryClient } from '../query';
|
|
440
453
|
import { routerTree } from './routes';
|
|
441
|
-
import { Passflow } from '@passflow/
|
|
454
|
+
import { Passflow } from '@passflow/react';
|
|
442
455
|
|
|
443
456
|
export interface RouterContext {
|
|
444
457
|
queryClient: QueryClient;
|
|
@@ -466,7 +479,7 @@ import { Outlet, createRootRouteWithContext, createRoute, redirect } from '@tans
|
|
|
466
479
|
import { RouterContext } from './router';
|
|
467
480
|
import { Root } from './root';
|
|
468
481
|
import { About, Home } from '@/pages';
|
|
469
|
-
import { ForgotPassword, ForgotPasswordSuccess, SignIn, SignUp } from '@passflow/
|
|
482
|
+
import { ForgotPassword, ForgotPasswordSuccess, SignIn, SignUp } from '@passflow/react';
|
|
470
483
|
import { RootLayout } from '@/layouts';
|
|
471
484
|
|
|
472
485
|
const redirectToSignin = () => {
|