@crossmint/client-sdk-react-ui 1.10.5 → 1.10.7
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/{chunk-GGVJALEH.cjs → chunk-2ROLE4XU.cjs} +3 -3
- package/dist/{chunk-HYP7ISWS.js → chunk-5EE2IAIP.js} +2 -2
- package/dist/{chunk-FKRBO2MK.js → chunk-5UXGDXPR.js} +2 -2
- package/dist/chunk-6CPZDD6Y.js +29 -0
- package/dist/chunk-6CPZDD6Y.js.map +1 -0
- package/dist/{chunk-NKOG6FTK.js → chunk-6EX2VR7S.js} +2 -2
- package/dist/{chunk-U5EONMPH.js → chunk-6FG6NL44.js} +4 -4
- package/dist/{chunk-E7KTAG6X.cjs → chunk-6PPUWTTF.cjs} +3 -3
- package/dist/{chunk-MBJBFR2H.js → chunk-7BZSIPWM.js} +2 -2
- package/dist/chunk-BFTVVPCU.js +81 -0
- package/dist/chunk-BFTVVPCU.js.map +1 -0
- package/dist/chunk-BURUD6IV.cjs +64 -0
- package/dist/chunk-BURUD6IV.cjs.map +1 -0
- package/dist/{chunk-LF3XEXLA.js → chunk-DCMLWFDK.js} +2 -2
- package/dist/chunk-DR67KSE7.js +31 -0
- package/dist/chunk-DR67KSE7.js.map +1 -0
- package/dist/{chunk-YP4CPG34.js → chunk-FGHABNQM.js} +2 -2
- package/dist/{chunk-YP4CPG34.js.map → chunk-FGHABNQM.js.map} +1 -1
- package/dist/{chunk-6AFXSTEN.cjs → chunk-GMKTZIU2.cjs} +3 -3
- package/dist/{chunk-4BGD6LSC.js → chunk-HOTEC5UH.js} +2 -2
- package/dist/chunk-HW2Q6J4R.js +64 -0
- package/dist/chunk-HW2Q6J4R.js.map +1 -0
- package/dist/chunk-HZ26XTTK.cjs +81 -0
- package/dist/chunk-HZ26XTTK.cjs.map +1 -0
- package/dist/{chunk-LD66M6G7.cjs → chunk-K5S6RUJ3.cjs} +3 -3
- package/dist/chunk-LGY5FQOZ.cjs +29 -0
- package/dist/chunk-LGY5FQOZ.cjs.map +1 -0
- package/dist/{chunk-HR57IU52.cjs → chunk-LJA62EVT.cjs} +3 -3
- package/dist/{chunk-EBMORHG3.cjs → chunk-MCINXS2Y.cjs} +17 -252
- package/dist/chunk-MCINXS2Y.cjs.map +1 -0
- package/dist/{chunk-T5WAVOPI.js → chunk-O53ZB544.js} +55 -290
- package/dist/chunk-O53ZB544.js.map +1 -0
- package/dist/{chunk-G526QBKQ.cjs → chunk-QFZ6GZZR.cjs} +3 -3
- package/dist/{chunk-KAXBBO66.cjs → chunk-SBTNHVSD.cjs} +3 -3
- package/dist/{chunk-7YHGZZ6G.js → chunk-TH42AO6J.js} +2 -2
- package/dist/{chunk-JZYMJ733.js → chunk-U7LXB3SM.js} +2 -2
- package/dist/chunk-UGHW5HMB.cjs +31 -0
- package/dist/chunk-UGHW5HMB.cjs.map +1 -0
- package/dist/{chunk-CPISBXIR.cjs → chunk-Y3SUMTUI.cjs} +2 -2
- package/dist/{chunk-CPISBXIR.cjs.map → chunk-Y3SUMTUI.cjs.map} +1 -1
- package/dist/{chunk-3LHIEADG.cjs → chunk-YNBGMNE6.cjs} +3 -3
- package/dist/{chunk-NTAMXW3Z.cjs → chunk-ZJC4OB5Z.cjs} +3 -3
- package/dist/components/CrossmintNFTCollectionView.cjs +3 -3
- package/dist/components/CrossmintNFTCollectionView.js +2 -2
- package/dist/components/CrossmintNFTDetail.cjs +3 -3
- package/dist/components/CrossmintNFTDetail.js +2 -2
- package/dist/components/auth/AuthForm.cjs +5 -11
- package/dist/components/auth/AuthForm.js +4 -10
- package/dist/components/auth/AuthFormBackButton.cjs +5 -11
- package/dist/components/auth/AuthFormBackButton.js +4 -10
- package/dist/components/auth/AuthFormDialog.cjs +5 -11
- package/dist/components/auth/AuthFormDialog.js +4 -10
- package/dist/components/auth/EmbeddedAuthForm.cjs +6 -12
- package/dist/components/auth/EmbeddedAuthForm.js +5 -11
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs +5 -11
- package/dist/components/auth/methods/email/EmailAuthFlow.js +4 -10
- package/dist/components/auth/methods/email/EmailOTPInput.cjs +5 -11
- package/dist/components/auth/methods/email/EmailOTPInput.js +4 -10
- package/dist/components/auth/methods/email/EmailSignIn.cjs +5 -11
- package/dist/components/auth/methods/email/EmailSignIn.js +4 -10
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +5 -11
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +4 -10
- package/dist/components/auth/methods/google/GoogleSignIn.cjs +5 -11
- package/dist/components/auth/methods/google/GoogleSignIn.js +4 -10
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +43 -12
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs.map +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.d.cts +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.d.ts +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.js +43 -12
- package/dist/components/auth/methods/web3/Web3AuthFlow.js.map +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs +8 -11
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.js +7 -10
- package/dist/components/auth/methods/web3/Web3Connector.cjs +58 -4
- package/dist/components/auth/methods/web3/Web3Connector.cjs.map +1 -1
- package/dist/components/auth/methods/web3/Web3Connector.js +58 -4
- package/dist/components/auth/methods/web3/Web3Connector.js.map +1 -1
- package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs +48 -4
- package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs.map +1 -1
- package/dist/components/auth/methods/web3/Web3ConnectorButton.js +48 -4
- package/dist/components/auth/methods/web3/Web3ConnectorButton.js.map +1 -1
- package/dist/components/auth/methods/web3/Web3Connectors.cjs +6 -11
- package/dist/components/auth/methods/web3/Web3Connectors.js +5 -10
- package/dist/components/common/Divider.cjs +5 -11
- package/dist/components/common/Divider.js +4 -10
- package/dist/components/embed/index.cjs +4 -4
- package/dist/components/embed/index.js +3 -3
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +7 -13
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +6 -12
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +6 -12
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +5 -11
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs +4 -22
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs.map +1 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js +3 -21
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js.map +1 -1
- package/dist/components/embed/v3/index.cjs +7 -13
- package/dist/components/embed/v3/index.js +6 -12
- package/dist/components/hosted/CrossmintPayButton.cjs +3 -3
- package/dist/components/hosted/CrossmintPayButton.js +2 -2
- package/dist/components/hosted/index.cjs +3 -3
- package/dist/components/hosted/index.js +2 -2
- package/dist/components/index.cjs +15 -21
- package/dist/components/index.js +14 -20
- package/dist/consts/version.cjs +2 -2
- package/dist/consts/version.js +1 -1
- package/dist/hooks/index.cjs +5 -11
- package/dist/hooks/index.js +4 -10
- package/dist/hooks/useAuth.cjs +5 -11
- package/dist/hooks/useAuth.js +4 -10
- package/dist/hooks/useCrossmintAuth.cjs +5 -11
- package/dist/hooks/useCrossmintAuth.js +4 -10
- package/dist/hooks/useCrossmintCheckout.cjs +4 -4
- package/dist/hooks/useCrossmintCheckout.js +3 -3
- package/dist/hooks/useOAuthWindowListener.cjs +5 -11
- package/dist/hooks/useOAuthWindowListener.js +4 -10
- package/dist/hooks/useWallet.cjs +5 -11
- package/dist/hooks/useWallet.js +4 -10
- package/dist/icons/base64Icons.cjs +6 -6
- package/dist/icons/base64Icons.cjs.map +1 -1
- package/dist/icons/base64Icons.js +5 -5
- package/dist/icons/base64Icons.js.map +1 -1
- package/dist/index.cjs +15 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -20
- package/dist/index.js.map +1 -1
- package/dist/providers/CrossmintAuthProvider.cjs +5 -11
- package/dist/providers/CrossmintAuthProvider.js +4 -10
- package/dist/providers/CrossmintWalletProvider.cjs +5 -11
- package/dist/providers/CrossmintWalletProvider.js +4 -10
- package/dist/providers/auth/AuthFormProvider.cjs +5 -11
- package/dist/providers/auth/AuthFormProvider.js +4 -10
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.cjs +33 -0
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.d.cts +10 -0
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.d.ts +10 -0
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.js +33 -0
- package/dist/providers/index.cjs +5 -11
- package/dist/providers/index.js +4 -10
- package/dist/utils/createCrossmintApiClient.cjs +3 -3
- package/dist/utils/createCrossmintApiClient.js +2 -2
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.cjs +8 -0
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.d.cts +6 -0
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.d.ts +6 -0
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.js +8 -0
- package/package.json +5 -8
- package/src/components/auth/AuthForm.tsx +9 -2
- package/src/components/auth/methods/web3/Web3AuthFlow.tsx +18 -0
- package/src/components/auth/methods/web3/Web3Connectors.tsx +5 -72
- package/src/components/embed/v3/crypto/CryptoWalletConnectionHandler.tsx +3 -24
- package/src/providers/CrossmintAuthProvider.test.tsx +0 -4
- package/src/providers/CrossmintWalletProvider.test.tsx +0 -6
- package/src/providers/auth/AuthFormProvider.test.tsx +0 -5
- package/src/providers/auth/AuthFormProvider.tsx +1 -6
- package/src/providers/auth/web3/DynamicWeb3WalletConnect.tsx +73 -0
- package/src/utils/dynamic/dynamicChainToCrossmintChain.ts +20 -0
- package/dist/chunk-5S4VO6RB.cjs +0 -55
- package/dist/chunk-5S4VO6RB.cjs.map +0 -1
- package/dist/chunk-EBMORHG3.cjs.map +0 -1
- package/dist/chunk-HSLAH2PN.cjs +0 -54
- package/dist/chunk-HSLAH2PN.cjs.map +0 -1
- package/dist/chunk-NFWMF6T7.js +0 -54
- package/dist/chunk-NFWMF6T7.js.map +0 -1
- package/dist/chunk-OZS4WEKF.js +0 -55
- package/dist/chunk-OZS4WEKF.js.map +0 -1
- package/dist/chunk-Q3UM7UCM.cjs +0 -64
- package/dist/chunk-Q3UM7UCM.cjs.map +0 -1
- package/dist/chunk-QFQWKKVU.js +0 -11
- package/dist/chunk-QFQWKKVU.js.map +0 -1
- package/dist/chunk-QK5J7FD3.cjs +0 -11
- package/dist/chunk-QK5J7FD3.cjs.map +0 -1
- package/dist/chunk-T5WAVOPI.js.map +0 -1
- package/dist/chunk-ZSWTJ6E7.js +0 -64
- package/dist/chunk-ZSWTJ6E7.js.map +0 -1
- package/dist/components/auth/methods/web3/Web3ConnectorContainer.cjs +0 -36
- package/dist/components/auth/methods/web3/Web3ConnectorContainer.d.cts +0 -10
- package/dist/components/auth/methods/web3/Web3ConnectorContainer.d.ts +0 -10
- package/dist/components/auth/methods/web3/Web3ConnectorContainer.js +0 -36
- package/dist/providers/auth/web3/WagmiAuthProvider.cjs +0 -8
- package/dist/providers/auth/web3/WagmiAuthProvider.d.cts +0 -8
- package/dist/providers/auth/web3/WagmiAuthProvider.d.ts +0 -8
- package/dist/providers/auth/web3/WagmiAuthProvider.js +0 -8
- package/src/components/auth/methods/web3/Web3ConnectorContainer.tsx +0 -87
- package/src/providers/auth/web3/WagmiAuthProvider.tsx +0 -56
- /package/dist/{chunk-GGVJALEH.cjs.map → chunk-2ROLE4XU.cjs.map} +0 -0
- /package/dist/{chunk-HYP7ISWS.js.map → chunk-5EE2IAIP.js.map} +0 -0
- /package/dist/{chunk-FKRBO2MK.js.map → chunk-5UXGDXPR.js.map} +0 -0
- /package/dist/{chunk-NKOG6FTK.js.map → chunk-6EX2VR7S.js.map} +0 -0
- /package/dist/{chunk-U5EONMPH.js.map → chunk-6FG6NL44.js.map} +0 -0
- /package/dist/{chunk-E7KTAG6X.cjs.map → chunk-6PPUWTTF.cjs.map} +0 -0
- /package/dist/{chunk-MBJBFR2H.js.map → chunk-7BZSIPWM.js.map} +0 -0
- /package/dist/{chunk-LF3XEXLA.js.map → chunk-DCMLWFDK.js.map} +0 -0
- /package/dist/{chunk-6AFXSTEN.cjs.map → chunk-GMKTZIU2.cjs.map} +0 -0
- /package/dist/{chunk-4BGD6LSC.js.map → chunk-HOTEC5UH.js.map} +0 -0
- /package/dist/{chunk-LD66M6G7.cjs.map → chunk-K5S6RUJ3.cjs.map} +0 -0
- /package/dist/{chunk-HR57IU52.cjs.map → chunk-LJA62EVT.cjs.map} +0 -0
- /package/dist/{chunk-G526QBKQ.cjs.map → chunk-QFZ6GZZR.cjs.map} +0 -0
- /package/dist/{chunk-KAXBBO66.cjs.map → chunk-SBTNHVSD.cjs.map} +0 -0
- /package/dist/{chunk-7YHGZZ6G.js.map → chunk-TH42AO6J.js.map} +0 -0
- /package/dist/{chunk-JZYMJ733.js.map → chunk-U7LXB3SM.js.map} +0 -0
- /package/dist/{chunk-3LHIEADG.cjs.map → chunk-YNBGMNE6.cjs.map} +0 -0
- /package/dist/{chunk-NTAMXW3Z.cjs.map → chunk-ZJC4OB5Z.cjs.map} +0 -0
- /package/dist/{components/auth/methods/web3/Web3ConnectorContainer.cjs.map → providers/auth/web3/DynamicWeb3WalletConnect.cjs.map} +0 -0
- /package/dist/{components/auth/methods/web3/Web3ConnectorContainer.js.map → providers/auth/web3/DynamicWeb3WalletConnect.js.map} +0 -0
- /package/dist/{providers/auth/web3/WagmiAuthProvider.cjs.map → utils/dynamic/dynamicChainToCrossmintChain.cjs.map} +0 -0
- /package/dist/{providers/auth/web3/WagmiAuthProvider.js.map → utils/dynamic/dynamicChainToCrossmintChain.js.map} +0 -0
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Web3ConnectorButton
|
|
3
|
-
} from "./chunk-NFWMF6T7.js";
|
|
4
|
-
import {
|
|
5
|
-
Web3Connector
|
|
6
|
-
} from "./chunk-ZSWTJ6E7.js";
|
|
7
|
-
import {
|
|
8
|
-
WagmiAuthProvider
|
|
9
|
-
} from "./chunk-OZS4WEKF.js";
|
|
10
1
|
import {
|
|
11
2
|
FarcasterProvider
|
|
12
3
|
} from "./chunk-A7J4DAE7.js";
|
|
@@ -39,19 +30,9 @@ import {
|
|
|
39
30
|
import {
|
|
40
31
|
LeftArrowIcon
|
|
41
32
|
} from "./chunk-ZDQGQY7Z.js";
|
|
42
|
-
import {
|
|
43
|
-
WalletIcon
|
|
44
|
-
} from "./chunk-VZIXXIU5.js";
|
|
45
33
|
import {
|
|
46
34
|
AlertIcon
|
|
47
35
|
} from "./chunk-7KIY6DLW.js";
|
|
48
|
-
import {
|
|
49
|
-
metamaskIcon,
|
|
50
|
-
walletConnectIcon
|
|
51
|
-
} from "./chunk-QFQWKKVU.js";
|
|
52
|
-
import {
|
|
53
|
-
ChevronRightIcon
|
|
54
|
-
} from "./chunk-3KR4GYLF.js";
|
|
55
36
|
import {
|
|
56
37
|
EmailOtpIcon
|
|
57
38
|
} from "./chunk-I63FQCIV.js";
|
|
@@ -72,7 +53,7 @@ import {
|
|
|
72
53
|
} from "./chunk-CRTRMMJ7.js";
|
|
73
54
|
|
|
74
55
|
// src/providers/CrossmintWalletProvider.tsx
|
|
75
|
-
import { createContext as createContext3, useMemo as useMemo3, useState as
|
|
56
|
+
import { createContext as createContext3, useMemo as useMemo3, useState as useState8 } from "react";
|
|
76
57
|
import { createPortal } from "react-dom";
|
|
77
58
|
import {
|
|
78
59
|
SmartWalletError,
|
|
@@ -93,7 +74,7 @@ function useWallet() {
|
|
|
93
74
|
import { useContext as useContext4 } from "react";
|
|
94
75
|
|
|
95
76
|
// src/providers/CrossmintAuthProvider.tsx
|
|
96
|
-
import { createContext as createContext2, useEffect as
|
|
77
|
+
import { createContext as createContext2, useEffect as useEffect5, useMemo as useMemo2, useRef as useRef2, useState as useState7 } from "react";
|
|
97
78
|
import { CrossmintAuth, getCookie } from "@crossmint/client-sdk-auth";
|
|
98
79
|
import { validateApiKeyAndGetCrossmintBaseUrl } from "@crossmint/common-sdk-base";
|
|
99
80
|
import { SESSION_PREFIX } from "@crossmint/common-sdk-auth";
|
|
@@ -181,9 +162,13 @@ var AuthFormProvider = ({
|
|
|
181
162
|
setError,
|
|
182
163
|
setStep
|
|
183
164
|
};
|
|
184
|
-
return /* @__PURE__ */ jsx(AuthFormContext.Provider, { value, children
|
|
165
|
+
return /* @__PURE__ */ jsx(AuthFormContext.Provider, { value, children });
|
|
185
166
|
};
|
|
186
167
|
|
|
168
|
+
// src/components/auth/AuthForm.tsx
|
|
169
|
+
import { lazy } from "react";
|
|
170
|
+
import Color2 from "color";
|
|
171
|
+
|
|
187
172
|
// src/components/auth/methods/email/EmailAuthFlow.tsx
|
|
188
173
|
import { useState as useState4 } from "react";
|
|
189
174
|
|
|
@@ -756,236 +741,20 @@ function FarcasterQRCode() {
|
|
|
756
741
|
] });
|
|
757
742
|
}
|
|
758
743
|
|
|
759
|
-
// src/components/auth/methods/web3/Web3AuthFlowButton.tsx
|
|
760
|
-
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
761
|
-
function Web3AuthFlowButton() {
|
|
762
|
-
var _a, _b, _c, _d, _e;
|
|
763
|
-
const { step, appearance, setStep, setError } = useAuthForm();
|
|
764
|
-
if (step !== "initial") {
|
|
765
|
-
return null;
|
|
766
|
-
}
|
|
767
|
-
return /* @__PURE__ */ jsxs6(
|
|
768
|
-
"button",
|
|
769
|
-
{
|
|
770
|
-
className: classNames(
|
|
771
|
-
"relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center",
|
|
772
|
-
"transition-colors duration-200 ease-in-out",
|
|
773
|
-
"hover:bg-cm-hover focus:bg-cm-hover outline-none"
|
|
774
|
-
),
|
|
775
|
-
style: {
|
|
776
|
-
borderRadius: appearance == null ? void 0 : appearance.borderRadius,
|
|
777
|
-
borderColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.border,
|
|
778
|
-
backgroundColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.buttonBackground
|
|
779
|
-
},
|
|
780
|
-
onClick: () => {
|
|
781
|
-
setStep("web3");
|
|
782
|
-
setError(null);
|
|
783
|
-
},
|
|
784
|
-
children: [
|
|
785
|
-
/* @__PURE__ */ jsx9(
|
|
786
|
-
WalletIcon,
|
|
787
|
-
{
|
|
788
|
-
className: "h-[21px] w-[21px] absolute left-[20px]",
|
|
789
|
-
style: { color: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.textPrimary }
|
|
790
|
-
}
|
|
791
|
-
),
|
|
792
|
-
/* @__PURE__ */ jsx9("span", { className: "font-medium", style: { margin: "0px 32px", color: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.textPrimary }, children: "Continue with a wallet" }),
|
|
793
|
-
/* @__PURE__ */ jsx9(
|
|
794
|
-
ChevronRightIcon,
|
|
795
|
-
{
|
|
796
|
-
className: "h-[21px] w-[21px] absolute right-[20px]",
|
|
797
|
-
style: { color: (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.textSecondary }
|
|
798
|
-
}
|
|
799
|
-
),
|
|
800
|
-
/* @__PURE__ */ jsx9("span", { className: "sr-only", children: "Continue with a wallet" })
|
|
801
|
-
]
|
|
802
|
-
}
|
|
803
|
-
);
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
// src/components/auth/methods/web3/Web3ConnectorContainer.tsx
|
|
807
|
-
import { useState as useState7, useEffect as useEffect4 } from "react";
|
|
808
|
-
import { useAccount, useChainId, useConnect, useSignMessage } from "wagmi";
|
|
809
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
810
|
-
function Web3ConnectorContainer({ providerType, flag, icon }) {
|
|
811
|
-
var _a, _b;
|
|
812
|
-
const { crossmintAuth } = useCrossmintAuth();
|
|
813
|
-
const { appearance, error, setError } = useAuthForm();
|
|
814
|
-
const [isLoading, setIsLoading] = useState7(false);
|
|
815
|
-
const chainId = useChainId();
|
|
816
|
-
const { address, status: accountStatus } = useAccount();
|
|
817
|
-
const { signMessageAsync, status: signMessageStatus } = useSignMessage();
|
|
818
|
-
const { connect, connectors } = useConnect({
|
|
819
|
-
mutation: {
|
|
820
|
-
onError: () => setIsLoading(false)
|
|
821
|
-
}
|
|
822
|
-
});
|
|
823
|
-
const isExtensionInstalled = (_b = (_a = window.ethereum) == null ? void 0 : _a[flag]) != null ? _b : false;
|
|
824
|
-
if (!isExtensionInstalled) {
|
|
825
|
-
providerType = "walletConnect";
|
|
826
|
-
}
|
|
827
|
-
const connector = connectors.find((c) => c.id === providerType);
|
|
828
|
-
useEffect4(() => {
|
|
829
|
-
if (address != null) {
|
|
830
|
-
handleSignIn();
|
|
831
|
-
}
|
|
832
|
-
}, [address]);
|
|
833
|
-
const handleSignIn = () => __async(this, null, function* () {
|
|
834
|
-
if (address == null) {
|
|
835
|
-
return;
|
|
836
|
-
}
|
|
837
|
-
setIsLoading(true);
|
|
838
|
-
setError(null);
|
|
839
|
-
try {
|
|
840
|
-
const res = yield crossmintAuth == null ? void 0 : crossmintAuth.signInWithSmartWallet(address);
|
|
841
|
-
const signature = yield signMessageAsync({ message: res.challenge });
|
|
842
|
-
const authResponse = yield crossmintAuth == null ? void 0 : crossmintAuth.authenticateSmartWallet(address, signature);
|
|
843
|
-
const oneTimeSecret = authResponse.oneTimeSecret;
|
|
844
|
-
yield crossmintAuth == null ? void 0 : crossmintAuth.handleRefreshAuthMaterial(oneTimeSecret);
|
|
845
|
-
} catch (error2) {
|
|
846
|
-
console.error(`Error connecting to ${providerType}:`, error2);
|
|
847
|
-
setError(`Error connecting to ${providerType}. Please try again or contact support.`);
|
|
848
|
-
} finally {
|
|
849
|
-
setIsLoading(false);
|
|
850
|
-
}
|
|
851
|
-
});
|
|
852
|
-
const isLoadingOrPending = isLoading || accountStatus === "connecting" || accountStatus === "reconnecting" || signMessageStatus === "pending";
|
|
853
|
-
return /* @__PURE__ */ jsx10(
|
|
854
|
-
Web3Connector,
|
|
855
|
-
{
|
|
856
|
-
icon,
|
|
857
|
-
appearance,
|
|
858
|
-
headingText: signMessageStatus === "pending" ? "Sign to verify" : "Connect your wallet",
|
|
859
|
-
buttonText: error != null && !isLoadingOrPending ? "Retry" : isLoadingOrPending ? "Connecting" : "Connect",
|
|
860
|
-
isLoading: isLoadingOrPending,
|
|
861
|
-
onConnectClick: () => {
|
|
862
|
-
if (address != null) {
|
|
863
|
-
handleSignIn();
|
|
864
|
-
} else if (connector) {
|
|
865
|
-
connect({ connector, chainId });
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
);
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
// src/components/auth/methods/web3/Web3Connectors.tsx
|
|
873
|
-
import { useAccount as useAccount2, useDisconnect } from "wagmi";
|
|
874
|
-
import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
875
|
-
function Web3Connectors() {
|
|
876
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
877
|
-
const { appearance, step, setStep } = useAuthForm();
|
|
878
|
-
const { isConnected } = useAccount2();
|
|
879
|
-
const { disconnect } = useDisconnect();
|
|
880
|
-
if (step === "web3") {
|
|
881
|
-
return /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
882
|
-
/* @__PURE__ */ jsx11(
|
|
883
|
-
AuthFormBackButton,
|
|
884
|
-
{
|
|
885
|
-
onClick: () => setStep("initial"),
|
|
886
|
-
iconColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary,
|
|
887
|
-
ringColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.accent
|
|
888
|
-
}
|
|
889
|
-
),
|
|
890
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col items-center gap-2", children: [
|
|
891
|
-
/* @__PURE__ */ jsx11("div", { className: "text-center mb-6", children: /* @__PURE__ */ jsx11(
|
|
892
|
-
"h3",
|
|
893
|
-
{
|
|
894
|
-
className: "text-lg font-semibold text-cm-text-primary",
|
|
895
|
-
style: { color: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.textPrimary },
|
|
896
|
-
children: "Connect wallet"
|
|
897
|
-
}
|
|
898
|
-
) }),
|
|
899
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-[10px] w-full", children: [
|
|
900
|
-
/* @__PURE__ */ jsx11(
|
|
901
|
-
Web3ConnectorButton,
|
|
902
|
-
{
|
|
903
|
-
title: "Metamask",
|
|
904
|
-
appearance,
|
|
905
|
-
img: metamaskIcon,
|
|
906
|
-
onClick: () => {
|
|
907
|
-
if (isConnected) {
|
|
908
|
-
disconnect();
|
|
909
|
-
}
|
|
910
|
-
setTimeout(() => {
|
|
911
|
-
setStep("web3/metamask");
|
|
912
|
-
}, 200);
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
),
|
|
916
|
-
/* @__PURE__ */ jsx11(
|
|
917
|
-
Web3ConnectorButton,
|
|
918
|
-
{
|
|
919
|
-
title: "WalletConnect",
|
|
920
|
-
appearance,
|
|
921
|
-
img: walletConnectIcon,
|
|
922
|
-
onClick: () => {
|
|
923
|
-
if (isConnected) {
|
|
924
|
-
disconnect();
|
|
925
|
-
}
|
|
926
|
-
setTimeout(() => {
|
|
927
|
-
setStep("web3/walletconnect");
|
|
928
|
-
}, 200);
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
)
|
|
932
|
-
] })
|
|
933
|
-
] })
|
|
934
|
-
] });
|
|
935
|
-
}
|
|
936
|
-
if (step === "web3/metamask") {
|
|
937
|
-
return /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
938
|
-
/* @__PURE__ */ jsx11(
|
|
939
|
-
AuthFormBackButton,
|
|
940
|
-
{
|
|
941
|
-
onClick: () => {
|
|
942
|
-
setStep("web3");
|
|
943
|
-
},
|
|
944
|
-
iconColor: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.textPrimary,
|
|
945
|
-
ringColor: (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.accent
|
|
946
|
-
}
|
|
947
|
-
),
|
|
948
|
-
/* @__PURE__ */ jsx11(Web3ConnectorContainer, { providerType: "metaMaskSDK", flag: "isMetaMask", icon: metamaskIcon })
|
|
949
|
-
] });
|
|
950
|
-
}
|
|
951
|
-
if (step === "web3/walletconnect") {
|
|
952
|
-
return /* @__PURE__ */ jsxs7(Fragment4, { children: [
|
|
953
|
-
/* @__PURE__ */ jsx11(
|
|
954
|
-
AuthFormBackButton,
|
|
955
|
-
{
|
|
956
|
-
onClick: () => {
|
|
957
|
-
setStep("web3");
|
|
958
|
-
},
|
|
959
|
-
iconColor: (_f = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _f.textPrimary,
|
|
960
|
-
ringColor: (_g = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _g.accent
|
|
961
|
-
}
|
|
962
|
-
),
|
|
963
|
-
/* @__PURE__ */ jsx11(Web3ConnectorContainer, { providerType: "walletConnect", icon: walletConnectIcon })
|
|
964
|
-
] });
|
|
965
|
-
}
|
|
966
|
-
return null;
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
// src/components/auth/methods/web3/Web3AuthFlow.tsx
|
|
970
|
-
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
971
|
-
function Web3AuthFlow() {
|
|
972
|
-
const { step } = useAuthForm();
|
|
973
|
-
if (step.startsWith("web3")) {
|
|
974
|
-
return /* @__PURE__ */ jsx12(Web3Connectors, {});
|
|
975
|
-
}
|
|
976
|
-
if (step === "initial") {
|
|
977
|
-
return /* @__PURE__ */ jsx12(Web3AuthFlowButton, {});
|
|
978
|
-
}
|
|
979
|
-
return null;
|
|
980
|
-
}
|
|
981
|
-
|
|
982
744
|
// src/components/auth/AuthForm.tsx
|
|
983
|
-
import
|
|
984
|
-
|
|
745
|
+
import { Fragment as Fragment4, jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
746
|
+
var Web3AuthFlow = lazy(
|
|
747
|
+
() => (
|
|
748
|
+
// @ts-expect-error - Error because we dont use 'module' field in tsconfig, which is expected because we use tsup to compile
|
|
749
|
+
import("./components/auth/methods/web3/Web3AuthFlow.js").then((mod) => ({
|
|
750
|
+
default: mod.Web3AuthFlow
|
|
751
|
+
}))
|
|
752
|
+
)
|
|
753
|
+
);
|
|
985
754
|
function AuthForm({ className }) {
|
|
986
755
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
987
756
|
const { step, appearance, loginMethods, baseUrl, error } = useAuthForm();
|
|
988
|
-
return /* @__PURE__ */
|
|
757
|
+
return /* @__PURE__ */ jsxs6(
|
|
989
758
|
"div",
|
|
990
759
|
{
|
|
991
760
|
className: classNames(
|
|
@@ -993,7 +762,7 @@ function AuthForm({ className }) {
|
|
|
993
762
|
className
|
|
994
763
|
),
|
|
995
764
|
children: [
|
|
996
|
-
error ? /* @__PURE__ */
|
|
765
|
+
error ? /* @__PURE__ */ jsxs6(
|
|
997
766
|
"div",
|
|
998
767
|
{
|
|
999
768
|
className: "flex items-start justify-start w-full rounded-lg p-2 mt-4 bg-cm-danger-muted",
|
|
@@ -1001,13 +770,13 @@ function AuthForm({ className }) {
|
|
|
1001
770
|
backgroundColor: new Color2((_b = (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.danger) != null ? _b : "#f44336").alpha(0.12).toString()
|
|
1002
771
|
},
|
|
1003
772
|
children: [
|
|
1004
|
-
/* @__PURE__ */
|
|
1005
|
-
/* @__PURE__ */
|
|
773
|
+
/* @__PURE__ */ jsx9(AlertIcon, { customColor: (_d = (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.danger) != null ? _d : "#f44336" }),
|
|
774
|
+
/* @__PURE__ */ jsx9("p", { className: "ml-2 text-sm", style: { color: (_f = (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.danger) != null ? _f : "#f44336" }, children: error })
|
|
1006
775
|
]
|
|
1007
776
|
}
|
|
1008
777
|
) : null,
|
|
1009
|
-
step === "initial" ? /* @__PURE__ */
|
|
1010
|
-
/* @__PURE__ */
|
|
778
|
+
step === "initial" ? /* @__PURE__ */ jsxs6("div", { children: [
|
|
779
|
+
/* @__PURE__ */ jsx9(
|
|
1011
780
|
"h1",
|
|
1012
781
|
{
|
|
1013
782
|
className: "text-2xl font-bold text-cm-text-primary",
|
|
@@ -1015,7 +784,7 @@ function AuthForm({ className }) {
|
|
|
1015
784
|
children: "Sign In"
|
|
1016
785
|
}
|
|
1017
786
|
),
|
|
1018
|
-
/* @__PURE__ */
|
|
787
|
+
/* @__PURE__ */ jsx9(
|
|
1019
788
|
"p",
|
|
1020
789
|
{
|
|
1021
790
|
className: "text-base font-normal mb-3 text-cm-text-secondary",
|
|
@@ -1024,14 +793,14 @@ function AuthForm({ className }) {
|
|
|
1024
793
|
}
|
|
1025
794
|
)
|
|
1026
795
|
] }) : null,
|
|
1027
|
-
loginMethods.includes("email") ? /* @__PURE__ */
|
|
1028
|
-
/* @__PURE__ */
|
|
1029
|
-
loginMethods.length > 1 ? /* @__PURE__ */
|
|
796
|
+
loginMethods.includes("email") ? /* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
797
|
+
/* @__PURE__ */ jsx9(EmailAuthFlow, {}),
|
|
798
|
+
loginMethods.length > 1 ? /* @__PURE__ */ jsx9(Divider, { appearance, text: "OR" }) : null
|
|
1030
799
|
] }) : null,
|
|
1031
|
-
loginMethods.includes("google") ? /* @__PURE__ */
|
|
1032
|
-
loginMethods.includes("farcaster") ? /* @__PURE__ */
|
|
1033
|
-
loginMethods.includes("web3") ? /* @__PURE__ */
|
|
1034
|
-
step === "initial" || step === "otp" ? /* @__PURE__ */
|
|
800
|
+
loginMethods.includes("google") ? /* @__PURE__ */ jsx9(GoogleSignIn, {}) : null,
|
|
801
|
+
loginMethods.includes("farcaster") ? /* @__PURE__ */ jsx9(FarcasterProvider, { baseUrl, children: /* @__PURE__ */ jsx9(FarcasterSignIn, {}) }) : null,
|
|
802
|
+
loginMethods.includes("web3") ? /* @__PURE__ */ jsx9(Web3AuthFlow, {}) : null,
|
|
803
|
+
step === "initial" || step === "otp" ? /* @__PURE__ */ jsx9(
|
|
1035
804
|
PoweredByCrossmint,
|
|
1036
805
|
{
|
|
1037
806
|
className: "mt-4 justify-center",
|
|
@@ -1044,15 +813,15 @@ function AuthForm({ className }) {
|
|
|
1044
813
|
}
|
|
1045
814
|
|
|
1046
815
|
// src/components/auth/AuthFormDialog.tsx
|
|
1047
|
-
import { useEffect as
|
|
1048
|
-
import { jsx as
|
|
816
|
+
import { useEffect as useEffect4 } from "react";
|
|
817
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1049
818
|
function AuthFormDialog({ open }) {
|
|
1050
819
|
var _a, _b, _c;
|
|
1051
820
|
const { appearance, setDialogOpen } = useAuthForm();
|
|
1052
|
-
|
|
821
|
+
useEffect4(() => {
|
|
1053
822
|
document.body.style.overflow = open ? "hidden" : "";
|
|
1054
823
|
}, [open]);
|
|
1055
|
-
return /* @__PURE__ */
|
|
824
|
+
return /* @__PURE__ */ jsx10(Dialog, { modal: false, open, onOpenChange: setDialogOpen, children: /* @__PURE__ */ jsxs7(
|
|
1056
825
|
DialogContent,
|
|
1057
826
|
{
|
|
1058
827
|
onInteractOutside: (e) => e.preventDefault(),
|
|
@@ -1065,16 +834,16 @@ function AuthFormDialog({ open }) {
|
|
|
1065
834
|
backgroundColor: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.background
|
|
1066
835
|
},
|
|
1067
836
|
children: [
|
|
1068
|
-
/* @__PURE__ */
|
|
1069
|
-
/* @__PURE__ */
|
|
1070
|
-
/* @__PURE__ */
|
|
837
|
+
/* @__PURE__ */ jsx10(VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsx10(DialogTitle, { children: "Crossmint Auth" }) }),
|
|
838
|
+
/* @__PURE__ */ jsx10(VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsx10(DialogDescription, { children: "Sign in via Crossmint" }) }),
|
|
839
|
+
/* @__PURE__ */ jsx10(AuthForm, { className: "max-w-[448px]" })
|
|
1071
840
|
]
|
|
1072
841
|
}
|
|
1073
842
|
) });
|
|
1074
843
|
}
|
|
1075
844
|
|
|
1076
845
|
// src/providers/CrossmintAuthProvider.tsx
|
|
1077
|
-
import { Fragment as
|
|
846
|
+
import { Fragment as Fragment5, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1078
847
|
var defaultContextValue = {
|
|
1079
848
|
crossmintAuth: void 0,
|
|
1080
849
|
login: () => {
|
|
@@ -1101,7 +870,7 @@ function CrossmintAuthProvider({
|
|
|
1101
870
|
refreshRoute,
|
|
1102
871
|
logoutRoute
|
|
1103
872
|
}) {
|
|
1104
|
-
const [user, setUser] =
|
|
873
|
+
const [user, setUser] = useState7(void 0);
|
|
1105
874
|
const { crossmint, setJwt } = useCrossmint("CrossmintAuthProvider must be used within CrossmintProvider");
|
|
1106
875
|
const crossmintAuthRef = useRef2(null);
|
|
1107
876
|
const crossmintAuth = useMemo2(() => {
|
|
@@ -1124,14 +893,14 @@ function CrossmintAuthProvider({
|
|
|
1124
893
|
return crossmintAuthRef.current;
|
|
1125
894
|
}, []);
|
|
1126
895
|
const crossmintBaseUrl = validateApiKeyAndGetCrossmintBaseUrl(crossmint.apiKey);
|
|
1127
|
-
const [dialogOpen, setDialogOpen] =
|
|
1128
|
-
|
|
896
|
+
const [dialogOpen, setDialogOpen] = useState7(false);
|
|
897
|
+
useEffect5(() => {
|
|
1129
898
|
if (crossmint.jwt == null) {
|
|
1130
899
|
const jwt = getCookie(SESSION_PREFIX);
|
|
1131
900
|
setJwt(jwt);
|
|
1132
901
|
}
|
|
1133
902
|
}, []);
|
|
1134
|
-
|
|
903
|
+
useEffect5(() => {
|
|
1135
904
|
if (crossmint.jwt == null) {
|
|
1136
905
|
return;
|
|
1137
906
|
}
|
|
@@ -1164,7 +933,7 @@ function CrossmintAuthProvider({
|
|
|
1164
933
|
const user2 = yield crossmintAuth.getUser();
|
|
1165
934
|
setUser(user2);
|
|
1166
935
|
});
|
|
1167
|
-
return /* @__PURE__ */
|
|
936
|
+
return /* @__PURE__ */ jsx11(TwindProvider, { children: /* @__PURE__ */ jsx11(
|
|
1168
937
|
AuthContext.Provider,
|
|
1169
938
|
{
|
|
1170
939
|
value: {
|
|
@@ -1176,13 +945,13 @@ function CrossmintAuthProvider({
|
|
|
1176
945
|
status: getAuthStatus(),
|
|
1177
946
|
getUser
|
|
1178
947
|
},
|
|
1179
|
-
children: /* @__PURE__ */
|
|
948
|
+
children: /* @__PURE__ */ jsx11(
|
|
1180
949
|
CrossmintWalletProvider,
|
|
1181
950
|
{
|
|
1182
951
|
defaultChain: embeddedWallets.defaultChain,
|
|
1183
952
|
showPasskeyHelpers: embeddedWallets.showPasskeyHelpers,
|
|
1184
953
|
appearance,
|
|
1185
|
-
children: /* @__PURE__ */
|
|
954
|
+
children: /* @__PURE__ */ jsxs8(
|
|
1186
955
|
AuthFormProvider,
|
|
1187
956
|
{
|
|
1188
957
|
initialState: {
|
|
@@ -1193,8 +962,8 @@ function CrossmintAuthProvider({
|
|
|
1193
962
|
baseUrl: crossmintBaseUrl
|
|
1194
963
|
},
|
|
1195
964
|
children: [
|
|
1196
|
-
/* @__PURE__ */
|
|
1197
|
-
/* @__PURE__ */
|
|
965
|
+
/* @__PURE__ */ jsx11(WalletManager, { embeddedWallets, accessToken: crossmint.jwt, children }),
|
|
966
|
+
/* @__PURE__ */ jsx11(AuthFormDialog, { open: dialogOpen })
|
|
1198
967
|
]
|
|
1199
968
|
}
|
|
1200
969
|
)
|
|
@@ -1209,7 +978,7 @@ function WalletManager({
|
|
|
1209
978
|
accessToken
|
|
1210
979
|
}) {
|
|
1211
980
|
const { getOrCreateWallet, clearWallet, status } = useWallet();
|
|
1212
|
-
|
|
981
|
+
useEffect5(() => {
|
|
1213
982
|
if (embeddedWallets.createOnLogin === "all-users" && status === "not-loaded" && accessToken != null) {
|
|
1214
983
|
getOrCreateWallet({
|
|
1215
984
|
type: embeddedWallets.type,
|
|
@@ -1220,7 +989,7 @@ function WalletManager({
|
|
|
1220
989
|
clearWallet();
|
|
1221
990
|
}
|
|
1222
991
|
}, [accessToken, status]);
|
|
1223
|
-
return /* @__PURE__ */
|
|
992
|
+
return /* @__PURE__ */ jsx11(Fragment5, { children });
|
|
1224
993
|
}
|
|
1225
994
|
|
|
1226
995
|
// src/hooks/useAuth.ts
|
|
@@ -1233,7 +1002,7 @@ function useAuth() {
|
|
|
1233
1002
|
}
|
|
1234
1003
|
|
|
1235
1004
|
// src/providers/CrossmintWalletProvider.tsx
|
|
1236
|
-
import { jsx as
|
|
1005
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1237
1006
|
var WalletContext = createContext3({
|
|
1238
1007
|
status: "not-loaded",
|
|
1239
1008
|
getOrCreateWallet: () => Promise.resolve({ startedCreation: false }),
|
|
@@ -1249,8 +1018,8 @@ function CrossmintWalletProvider({
|
|
|
1249
1018
|
}) {
|
|
1250
1019
|
const { crossmint } = useCrossmint("CrossmintWalletProvider must be used within CrossmintProvider");
|
|
1251
1020
|
const smartWalletSDK = useMemo3(() => SmartWalletSDK.init({ clientApiKey: crossmint.apiKey }), [crossmint.apiKey]);
|
|
1252
|
-
const [walletState, setWalletState] =
|
|
1253
|
-
const [passkeyPromptState, setPasskeyPromptState] =
|
|
1021
|
+
const [walletState, setWalletState] = useState8({ status: "not-loaded" });
|
|
1022
|
+
const [passkeyPromptState, setPasskeyPromptState] = useState8({ open: false });
|
|
1254
1023
|
const getOrCreateWallet = (..._0) => __async(this, [..._0], function* (config = { type: "evm-smart-wallet", signer: { type: "PASSKEY" } }) {
|
|
1255
1024
|
if (walletState.status == "in-progress") {
|
|
1256
1025
|
console.log("Wallet already loading");
|
|
@@ -1303,9 +1072,9 @@ function CrossmintWalletProvider({
|
|
|
1303
1072
|
const clearWallet = () => {
|
|
1304
1073
|
setWalletState({ status: "not-loaded" });
|
|
1305
1074
|
};
|
|
1306
|
-
return /* @__PURE__ */
|
|
1075
|
+
return /* @__PURE__ */ jsxs9(WalletContext.Provider, { value: __spreadProps(__spreadValues({}, walletState), { getOrCreateWallet, clearWallet }), children: [
|
|
1307
1076
|
children,
|
|
1308
|
-
passkeyPromptState.open ? createPortal(/* @__PURE__ */
|
|
1077
|
+
passkeyPromptState.open ? createPortal(/* @__PURE__ */ jsx12(PasskeyPrompt, { state: passkeyPromptState, appearance }), document.body) : null
|
|
1309
1078
|
] });
|
|
1310
1079
|
}
|
|
1311
1080
|
function deriveErrorState(error) {
|
|
@@ -1333,14 +1102,10 @@ export {
|
|
|
1333
1102
|
useOAuthWindowListener,
|
|
1334
1103
|
GoogleSignIn,
|
|
1335
1104
|
FarcasterSignIn,
|
|
1336
|
-
Web3AuthFlowButton,
|
|
1337
|
-
Web3ConnectorContainer,
|
|
1338
|
-
Web3Connectors,
|
|
1339
|
-
Web3AuthFlow,
|
|
1340
1105
|
AuthForm,
|
|
1341
1106
|
AuthFormDialog,
|
|
1342
1107
|
AuthContext,
|
|
1343
1108
|
CrossmintAuthProvider,
|
|
1344
1109
|
useAuth
|
|
1345
1110
|
};
|
|
1346
|
-
//# sourceMappingURL=chunk-
|
|
1111
|
+
//# sourceMappingURL=chunk-O53ZB544.js.map
|