@coinbase/cdp-react 0.0.109 → 0.0.110

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 (101) hide show
  1. package/dist/assets/OAuthStatusModal.css +1 -1
  2. package/dist/assets/SignIn.css +1 -1
  3. package/dist/assets/SignInImage.css +1 -1
  4. package/dist/assets/StatusView.css +1 -0
  5. package/dist/assets/SwitchTransition.css +1 -1
  6. package/dist/chunks/{CDPReactProvider.CFWIUvzR.js → CDPReactProvider.BWInVuNJ.js} +89 -86
  7. package/dist/chunks/LinkAuthFlow.0FnIchwa.js +144 -0
  8. package/dist/chunks/index.Du1vsLh6.js +23 -0
  9. package/dist/components/CDPReactProvider/index.d.ts +7 -1
  10. package/dist/components/CDPReactProvider/index.js +11 -7
  11. package/dist/components/EnrollMfa/index.js +1 -1
  12. package/dist/components/EnrollMfaModal/index.js +1 -1
  13. package/dist/components/ExportWallet/index.js +6 -4
  14. package/dist/components/ExportWalletModal/index.js +1 -1
  15. package/dist/components/Fund/index.js +1 -1
  16. package/dist/components/FundModal/index.js +1 -1
  17. package/dist/components/LinkAuth/LinkAuthFlow.js +9 -5
  18. package/dist/components/LinkAuth/LinkAuthFlowBackButton.js +2 -2
  19. package/dist/components/LinkAuth/LinkAuthFlowProvider.d.ts +22 -8
  20. package/dist/components/LinkAuth/LinkAuthFlowProvider.js +2 -2
  21. package/dist/components/LinkAuth/LinkAuthItem.js +1 -1
  22. package/dist/components/LinkAuth/LinkAuthItems.js +35 -28
  23. package/dist/components/LinkAuth/LinkAuthProvider.js +25 -18
  24. package/dist/components/LinkAuth/index.d.ts +2 -2
  25. package/dist/components/LinkAuth/index.js +63 -62
  26. package/dist/components/LinkAuth/types.d.ts +6 -1
  27. package/dist/components/LinkAuth/types.js +5 -3
  28. package/dist/components/LinkAuth/utils.js +3 -3
  29. package/dist/components/LinkAuthModal/index.d.ts +1 -1
  30. package/dist/components/LinkAuthModal/index.js +56 -46
  31. package/dist/components/OAuthStatusModal/index.js +113 -135
  32. package/dist/components/SignIn/SignInAuthMethodButtons.d.ts +5 -2
  33. package/dist/components/SignIn/SignInAuthMethodButtons.js +83 -52
  34. package/dist/components/SignIn/SignInBackButton.js +1 -1
  35. package/dist/components/SignIn/SignInDescription.js +2 -2
  36. package/dist/components/SignIn/SignInForm.js +2 -2
  37. package/dist/components/SignIn/SignInImage.d.ts +12 -3
  38. package/dist/components/SignIn/SignInImage.js +36 -13
  39. package/dist/components/SignIn/SignInProvider.js +5 -4
  40. package/dist/components/SignIn/SignInTitle.js +2 -2
  41. package/dist/components/SignIn/flows/SignInWithEmail.d.ts +0 -4
  42. package/dist/components/SignIn/flows/SignInWithEmail.js +73 -74
  43. package/dist/components/SignIn/flows/SignInWithOAuth.js +1 -1
  44. package/dist/components/SignIn/flows/SignInWithSiwe.d.ts +27 -0
  45. package/dist/components/SignIn/flows/SignInWithSiwe.js +63 -0
  46. package/dist/components/SignIn/flows/SignInWithSms.d.ts +0 -6
  47. package/dist/components/SignIn/flows/SignInWithSms.js +85 -86
  48. package/dist/components/SignIn/hooks/useEmailForm.js +13 -13
  49. package/dist/components/SignIn/hooks/useFlowTransition.d.ts +14 -0
  50. package/dist/components/SignIn/hooks/useFlowTransition.js +13 -0
  51. package/dist/components/SignIn/hooks/useOTPForm.js +29 -29
  52. package/dist/components/SignIn/hooks/usePhoneNumberForm.js +10 -10
  53. package/dist/components/SignIn/hooks/useStartSiwe.d.ts +10 -0
  54. package/dist/components/SignIn/hooks/useStartSiwe.js +24 -0
  55. package/dist/components/SignIn/index.d.ts +2 -2
  56. package/dist/components/SignIn/index.js +29 -29
  57. package/dist/components/SignIn/types.d.ts +24 -2
  58. package/dist/components/SignIn/types.js +5 -1
  59. package/dist/components/SignIn/useSignInReducer.js +67 -46
  60. package/dist/components/SignInModal/index.d.ts +1 -1
  61. package/dist/components/SignInModal/index.js +77 -67
  62. package/dist/components/SiweStatusView/connectors/baseAccount.d.ts +22 -0
  63. package/dist/components/SiweStatusView/connectors/baseAccount.js +49 -0
  64. package/dist/components/SiweStatusView/connectors/siweConnectors.d.ts +6 -0
  65. package/dist/components/SiweStatusView/connectors/siweConnectors.js +9 -0
  66. package/dist/components/SiweStatusView/connectors/types.d.ts +45 -0
  67. package/dist/components/SiweStatusView/connectors/types.js +2 -0
  68. package/dist/components/SiweStatusView/getSiweErrorMessage.d.ts +13 -0
  69. package/dist/components/SiweStatusView/getSiweErrorMessage.js +15 -0
  70. package/dist/components/SiweStatusView/index.d.ts +36 -0
  71. package/dist/components/SiweStatusView/index.js +71 -0
  72. package/dist/components/SiweStatusView/toSiweProvider.d.ts +10 -0
  73. package/dist/components/SiweStatusView/toSiweProvider.js +13 -0
  74. package/dist/components/SiweStatusView/useSiweFlow.d.ts +37 -0
  75. package/dist/components/SiweStatusView/useSiweFlow.js +35 -0
  76. package/dist/components/VerifyMfa/index.js +1 -1
  77. package/dist/components/VerifyMfaInline/index.js +1 -1
  78. package/dist/components/VerifyMfaModal/index.js +1 -1
  79. package/dist/components/ui/StatusView/index.d.ts +35 -0
  80. package/dist/components/ui/StatusView/index.js +55 -0
  81. package/dist/components/ui/SwitchFadeTransition/index.d.ts +1 -1
  82. package/dist/components/ui/SwitchFadeTransition/index.js +8 -12
  83. package/dist/components/ui/SwitchSlideTransition/index.d.ts +1 -1
  84. package/dist/components/ui/SwitchSlideTransition/index.js +8 -12
  85. package/dist/components/ui/SwitchTransition/index.d.ts +10 -3
  86. package/dist/components/ui/SwitchTransition/index.js +99 -98
  87. package/dist/hooks/useVerifyMfaModal.js +1 -1
  88. package/dist/icons/IconBaseColorLogo.d.ts +10 -0
  89. package/dist/icons/IconBaseColorLogo.js +13 -0
  90. package/dist/icons/IconBaseLogo.d.ts +24 -0
  91. package/dist/icons/IconBaseLogo.js +13 -0
  92. package/dist/icons/index.d.ts +2 -0
  93. package/dist/icons/index.js +36 -32
  94. package/dist/index.js +230 -225
  95. package/dist/version.d.ts +1 -1
  96. package/dist/version.js +1 -1
  97. package/package.json +13 -6
  98. package/dist/assets/SwitchFadeTransition.css +0 -1
  99. package/dist/assets/SwitchSlideTransition.css +0 -1
  100. package/dist/chunks/LinkAuthFlow.S1XbYaG5.js +0 -111
  101. package/dist/chunks/index.IrJ_irKX.js +0 -17
