@passflow/react 0.7.1 → 0.8.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 +31 -0
- package/README.md +27 -17
- package/dist/index.cjs.js +2 -34
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +123 -7308
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/error/index.d.ts.map +1 -1
- package/dist/src/components/flow/device-verify/index.d.ts +10 -0
- package/dist/src/components/flow/device-verify/index.d.ts.map +1 -0
- package/dist/src/components/flow/device-verify/screen.d.ts +4 -0
- package/dist/src/components/flow/device-verify/screen.d.ts.map +1 -0
- package/dist/src/components/flow/index.d.ts +1 -0
- package/dist/src/components/flow/index.d.ts.map +1 -1
- package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
- package/dist/src/components/flow/two-factor-verify/index.d.ts.map +1 -1
- package/dist/src/components/form/cli-auth/index.d.ts +8 -0
- package/dist/src/components/form/cli-auth/index.d.ts.map +1 -0
- package/dist/src/components/form/cli-auth/screen.d.ts +5 -0
- package/dist/src/components/form/cli-auth/screen.d.ts.map +1 -0
- package/dist/src/components/form/cli-browser-auth/index.d.ts.map +1 -1
- package/dist/src/components/form/cli-qr-auth/index.d.ts.map +1 -1
- package/dist/src/components/form/forgot-password/forgot-password-success.d.ts.map +1 -1
- package/dist/src/components/form/index.d.ts +0 -1
- package/dist/src/components/form/index.d.ts.map +1 -1
- package/dist/src/components/form/invitation-join/index.d.ts.map +1 -1
- 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.ts +2 -2
- package/dist/src/components/form/signup/index.d.ts.map +1 -1
- 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.ts.map +1 -1
- package/dist/src/components/form/wrapper/index.d.ts +1 -12
- package/dist/src/components/form/wrapper/index.d.ts.map +1 -1
- package/dist/src/components/provider/passflow-provider.d.ts +22 -0
- package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
- package/dist/src/components/ui/country-flag/index.d.ts +7 -0
- package/dist/src/components/ui/country-flag/index.d.ts.map +1 -0
- package/dist/src/components/ui/country-flag/positions.d.ts +245 -0
- package/dist/src/components/ui/country-flag/positions.d.ts.map +1 -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/icon/index.d.ts +3 -1
- package/dist/src/components/ui/icon/index.d.ts.map +1 -1
- package/dist/src/components/ui/index.d.ts +2 -0
- package/dist/src/components/ui/index.d.ts.map +1 -1
- package/dist/src/components/ui/login-screen/code-entry.d.ts +4 -0
- package/dist/src/components/ui/login-screen/code-entry.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/credentials.d.ts +4 -0
- package/dist/src/components/ui/login-screen/credentials.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/device-approval.d.ts +4 -0
- package/dist/src/components/ui/login-screen/device-approval.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/general-error.d.ts +4 -0
- package/dist/src/components/ui/login-screen/general-error.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/index.d.ts +4 -0
- package/dist/src/components/ui/login-screen/index.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/invitation.d.ts +4 -0
- package/dist/src/components/ui/login-screen/invitation.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/login-screen.d.ts +4 -0
- package/dist/src/components/ui/login-screen/login-screen.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/passkey-progress.d.ts +4 -0
- package/dist/src/components/ui/login-screen/passkey-progress.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/shared.d.ts +15 -0
- package/dist/src/components/ui/login-screen/shared.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/shell.d.ts +13 -0
- package/dist/src/components/ui/login-screen/shell.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/status.d.ts +4 -0
- package/dist/src/components/ui/login-screen/status.d.ts.map +1 -0
- package/dist/src/components/ui/login-screen/types.d.ts +153 -0
- package/dist/src/components/ui/login-screen/types.d.ts.map +1 -0
- package/dist/src/components/ui/switch/index.d.ts +1 -0
- package/dist/src/components/ui/switch/index.d.ts.map +1 -1
- package/dist/src/hooks/index.d.ts +1 -0
- package/dist/src/hooks/index.d.ts.map +1 -1
- package/dist/src/hooks/use-app-settings.d.ts.map +1 -1
- package/dist/src/hooks/use-device-verify.d.ts +79 -0
- package/dist/src/hooks/use-device-verify.d.ts.map +1 -0
- package/dist/src/hooks/use-join-invite.d.ts.map +1 -1
- package/dist/src/hooks/use-passwordless-complete.d.ts.map +1 -1
- package/dist/src/hooks/use-signin.d.ts +3 -2
- package/dist/src/hooks/use-signin.d.ts.map +1 -1
- package/dist/src/hooks/use-signup.d.ts +3 -2
- package/dist/src/hooks/use-signup.d.ts.map +1 -1
- package/dist/src/types/auth-errors.d.ts +8 -0
- package/dist/src/types/auth-errors.d.ts.map +1 -0
- package/dist/src/types/device-errors.d.ts +91 -0
- package/dist/src/types/device-errors.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +2 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/utils/auth-error.d.ts +7 -0
- package/dist/src/utils/auth-error.d.ts.map +1 -0
- package/dist/src/utils/classify-device-error.d.ts +35 -0
- package/dist/src/utils/classify-device-error.d.ts.map +1 -0
- package/dist/src/utils/index.d.ts +3 -0
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/invitation-auth-chrome.d.ts +8 -0
- package/dist/src/utils/invitation-auth-chrome.d.ts.map +1 -0
- package/dist/src/utils/login-theme.d.ts +8 -0
- package/dist/src/utils/login-theme.d.ts.map +1 -0
- package/dist/style.css +2 -1
- package/package.json +17 -9
- package/dist/playwright/fixture/index.d.ts +0 -3
- package/dist/playwright/fixture/index.d.ts.map +0 -1
- package/dist/playwright/playwright.config.d.ts +0 -10
- package/dist/playwright/playwright.config.d.ts.map +0 -1
- package/dist/playwright/tests/invitation-flow.spec.d.ts +0 -2
- package/dist/playwright/tests/invitation-flow.spec.d.ts.map +0 -1
- package/dist/playwright/tests/signin.spec.d.ts +0 -2
- package/dist/playwright/tests/signin.spec.d.ts.map +0 -1
- package/dist/playwright/tests/signup.spec.d.ts +0 -2
- package/dist/playwright/tests/signup.spec.d.ts.map +0 -1
- package/dist/playwright/tests/validate.spec.d.ts +0 -2
- package/dist/playwright/tests/validate.spec.d.ts.map +0 -1
- package/dist/src/app.d.ts +0 -5
- package/dist/src/app.d.ts.map +0 -1
- package/dist/src/main.d.ts +0 -1
- package/dist/src/main.d.ts.map +0 -1
- package/dist/src/test/setup.d.ts +0 -1
- package/dist/src/test/setup.d.ts.map +0 -1
- package/dist/src/test/utils/render.d.ts +0 -4
- package/dist/src/test/utils/render.d.ts.map +0 -1
- package/dist/src/test/utils/test-passflow.d.ts +0 -6
- package/dist/src/test/utils/test-passflow.d.ts.map +0 -1
- package/dist/vite.svg +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@passflow/react` are documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.8.1] - 2026-07-28
|
|
6
|
+
|
|
7
|
+
Version 0.8.1 is the first registry release after 0.7.1 and includes the previously unreleased 0.8.0 device-verification work.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- A typed, Storybook-backed `LoginScreen` component system covering credential, passkey, code-entry, invitation, device-approval, status, and general-error states.
|
|
12
|
+
- RFC 8628 device verification through `DeviceVerifyFlow`, `useDeviceVerify`, typed device errors, and explicit device approval screens.
|
|
13
|
+
- Shared CLI browser and QR authentication state mapping through the component library.
|
|
14
|
+
- Bundled country flags and an improved international phone field with no runtime dependency on third-party flag assets.
|
|
15
|
+
- Storybook accessibility tooling and Playwright coverage for authentication states, interactions, responsive layouts, themes, and accessibility.
|
|
16
|
+
- Typed authentication error classification and shared login-theme and invitation-chrome mapping utilities.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Sign-in, sign-up, invitation, CLI authentication, device verification, passwordless verification, and error screens now consume the shared UI component library instead of maintaining flow-local visual implementations.
|
|
21
|
+
- Authentication styling now resolves through the existing `--passflow-*` design tokens, with Storybook serving as the supported-state catalog.
|
|
22
|
+
- Build, Storybook, Vitest, Playwright, Vite, and pnpm tooling were upgraded and aligned with CI.
|
|
23
|
+
- The npm package now rebuilds during `prepack` and excludes demo, test, Storybook, and Playwright declarations from the published artifact.
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- OIDC credential flows no longer cancel the relying party callback with a competing post-login navigation after the interceptor has followed `redirect_url`.
|
|
28
|
+
- Sign-in and sign-up user-facing errors no longer expose raw backend or redirect details.
|
|
29
|
+
- Password, phone, icon, switch, provider, focus, loading, and validation states received accessibility and interaction fixes.
|
|
30
|
+
|
|
31
|
+
[0.8.1]: https://github.com/MadAppGang/passflow-react-sdk/compare/v0.7.1...v0.8.1
|
package/README.md
CHANGED
|
@@ -56,6 +56,22 @@ pnpm build
|
|
|
56
56
|
|
|
57
57
|
## Local Development
|
|
58
58
|
|
|
59
|
+
### Component development with Storybook
|
|
60
|
+
|
|
61
|
+
The visual source of truth lives in `src/components/ui` and is catalogued in Storybook.
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
pnpm storybook
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Before reusing a new visual state in a flow, add it to the owning UI component and its co-located `*.stories.tsx` file. Verify the static catalog with:
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
pnpm build-storybook
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Flows and form controllers should map domain state and callbacks into library components rather than creating or styling controls in place. See [`CLAUDE.md`](./CLAUDE.md) for the repository boundary.
|
|
74
|
+
|
|
59
75
|
### Using Local Passflow JS SDK
|
|
60
76
|
|
|
61
77
|
For local development and testing with a local version of the Passflow JS SDK, you need to:
|
|
@@ -98,32 +114,26 @@ we are using pnpm. Please ansure you have it in the system.
|
|
|
98
114
|
|
|
99
115
|
## UI Testing
|
|
100
116
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
First, ensure you have all runtime binary enabled:
|
|
117
|
+
All UI behavior and Storybook state tests use Playwright. Install Chromium once:
|
|
104
118
|
|
|
105
|
-
```
|
|
106
|
-
pnpm exec playwright install
|
|
119
|
+
```sh
|
|
120
|
+
pnpm exec playwright install chromium
|
|
107
121
|
```
|
|
108
122
|
|
|
109
|
-
|
|
123
|
+
Run the complete UI suite headlessly:
|
|
110
124
|
|
|
125
|
+
```sh
|
|
126
|
+
pnpm test
|
|
111
127
|
```
|
|
112
|
-
pnpm run test:ui
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Writing your own ui tests.
|
|
116
128
|
|
|
117
|
-
|
|
129
|
+
Or launch Playwright's interactive test UI:
|
|
118
130
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
To run the playwright in the design mode with ui, run the follwoing command:
|
|
122
|
-
|
|
123
|
-
```
|
|
124
|
-
pnpm playwright test --ui
|
|
131
|
+
```sh
|
|
132
|
+
pnpm test:ui
|
|
125
133
|
```
|
|
126
134
|
|
|
135
|
+
Both scripts automatically start the demo app and Storybook. `pnpm test` uses the economical headless configuration, while `pnpm test:ui` retains traces and a final full-page screenshot for every successful test. Select a runnable leaf test in Playwright UI to inspect its action timeline, DOM snapshots, and screenshot attachment. Tests live in `playwright/tests`; component-state tests render the real Storybook stories rather than recreating components in a test-only harness. Vitest remains for non-visual hooks, controllers, and utility logic.
|
|
136
|
+
|
|
127
137
|
## Installation
|
|
128
138
|
|
|
129
139
|
```bash
|