@coinbase/cdp-react 0.0.87 → 0.0.89
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.
- package/dist/chunks/{CDPReactProvider.C38bKQ2x.js → CDPReactProvider.BkmtXUv1.js} +1 -1
- package/dist/chunks/{LinkAuthFlow.CLubKoY0.js → LinkAuthFlow.B4FAtf4V.js} +1 -1
- package/dist/chunks/{index.BN39qScu.js → index.DgrgIsTX.js} +1 -1
- package/dist/chunks/useSendComponentCallOnce.DGjALrnZ.js +278 -0
- package/dist/components/AuthButton/index.js +1 -1
- package/dist/components/CDPReactProvider/index.js +1 -1
- package/dist/components/CopyEvmKeyButton/index.js +1 -1
- package/dist/components/CopySolanaKeyButton/index.js +1 -1
- package/dist/components/EnrollMfa/index.js +2 -2
- package/dist/components/EnrollMfaModal/index.js +2 -2
- package/dist/components/ExportWallet/index.js +6 -5
- package/dist/components/ExportWalletModal/index.js +2 -2
- package/dist/components/Fund/index.js +2 -2
- package/dist/components/FundModal/index.js +2 -2
- package/dist/components/LinkAuth/LinkAuthFlow.js +2 -2
- package/dist/components/LinkAuth/LinkAuthFlowBackButton.js +2 -2
- package/dist/components/LinkAuth/LinkAuthFlowProvider.js +2 -2
- package/dist/components/LinkAuth/LinkAuthItem.js +1 -1
- package/dist/components/LinkAuth/LinkAuthItems.js +30 -28
- package/dist/components/LinkAuth/LinkAuthProvider.js +28 -23
- package/dist/components/LinkAuth/index.js +57 -57
- package/dist/components/LinkAuth/types.js +1 -1
- package/dist/components/LinkAuth/utils.js +1 -1
- package/dist/components/LinkAuthModal/index.js +3 -3
- package/dist/components/OAuthStatusModal/index.d.ts +1 -0
- package/dist/components/OAuthStatusModal/index.js +74 -70
- package/dist/components/SendEvmTransactionButton/index.js +1 -1
- package/dist/components/SendSolanaTransactionButton/index.js +1 -1
- package/dist/components/SignIn/SignInAuthMethodButtons.js +30 -25
- package/dist/components/SignIn/SignInBackButton.js +1 -1
- package/dist/components/SignIn/SignInDescription.js +2 -2
- package/dist/components/SignIn/SignInForm.js +2 -2
- package/dist/components/SignIn/SignInImage.js +1 -1
- package/dist/components/SignIn/SignInProvider.js +1 -1
- package/dist/components/SignIn/SignInTitle.js +2 -2
- package/dist/components/SignIn/flows/SignInWithEmail.js +1 -1
- package/dist/components/SignIn/flows/SignInWithOAuth.js +1 -1
- package/dist/components/SignIn/flows/SignInWithSms.js +1 -1
- package/dist/components/SignIn/hooks/useSignInWithOAuth.js +16 -13
- package/dist/components/SignIn/index.js +2 -2
- package/dist/components/SignIn/types.js +1 -1
- package/dist/components/SignIn/useSignInReducer.js +1 -1
- package/dist/components/SignInModal/index.js +2 -2
- package/dist/components/SignOutButton/index.js +1 -1
- package/dist/components/VerifyMfa/index.js +2 -2
- package/dist/components/VerifyMfaInline/index.js +2 -2
- package/dist/components/VerifyMfaModal/index.js +2 -2
- package/dist/components/forms/PhoneNumberForm/index.d.ts +1 -1
- package/dist/components/forms/PhoneNumberInput/index.d.ts +1 -1
- package/dist/components/ui/Badge/index.d.ts +1 -2
- package/dist/components/ui/Banner/index.d.ts +1 -2
- package/dist/hooks/useVerifyMfaModal.js +2 -2
- package/dist/icons/IconTelegramLogo.d.ts +2 -0
- package/dist/icons/IconTelegramLogo.js +13 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +107 -105
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -5
- package/dist/chunks/useSendComponentCallOnce.BHZMuo6E.js +0 -273
package/dist/index.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import "./chunks/useSendComponentCallOnce.
|
|
1
|
+
import "./chunks/useSendComponentCallOnce.DGjALrnZ.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "./version.js";
|
|
4
4
|
import { AuthButton as a } from "./components/AuthButton/index.js";
|
|
5
|
-
import { c as
|
|
5
|
+
import { c as p, A as l, C as x, O as i, V as s, d as M, e as u, f as d, u as c, a as I, b as g } from "./chunks/CDPReactProvider.BkmtXUv1.js";
|
|
6
6
|
import { CopyAddress as C } from "./components/CopyAddress/index.js";
|
|
7
|
-
import { CopyEvmKeyButton as
|
|
8
|
-
import { CopySolanaKeyButton as
|
|
7
|
+
import { CopyEvmKeyButton as S } from "./components/CopyEvmKeyButton/index.js";
|
|
8
|
+
import { CopySolanaKeyButton as h } from "./components/CopySolanaKeyButton/index.js";
|
|
9
9
|
import { EnrollMfa as A, EnrollMfaError as k } from "./components/EnrollMfa/index.js";
|
|
10
10
|
import { EnrollMfaModal as B, EnrollMfaModalContent as L, EnrollMfaModalTrigger as w } from "./components/EnrollMfaModal/index.js";
|
|
11
|
-
import { ExportWallet as
|
|
11
|
+
import { ExportWallet as b, ExportWalletCopyAddress as D, ExportWalletCopyKeyButton as P, ExportWalletFooter as v, E as O, a as H, b as R, c as U, d as _, ExportWalletTitle as z, ExportWalletWarning as K } from "./components/ExportWallet/index.js";
|
|
12
12
|
import { Fund as j, FundFooter as G } from "./components/Fund/index.js";
|
|
13
13
|
import { FundModal as q, FundModalContent as J, FundModalTrigger as Q } from "./components/FundModal/index.js";
|
|
14
14
|
import { LinkAuth as Z, LinkAuthError as $ } from "./components/LinkAuth/index.js";
|
|
15
15
|
import { LinkAuthModal as ro, LinkAuthModalContent as eo, LinkAuthModalTrigger as to } from "./components/LinkAuthModal/index.js";
|
|
16
16
|
import { SendEvmTransactionButton as fo } from "./components/SendEvmTransactionButton/index.js";
|
|
17
17
|
import { SendSolanaTransactionButton as mo } from "./components/SendSolanaTransactionButton/index.js";
|
|
18
|
-
import { SignIn as
|
|
18
|
+
import { SignIn as lo } from "./components/SignIn/index.js";
|
|
19
19
|
import { useSignInReducer as io } from "./components/SignIn/useSignInReducer.js";
|
|
20
20
|
import { SignInModal as Mo, SignInModalContent as uo, SignInModalTrigger as co } from "./components/SignInModal/index.js";
|
|
21
21
|
import { SignOutButton as go } from "./components/SignOutButton/index.js";
|
|
22
22
|
import { ThemeProvider as Co, useTheme as yo } from "./components/ThemeProvider/index.js";
|
|
23
|
-
import { VerifyMfaInline as
|
|
23
|
+
import { VerifyMfaInline as To, VerifyMfaInlineBackButton as ho, VerifyMfaInlineFlow as Fo, useVerifyMfaInlineContext as Ao } from "./components/VerifyMfaInline/index.js";
|
|
24
24
|
import { Button as Vo } from "./components/ui/Button/index.js";
|
|
25
|
-
import { Modal as Lo, ModalClose as wo, ModalContent as Wo, ModalDescription as
|
|
25
|
+
import { Modal as Lo, ModalClose as wo, ModalContent as Wo, ModalDescription as bo, ModalTitle as Do, ModalTrigger as Po } from "./components/ui/Modal/index.js";
|
|
26
26
|
import { cssVariables as Oo } from "./theme/cssVariables.js";
|
|
27
27
|
import { theme as Ro } from "./theme/theme.js";
|
|
28
28
|
import { borderRadius as _o, borderRadiusComponents as zo, borderRadiusSemantic as Ko, colors as No, colorsBase as jo, colorsComponents as Go, colorsSemantic as Xo, font as qo, fontComponents as Jo, fontSemantic as Qo, tokens as Yo, zIndex as Zo, zIndexComponents as $o, zIndexSemantic as or } from "./theme/tokens.js";
|
|
29
29
|
import { flattenTokensObject as er, themeToCssVariables as tr } from "./theme/utils.js";
|
|
30
30
|
import { IconAppleLogo as fr } from "./icons/IconAppleLogo.js";
|
|
31
31
|
import { IconArrowLeft as mr } from "./icons/IconArrowLeft.js";
|
|
32
|
-
import { IconArrowsUpDown as
|
|
32
|
+
import { IconArrowsUpDown as lr } from "./icons/IconArrowsUpDown.js";
|
|
33
33
|
import { IconCheck as ir } from "./icons/IconCheck.js";
|
|
34
34
|
import { IconCheckCircle as Mr } from "./icons/IconCheckCircle.js";
|
|
35
|
-
import { IconChevronDown as
|
|
35
|
+
import { IconChevronDown as dr } from "./icons/IconChevronDown.js";
|
|
36
36
|
import { IconCopy as Ir } from "./icons/IconCopy.js";
|
|
37
37
|
import { IconEnvelope as Er } from "./icons/IconEnvelope.js";
|
|
38
38
|
import { IconExclamationCircle as yr } from "./icons/IconExclamationCircle.js";
|
|
39
|
-
import { IconExclamationTriangle as
|
|
40
|
-
import { IconGoogleLogo as
|
|
39
|
+
import { IconExclamationTriangle as Tr } from "./icons/IconExclamationTriangle.js";
|
|
40
|
+
import { IconGoogleLogo as Fr } from "./icons/IconGoogleLogo.js";
|
|
41
41
|
import { IconLock as kr } from "./icons/IconLock.js";
|
|
42
42
|
import { IconMinus as Br } from "./icons/IconMinus.js";
|
|
43
43
|
import { IconPhone as wr } from "./icons/IconPhone.js";
|
|
44
|
-
import { IconPinCode as
|
|
44
|
+
import { IconPinCode as br } from "./icons/IconPinCode.js";
|
|
45
45
|
import { IconPlus as Pr } from "./icons/IconPlus.js";
|
|
46
46
|
import { IconShield as Or } from "./icons/IconShield.js";
|
|
47
47
|
import { IconSmartPhone as Rr } from "./icons/IconSmartPhone.js";
|
|
@@ -52,68 +52,69 @@ import { isApiError as Xr } from "./utils/isApiError.js";
|
|
|
52
52
|
import { isEmailInvalid as Jr } from "./utils/isEmailInvalid.js";
|
|
53
53
|
import { parseValuesFromPhoneNumber as Yr } from "./utils/parseValuesFromPhoneNumber.js";
|
|
54
54
|
import { sendIframeMessage as $r } from "./utils/sendIframeMessage.js";
|
|
55
|
+
import { usePhoneNumberState as re } from "./hooks/usePhoneNumberState.js";
|
|
55
56
|
import "@coinbase/cdp-core";
|
|
56
|
-
import { EnrollMfaDescription as
|
|
57
|
-
import { EnrollMfaFlow as
|
|
58
|
-
import { EnrollMfaFlowBackButton as
|
|
59
|
-
import { EnrollMfaFooter as
|
|
60
|
-
import { EnrollMfaImage as
|
|
61
|
-
import { EnrollMfaItem as
|
|
62
|
-
import { EnrollMfaItems as
|
|
63
|
-
import { EnrollMfaTitle as
|
|
64
|
-
import { useEnrollMfaContext as
|
|
65
|
-
import { useEnrollMfaFlow as
|
|
66
|
-
import { FundForm as
|
|
57
|
+
import { EnrollMfaDescription as te } from "./components/EnrollMfa/EnrollMfaDescription.js";
|
|
58
|
+
import { EnrollMfaFlow as fe } from "./components/EnrollMfa/EnrollMfaFlow.js";
|
|
59
|
+
import { EnrollMfaFlowBackButton as me } from "./components/EnrollMfa/EnrollMfaFlowBackButton.js";
|
|
60
|
+
import { EnrollMfaFooter as le } from "./components/EnrollMfa/EnrollMfaFooter.js";
|
|
61
|
+
import { EnrollMfaImage as ie } from "./components/EnrollMfa/EnrollMfaImage.js";
|
|
62
|
+
import { EnrollMfaItem as Me } from "./components/EnrollMfa/EnrollMfaItem.js";
|
|
63
|
+
import { EnrollMfaItems as de } from "./components/EnrollMfa/EnrollMfaItems.js";
|
|
64
|
+
import { EnrollMfaTitle as Ie } from "./components/EnrollMfa/EnrollMfaTitle.js";
|
|
65
|
+
import { useEnrollMfaContext as Ee } from "./components/EnrollMfa/EnrollMfaProvider.js";
|
|
66
|
+
import { useEnrollMfaFlow as ye } from "./components/EnrollMfa/EnrollMfaFlowProvider.js";
|
|
67
|
+
import { FundForm as Te } from "./components/Fund/FundForm.js";
|
|
67
68
|
import { FundTitle as Fe } from "./components/Fund/FundTitle.js";
|
|
68
|
-
import { useFundContext as
|
|
69
|
-
import { a as
|
|
70
|
-
import { LinkAuthFlowBackButton as
|
|
71
|
-
import { LinkAuthItem as
|
|
72
|
-
import { LinkAuthItems as
|
|
73
|
-
import { LinkAuthTitle as
|
|
74
|
-
import { useLinkAuthContext as
|
|
75
|
-
import { SignInAuthMethodButtons as
|
|
76
|
-
import { SignInBackButton as
|
|
77
|
-
import { SignInDescription as
|
|
78
|
-
import { SignInFooter as
|
|
79
|
-
import { SignInForm as
|
|
80
|
-
import { SignInImage as
|
|
81
|
-
import { SignInTitle as
|
|
82
|
-
import { useSignInContext as
|
|
83
|
-
import { VerifyMfaDescription as
|
|
84
|
-
import { VerifyMfaFlow as
|
|
85
|
-
import { VerifyMfaFlowBackButton as
|
|
86
|
-
import { VerifyMfaFooter as
|
|
87
|
-
import { VerifyMfaImage as
|
|
88
|
-
import { VerifyMfaItem as
|
|
89
|
-
import { VerifyMfaItems as
|
|
90
|
-
import { VerifyMfaTitle as
|
|
91
|
-
import { useVerifyMfaContext as
|
|
92
|
-
import { useVerifyMfaFlow as
|
|
69
|
+
import { useFundContext as ke } from "./components/Fund/FundProvider.js";
|
|
70
|
+
import { a as Be, u as Le } from "./chunks/LinkAuthFlow.B4FAtf4V.js";
|
|
71
|
+
import { LinkAuthFlowBackButton as We } from "./components/LinkAuth/LinkAuthFlowBackButton.js";
|
|
72
|
+
import { LinkAuthItem as De } from "./components/LinkAuth/LinkAuthItem.js";
|
|
73
|
+
import { LinkAuthItems as ve } from "./components/LinkAuth/LinkAuthItems.js";
|
|
74
|
+
import { LinkAuthTitle as He } from "./components/LinkAuth/LinkAuthTitle.js";
|
|
75
|
+
import { useLinkAuthContext as Ue } from "./components/LinkAuth/LinkAuthProvider.js";
|
|
76
|
+
import { SignInAuthMethodButtons as ze } from "./components/SignIn/SignInAuthMethodButtons.js";
|
|
77
|
+
import { SignInBackButton as Ne } from "./components/SignIn/SignInBackButton.js";
|
|
78
|
+
import { SignInDescription as Ge } from "./components/SignIn/SignInDescription.js";
|
|
79
|
+
import { SignInFooter as qe } from "./components/SignIn/SignInFooter.js";
|
|
80
|
+
import { SignInForm as Qe } from "./components/SignIn/SignInForm.js";
|
|
81
|
+
import { SignInImage as Ze } from "./components/SignIn/SignInImage.js";
|
|
82
|
+
import { SignInTitle as ot } from "./components/SignIn/SignInTitle.js";
|
|
83
|
+
import { useSignInContext as et } from "./components/SignIn/SignInProvider.js";
|
|
84
|
+
import { VerifyMfaDescription as nt } from "./components/VerifyMfa/VerifyMfaDescription.js";
|
|
85
|
+
import { VerifyMfaFlow as at } from "./components/VerifyMfa/VerifyMfaFlow.js";
|
|
86
|
+
import { VerifyMfaFlowBackButton as pt } from "./components/VerifyMfa/VerifyMfaFlowBackButton.js";
|
|
87
|
+
import { VerifyMfaFooter as xt } from "./components/VerifyMfa/VerifyMfaFooter.js";
|
|
88
|
+
import { VerifyMfaImage as st } from "./components/VerifyMfa/VerifyMfaImage.js";
|
|
89
|
+
import { VerifyMfaItem as ut } from "./components/VerifyMfa/VerifyMfaItem.js";
|
|
90
|
+
import { VerifyMfaItems as ct } from "./components/VerifyMfa/VerifyMfaItems.js";
|
|
91
|
+
import { VerifyMfaTitle as gt } from "./components/VerifyMfa/VerifyMfaTitle.js";
|
|
92
|
+
import { useVerifyMfaContext as Ct } from "./components/VerifyMfa/VerifyMfaProvider.js";
|
|
93
|
+
import { useVerifyMfaFlow as St } from "./components/VerifyMfa/VerifyMfaFlowProvider.js";
|
|
93
94
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
p as ALL_AUTH_METHODS,
|
|
96
|
+
l as AUTH_METHODS,
|
|
96
97
|
a as AuthButton,
|
|
97
98
|
Vo as Button,
|
|
98
99
|
x as CDPReactProvider,
|
|
99
100
|
C as CopyAddress,
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
S as CopyEvmKeyButton,
|
|
102
|
+
h as CopySolanaKeyButton,
|
|
102
103
|
A as EnrollMfa,
|
|
103
|
-
|
|
104
|
+
te as EnrollMfaDescription,
|
|
104
105
|
k as EnrollMfaError,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
fe as EnrollMfaFlow,
|
|
107
|
+
me as EnrollMfaFlowBackButton,
|
|
108
|
+
le as EnrollMfaFooter,
|
|
109
|
+
ie as EnrollMfaImage,
|
|
110
|
+
Me as EnrollMfaItem,
|
|
111
|
+
de as EnrollMfaItems,
|
|
111
112
|
B as EnrollMfaModal,
|
|
112
113
|
L as EnrollMfaModalContent,
|
|
113
114
|
w as EnrollMfaModalTrigger,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
Ie as EnrollMfaTitle,
|
|
116
|
+
b as ExportWallet,
|
|
117
|
+
D as ExportWalletCopyAddress,
|
|
117
118
|
P as ExportWalletCopyKeyButton,
|
|
118
119
|
v as ExportWalletFooter,
|
|
119
120
|
O as ExportWalletModal,
|
|
@@ -125,77 +126,77 @@ export {
|
|
|
125
126
|
K as ExportWalletWarning,
|
|
126
127
|
j as Fund,
|
|
127
128
|
G as FundFooter,
|
|
128
|
-
|
|
129
|
+
Te as FundForm,
|
|
129
130
|
q as FundModal,
|
|
130
131
|
J as FundModalContent,
|
|
131
132
|
Q as FundModalTrigger,
|
|
132
133
|
Fe as FundTitle,
|
|
133
134
|
fr as IconAppleLogo,
|
|
134
135
|
mr as IconArrowLeft,
|
|
135
|
-
|
|
136
|
+
lr as IconArrowsUpDown,
|
|
136
137
|
ir as IconCheck,
|
|
137
138
|
Mr as IconCheckCircle,
|
|
138
|
-
|
|
139
|
+
dr as IconChevronDown,
|
|
139
140
|
Ir as IconCopy,
|
|
140
141
|
Er as IconEnvelope,
|
|
141
142
|
yr as IconExclamationCircle,
|
|
142
|
-
|
|
143
|
-
|
|
143
|
+
Tr as IconExclamationTriangle,
|
|
144
|
+
Fr as IconGoogleLogo,
|
|
144
145
|
kr as IconLock,
|
|
145
146
|
Br as IconMinus,
|
|
146
147
|
wr as IconPhone,
|
|
147
|
-
|
|
148
|
+
br as IconPinCode,
|
|
148
149
|
Pr as IconPlus,
|
|
149
150
|
Or as IconShield,
|
|
150
151
|
Rr as IconSmartPhone,
|
|
151
152
|
_r as IconXMark,
|
|
152
153
|
Z as LinkAuth,
|
|
153
154
|
$ as LinkAuthError,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
Be as LinkAuthFlow,
|
|
156
|
+
We as LinkAuthFlowBackButton,
|
|
157
|
+
De as LinkAuthItem,
|
|
158
|
+
ve as LinkAuthItems,
|
|
158
159
|
ro as LinkAuthModal,
|
|
159
160
|
eo as LinkAuthModalContent,
|
|
160
161
|
to as LinkAuthModalTrigger,
|
|
161
|
-
|
|
162
|
+
He as LinkAuthTitle,
|
|
162
163
|
Lo as Modal,
|
|
163
164
|
wo as ModalClose,
|
|
164
165
|
Wo as ModalContent,
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
bo as ModalDescription,
|
|
167
|
+
Do as ModalTitle,
|
|
167
168
|
Po as ModalTrigger,
|
|
168
169
|
i as OAUTH_METHODS,
|
|
169
170
|
fo as SendEvmTransactionButton,
|
|
170
171
|
mo as SendSolanaTransactionButton,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
172
|
+
lo as SignIn,
|
|
173
|
+
ze as SignInAuthMethodButtons,
|
|
174
|
+
Ne as SignInBackButton,
|
|
175
|
+
Ge as SignInDescription,
|
|
176
|
+
qe as SignInFooter,
|
|
177
|
+
Qe as SignInForm,
|
|
178
|
+
Ze as SignInImage,
|
|
178
179
|
Mo as SignInModal,
|
|
179
180
|
uo as SignInModalContent,
|
|
180
181
|
co as SignInModalTrigger,
|
|
181
|
-
|
|
182
|
+
ot as SignInTitle,
|
|
182
183
|
go as SignOutButton,
|
|
183
184
|
Co as ThemeProvider,
|
|
184
185
|
s as VerifyMfa,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
186
|
+
nt as VerifyMfaDescription,
|
|
187
|
+
at as VerifyMfaFlow,
|
|
188
|
+
pt as VerifyMfaFlowBackButton,
|
|
189
|
+
xt as VerifyMfaFooter,
|
|
190
|
+
st as VerifyMfaImage,
|
|
191
|
+
To as VerifyMfaInline,
|
|
192
|
+
ho as VerifyMfaInlineBackButton,
|
|
193
|
+
Fo as VerifyMfaInlineFlow,
|
|
194
|
+
ut as VerifyMfaItem,
|
|
195
|
+
ct as VerifyMfaItems,
|
|
195
196
|
M as VerifyMfaModal,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
197
|
+
u as VerifyMfaModalContent,
|
|
198
|
+
d as VerifyMfaModalTrigger,
|
|
199
|
+
gt as VerifyMfaTitle,
|
|
199
200
|
_o as borderRadius,
|
|
200
201
|
zo as borderRadiusComponents,
|
|
201
202
|
Ko as borderRadiusSemantic,
|
|
@@ -218,17 +219,18 @@ export {
|
|
|
218
219
|
tr as themeToCssVariables,
|
|
219
220
|
Yo as tokens,
|
|
220
221
|
c as useAppConfig,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
222
|
+
Ee as useEnrollMfaContext,
|
|
223
|
+
ye as useEnrollMfaFlow,
|
|
224
|
+
ke as useFundContext,
|
|
225
|
+
Ue as useLinkAuthContext,
|
|
226
|
+
Le as useLinkAuthFlow,
|
|
227
|
+
re as usePhoneNumberState,
|
|
226
228
|
I as useProviderName,
|
|
227
|
-
|
|
229
|
+
et as useSignInContext,
|
|
228
230
|
io as useSignInReducer,
|
|
229
231
|
yo as useTheme,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
+
Ct as useVerifyMfaContext,
|
|
233
|
+
St as useVerifyMfaFlow,
|
|
232
234
|
Ao as useVerifyMfaInlineContext,
|
|
233
235
|
g as useVerifyMfaModal,
|
|
234
236
|
Zo as zIndex,
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.
|
|
1
|
+
export declare const VERSION = "0.0.89";
|
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.89",
|
|
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.89",
|
|
20
|
+
"@coinbase/cdp-hooks": "^0.0.89"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@size-limit/preset-big-lib": "^11.2.0",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"vite": "^7.0.4",
|
|
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.89",
|
|
53
|
+
"@coinbase/cdp-hooks": "^0.0.89"
|
|
54
54
|
},
|
|
55
55
|
"size-limit": [
|
|
56
56
|
{
|
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
import { useRef as M, useEffect as q } from "react";
|
|
2
|
-
function U(s) {
|
|
3
|
-
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
4
|
-
}
|
|
5
|
-
var E = { exports: {} }, T = { exports: {} }, S;
|
|
6
|
-
function H() {
|
|
7
|
-
return S || (S = 1, function() {
|
|
8
|
-
var s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", l = {
|
|
9
|
-
// Bit-wise rotation left
|
|
10
|
-
rotl: function(c, u) {
|
|
11
|
-
return c << u | c >>> 32 - u;
|
|
12
|
-
},
|
|
13
|
-
// Bit-wise rotation right
|
|
14
|
-
rotr: function(c, u) {
|
|
15
|
-
return c << 32 - u | c >>> u;
|
|
16
|
-
},
|
|
17
|
-
// Swap big-endian to little-endian and vice versa
|
|
18
|
-
endian: function(c) {
|
|
19
|
-
if (c.constructor == Number)
|
|
20
|
-
return l.rotl(c, 8) & 16711935 | l.rotl(c, 24) & 4278255360;
|
|
21
|
-
for (var u = 0; u < c.length; u++)
|
|
22
|
-
c[u] = l.endian(c[u]);
|
|
23
|
-
return c;
|
|
24
|
-
},
|
|
25
|
-
// Generate an array of any length of random bytes
|
|
26
|
-
randomBytes: function(c) {
|
|
27
|
-
for (var u = []; c > 0; c--)
|
|
28
|
-
u.push(Math.floor(Math.random() * 256));
|
|
29
|
-
return u;
|
|
30
|
-
},
|
|
31
|
-
// Convert a byte array to big-endian 32-bit words
|
|
32
|
-
bytesToWords: function(c) {
|
|
33
|
-
for (var u = [], a = 0, f = 0; a < c.length; a++, f += 8)
|
|
34
|
-
u[f >>> 5] |= c[a] << 24 - f % 32;
|
|
35
|
-
return u;
|
|
36
|
-
},
|
|
37
|
-
// Convert big-endian 32-bit words to a byte array
|
|
38
|
-
wordsToBytes: function(c) {
|
|
39
|
-
for (var u = [], a = 0; a < c.length * 32; a += 8)
|
|
40
|
-
u.push(c[a >>> 5] >>> 24 - a % 32 & 255);
|
|
41
|
-
return u;
|
|
42
|
-
},
|
|
43
|
-
// Convert a byte array to a hex string
|
|
44
|
-
bytesToHex: function(c) {
|
|
45
|
-
for (var u = [], a = 0; a < c.length; a++)
|
|
46
|
-
u.push((c[a] >>> 4).toString(16)), u.push((c[a] & 15).toString(16));
|
|
47
|
-
return u.join("");
|
|
48
|
-
},
|
|
49
|
-
// Convert a hex string to a byte array
|
|
50
|
-
hexToBytes: function(c) {
|
|
51
|
-
for (var u = [], a = 0; a < c.length; a += 2)
|
|
52
|
-
u.push(parseInt(c.substr(a, 2), 16));
|
|
53
|
-
return u;
|
|
54
|
-
},
|
|
55
|
-
// Convert a byte array to a base-64 string
|
|
56
|
-
bytesToBase64: function(c) {
|
|
57
|
-
for (var u = [], a = 0; a < c.length; a += 3)
|
|
58
|
-
for (var f = c[a] << 16 | c[a + 1] << 8 | c[a + 2], d = 0; d < 4; d++)
|
|
59
|
-
a * 8 + d * 6 <= c.length * 8 ? u.push(s.charAt(f >>> 6 * (3 - d) & 63)) : u.push("=");
|
|
60
|
-
return u.join("");
|
|
61
|
-
},
|
|
62
|
-
// Convert a base-64 string to a byte array
|
|
63
|
-
base64ToBytes: function(c) {
|
|
64
|
-
c = c.replace(/[^A-Z0-9+\/]/ig, "");
|
|
65
|
-
for (var u = [], a = 0, f = 0; a < c.length; f = ++a % 4)
|
|
66
|
-
f != 0 && u.push((s.indexOf(c.charAt(a - 1)) & Math.pow(2, -2 * f + 8) - 1) << f * 2 | s.indexOf(c.charAt(a)) >>> 6 - f * 2);
|
|
67
|
-
return u;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
T.exports = l;
|
|
71
|
-
}()), T.exports;
|
|
72
|
-
}
|
|
73
|
-
var F, m;
|
|
74
|
-
function x() {
|
|
75
|
-
if (m) return F;
|
|
76
|
-
m = 1;
|
|
77
|
-
var s = {
|
|
78
|
-
// UTF-8 encoding
|
|
79
|
-
utf8: {
|
|
80
|
-
// Convert a string to a byte array
|
|
81
|
-
stringToBytes: function(l) {
|
|
82
|
-
return s.bin.stringToBytes(unescape(encodeURIComponent(l)));
|
|
83
|
-
},
|
|
84
|
-
// Convert a byte array to a string
|
|
85
|
-
bytesToString: function(l) {
|
|
86
|
-
return decodeURIComponent(escape(s.bin.bytesToString(l)));
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
// Binary encoding
|
|
90
|
-
bin: {
|
|
91
|
-
// Convert a string to a byte array
|
|
92
|
-
stringToBytes: function(l) {
|
|
93
|
-
for (var c = [], u = 0; u < l.length; u++)
|
|
94
|
-
c.push(l.charCodeAt(u) & 255);
|
|
95
|
-
return c;
|
|
96
|
-
},
|
|
97
|
-
// Convert a byte array to a string
|
|
98
|
-
bytesToString: function(l) {
|
|
99
|
-
for (var c = [], u = 0; u < l.length; u++)
|
|
100
|
-
c.push(String.fromCharCode(l[u]));
|
|
101
|
-
return c.join("");
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
return F = s, F;
|
|
106
|
-
}
|
|
107
|
-
/*!
|
|
108
|
-
* Determine if an object is a Buffer
|
|
109
|
-
*
|
|
110
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
111
|
-
* @license MIT
|
|
112
|
-
*/
|
|
113
|
-
var B, O;
|
|
114
|
-
function N() {
|
|
115
|
-
if (O) return B;
|
|
116
|
-
O = 1, B = function(c) {
|
|
117
|
-
return c != null && (s(c) || l(c) || !!c._isBuffer);
|
|
118
|
-
};
|
|
119
|
-
function s(c) {
|
|
120
|
-
return !!c.constructor && typeof c.constructor.isBuffer == "function" && c.constructor.isBuffer(c);
|
|
121
|
-
}
|
|
122
|
-
function l(c) {
|
|
123
|
-
return typeof c.readFloatLE == "function" && typeof c.slice == "function" && s(c.slice(0, 0));
|
|
124
|
-
}
|
|
125
|
-
return B;
|
|
126
|
-
}
|
|
127
|
-
var A;
|
|
128
|
-
function V() {
|
|
129
|
-
return A || (A = 1, function() {
|
|
130
|
-
var s = H(), l = x().utf8, c = N(), u = x().bin, a = function(f, d) {
|
|
131
|
-
f.constructor == String ? d && d.encoding === "binary" ? f = u.stringToBytes(f) : f = l.stringToBytes(f) : c(f) ? f = Array.prototype.slice.call(f, 0) : !Array.isArray(f) && f.constructor !== Uint8Array && (f = f.toString());
|
|
132
|
-
for (var o = s.bytesToWords(f), y = f.length * 8, r = 1732584193, t = -271733879, e = -1732584194, n = 271733878, i = 0; i < o.length; i++)
|
|
133
|
-
o[i] = (o[i] << 8 | o[i] >>> 24) & 16711935 | (o[i] << 24 | o[i] >>> 8) & 4278255360;
|
|
134
|
-
o[y >>> 5] |= 128 << y % 32, o[(y + 64 >>> 9 << 4) + 14] = y;
|
|
135
|
-
for (var p = a._ff, h = a._gg, v = a._hh, _ = a._ii, i = 0; i < o.length; i += 16) {
|
|
136
|
-
var P = r, D = t, I = e, L = n;
|
|
137
|
-
r = p(r, t, e, n, o[i + 0], 7, -680876936), n = p(n, r, t, e, o[i + 1], 12, -389564586), e = p(e, n, r, t, o[i + 2], 17, 606105819), t = p(t, e, n, r, o[i + 3], 22, -1044525330), r = p(r, t, e, n, o[i + 4], 7, -176418897), n = p(n, r, t, e, o[i + 5], 12, 1200080426), e = p(e, n, r, t, o[i + 6], 17, -1473231341), t = p(t, e, n, r, o[i + 7], 22, -45705983), r = p(r, t, e, n, o[i + 8], 7, 1770035416), n = p(n, r, t, e, o[i + 9], 12, -1958414417), e = p(e, n, r, t, o[i + 10], 17, -42063), t = p(t, e, n, r, o[i + 11], 22, -1990404162), r = p(r, t, e, n, o[i + 12], 7, 1804603682), n = p(n, r, t, e, o[i + 13], 12, -40341101), e = p(e, n, r, t, o[i + 14], 17, -1502002290), t = p(t, e, n, r, o[i + 15], 22, 1236535329), r = h(r, t, e, n, o[i + 1], 5, -165796510), n = h(n, r, t, e, o[i + 6], 9, -1069501632), e = h(e, n, r, t, o[i + 11], 14, 643717713), t = h(t, e, n, r, o[i + 0], 20, -373897302), r = h(r, t, e, n, o[i + 5], 5, -701558691), n = h(n, r, t, e, o[i + 10], 9, 38016083), e = h(e, n, r, t, o[i + 15], 14, -660478335), t = h(t, e, n, r, o[i + 4], 20, -405537848), r = h(r, t, e, n, o[i + 9], 5, 568446438), n = h(n, r, t, e, o[i + 14], 9, -1019803690), e = h(e, n, r, t, o[i + 3], 14, -187363961), t = h(t, e, n, r, o[i + 8], 20, 1163531501), r = h(r, t, e, n, o[i + 13], 5, -1444681467), n = h(n, r, t, e, o[i + 2], 9, -51403784), e = h(e, n, r, t, o[i + 7], 14, 1735328473), t = h(t, e, n, r, o[i + 12], 20, -1926607734), r = v(r, t, e, n, o[i + 5], 4, -378558), n = v(n, r, t, e, o[i + 8], 11, -2022574463), e = v(e, n, r, t, o[i + 11], 16, 1839030562), t = v(t, e, n, r, o[i + 14], 23, -35309556), r = v(r, t, e, n, o[i + 1], 4, -1530992060), n = v(n, r, t, e, o[i + 4], 11, 1272893353), e = v(e, n, r, t, o[i + 7], 16, -155497632), t = v(t, e, n, r, o[i + 10], 23, -1094730640), r = v(r, t, e, n, o[i + 13], 4, 681279174), n = v(n, r, t, e, o[i + 0], 11, -358537222), e = v(e, n, r, t, o[i + 3], 16, -722521979), t = v(t, e, n, r, o[i + 6], 23, 76029189), r = v(r, t, e, n, o[i + 9], 4, -640364487), n = v(n, r, t, e, o[i + 12], 11, -421815835), e = v(e, n, r, t, o[i + 15], 16, 530742520), t = v(t, e, n, r, o[i + 2], 23, -995338651), r = _(r, t, e, n, o[i + 0], 6, -198630844), n = _(n, r, t, e, o[i + 7], 10, 1126891415), e = _(e, n, r, t, o[i + 14], 15, -1416354905), t = _(t, e, n, r, o[i + 5], 21, -57434055), r = _(r, t, e, n, o[i + 12], 6, 1700485571), n = _(n, r, t, e, o[i + 3], 10, -1894986606), e = _(e, n, r, t, o[i + 10], 15, -1051523), t = _(t, e, n, r, o[i + 1], 21, -2054922799), r = _(r, t, e, n, o[i + 8], 6, 1873313359), n = _(n, r, t, e, o[i + 15], 10, -30611744), e = _(e, n, r, t, o[i + 6], 15, -1560198380), t = _(t, e, n, r, o[i + 13], 21, 1309151649), r = _(r, t, e, n, o[i + 4], 6, -145523070), n = _(n, r, t, e, o[i + 11], 10, -1120210379), e = _(e, n, r, t, o[i + 2], 15, 718787259), t = _(t, e, n, r, o[i + 9], 21, -343485551), r = r + P >>> 0, t = t + D >>> 0, e = e + I >>> 0, n = n + L >>> 0;
|
|
138
|
-
}
|
|
139
|
-
return s.endian([r, t, e, n]);
|
|
140
|
-
};
|
|
141
|
-
a._ff = function(f, d, o, y, r, t, e) {
|
|
142
|
-
var n = f + (d & o | ~d & y) + (r >>> 0) + e;
|
|
143
|
-
return (n << t | n >>> 32 - t) + d;
|
|
144
|
-
}, a._gg = function(f, d, o, y, r, t, e) {
|
|
145
|
-
var n = f + (d & y | o & ~y) + (r >>> 0) + e;
|
|
146
|
-
return (n << t | n >>> 32 - t) + d;
|
|
147
|
-
}, a._hh = function(f, d, o, y, r, t, e) {
|
|
148
|
-
var n = f + (d ^ o ^ y) + (r >>> 0) + e;
|
|
149
|
-
return (n << t | n >>> 32 - t) + d;
|
|
150
|
-
}, a._ii = function(f, d, o, y, r, t, e) {
|
|
151
|
-
var n = f + (o ^ (d | ~y)) + (r >>> 0) + e;
|
|
152
|
-
return (n << t | n >>> 32 - t) + d;
|
|
153
|
-
}, a._blocksize = 16, a._digestsize = 16, E.exports = function(f, d) {
|
|
154
|
-
if (f == null)
|
|
155
|
-
throw new Error("Illegal argument " + f);
|
|
156
|
-
var o = s.wordsToBytes(a(f, d));
|
|
157
|
-
return d && d.asBytes ? o : d && d.asString ? u.bytesToString(o) : s.bytesToHex(o);
|
|
158
|
-
};
|
|
159
|
-
}()), E.exports;
|
|
160
|
-
}
|
|
161
|
-
var G = V();
|
|
162
|
-
const J = /* @__PURE__ */ U(G);
|
|
163
|
-
function K() {
|
|
164
|
-
try {
|
|
165
|
-
return typeof navigator < "u" && navigator.product === "ReactNative";
|
|
166
|
-
} catch {
|
|
167
|
-
return !1;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
function $() {
|
|
171
|
-
try {
|
|
172
|
-
if (typeof window > "u")
|
|
173
|
-
return typeof process < "u" && process.env && "__NEXT_PROCESSED_ENV" in process.env;
|
|
174
|
-
const s = window;
|
|
175
|
-
return !!(s.__NEXT_DATA__ || s.next || document.getElementById("__next"));
|
|
176
|
-
} catch {
|
|
177
|
-
return !1;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
function z() {
|
|
181
|
-
try {
|
|
182
|
-
if (typeof window > "u")
|
|
183
|
-
return !1;
|
|
184
|
-
const s = window;
|
|
185
|
-
return !!(s.__VUE__ || s.__VUE_DEVTOOLS_GLOBAL_HOOK__ || document.querySelector("[data-v-]"));
|
|
186
|
-
} catch {
|
|
187
|
-
return !1;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
function W() {
|
|
191
|
-
try {
|
|
192
|
-
if (typeof window > "u")
|
|
193
|
-
return !1;
|
|
194
|
-
const s = window;
|
|
195
|
-
return s.__REACT_DEVTOOLS_GLOBAL_HOOK__ || s.React ? !0 : !!document.querySelector(
|
|
196
|
-
"[data-reactroot], [data-reactid], ._reactRoot, ._reactRootContainer"
|
|
197
|
-
);
|
|
198
|
-
} catch {
|
|
199
|
-
return !1;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
function X() {
|
|
203
|
-
return W() ? "react" : K() ? "react-native" : $() ? "nextjs" : z() ? "vue" : "unknown";
|
|
204
|
-
}
|
|
205
|
-
let R = null;
|
|
206
|
-
function Z() {
|
|
207
|
-
return R === null && (R = X()), R;
|
|
208
|
-
}
|
|
209
|
-
const b = "1f8d3e558f493e38a037dbfadb8ba344", Q = "d473b1dcc969105adab157226cd9cf63", C = Symbol.for("@coinbase/cdp-analytics");
|
|
210
|
-
function Y() {
|
|
211
|
-
const s = globalThis;
|
|
212
|
-
return s[C] || (s[C] = {
|
|
213
|
-
identifier: "",
|
|
214
|
-
enabled: !0,
|
|
215
|
-
isProduction: !1,
|
|
216
|
-
isUsingMocks: !1,
|
|
217
|
-
sendEvent: w,
|
|
218
|
-
sendActionCallEvent: (l) => w({ ...l, type: "action_call" }),
|
|
219
|
-
sendHookCallEvent: (l) => w({ ...l, type: "hook_call" }),
|
|
220
|
-
sendComponentCallEvent: (l) => w({ ...l, type: "component_call" }),
|
|
221
|
-
versionRegistry: {},
|
|
222
|
-
registerPackageVersion: (l, c) => {
|
|
223
|
-
g.versionRegistry[l] = c;
|
|
224
|
-
}
|
|
225
|
-
}), s[C];
|
|
226
|
-
}
|
|
227
|
-
const g = Y();
|
|
228
|
-
async function w(s) {
|
|
229
|
-
if (!g.enabled || !g.identifier)
|
|
230
|
-
return;
|
|
231
|
-
const l = Date.now(), u = [{
|
|
232
|
-
user_id: g.identifier,
|
|
233
|
-
event_type: s.type,
|
|
234
|
-
platform: k() ? "web" : "native",
|
|
235
|
-
timestamp: l,
|
|
236
|
-
event_properties: {
|
|
237
|
-
project_name: "cdp-embedded-wallet",
|
|
238
|
-
framework: Z(),
|
|
239
|
-
isLocalHost: j(),
|
|
240
|
-
isUsingMocks: g.isUsingMocks,
|
|
241
|
-
package_versions: g.versionRegistry,
|
|
242
|
-
...s
|
|
243
|
-
}
|
|
244
|
-
}], a = JSON.stringify(u), f = l.toString(), d = J(a + f), o = {
|
|
245
|
-
client: g.isProduction ? Q : b,
|
|
246
|
-
e: a,
|
|
247
|
-
checksum: d
|
|
248
|
-
};
|
|
249
|
-
await fetch("https://cca-lite.coinbase.com/amp", {
|
|
250
|
-
method: "POST",
|
|
251
|
-
mode: "no-cors",
|
|
252
|
-
headers: {
|
|
253
|
-
"Content-Type": "application/json"
|
|
254
|
-
},
|
|
255
|
-
body: JSON.stringify(o)
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
function k() {
|
|
259
|
-
return typeof window < "u" && typeof document < "u";
|
|
260
|
-
}
|
|
261
|
-
function j() {
|
|
262
|
-
return k() ? window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" : !1;
|
|
263
|
-
}
|
|
264
|
-
function nt(s) {
|
|
265
|
-
const l = M(!1);
|
|
266
|
-
q(() => {
|
|
267
|
-
l.current || (g.sendComponentCallEvent({ name: s }), l.current = !0);
|
|
268
|
-
}, [s]);
|
|
269
|
-
}
|
|
270
|
-
export {
|
|
271
|
-
g as A,
|
|
272
|
-
nt as u
|
|
273
|
-
};
|