@@ -1 +1 @@
1
- .OAuthStatusModal-module__oauth-status-modal___I69Ii{box-sizing:border-box;font:var(--cdp-web-font-size-base) / 1.5 var(--cdp-web-font-family-body);font-size:var(--cdp-web-font-size-base);font-optical-sizing:auto;background-color:var(--cdp-web-colors-page-bg-default);color:var(--cdp-web-colors-page-text-default);display:flex;flex-direction:column;align-items:center;justify-content:stretch;max-width:38.25em;padding:1em 2em;overflow:hidden;width:100%;height:100dvh;max-height:27.75em}.OAuthStatusModal-module__transition-wrapper___TmPRh,.OAuthStatusModal-module__status___vU6x7{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-grow:1;text-align:center}.OAuthStatusModal-module__status___vU6x7{width:100%;height:100%}.OAuthStatusModal-module__graphic___2fKoa{display:flex;align-items:center;justify-content:center;position:relative}.OAuthStatusModal-module__pad___oooMz{padding:.5em}.OAuthStatusModal-module__spinner___Q3dYq{width:5em;height:5em;margin:-.5em;color:var(--cdp-web-colors-line-primary)}.OAuthStatusModal-module__icon___Lj5Gf{color:var(--cdp-web-colors-page-text-default);position:absolute;display:flex;align-items:center;justify-content:center;width:2em;height:2em;top:50%;left:50%;transform:translate(-50%,-50%)}.OAuthStatusModal-module__icon___Lj5Gf svg{width:100%;height:auto}.OAuthStatusModal-module__icon-success___gqMWr svg{color:var(--cdp-web-colors-fg-positive)}.OAuthStatusModal-module__icon-error___psI7m svg{color:var(--cdp-web-colors-fg-negative)}.OAuthStatusModal-module__subhead___Pg9GI{font-size:1.25em;line-height:1.2;font-weight:600;margin:1em 0 .25em}.OAuthStatusModal-module__description___0qOZY{font-size:1.125em;font-variant-numeric:tabular-nums;color:var(--cdp-web-colors-page-text-muted);line-height:1.5;font-weight:400;margin:0 0 1em}.OAuthStatusModal-module__description___0qOZY:last-child{margin-bottom:0}.OAuthStatusModal-module__ring___mKwSb{border-radius:9999em;border:3px solid transparent;display:block;width:4em;height:4em}.OAuthStatusModal-module__ring-success___unyM9{border-color:var(--cdp-web-colors-line-positive)}.OAuthStatusModal-module__ring-error___OsgqU{border-color:var(--cdp-web-colors-line-negative)}.OAuthStatusModal-module__invisible___IeRd0{visibility:hidden}
1
+ .OAuthStatusModal-module__oauth-status-modal___I69Ii{box-sizing:border-box;font:var(--cdp-web-font-size-base) / 1.5 var(--cdp-web-font-family-body);font-size:var(--cdp-web-font-size-base);font-optical-sizing:auto;background-color:var(--cdp-web-colors-page-bg-default);color:var(--cdp-web-colors-page-text-default);display:flex;flex-direction:column;align-items:center;justify-content:stretch;max-width:38.25em;padding:1em 2em;overflow:hidden;width:100%;height:100dvh;max-height:27.75em}.OAuthStatusModal-module__transition-wrapper___TmPRh,.OAuthStatusModal-module__status___vU6x7{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-grow:1;text-align:center}.OAuthStatusModal-module__status___vU6x7{width:100%;height:100%}
@@ -1 +1 @@
1
- .SignIn-module__sign-in___cYpee{box-sizing:border-box;font:var(--cdp-web-font-size-base) / 1.5 var(--cdp-web-font-family-body);font-optical-sizing:auto;background-color:var(--cdp-web-colors-page-bg-default);color:var(--cdp-web-colors-page-text-default);display:flex;flex-direction:column;max-width:38.25em;padding:.75em 2em 1em;overflow:hidden;width:100%}.SignIn-module__title-desc-wrapper___VpPcA{display:flex;flex-direction:column;gap:1.5em;margin:1.5em 0}.SignIn-module__sign-in___cYpee *{box-sizing:border-box}.SignIn-module__back-button___bmE-y{align-self:flex-start}.SignIn-module__back-button-wrapper___Q9FA1{min-height:3em}.SignIn-module__footer___3Gkbc{margin-top:1.5em}
1
+ .SignIn-module__sign-in___cYpee{box-sizing:border-box;font:var(--cdp-web-font-size-base) / 1.5 var(--cdp-web-font-family-body);font-optical-sizing:auto;background-color:var(--cdp-web-colors-page-bg-default);color:var(--cdp-web-colors-page-text-default);display:flex;flex-direction:column;max-width:38.25em;padding:.75em 2em 1em;overflow:hidden;width:100%}.SignIn-module__title-desc-wrapper___VpPcA{display:flex;flex-direction:column;gap:.25em;margin:1.5em 0}.SignIn-module__sign-in___cYpee *{box-sizing:border-box}.SignIn-module__back-button___bmE-y{align-self:flex-start}.SignIn-module__back-button-wrapper___Q9FA1{min-height:3em}.SignIn-module__footer___3Gkbc{margin-top:1.5em}
@@ -1 +1 @@
1
- .SignInImage-module__logo___rlzt-{display:block;margin:0 auto;width:auto;height:64px;object-fit:cover}
1
+ .SignInImage-module__logo___rlzt-{display:block;margin:0 auto;width:auto;height:48px;object-fit:cover}.SignInImage-module__badge___PjB19{display:block;margin:0 auto;width:48px;height:48px}
@@ -0,0 +1 @@
1
+ .StatusView-module__status-view___DXdAF{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;text-align:center}.StatusView-module__graphic___wq1hU{display:flex;align-items:center;justify-content:center;position:relative}.StatusView-module__spinner___icv07{width:5em;height:5em;margin:-.5em;color:var(--cdp-web-colors-line-primary)}.StatusView-module__icon___4B8WP{color:var(--cdp-web-colors-page-text-default);position:absolute;display:flex;align-items:center;justify-content:center;width:2em;height:2em;top:50%;left:50%;transform:translate(-50%,-50%)}.StatusView-module__icon___4B8WP svg{width:100%;height:auto}.StatusView-module__icon-success___rj7r1 svg{color:var(--cdp-web-colors-fg-positive)}.StatusView-module__icon-error___sjTY6 svg{color:var(--cdp-web-colors-fg-negative)}.StatusView-module__subhead___xhgCR{font-size:1.25em;line-height:1.2;font-weight:600;margin:1em 0 .25em}.StatusView-module__description___gH-Dw{font-size:1.125em;font-variant-numeric:tabular-nums;color:var(--cdp-web-colors-page-text-muted);line-height:1.5;font-weight:400;margin:0 0 1em}.StatusView-module__description___gH-Dw:last-child{margin-bottom:0}.StatusView-module__ring___fK6w9{border-radius:9999em;border:3px solid transparent;display:block;width:4em;height:4em}.StatusView-module__ring-success___UCrQB{border-color:var(--cdp-web-colors-line-positive)}.StatusView-module__ring-error___yVzvS{border-color:var(--cdp-web-colors-line-negative)}.StatusView-module__invisible___BQHRn{visibility:hidden}
@@ -1 +1 @@
1
- .SwitchTransition-module__transition-wrapper___jrI35[data-animate-height=true]{--cdp-web-transition-height: min-cotent;height:var(--cdp-web-transition-height);transition:height var(--cdp-web-transition-timeout, .2s) ease-in-out}
1
+ .SwitchTransition-module__transition-wrapper___jrI35[data-animate-height=true]{--cdp-web-transition-height: min-content;height:var(--cdp-web-transition-height);transition:height var(--cdp-web-transition-timeout, .2s) ease-in-out}.SwitchTransition-module__transition-wrapper___jrI35[data-transition=fade]{position:relative}.SwitchTransition-module__transition-wrapper___jrI35 [data-transition=fade][data-status]{transition:opacity var(--cdp-web-transition-timeout, .2s);width:100%}.SwitchTransition-module__transition-wrapper___jrI35 [data-transition=fade][data-status=preEnter]{opacity:0}.SwitchTransition-module__transition-wrapper___jrI35 [data-transition=fade][data-status=exiting],.SwitchTransition-module__transition-wrapper___jrI35 [data-transition=fade][data-status=exited]{opacity:0;position:absolute;top:0;left:0}.SwitchTransition-module__transition-wrapper___jrI35 [data-transition=slide-left][data-status],.SwitchTransition-module__transition-wrapper___jrI35 [data-transition=slide-right][data-status]{width:100%;transition:opacity var(--cdp-web-transition-timeout, .2s),transform var(--cdp-web-transition-timeout, .2s)}.SwitchTransition-module__transition-wrapper___jrI35[data-transition=slide-left],.SwitchTransition-module__transition-wrapper___jrI35[data-transition=slide-right],.SwitchTransition-module__transition-wrapper___jrI35[data-transition=slide-left][data-animate-height=true]>div,.SwitchTransition-module__transition-wrapper___jrI35[data-transition=slide-right][data-animate-height=true]>div{display:flex;position:relative;width:100%}.SwitchTransition-module__transition-wrapper___jrI35[data-transition=slide-left][data-animate-height=true]>div,.SwitchTransition-module__transition-wrapper___jrI35[data-transition=slide-right][data-animate-height=true]>div{align-items:flex-start}.SwitchTransition-module__transition-wrapper___jrI35 [data-transition=slide-left][data-status=preEnter]{opacity:0;transform:translate3d(200%,0,0)}.SwitchTransition-module__transition-wrapper___jrI35 [data-transition=slide-left][data-status=exiting],.SwitchTransition-module__transition-wrapper___jrI35 [data-transition=slide-left][data-status=exited]{position:absolute;opacity:0;transform:translate3d(-200%,0,0)}.SwitchTransition-module__transition-wrapper___jrI35 [data-transition=slide-right][data-status=preEnter]{opacity:0;transform:translate3d(-200%,0,0)}.SwitchTransition-module__transition-wrapper___jrI35 [data-transition=slide-right][data-status=exiting],.SwitchTransition-module__transition-wrapper___jrI35 [data-transition=slide-right][data-status=exited]{position:absolute;opacity:0;transform:translate3d(200%,0,0)}
@@ -1,41 +1,43 @@
1
- import { jsx as t, jsxs as h, Fragment as x } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as h, Fragment as E } from "react/jsx-runtime";
2
2
  import { OAuth2ProviderType as ee, CDPContext as te, CDPHooksProvider as oe } from "@coinbase/cdp-hooks";
