@coinbase/cdp-react 0.0.107 → 0.0.109
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.
|
@@ -11,13 +11,13 @@ import "../EnrollMfaModal/index.js";
|
|
|
11
11
|
import { jsx as t, jsxs as d, Fragment as y } from "react/jsx-runtime";
|
|
12
12
|
import { useCurrentUser as Z } from "@coinbase/cdp-hooks";
|
|
13
13
|
import { c as m } from "../../chunks/lite.1fxw3LjI.js";
|
|
14
|
+
import { Banner as w } from "../ui/Banner/index.js";
|
|
14
15
|
import { CoinbaseFooter as C } from "../ui/CoinbaseFooter/index.js";
|
|
15
16
|
import { VerifyMfaInline as F, VerifyMfaInlineBackButton as I, VerifyMfaInlineFlow as R, useVerifyMfaInlineContext as $ } from "../VerifyMfaInline/index.js";
|
|
16
17
|
import { Button as T } from "../ui/Button/index.js";
|
|
17
18
|
import { Modal as G, ModalClose as Q, ModalContent as tt, ModalTitle as ot, ModalTrigger as et } from "../ui/Modal/index.js";
|
|
18
19
|
import { IconXMark as rt } from "../../icons/IconXMark.js";
|
|
19
20
|
import { childrenHasComponent as g } from "../../utils/childrenHasComponent.js";
|
|
20
|
-
import { Banner as w } from "../ui/Banner/index.js";
|
|
21
21
|
import "../Fund/index.js";
|
|
22
22
|
import "../FundModal/index.js";
|
|
23
23
|
import "../LinkAuth/index.js";
|
|
@@ -4,13 +4,13 @@ import "react";
|
|
|
4
4
|
import "../../chunks/lite.1fxw3LjI.js";
|
|
5
5
|
import "../../chunks/CDPReactProvider.CFWIUvzR.js";
|
|
6
6
|
import { E as W, a as g, b as n, c as C, d as T } from "../ExportWallet/index.js";
|
|
7
|
+
import "../ui/Banner/index.js";
|
|
7
8
|
import "../ui/Button/index.js";
|
|
8
9
|
import "../ui/Modal/index.js";
|
|
9
10
|
import "../../icons/IconXMark.js";
|
|
10
11
|
import "../../utils/childrenHasComponent.js";
|
|
11
12
|
import "../ui/CoinbaseFooter/index.js";
|
|
12
13
|
import "../VerifyMfaInline/index.js";
|
|
13
|
-
import "../ui/Banner/index.js";
|
|
14
14
|
export {
|
|
15
15
|
W as ExportWalletModal,
|
|
16
16
|
g as ExportWalletModalClose,
|
|
@@ -4,28 +4,28 @@ import { u as P } from "../../chunks/useSendComponentCallOnce.BI4daEvm.js";
|
|
|
4
4
|
import { useRef as d, useState as U, useCallback as a } from "react";
|
|
5
5
|
import "../../chunks/CDPReactProvider.CFWIUvzR.js";
|
|
6
6
|
import { useOauthStatusModal as D } from "../OAuthStatusModal/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { Banner as H } from "../ui/Banner/index.js";
|
|
8
|
+
import { useTimeout as M } from "../../hooks/useTimeout.js";
|
|
9
|
+
import { getMessageFromUnknownError as v } from "../../utils/getMessageFromUnknownError.js";
|
|
9
10
|
import "libphonenumber-js";
|
|
10
|
-
import { toOAuthProviderType as
|
|
11
|
-
import { L as
|
|
11
|
+
import { toOAuthProviderType as V } from "../../utils/toOAuthProviderType.js";
|
|
12
|
+
import { L as j, a as K } from "../../chunks/LinkAuthFlow.S1XbYaG5.js";
|
|
12
13
|
import { u as ft } from "../../chunks/LinkAuthFlow.S1XbYaG5.js";
|
|
13
|
-
import { LinkAuthFlowBackButton as
|
|
14
|
+
import { LinkAuthFlowBackButton as W } from "./LinkAuthFlowBackButton.js";
|
|
14
15
|
import { LinkAuthItem as Lt } from "./LinkAuthItem.js";
|
|
15
16
|
import { LinkAuthItems as _t } from "./LinkAuthItems.js";
|
|
16
|
-
import { LinkAuthProvider as
|
|
17
|
-
import { LinkAuthTitle as
|
|
17
|
+
import { LinkAuthProvider as $, useLinkAuthContext as x } from "./LinkAuthProvider.js";
|
|
18
|
+
import { LinkAuthTitle as b } from "./LinkAuthTitle.js";
|
|
18
19
|
import { methodToView as O } from "./utils.js";
|
|
19
|
-
import { Banner as b } from "../ui/Banner/index.js";
|
|
20
20
|
import '../../assets/LinkAuth.css';const G = "LinkAuth-module__header___0UuxP", J = "LinkAuth-module__error___XUo4W", k = {
|
|
21
21
|
"link-auth": "LinkAuth-module__link-auth___kPJao",
|
|
22
22
|
header: G,
|
|
23
23
|
error: J
|
|
24
24
|
}, X = ({ role: o = "alert", ...c }) => {
|
|
25
25
|
const { state: i } = x(), { error: s } = i;
|
|
26
|
-
return s ? /* @__PURE__ */ r(
|
|
26
|
+
return s ? /* @__PURE__ */ r(H, { variant: "error", role: o, ...c, children: s }) : null;
|
|
27
27
|
}, q = ({ children: o, className: c = "", onLinkSuccess: i, ...s }) => {
|
|
28
|
-
const { linkOAuth: f } = N(), { persistOAuthState: p, cleanupOAuthState: L } = D(), { state: u, dispatch: n } = x(), { methodToLink: E } = u, A = d(null), l = d(null), { schedule: _ } =
|
|
28
|
+
const { linkOAuth: f } = N(), { persistOAuthState: p, cleanupOAuthState: L } = D(), { state: u, dispatch: n } = x(), { methodToLink: E } = u, A = d(null), l = d(null), { schedule: _ } = M(), S = O(E), T = d(S), [B, m] = U("left"), e = a(
|
|
29
29
|
(t) => {
|
|
30
30
|
T.current !== t && (T.current = t, A.current?.transition.toggle(t), t === "list" && n({ type: "RESET_STATE" }), (t === "email" || t === "sms") && n({ type: "LINK_AUTH_METHOD", payload: { method: t } }));
|
|
31
31
|
},
|
|
@@ -41,14 +41,14 @@ import '../../assets/LinkAuth.css';const G = "LinkAuth-module__header___0UuxP",
|
|
|
41
41
|
}, [e, u.methodToLink, i, _]), w = a(
|
|
42
42
|
async (t) => {
|
|
43
43
|
if (m("left"), t?.startsWith("oauth:")) {
|
|
44
|
-
const y =
|
|
44
|
+
const y = V(t);
|
|
45
45
|
if (y)
|
|
46
46
|
try {
|
|
47
47
|
p(!0), await f(y);
|
|
48
48
|
} catch (C) {
|
|
49
49
|
L(), n({
|
|
50
50
|
type: "LINK_AUTH_METHOD_ERROR",
|
|
51
|
-
payload: { error:
|
|
51
|
+
payload: { error: v(C) }
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
} else
|
|
@@ -57,7 +57,7 @@ import '../../assets/LinkAuth.css';const G = "LinkAuth-module__header___0UuxP",
|
|
|
57
57
|
[f, e, p, L, n]
|
|
58
58
|
), g = typeof o == "function" ? o(u) : o;
|
|
59
59
|
return /* @__PURE__ */ r("div", { className: `${k["link-auth"]} ${c}`, ...s, children: /* @__PURE__ */ h(
|
|
60
|
-
|
|
60
|
+
j,
|
|
61
61
|
{
|
|
62
62
|
direction: B,
|
|
63
63
|
onBack: F,
|
|
@@ -69,24 +69,24 @@ import '../../assets/LinkAuth.css';const G = "LinkAuth-module__header___0UuxP",
|
|
|
69
69
|
g,
|
|
70
70
|
!g && /* @__PURE__ */ h(I, { children: [
|
|
71
71
|
/* @__PURE__ */ h("div", { className: k.header, children: [
|
|
72
|
-
/* @__PURE__ */ r(
|
|
73
|
-
/* @__PURE__ */ r(
|
|
72
|
+
/* @__PURE__ */ r(b, {}),
|
|
73
|
+
/* @__PURE__ */ r(W, {})
|
|
74
74
|
] }),
|
|
75
75
|
/* @__PURE__ */ r("div", { className: k.error, children: /* @__PURE__ */ r(X, {}) }),
|
|
76
|
-
/* @__PURE__ */ r(
|
|
76
|
+
/* @__PURE__ */ r(K, {})
|
|
77
77
|
] })
|
|
78
78
|
]
|
|
79
79
|
}
|
|
80
80
|
) });
|
|
81
|
-
}, ht = (o) => (P("manage_auth"), /* @__PURE__ */ r(
|
|
81
|
+
}, ht = (o) => (P("manage_auth"), /* @__PURE__ */ r($, { children: /* @__PURE__ */ r(q, { ...o }) }));
|
|
82
82
|
export {
|
|
83
83
|
ht as LinkAuth,
|
|
84
84
|
X as LinkAuthError,
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
K as LinkAuthFlow,
|
|
86
|
+
W as LinkAuthFlowBackButton,
|
|
87
87
|
Lt as LinkAuthItem,
|
|
88
88
|
_t as LinkAuthItems,
|
|
89
|
-
|
|
89
|
+
b as LinkAuthTitle,
|
|
90
90
|
x as useLinkAuthContext,
|
|
91
91
|
ft as useLinkAuthFlow
|
|
92
92
|
};
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cdp-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.109",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@internationalized/number": "3.6.4",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"react": ">=18.2.0 <19.2.0",
|
|
19
|
-
"@coinbase/cdp-core": "^0.0.
|
|
20
|
-
"@coinbase/cdp-hooks": "^0.0.
|
|
19
|
+
"@coinbase/cdp-core": "^0.0.109",
|
|
20
|
+
"@coinbase/cdp-hooks": "^0.0.109"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@size-limit/preset-big-lib": "11.2.0",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"vite": "7.3.2",
|
|
50
50
|
"vite-plugin-dts": "4.5.4",
|
|
51
51
|
"vite-plugin-lib-inject-css": "2.2.2",
|
|
52
|
-
"@coinbase/cdp-core": "^0.0.
|
|
53
|
-
"@coinbase/cdp-hooks": "^0.0.
|
|
52
|
+
"@coinbase/cdp-core": "^0.0.109",
|
|
53
|
+
"@coinbase/cdp-hooks": "^0.0.109"
|
|
54
54
|
},
|
|
55
55
|
"size-limit": [
|
|
56
56
|
{
|