@auth0/auth0-acul-react 1.0.0-alpha.2 → 1.0.0-alpha.3

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 (164) hide show
  1. package/README.md +77 -77
  2. package/dist/export/getting-started.d.ts +1 -1
  3. package/dist/hooks/common/errors.d.ts +12 -12
  4. package/dist/hooks/common/errors.js +1 -1
  5. package/dist/hooks/common/errors.js.map +1 -1
  6. package/dist/hooks/index.d.ts +1 -1
  7. package/dist/screens/accept-invitation.d.ts +1 -1
  8. package/dist/screens/accept-invitation.js.map +1 -1
  9. package/dist/screens/consent.d.ts +1 -1
  10. package/dist/screens/consent.js.map +1 -1
  11. package/dist/screens/customized-consent.d.ts +1 -1
  12. package/dist/screens/customized-consent.js.map +1 -1
  13. package/dist/screens/device-code-activation-allowed.d.ts +1 -1
  14. package/dist/screens/device-code-activation-allowed.js.map +1 -1
  15. package/dist/screens/device-code-activation-denied.d.ts +1 -1
  16. package/dist/screens/device-code-activation-denied.js.map +1 -1
  17. package/dist/screens/device-code-activation.d.ts +1 -1
  18. package/dist/screens/device-code-activation.js.map +1 -1
  19. package/dist/screens/device-code-confirmation.d.ts +1 -1
  20. package/dist/screens/device-code-confirmation.js.map +1 -1
  21. package/dist/screens/email-identifier-challenge.d.ts +1 -1
  22. package/dist/screens/email-identifier-challenge.js.map +1 -1
  23. package/dist/screens/email-otp-challenge.d.ts +1 -1
  24. package/dist/screens/email-otp-challenge.js.map +1 -1
  25. package/dist/screens/email-verification-result.d.ts +1 -1
  26. package/dist/screens/email-verification-result.js.map +1 -1
  27. package/dist/screens/interstitial-captcha.d.ts +1 -1
  28. package/dist/screens/interstitial-captcha.js.map +1 -1
  29. package/dist/screens/login-email-verification.d.ts +1 -1
  30. package/dist/screens/login-email-verification.js.map +1 -1
  31. package/dist/screens/login-id.d.ts +1 -1
  32. package/dist/screens/login-id.js.map +1 -1
  33. package/dist/screens/login-password.d.ts +1 -1
  34. package/dist/screens/login-password.js.map +1 -1
  35. package/dist/screens/login-passwordless-email-code.d.ts +1 -1
  36. package/dist/screens/login-passwordless-email-code.js.map +1 -1
  37. package/dist/screens/login-passwordless-sms-otp.d.ts +1 -1
  38. package/dist/screens/login-passwordless-sms-otp.js.map +1 -1
  39. package/dist/screens/login.d.ts +1 -1
  40. package/dist/screens/login.js.map +1 -1
  41. package/dist/screens/logout-aborted.d.ts +1 -1
  42. package/dist/screens/logout-aborted.js.map +1 -1
  43. package/dist/screens/logout-complete.d.ts +1 -1
  44. package/dist/screens/logout-complete.js.map +1 -1
  45. package/dist/screens/logout.d.ts +1 -1
  46. package/dist/screens/logout.js.map +1 -1
  47. package/dist/screens/mfa-begin-enroll-options.d.ts +1 -1
  48. package/dist/screens/mfa-begin-enroll-options.js.map +1 -1
  49. package/dist/screens/mfa-country-codes.d.ts +1 -1
  50. package/dist/screens/mfa-country-codes.js.map +1 -1
  51. package/dist/screens/mfa-detect-browser-capabilities.d.ts +1 -1
  52. package/dist/screens/mfa-detect-browser-capabilities.js.map +1 -1
  53. package/dist/screens/mfa-email-challenge.d.ts +1 -1
  54. package/dist/screens/mfa-email-challenge.js.map +1 -1
  55. package/dist/screens/mfa-email-list.d.ts +1 -1
  56. package/dist/screens/mfa-email-list.js.map +1 -1
  57. package/dist/screens/mfa-enroll-result.d.ts +1 -1
  58. package/dist/screens/mfa-enroll-result.js.map +1 -1
  59. package/dist/screens/mfa-login-options.d.ts +1 -1
  60. package/dist/screens/mfa-login-options.js.map +1 -1
  61. package/dist/screens/mfa-otp-challenge.d.ts +1 -1
  62. package/dist/screens/mfa-otp-challenge.js.map +1 -1
  63. package/dist/screens/mfa-otp-enrollment-code.d.ts +1 -1
  64. package/dist/screens/mfa-otp-enrollment-code.js.map +1 -1
  65. package/dist/screens/mfa-otp-enrollment-qr.d.ts +1 -1
  66. package/dist/screens/mfa-otp-enrollment-qr.js.map +1 -1
  67. package/dist/screens/mfa-phone-challenge.d.ts +1 -1
  68. package/dist/screens/mfa-phone-challenge.js.map +1 -1
  69. package/dist/screens/mfa-phone-enrollment.d.ts +1 -1
  70. package/dist/screens/mfa-phone-enrollment.js.map +1 -1
  71. package/dist/screens/mfa-push-challenge-push.d.ts +1 -1
  72. package/dist/screens/mfa-push-challenge-push.js.map +1 -1
  73. package/dist/screens/mfa-push-enrollment-qr.d.ts +3 -2
  74. package/dist/screens/mfa-push-enrollment-qr.js +1 -1
  75. package/dist/screens/mfa-push-enrollment-qr.js.map +1 -1
  76. package/dist/screens/mfa-push-list.d.ts +1 -1
  77. package/dist/screens/mfa-push-list.js.map +1 -1
  78. package/dist/screens/mfa-push-welcome.d.ts +1 -1
  79. package/dist/screens/mfa-push-welcome.js.map +1 -1
  80. package/dist/screens/mfa-recovery-code-challenge-new-code.d.ts +1 -1
  81. package/dist/screens/mfa-recovery-code-challenge-new-code.js.map +1 -1
  82. package/dist/screens/mfa-recovery-code-challenge.d.ts +1 -1
  83. package/dist/screens/mfa-recovery-code-challenge.js.map +1 -1
  84. package/dist/screens/mfa-recovery-code-enrollment.d.ts +1 -1
  85. package/dist/screens/mfa-recovery-code-enrollment.js.map +1 -1
  86. package/dist/screens/mfa-sms-challenge.d.ts +1 -1
  87. package/dist/screens/mfa-sms-challenge.js.map +1 -1
  88. package/dist/screens/mfa-sms-enrollment.d.ts +1 -1
  89. package/dist/screens/mfa-sms-enrollment.js.map +1 -1
  90. package/dist/screens/mfa-sms-list.d.ts +1 -1
  91. package/dist/screens/mfa-sms-list.js.map +1 -1
  92. package/dist/screens/mfa-voice-challenge.d.ts +1 -1
  93. package/dist/screens/mfa-voice-challenge.js.map +1 -1
  94. package/dist/screens/mfa-voice-enrollment.d.ts +1 -1
  95. package/dist/screens/mfa-voice-enrollment.js.map +1 -1
  96. package/dist/screens/mfa-webauthn-change-key-nickname.d.ts +1 -1
  97. package/dist/screens/mfa-webauthn-change-key-nickname.js.map +1 -1
  98. package/dist/screens/mfa-webauthn-enrollment-success.d.ts +1 -1
  99. package/dist/screens/mfa-webauthn-enrollment-success.js.map +1 -1
  100. package/dist/screens/mfa-webauthn-error.d.ts +1 -1
  101. package/dist/screens/mfa-webauthn-error.js.map +1 -1
  102. package/dist/screens/mfa-webauthn-not-available-error.d.ts +1 -1
  103. package/dist/screens/mfa-webauthn-not-available-error.js.map +1 -1
  104. package/dist/screens/mfa-webauthn-platform-challenge.d.ts +1 -1
  105. package/dist/screens/mfa-webauthn-platform-challenge.js.map +1 -1
  106. package/dist/screens/mfa-webauthn-platform-enrollment.d.ts +1 -1
  107. package/dist/screens/mfa-webauthn-platform-enrollment.js.map +1 -1
  108. package/dist/screens/mfa-webauthn-roaming-challenge.d.ts +1 -1
  109. package/dist/screens/mfa-webauthn-roaming-challenge.js.map +1 -1
  110. package/dist/screens/mfa-webauthn-roaming-enrollment.d.ts +1 -1
  111. package/dist/screens/mfa-webauthn-roaming-enrollment.js.map +1 -1
  112. package/dist/screens/organization-picker.d.ts +1 -1
  113. package/dist/screens/organization-picker.js.map +1 -1
  114. package/dist/screens/organization-selection.d.ts +1 -1
  115. package/dist/screens/organization-selection.js.map +1 -1
  116. package/dist/screens/passkey-enrollment-local.d.ts +1 -1
  117. package/dist/screens/passkey-enrollment-local.js.map +1 -1
  118. package/dist/screens/passkey-enrollment.d.ts +1 -1
  119. package/dist/screens/passkey-enrollment.js.map +1 -1
  120. package/dist/screens/phone-identifier-challenge.d.ts +1 -1
  121. package/dist/screens/phone-identifier-challenge.js.map +1 -1
  122. package/dist/screens/phone-identifier-enrollment.d.ts +1 -1
  123. package/dist/screens/phone-identifier-enrollment.js.map +1 -1
  124. package/dist/screens/redeem-ticket.d.ts +1 -1
  125. package/dist/screens/redeem-ticket.js.map +1 -1
  126. package/dist/screens/reset-password-email.d.ts +1 -1
  127. package/dist/screens/reset-password-email.js.map +1 -1
  128. package/dist/screens/reset-password-error.d.ts +1 -1
  129. package/dist/screens/reset-password-error.js.map +1 -1
  130. package/dist/screens/reset-password-mfa-email-challenge.d.ts +1 -1
  131. package/dist/screens/reset-password-mfa-email-challenge.js.map +1 -1
  132. package/dist/screens/reset-password-mfa-otp-challenge.d.ts +1 -1
  133. package/dist/screens/reset-password-mfa-otp-challenge.js.map +1 -1
  134. package/dist/screens/reset-password-mfa-phone-challenge.d.ts +1 -1
  135. package/dist/screens/reset-password-mfa-phone-challenge.js.map +1 -1
  136. package/dist/screens/reset-password-mfa-push-challenge-push.d.ts +1 -1
  137. package/dist/screens/reset-password-mfa-push-challenge-push.js.map +1 -1
  138. package/dist/screens/reset-password-mfa-recovery-code-challenge.d.ts +1 -1
  139. package/dist/screens/reset-password-mfa-recovery-code-challenge.js.map +1 -1
  140. package/dist/screens/reset-password-mfa-sms-challenge.d.ts +1 -1
  141. package/dist/screens/reset-password-mfa-sms-challenge.js.map +1 -1
  142. package/dist/screens/reset-password-mfa-voice-challenge.d.ts +1 -1
  143. package/dist/screens/reset-password-mfa-voice-challenge.js.map +1 -1
  144. package/dist/screens/reset-password-mfa-webauthn-platform-challenge.d.ts +1 -1
  145. package/dist/screens/reset-password-mfa-webauthn-platform-challenge.js.map +1 -1
  146. package/dist/screens/reset-password-mfa-webauthn-roaming-challenge.d.ts +1 -1
  147. package/dist/screens/reset-password-mfa-webauthn-roaming-challenge.js.map +1 -1
  148. package/dist/screens/reset-password-request.d.ts +1 -1
  149. package/dist/screens/reset-password-request.js.map +1 -1
  150. package/dist/screens/reset-password-success.d.ts +1 -1
  151. package/dist/screens/reset-password-success.js.map +1 -1
  152. package/dist/screens/reset-password.d.ts +1 -1
  153. package/dist/screens/reset-password.js.map +1 -1
  154. package/dist/screens/signup-id.d.ts +1 -1
  155. package/dist/screens/signup-id.js.map +1 -1
  156. package/dist/screens/signup-password.d.ts +1 -1
  157. package/dist/screens/signup-password.js.map +1 -1
  158. package/dist/screens/signup.d.ts +1 -1
  159. package/dist/screens/signup.js.map +1 -1
  160. package/dist/state/error-store.d.ts +11 -11
  161. package/dist/state/error-store.js +1 -1
  162. package/dist/state/error-store.js.map +1 -1
  163. package/dist/telemetry.js +1 -1
  164. package/package.json +2 -2
