@passflow/react 0.14.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.
Files changed (377) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +21 -8
  3. package/dist/index.cjs +2 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.es.js +146 -143
  6. package/dist/index.es.js.map +1 -1
  7. package/dist/src/components/error/index.d.cts +7 -0
  8. package/dist/src/components/error/index.d.ts +1 -1
  9. package/dist/src/components/error/index.d.ts.map +1 -1
  10. package/dist/src/components/flow/consent/index.d.cts +13 -0
  11. package/dist/src/components/flow/consent/index.d.ts +1 -1
  12. package/dist/src/components/flow/consent/index.d.ts.map +1 -1
  13. package/dist/src/components/flow/consent/screen.d.cts +9 -0
  14. package/dist/src/components/flow/consent/screen.d.ts +2 -2
  15. package/dist/src/components/flow/consent/screen.d.ts.map +1 -1
  16. package/dist/src/components/flow/device-verify/index.d.cts +10 -0
  17. package/dist/src/components/flow/device-verify/index.d.ts +1 -1
  18. package/dist/src/components/flow/device-verify/index.d.ts.map +1 -1
  19. package/dist/src/components/flow/device-verify/screen.d.cts +4 -0
  20. package/dist/src/components/flow/device-verify/screen.d.ts +2 -2
  21. package/dist/src/components/flow/device-verify/screen.d.ts.map +1 -1
  22. package/dist/src/components/flow/index.d.cts +5 -0
  23. package/dist/src/components/flow/index.d.ts +4 -4
  24. package/dist/src/components/flow/index.d.ts.map +1 -1
  25. package/dist/src/components/flow/passflow/index.d.cts +16 -0
  26. package/dist/src/components/flow/passflow/index.d.ts +5 -1
  27. package/dist/src/components/flow/passflow/index.d.ts.map +1 -1
  28. package/dist/src/components/flow/two-factor-setup/index.d.cts +10 -0
  29. package/dist/src/components/flow/two-factor-setup/index.d.ts +2 -2
  30. package/dist/src/components/flow/two-factor-setup/index.d.ts.map +1 -1
  31. package/dist/src/components/flow/two-factor-setup-magic-link/index.d.cts +35 -0
  32. package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts +2 -2
  33. package/dist/src/components/flow/two-factor-setup-magic-link/index.d.ts.map +1 -1
  34. package/dist/src/components/flow/two-factor-verify/index.d.cts +11 -0
  35. package/dist/src/components/flow/two-factor-verify/index.d.ts +2 -2
  36. package/dist/src/components/flow/two-factor-verify/index.d.ts.map +1 -1
  37. package/dist/src/components/form/forgot-password/forgot-password-success.d.cts +2 -0
  38. package/dist/src/components/form/forgot-password/forgot-password-success.d.ts +1 -1
  39. package/dist/src/components/form/forgot-password/forgot-password-success.d.ts.map +1 -1
  40. package/dist/src/components/form/forgot-password/forgot-password.d.cts +9 -0
  41. package/dist/src/components/form/forgot-password/forgot-password.d.ts +1 -1
  42. package/dist/src/components/form/forgot-password/forgot-password.d.ts.map +1 -1
  43. package/dist/src/components/form/forgot-password/index.d.cts +3 -0
  44. package/dist/src/components/form/forgot-password/index.d.ts +2 -2
  45. package/dist/src/components/form/index.d.cts +10 -0
  46. package/dist/src/components/form/index.d.ts +9 -9
  47. package/dist/src/components/form/index.d.ts.map +1 -1
  48. package/dist/src/components/form/invitation-join/index.d.cts +7 -0
  49. package/dist/src/components/form/invitation-join/index.d.ts +1 -2
  50. package/dist/src/components/form/invitation-join/index.d.ts.map +1 -1
  51. package/dist/src/components/form/reset-password/index.d.cts +9 -0
  52. package/dist/src/components/form/reset-password/index.d.ts +2 -2
  53. package/dist/src/components/form/reset-password/index.d.ts.map +1 -1
  54. package/dist/src/components/form/signin/index.d.cts +15 -0
  55. package/dist/src/components/form/signin/index.d.ts +2 -2
  56. package/dist/src/components/form/signin/index.d.ts.map +1 -1
  57. package/dist/src/components/form/signup/index.d.cts +14 -0
  58. package/dist/src/components/form/signup/index.d.ts +2 -2
  59. package/dist/src/components/form/signup/index.d.ts.map +1 -1
  60. package/dist/src/components/form/two-factor-challenge/index.d.cts +10 -0
  61. package/dist/src/components/form/two-factor-challenge/index.d.ts +1 -1
  62. package/dist/src/components/form/two-factor-challenge/index.d.ts.map +1 -1
  63. package/dist/src/components/form/two-factor-challenge/method-selector.d.cts +12 -0
  64. package/dist/src/components/form/two-factor-challenge/method-selector.d.ts +2 -2
  65. package/dist/src/components/form/two-factor-setup/index.d.cts +2 -0
  66. package/dist/src/components/form/two-factor-setup/index.d.ts +1 -1
  67. package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.cts +9 -0
  68. package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts +1 -1
  69. package/dist/src/components/form/two-factor-setup/two-factor-setup-form.d.ts.map +1 -1
  70. package/dist/src/components/form/two-factor-verify/index.d.cts +3 -0
  71. package/dist/src/components/form/two-factor-verify/index.d.ts +2 -2
  72. package/dist/src/components/form/two-factor-verify/index.d.ts.map +1 -1
  73. package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.cts +13 -0
  74. package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts +1 -1
  75. package/dist/src/components/form/two-factor-verify/two-factor-recovery-form.d.ts.map +1 -1
  76. package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.cts +16 -0
  77. package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts +1 -1
  78. package/dist/src/components/form/two-factor-verify/two-factor-verify-form.d.ts.map +1 -1
  79. package/dist/src/components/form/verify-challenge/index.d.cts +3 -0
  80. package/dist/src/components/form/verify-challenge/index.d.ts +2 -2
  81. package/dist/src/components/form/verify-challenge/timer-button.d.cts +9 -0
  82. package/dist/src/components/form/verify-challenge/timer-button.d.ts +1 -1
  83. package/dist/src/components/form/verify-challenge/timer-button.d.ts.map +1 -1
  84. package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.cts +2 -0
  85. package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.ts +1 -1
  86. package/dist/src/components/form/verify-challenge/verify-challenge-magic-link.d.ts.map +1 -1
  87. package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.cts +16 -0
  88. package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.ts +1 -1
  89. package/dist/src/components/form/verify-challenge/verify-challenge-otp-manual.d.ts.map +1 -1
  90. package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.cts +9 -0
  91. package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.ts +1 -2
  92. package/dist/src/components/form/verify-challenge/verify-challenge-otp-redirect.d.ts.map +1 -1
  93. package/dist/src/components/form/verify-challenge/verify-challenge-otp.d.cts +12 -0
  94. package/dist/src/components/form/verify-challenge/verify-challenge-otp.d.ts +2 -2
  95. package/dist/src/components/form/verify-challenge/verify-challenge-otp.d.ts.map +1 -1
  96. package/dist/src/components/form/verify-challenge/verify-challenge-success.d.cts +3 -0
  97. package/dist/src/components/form/verify-challenge/verify-challenge-success.d.ts +1 -1
  98. package/dist/src/components/form/verify-challenge/verify-challenge-success.d.ts.map +1 -1
  99. package/dist/src/components/form/wrapper/index.d.cts +2 -0
  100. package/dist/src/components/form/wrapper/index.d.ts +1 -1
  101. package/dist/src/components/passkey/index.d.cts +7 -0
  102. package/dist/src/components/passkey/index.d.ts +1 -1
  103. package/dist/src/components/passkey/index.d.ts.map +1 -1
  104. package/dist/src/components/passkey/passkey-actions.d.cts +13 -0
  105. package/dist/src/components/passkey/passkey-actions.d.ts +1 -1
  106. package/dist/src/components/passkey/passkey-actions.d.ts.map +1 -1
  107. package/dist/src/components/passkey/passkey-dialog.d.cts +10 -0
  108. package/dist/src/components/passkey/passkey-dialog.d.ts +1 -1
  109. package/dist/src/components/passkey/passkey-list.d.cts +9 -0
  110. package/dist/src/components/passkey/passkey-list.d.ts +2 -2
  111. package/dist/src/components/passkey/passkey-list.d.ts.map +1 -1
  112. package/dist/src/components/provider/index.d.cts +4 -0
  113. package/dist/src/components/provider/index.d.ts +3 -3
  114. package/dist/src/components/provider/index.d.ts.map +1 -1
  115. package/dist/src/components/provider/passflow-provider.d.cts +160 -0
  116. package/dist/src/components/provider/passflow-provider.d.ts +4 -4
  117. package/dist/src/components/provider/passflow-provider.d.ts.map +1 -1
  118. package/dist/src/components/provider/upgrade-provider.d.cts +85 -0
  119. package/dist/src/components/provider/upgrade-provider.d.ts +39 -3
  120. package/dist/src/components/provider/upgrade-provider.d.ts.map +1 -1
  121. package/dist/src/components/ui/button/index.d.cts +34 -0
  122. package/dist/src/components/ui/button/index.d.ts +3 -2
  123. package/dist/src/components/ui/button/index.d.ts.map +1 -1
  124. package/dist/src/components/ui/continuing-status/index.d.cts +8 -0
  125. package/dist/src/components/ui/continuing-status/index.d.ts +1 -1
  126. package/dist/src/components/ui/country-flag/index.d.cts +7 -0
  127. package/dist/src/components/ui/country-flag/index.d.ts +1 -1
  128. package/dist/src/components/ui/country-flag/index.d.ts.map +1 -1
  129. package/dist/src/components/ui/country-flag/positions.d.cts +245 -0
  130. package/dist/src/components/ui/country-flag/positions.d.ts +241 -241
  131. package/dist/src/components/ui/country-flag/positions.d.ts.map +1 -1
  132. package/dist/src/components/ui/dialog/index.d.cts +20 -0
  133. package/dist/src/components/ui/dialog/index.d.ts +18 -18
  134. package/dist/src/components/ui/dialog/index.d.ts.map +1 -1
  135. package/dist/src/components/ui/fields/field-otp.d.cts +35 -0
  136. package/dist/src/components/ui/fields/field-otp.d.ts +35 -0
  137. package/dist/src/components/ui/fields/field-otp.d.ts.map +1 -0
  138. package/dist/src/components/ui/fields/field-password.d.cts +13 -0
  139. package/dist/src/components/ui/fields/field-password.d.ts +4 -4
  140. package/dist/src/components/ui/fields/field-password.d.ts.map +1 -1
  141. package/dist/src/components/ui/fields/field-phone.d.cts +11 -0
  142. package/dist/src/components/ui/fields/field-phone.d.ts +1 -1
  143. package/dist/src/components/ui/fields/field-phone.d.ts.map +1 -1
  144. package/dist/src/components/ui/fields/field-text.d.cts +8 -0
  145. package/dist/src/components/ui/fields/field-text.d.ts +3 -3
  146. package/dist/src/components/ui/fields/field-text.d.ts.map +1 -1
  147. package/dist/src/components/ui/fields/index.d.cts +5 -0
  148. package/dist/src/components/ui/fields/index.d.ts +4 -3
  149. package/dist/src/components/ui/fields/index.d.ts.map +1 -1
  150. package/dist/src/components/ui/icon/index.d.cts +11 -0
  151. package/dist/src/components/ui/icon/index.d.ts +1 -1
  152. package/dist/src/components/ui/icon/index.d.ts.map +1 -1
  153. package/dist/src/components/ui/index.d.cts +14 -0
  154. package/dist/src/components/ui/index.d.ts +13 -13
  155. package/dist/src/components/ui/index.d.ts.map +1 -1
  156. package/dist/src/components/ui/link/index.d.cts +11 -0
  157. package/dist/src/components/ui/link/index.d.ts +1 -1
  158. package/dist/src/components/ui/link/index.d.ts.map +1 -1
  159. package/dist/src/components/ui/login-screen/code-entry.d.cts +4 -0
  160. package/dist/src/components/ui/login-screen/code-entry.d.ts +2 -2
  161. package/dist/src/components/ui/login-screen/consent.d.cts +15 -0
  162. package/dist/src/components/ui/login-screen/consent.d.ts +2 -2
  163. package/dist/src/components/ui/login-screen/credentials.d.cts +4 -0
  164. package/dist/src/components/ui/login-screen/credentials.d.ts +2 -2
  165. package/dist/src/components/ui/login-screen/credentials.d.ts.map +1 -1
  166. package/dist/src/components/ui/login-screen/device-approval.d.cts +4 -0
  167. package/dist/src/components/ui/login-screen/device-approval.d.ts +2 -2
  168. package/dist/src/components/ui/login-screen/general-error.d.cts +4 -0
  169. package/dist/src/components/ui/login-screen/general-error.d.ts +2 -2
  170. package/dist/src/components/ui/login-screen/index.d.cts +4 -0
  171. package/dist/src/components/ui/login-screen/index.d.ts +3 -3
  172. package/dist/src/components/ui/login-screen/index.d.ts.map +1 -1
  173. package/dist/src/components/ui/login-screen/invitation.d.cts +4 -0
  174. package/dist/src/components/ui/login-screen/invitation.d.ts +2 -2
  175. package/dist/src/components/ui/login-screen/login-screen.d.cts +4 -0
  176. package/dist/src/components/ui/login-screen/login-screen.d.ts +2 -2
  177. package/dist/src/components/ui/login-screen/passkey-progress.d.cts +4 -0
  178. package/dist/src/components/ui/login-screen/passkey-progress.d.ts +2 -2
  179. package/dist/src/components/ui/login-screen/second-factor.d.cts +4 -0
  180. package/dist/src/components/ui/login-screen/second-factor.d.ts +2 -2
  181. package/dist/src/components/ui/login-screen/shared.d.cts +15 -0
  182. package/dist/src/components/ui/login-screen/shared.d.ts +2 -2
  183. package/dist/src/components/ui/login-screen/shell.d.cts +13 -0
  184. package/dist/src/components/ui/login-screen/shell.d.ts +1 -1
  185. package/dist/src/components/ui/login-screen/shell.d.ts.map +1 -1
  186. package/dist/src/components/ui/login-screen/status.d.cts +4 -0
  187. package/dist/src/components/ui/login-screen/status.d.ts +2 -2
  188. package/dist/src/components/ui/login-screen/types.d.cts +192 -0
  189. package/dist/src/components/ui/login-screen/types.d.ts +2 -2
  190. package/dist/src/components/ui/login-screen/types.d.ts.map +1 -1
  191. package/dist/src/components/ui/popover/index.d.cts +7 -0
  192. package/dist/src/components/ui/popover/index.d.ts +5 -5
  193. package/dist/src/components/ui/popover/index.d.ts.map +1 -1
  194. package/dist/src/components/ui/providers-box/index.d.cts +10 -0
  195. package/dist/src/components/ui/providers-box/index.d.ts +2 -2
  196. package/dist/src/components/ui/providers-box/index.d.ts.map +1 -1
  197. package/dist/src/components/ui/spinner/index.d.cts +23 -0
  198. package/dist/src/components/ui/spinner/index.d.ts +1 -1
  199. package/dist/src/components/ui/spinner/index.d.ts.map +1 -1
  200. package/dist/src/components/ui/switch/index.d.cts +22 -0
  201. package/dist/src/components/ui/switch/index.d.ts +1 -1
  202. package/dist/src/components/ui/switch/index.d.ts.map +1 -1
  203. package/dist/src/components/ui/upgrade-dialog/challenge.d.cts +12 -0
  204. package/dist/src/components/ui/upgrade-dialog/challenge.d.ts +2 -2
  205. package/dist/src/components/ui/upgrade-dialog/factor-list.d.cts +20 -0
  206. package/dist/src/components/ui/upgrade-dialog/factor-list.d.ts +2 -2
  207. package/dist/src/components/ui/upgrade-dialog/index.d.cts +8 -0
  208. package/dist/src/components/ui/upgrade-dialog/index.d.ts +7 -7
  209. package/dist/src/components/ui/upgrade-dialog/index.d.ts.map +1 -1
  210. package/dist/src/components/ui/upgrade-dialog/state-mapping.d.cts +130 -0
  211. package/dist/src/components/ui/upgrade-dialog/state-mapping.d.ts +12 -1
  212. package/dist/src/components/ui/upgrade-dialog/state-mapping.d.ts.map +1 -1
  213. package/dist/src/components/ui/upgrade-dialog/status.d.cts +27 -0
  214. package/dist/src/components/ui/upgrade-dialog/status.d.ts +2 -2
  215. package/dist/src/components/ui/upgrade-dialog/types.d.cts +188 -0
  216. package/dist/src/components/ui/upgrade-dialog/upgrade-dialog.d.cts +13 -0
  217. package/dist/src/components/ui/upgrade-dialog/upgrade-dialog.d.ts +2 -2
  218. package/dist/src/components/ui/visually-hidden/index.d.cts +17 -0
  219. package/dist/src/components/ui/visually-hidden/index.d.ts +17 -0
  220. package/dist/src/components/ui/visually-hidden/index.d.ts.map +1 -0
  221. package/dist/src/constants/countries-phone-code.d.cts +253 -0
  222. package/dist/src/constants/countries-phone-code.d.ts.map +1 -1
  223. package/dist/src/constants/formats.d.cts +4 -0
  224. package/dist/src/constants/formats.d.ts.map +1 -1
  225. package/dist/src/constants/index.d.cts +3 -0
  226. package/dist/src/constants/index.d.ts +2 -2
  227. package/dist/src/context/auth-context.d.cts +23 -0
  228. package/dist/src/context/auth-context.d.ts +3 -3
  229. package/dist/src/context/auth-context.d.ts.map +1 -1
  230. package/dist/src/context/index.d.cts +6 -0
  231. package/dist/src/context/index.d.ts +5 -5
  232. package/dist/src/context/index.d.ts.map +1 -1
  233. package/dist/src/context/navigation-context.d.cts +25 -0
  234. package/dist/src/context/navigation-context.d.ts +1 -1
  235. package/dist/src/context/passflow-context.d.cts +26 -0
  236. package/dist/src/context/passflow-context.d.ts +3 -3
  237. package/dist/src/context/passflow-context.d.ts.map +1 -1
  238. package/dist/src/context/router-context.d.cts +42 -0
  239. package/dist/src/context/router-context.d.ts.map +1 -1
  240. package/dist/src/context/upgrade-context.d.cts +107 -0
  241. package/dist/src/context/upgrade-context.d.ts +24 -2
  242. package/dist/src/hocs/index.d.cts +2 -0
  243. package/dist/src/hocs/index.d.ts +1 -1
  244. package/dist/src/hocs/with-error.d.cts +8 -0
  245. package/dist/src/hocs/with-error.d.ts +5 -5
  246. package/dist/src/hocs/with-error.d.ts.map +1 -1
  247. package/dist/src/hooks/index.d.cts +28 -0
  248. package/dist/src/hooks/index.d.ts +27 -27
  249. package/dist/src/hooks/index.d.ts.map +1 -1
  250. package/dist/src/hooks/use-app-settings.d.cts +16 -0
  251. package/dist/src/hooks/use-app-settings.d.ts +1 -1
  252. package/dist/src/hooks/use-app-settings.d.ts.map +1 -1
  253. package/dist/src/hooks/use-auth-cloud-redirect.d.cts +4 -0
  254. package/dist/src/hooks/use-auth.d.cts +3 -0
  255. package/dist/src/hooks/use-auth.d.ts +1 -1
  256. package/dist/src/hooks/use-auth.d.ts.map +1 -1
  257. package/dist/src/hooks/use-consent.d.cts +68 -0
  258. package/dist/src/hooks/use-device-verify.d.cts +96 -0
  259. package/dist/src/hooks/use-device-verify.d.ts +1 -1
  260. package/dist/src/hooks/use-device-verify.d.ts.map +1 -1
  261. package/dist/src/hooks/use-forgot-password.d.cts +10 -0
  262. package/dist/src/hooks/use-forgot-password.d.ts +1 -1
  263. package/dist/src/hooks/use-join-invite.d.cts +8 -0
  264. package/dist/src/hooks/use-logout.d.cts +8 -0
  265. package/dist/src/hooks/use-navigation.d.cts +29 -0
  266. package/dist/src/hooks/use-navigation.d.ts +2 -2
  267. package/dist/src/hooks/use-navigation.d.ts.map +1 -1
  268. package/dist/src/hooks/use-outsideclick.d.cts +3 -0
  269. package/dist/src/hooks/use-outsideclick.d.ts +2 -2
  270. package/dist/src/hooks/use-outsideclick.d.ts.map +1 -1
  271. package/dist/src/hooks/use-passflow-store.d.cts +3 -0
  272. package/dist/src/hooks/use-passflow-store.d.ts +1 -1
  273. package/dist/src/hooks/use-passflow.d.cts +3 -0
  274. package/dist/src/hooks/use-passflow.d.ts +1 -1
  275. package/dist/src/hooks/use-passflow.d.ts.map +1 -1
  276. package/dist/src/hooks/use-passwordless-complete.d.cts +10 -0
  277. package/dist/src/hooks/use-passwordless-complete.d.ts +1 -1
  278. package/dist/src/hooks/use-passwordless-complete.d.ts.map +1 -1
  279. package/dist/src/hooks/use-provider.d.cts +7 -0
  280. package/dist/src/hooks/use-provider.d.ts +1 -1
  281. package/dist/src/hooks/use-provider.d.ts.map +1 -1
  282. package/dist/src/hooks/use-reset-password.d.cts +9 -0
  283. package/dist/src/hooks/use-session-expired.d.cts +49 -0
  284. package/dist/src/hooks/use-signin.d.cts +11 -0
  285. package/dist/src/hooks/use-signin.d.ts +2 -2
  286. package/dist/src/hooks/use-signin.d.ts.map +1 -1
  287. package/dist/src/hooks/use-signup.d.cts +11 -0
  288. package/dist/src/hooks/use-signup.d.ts +2 -2
  289. package/dist/src/hooks/use-signup.d.ts.map +1 -1
  290. package/dist/src/hooks/use-trusted-devices.d.cts +21 -0
  291. package/dist/src/hooks/use-trusted-devices.d.ts +1 -1
  292. package/dist/src/hooks/use-two-factor-challenge.d.cts +16 -0
  293. package/dist/src/hooks/use-two-factor-challenge.d.ts +1 -1
  294. package/dist/src/hooks/use-two-factor-manage.d.cts +15 -0
  295. package/dist/src/hooks/use-two-factor-manage.d.ts +1 -1
  296. package/dist/src/hooks/use-two-factor-methods.d.cts +14 -0
  297. package/dist/src/hooks/use-two-factor-methods.d.ts +1 -1
  298. package/dist/src/hooks/use-two-factor-setup-magic-link.d.cts +55 -0
  299. package/dist/src/hooks/use-two-factor-setup-magic-link.d.ts.map +1 -1
  300. package/dist/src/hooks/use-two-factor-setup.d.cts +18 -0
  301. package/dist/src/hooks/use-two-factor-setup.d.ts +1 -1
  302. package/dist/src/hooks/use-two-factor-status.d.cts +13 -0
  303. package/dist/src/hooks/use-two-factor-status.d.ts +1 -1
  304. package/dist/src/hooks/use-two-factor-verify.d.cts +20 -0
  305. package/dist/src/hooks/use-two-factor-verify.d.ts +2 -2
  306. package/dist/src/hooks/use-two-factor-verify.d.ts.map +1 -1
  307. package/dist/src/hooks/use-upgrade.d.cts +53 -0
  308. package/dist/src/hooks/use-upgrade.d.ts +12 -2
  309. package/dist/src/hooks/use-upgrade.d.ts.map +1 -1
  310. package/dist/src/hooks/use-user-passkeys.d.cts +12 -0
  311. package/dist/src/hooks/use-user-passkeys.d.ts +1 -1
  312. package/dist/src/index.d.cts +10 -0
  313. package/dist/src/index.d.ts +8 -8
  314. package/dist/src/index.d.ts.map +1 -1
  315. package/dist/src/types/auth-errors.d.cts +8 -0
  316. package/dist/src/types/device-errors.d.cts +95 -0
  317. package/dist/src/types/index.d.cts +26 -0
  318. package/dist/src/types/index.d.ts +4 -4
  319. package/dist/src/types/index.d.ts.map +1 -1
  320. package/dist/src/types/two-factor-errors.d.cts +14 -0
  321. package/dist/src/utils/auth-error.d.cts +7 -0
  322. package/dist/src/utils/auth-error.d.ts +1 -1
  323. package/dist/src/utils/auth-error.d.ts.map +1 -1
  324. package/dist/src/utils/classify-device-error.d.cts +35 -0
  325. package/dist/src/utils/classify-device-error.d.ts +1 -1
  326. package/dist/src/utils/classify-device-error.d.ts.map +1 -1
  327. package/dist/src/utils/classify-two-factor-error.d.cts +13 -0
  328. package/dist/src/utils/classify-two-factor-error.d.ts +1 -1
  329. package/dist/src/utils/cn.d.cts +3 -0
  330. package/dist/src/utils/cn.d.ts +1 -1
  331. package/dist/src/utils/cn.d.ts.map +1 -1
  332. package/dist/src/utils/dayjs/format.d.cts +8 -0
  333. package/dist/src/utils/dayjs/format.d.ts.map +1 -1
  334. package/dist/src/utils/dayjs/index.d.cts +2 -0
  335. package/dist/src/utils/dayjs/index.d.ts +1 -1
  336. package/dist/src/utils/get-app-version.d.cts +7 -0
  337. package/dist/src/utils/get-auth-methods.d.cts +30 -0
  338. package/dist/src/utils/get-auth-methods.d.ts +1 -1
  339. package/dist/src/utils/get-auth-methods.d.ts.map +1 -1
  340. package/dist/src/utils/get-form-labels.d.cts +10 -0
  341. package/dist/src/utils/get-form-labels.d.ts +5 -5
  342. package/dist/src/utils/get-form-labels.d.ts.map +1 -1
  343. package/dist/src/utils/get-url-errors.d.cts +5 -0
  344. package/dist/src/utils/get-url-errors.d.ts.map +1 -1
  345. package/dist/src/utils/get-url-with-tokens.d.cts +4 -0
  346. package/dist/src/utils/get-url-with-tokens.d.ts +1 -1
  347. package/dist/src/utils/get-url-with-tokens.d.ts.map +1 -1
  348. package/dist/src/utils/index.d.cts +18 -0
  349. package/dist/src/utils/index.d.ts +17 -17
  350. package/dist/src/utils/index.d.ts.map +1 -1
  351. package/dist/src/utils/invitation-auth-chrome.d.cts +8 -0
  352. package/dist/src/utils/invitation-auth-chrome.d.ts.map +1 -1
  353. package/dist/src/utils/login-theme.d.cts +8 -0
  354. package/dist/src/utils/login-theme.d.ts +1 -1
  355. package/dist/src/utils/login-theme.d.ts.map +1 -1
  356. package/dist/src/utils/second-factor.d.cts +21 -0
  357. package/dist/src/utils/second-factor.d.ts +3 -3
  358. package/dist/src/utils/second-factor.d.ts.map +1 -1
  359. package/dist/src/utils/two-factor-loop-prevention.d.cts +40 -0
  360. package/dist/src/utils/two-factor-loop-prevention.d.ts.map +1 -1
  361. package/dist/src/utils/undefined-on-catch.d.cts +2 -0
  362. package/dist/src/utils/upgrade-auth.d.cts +82 -0
  363. package/dist/src/utils/upgrade-auth.d.ts +45 -1
  364. package/dist/src/utils/upgrade-auth.d.ts.map +1 -1
  365. package/dist/src/utils/url-params.d.cts +14 -0
  366. package/dist/src/utils/url-params.d.ts.map +1 -1
  367. package/dist/src/utils/validate-url.d.cts +2 -0
  368. package/dist/src/utils/validate-url.d.ts.map +1 -1
  369. package/dist/src/utils/validation-schemas/index.d.cts +6 -0
  370. package/dist/src/utils/validation-schemas/index.d.ts +1 -1
  371. package/dist/src/utils/validation-schemas/index.d.ts.map +1 -1
  372. package/dist/style.css +1 -1
  373. package/package.json +53 -55
  374. package/dist/index.cjs.js +0 -2
  375. package/dist/index.cjs.js.map +0 -1
  376. package/dist/src/components/form/two-factor-challenge/otp-input.d.ts +0 -12
  377. 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2P9B,CAAC"}
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"}
@@ -0,0 +1,4 @@
1
+ export declare const FORMATS: {
2
+ fullMonthDayYear: string;
3
+ };
4
+ //# sourceMappingURL=formats.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"formats.d.ts","sourceRoot":"","sources":["../../../src/constants/formats.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
1
+ {"version":3,"file":"formats.d.ts","sourceRoot":"","sources":["../../../src/constants/formats.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;IAClB,gBAAgB;CACjB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { countriesPhoneCode } from './countries-phone-code.cjs';
2
+ export { FORMATS } from './formats.cjs';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -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 { default as React, FC, PropsWithChildren } from 'react';
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: React.Context<AuthContextValue | undefined>;
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,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAmD,MAAM,OAAO,CAAC;AAGhH,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,6CAAyD,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
+ {"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"}
@@ -0,0 +1,6 @@
1
+ export * from './auth-context.cjs';
2
+ export * from './navigation-context.cjs';
3
+ export * from './passflow-context.cjs';
4
+ export * from './router-context.cjs';
5
+ export * from './upgrade-context.cjs';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
- export * from './passflow-context';
2
- export * from './router-context';
3
- export * from './navigation-context';
4
- export * from './auth-context';
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,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,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