@passflow/react 0.9.0 → 0.10.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.
Files changed (51) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/index.cjs.js +1 -1
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.es.js +132 -122
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/src/components/provider/index.d.ts +2 -1
  7. package/dist/src/components/provider/index.d.ts.map +1 -1
  8. package/dist/src/components/provider/passflow-provider.d.ts +39 -5
  9. package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
  10. package/dist/src/components/provider/upgrade-provider.d.ts +49 -0
  11. package/dist/src/components/provider/upgrade-provider.d.ts.map +1 -0
  12. package/dist/src/components/ui/button/index.d.ts +12 -1
  13. package/dist/src/components/ui/button/index.d.ts.map +1 -1
  14. package/dist/src/components/ui/index.d.ts +2 -0
  15. package/dist/src/components/ui/index.d.ts.map +1 -1
  16. package/dist/src/components/ui/login-screen/consent.d.ts +2 -0
  17. package/dist/src/components/ui/login-screen/consent.d.ts.map +1 -1
  18. package/dist/src/components/ui/spinner/index.d.ts +23 -0
  19. package/dist/src/components/ui/spinner/index.d.ts.map +1 -0
  20. package/dist/src/components/ui/upgrade-dialog/challenge.d.ts +12 -0
  21. package/dist/src/components/ui/upgrade-dialog/challenge.d.ts.map +1 -0
  22. package/dist/src/components/ui/upgrade-dialog/factor-list.d.ts +20 -0
  23. package/dist/src/components/ui/upgrade-dialog/factor-list.d.ts.map +1 -0
  24. package/dist/src/components/ui/upgrade-dialog/index.d.ts +8 -0
  25. package/dist/src/components/ui/upgrade-dialog/index.d.ts.map +1 -0
  26. package/dist/src/components/ui/upgrade-dialog/state-mapping.d.ts +119 -0
  27. package/dist/src/components/ui/upgrade-dialog/state-mapping.d.ts.map +1 -0
  28. package/dist/src/components/ui/upgrade-dialog/status.d.ts +27 -0
  29. package/dist/src/components/ui/upgrade-dialog/status.d.ts.map +1 -0
  30. package/dist/src/components/ui/upgrade-dialog/types.d.ts +188 -0
  31. package/dist/src/components/ui/upgrade-dialog/types.d.ts.map +1 -0
  32. package/dist/src/components/ui/upgrade-dialog/upgrade-dialog.d.ts +13 -0
  33. package/dist/src/components/ui/upgrade-dialog/upgrade-dialog.d.ts.map +1 -0
  34. package/dist/src/context/index.d.ts +1 -0
  35. package/dist/src/context/index.d.ts.map +1 -1
  36. package/dist/src/context/upgrade-context.d.ts +85 -0
  37. package/dist/src/context/upgrade-context.d.ts.map +1 -0
  38. package/dist/src/hooks/index.d.ts +1 -0
  39. package/dist/src/hooks/index.d.ts.map +1 -1
  40. package/dist/src/hooks/use-upgrade.d.ts +43 -0
  41. package/dist/src/hooks/use-upgrade.d.ts.map +1 -0
  42. package/dist/src/index.d.ts +4 -1
  43. package/dist/src/index.d.ts.map +1 -1
  44. package/dist/src/utils/index.d.ts +1 -0
  45. package/dist/src/utils/index.d.ts.map +1 -1
  46. package/dist/src/utils/upgrade-auth.d.ts +38 -0
  47. package/dist/src/utils/upgrade-auth.d.ts.map +1 -0
  48. package/dist/style.css +1 -1
  49. package/package.json +4 -4
  50. package/dist/src/components/flow/upgrade-required-placeholder.d.ts +0 -21
  51. package/dist/src/components/flow/upgrade-required-placeholder.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  All notable changes to `@passflow/react` are documented in this file.
4
4
 
5
+ ## [0.10.0] - 2026-10-28
6
+
7
+ ### Added
8
+
9
+ - `UpgradeDialog`, the UI for an assurance upgrade (step-up authentication). A request answered with an RFC 9470 challenge elevates the session and replays itself; this is what the user sees while that happens. It is a library component with a catalogued Storybook story per supported state, including the terminal ones: attempts exhausted, a session changed under the user, a retryable transport failure versus a final one, and an elevation that succeeded only to be challenged again.
10
+ - `useUpgrade` and `UpgradeProvider`. The provider wires the dialog to a configured `Passflow` instance and requires `@passflow/core` 0.15.0 or later; the hook reads the context and installs nothing, so a host rendering its own prompt can use it alone. A cancelled prompt resolves `null` rather than throwing.
11
+ - `Spinner`, with its own story.
12
+ - A `description` prop on the `option` button variant, exposed as an accessible description rather than folded into the name.
13
+
14
+ ### Fixed
15
+
16
+ - The `option` button folded its hint into the accessible name, which read `"Authenticator appEnter the code from your app"`. The name is now pinned to the label through `aria-labelledby`, with the hint exposed through a merged `aria-describedby`.
17
+ - Eight Storybook accessibility audits were scoped to `#storybook-root`, which Radix's `Dialog.Portal` leaves empty and marks `aria-hidden`. They had been passing vacuously, auditing nothing at all. They now scope to `[role="dialog"]` and fail on an empty render.
18
+ - `pnpm test` no longer fails with `browserType.launch: Executable doesn't exist` after a `@playwright/test` bump. The script installs its browser first, which costs under a second when one is already present.
19
+
20
+ ### Removed
21
+
22
+ - `upgrade-required-placeholder.tsx`, the internal stand-in the real dialog replaces. It was never exported from the package entry.
23
+
24
+ ## [0.9.1] - 2026-10-26
25
+
26
+ ### Fixed
27
+
28
+ - The consent screen no longer auto-focuses Allow. Pressing Enter on a freshly loaded `ConsentFlow` previously granted every requested scope; neither button takes initial focus now, so Deny stays a true peer of Allow.
29
+
5
30
  ## [0.9.0] - 2026-10-26
6
31
 
7
32
  ### Added