package/README.md CHANGED
@@ -127,7 +127,7 @@ import type {
127
127
  // ...other types
128
128
  } from '@auth0/auth0-acul-react/types';
129
129
  ```
130
- Refer to our [API Reference](#-api-reference) for the full list of available types and interfaces.
130
+ Refer to our [API Reference](#api-reference) for the full list of available types and interfaces.
131
131
 
132
132
  ---
133
133
 
@@ -137,88 +137,88 @@ Refer to our [API Reference](#-api-reference) for the full list of available typ
137
137
 
138
138
  | No. | Prompt | Screen Name | Documentation Link |
139
139
  |--------|--------------------|-------------------|--------------------------------------------------------------------------------------------|
140
- | 1 | login | login | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.Login) |
141
- | 2 | loginId | login-id | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.LoginId) |
142
- | 3 | login-password | login-password | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.LoginPassword) |
143
- | 4 | signup-id | signup-id | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.SignupId) |
144
- | 5 | signup-password | signup-password | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.SignupPassword) |
140
+ | 1 | login | login | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Login) |
141
+ | 2 | login-id | login-id | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Login-Id) |
142
+ | 3 | login-password | login-password | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Login-Password) |
143
+ | 4 | signup-id | signup-id | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Signup-Id) |
144
+ | 5 | signup-password | signup-password | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Signup-Password) |
145
145
 
146
146
  <details>
147
147
  <summary>Explore more screens...</summary>
148
148
 
149
149
  | No. | Prompt | Screen Name | Documentation Link |
150
150
  |--------|--------------------------------|-------------------------------------------|-------------------------------------------------------------------------------------------------------|
151
- | 6 | login-passwordless | login-passwordless-email-code | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.LoginPasswordlessEmailCode) |
152
- | 7 | login-passwordless | login-passwordless-sms-otp | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.LoginPasswordlessSmsOtp) |
153
- | 8 | passkeys | passkey-enrollment | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.PasskeyEnrollment) |
154
- | 9 | passkeys | passkey-enrollment-local | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.PasskeyEnrollmentLocal) |
155
- | 10 | phone-identifier-enrollment | phone-identifier-enrollment | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.PhoneIdentifierEnrollment) |
156
- | 11 | phone-identifier-challenge | phone-identifier-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.PhoneIdentifierChallenge) |
157
- | 12 | email-identifier-challenge | email-identifier-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.EmailIdentifierChallenge) |
158
- | 13 | captcha | interstitial-captcha | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.InterstitialCaptcha) |
159
- | 14 | reset-password | reset-password-email | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.ResetPasswordEmail) |
160
- | 15 | reset-password | reset-password-request | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.ResetPasswordRequest) |
161
- | 16 | reset-password | reset-password | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.ResetPassword) |
162
- | 17 | reset-password | reset-password-error | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.ResetPasswordError) |
163
- | 18 | reset-password | reset-password-success | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.ResetPasswordSuccess) |
164
- | 19 | signup | signup | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.Signup) |
165
- | 20 | mfa | mfa-detect-browser-capabilities | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaDetectBrowserCapabilities) |
166
- | 21 | mfa | mfa-enroll-result | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaEnrollResult) |
167
- | 22 | mfa | mfa-begin-enroll-options | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaBeginEnrollOptions) |
168
- | 23 | mfa | mfa-login-options | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaLoginOptions) |
169
- | 24 | mfa-push | mfa-push-enrollment-qr | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaPushEnrollmentQr) |
170
- | 25 | mfa-push | mfa-push-welcome | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaPushWelcome) |
171
- | 26 | mfa-push | mfa-push-challenge-push | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaPushChallengePush) |
172
- | 27 | mfa-push | mfa-push-list | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaPushList) |
173
- | 28 | mfa-sms | mfa-country-codes | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaCountryCodes) |
174
- | 29 | mfa-sms | mfa-sms-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaSmsChallenge) |
175
- | 30 | mfa-sms | mfa-sms-enrollment | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaSmsEnrollment) |
176
- | 31 | mfa-sms | mfa-sms-list | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaSmsList) |
177
- | 32 | mfa-email | mfa-email-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaEmailChallenge) |
178
- | 33 | mfa-email | mfa-email-list | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaEmailList) |
179
- | 34 | invitatino | accept-invitation | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.AcceptInvitation) |
180
- | 35 | organizations | organization-picker | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.OrganizationPicker) |
181
- | 36 | organizations | organization-selection | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.OrganizationSelection) |
182
- | 37 | reset-password | mfa-otp-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaOtpChallenge) |
183
- | 38 | mfa-otp | mfa-otp-enrollment-code | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaOtpEnrollmentCode) |
184
- | 39 | mfa-otp | mfa-otp-enrollment-qr | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaOtpEnrollmentQr) |
185
- | 40 | reset-password | reset-password-mfa-email-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.ResetPasswordMfaEmailChallenge) |
186
- | 41 | reset-password | reset-password-mfa-push-challenge-push | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.ResetPasswordMfaPushChallengePush)|
187
- | 42 | reset-password | mfa-sms-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.ResetPasswordMfaSmsChallenge) |
188
- | 43 | reset-password | reset-password-mfa-otp-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.OrganizationSelection) |
189
- | 44 | mfa-phone | mfa-phone-enrollment | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaPhoneEnrollment) |
190
- | 45 | mfa-voice | mfa-voice-enrollment | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaVoiceEnrollment) |
191
- | 46 | mfa-recovery-code | mfa-recovery-code-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaRecoveryCodeChallenge) |
192
- | 47 | device-flow | device-code-activation-allowed | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.DeviceCodeActivationAllowed) |
193
- | 48 | device-flow | device-code-activation-denied | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.DeviceCodeActivationDenied) |
194
- | 49 | device-flow | device-code-activation | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.DeviceCodeActivation) |
195
- | 50 | reset-password | reset-password-mfa-recovery-code-challenge | [Link](https://auth0.github.io/universallogin/classes/Classes.ResetPasswordMfaRecoveryCodeChallenge) |
196
- | 51 | reset-password | reset-password-mfa-voice | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.ResetPasswordMfaVoiceChallenge) |
197
- | 52 | common | redeem-ticket | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.RedeemTicket) |
198
- | 53 | device-flow | device-code-confirmation | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.DeviceCodeConfirmation) |
199
- | 54 | mfa-phone | mfa-phone-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaPhoneChallenge) |
200
- | 55 | mfa-voice | mfa-voice-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaVoiceChallenge) |
201
- | 56 | mfa-recovery-code | mfa-recovery-code-enrollment | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaRecoveryCodeEnrollment) |
202
- | 57 | reset-password | reset-password-mfa-phone-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.ResetPasswordMfaPhoneChallenge) |
203
- | 58 | mfa-recovery-code | mfa-recovery-code-challenge-new-code | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaRecoveryCodeChallengeNewCode) |
204
- | 59 | logout | logout | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.Logout) |
205
- | 60 | logout | logout-aborted | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.LogoutAborted) |
206
- | 61 | logout | logout-complete | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.LogoutComplete) |
207
- | 62 | email-verification | email-verification-result | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.EmailVerificationResult) |
208
- | 63 | login-email-verification | login-email-verification | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.LoginEmailVerification) |
209
- | 64 |mfa-webauthn | mfa-webauthn-platform-enrollment | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaWebAuthnPlatformEnrollment) |
210
- | 65 |mfa-webauthn | mfa-webauthn-error | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaWebAuthnError) |
211
- | 66 |mfa-webauthn | mfa-webauthn-roaming-enrollment | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaWebAuthnRoamingEnrollment) |
212
- | 67 |mfa-webauthn | mfa-webauthn-roaming-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaWebAuthnRoamingChallenge) |
213
- | 68 |mfa-webauthn | mfa-webauthn-platform-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaWebAuthnPlatformChallenge) |
214
- | 69 |mfa-webauthn | mfa-webauthn-enrollment-success | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaWebAuthnEnrollmentSuccess) |
215
- | 70 |mfa-webauthn | mfa-webauthn-change-key-nickname | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaWebAuthnChangeKeyNickname) |
216
- | 71 |mfa-webauthn | mfa-webauthn-not-available-error | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.MfaWebAuthnNotAvailableError) |
217
- | 72 |reset-password | reset-password-mfa-webauthn-platform-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.ResetPasswordMfaWebAuthnPlatformChallenge) |
218
- | 73 |reset-password | reset-password-mfa-webauthn-roaming-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.ResetPasswordMfaWebAuthnRoamingChallenge) |
219
- | 74 |consent | consent | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.consent) |
220
- | 75 |customized-consent | customized-consent | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.CustomizedConsent) |
221
- | 76 |email-otp-challenge | email-otp-challenge | [Link](https://acul-docs.netlify.app/auth0-acul-react/modules/Screens.EmailOTPChallenge) |
151
+ | 6 | login-passwordless | login-passwordless-email-code | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Login-Passwordless-Email-Code) |
152
+ | 7 | login-passwordless | login-passwordless-sms-otp | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Login-Passwordless-Sms-Otp) |
153
+ | 8 | passkeys | passkey-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Passkey-Enrollment) |
154
+ | 9 | passkeys | passkey-enrollment-local | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Passkey-Enrollment-Local) |
155
+ | 10 | phone-identifier-enrollment | phone-identifier-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Phone-Identifier-Enrollment) |
156
+ | 11 | phone-identifier-challenge | phone-identifier-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Phone-Identifier-Challenge) |
157
+ | 12 | email-identifier-challenge | email-identifier-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Email-Identifier-Challenge) |
158
+ | 13 | captcha | interstitial-captcha | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Interstitial-Captcha) |
159
+ | 14 | reset-password | reset-password-email | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Reset-Password-Email) |
160
+ | 15 | reset-password | reset-password-request | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Reset-Password-Request) |
161
+ | 16 | reset-password | reset-password | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Reset-Password) |
162
+ | 17 | reset-password | reset-password-error | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Reset-Password-Error) |
163
+ | 18 | reset-password | reset-password-success | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Reset-Password-Success) |
164
+ | 19 | signup | signup | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Signup) |
165
+ | 20 | mfa | mfa-detect-browser-capabilities | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Detect-Browser-Capabilities) |
166
+ | 21 | mfa | mfa-enroll-result | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Enroll-Result) |
167
+ | 22 | mfa | mfa-begin-enroll-options | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Begin-Enroll-Options) |
168
+ | 23 | mfa | mfa-login-options | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Login-Options) |
169
+ | 24 | mfa-push | mfa-push-enrollment-qr | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Push-Enrollment-Qr) |
170
+ | 25 | mfa-push | mfa-push-welcome | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Push-Welcome) |
171
+ | 26 | mfa-push | mfa-push-challenge-push | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Push-Challenge-Push) |
172
+ | 27 | mfa-push | mfa-push-list | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Push-List) |
173
+ | 28 | mfa-sms | mfa-country-codes | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Country-Codes) |
174
+ | 29 | mfa-sms | mfa-sms-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Sms-Challenge) |
175
+ | 30 | mfa-sms | mfa-sms-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Sms-Enrollment) |
176
+ | 31 | mfa-sms | mfa-sms-list | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Sms-List) |
177
+ | 32 | mfa-email | mfa-email-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Email-Challenge) |
178
+ | 33 | mfa-email | mfa-email-list | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Email-List) |
179
+ | 34 | invitatino | accept-invitation | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Accept-Invitation) |
180
+ | 35 | organizations | organization-picker | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Organization-Picker) |
181
+ | 36 | organizations | organization-selection | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Organization-Selection) |
182
+ | 37 | reset-password | mfa-otp-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Otp-Challenge) |
183
+ | 38 | mfa-otp | mfa-otp-enrollment-code | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Otp-Enrollment-Code) |
184
+ | 39 | mfa-otp | mfa-otp-enrollment-qr | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Otp-Enrollment-Qr) |
185
+ | 40 | reset-password | reset-password-mfa-email-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Reset-Password-Mfa-Email-Challenge) |
186
+ | 41 | reset-password | reset-password-mfa-push-challenge-push | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Reset-Password-Mfa-Push-Challenge-Push)|
187
+ | 42 | reset-password | mfa-sms-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Reset-Password-Mfa-Sms-Challenge) |
188
+ | 43 | reset-password | reset-password-mfa-otp-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Organization-Selection) |
189
+ | 44 | mfa-phone | mfa-phone-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Phone-Enrollment) |
190
+ | 45 | mfa-voice | mfa-voice-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Voice-Enrollment) |
191
+ | 46 | mfa-recovery-code | mfa-recovery-code-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Recovery-Code-Challenge) |
192
+ | 47 | device-flow | device-code-activation-allowed | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Device-Code-Activation-Allowed) |
193
+ | 48 | device-flow | device-code-activation-denied | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Device-Code-Activation-Denied) |
194
+ | 49 | device-flow | device-code-activation | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Device-Code-Activation) |
195
+ | 50 | reset-password | reset-password-mfa-recovery-code-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Reset-Password-Mfa-Recovery-Code-Challenge) |
196
+ | 51 | reset-password | reset-password-mfa-voice | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Reset-Password-Mfa-Voice-Challenge) |
197
+ | 52 | common | redeem-ticket | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Redeem-Ticket) |
198
+ | 53 | device-flow | device-code-confirmation | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Device-Code-Confirmation) |
199
+ | 54 | mfa-phone | mfa-phone-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Phone-Challenge) |
200
+ | 55 | mfa-voice | mfa-voice-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Voice-Challenge) |
201
+ | 56 | mfa-recovery-code | mfa-recovery-code-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Recovery-Code-Enrollment) |
202
+ | 57 | reset-password | reset-password-mfa-phone-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Reset-Password-Mfa-Phone-Challenge) |
203
+ | 58 | mfa-recovery-code | mfa-recovery-code-challenge-new-code | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-Recovery-Code-Challenge-New-Code) |
204
+ | 59 | logout | logout | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Logout) |
205
+ | 60 | logout | logout-aborted | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Logout-Aborted) |
206
+ | 61 | logout | logout-complete | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Logout-Complete) |
207
+ | 62 | email-verification | email-verification-result | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Email-Verification-Result) |
208
+ | 63 | login-email-verification | login-email-verification | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Login-Email-Verification) |
209
+ | 64 |mfa-webauthn | mfa-webauthn-platform-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-WebAuthn-Platform-Enrollment) |
210
+ | 65 |mfa-webauthn | mfa-webauthn-error | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-WebAuthn-Error) |
211
+ | 66 |mfa-webauthn | mfa-webauthn-roaming-enrollment | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-WebAuthn-Roaming-Enrollment) |
212
+ | 67 |mfa-webauthn | mfa-webauthn-roaming-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-WebAuthn-Roaming-Challenge) |
213
+ | 68 |mfa-webauthn | mfa-webauthn-platform-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-WebAuthn-Platform-Challenge) |
214
+ | 69 |mfa-webauthn | mfa-webauthn-enrollment-success | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-WebAuthn-Enrollment-Success) |
215
+ | 70 |mfa-webauthn | mfa-webauthn-change-key-nickname | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-WebAuthn-Change-Key-Nickname) |
216
+ | 71 |mfa-webauthn | mfa-webauthn-not-available-error | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Mfa-WebAuthn-Not-Available-Error) |
217
+ | 72 |reset-password | reset-password-mfa-webauthn-platform-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Reset-Password-Mfa-WebAuthn-Platform-Challenge) |
218
+ | 73 |reset-password | reset-password-mfa-webauthn-roaming-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Reset-Password-Mfa-WebAuthn-Roaming-Challenge) |
219
+ | 74 |consent | consent | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.consent) |
220
+ | 75 |customized-consent | customized-consent | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Customized-Consent) |
221
+ | 76 |email-otp-challenge | email-otp-challenge | [Link](https://auth0.github.io/universal-login/auth0-acul-react/modules/Screens.Email-OTP-Challenge) |
222
222
  </details>
223
223
 
224
224
  ---
@@ -208,7 +208,7 @@
208
208
  *
209
209
  * #### Error Handling
210
210
  * - `useErrors(options)` - Comprehensive error management with categorization
211
- * - Filter by error kind: `'validation'`, `'auth0'`, `'configuration'`
211
+ * - Filter by error type: `'validation'`, `'auth0'`, `'configuration'`
212
212
  * - Filter by field name for form-specific errors
213
213
  * - Dismiss individual or all errors
214
214
  *
@@ -1,10 +1,10 @@
1
- import { type ErrorItem, type ErrorKind } from '../../state/error-store';
1
+ import { type ErrorItem, type ErrorType } from '../../state/error-store';
2
2
  export interface ErrorsResult extends ReadonlyArray<ErrorItem> {
3
- byKind(kind: ErrorKind, opts?: {
3
+ byType(type: ErrorType, opts?: {
4
4
  field?: string;
5
5
  }): ReadonlyArray<ErrorItem>;
6
6
  byField(field: string, opts?: {
7
- kind?: ErrorKind;
7
+ type?: ErrorType;
8
8
  }): ReadonlyArray<ErrorItem>;
9
9
  }
10
10
  export interface UseErrorOptions {
@@ -18,7 +18,7 @@ export interface UseErrorsResult {
18
18
  }
19
19
  /**
20
20
  * React hook for reading and managing errors in ACUL (Advanced Customization of Universal Login).
21
- * With all validation and server-side errors. It groups errors into three kinds:
21
+ * With all validation and server-side errors. It groups errors into three types:
22
22
  * - `auth0` — errors returned by Auth0 or your own backend.
23
23
  * - `validation` — errors from client-side validation (e.g., invalid form input).
24
24
  * - `configuration` — errors caused by incorrect integration or SDK misuse.
@@ -31,8 +31,8 @@ export interface UseErrorsResult {
31
31
  *
32
32
  * @returns An object of type {@link UseErrorsResult}, containing:
33
33
  * - `errors` — the full error list of type {@link ErrorsResult}, with helpers:
34
- * - `errors.byKind(kind, filter?)` — filter by error kind and optionally by field.
35
- * - `errors.byField(field, filter?)` — filter by field and optionally by kind.
34
+ * - `errors.byType(type, filter?)` — filter by error type and optionally by field.
35
+ * - `errors.byField(field, filter?)` — filter by field and optionally by type.
36
36
  * - `hasError` — `true` if any error is currently present.
37
37
  * - `dismiss(id)` — remove a specific error by its ID.
38
38
  * - `dismissAll()` — clear all tracked errors.
@@ -51,7 +51,7 @@ export interface UseErrorsResult {
51
51
  * <div>
52
52
  * {hasError && (
53
53
  * <div className="mb-4">
54
- * {errors.byKind("auth0").map(err => (
54
+ * {errors.byType("auth0").map(err => (
55
55
  * <div key={err.id} className="text-red-600">
56
56
  * {err.message}
57
57
  * <button onClick={() => dismiss(err.id)}>Dismiss</button>
@@ -66,12 +66,12 @@ export interface UseErrorsResult {
66
66
  * }
67
67
  * ```
