@passflow/react 0.9.1 → 0.11.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 (49) hide show
  1. package/CHANGELOG.md +37 -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/spinner/index.d.ts +23 -0
  17. package/dist/src/components/ui/spinner/index.d.ts.map +1 -0
  18. package/dist/src/components/ui/upgrade-dialog/challenge.d.ts +12 -0
  19. package/dist/src/components/ui/upgrade-dialog/challenge.d.ts.map +1 -0
  20. package/dist/src/components/ui/upgrade-dialog/factor-list.d.ts +20 -0
  21. package/dist/src/components/ui/upgrade-dialog/factor-list.d.ts.map +1 -0
  22. package/dist/src/components/ui/upgrade-dialog/index.d.ts +8 -0
  23. package/dist/src/components/ui/upgrade-dialog/index.d.ts.map +1 -0
  24. package/dist/src/components/ui/upgrade-dialog/state-mapping.d.ts +119 -0
  25. package/dist/src/components/ui/upgrade-dialog/state-mapping.d.ts.map +1 -0
  26. package/dist/src/components/ui/upgrade-dialog/status.d.ts +27 -0
  27. package/dist/src/components/ui/upgrade-dialog/status.d.ts.map +1 -0
  28. package/dist/src/components/ui/upgrade-dialog/types.d.ts +188 -0
  29. package/dist/src/components/ui/upgrade-dialog/types.d.ts.map +1 -0
  30. package/dist/src/components/ui/upgrade-dialog/upgrade-dialog.d.ts +13 -0
  31. package/dist/src/components/ui/upgrade-dialog/upgrade-dialog.d.ts.map +1 -0
  32. package/dist/src/context/index.d.ts +1 -0
  33. package/dist/src/context/index.d.ts.map +1 -1
  34. package/dist/src/context/upgrade-context.d.ts +85 -0
  35. package/dist/src/context/upgrade-context.d.ts.map +1 -0
  36. package/dist/src/hooks/index.d.ts +1 -0
  37. package/dist/src/hooks/index.d.ts.map +1 -1
  38. package/dist/src/hooks/use-upgrade.d.ts +43 -0
  39. package/dist/src/hooks/use-upgrade.d.ts.map +1 -0
  40. package/dist/src/index.d.ts +4 -1
  41. package/dist/src/index.d.ts.map +1 -1
  42. package/dist/src/utils/index.d.ts +1 -0
  43. package/dist/src/utils/index.d.ts.map +1 -1
  44. package/dist/src/utils/upgrade-auth.d.ts +38 -0
  45. package/dist/src/utils/upgrade-auth.d.ts.map +1 -0
  46. package/dist/style.css +1 -1
  47. package/package.json +4 -4
  48. package/dist/src/components/flow/upgrade-required-placeholder.d.ts +0 -21
  49. package/dist/src/components/flow/upgrade-required-placeholder.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,43 @@
2
2
 
3
3
  All notable changes to `@passflow/react` are documented in this file.
4
4
 
5
+ ## [0.11.0] - 2026-10-28
6
+
7
+ ### Changed
8
+
9
+ - Requires `@passflow/core` 0.17.0 or later, up from 0.15.0. Nothing in this package's own code changed for it — `useUpgrade`, `UpgradeProvider` and `UpgradeDialog` behave exactly as in 0.10.0, and the one core symbol the provider imports as a value, `requiredAcrLevel`, is unaffected.
10
+
11
+ ### Removed
12
+
13
+ - Twenty-eight names are no longer re-exported. `src/index.ts` carries `export * from '@passflow/core'`, so this package republishes core's entry surface; core withdrew these across 0.16.0 and 0.17.0, and they therefore leave this package's surface too. The published entry goes from 184 exported names to 156.
14
+
15
+ Sixteen upgrade assembly functions, none of which a consumer was meant to call — the step-up flow is driven through `passflow.upgrade` and this package's `useUpgrade`:
16
+ `attachUpgradeAuth`, `barOf`, `coreOutcomeToError`, `createUpgradeClient`, `createUpgradeFacade`, `handleChallenge`, `mergeChallenges`, `parseAcrToken`, `parseMaxAge`, `planReplay`, `readAcrValues`, `readUpgradeChallenge`, `settleAxiosOutcome`, `settleFetchOutcome`, `tagUpgradeOutcome`, `upgradeFetch`.
17
+
18
+ Twelve types that only those functions produced, so no public API could hand a consumer a value of any of them:
19
+ `ChallengeContext`, `ChallengeInput`, `ChallengeReadOptions`, `ChallengeReading`, `CoreOutcome`, `InterceptionScope`, `MaxAgeReading`, `ReplayHints`, `ReplayPlan`, `Settlement`, `UpgradeFacadeDeps`, `UpgradeInterceptorOptions`.
20
+
21
+ `ChallengeChannel` and `UpgradeSessionPin` were part of that second group until review found each is still exposed by a public signature — `UpgradeChallenge.channels` and `AuthService.readSessionPin()` — so both remain exported. Everything the step-up UI needs is unchanged: `classifyUpgradeError`, `requiredAcrLevel`, the `isUpgrade*` predicates, the error classes, `UpgradeChallenge`, `UpgradeFacade` and the factor types.
22
+
23
+ ## [0.10.0] - 2026-10-28
24
+
25
+ ### Added
26
+
27
+ - `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.
28
+ - `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.
29
+ - `Spinner`, with its own story.
30
+ - A `description` prop on the `option` button variant, exposed as an accessible description rather than folded into the name.
31
+
32
+ ### Fixed
33
+
34
+ - 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`.
35
+ - 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.
36
+ - `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.
37
+
38
+ ### Removed
39
+
40
+ - `upgrade-required-placeholder.tsx`, the internal stand-in the real dialog replaces. It was never exported from the package entry.
41
+
5
42
  ## [0.9.1] - 2026-10-26
6
43
 
7
44
  ### Fixed