3
- import { useRef as g, useEffect as O, useCallback as d, useLayoutEffect as re, createContext as D, useState as B, useMemo as T, useContext as S, useId as $, lazy as ne } from "react";
4
- import { registerMfaListener as se, cancelMfaVerification as ie } from "@coinbase/cdp-core";
5
- import { A as ae, u as j } from "./useSendComponentCallOnce.BI4daEvm.js";
6
- import { ThemeProvider as ce } from "../components/ThemeProvider/index.js";
3
+ import { useRef as g, useEffect as O, useCallback as d, useLayoutEffect as re, createContext as D, useState as B, useMemo as T, useContext as P, useId as $, lazy as ne } from "react";
4
+ import { Button as j } from "../components/ui/Button/index.js";
5
+ import { siweConnectors as se } from "../components/SiweStatusView/connectors/siweConnectors.js";
6
+ import "libphonenumber-js";
7
+ import { registerMfaListener as ie, cancelMfaVerification as ae } from "@coinbase/cdp-core";
8
+ import { A as ce, u as J } from "./useSendComponentCallOnce.BI4daEvm.js";
7
9
  import { c as le } from "./lite.1fxw3LjI.js";
8
- import { Button as J } from "../components/ui/Button/index.js";
9
10
  import { Modal as fe, ModalContent as de, ModalClose as ue, ModalTitle as me, ModalTrigger as pe } from "../components/ui/Modal/index.js";
10
11
  import { VisuallyHidden as he } from "../components/ui/VisuallyHidden/index.js";
11
12
  import { VerifyMfaDescription as q } from "../components/VerifyMfa/VerifyMfaDescription.js";
12
13
  import { VerifyMfaFlow as z } from "../components/VerifyMfa/VerifyMfaFlow.js";
13
14
  import { VerifyMfaFlowBackButton as G } from "../components/VerifyMfa/VerifyMfaFlowBackButton.js";
14
15
  import { VerifyMfaFlowProvider as Me } from "../components/VerifyMfa/VerifyMfaFlowProvider.js";