68
68
  *
69
- * In addition to rendering messages, you can filter by field or kind:
69
+ * In addition to rendering messages, you can filter by field or type:
70
70
  * ```ts
71
- * console.log(errors.byKind('validation')); // all validation errors
72
- * console.log(errors.byKind('validation', { field: 'username' })); // validation errors for field 'username'
71
+ * console.log(errors.byType('validation')); // all validation errors
72
+ * console.log(errors.byType('validation', { field: 'username' })); // validation errors for field 'username'
73
73
  * console.log(errors.byField('username')); // all errors for field 'username'
74
- * console.log(errors.byField('username', { kind: 'auth0' })); // auth0 errors for field 'username'
74
+ * console.log(errors.byField('username', { type: 'auth0' })); // auth0 errors for field 'username'
75
75
  * ```
76
76
  */
77
77
  export declare function useErrors(options?: UseErrorOptions): UseErrorsResult;
@@ -100,4 +100,4 @@ export declare const errorManager: {
100
100
  pushServerErrors(list: Omit<ErrorItem, "id"> | Array<Omit<ErrorItem, "id">>): void;
101
101
  syncServerErrors(): void;
102
102
  };
103
- export { ErrorItem, ErrorKind };
103
+ export { ErrorItem, ErrorType };
@@ -1,2 +1,2 @@
1
- import{getErrors as r,ValidationError as e,ConfigurationError as t,Auth0Error as a}from"@auth0/auth0-acul-js";import{useSyncExternalStore as n,useRef as o,useEffect as i,useMemo as c,useCallback as l}from"react";import{errorStore as s,ERROR_KINDS as u}from"../../state/error-store.js";function f(r,e){return e?r.filter(r=>r.field===e):r}const d=new WeakMap,h=new WeakMap,p=new WeakMap,v=(r,e)=>{const t="auth0"===r?d:"validation"===r?h:p,a=t.get(e);if(a)return a;const n=Object.freeze(e.map(e=>Object.freeze({...e,kind:r})));return t.set(e,n),n};function b(e={}){const{includeDevErrors:t=!1}=e,a=n(r=>s.subscribe(r),()=>s.snapshot()),d=o(!1);i(()=>{if(d.current)return;d.current=!0;const e=r?.()??[];s.replace("auth0",e)},[]);const h=c(()=>v("auth0",a.auth0),[a.auth0]),p=c(()=>v("validation",a.validation),[a.validation]),b=c(()=>v("configuration",a.configuration),[a.configuration]),E=c(()=>Object.freeze([...t?b:[],...p,...h]),[t,b,p,h]),g=c(()=>{const r=Object.assign([...E],{byKind(r,e){let t;return t="validation"===r?p:"configuration"===r?b:h,e?.field?Object.freeze(f(t,e.field)):t},byField:(e,t)=>t?.kind?r.byKind(t.kind,{field:e}):Object.freeze(f(E,e))});return Object.freeze(r)},[E,p,b,h]),y=E.length>0,m=l(r=>{s.remove(u,r)},[]),k=l(()=>{s.clear(u)},[]);return c(()=>({errors:g,hasError:y,dismiss:m,dismissAll:k}),[g,y,m,k])}const E={withError:function(r){const n=r=>{const n=function(r){return r instanceof e?"validation":r instanceof t?"configuration":r instanceof a?"auth0":null}(r),o=function(r){return{code:r?.code??(r instanceof Error?r.name:void 0)??"unknown_error",message:r?.message??"Unknown error",field:r?.field}}(r);switch(n){case"validation":E.replaceValidationErrors([o]);break;case"configuration":E.replaceDeveloperErrors([o]);break;case"auth0":E.replaceServerErrors([o]);break;default:throw console.error("[auth0-acul-react] Unhandled error:",r),r}};if("function"==typeof r)try{const e=r();return"object"==typeof(o=e)&&null!==o&&"then"in o&&"function"==typeof o.then?e.catch(r=>{throw n(r),r}):e}catch(r){throw n(r),r}var o;return r.catch(r=>{throw n(r),r})},replaceValidationErrors(r,e){e?.byField?s.replacePartial("validation",r,e.byField):s.replace("validation",r)},clearValidationErrors(){s.clear(["validation"])},pushValidationErrors(r){s.push("validation",r)},replaceDeveloperErrors(r,e){e?.byField?s.replacePartial("configuration",r,e.byField):s.replace("configuration",r)},clearDeveloperErrors(){s.clear(["configuration"])},pushDeveloperErrors(r){s.push("configuration",r)},replaceServerErrors(r,e){e?.byField?s.replacePartial("auth0",r,e.byField):s.replace("auth0",r)},clearServerErrors(){s.clear(["auth0"])},pushServerErrors(r){s.push("auth0",r)},syncServerErrors(){const e=r?.()??[];s.replace("auth0",e)}};export{E as errorManager,b as useErrors};
1
+ import{getErrors as r,ValidationError as e,ConfigurationError as t,Auth0Error as a}from"@auth0/auth0-acul-js";import{useSyncExternalStore as o,useRef as n,useEffect as i,useMemo as c,useCallback as l}from"react";import{errorStore as s,ERROR_TYPES as u}from"../../state/error-store.js";function f(r,e){return e?r.filter(r=>r.field===e):r}const p=new WeakMap,d=new WeakMap,h=new WeakMap,v=(r,e)=>{const t="auth0"===r?p:"validation"===r?d:h,a=t.get(e);if(a)return a;const o=Object.freeze(e.map(e=>Object.freeze({...e,type:r})));return t.set(e,o),o};function b(e={}){const{includeDevErrors:t=!1}=e,a=o(r=>s.subscribe(r),()=>s.snapshot()),p=n(!1);i(()=>{if(p.current)return;p.current=!0;const e=r?.()??[];s.replace("auth0",e)},[]);const d=c(()=>v("auth0",a.auth0),[a.auth0]),h=c(()=>v("validation",a.validation),[a.validation]),b=c(()=>v("configuration",a.configuration),[a.configuration]),y=c(()=>Object.freeze([...t?b:[],...h,...d]),[t,b,h,d]),E=c(()=>{const r=Object.assign([...y],{byType(r,e){let t;return t="validation"===r?h:"configuration"===r?b:d,e?.field?Object.freeze(f(t,e.field)):t},byField:(e,t)=>t?.type?r.byType(t.type,{field:e}):Object.freeze(f(y,e))});return Object.freeze(r)},[y,h,b,d]),g=y.length>0,m=l(r=>{s.remove(u,r)},[]),w=l(()=>{s.clear(u)},[]);return c(()=>({errors:E,hasError:g,dismiss:m,dismissAll:w}),[E,g,m,w])}const y={withError:function(r){const o=r=>{const o=function(r){return r instanceof e?"validation":r instanceof t?"configuration":r instanceof a?"auth0":null}(r),n=function(r){return{code:r?.code??(r instanceof Error?r.name:void 0)??"unknown_error",message:r?.message??"Unknown error",field:r?.field}}(r);switch(o){case"validation":y.replaceValidationErrors([n]);break;case"configuration":y.replaceDeveloperErrors([n]);break;case"auth0":y.replaceServerErrors([n]);break;default:throw console.error("[auth0-acul-react] Unhandled error:",r),r}};if("function"==typeof r)try{const e=r();return"object"==typeof(n=e)&&null!==n&&"then"in n&&"function"==typeof n.then?e.catch(r=>{throw o(r),r}):e}catch(r){throw o(r),r}var n;return r.catch(r=>{throw o(r),r})},replaceValidationErrors(r,e){e?.byField?s.replacePartial("validation",r,e.byField):s.replace("validation",r)},clearValidationErrors(){s.clear(["validation"])},pushValidationErrors(r){s.push("validation",r)},replaceDeveloperErrors(r,e){e?.byField?s.replacePartial("configuration",r,e.byField):s.replace("configuration",r)},clearDeveloperErrors(){s.clear(["configuration"])},pushDeveloperErrors(r){s.push("configuration",r)},replaceServerErrors(r,e){e?.byField?s.replacePartial("auth0",r,e.byField):s.replace("auth0",r)},clearServerErrors(){s.clear(["auth0"])},pushServerErrors(r){s.push("auth0",r)},syncServerErrors(){const e=r?.()??[];s.replace("auth0",e)}};export{y as errorManager,b as useErrors};
2
2
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sources":["../../../src/hooks/common/errors.ts"],"sourcesContent":["import {\n ConfigurationError,\n ValidationError,\n Auth0Error as Auth0ServerError,\n getErrors as getServerErrors,\n type Error as Auth0Error,\n} from '@auth0/auth0-acul-js';\nimport { useEffect, useMemo, useRef, useSyncExternalStore, useCallback } from 'react';\n\nimport { errorStore, ERROR_KINDS, type ErrorItem, type ErrorKind } from '../../state/error-store';\n\nexport interface ErrorsResult extends ReadonlyArray<ErrorItem> {\n byKind(kind: ErrorKind, opts?: { field?: string }): ReadonlyArray<ErrorItem>;\n byField(field: string, opts?: { kind?: ErrorKind }): ReadonlyArray<ErrorItem>;\n}\n\nexport interface UseErrorOptions {\n includeDevErrors?: boolean;\n}\n\nexport interface UseErrorsResult {\n errors: ErrorsResult;\n hasError: boolean;\n dismiss: (id: string) => void;\n dismissAll: () => void;\n}\n\nfunction classifyKind(e: unknown): ErrorKind | null {\n if (e instanceof ValidationError) {\n return 'validation';\n }\n if (e instanceof ConfigurationError) {\n return 'configuration';\n }\n if (e instanceof Auth0ServerError) {\n return 'auth0';\n }\n return null;\n}\n\nfunction toErrorObject(e: unknown): Omit<ErrorItem, 'id'> {\n return {\n code: (e as Auth0Error)?.code ?? (e instanceof Error ? e.name : undefined) ?? 'unknown_error',\n message: (e as Auth0Error)?.message ?? 'Unknown error',\n field: (e as Auth0Error)?.field,\n };\n}\n\nfunction filterByField<T extends { field?: string }>(\n list: ReadonlyArray<T>,\n field?: string\n): ReadonlyArray<T> {\n if (!field) {\n return list;\n }\n return list.filter((e) => e.field === field);\n}\n\n// caches for tagging\nconst cacheServer = new WeakMap<ReadonlyArray<ErrorItem>, ReadonlyArray<ErrorItem>>();\nconst cacheValidation = new WeakMap<ReadonlyArray<ErrorItem>, ReadonlyArray<ErrorItem>>();\nconst cacheDev = new WeakMap<ReadonlyArray<ErrorItem>, ReadonlyArray<ErrorItem>>();\n\nconst tag = (kind: ErrorKind, arr: ReadonlyArray<ErrorItem>): ReadonlyArray<ErrorItem> => {\n const cache = kind === 'auth0' ? cacheServer : kind === 'validation' ? cacheValidation : cacheDev;\n const hit = cache.get(arr);\n if (hit) {\n return hit;\n }\n const out = Object.freeze(arr.map((e) => Object.freeze({ ...e, kind })));\n cache.set(arr, out);\n return out;\n};\n\n/**\n * React hook for reading and managing errors in ACUL (Advanced Customization of Universal Login).\n * With all validation and server-side errors. It groups errors into three kinds:\n * - `auth0` — errors returned by Auth0 or your own backend.\n * - `validation` — errors from client-side validation (e.g., invalid form input).\n * - `configuration` — errors caused by incorrect integration or SDK misuse.\n *\n * @supportedScreens\n * - The `useErrors` hook is available on every ACUL screen.\n *\n * @param options.includeDevErrors - When `true`, configuration errors are included in\n * the returned list. Defaults to `false`.\n *\n * @returns An object of type {@link UseErrorsResult}, containing:\n * - `errors` — the full error list of type {@link ErrorsResult}, with helpers:\n * - `errors.byKind(kind, filter?)` — filter by error kind and optionally by field.\n * - `errors.byField(field, filter?)` — filter by field and optionally by kind.\n * - `hasError` — `true` if any error is currently present.\n * - `dismiss(id)` — remove a specific error by its ID.\n * - `dismissAll()` — clear all tracked errors.\n *\n * Typical usage is inside a form or screen component where you need to\n * reactively display errors and provide ways to dismiss them:\n *\n * @example\n * ```tsx\n * import { useErrors } from \"@auth0/auth0-acul-react\";\n *\n * export function SignupForm() {\n * const { errors, hasError, dismiss, dismissAll } = useErrors();\n *\n * return (\n * <div>\n * {hasError && (\n * <div className=\"mb-4\">\n * {errors.byKind(\"auth0\").map(err => (\n * <div key={err.id} className=\"text-red-600\">\n * {err.message}\n * <button onClick={() => dismiss(err.id)}>Dismiss</button>\n * </div>\n * ))}\n * </div>\n * )}\n *\n * <button onClick={dismissAll}>Clear All Errors</button>\n * </div>\n * );\n * }\n * ```\n *\n * In addition to rendering messages, you can filter by field or kind:\n * ```ts\n * console.log(errors.byKind('validation')); // all validation errors\n * console.log(errors.byKind('validation', { field: 'username' })); // validation errors for field 'username'\n * console.log(errors.byField('username')); // all errors for field 'username'\n * console.log(errors.byField('username', { kind: 'auth0' })); // auth0 errors for field 'username'\n * ```\n */\n\nexport function useErrors(options: UseErrorOptions = {}): UseErrorsResult {\n const { includeDevErrors = false } = options;\n\n const snap = useSyncExternalStore(\n (cb) => errorStore.subscribe(cb),\n () => errorStore.snapshot()\n );\n\n const didInit = useRef(false);\n useEffect(() => {\n if (didInit.current) {\n return;\n }\n didInit.current = true;\n\n // Get server errors directly from TS SDK on first render.\n const server = (getServerErrors?.() ?? []) as Array<Omit<ErrorItem, 'id'>>;\n errorStore.replace('auth0', server);\n }, []);\n\n const serverTagged = useMemo(() => tag('auth0', snap.auth0), [snap.auth0]);\n const clientTagged = useMemo(() => tag('validation', snap.validation), [snap.validation]);\n const devTagged = useMemo(() => tag('configuration', snap.configuration), [snap.configuration]);\n\n const all = useMemo<ReadonlyArray<ErrorItem>>(\n () => Object.freeze([...(includeDevErrors ? devTagged : []), ...clientTagged, ...serverTagged]),\n [includeDevErrors, devTagged, clientTagged, serverTagged]\n );\n\n const errors: ErrorsResult = useMemo(() => {\n const arr = Object.assign([...all], {\n byKind(kind: ErrorKind, opts?: { field?: string }): ReadonlyArray<ErrorItem> {\n let base: ReadonlyArray<ErrorItem>;\n if (kind === 'validation') {\n base = clientTagged;\n } else if (kind === 'configuration') {\n base = devTagged;\n } else {\n base = serverTagged;\n }\n if (opts?.field) {\n return Object.freeze(filterByField(base, opts.field));\n }\n return base;\n },\n byField(field: string, opts?: { kind?: ErrorKind }): ReadonlyArray<ErrorItem> {\n if (opts?.kind) {\n return arr.byKind(opts.kind, { field });\n }\n return Object.freeze(filterByField(all, field));\n },\n });\n return Object.freeze(arr);\n }, [all, clientTagged, devTagged, serverTagged]);\n\n const hasError = all.length > 0;\n\n const dismiss = useCallback((id: string) => {\n errorStore.remove(ERROR_KINDS, id);\n }, []);\n\n const dismissAll = useCallback(() => {\n errorStore.clear(ERROR_KINDS);\n }, []);\n\n return useMemo(\n () => ({ errors, hasError, dismiss, dismissAll }),\n [errors, hasError, dismiss, dismissAll]\n );\n}\n\n// ---------------- INTERNAL (SDK-only) ----------------\nconst isPromise = (v: unknown): v is Promise<unknown> =>\n typeof v === 'object' &&\n v !== null &&\n 'then' in v &&\n typeof (v as { then: unknown }).then === 'function';\n\nfunction withError<T>(actionOrPromise: (() => T | Promise<T>) | Promise<T>): T | Promise<T> {\n const handle = (e: unknown) => {\n const kind = classifyKind(e);\n const normalized = toErrorObject(e);\n switch (kind) {\n case 'validation':\n errorManager.replaceValidationErrors([normalized]);\n break;\n case 'configuration':\n errorManager.replaceDeveloperErrors([normalized]);\n break;\n case 'auth0':\n errorManager.replaceServerErrors([normalized]);\n break;\n default: {\n console.error('[auth0-acul-react] Unhandled error:', e);\n throw e;\n }\n }\n };\n\n if (typeof actionOrPromise === 'function') {\n try {\n const result = (actionOrPromise as () => T | Promise<T>)();\n return isPromise(result)\n ? result.catch((e) => {\n handle(e);\n throw e;\n })\n : result;\n } catch (e) {\n handle(e);\n throw e;\n }\n }\n\n return actionOrPromise.catch((e) => {\n handle(e);\n throw e;\n });\n}\n\n/**\n * @hidden\n * Internal error manager for use by SDK methods.\n * Use the `useErrors` hook in React components instead.\n */\nexport const errorManager = {\n withError,\n\n replaceValidationErrors(list: Array<Omit<ErrorItem, 'id'>>, opts?: { byField?: string }) {\n if (opts?.byField) {\n errorStore.replacePartial('validation', list, opts.byField);\n } else {\n errorStore.replace('validation', list);\n }\n },\n clearValidationErrors() {\n errorStore.clear(['validation']);\n },\n pushValidationErrors(list: Omit<ErrorItem, 'id'> | Array<Omit<ErrorItem, 'id'>>) {\n errorStore.push('validation', list);\n },\n\n replaceDeveloperErrors(list: Array<Omit<ErrorItem, 'id'>>, opts?: { byField?: string }) {\n if (opts?.byField) {\n errorStore.replacePartial('configuration', list, opts.byField);\n } else {\n errorStore.replace('configuration', list);\n }\n },\n clearDeveloperErrors() {\n errorStore.clear(['configuration']);\n },\n pushDeveloperErrors(list: Omit<ErrorItem, 'id'> | Array<Omit<ErrorItem, 'id'>>) {\n errorStore.push('configuration', list);\n },\n\n replaceServerErrors(list: Array<Omit<ErrorItem, 'id'>>, opts?: { byField?: string }) {\n if (opts?.byField) {\n errorStore.replacePartial('auth0', list, opts.byField);\n } else {\n errorStore.replace('auth0', list);\n }\n },\n clearServerErrors() {\n errorStore.clear(['auth0']);\n },\n pushServerErrors(list: Omit<ErrorItem, 'id'> | Array<Omit<ErrorItem, 'id'>>) {\n errorStore.push('auth0', list);\n },\n\n syncServerErrors() {\n const server = (getServerErrors?.() ?? []) as Array<Omit<ErrorItem, 'id'>>;\n errorStore.replace('auth0', server);\n },\n};\n\nexport { ErrorItem, ErrorKind };\n"],"names":["filterByField","list","field","filter","e","cacheServer","WeakMap","cacheValidation","cacheDev","tag","kind","arr","cache","hit","get","out","Object","freeze","map","set","useErrors","options","includeDevErrors","snap","useSyncExternalStore","cb","errorStore","subscribe","snapshot","didInit","useRef","useEffect","current","server","getServerErrors","replace","serverTagged","useMemo","auth0","clientTagged","validation","devTagged","configuration","all","errors","assign","byKind","opts","base","byField","hasError","length","dismiss","useCallback","id","remove","ERROR_KINDS","dismissAll","clear","errorManager","withError","actionOrPromise","handle","ValidationError","ConfigurationError","Auth0ServerError","classifyKind","normalized","code","Error","name","undefined","message","toErrorObject","replaceValidationErrors","replaceDeveloperErrors","replaceServerErrors","console","error","result","v","then","catch","replacePartial","clearValidationErrors","pushValidationErrors","push","clearDeveloperErrors","pushDeveloperErrors","clearServerErrors","pushServerErrors","syncServerErrors"],"mappings":"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"}
1
+ {"version":3,"file":"errors.js","sources":["../../../src/hooks/common/errors.ts"],"sourcesContent":["import {\n ConfigurationError,\n ValidationError,\n Auth0Error as Auth0ServerError,\n getErrors as getServerErrors,\n type Error as Auth0Error,\n} from '@auth0/auth0-acul-js';\nimport { useEffect, useMemo, useRef, useSyncExternalStore, useCallback } from 'react';\n\nimport { errorStore, ERROR_TYPES, type ErrorItem, type ErrorType } from '../../state/error-store';\n\nexport interface ErrorsResult extends ReadonlyArray<ErrorItem> {\n byType(type: ErrorType, opts?: { field?: string }): ReadonlyArray<ErrorItem>;\n byField(field: string, opts?: { type?: ErrorType }): ReadonlyArray<ErrorItem>;\n}\n\nexport interface UseErrorOptions {\n includeDevErrors?: boolean;\n}\n\nexport interface UseErrorsResult {\n errors: ErrorsResult;\n hasError: boolean;\n dismiss: (id: string) => void;\n dismissAll: () => void;\n}\n\nfunction classifyType(e: unknown): ErrorType | null {\n if (e instanceof ValidationError) {\n return 'validation';\n }\n if (e instanceof ConfigurationError) {\n return 'configuration';\n }\n if (e instanceof Auth0ServerError) {\n return 'auth0';\n }\n return null;\n}\n\nfunction toErrorObject(e: unknown): Omit<ErrorItem, 'id'> {\n return {\n code: (e as Auth0Error)?.code ?? (e instanceof Error ? e.name : undefined) ?? 'unknown_error',\n message: (e as Auth0Error)?.message ?? 'Unknown error',\n field: (e as Auth0Error)?.field,\n };\n}\n\nfunction filterByField<T extends { field?: string }>(\n list: ReadonlyArray<T>,\n field?: string\n): ReadonlyArray<T> {\n if (!field) {\n return list;\n }\n return list.filter((e) => e.field === field);\n}\n\n// caches for tagging\nconst cacheServer = new WeakMap<ReadonlyArray<ErrorItem>, ReadonlyArray<ErrorItem>>();\nconst cacheValidation = new WeakMap<ReadonlyArray<ErrorItem>, ReadonlyArray<ErrorItem>>();\nconst cacheDev = new WeakMap<ReadonlyArray<ErrorItem>, ReadonlyArray<ErrorItem>>();\n\nconst tag = (type: ErrorType, arr: ReadonlyArray<ErrorItem>): ReadonlyArray<ErrorItem> => {\n const cache = type === 'auth0' ? cacheServer : type === 'validation' ? cacheValidation : cacheDev;\n const hit = cache.get(arr);\n if (hit) {\n return hit;\n }\n const out = Object.freeze(arr.map((e) => Object.freeze({ ...e, type })));\n cache.set(arr, out);\n return out;\n};\n\n/**\n * React hook for reading and managing errors in ACUL (Advanced Customization of Universal Login).\n * With all validation and server-side errors. It groups errors into three types:\n * - `auth0` — errors returned by Auth0 or your own backend.\n * - `validation` — errors from client-side validation (e.g., invalid form input).\n * - `configuration` — errors caused by incorrect integration or SDK misuse.\n *\n * @supportedScreens\n * - The `useErrors` hook is available on every ACUL screen.\n *\n * @param options.includeDevErrors - When `true`, configuration errors are included in\n * the returned list. Defaults to `false`.\n *\n * @returns An object of type {@link UseErrorsResult}, containing:\n * - `errors` — the full error list of type {@link ErrorsResult}, with helpers:\n * - `errors.byType(type, filter?)` — filter by error type and optionally by field.\n * - `errors.byField(field, filter?)` — filter by field and optionally by type.\n * - `hasError` — `true` if any error is currently present.\n * - `dismiss(id)` — remove a specific error by its ID.\n * - `dismissAll()` — clear all tracked errors.\n *\n * Typical usage is inside a form or screen component where you need to\n * reactively display errors and provide ways to dismiss them:\n *\n * @example\n * ```tsx\n * import { useErrors } from \"@auth0/auth0-acul-react\";\n *\n * export function SignupForm() {\n * const { errors, hasError, dismiss, dismissAll } = useErrors();\n *\n * return (\n * <div>\n * {hasError && (\n * <div className=\"mb-4\">\n * {errors.byType(\"auth0\").map(err => (\n * <div key={err.id} className=\"text-red-600\">\n * {err.message}\n * <button onClick={() => dismiss(err.id)}>Dismiss</button>\n * </div>\n * ))}\n * </div>\n * )}\n *\n * <button onClick={dismissAll}>Clear All Errors</button>\n * </div>\n * );\n * }\n * ```\n *\n * In addition to rendering messages, you can filter by field or type:\n * ```ts\n * console.log(errors.byType('validation')); // all validation errors\n * console.log(errors.byType('validation', { field: 'username' })); // validation errors for field 'username'\n * console.log(errors.byField('username')); // all errors for field 'username'\n * console.log(errors.byField('username', { type: 'auth0' })); // auth0 errors for field 'username'\n * ```\n */\n\nexport function useErrors(options: UseErrorOptions = {}): UseErrorsResult {\n const { includeDevErrors = false } = options;\n\n const snap = useSyncExternalStore(\n (cb) => errorStore.subscribe(cb),\n () => errorStore.snapshot()\n );\n\n const didInit = useRef(false);\n useEffect(() => {\n if (didInit.current) {\n return;\n }\n didInit.current = true;\n\n // Get server errors directly from TS SDK on first render.\n const server = (getServerErrors?.() ?? []) as Array<Omit<ErrorItem, 'id'>>;\n errorStore.replace('auth0', server);\n }, []);\n\n const serverTagged = useMemo(() => tag('auth0', snap.auth0), [snap.auth0]);\n const clientTagged = useMemo(() => tag('validation', snap.validation), [snap.validation]);\n const devTagged = useMemo(() => tag('configuration', snap.configuration), [snap.configuration]);\n\n const all = useMemo<ReadonlyArray<ErrorItem>>(\n () => Object.freeze([...(includeDevErrors ? devTagged : []), ...clientTagged, ...serverTagged]),\n [includeDevErrors, devTagged, clientTagged, serverTagged]\n );\n\n const errors: ErrorsResult = useMemo(() => {\n const arr = Object.assign([...all], {\n byType(type: ErrorType, opts?: { field?: string }): ReadonlyArray<ErrorItem> {\n let base: ReadonlyArray<ErrorItem>;\n if (type === 'validation') {\n base = clientTagged;\n } else if (type === 'configuration') {\n base = devTagged;\n } else {\n base = serverTagged;\n }\n if (opts?.field) {\n return Object.freeze(filterByField(base, opts.field));\n }\n return base;\n },\n byField(field: string, opts?: { type?: ErrorType }): ReadonlyArray<ErrorItem> {\n if (opts?.type) {\n return arr.byType(opts.type, { field });\n }\n return Object.freeze(filterByField(all, field));\n },\n });\n return Object.freeze(arr);\n }, [all, clientTagged, devTagged, serverTagged]);\n\n const hasError = all.length > 0;\n\n const dismiss = useCallback((id: string) => {\n errorStore.remove(ERROR_TYPES, id);\n }, []);\n\n const dismissAll = useCallback(() => {\n errorStore.clear(ERROR_TYPES);\n }, []);\n\n return useMemo(\n () => ({ errors, hasError, dismiss, dismissAll }),\n [errors, hasError, dismiss, dismissAll]\n );\n}\n\n// ---------------- INTERNAL (SDK-only) ----------------\nconst isPromise = (v: unknown): v is Promise<unknown> =>\n typeof v === 'object' &&\n v !== null &&\n 'then' in v &&\n typeof (v as { then: unknown }).then === 'function';\n\nfunction withError<T>(actionOrPromise: (() => T | Promise<T>) | Promise<T>): T | Promise<T> {\n const handle = (e: unknown) => {\n const type = classifyType(e);\n const normalized = toErrorObject(e);\n switch (type) {\n case 'validation':\n errorManager.replaceValidationErrors([normalized]);\n break;\n case 'configuration':\n errorManager.replaceDeveloperErrors([normalized]);\n break;\n case 'auth0':\n errorManager.replaceServerErrors([normalized]);\n break;\n default: {\n console.error('[auth0-acul-react] Unhandled error:', e);\n throw e;\n }\n }\n };\n\n if (typeof actionOrPromise === 'function') {\n try {\n const result = (actionOrPromise as () => T | Promise<T>)();\n return isPromise(result)\n ? result.catch((e) => {\n handle(e);\n throw e;\n })\n : result;\n } catch (e) {\n handle(e);\n throw e;\n }\n }\n\n return actionOrPromise.catch((e) => {\n handle(e);\n throw e;\n });\n}\n\n/**\n * @hidden\n * Internal error manager for use by SDK methods.\n * Use the `useErrors` hook in React components instead.\n */\nexport const errorManager = {\n withError,\n\n replaceValidationErrors(list: Array<Omit<ErrorItem, 'id'>>, opts?: { byField?: string }) {\n if (opts?.byField) {\n errorStore.replacePartial('validation', list, opts.byField);\n } else {\n errorStore.replace('validation', list);\n }\n },\n clearValidationErrors() {\n errorStore.clear(['validation']);\n },\n pushValidationErrors(list: Omit<ErrorItem, 'id'> | Array<Omit<ErrorItem, 'id'>>) {\n errorStore.push('validation', list);\n },\n\n replaceDeveloperErrors(list: Array<Omit<ErrorItem, 'id'>>, opts?: { byField?: string }) {\n if (opts?.byField) {\n errorStore.replacePartial('configuration', list, opts.byField);\n } else {\n errorStore.replace('configuration', list);\n }\n },\n clearDeveloperErrors() {\n errorStore.clear(['configuration']);\n },\n pushDeveloperErrors(list: Omit<ErrorItem, 'id'> | Array<Omit<ErrorItem, 'id'>>) {\n errorStore.push('configuration', list);\n },\n\n replaceServerErrors(list: Array<Omit<ErrorItem, 'id'>>, opts?: { byField?: string }) {\n if (opts?.byField) {\n errorStore.replacePartial('auth0', list, opts.byField);\n } else {\n errorStore.replace('auth0', list);\n }\n },\n clearServerErrors() {\n errorStore.clear(['auth0']);\n },\n pushServerErrors(list: Omit<ErrorItem, 'id'> | Array<Omit<ErrorItem, 'id'>>) {\n errorStore.push('auth0', list);\n },\n\n syncServerErrors() {\n const server = (getServerErrors?.() ?? []) as Array<Omit<ErrorItem, 'id'>>;\n errorStore.replace('auth0', server);\n },\n};\n\nexport { ErrorItem, ErrorType };\n"],"names":["filterByField","list","field","filter","e","cacheServer","WeakMap","cacheValidation","cacheDev","tag","type","arr","cache","hit","get","out","Object","freeze","map","set","useErrors","options","includeDevErrors","snap","useSyncExternalStore","cb","errorStore","subscribe","snapshot","didInit","useRef","useEffect","current","server","getServerErrors","replace","serverTagged","useMemo","auth0","clientTagged","validation","devTagged","configuration","all","errors","assign","byType","opts","base","byField","hasError","length","dismiss","useCallback","id","remove","ERROR_TYPES","dismissAll","clear","errorManager","withError","actionOrPromise","handle","ValidationError","ConfigurationError","Auth0ServerError","classifyType","normalized","code","Error","name","undefined","message","toErrorObject","replaceValidationErrors","replaceDeveloperErrors","replaceServerErrors","console","error","result","v","then","catch","replacePartial","clearValidationErrors","pushValidationErrors","push","clearDeveloperErrors","pushDeveloperErrors","clearServerErrors","pushServerErrors","syncServerErrors"],"mappings":"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"}
@@ -1,6 +1,6 @@
1
1
  export { useAuth0Themes } from './common/auth0-themes';
