@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,53 @@
1
+ /**
2
+ * `useUpgrade` — the read side of the assurance-upgrade flow (§8.2, §13.3).
3
+ *
4
+ * It **reads `UpgradeContext` and installs nothing**. Installation belongs to
5
+ * `UpgradeProvider` and only to it: two hooks each installing a prompt handler
6
+ * would open two prompts and defeat single-flight.
7
+ *
8
+ * Outside an `UpgradeProvider` it returns `status: 'idle'` with no-op actions
9
+ * rather than throwing (§9.5 H8).
10
+ */
11
+ import type { AssuranceBar, UpgradeChallenge, UpgradeFactor, UpgradeFactorType } from '@passflow/core';
12
+ import { type UpgradeElevateOptions, type UpgradeErrorStatusKind, type UpgradeHookState, type UpgradeSettledState } from '../context/upgrade-context.cjs';
13
+ export type UseUpgradeResult = {
14
+ /** True when an `UpgradeProvider` installed a prompt handler. */
15
+ enabled: boolean;
16
+ /** The whole state, as the discriminated union (§13.5's `UpgradeHookState`). */
17
+ state: UpgradeHookState;
18
+ /** The discriminant, for the common `status === 'challenged'` read. */
19
+ status: UpgradeHookState['status'];
20
+ /** What the server demanded — the MERGED requirement when challenges joined. */
21
+ challenge: UpgradeChallenge | null;
22
+ /** Usable factors, already ranked; index 0 is the suggested one. */
23
+ factors: readonly UpgradeFactor[];
24
+ /** The ranked factor types, which is what `UpgradeHookState.challenged` carries. */
25
+ factorTypes: readonly UpgradeFactorType[];
26
+ selectedFactor: UpgradeFactorType | null;
27
+ /**
28
+ * Elevated, and still not enough: the replay was re-challenged (§13.4).
29
+ * Non-null **only** in the `insufficient` state, and it never coexists with
30
+ * `status === 'success'` — this must not read as success.
31
+ */
32
+ insufficient: {
33
+ obtained: AssuranceBar;
34
+ required: AssuranceBar;
35
+ } | null;
36
+ /** The terminal failure, in the `error` state only. */
37
+ error: Error | null;
38
+ /** Which failure class, in the `error` state only. */
39
+ errorKind: UpgradeErrorStatusKind | null;
40
+ /** The previous attempt's failure while the prompt is re-shown (a wrong code). */
41
+ previousError: Error | null;
42
+ /** True while a ceremony is on the wire. */
43
+ busy: boolean;
44
+ /** The factor-selection signal — §13.2's late-join boundary (T3). */
45
+ selectFactor: (factor: UpgradeFactorType) => void;
46
+ submit: (code?: string) => void;
47
+ cancel: () => void;
48
+ dismiss: () => void;
49
+ /** Resolves `null` on cancellation; otherwise the flight's terminal state. */
50
+ elevate: (options?: UpgradeElevateOptions) => Promise<UpgradeSettledState | null>;
51
+ };
52
+ export declare const useUpgrade: () => UseUpgradeResult;
53
+ //# sourceMappingURL=use-upgrade.d.ts.map
@@ -1,5 +1,15 @@
1
- import { UpgradeElevateOptions, UpgradeErrorStatusKind, UpgradeHookState, UpgradeSettledState } from '../context/upgrade-context';
2
- import { AssuranceBar, UpgradeChallenge, UpgradeFactor, UpgradeFactorType } from '@passflow/core';
1
+ /**
2
+ * `useUpgrade` — the read side of the assurance-upgrade flow (§8.2, §13.3).
3
+ *
4
+ * It **reads `UpgradeContext` and installs nothing**. Installation belongs to
5
+ * `UpgradeProvider` and only to it: two hooks each installing a prompt handler
6
+ * would open two prompts and defeat single-flight.
7
+ *
8
+ * Outside an `UpgradeProvider` it returns `status: 'idle'` with no-op actions
9
+ * rather than throwing (§9.5 H8).
10
+ */
11
+ import type { AssuranceBar, UpgradeChallenge, UpgradeFactor, UpgradeFactorType } from '@passflow/core';
12
+ import { type UpgradeElevateOptions, type UpgradeErrorStatusKind, type UpgradeHookState, type UpgradeSettledState } from '../context/upgrade-context.js';
3
13
  export type UseUpgradeResult = {
4
14
  /** True when an `UpgradeProvider` installed a prompt handler. */
5
15
  enabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"use-upgrade.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-upgrade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EAErB,KAAK,mBAAmB,EACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,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,8EAA8E;IAC9E,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,qBAAqB,KAAK,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;CACnF,CAAC;AAOF,eAAO,MAAM,UAAU,QAAO,gBA2B7B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { PassflowUserPasskey } from '@passflow/core';
2
+ export type UseUserPasskeysProps = () => {
3
+ data: PassflowUserPasskey[];
4
+ createUserPasskey: (relaingPartyId: string) => Promise<void>;
5
+ editUserPasskey: (newName: string, passkeyId: string) => Promise<void>;
6
+ deleteUserPasskey: (passkeyId: string) => Promise<void>;
7
+ isLoading: boolean;
8
+ isError: boolean;
9
+ errorMessage: string;
10
+ };
11
+ export declare const useUserPasskeys: UseUserPasskeysProps;
12
+ //# sourceMappingURL=use-user-passkeys.d.ts.map
@@ -1,4 +1,4 @@
1
- import { PassflowUserPasskey } from '@passflow/core';
1
+ import type { PassflowUserPasskey } from '@passflow/core';
2
2
  export type UseUserPasskeysProps = () => {
3
3
  data: PassflowUserPasskey[];
4
4
  createUserPasskey: (relaingPartyId: string) => Promise<void>;
@@ -0,0 +1,10 @@
1
+ export * from '@passflow/core';
2
+ export * from './components/flow/index.cjs';
3
+ export * from './components/form/index.cjs';
4
+ export type { PassflowUpgradeOptions, UpgradeProviderProps } from './components/provider/index.cjs';
5
+ export { PassflowProvider, UpgradeProvider } from './components/provider/index.cjs';
6
+ export * from './components/ui/index.cjs';
7
+ export { INERT_UPGRADE_CONTEXT, UpgradeContext, type UpgradeContextValue, type UpgradeElevateOptions, type UpgradeErrorStatusKind, type UpgradeHookState, type UpgradePromptView, type UpgradeSettledState, } from './context/upgrade-context.cjs';
8
+ export * from './hooks/index.cjs';
9
+ export { attachAuth, withAuth } from './utils/upgrade-auth.cjs';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -1,10 +1,10 @@
1
- export * from './components/flow';
2
- export * from './components/form';
3
- export * from './components/ui';
4
- export { PassflowProvider, UpgradeProvider } from './components/provider';
5
- export type { UpgradeProviderProps, PassflowUpgradeOptions } from './components/provider';
6
- export { UpgradeContext, INERT_UPGRADE_CONTEXT, type UpgradeContextValue, type UpgradeElevateOptions, type UpgradeErrorStatusKind, type UpgradeHookState, type UpgradePromptView, type UpgradeSettledState, } from './context/upgrade-context';
7
- export { withAuth, attachAuth } from './utils/upgrade-auth';
8
- export * from './hooks';
9
1
  export * from '@passflow/core';
2
+ export * from './components/flow/index.js';
3
+ export * from './components/form/index.js';
4
+ export type { PassflowUpgradeOptions, UpgradeProviderProps } from './components/provider/index.js';
5
+ export { PassflowProvider, UpgradeProvider } from './components/provider/index.js';
6
+ export * from './components/ui/index.js';
7
+ export { INERT_UPGRADE_CONTEXT, UpgradeContext, type UpgradeContextValue, type UpgradeElevateOptions, type UpgradeErrorStatusKind, type UpgradeHookState, type UpgradePromptView, type UpgradeSettledState, } from './context/upgrade-context.js';
8
+ export * from './hooks/index.js';
9
+ export { attachAuth, withAuth } from './utils/upgrade-auth.js';
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AAEjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC1E,YAAY,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE1F,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC5D,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AAEjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,YAAY,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC1E,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,2BAA2B,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export type AuthErrorScope = 'form' | 'identity' | 'password' | 'credentials';
2
+ export type AuthUiError = {
3
+ message: string;
4
+ scope: AuthErrorScope;
5
+ };
6
+ export type AuthOperation = 'password' | 'passwordless' | 'passkey';
7
+ export type AuthFlow = 'sign-in' | 'sign-up';
8
+ //# sourceMappingURL=auth-errors.d.ts.map
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Error taxonomy for the RFC 8628 device verification flow.
3
+ *
4
+ * ── The rule this file exists to enforce ────────────────────────────────────
5
+ * The person on this screen has just scanned a QR code with their phone and is
6
+ * deciding whether to hand a terminal a token. They are not debugging us. So:
7
+ *
8
+ * the message a user reads is NEVER a string we did not write for them.
9
+ *
10
+ * Not the browser's. Not the server's `error_description`. Not an exception's
11
+ * `.message`. Those are written for operators and they leak — the screen this
12
+ * taxonomy replaced did `err.message ?? 'Something went wrong'` and duly showed
13
+ * a real user:
14
+ *
15
+ * "Resident credentials or empty 'allowCredentials' lists are not
16
+ * supported at this time."
17
+ *
18
+ * — a Chrome/CDP internal, about a spec feature, in the middle of a sign-in.
19
+ *
20
+ * The technical string is not thrown away; it is just demoted. It rides along
21
+ * in `detail`, which the UI logs to the console and may offer behind a
22
+ * "details" affordance, and which the server also has in its own logs. Diagnosis
23
+ * keeps everything. The user keeps their sentence.
24
+ */
25
+ /**
26
+ * The closed set of things that can go wrong on the verification page, at the
27
+ * granularity a USER can act on.
28
+ *
29
+ * Deliberately coarser than the causes. Several distinct WebAuthn failures
30
+ * collapse into `passkey_failed` because the remedy is identical ("try again or
31
+ * use another method") and because the browser itself refuses to distinguish
32
+ * them — Chrome reports "you cancelled", "you timed out" and "there is no
33
+ * credential here" all as NotAllowedError, on purpose, so that a page cannot use
34
+ * the ceremony as an oracle for which accounts exist on a device. Inventing a
35
+ * finer story for the user than the browser told us would mean guessing.
36
+ */
37
+ export type DeviceErrorType =
38
+ /** No user_code supplied yet — show the code entry form, not an error. */
39
+ 'code_required'
40
+ /** The code is wrong, malformed, or names nothing. */
41
+ | 'code_invalid'
42
+ /** The code was real and has expired. */
43
+ | 'code_expired'
44
+ /** This request was already declined. */
45
+ | 'code_declined'
46
+ /** Already approved — the terminal already has what it needs. */
47
+ | 'code_already_approved'
48
+ /** RFC 8628 §5.1 budget spent. */
49
+ | 'too_many_attempts'
50
+ /** The app owner has this sign-in mode switched off. Renders the refusal. */
51
+ | 'mode_disabled'
52
+ /** The requesting app is gone, or its sign-in method is not configured. */
53
+ | 'app_unavailable'
54
+ /** Wrong email or password. */
55
+ | 'bad_credentials'
56
+ /** The form was submitted empty. */
57
+ | 'missing_credentials'
58
+ /** The second-factor code is wrong. */
59
+ | 'second_factor_invalid'
60
+ /** The second-factor form was submitted empty. */
61
+ | 'missing_second_factor'
62
+ /** The account is blocked. */
63
+ | 'account_blocked'
64
+ /** The passkey ceremony did not complete: cancelled, timed out, or none found. */
65
+ | 'passkey_failed'
66
+ /** This browser/authenticator cannot do this passkey sign-in at all. */
67
+ | 'passkey_unsupported'
68
+ /** We could not reach the server. */
69
+ | 'offline'
70
+ /** Anything else — including every technical failure the user cannot act on. */
71
+ | 'generic';
72
+ /**
73
+ * A classified failure: one sentence for the human, everything else for us.
74
+ */
75
+ export type DeviceError = {
76
+ type: DeviceErrorType;
77
+ /**
78
+ * Plain, human, safe to render. Written by us, for this screen. Never
79
+ * interpolated from an exception or a server description.
80
+ */
81
+ message: string;
82
+ /**
83
+ * The technical string — an exception message, a server `error_description`,
84
+ * a DOMException name. For the console, a collapsed details affordance, and
85
+ * bug reports. MUST NOT be shown as the primary message.
86
+ */
87
+ detail?: string;
88
+ /**
89
+ * Whether trying again on this page could plausibly work. Drives whether a
90
+ * retry control is offered: `false` means the page must not invite the user
91
+ * to bang on it (an expired code will never become unexpired here).
92
+ */
93
+ isRecoverable: boolean;
94
+ };
95
+ //# sourceMappingURL=device-errors.d.ts.map
@@ -0,0 +1,26 @@
1
+ export type PreferIdentity = 'identity' | 'phone' | 'none';
2
+ export type DefaultMethod = 'email_or_username' | 'phone';
3
+ export type PreferChallenge = 'passkey' | 'password' | 'otp' | 'magic_link';
4
+ export type SuccessAuthRedirect = string;
5
+ export type { RegisteredTwoFactorMethod, TwoFactorChallengeResponse, TwoFactorMethod, TwoFactorVerifyRequestV2, TwoFactorVerifyResponseV2, } from '@passflow/core';
6
+ export type { AuthErrorScope, AuthFlow, AuthOperation, AuthUiError } from './auth-errors.cjs';
7
+ export type { DeviceError, DeviceErrorType } from './device-errors.cjs';
8
+ export type { TwoFactorError, TwoFactorErrorType } from './two-factor-errors.cjs';
9
+ export interface UseTwoFactorChallengeReturn {
10
+ challenge: import('@passflow/core').TwoFactorChallengeResponse | null;
11
+ isLoading: boolean;
12
+ error: Error | null;
13
+ requestChallenge: (firstFactorMethod?: string) => Promise<void>;
14
+ verify: (response: string, trustDevice?: boolean) => Promise<void>;
15
+ switchMethod: (method: import('@passflow/core').TwoFactorMethod) => Promise<void>;
16
+ selectedMethod: import('@passflow/core').TwoFactorMethod | null;
17
+ }
18
+ export interface UseTwoFactorMethodsReturn {
19
+ availableMethods: import('@passflow/core').TwoFactorMethod[];
20
+ registeredMethods: import('@passflow/core').RegisteredTwoFactorMethod[];
21
+ isLoading: boolean;
22
+ error: Error | null;
23
+ refresh: () => Promise<void>;
24
+ removeMethod: (methodId: string) => Promise<void>;
25
+ }
26
+ //# sourceMappingURL=index.d.ts.map
@@ -2,10 +2,10 @@ export type PreferIdentity = 'identity' | 'phone' | 'none';
2
2
  export type DefaultMethod = 'email_or_username' | 'phone';
3
3
  export type PreferChallenge = 'passkey' | 'password' | 'otp' | 'magic_link';
4
4
  export type SuccessAuthRedirect = string;
5
- export type { TwoFactorErrorType, TwoFactorError } from './two-factor-errors';
6
- export type { DeviceErrorType, DeviceError } from './device-errors';
7
- export type { AuthErrorScope, AuthFlow, AuthOperation, AuthUiError } from './auth-errors';
8
- export type { TwoFactorMethod, TwoFactorChallengeResponse, RegisteredTwoFactorMethod, TwoFactorVerifyRequestV2, TwoFactorVerifyResponseV2, } from '@passflow/core';
5
+ export type { RegisteredTwoFactorMethod, TwoFactorChallengeResponse, TwoFactorMethod, TwoFactorVerifyRequestV2, TwoFactorVerifyResponseV2, } from '@passflow/core';
6
+ export type { AuthErrorScope, AuthFlow, AuthOperation, AuthUiError } from './auth-errors.js';
7
+ export type { DeviceError, DeviceErrorType } from './device-errors.js';
8
+ export type { TwoFactorError, TwoFactorErrorType } from './two-factor-errors.js';
9
9
  export interface UseTwoFactorChallengeReturn {
10
10
  challenge: import('@passflow/core').TwoFactorChallengeResponse | null;
11
11
  isLoading: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,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,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClF,cAAc,EAAE,OAAO,gBAAgB,EAAE,eAAe,GAAG,IAAI,CAAC;CACjE;AAED,MAAM,WAAW,yBAAyB;IACxC,gBAAgB,EAAE,OAAO,gBAAgB,EAAE,eAAe,EAAE,CAAC;IAC7D,iBAAiB,EAAE,OAAO,gBAAgB,EAAE,yBAAyB,EAAE,CAAC;IACxE,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Types of 2FA errors with different handling strategies
3
+ */
4
+ export type TwoFactorErrorType = 'expired' | 'not_enabled' | 'invalid_code' | 'generic';
5
+ /**
6
+ * Structured error information for 2FA errors
7
+ */
8
+ export type TwoFactorError = {
9
+ type: TwoFactorErrorType;
10
+ message: string;
11
+ isRecoverable: boolean;
12
+ shouldAutoRedirect: boolean;
13
+ };
14
+ //# sourceMappingURL=two-factor-errors.d.ts.map
@@ -0,0 +1,7 @@
1
+ import type { AuthFlow, AuthOperation, AuthUiError } from '../types/index.cjs';
2
+ export declare const authRedirectErrorMessage = "We couldn't continue this authentication request. Return to the app and try again.";
3
+ export declare const verificationLinkErrorMessage = "This verification link is invalid or incomplete. Request a new link or code and try again.";
4
+ export declare const invitationLinkErrorMessage = "This invitation link is invalid or has expired.";
5
+ export declare const verificationRequestErrorMessage = "This verification request is no longer available. Start again to request a new link or code.";
6
+ export declare const authErrorFor: (flow: AuthFlow, operation: AuthOperation) => AuthUiError;
7
+ //# sourceMappingURL=auth-error.d.ts.map
@@ -1,4 +1,4 @@
1
- import { AuthFlow, AuthOperation, AuthUiError } from '../types';
1
+ import type { AuthFlow, AuthOperation, AuthUiError } from '../types/index.js';
2
2
  export declare const authRedirectErrorMessage = "We couldn't continue this authentication request. Return to the app and try again.";
3
3
  export declare const verificationLinkErrorMessage = "This verification link is invalid or incomplete. Request a new link or code and try again.";
4
4
  export declare const invitationLinkErrorMessage = "This invitation link is invalid or has expired.";
@@ -1 +1 @@
1
- {"version":3,"file":"auth-error.d.ts","sourceRoot":"","sources":["../../../src/utils/auth-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiCpE,eAAO,MAAM,wBAAwB,uFAAuF,CAAC;AAE7H,eAAO,MAAM,4BAA4B,+FACqD,CAAC;AAE/F,eAAO,MAAM,0BAA0B,oDAAoD,CAAC;AAE5F,eAAO,MAAM,+BAA+B,iGACoD,CAAC;AAEjG,eAAO,MAAM,YAAY,GAAI,MAAM,QAAQ,EAAE,WAAW,aAAa,KAAG,WAA+C,CAAC"}
1
+ {"version":3,"file":"auth-error.d.ts","sourceRoot":"","sources":["../../../src/utils/auth-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiCpE,eAAO,MAAM,wBAAwB,uFAAuF,CAAC;AAE7H,eAAO,MAAM,4BAA4B,+FACqD,CAAC;AAE/F,eAAO,MAAM,0BAA0B,oDAAoD,CAAC;AAE5F,eAAO,MAAM,+BAA+B,iGACoD,CAAC;AAEjG,eAAO,MAAM,YAAY,SAAU,QAAQ,aAAa,aAAa,KAAG,WAA+C,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { DeviceError, DeviceErrorType } from '../types/device-errors.cjs';
2
+ /**
3
+ * An error carrying a server-supplied reason code. Thrown by the device API
4
+ * client so the classifier can map precisely rather than sniff strings.
5
+ */
6
+ export declare class DeviceApiError extends Error {
7
+ /** Stable machine reason from the server. */
8
+ readonly reason: string;
9
+ /** The OAuth2 error code (`invalid_request`, `unauthorized_client`, ...). */
10
+ readonly code: string;
11
+ /** HTTP status. */
12
+ readonly status: number;
13
+ constructor(params: {
14
+ reason: string;
15
+ code: string;
16
+ status: number;
17
+ description: string;
18
+ });
19
+ }
20
+ /**
21
+ * Classify any failure from the device verification flow.
22
+ *
23
+ * Order matters: the server's own reason wins when we have one (it knows more
24
+ * than we can infer), then WebAuthn's message text, then WebAuthn's name, then
25
+ * the network, then a safe default. Every path ends in copy from
26
+ * DEVICE_ERROR_COPY — there is deliberately no branch that forwards a raw
27
+ * string to `message`.
28
+ */
29
+ export declare function classifyDeviceError(err: unknown): DeviceError;
30
+ /**
31
+ * The copy for a type, without an error to classify. For states that are known
32
+ * up front rather than thrown — e.g. a browser with no WebAuthn at all.
33
+ */
34
+ export declare function deviceErrorOfType(type: DeviceErrorType, detail?: string): DeviceError;
35
+ //# sourceMappingURL=classify-device-error.d.ts.map
@@ -1,4 +1,4 @@
1
- import { DeviceError, DeviceErrorType } from '../types/device-errors';
1
+ import type { DeviceError, DeviceErrorType } from '../types/device-errors.js';
2
2
  /**
3
3
  * An error carrying a server-supplied reason code. Thrown by the device API
4
4
  * client so the classifier can map precisely rather than sniff strings.
@@ -1 +1 @@
1
- {"version":3,"file":"classify-device-error.d.ts","sourceRoot":"","sources":["../../../src/utils/classify-device-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA+I1E;;;GAGG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mBAAmB;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE;CAS1F;AAYD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,WAAW,CAmC7D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,CAErF"}
1
+ {"version":3,"file":"classify-device-error.d.ts","sourceRoot":"","sources":["../../../src/utils/classify-device-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA+I1E;;;GAGG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mBAAmB;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,YAAY,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAQxF;CACF;AAYD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,WAAW,CAmC7D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,CAErF"}
@@ -0,0 +1,13 @@
1
+ import type { TwoFactorError } from '../types/two-factor-errors.cjs';
2
+ /**
3
+ * Classify 2FA error based on error message
4
+ *
5
+ * @param errorMessage - Error message from SDK
6
+ * @returns Classified error with handling strategy
7
+ */
8
+ export declare function classifyTwoFactorError(errorMessage: string): TwoFactorError;
9
+ /**
10
+ * Get user-friendly error message based on error type
11
+ */
12
+ export declare function getUserFriendlyErrorMessage(error: TwoFactorError): string;
13
+ //# sourceMappingURL=classify-two-factor-error.d.ts.map
@@ -1,4 +1,4 @@
1
- import { TwoFactorError } from '../types/two-factor-errors';
1
+ import type { TwoFactorError } from '../types/two-factor-errors.js';
2
2
  /**
3
3
  * Classify 2FA error based on error message
4
4
  *
@@ -0,0 +1,3 @@
1
+ import { type ClassValue } from 'clsx';
2
+ export declare const cn: (...classes: ClassValue[]) => string;
3
+ //# sourceMappingURL=cn.d.ts.map
@@ -1,3 +1,3 @@
1
- import { ClassValue } from 'clsx';
1
+ import { type ClassValue } from 'clsx';
2
2
  export declare const cn: (...classes: ClassValue[]) => string;
3
3
  //# sourceMappingURL=cn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,eAAO,MAAM,EAAE,GAAI,GAAG,SAAS,UAAU,EAAE,WAA2B,CAAC"}
1
+ {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../../src/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAa,EAAE,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,eAAO,MAAM,EAAE,eAAgB,UAAU,EAAE,WAA2B,CAAC"}
@@ -0,0 +1,8 @@
1
+ declare const stringByFields: {
2
+ last_used: string;
3
+ default: string;
4
+ };
5
+ export declare const formatDateToString: (date: Date | string, format: string) => string;
6
+ export declare const usedFieldString: (date: Date | string, field: keyof typeof stringByFields) => string;
7
+ export {};
8
+ //# sourceMappingURL=format.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/utils/dayjs/format.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,cAAc;;;CAGnB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,MAAM,IAAI,GAAG,MAAM,EAAE,QAAQ,MAAM,KAAG,MAAoC,CAAC;AAC9G,eAAO,MAAM,eAAe,GAAI,MAAM,IAAI,GAAG,MAAM,EAAE,OAAO,MAAM,OAAO,cAAc,KAAG,MAOzF,CAAC"}
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../src/utils/dayjs/format.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,cAAc;IAClB,SAAS;IACT,OAAO;CACR,CAAC;AAEF,eAAO,MAAM,kBAAkB,SAAU,IAAI,GAAG,MAAM,UAAU,MAAM,KAAG,MAAoC,CAAC;AAC9G,eAAO,MAAM,eAAe,SAAU,IAAI,GAAG,MAAM,SAAS,MAAM,OAAO,cAAc,KAAG,MAOzF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './format.cjs';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './format';
1
+ export * from './format.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,7 @@
1
+ declare global {
2
+ interface Window {
3
+ passflowReactAppVersion: () => void;
4
+ }
5
+ }
6
+ export {};
7
+ //# sourceMappingURL=get-app-version.d.ts.map
@@ -0,0 +1,30 @@
1
+ import type { AuthStrategies, Providers } from '@passflow/core';
2
+ export type AuthMethods = {
3
+ internal: {
4
+ username: {
5
+ password: boolean;
6
+ };
7
+ email: {
8
+ password: boolean;
9
+ otp: boolean;
10
+ magicLink: boolean;
11
+ };
12
+ phone: {
13
+ password: boolean;
14
+ otp: boolean;
15
+ magicLink: boolean;
16
+ };
17
+ };
18
+ fim: {
19
+ providers: Providers[];
20
+ };
21
+ passkey: boolean;
22
+ hasEmailMethods: boolean;
23
+ hasSignInEmailMethods: boolean;
24
+ hasPhoneMethods: boolean;
25
+ hasSignInPhoneMethods: boolean;
26
+ hasUsernameMethods: boolean;
27
+ hasSignInUsernameMethods: boolean;
28
+ };
29
+ export declare const getAuthMethods: (strategies?: AuthStrategies[]) => AuthMethods;
30
+ //# sourceMappingURL=get-auth-methods.d.ts.map
@@ -1,4 +1,4 @@
1
- import { AuthStrategies, Providers } from '@passflow/core';
1
+ import type { AuthStrategies, Providers } from '@passflow/core';
2
2
  export type AuthMethods = {
3
3
  internal: {
4
4
  username: {
@@ -1 +1 @@
1
- {"version":3,"file":"get-auth-methods.d.ts","sourceRoot":"","sources":["../../../src/utils/get-auth-methods.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiC,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG/F,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,QAAQ,EAAE,OAAO,CAAC;SACnB,CAAC;QACF,KAAK,EAAE;YACL,QAAQ,EAAE,OAAO,CAAC;YAClB,GAAG,EAAE,OAAO,CAAC;YACb,SAAS,EAAE,OAAO,CAAC;SACpB,CAAC;QACF,KAAK,EAAE;YACL,QAAQ,EAAE,OAAO,CAAC;YAClB,GAAG,EAAE,OAAO,CAAC;YACb,SAAS,EAAE,OAAO,CAAC;SACpB,CAAC;KACH,CAAC;IACF,GAAG,EAAE;QACH,SAAS,EAAE,SAAS,EAAE,CAAC;KACxB,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;IACzB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,wBAAwB,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,aAAa,cAAc,EAAE,KAAG,WA8E9D,CAAC"}
1
+ {"version":3,"file":"get-auth-methods.d.ts","sourceRoot":"","sources":["../../../src/utils/get-auth-methods.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiC,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAK/F,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,QAAQ,EAAE,OAAO,CAAC;SACnB,CAAC;QACF,KAAK,EAAE;YACL,QAAQ,EAAE,OAAO,CAAC;YAClB,GAAG,EAAE,OAAO,CAAC;YACb,SAAS,EAAE,OAAO,CAAC;SACpB,CAAC;QACF,KAAK,EAAE;YACL,QAAQ,EAAE,OAAO,CAAC;YAClB,GAAG,EAAE,OAAO,CAAC;YACb,SAAS,EAAE,OAAO,CAAC;SACpB,CAAC;KACH,CAAC;IACF,GAAG,EAAE;QACH,SAAS,EAAE,SAAS,EAAE,CAAC;KACxB,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;IACzB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,wBAAwB,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,cAAc,gBAAiB,cAAc,EAAE,KAAG,WA8E9D,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { InternalStrategyChallenge } from '@passflow/core';
2
+ import type { DefaultMethod } from '../types/index.cjs';
3
+ import type { AuthMethods } from './get-auth-methods.cjs';
4
+ export declare const getIdentityLabel: (methods: AuthMethods, type: 'label' | 'button') => "Email" | "Email or username" | "Use email" | "Use email or username" | "Use username" | "Username" | null;
5
+ export declare const getPasswordlessData: (methods: AuthMethods, currentMethod: DefaultMethod | null) => {
6
+ label: string;
7
+ challengeType: InternalStrategyChallenge;
8
+ } | null;
9
+ export declare const getValidationErrorsLabel: (methods: AuthMethods) => "Email is required" | "Email or username is required" | "Field is required" | "Username is required";
10
+ //# sourceMappingURL=get-form-labels.d.ts.map
@@ -1,10 +1,10 @@
1
- import { DefaultMethod } from '../types';
2
- import { InternalStrategyChallenge } from '@passflow/core';
3
- import { AuthMethods } from './get-auth-methods';
4
- export declare const getIdentityLabel: (methods: AuthMethods, type: "label" | "button") => "Email or username" | "Use email or username" | "Email" | "Use email" | "Username" | "Use username" | null;
1
+ import type { InternalStrategyChallenge } from '@passflow/core';
2
+ import type { DefaultMethod } from '../types/index.js';
3
+ import type { AuthMethods } from './get-auth-methods.js';
4
+ export declare const getIdentityLabel: (methods: AuthMethods, type: 'label' | 'button') => "Email" | "Email or username" | "Use email" | "Use email or username" | "Use username" | "Username" | null;
5
5
  export declare const getPasswordlessData: (methods: AuthMethods, currentMethod: DefaultMethod | null) => {
6
6
  label: string;
7
7
  challengeType: InternalStrategyChallenge;
8
8
  } | null;
9
- export declare const getValidationErrorsLabel: (methods: AuthMethods) => "Email or username is required" | "Email is required" | "Username is required" | "Field is required";
9
+ export declare const getValidationErrorsLabel: (methods: AuthMethods) => "Email is required" | "Email or username is required" | "Field is required" | "Username is required";
10
10
  //# sourceMappingURL=get-form-labels.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-form-labels.d.ts","sourceRoot":"","sources":["../../../src/utils/get-form-labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAGhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,GAAI,SAAS,WAAW,EAAE,MAAM,OAAO,GAAG,QAAQ,+GAO9E,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,SAAS,WAAW,EACpB,eAAe,aAAa,GAAG,IAAI,KAClC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,yBAAyB,CAAA;CAAE,GAAG,IAYhE,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,SAAS,WAAW,yGAM5D,CAAC"}
1
+ {"version":3,"file":"get-form-labels.d.ts","sourceRoot":"","sources":["../../../src/utils/get-form-labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAGhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAItD,eAAO,MAAM,gBAAgB,YAAa,WAAW,QAAQ,OAAO,GAAG,QAAQ,+GAO9E,CAAC;AAEF,eAAO,MAAM,mBAAmB,YACrB,WAAW,iBACL,aAAa,GAAG,IAAI,KAClC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,yBAAyB,CAAA;CAAE,GAAG,IAYhE,CAAC;AAEF,eAAO,MAAM,wBAAwB,YAAa,WAAW,yGAM5D,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const getUrlErrors: (subUrl?: string) => {
2
+ error: string | null;
3
+ message: string | null;
4
+ };
5
+ //# sourceMappingURL=get-url-errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-url-errors.d.ts","sourceRoot":"","sources":["../../../src/utils/get-url-errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,GAAI,SAAS,MAAM;;;CAM3C,CAAC"}
1
+ {"version":3,"file":"get-url-errors.d.ts","sourceRoot":"","sources":["../../../src/utils/get-url-errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,YAAa,MAAM;;;CAM3C,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Passflow } from '@passflow/core';
2
+ export type TokenUrlFormat = 'query' | 'hash';
3
+ export declare const getUrlWithTokens: (passflow: Passflow, url: string, format?: TokenUrlFormat) => Promise<string>;
4
+ //# sourceMappingURL=get-url-with-tokens.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Passflow } from '@passflow/core';
1
+ import type { Passflow } from '@passflow/core';
2
2
  export type TokenUrlFormat = 'query' | 'hash';
3
3
  export declare const getUrlWithTokens: (passflow: Passflow, url: string, format?: TokenUrlFormat) => Promise<string>;
4
4
  //# sourceMappingURL=get-url-with-tokens.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-url-with-tokens.d.ts","sourceRoot":"","sources":["../../../src/utils/get-url-with-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9C,eAAO,MAAM,gBAAgB,GAAU,UAAU,QAAQ,EAAE,KAAK,MAAM,EAAE,SAAQ,cAAuB,KAAG,OAAO,CAAC,MAAM,CAmBvH,CAAC"}
1
+ {"version":3,"file":"get-url-with-tokens.d.ts","sourceRoot":"","sources":["../../../src/utils/get-url-with-tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9C,eAAO,MAAM,gBAAgB,aAAoB,QAAQ,OAAO,MAAM,WAAU,cAAc,KAAY,OAAO,CAAC,MAAM,CAmBvH,CAAC"}
@@ -0,0 +1,18 @@
1
+ export { authErrorFor, authRedirectErrorMessage, invitationLinkErrorMessage, verificationLinkErrorMessage, verificationRequestErrorMessage, } from './auth-error.cjs';
2
+ export { classifyDeviceError, DeviceApiError, deviceErrorOfType } from './classify-device-error.cjs';
3
+ export { classifyTwoFactorError, getUserFriendlyErrorMessage } from './classify-two-factor-error.cjs';
4
+ export { cn } from './cn.cjs';
5
+ export * from './dayjs/index.cjs';
6
+ export { type AuthMethods, getAuthMethods } from './get-auth-methods.cjs';
7
+ export { getIdentityLabel, getPasswordlessData, getValidationErrorsLabel } from './get-form-labels.cjs';
8
+ export { getUrlErrors } from './get-url-errors.cjs';
9
+ export { getUrlWithTokens, type TokenUrlFormat } from './get-url-with-tokens.cjs';
10
+ export { getInvitationAuthChrome, type InvitationAuthIntent } from './invitation-auth-chrome.cjs';
11
+ export { routeToSecondFactor, urlCarriesTwoFactorToken } from './second-factor.cjs';
12
+ export { TwoFactorLoopPrevention } from './two-factor-loop-prevention.cjs';
13
+ export { undefinedOnCatch } from './undefined-on-catch.cjs';
14
+ export { attachAuth, registerUpgradeAuthInstance, releaseUpgradeAuthInstance, upgradeAuthInstance, withAuth, } from './upgrade-auth.cjs';
15
+ export { useUrlParams } from './url-params.cjs';
16
+ export { isValidUrl } from './validate-url.cjs';
17
+ export * from './validation-schemas/index.cjs';
18
+ //# sourceMappingURL=index.d.ts.map