15
- import { VerifyMfaFooter as X } from "../components/VerifyMfa/VerifyMfaFooter.js";
16
- import { VerifyMfaImage as Y } from "../components/VerifyMfa/VerifyMfaImage.js";
16
+ import { VerifyMfaFooter as W } from "../components/VerifyMfa/VerifyMfaFooter.js";
17
+ import { VerifyMfaImage as X } from "../components/VerifyMfa/VerifyMfaImage.js";
17
18
  import "../components/VerifyMfa/VerifyMfaItem.js";
18
19
  import "../components/VerifyMfa/VerifyMfaItems.js";
19
20
  import { VerifyMfaProvider as ye, useVerifyMfaContext as _e } from "../components/VerifyMfa/VerifyMfaProvider.js";
20
- import { VerifyMfaTitle as K } from "../components/VerifyMfa/VerifyMfaTitle.js";
21
+ import { VerifyMfaTitle as Y } from "../components/VerifyMfa/VerifyMfaTitle.js";
21
22
  import { IconXMark as ve } from "../icons/IconXMark.js";
22
23
  import { childrenHasComponent as I } from "../utils/childrenHasComponent.js";
23
- import '../assets/CDPReactProvider.css';function ge(e) {
24
+ import { ThemeProvider as ge } from "../components/ThemeProvider/index.js";
25
+ import '../assets/CDPReactProvider.css';function Ce(e) {
24
26
  const r = g(!1);
25
27
  O(() => {
26
- r.current || (ae.sendHookCallEvent({ name: e }), r.current = !0);
28
+ r.current || (ce.sendHookCallEvent({ name: e }), r.current = !0);
27
29
  }, [e]);
28
30
  }
29
- const Ce = "VerifyMfa-module__footer___3bANn", E = {
31
+ const Ve = "VerifyMfa-module__footer___3bANn", b = {
30
32
  "mfa-verification": "VerifyMfa-module__mfa-verification___txLpd",
31
33
  "mfa-verification-content": "VerifyMfa-module__mfa-verification-content___-ksMh",
32
- footer: Ce
33
- }, Ve = ({
34
+ footer: Ve
35
+ }, we = ({
34
36
  className: e = "",
35
37
  children: r,
36
38
  ...s
37
39
  }) => {
38
- const { state: o, dispatch: n } = _e(), { showCoinbaseFooter: l } = L(), a = g(o.step), c = g(null), u = d((i) => {
40
+ const { state: o, dispatch: n } = _e(), { showCoinbaseFooter: l } = k(), a = g(o.step), c = g(null), u = d((i) => {
39
41
  a.current !== i && (a.current = i, c.current?.transition.toggle(i));
40
42
  }, []), M = d(() => {
41
43
  o.step === "list" ? n({
@@ -62,35 +64,35 @@ const Ce = "VerifyMfa-module__footer___3bANn", E = {
62
64
  onSelectMethod: m,
63
65
  onShowMethodList: y,
64
66
  transitionRef: c,
65
- children: /* @__PURE__ */ h("div", { className: `${E["mfa-verification"]} ${e}`, ...s, children: [
67
+ children: /* @__PURE__ */ h("div", { className: `${b["mfa-verification"]} ${e}`, ...s, children: [
66
68
  _,
67
- !_ && /* @__PURE__ */ h(x, { children: [
69
+ !_ && /* @__PURE__ */ h(E, { children: [
68
70
  /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(G, {}) }),
69
- /* @__PURE__ */ h("div", { className: E["mfa-verification-content"], children: [
70
- /* @__PURE__ */ t(z, { children: ({ step: i, method: f, Content: C }) => /* @__PURE__ */ h("div", { className: E["mfa-verification-content"], children: [
71
- /* @__PURE__ */ t(Y, { step: i, method: f }),
71
+ /* @__PURE__ */ h("div", { className: b["mfa-verification-content"], children: [
72
+ /* @__PURE__ */ t(z, { children: ({ step: i, method: f, Content: C }) => /* @__PURE__ */ h("div", { className: b["mfa-verification-content"], children: [
73
+ /* @__PURE__ */ t(X, { step: i, method: f }),
72
74
  /* @__PURE__ */ h("div", { children: [
73
- /* @__PURE__ */ t(K, { step: i, method: f }),
75
+ /* @__PURE__ */ t(Y, { step: i, method: f }),
74
76
  /* @__PURE__ */ t(q, { step: i, method: f })
75
77
  ] }),
76
78
  C
77
79
  ] }) }),
78
- l && /* @__PURE__ */ t(X, { className: E.footer })
80
+ l && /* @__PURE__ */ t(W, { className: b.footer })
79
81
  ] })
80
82
  ] })
81
83
  ] })
82
84
  }
83
85
  );
84
- }, we = ({ onSuccess: e, onError: r, ...s }) => (j("verify_mfa"), /* @__PURE__ */ t(ye, { onError: r, onSuccess: e, children: /* @__PURE__ */ t(Ve, { ...s }) })), Pe = "VerifyMfaModal-module__verify___GZ6dw", Se = "VerifyMfaModal-module__content___BSj0G", Ae = "VerifyMfaModal-module__header___2plY9", xe = "VerifyMfaModal-module__trigger___YXiwC", Ee = "VerifyMfaModal-module__flow___HE2Lf", P = {
86
+ }, Se = ({ onSuccess: e, onError: r, ...s }) => (J("verify_mfa"), /* @__PURE__ */ t(ye, { onError: r, onSuccess: e, children: /* @__PURE__ */ t(we, { ...s }) })), Pe = "VerifyMfaModal-module__verify___GZ6dw", Ae = "VerifyMfaModal-module__content___BSj0G", Ee = "VerifyMfaModal-module__header___2plY9", be = "VerifyMfaModal-module__trigger___YXiwC", xe = "VerifyMfaModal-module__flow___HE2Lf", S = {
85
87
  verify: Pe,
86
- content: Se,
87
- header: Ae,
88
+ content: Ae,
89
+ header: Ee,
88
90
  "close-icon": "VerifyMfaModal-module__close-icon___pyobJ",
89
91
  "close-button": "VerifyMfaModal-module__close-button___h9yrq",
90
- trigger: xe,
91
- flow: Ee
92
- }, W = D(null), be = () => {
93
- const e = S(W);
92
+ trigger: be,
93
+ flow: xe
94
+ }, K = D(null), Oe = () => {
95
+ const e = P(K);
94
96
  if (!e)
95
97
  throw new Error("useVerifyMfaModalContext must be used within a VerifyMfaModal");
96
98
  return e;
@@ -99,37 +101,37 @@ const Ce = "VerifyMfa-module__footer___3bANn", E = {
99
101
  className: r = "",
100
102
  label: s,
101
103
  ...o
102
- }) => /* @__PURE__ */ t(pe, { asChild: !0, children: e || /* @__PURE__ */ t(J, { className: le(P.trigger, r), ...o, children: s || "Verify" }) }), b = ({ children: e, ...r }) => {
103
- const { onSuccess: s, onError: o } = be(), { showCoinbaseFooter: n } = L();
104
- return /* @__PURE__ */ t(de, { "aria-describedby": void 0, ...r, children: /* @__PURE__ */ t(we, { className: P.verify, onSuccess: s, onError: o, children: (l) => /* @__PURE__ */ h(x, { children: [
104
+ }) => /* @__PURE__ */ t(pe, { asChild: !0, children: e || /* @__PURE__ */ t(j, { className: le(S.trigger, r), ...o, children: s || "Verify" }) }), x = ({ children: e, ...r }) => {
105
+ const { onSuccess: s, onError: o } = Oe(), { showCoinbaseFooter: n } = k();
106
+ return /* @__PURE__ */ t(de, { "aria-describedby": void 0, ...r, children: /* @__PURE__ */ t(Se, { className: S.verify, onSuccess: s, onError: o, children: (l) => /* @__PURE__ */ h(E, { children: [
105
107
  e ? typeof e == "function" ? e(l) : e : null,
106
- !e && /* @__PURE__ */ h(x, { children: [
107
- /* @__PURE__ */ h("div", { className: P.header, children: [
108
+ !e && /* @__PURE__ */ h(E, { children: [
109
+ /* @__PURE__ */ h("div", { className: S.header, children: [
108
110
  /* @__PURE__ */ t("span", { children: /* @__PURE__ */ t(G, {}) }),
109
111
  /* @__PURE__ */ t(ue, { asChild: !0, children: /* @__PURE__ */ t(
110
- J,
112
+ j,
111
113
  {
112
- className: P["close-button"],
114
+ className: S["close-button"],
113
115
  "aria-label": "Close",
114
116
  size: "md",
115
117
  variant: "transparentSecondary",
116
- children: /* @__PURE__ */ t(ve, { className: P["close-icon"] })
118
+ children: /* @__PURE__ */ t(ve, { className: S["close-icon"] })
117
119
  }
118
120
  ) })
119
121
  ] }),
120
122
  /* @__PURE__ */ t(he, { children: /* @__PURE__ */ t(me, { asChild: !0, children: /* @__PURE__ */ t("span", { children: "Verify your identity" }) }) }),
121
- /* @__PURE__ */ t("div", { className: P.flow, children: /* @__PURE__ */ t(z, { children: ({ Content: a }) => /* @__PURE__ */ h("div", { className: P.content, children: [
122
- /* @__PURE__ */ t(Y, {}),
123
+ /* @__PURE__ */ t("div", { className: S.flow, children: /* @__PURE__ */ t(z, { children: ({ Content: a }) => /* @__PURE__ */ h("div", { className: S.content, children: [
124
+ /* @__PURE__ */ t(X, {}),
123
125
  /* @__PURE__ */ h("div", { children: [
124
- /* @__PURE__ */ t(K, {}),
126
+ /* @__PURE__ */ t(Y, {}),
125
127
  /* @__PURE__ */ t(q, {})
126
128
  ] }),
127
129
  a
128
130
  ] }) }) }),
129
- n && /* @__PURE__ */ t(X, {})
131
+ n && /* @__PURE__ */ t(W, {})
130
132
  ] })
131
133
  ] }) }) });
132
- }, Oe = ({
134
+ }, Te = ({
133
135
  children: e,
134
136
  open: r,
135
137
  setIsOpen: s,
@@ -137,7 +139,7 @@ const Ce = "VerifyMfa-module__footer___3bANn", E = {
137
139
  onError: n,
138
140
  onSuccess: l
139
141
  }) => {
140
- j("verify_mfa_modal");
142
+ J("verify_mfa_modal");
141
143
  const a = r !== void 0 && s !== void 0, [c, u] = B(!1), M = a ? r : c, m = g(!1), y = d(
142
144
  (v) => {
143
145
  m.current = !0, l?.(v);
@@ -148,19 +150,19 @@ const Ce = "VerifyMfa-module__footer___3bANn", E = {
148
150
  a ? s?.(v) : u(v), v || (m.current || o?.(), m.current = !1);
149
151
  },
150
152
  [a, s, u, o]
151
- ), i = e ? I(e, U) : !1, f = e ? I(e, b) : !1, C = !i && !f, A = T(
153
+ ), i = e ? I(e, U) : !1, f = e ? I(e, x) : !1, C = !i && !f, A = T(
152
154
  () => ({ onCancel: o, onError: n, onSuccess: y }),
153
155
  [o, n, y]
154
156
  );
155
- return /* @__PURE__ */ t(W.Provider, { value: A, children: /* @__PURE__ */ t(fe, { open: M, onOpenChange: _, children: C ? /* @__PURE__ */ h(x, { children: [
157
+ return /* @__PURE__ */ t(K.Provider, { value: A, children: /* @__PURE__ */ t(fe, { open: M, onOpenChange: _, children: C ? /* @__PURE__ */ h(E, { children: [
156
158
  /* @__PURE__ */ t(U, { children: e }),
157
- /* @__PURE__ */ t(b, {})
158
- ] }) : /* @__PURE__ */ h(x, { children: [
159
+ /* @__PURE__ */ t(x, {})
160
+ ] }) : /* @__PURE__ */ h(E, { children: [
159
161
  e,
160
- !f && /* @__PURE__ */ t(b, {})
162
+ !f && /* @__PURE__ */ t(x, {})
161
163
  ] }) }) });
162
- }, Te = (e) => e?.closest("[data-cdp-provider]")?.getAttribute?.("data-cdp-provider") ?? null, F = D(void 0), Ne = "__core_mfa_handler__", De = ({ children: e }) => {
163
- const { mfa: r } = L(), s = ke(), { disableAutoPrompt: o } = r, [n, l] = B(null), a = g(/* @__PURE__ */ new Map()), c = g(!1), u = d((p, V) => {
164
+ }, Ne = (e) => e?.closest("[data-cdp-provider]")?.getAttribute?.("data-cdp-provider") ?? null, H = D(void 0), De = "__core_mfa_handler__", He = ({ children: e }) => {
165
+ const { mfa: r } = k(), s = Ue(), { disableAutoPrompt: o } = r, [n, l] = B(null), a = g(/* @__PURE__ */ new Map()), c = g(!1), u = d((p, V) => {
164
166
  a.current.set(p, V);
165
167
  }, []), M = d((p) => {
166
168
  a.current.delete(p);
@@ -173,9 +175,9 @@ const Ce = "VerifyMfa-module__footer___3bANn", E = {
173
175
  p.focus();
174
176
  });
175
177
  }, []);
176
- O(() => o ? void 0 : se(() => {
177
- const V = document.activeElement, k = Te(V);
178
- k !== null && k !== s || (c.current = !0, _(Ne));
178
+ O(() => o ? void 0 : ie(() => {
179
+ const V = document.activeElement, R = Ne(V);
180
+ R !== null && R !== s || (c.current = !0, _(De));
179
181
  }), [o, _, s]);
180
182
  const f = n ? a.current.get(n)?.current : void 0, C = n !== null, A = d(
181
183
  (p) => {
@@ -189,13 +191,13 @@ const Ce = "VerifyMfa-module__footer___3bANn", E = {
189
191
  V !== null && (V === 0 ? i() : setTimeout(() => i(), V));
190
192
  },
191
193
  [f, i]
192
- ), R = d(
194
+ ), L = d(
193
195
  (p) => {
194
196
  f?.onError?.(p);
195
197
  },
196
198
  [f]
197
199
  ), N = d(() => {
198
- c.current && (ie(), c.current = !1), f?.onCancel?.();
200
+ c.current && (ae(), c.current = !1), f?.onCancel?.();
199
201
  }, [f]), Q = T(
200
202
  () => ({
201
203
  register: u,
@@ -205,27 +207,27 @@ const Ce = "VerifyMfa-module__footer___3bANn", E = {
205
207
  }),
206
208
  [u, M, _, i]
207
209
  );
208
- return /* @__PURE__ */ h(F.Provider, { value: Q, children: [
210
+ return /* @__PURE__ */ h(H.Provider, { value: Q, children: [
209
211
  e,
210
212
  /* @__PURE__ */ t(
211
- Oe,
213
+ Te,
212
214
  {
213
215
  open: C,
214
216
  setIsOpen: A,
215
217
  onSuccess: v,
216
- onError: R,
218
+ onError: L,
217
219
  onCancel: N,
218
- children: /* @__PURE__ */ t(b, {})
220
+ children: /* @__PURE__ */ t(x, {})
219
221
  }
220
222
  )
221
223
  ] });
222
- }, at = (e = {}) => {
223
- const r = S(F);
224
+ }, dt = (e = {}) => {
225
+ const r = P(H);
224
226
  if (!r)
225
227
  throw new Error(
226
228
  "useVerifyMfaModal must be used within a MfaVerificationProvider or CDPReactProvider"
227
229
  );
228
- ge("use_verify_mfa_modal");
230
+ Ce("use_verify_mfa_modal");
229
231
  const s = $(), o = g(e);
230
232
  O(() => {
231
233
  o.current = e;
@@ -236,7 +238,7 @@ const Ce = "VerifyMfa-module__footer___3bANn", E = {
236
238
  c();
237
239
  }, [c]);
238
240
  return { open: u, close: M };
239
- }, ct = () => S(F) ?? {
241
+ }, ut = () => P(H) ?? {
240
242
  register: () => {
241
243
  },
242
244
  unregister: () => {
@@ -250,12 +252,12 @@ const Ce = "VerifyMfa-module__footer___3bANn", E = {
250
252
  } catch {
251
253
  }
252
254
  return "";
253
- }, He = Object.keys(ee).map((e) => `oauth:${e}`), Le = [
255
+ }, ke = Object.keys(ee).map((e) => `oauth:${e}`), Le = Object.keys(se).map((e) => `siwe:${e}`), Re = [
254
256
  /** Email OTP method */
255
257
  "email",
256
258
  /** SMS OTP method */
257
259
  "sms"
258
- ], lt = [...Le, ...He], ft = ({
260
+ ], mt = [...Re, ...ke, ...Le], pt = ({
259
261
  children: e,
260
262
  className: r = "",
261
263
  config: s,
@@ -263,12 +265,12 @@ const Ce = "VerifyMfa-module__footer___3bANn", E = {
263
265
  style: n,
264
266
  theme: l
265
267
  }) => {
266
- const a = $(), c = o ?? a, { appName: u, appLogoUrl: M, showCoinbaseFooter: m, authMethods: y, ..._ } = s, i = Z(_), f = T(() => _, [i]), C = { appName: u, appLogoUrl: M, showCoinbaseFooter: m, authMethods: y }, A = y?.some((N) => N.startsWith("oauth:")), v = /* @__PURE__ */ t(Re, { name: c, config: C, children: /* @__PURE__ */ t(ce, { className: r, style: n, theme: l, "data-cdp-provider": c, children: /* @__PURE__ */ h(De, { children: [
268
+ const a = $(), c = o ?? a, { appName: u, appLogoUrl: M, showCoinbaseFooter: m, authMethods: y, ..._ } = s, i = Z(_), f = T(() => _, [i]), C = { appName: u, appLogoUrl: M, showCoinbaseFooter: m, authMethods: y }, A = y?.some((N) => N.startsWith("oauth:")), v = /* @__PURE__ */ t(Ie, { name: c, config: C, children: /* @__PURE__ */ t(ge, { className: r, style: n, theme: l, "data-cdp-provider": c, children: /* @__PURE__ */ h(He, { children: [
267
269
  e,
268
270
  A && /* @__PURE__ */ t(Fe, {})
269
271
  ] }) }) });
270
- return S(te) ? v : /* @__PURE__ */ t(oe, { config: f, children: v });
271
- }, H = D(
272
+ return P(te) ? v : /* @__PURE__ */ t(oe, { config: f, children: v });
273
+ }, F = D(
272
274
  void 0
273
275
  ), w = {
274
276
  appName: "",
@@ -278,7 +280,7 @@ const Ce = "VerifyMfa-module__footer___3bANn", E = {
278
280
  mfa: {
279
281
  disableAutoPrompt: !1
280
282
  }
281
- }, Re = ({
283
+ }, Ie = ({
282
284
  children: e,
283
285
  config: r,
284
286
  name: s
@@ -308,30 +310,31 @@ const Ce = "VerifyMfa-module__footer___3bANn", E = {
308
310
  name: s
309
311
  };
310
312
  }, [o, n, l, u, s, c]);
311
- return /* @__PURE__ */ t(H.Provider, { value: M, children: e });
312
- }, L = () => {
313
- const e = S(H);
313
+ return /* @__PURE__ */ t(F.Provider, { value: M, children: e });
314
+ }, k = () => {
315
+ const e = P(F);
314
316
  if (!e)
315
317
  throw new Error("useAppConfig must be used within an AppConfigProvider");
316
318
  return e.app;
317
- }, ke = () => {
318
- const e = S(H);
319
+ }, Ue = () => {
320
+ const e = P(F);
319
321
  if (!e)
320
322
  throw new Error("useProviderName must be used within an AppConfigProvider");
321
323
  return e.name ?? "";
322
324
  };
323
325
  export {
324
- lt as A,
325
- ft as C,
326
- He as O,
327
- we as V,
328
- ke as a,
329
- Le as b,
330
- Oe as c,
331
- b as d,
326
+ mt as A,
327
+ pt as C,
328
+ ke as O,
329
+ Le as S,
330
+ Se as V,
331
+ Ue as a,
332
+ Re as b,
333
+ Te as c,
334
+ x as d,
332
335
  U as e,
333
- at as f,
334
- De as g,
335
- ct as h,
336
- L as u
336
+ dt as f,
337
+ He as g,
338
+ ut as h,
339
+ k as u
337
340
  };
@@ -0,0 +1,144 @@
1
+ import { jsx as e, jsxs as d, Fragment as g } from "react/jsx-runtime";
2
+ import { createContext as E, useContext as N, useMemo as R, forwardRef as T, useRef as F, useImperativeHandle as b, useEffect as I, useState as _, useCallback as P } from "react";
3
+ import { u as L } from "./CDPReactProvider.BWInVuNJ.js";
4
+ import { SignIn as w } from "../components/SignIn/index.js";
5
+ import "@coinbase/cdp-hooks";
6
+ import { SwitchTransition as y } from "../components/ui/SwitchTransition/index.js";
7
+ import { VisuallyHidden as S } from "../components/ui/VisuallyHidden/index.js";
8
+ import { LinkAuthItems as O } from "../components/LinkAuth/LinkAuthItems.js";
9
+ import { useLinkAuthContext as H } from "../components/LinkAuth/LinkAuthProvider.js";
10
+ import { LINK_AUTH_FLOW_VIEWS as V } from "../components/LinkAuth/types.js";
11
+ import { SiweStatusView as M } from "../components/SiweStatusView/index.js";
12
+ import { CoinbaseFooter as A } from "../components/ui/CoinbaseFooter/index.js";
13
+ import { useSignInContext as j } from "../components/SignIn/SignInProvider.js";
14
+ import { SignInImage as G } from "../components/SignIn/SignInImage.js";
15
+ import { SignInForm as q } from "../components/SignIn/SignInForm.js";
16
+ import { SignInTitle as k } from "../components/SignIn/SignInTitle.js";
17
+ import { SignInDescription as v } from "../components/SignIn/SignInDescription.js";
18
+ import { toSiweProvider as U } from "../components/SiweStatusView/toSiweProvider.js";
19
+ import { useSiweFlow as W } from "../components/SiweStatusView/useSiweFlow.js";
20
+ import '../assets/LinkAuthFlow.css';const Z = "LinkAuthFlow-module__list___dkNmh", c = {
21
+ "sign-in": "LinkAuthFlow-module__sign-in___F2bj7",
22
+ "sign-in-title-desc-wrapper": "LinkAuthFlow-module__sign-in-title-desc-wrapper___6QeTc",
23
+ "sign-in-image": "LinkAuthFlow-module__sign-in-image___XGuJI",
24
+ "sign-in-form": "LinkAuthFlow-module__sign-in-form___REZlP",
25
+ "sign-in-footer": "LinkAuthFlow-module__sign-in-footer___KYZNd",
26
+ list: Z
27
+ }, C = E(null), f = () => {
28
+ const i = N(C);
29
+ if (!i)
30
+ throw new Error("useLinkAuthFlowInternal must be used within a LinkAuthFlowContext.Provider");
31
+ return i;
32
+ }, me = () => {
33
+ const {
34
+ signInRef: i,
35
+ transitionRef: l,
36
+ ...o
37
+ } = f();
38
+ return o;
39
+ }, de = ({
40
+ transitionName: i = "slide-left",
41
+ children: l,
42
+ onBack: o,
43
+ onLink: t,
44
+ onLinkSuccess: u,
45
+ signInRef: a,
46
+ transitionRef: n
47
+ }) => {
48
+ const s = R(() => ({
49
+ direction: i === "slide-right" ? "right" : "left",
50
+ transitionName: i,
51
+ back: o,
52
+ link: t,
53
+ linkSuccess: u,
54
+ signInRef: a,
55
+ transitionRef: n
56
+ }), [o, t, u, n, a, i]);
57
+ return /* @__PURE__ */ e(C.Provider, { value: s, children: l });
58
+ }, h = T((i, l) => {
59
+ const { showCoinbaseFooter: o } = L(), { state: t, dispatch: u } = j(), { linkSuccess: a } = f(), n = F(null);
60
+ return b(
61
+ l,
62
+ () => ({
63
+ canGoBack: t.step === "verification",
64
+ goBack: () => {
65
+ u({ type: "GO_TO_PREVIOUS_STEP" });
66
+ }
67
+ }),
68
+ [t.step, u]
69
+ ), I(() => {
70
+ let s;
71
+ return t.step === "credentials" && (s = setTimeout(() => {
72
+ n.current?.querySelector("input[type='email'], input[type='tel']")?.focus();
73
+ }, 300)), t.step === "verification" && (s = setTimeout(() => {
74
+ n.current?.querySelector("input[type='text']")?.focus();
75
+ }, 300)), () => clearTimeout(s);
76
+ }, [t.step]), /* @__PURE__ */ d(g, { children: [
77
+ /* @__PURE__ */ e("div", { className: c["sign-in-image"], children: /* @__PURE__ */ e(G, {}) }),
78
+ /* @__PURE__ */ e(q, { autoFocus: !1, onSuccess: a, children: ({ authMethod: s, step: r, Form: m }) => /* @__PURE__ */ d(g, { children: [
79
+ /* @__PURE__ */ d("div", { className: c["sign-in-title-desc-wrapper"], children: [
80
+ r === "verification" ? /* @__PURE__ */ e(S, { as: "div", children: /* @__PURE__ */ e(k, {}) }) : /* @__PURE__ */ e(k, {}),
81
+ r === "credentials" ? /* @__PURE__ */ e(S, { as: "div", children: /* @__PURE__ */ e(v, { authMethod: s }) }) : /* @__PURE__ */ e(v, { authMethod: s })
82
+ ] }),
83
+ /* @__PURE__ */ e("div", { ref: n, className: c["sign-in-form"], children: m })
84
+ ] }) }),
85
+ o && /* @__PURE__ */ e(A, { className: c["sign-in-footer"] })
86
+ ] });
87
+ });
88
+ h.displayName = "SignInContent";
89
+ const B = () => {
90
+ const { showCoinbaseFooter: i } = L(), { state: l } = H(), { linkSuccess: o } = f(), t = U(l.methodToLink ?? void 0), { start: u } = W(t ?? "base"), [a, n] = _("pending"), [s, r] = _(), m = F(!1), p = P(
91
+ () => u({
92
+ onStart: () => n("pending"),
93
+ onSuccess: () => {
94
+ n("success"), o();
95
+ },
96
+ onError: (x) => {
97
+ r(x), n("error");
98
+ }
99
+ }),
100
+ [u, o]
101
+ );
102
+ return I(() => {
103
+ m.current || !t || (m.current = !0, p());
104
+ }, [p, t]), t ? /* @__PURE__ */ d("div", { children: [
105
+ /* @__PURE__ */ e("div", { className: c["sign-in"], children: /* @__PURE__ */ e(
106
+ M,
107
+ {
108
+ provider: t,
109
+ status: a,
110
+ onRetry: p,
111
+ errorMessage: s,
112
+ animateHeight: !1
113
+ }
114
+ ) }),
115
+ i && /* @__PURE__ */ e(A, { className: c["sign-in-footer"] })
116
+ ] }) : null;
117
+ }, fe = ({ children: i }) => {
118
+ const { transitionName: l, link: o, linkSuccess: t, signInRef: u, transitionRef: a } = f();
119
+ return /* @__PURE__ */ e(
120
+ y,
121
+ {
122
+ autoFocus: !1,
123
+ animateHeight: !0,
124
+ items: V,
125
+ initialEntered: !0,
126
+ timeout: 250,
127
+ transitionName: l,
128
+ preEnter: !0,
129
+ mountOnEnter: !0,
130
+ unmountOnExit: !0,
131
+ transitionRef: a,
132
+ children: ({ itemKey: n, ...s }) => {
133
+ let r = null;
134
+ return n === "list" && (r = /* @__PURE__ */ e(O, { className: c.list, onLink: o })), n === "email" && (r = /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(w, { className: c["sign-in"], authMethods: ["email"], onSuccess: t, children: /* @__PURE__ */ e(h, { ref: u }) }) })), n === "sms" && (r = /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(w, { className: c["sign-in"], authMethods: ["sms"], onSuccess: t, children: /* @__PURE__ */ e(h, { ref: u }) }) })), n === "siwe" && (r = /* @__PURE__ */ e(B, {})), /* @__PURE__ */ e("div", { ...s, children: i ? i({ view: n, Content: r }) : r });
135
+ }
136
+ }
137
+ );
138
+ };
139
+ export {
140
+ de as L,
141
+ fe as a,
142
+ f as b,
143
+ me as u
144
+ };
@@ -0,0 +1,23 @@
1
+ import { OAuth2ProviderType as t } from "@coinbase/cdp-hooks";
2
+ import "./CDPReactProvider.BWInVuNJ.js";
3
+ import { siweConnectors as e } from "../components/SiweStatusView/connectors/siweConnectors.js";
4
+ import { config as i } from "../components/SignIn/flows/SignInWithEmail.js";
5
+ import { config as s } from "../components/SignIn/flows/SignInWithOAuth.js";
6
+ import { config as m } from "../components/SignIn/flows/SignInWithSiwe.js";
7
+ import { config as n } from "../components/SignIn/flows/SignInWithSms.js";
8
+ import "react";
9
+ const f = Object.keys(t).reduce(
10
+ (o, r) => (o[`oauth:${r.toLowerCase()}`] = s, o),
11
+ {}
12
+ ), c = Object.keys(e).reduce(
13
+ (o, r) => (o[`siwe:${r}`] = m, o),
14
+ {}
15
+ ), d = {
16
+ ...f,
17
+ ...c,
18
+ email: i,
19
+ sms: n
20
+ };
21
+ export {
22
+ d as a
23
+ };
@@ -1,6 +1,11 @@
1
1
  import { Config as CDPHooksConfig, OAuth2ProviderType } from '@coinbase/cdp-hooks';
2
+ import { SiweProviderType } from '../SiweStatusView';
2
3
  import { ThemeProviderProps } from '../ThemeProvider';
3
4
  export declare const OAUTH_METHODS: string[];
5
+ /**
6
+ * The SIWE auth methods, derived from the registered SIWE connectors (e.g. `"siwe:base"`).
7
+ */
8
+ export declare const SIWE_METHODS: string[];
4
9
  /**
5
10
  * The auth methods that can be used to sign in.
6
11
  */
@@ -12,7 +17,8 @@ export declare const ALL_AUTH_METHODS: string[];
12
17
  /**
13
18
  * The auth method type.
14
19
  */
15
- export type AuthMethod = (typeof AUTH_METHODS)[number] | `oauth:${OAuth2ProviderType}`;
20
+ export type AuthMethod = (typeof AUTH_METHODS)[number] | `oauth:${OAuth2ProviderType}` | `siwe:${SiweProviderType}`;
21
+ export { type SiweProviderType };
16
22
  /**
17
23
  * Optional app config to add branding
18
24
  *
@@ -1,13 +1,17 @@
1
1
  import "react/jsx-runtime";
2
2
  import "@coinbase/cdp-hooks";
3
3
  import "react";
4
- import { A as p, b as m, C as t, O as A, u as H, a as T } from "../../chunks/CDPReactProvider.CFWIUvzR.js";
4
+ import "../ui/Button/index.js";
5
+ import "../SiweStatusView/connectors/siweConnectors.js";
6
+ import { A as H, b as T, C as A, O, S, u as D, a as E } from "../../chunks/CDPReactProvider.BWInVuNJ.js";
7
+ import "libphonenumber-js";
5
8
  import "../ThemeProvider/index.js";
6
9
  export {
7
- p as ALL_AUTH_METHODS,
8
- m as AUTH_METHODS,
9
- t as CDPReactProvider,
10
- A as OAUTH_METHODS,
11
- H as useAppConfig,
12
- T as useProviderName
10
+ H as ALL_AUTH_METHODS,
11
+ T as AUTH_METHODS,
12
+ A as CDPReactProvider,
13
+ O as OAUTH_METHODS,
14
+ S as SIWE_METHODS,
15
+ D as useAppConfig,
16
+ E as useProviderName
13
17
  };
@@ -4,7 +4,7 @@ import { useCurrentUser as w, useIsInitialized as V, useInitiateMfaEnrollment as
4
4
  import { u as J } from "../../chunks/useSendComponentCallOnce.BI4daEvm.js";
5
5
  import { useMemo as C, useRef as _, useEffect as v, useCallback as p, useLayoutEffect as K } from "react";
6
6
  import { c as G } from "../../chunks/lite.1fxw3LjI.js";
7
- import { u as X } from "../../chunks/CDPReactProvider.CFWIUvzR.js";
7
+ import { u as X } from "../../chunks/CDPReactProvider.BWInVuNJ.js";
8
8
  import { useTimeout as Y } from "../../hooks/useTimeout.js";
9
9
  import { isApiError as Z } from "../../utils/isApiError.js";
10
10
  import "libphonenumber-js";
@@ -2,7 +2,7 @@ import { jsx as o, jsxs as r, Fragment as s } from "react/jsx-runtime";
2
2
  import { u as v } from "../../chunks/useSendComponentCallOnce.BI4daEvm.js";
3
3
  import { createContext as b, useMemo as w, useContext as y } from "react";
4
4
  import { c as p } from "../../chunks/lite.1fxw3LjI.js";
5
- import { u as F } from "../../chunks/CDPReactProvider.CFWIUvzR.js";
5
+ import { u as F } from "../../chunks/CDPReactProvider.BWInVuNJ.js";
6
6
  import { EnrollMfa as T, EnrollMfaError as B } from "../EnrollMfa/index.js";
7
7
  import { Button as h } from "../ui/Button/index.js";
8
8
  import { Modal as A, ModalContent as O, ModalTitle as S, ModalDescription as $, ModalClose as E, ModalTrigger as D } from "../ui/Modal/index.js";