2
2
  export { useCurrentScreen } from './common/current-screen';
3
- export { errorManager, useErrors, type UseErrorOptions, type UseErrorsResult, type ErrorsResult, type ErrorKind, type ErrorItem, } from './common/errors';
3
+ export { errorManager, useErrors, type UseErrorOptions, type UseErrorsResult, type ErrorsResult, type ErrorType, type ErrorItem, } from './common/errors';
4
4
  export { ContextHooks } from './context';
5
5
  export { useLoginIdentifiers } from './utility/login-identifiers';
6
6
  export { useSignupIdentifiers } from './utility/signup-identifiers';
@@ -1,5 +1,5 @@
1
1
  import type { AcceptInvitationMembers, CustomOptions } from '@auth0/auth0-acul-js/accept-invitation';
2
2
  export declare const useUser: () => import("@auth0/auth0-acul-js").UserMembers, useTenant: () => import("@auth0/auth0-acul-js").TenantMembers, useBranding: () => import("@auth0/auth0-acul-js").BrandingMembers, useClient: () => import("@auth0/auth0-acul-js").ClientMembers, useOrganization: () => import("@auth0/auth0-acul-js").OrganizationMembers, usePrompt: () => import("@auth0/auth0-acul-js").PromptMembers, useScreen: () => import("@auth0/auth0-acul-js").ScreenMembersOnAcceptInvitation, useTransaction: () => import("@auth0/auth0-acul-js").TransactionMembers, useUntrustedData: () => import("@auth0/auth0-acul-js").UntrustedDataMembers;
3
3
  export declare const acceptInvitation: (payload?: CustomOptions) => void | Promise<void>;
4
- export { useCurrentScreen, useErrors, useAuth0Themes, type UseErrorOptions, type UseErrorsResult, type ErrorsResult, type ErrorKind, } from '../hooks';
4
+ export { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';
5
5
  export declare const useAcceptInvitation: () => AcceptInvitationMembers;
@@ -1 +1 @@
1
- {"version":3,"file":"accept-invitation.js","sources":["../../src/screens/accept-invitation.tsx"],"sourcesContent":["import AcceptInvitation from '@auth0/auth0-acul-js/accept-invitation';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type {\n AcceptInvitationMembers,\n CustomOptions,\n} from '@auth0/auth0-acul-js/accept-invitation';\n\n// Register the singleton instance of AcceptInvitation\nconst instance = registerScreen<AcceptInvitationMembers>(AcceptInvitation)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<AcceptInvitationMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const acceptInvitation = (payload?: CustomOptions) =>\n withError(instance.acceptInvitation(payload));\n\n// Common hooks\nexport {\n useCurrentScreen,\n useErrors,\n useAuth0Themes,\n type UseErrorOptions,\n type UseErrorsResult,\n type ErrorsResult,\n type ErrorKind,\n} from '../hooks';\n\n// Main instance hook. Returns singleton instance of AcceptInvitation\nexport const useAcceptInvitation = (): AcceptInvitationMembers => useMemo(() => instance, []);\n\n// Export all types from the core SDK for this screen\n"],"names":["instance","registerScreen","AcceptInvitation","withError","errorManager","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","acceptInvitation","payload","useAcceptInvitation","useMemo"],"mappings":"ibAaA,MAAMA,EAAWC,EAAwCC,IAGnDC,UAAEA,GAAcC,EAGhBC,EAAU,IAAIC,EAAsCN,IAC7CO,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAGSW,EAAoBC,GAC/Bd,EAAUH,EAASgB,iBAAiBC,IAczBC,EAAsB,IAA+BC,EAAQ,IAAMnB,EAAU"}
1
+ {"version":3,"file":"accept-invitation.js","sources":["../../src/screens/accept-invitation.tsx"],"sourcesContent":["import AcceptInvitation from '@auth0/auth0-acul-js/accept-invitation';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type {\n AcceptInvitationMembers,\n CustomOptions,\n} from '@auth0/auth0-acul-js/accept-invitation';\n\n// Register the singleton instance of AcceptInvitation\nconst instance = registerScreen<AcceptInvitationMembers>(AcceptInvitation)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<AcceptInvitationMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const acceptInvitation = (payload?: CustomOptions) =>\n withError(instance.acceptInvitation(payload));\n\n// Common hooks\nexport { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';\n\n// Main instance hook. Returns singleton instance of AcceptInvitation\nexport const useAcceptInvitation = (): AcceptInvitationMembers => useMemo(() => instance, []);\n"],"names":["instance","registerScreen","AcceptInvitation","withError","errorManager","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","acceptInvitation","payload","useAcceptInvitation","useMemo"],"mappings":"ibAaA,MAAMA,EAAWC,EAAwCC,IAGnDC,UAAEA,GAAcC,EAGhBC,EAAU,IAAIC,EAAsCN,IAC7CO,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAGSW,EAAoBC,GAC/Bd,EAAUH,EAASgB,iBAAiBC,IAMzBC,EAAsB,IAA+BC,EAAQ,IAAMnB,EAAU"}
@@ -2,5 +2,5 @@ import type { ConsentMembers, CustomOptions } from '@auth0/auth0-acul-js/consent
2
2
  export declare const useUser: () => import("@auth0/auth0-acul-js").UserMembers, useTenant: () => import("@auth0/auth0-acul-js").TenantMembers, useBranding: () => import("@auth0/auth0-acul-js").BrandingMembers, useClient: () => import("@auth0/auth0-acul-js").ClientMembers, useOrganization: () => import("@auth0/auth0-acul-js").OrganizationMembers, usePrompt: () => import("@auth0/auth0-acul-js").PromptMembers, useScreen: () => import("@auth0/auth0-acul-js").ScreenMembersOnConsent, useTransaction: () => import("@auth0/auth0-acul-js").TransactionMembers, useUntrustedData: () => import("@auth0/auth0-acul-js").UntrustedDataMembers;
3
3
  export declare const accept: (payload?: CustomOptions) => void | Promise<void>;
4
4
  export declare const deny: (payload?: CustomOptions) => void | Promise<void>;
5
- export { useCurrentScreen, useErrors, useAuth0Themes, type UseErrorOptions, type UseErrorsResult, type ErrorsResult, type ErrorKind, } from '../hooks';
5
+ export { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';
6
6
  export declare const useConsent: () => ConsentMembers;
@@ -1 +1 @@
1
- {"version":3,"file":"consent.js","sources":["../../src/screens/consent.tsx"],"sourcesContent":["import Consent from '@auth0/auth0-acul-js/consent';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type { ConsentMembers, CustomOptions } from '@auth0/auth0-acul-js/consent';\n\n// Register the singleton instance of Consent\nconst instance = registerScreen<ConsentMembers>(Consent)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<ConsentMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const accept = (payload?: CustomOptions) => withError(instance.accept(payload));\nexport const deny = (payload?: CustomOptions) => withError(instance.deny(payload));\n\n// Common hooks\nexport {\n useCurrentScreen,\n useErrors,\n useAuth0Themes,\n type UseErrorOptions,\n type UseErrorsResult,\n type ErrorsResult,\n type ErrorKind,\n} from '../hooks';\n\n// Main instance hook. Returns singleton instance of Consent\nexport const useConsent = (): ConsentMembers => useMemo(() => instance, []);\n\n// Export all types from the core SDK for this screen\n"],"names":["instance","registerScreen","Consent","withError","errorManager","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","accept","payload","deny","useConsent","useMemo"],"mappings":"uaAUA,MAAMA,EAAWC,EAA+BC,IAG1CC,UAAEA,GAAcC,EAGhBC,EAAU,IAAIC,EAA6BN,IACpCO,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAGSW,EAAUC,GAA4Bd,EAAUH,EAASgB,OAAOC,IAChEC,EAAQD,GAA4Bd,EAAUH,EAASkB,KAAKD,IAc5DE,EAAa,IAAsBC,EAAQ,IAAMpB,EAAU"}
1
+ {"version":3,"file":"consent.js","sources":["../../src/screens/consent.tsx"],"sourcesContent":["import Consent from '@auth0/auth0-acul-js/consent';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type { ConsentMembers, CustomOptions } from '@auth0/auth0-acul-js/consent';\n\n// Register the singleton instance of Consent\nconst instance = registerScreen<ConsentMembers>(Consent)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<ConsentMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const accept = (payload?: CustomOptions) => withError(instance.accept(payload));\nexport const deny = (payload?: CustomOptions) => withError(instance.deny(payload));\n\n// Common hooks\nexport { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';\n\n// Main instance hook. Returns singleton instance of Consent\nexport const useConsent = (): ConsentMembers => useMemo(() => instance, []);\n"],"names":["instance","registerScreen","Consent","withError","errorManager","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","accept","payload","deny","useConsent","useMemo"],"mappings":"uaAUA,MAAMA,EAAWC,EAA+BC,IAG1CC,UAAEA,GAAcC,EAGhBC,EAAU,IAAIC,EAA6BN,IACpCO,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAGSW,EAAUC,GAA4Bd,EAAUH,EAASgB,OAAOC,IAChEC,EAAQD,GAA4Bd,EAAUH,EAASkB,KAAKD,IAM5DE,EAAa,IAAsBC,EAAQ,IAAMpB,EAAU"}
@@ -2,5 +2,5 @@ import type { CustomizedConsentMembers, CustomOptions } from '@auth0/auth0-acul-
2
2
  export declare const useUser: () => import("@auth0/auth0-acul-js").UserMembers, useTenant: () => import("@auth0/auth0-acul-js").TenantMembers, useBranding: () => import("@auth0/auth0-acul-js").BrandingMembers, useClient: () => import("@auth0/auth0-acul-js").ClientMembers, useOrganization: () => import("@auth0/auth0-acul-js").OrganizationMembers, usePrompt: () => import("@auth0/auth0-acul-js").PromptMembers, useScreen: () => import("@auth0/auth0-acul-js").ScreenMembersOnCustomizedConsent, useTransaction: () => import("@auth0/auth0-acul-js").TransactionMembers, useUntrustedData: () => import("@auth0/auth0-acul-js").UntrustedDataMembers;
3
3
  export declare const accept: (payload?: CustomOptions) => void | Promise<void>;
4
4
  export declare const deny: (payload?: CustomOptions) => void | Promise<void>;
5
- export { useCurrentScreen, useErrors, useAuth0Themes, type UseErrorOptions, type UseErrorsResult, type ErrorsResult, type ErrorKind, } from '../hooks';
5
+ export { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';
6
6
  export declare const useCustomizedConsent: () => CustomizedConsentMembers;
@@ -1 +1 @@
1
- {"version":3,"file":"customized-consent.js","sources":["../../src/screens/customized-consent.tsx"],"sourcesContent":["import CustomizedConsent from '@auth0/auth0-acul-js/customized-consent';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type {\n CustomizedConsentMembers,\n CustomOptions,\n} from '@auth0/auth0-acul-js/customized-consent';\n\n// Register the singleton instance of CustomizedConsent\nconst instance = registerScreen<CustomizedConsentMembers>(CustomizedConsent)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<CustomizedConsentMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const accept = (payload?: CustomOptions) => withError(instance.accept(payload));\nexport const deny = (payload?: CustomOptions) => withError(instance.deny(payload));\n\n// Common hooks\nexport {\n useCurrentScreen,\n useErrors,\n useAuth0Themes,\n type UseErrorOptions,\n type UseErrorsResult,\n type ErrorsResult,\n type ErrorKind,\n} from '../hooks';\n\n// Main instance hook. Returns singleton instance of CustomizedConsent\nexport const useCustomizedConsent = (): CustomizedConsentMembers => useMemo(() => instance, []);\n\n// Export all types from the core SDK for this screen\n"],"names":["instance","registerScreen","CustomizedConsent","withError","errorManager","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","accept","payload","deny","useCustomizedConsent","useMemo"],"mappings":"kbAaA,MAAMA,EAAWC,EAAyCC,IAGpDC,UAAEA,GAAcC,EAGhBC,EAAU,IAAIC,EAAuCN,IAC9CO,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAGSW,EAAUC,GAA4Bd,EAAUH,EAASgB,OAAOC,IAChEC,EAAQD,GAA4Bd,EAAUH,EAASkB,KAAKD,IAc5DE,EAAuB,IAAgCC,EAAQ,IAAMpB,EAAU"}
1
+ {"version":3,"file":"customized-consent.js","sources":["../../src/screens/customized-consent.tsx"],"sourcesContent":["import CustomizedConsent from '@auth0/auth0-acul-js/customized-consent';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type {\n CustomizedConsentMembers,\n CustomOptions,\n} from '@auth0/auth0-acul-js/customized-consent';\n\n// Register the singleton instance of CustomizedConsent\nconst instance = registerScreen<CustomizedConsentMembers>(CustomizedConsent)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<CustomizedConsentMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const accept = (payload?: CustomOptions) => withError(instance.accept(payload));\nexport const deny = (payload?: CustomOptions) => withError(instance.deny(payload));\n\n// Common hooks\nexport { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';\n\n// Main instance hook. Returns singleton instance of CustomizedConsent\nexport const useCustomizedConsent = (): CustomizedConsentMembers => useMemo(() => instance, []);\n"],"names":["instance","registerScreen","CustomizedConsent","withError","errorManager","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","accept","payload","deny","useCustomizedConsent","useMemo"],"mappings":"kbAaA,MAAMA,EAAWC,EAAyCC,IAGpDC,UAAEA,GAAcC,EAGhBC,EAAU,IAAIC,EAAuCN,IAC9CO,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAGSW,EAAUC,GAA4Bd,EAAUH,EAASgB,OAAOC,IAChEC,EAAQD,GAA4Bd,EAAUH,EAASkB,KAAKD,IAM5DE,EAAuB,IAAgCC,EAAQ,IAAMpB,EAAU"}
@@ -1,4 +1,4 @@
1
1
  import type { DeviceCodeActivationAllowedMembers } from '@auth0/auth0-acul-js/device-code-activation-allowed';
2
2
  export declare const useUser: () => import("@auth0/auth0-acul-js").UserMembers, useTenant: () => import("@auth0/auth0-acul-js").TenantMembers, useBranding: () => import("@auth0/auth0-acul-js").BrandingMembers, useClient: () => import("@auth0/auth0-acul-js").ClientMembers, useOrganization: () => import("@auth0/auth0-acul-js").OrganizationMembers, usePrompt: () => import("@auth0/auth0-acul-js").PromptMembers, useScreen: () => import("@auth0/auth0-acul-js").ScreenMembers, useTransaction: () => import("@auth0/auth0-acul-js").TransactionMembers, useUntrustedData: () => import("@auth0/auth0-acul-js").UntrustedDataMembers;
3
- export { useCurrentScreen, useErrors, useAuth0Themes, type UseErrorOptions, type UseErrorsResult, type ErrorsResult, type ErrorKind, } from '../hooks';
3
+ export { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';
4
4
  export declare const useDeviceCodeActivationAllowed: () => DeviceCodeActivationAllowedMembers;
@@ -1 +1 @@
1
- {"version":3,"file":"device-code-activation-allowed.js","sources":["../../src/screens/device-code-activation-allowed.tsx"],"sourcesContent":["import DeviceCodeActivationAllowed from '@auth0/auth0-acul-js/device-code-activation-allowed';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type { DeviceCodeActivationAllowedMembers } from '@auth0/auth0-acul-js/device-code-activation-allowed';\n\n// Register the singleton instance of DeviceCodeActivationAllowed\nconst instance = registerScreen<DeviceCodeActivationAllowedMembers>(DeviceCodeActivationAllowed)!;\n\n// Context hooks\nconst factory = new ContextHooks<DeviceCodeActivationAllowedMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Common hooks\nexport {\n useCurrentScreen,\n useErrors,\n useAuth0Themes,\n type UseErrorOptions,\n type UseErrorsResult,\n type ErrorsResult,\n type ErrorKind,\n} from '../hooks';\n\n// Main instance hook. Returns singleton instance of DeviceCodeActivationAllowed\nexport const useDeviceCodeActivationAllowed = (): DeviceCodeActivationAllowedMembers =>\n useMemo(() => instance, []);\n\n// Export all types from the core SDK for this screen\n"],"names":["instance","registerScreen","DeviceCodeActivationAllowed","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","useDeviceCodeActivationAllowed","useMemo"],"mappings":"qYASA,MAAMA,EAAWC,EAAmDC,GAG9DC,EAAU,IAAIC,EAAiDJ,IACxDK,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAcSW,EAAiC,IAC5CC,EAAQ,IAAMf,EAAU"}
1
+ {"version":3,"file":"device-code-activation-allowed.js","sources":["../../src/screens/device-code-activation-allowed.tsx"],"sourcesContent":["import DeviceCodeActivationAllowed from '@auth0/auth0-acul-js/device-code-activation-allowed';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type { DeviceCodeActivationAllowedMembers } from '@auth0/auth0-acul-js/device-code-activation-allowed';\n\n// Register the singleton instance of DeviceCodeActivationAllowed\nconst instance = registerScreen<DeviceCodeActivationAllowedMembers>(DeviceCodeActivationAllowed)!;\n\n// Context hooks\nconst factory = new ContextHooks<DeviceCodeActivationAllowedMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Common hooks\nexport { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';\n\n// Main instance hook. Returns singleton instance of DeviceCodeActivationAllowed\nexport const useDeviceCodeActivationAllowed = (): DeviceCodeActivationAllowedMembers =>\n useMemo(() => instance, []);\n"],"names":["instance","registerScreen","DeviceCodeActivationAllowed","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","useDeviceCodeActivationAllowed","useMemo"],"mappings":"qYASA,MAAMA,EAAWC,EAAmDC,GAG9DC,EAAU,IAAIC,EAAiDJ,IACxDK,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAMSW,EAAiC,IAC5CC,EAAQ,IAAMf,EAAU"}
@@ -1,4 +1,4 @@
1
1
  import type { DeviceCodeActivationDeniedMembers } from '@auth0/auth0-acul-js/device-code-activation-denied';
2
2
  export declare const useUser: () => import("@auth0/auth0-acul-js").UserMembers, useTenant: () => import("@auth0/auth0-acul-js").TenantMembers, useBranding: () => import("@auth0/auth0-acul-js").BrandingMembers, useClient: () => import("@auth0/auth0-acul-js").ClientMembers, useOrganization: () => import("@auth0/auth0-acul-js").OrganizationMembers, usePrompt: () => import("@auth0/auth0-acul-js").PromptMembers, useScreen: () => import("@auth0/auth0-acul-js").ScreenMembers, useTransaction: () => import("@auth0/auth0-acul-js").TransactionMembers, useUntrustedData: () => import("@auth0/auth0-acul-js").UntrustedDataMembers;
3
- export { useCurrentScreen, useErrors, useAuth0Themes, type UseErrorOptions, type UseErrorsResult, type ErrorsResult, type ErrorKind, } from '../hooks';
3
+ export { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';
4
4
  export declare const useDeviceCodeActivationDenied: () => DeviceCodeActivationDeniedMembers;
@@ -1 +1 @@
1
- {"version":3,"file":"device-code-activation-denied.js","sources":["../../src/screens/device-code-activation-denied.tsx"],"sourcesContent":["import DeviceCodeActivationDenied from '@auth0/auth0-acul-js/device-code-activation-denied';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type { DeviceCodeActivationDeniedMembers } from '@auth0/auth0-acul-js/device-code-activation-denied';\n\n// Register the singleton instance of DeviceCodeActivationDenied\nconst instance = registerScreen<DeviceCodeActivationDeniedMembers>(DeviceCodeActivationDenied)!;\n\n// Context hooks\nconst factory = new ContextHooks<DeviceCodeActivationDeniedMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Common hooks\nexport {\n useCurrentScreen,\n useErrors,\n useAuth0Themes,\n type UseErrorOptions,\n type UseErrorsResult,\n type ErrorsResult,\n type ErrorKind,\n} from '../hooks';\n\n// Main instance hook. Returns singleton instance of DeviceCodeActivationDenied\nexport const useDeviceCodeActivationDenied = (): DeviceCodeActivationDeniedMembers =>\n useMemo(() => instance, []);\n\n// Export all types from the core SDK for this screen\n"],"names":["instance","registerScreen","DeviceCodeActivationDenied","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","useDeviceCodeActivationDenied","useMemo"],"mappings":"oYASA,MAAMA,EAAWC,EAAkDC,GAG7DC,EAAU,IAAIC,EAAgDJ,IACvDK,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAcSW,EAAgC,IAC3CC,EAAQ,IAAMf,EAAU"}
1
+ {"version":3,"file":"device-code-activation-denied.js","sources":["../../src/screens/device-code-activation-denied.tsx"],"sourcesContent":["import DeviceCodeActivationDenied from '@auth0/auth0-acul-js/device-code-activation-denied';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type { DeviceCodeActivationDeniedMembers } from '@auth0/auth0-acul-js/device-code-activation-denied';\n\n// Register the singleton instance of DeviceCodeActivationDenied\nconst instance = registerScreen<DeviceCodeActivationDeniedMembers>(DeviceCodeActivationDenied)!;\n\n// Context hooks\nconst factory = new ContextHooks<DeviceCodeActivationDeniedMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Common hooks\nexport { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';\n\n// Main instance hook. Returns singleton instance of DeviceCodeActivationDenied\nexport const useDeviceCodeActivationDenied = (): DeviceCodeActivationDeniedMembers =>\n useMemo(() => instance, []);\n"],"names":["instance","registerScreen","DeviceCodeActivationDenied","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","useDeviceCodeActivationDenied","useMemo"],"mappings":"oYASA,MAAMA,EAAWC,EAAkDC,GAG7DC,EAAU,IAAIC,EAAgDJ,IACvDK,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAMSW,EAAgC,IAC3CC,EAAQ,IAAMf,EAAU"}
@@ -1,5 +1,5 @@
1
1
  import type { DeviceCodeActivationMembers, ContinueOptions } from '@auth0/auth0-acul-js/device-code-activation';
2
2
  export declare const useUser: () => import("@auth0/auth0-acul-js").UserMembers, useTenant: () => import("@auth0/auth0-acul-js").TenantMembers, useBranding: () => import("@auth0/auth0-acul-js").BrandingMembers, useClient: () => import("@auth0/auth0-acul-js").ClientMembers, useOrganization: () => import("@auth0/auth0-acul-js").OrganizationMembers, usePrompt: () => import("@auth0/auth0-acul-js").PromptMembers, useScreen: () => import("@auth0/auth0-acul-js").ScreenMembers, useTransaction: () => import("@auth0/auth0-acul-js").TransactionMembers, useUntrustedData: () => import("@auth0/auth0-acul-js").UntrustedDataMembers;
3
3
  export declare const continueMethod: (payload: ContinueOptions) => void | Promise<void>;
4
- export { useCurrentScreen, useErrors, useAuth0Themes, type UseErrorOptions, type UseErrorsResult, type ErrorsResult, type ErrorKind, } from '../hooks';
4
+ export { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';
5
5
  export declare const useDeviceCodeActivation: () => DeviceCodeActivationMembers;
@@ -1 +1 @@
1
- {"version":3,"file":"device-code-activation.js","sources":["../../src/screens/device-code-activation.tsx"],"sourcesContent":["import DeviceCodeActivation from '@auth0/auth0-acul-js/device-code-activation';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type {\n DeviceCodeActivationMembers,\n ContinueOptions,\n} from '@auth0/auth0-acul-js/device-code-activation';\n\n// Register the singleton instance of DeviceCodeActivation\nconst instance = registerScreen<DeviceCodeActivationMembers>(DeviceCodeActivation)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<DeviceCodeActivationMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const continueMethod = (payload: ContinueOptions) => withError(instance.continue(payload));\n\n// Common hooks\nexport {\n useCurrentScreen,\n useErrors,\n useAuth0Themes,\n type UseErrorOptions,\n type UseErrorsResult,\n type ErrorsResult,\n type ErrorKind,\n} from '../hooks';\n\n// Main instance hook. Returns singleton instance of DeviceCodeActivation\nexport const useDeviceCodeActivation = (): DeviceCodeActivationMembers =>\n useMemo(() => instance, []);\n\n// Export all types from the core SDK for this screen\n"],"names":["instance","registerScreen","DeviceCodeActivation","withError","errorManager","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","continueMethod","payload","continue","useDeviceCodeActivation","useMemo"],"mappings":"sbAaA,MAAMA,EAAWC,EAA4CC,IAGvDC,UAAEA,GAAcC,EAGhBC,EAAU,IAAIC,EAA0CN,IACjDO,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAGSW,EAAkBC,GAA6Bd,EAAUH,EAASkB,SAASD,IAc3EE,EAA0B,IACrCC,EAAQ,IAAMpB,EAAU"}
1
+ {"version":3,"file":"device-code-activation.js","sources":["../../src/screens/device-code-activation.tsx"],"sourcesContent":["import DeviceCodeActivation from '@auth0/auth0-acul-js/device-code-activation';\nimport { useMemo } from 'react';\n\nimport { ContextHooks } from '../hooks';\nimport { errorManager } from '../hooks';\nimport { registerScreen } from '../state/instance-store';\n\nimport type {\n DeviceCodeActivationMembers,\n ContinueOptions,\n} from '@auth0/auth0-acul-js/device-code-activation';\n\n// Register the singleton instance of DeviceCodeActivation\nconst instance = registerScreen<DeviceCodeActivationMembers>(DeviceCodeActivation)!;\n\n// Error wrapper\nconst { withError } = errorManager;\n\n// Context hooks\nconst factory = new ContextHooks<DeviceCodeActivationMembers>(instance);\nexport const {\n useUser,\n useTenant,\n useBranding,\n useClient,\n useOrganization,\n usePrompt,\n useScreen,\n useTransaction,\n useUntrustedData,\n} = factory;\n\n// Submit functions\nexport const continueMethod = (payload: ContinueOptions) => withError(instance.continue(payload));\n\n// Common hooks\nexport { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';\n\n// Main instance hook. Returns singleton instance of DeviceCodeActivation\nexport const useDeviceCodeActivation = (): DeviceCodeActivationMembers =>\n useMemo(() => instance, []);\n"],"names":["instance","registerScreen","DeviceCodeActivation","withError","errorManager","factory","ContextHooks","useUser","useTenant","useBranding","useClient","useOrganization","usePrompt","useScreen","useTransaction","useUntrustedData","continueMethod","payload","continue","useDeviceCodeActivation","useMemo"],"mappings":"sbAaA,MAAMA,EAAWC,EAA4CC,IAGvDC,UAAEA,GAAcC,EAGhBC,EAAU,IAAIC,EAA0CN,IACjDO,QACXA,EAAOC,UACPA,EAASC,YACTA,EAAWC,UACXA,EAASC,gBACTA,EAAeC,UACfA,EAASC,UACTA,EAASC,eACTA,EAAcC,iBACdA,GACEV,EAGSW,EAAkBC,GAA6Bd,EAAUH,EAASkB,SAASD,IAM3EE,EAA0B,IACrCC,EAAQ,IAAMpB,EAAU"}
@@ -2,5 +2,5 @@ import type { DeviceCodeConfirmationMembers, CustomOptions } from '@auth0/auth0-
2
2
  export declare const useUser: () => import("@auth0/auth0-acul-js").UserMembers, useTenant: () => import("@auth0/auth0-acul-js").TenantMembers, useBranding: () => import("@auth0/auth0-acul-js").BrandingMembers, useClient: () => import("@auth0/auth0-acul-js").ClientMembers, useOrganization: () => import("@auth0/auth0-acul-js").OrganizationMembers, usePrompt: () => import("@auth0/auth0-acul-js").PromptMembers, useScreen: () => import("@auth0/auth0-acul-js").ScreenMembersOnDeviceCodeConfirmation, useTransaction: () => import("@auth0/auth0-acul-js").TransactionMembers, useUntrustedData: () => import("@auth0/auth0-acul-js").UntrustedDataMembers;
3
3
  export declare const confirm: (payload?: CustomOptions) => void | Promise<void>;
4
4
  export declare const cancel: (payload?: CustomOptions) => void | Promise<void>;
5
- export { useCurrentScreen, useErrors, useAuth0Themes, type UseErrorOptions, type UseErrorsResult, type ErrorsResult, type ErrorKind, } from '../hooks';
5
+ export { useCurrentScreen, useErrors, useAuth0Themes } from '../hooks';
6
6
  export declare const useDeviceCodeConfirmation: () => DeviceCodeConfirmationMembers;