@crossmint/client-sdk-react-ui 1.10.2 → 1.10.4
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-ZOHRCGGI.cjs → chunk-4DICVJSP.cjs} +3 -3
- package/dist/{chunk-NX473NO2.cjs → chunk-6NPGETRZ.cjs} +3 -3
- package/dist/{chunk-MWRMO6JC.js → chunk-6PCSAKDU.js} +2 -2
- package/dist/{chunk-MWRMO6JC.js.map → chunk-6PCSAKDU.js.map} +1 -1
- package/dist/{chunk-67AB7TWG.cjs → chunk-AQELE4DZ.cjs} +3 -3
- package/dist/{chunk-SMCUFLHP.cjs → chunk-CY2PXN5Y.cjs} +3 -3
- package/dist/{chunk-FOCUIKYH.cjs → chunk-EBMORHG3.cjs} +160 -79
- package/dist/chunk-EBMORHG3.cjs.map +1 -0
- package/dist/{chunk-GN7OANUR.js → chunk-EFT2TZG5.js} +2 -2
- package/dist/{chunk-DVONA2BZ.cjs → chunk-FLWOWTHQ.cjs} +3 -3
- package/dist/{chunk-3RXUFZTR.cjs → chunk-G526QBKQ.cjs} +3 -3
- package/dist/{chunk-XJYLJQA5.js → chunk-HQG5G5PG.js} +4 -3
- package/dist/{chunk-XJYLJQA5.js.map → chunk-HQG5G5PG.js.map} +1 -1
- package/dist/{chunk-DJ32OEWG.cjs → chunk-HSLAH2PN.cjs} +4 -4
- package/dist/{chunk-DJ32OEWG.cjs.map → chunk-HSLAH2PN.cjs.map} +1 -1
- package/dist/{chunk-RTC2AZ6A.cjs → chunk-ITCHCRGX.cjs} +2 -2
- package/dist/{chunk-RTC2AZ6A.cjs.map → chunk-ITCHCRGX.cjs.map} +1 -1
- package/dist/{chunk-6TUZ5CU7.js → chunk-KCGRRFIF.js} +2 -2
- package/dist/{chunk-HVI7FCLP.js → chunk-KHZQYMF7.js} +2 -2
- package/dist/{chunk-QB4KFTCT.js → chunk-KSDNMTQD.js} +2 -2
- package/dist/{chunk-WK5RAFJ3.js → chunk-NFWMF6T7.js} +4 -4
- package/dist/chunk-NFWMF6T7.js.map +1 -0
- package/dist/{chunk-EVL7VEPX.js → chunk-NKOG6FTK.js} +2 -2
- package/dist/{chunk-ZCYU7QA6.cjs → chunk-Q3UM7UCM.cjs} +4 -4
- package/dist/chunk-Q3UM7UCM.cjs.map +1 -0
- package/dist/{chunk-YO7ZZF32.js → chunk-Q4BSNZSI.js} +2 -2
- package/dist/{chunk-COLJFFZF.cjs → chunk-RYB3MSFQ.cjs} +3 -3
- package/dist/{chunk-CUODMU27.js → chunk-T5WAVOPI.js} +236 -155
- package/dist/chunk-T5WAVOPI.js.map +1 -0
- package/dist/{chunk-MDV3M7FD.cjs → chunk-TK2JDIUN.cjs} +5 -4
- package/dist/chunk-TK2JDIUN.cjs.map +1 -0
- package/dist/{chunk-Y4UEFDMP.js → chunk-X3RNS2B7.js} +2 -2
- package/dist/{chunk-6DNBJVR5.js → chunk-ZSWTJ6E7.js} +4 -4
- package/dist/chunk-ZSWTJ6E7.js.map +1 -0
- 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 +7 -8
- package/dist/components/auth/AuthForm.js +6 -7
- package/dist/components/auth/AuthFormBackButton.cjs +28 -2
- package/dist/components/auth/AuthFormBackButton.d.cts +1 -1
- package/dist/components/auth/AuthFormBackButton.d.ts +1 -1
- package/dist/components/auth/AuthFormBackButton.js +27 -1
- package/dist/components/auth/AuthFormDialog.cjs +7 -8
- package/dist/components/auth/AuthFormDialog.js +6 -7
- package/dist/components/auth/EmbeddedAuthForm.cjs +8 -9
- package/dist/components/auth/EmbeddedAuthForm.js +7 -8
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs +7 -8
- package/dist/components/auth/methods/email/EmailAuthFlow.js +6 -7
- package/dist/components/auth/methods/email/EmailOTPInput.cjs +7 -8
- package/dist/components/auth/methods/email/EmailOTPInput.js +6 -7
- package/dist/components/auth/methods/email/EmailSignIn.cjs +7 -8
- package/dist/components/auth/methods/email/EmailSignIn.js +6 -7
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +7 -8
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +6 -7
- package/dist/components/auth/methods/google/GoogleSignIn.cjs +7 -8
- package/dist/components/auth/methods/google/GoogleSignIn.js +6 -7
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +7 -8
- package/dist/components/auth/methods/web3/Web3AuthFlow.js +6 -7
- package/dist/components/auth/methods/web3/{Web3SignIn.cjs → Web3AuthFlowButton.cjs} +8 -9
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.d.cts +5 -0
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.d.ts +5 -0
- package/dist/components/auth/methods/web3/{Web3SignIn.js → Web3AuthFlowButton.js} +9 -10
- package/dist/components/auth/methods/web3/{Web3ConnectButton.cjs → Web3Connector.cjs} +3 -3
- package/dist/components/auth/methods/web3/{Web3ConnectButton.d.cts → Web3Connector.d.cts} +2 -2
- package/dist/components/auth/methods/web3/{Web3ConnectButton.d.ts → Web3Connector.d.ts} +2 -2
- package/dist/components/auth/methods/web3/{Web3ConnectButton.js → Web3Connector.js} +4 -4
- package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs +9 -0
- package/dist/components/auth/methods/web3/{Web3ProviderButton.d.cts → Web3ConnectorButton.d.cts} +2 -2
- package/dist/components/auth/methods/web3/{Web3ProviderButton.d.ts → Web3ConnectorButton.d.ts} +2 -2
- package/dist/components/auth/methods/web3/Web3ConnectorButton.js +9 -0
- package/dist/components/auth/methods/web3/{Web3AuthWrapper.cjs → Web3ConnectorContainer.cjs} +8 -9
- package/dist/components/auth/methods/web3/{Web3AuthWrapper.d.ts → Web3ConnectorContainer.d.cts} +2 -2
- package/dist/components/auth/methods/web3/{Web3AuthWrapper.d.cts → Web3ConnectorContainer.d.ts} +2 -2
- package/dist/components/auth/methods/web3/{Web3AuthWrapper.js → Web3ConnectorContainer.js} +9 -10
- package/dist/components/auth/methods/web3/Web3Connectors.cjs +7 -8
- package/dist/components/auth/methods/web3/Web3Connectors.js +6 -7
- package/dist/components/common/Divider.cjs +7 -8
- package/dist/components/common/Divider.js +6 -7
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +9 -10
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +8 -9
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +8 -9
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +7 -8
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs +33 -8
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs.map +1 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.d.cts +5 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.d.ts +5 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js +35 -10
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js.map +1 -1
- package/dist/components/embed/v3/index.cjs +9 -10
- package/dist/components/embed/v3/index.js +8 -9
- 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 +13 -14
- package/dist/components/index.js +12 -13
- package/dist/consts/version.cjs +2 -2
- package/dist/consts/version.js +1 -1
- package/dist/hooks/index.cjs +7 -8
- package/dist/hooks/index.js +6 -7
- package/dist/hooks/useAuth.cjs +7 -8
- package/dist/hooks/useAuth.js +6 -7
- package/dist/hooks/useCrossmintAuth.cjs +7 -8
- package/dist/hooks/useCrossmintAuth.js +6 -7
- package/dist/hooks/useCrossmintCheckout.cjs +4 -4
- package/dist/hooks/useCrossmintCheckout.js +3 -3
- package/dist/hooks/useOAuthWindowListener.cjs +7 -8
- package/dist/hooks/useOAuthWindowListener.js +6 -7
- package/dist/hooks/useWallet.cjs +7 -8
- package/dist/hooks/useWallet.js +6 -7
- package/dist/index.cjs +13 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -13
- package/dist/index.js.map +1 -1
- package/dist/providers/CrossmintAuthProvider.cjs +7 -8
- package/dist/providers/CrossmintAuthProvider.js +6 -7
- package/dist/providers/CrossmintWalletProvider.cjs +7 -8
- package/dist/providers/CrossmintWalletProvider.js +6 -7
- package/dist/providers/auth/AuthFormProvider.cjs +7 -8
- package/dist/providers/auth/AuthFormProvider.d.cts +2 -0
- package/dist/providers/auth/AuthFormProvider.d.ts +2 -0
- package/dist/providers/auth/AuthFormProvider.js +6 -7
- package/dist/providers/index.cjs +7 -8
- package/dist/providers/index.js +6 -7
- package/dist/utils/createCrossmintApiClient.cjs +3 -3
- package/dist/utils/createCrossmintApiClient.js +2 -2
- package/package.json +3 -3
- package/src/components/auth/AuthForm.tsx +24 -2
- package/src/components/auth/AuthFormBackButton.tsx +9 -1
- package/src/components/auth/AuthFormDialog.tsx +1 -1
- package/src/components/auth/methods/email/EmailOTPInput.tsx +5 -3
- package/src/components/auth/methods/email/EmailSignIn.tsx +3 -2
- package/src/components/auth/methods/farcaster/FarcasterSignIn.tsx +5 -2
- package/src/components/auth/methods/web3/Web3AuthFlow.tsx +2 -2
- package/src/components/auth/methods/web3/{Web3SignIn.tsx → Web3AuthFlowButton.tsx} +6 -3
- package/src/components/auth/methods/web3/{Web3ConnectButton.tsx → Web3Connector.tsx} +1 -1
- package/src/components/auth/methods/web3/{Web3ProviderButton.tsx → Web3ConnectorButton.tsx} +1 -1
- package/src/components/auth/methods/web3/{Web3AuthWrapper.tsx → Web3ConnectorContainer.tsx} +5 -5
- package/src/components/auth/methods/web3/Web3Connectors.tsx +12 -8
- package/src/components/embed/v3/EmbeddedCheckoutV3IFrame.tsx +1 -0
- package/src/components/embed/v3/crypto/CryptoWalletConnectionHandler.tsx +35 -8
- package/src/hooks/useOAuthWindowListener.ts +13 -10
- package/src/providers/auth/AuthFormProvider.tsx +6 -0
- package/dist/chunk-6DNBJVR5.js.map +0 -1
- package/dist/chunk-CUODMU27.js.map +0 -1
- package/dist/chunk-FOCUIKYH.cjs.map +0 -1
- package/dist/chunk-GY6G3ZC2.cjs +0 -41
- package/dist/chunk-GY6G3ZC2.cjs.map +0 -1
- package/dist/chunk-MDV3M7FD.cjs.map +0 -1
- package/dist/chunk-QJ44PL7L.js +0 -41
- package/dist/chunk-QJ44PL7L.js.map +0 -1
- package/dist/chunk-WK5RAFJ3.js.map +0 -1
- package/dist/chunk-ZCYU7QA6.cjs.map +0 -1
- package/dist/components/auth/methods/web3/Web3ProviderButton.cjs +0 -9
- package/dist/components/auth/methods/web3/Web3ProviderButton.js +0 -9
- package/dist/components/auth/methods/web3/Web3SignIn.d.cts +0 -5
- package/dist/components/auth/methods/web3/Web3SignIn.d.ts +0 -5
- /package/dist/{chunk-ZOHRCGGI.cjs.map → chunk-4DICVJSP.cjs.map} +0 -0
- /package/dist/{chunk-NX473NO2.cjs.map → chunk-6NPGETRZ.cjs.map} +0 -0
- /package/dist/{chunk-67AB7TWG.cjs.map → chunk-AQELE4DZ.cjs.map} +0 -0
- /package/dist/{chunk-SMCUFLHP.cjs.map → chunk-CY2PXN5Y.cjs.map} +0 -0
- /package/dist/{chunk-GN7OANUR.js.map → chunk-EFT2TZG5.js.map} +0 -0
- /package/dist/{chunk-DVONA2BZ.cjs.map → chunk-FLWOWTHQ.cjs.map} +0 -0
- /package/dist/{chunk-3RXUFZTR.cjs.map → chunk-G526QBKQ.cjs.map} +0 -0
- /package/dist/{chunk-6TUZ5CU7.js.map → chunk-KCGRRFIF.js.map} +0 -0
- /package/dist/{chunk-HVI7FCLP.js.map → chunk-KHZQYMF7.js.map} +0 -0
- /package/dist/{chunk-QB4KFTCT.js.map → chunk-KSDNMTQD.js.map} +0 -0
- /package/dist/{chunk-EVL7VEPX.js.map → chunk-NKOG6FTK.js.map} +0 -0
- /package/dist/{chunk-YO7ZZF32.js.map → chunk-Q4BSNZSI.js.map} +0 -0
- /package/dist/{chunk-COLJFFZF.cjs.map → chunk-RYB3MSFQ.cjs.map} +0 -0
- /package/dist/{chunk-Y4UEFDMP.js.map → chunk-X3RNS2B7.js.map} +0 -0
- /package/dist/components/auth/methods/web3/{Web3AuthWrapper.cjs.map → Web3AuthFlowButton.cjs.map} +0 -0
- /package/dist/components/auth/methods/web3/{Web3AuthWrapper.js.map → Web3AuthFlowButton.js.map} +0 -0
- /package/dist/components/auth/methods/web3/{Web3ConnectButton.cjs.map → Web3Connector.cjs.map} +0 -0
- /package/dist/components/auth/methods/web3/{Web3ConnectButton.js.map → Web3Connector.js.map} +0 -0
- /package/dist/components/auth/methods/web3/{Web3ProviderButton.cjs.map → Web3ConnectorButton.cjs.map} +0 -0
- /package/dist/components/auth/methods/web3/{Web3ProviderButton.js.map → Web3ConnectorButton.js.map} +0 -0
- /package/dist/components/auth/methods/web3/{Web3SignIn.cjs.map → Web3ConnectorContainer.cjs.map} +0 -0
- /package/dist/components/auth/methods/web3/{Web3SignIn.js.map → Web3ConnectorContainer.js.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkITCHCRGXcjs = require('./chunk-ITCHCRGX.cjs');
|
|
4
4
|
|
|
5
5
|
// src/components/CrossmintNFTCollectionView.tsx
|
|
6
6
|
var _clientsdkbase = require('@crossmint/client-sdk-base');
|
|
7
7
|
var _jsxruntime = require('react/jsx-runtime');
|
|
8
8
|
function CrossmintNFTCollectionView(props) {
|
|
9
9
|
_clientsdkbase.assertValidNFTCollectionViewProps.call(void 0, props);
|
|
10
|
-
const src = _clientsdkbase.getNFTCollectionViewSrc.call(void 0, props,
|
|
10
|
+
const src = _clientsdkbase.getNFTCollectionViewSrc.call(void 0, props, _chunkITCHCRGXcjs.LIB_VERSION);
|
|
11
11
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12
12
|
"iframe",
|
|
13
13
|
{
|
|
@@ -28,4 +28,4 @@ function CrossmintNFTCollectionView(props) {
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
exports.CrossmintNFTCollectionView = CrossmintNFTCollectionView;
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-4DICVJSP.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkTK2JDIUNcjs = require('./chunk-TK2JDIUN.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunk4DAZAO6Ycjs = require('./chunk-4DAZAO6Y.cjs');
|
|
@@ -8,10 +8,10 @@ var _chunk4DAZAO6Ycjs = require('./chunk-4DAZAO6Y.cjs');
|
|
|
8
8
|
// src/components/embed/v3/CrossmintEmbeddedCheckoutV3.tsx
|
|
9
9
|
var _jsxruntime = require('react/jsx-runtime');
|
|
10
10
|
function CrossmintEmbeddedCheckout_Alpha(props) {
|
|
11
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
11
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTK2JDIUNcjs.EmbeddedCheckoutV3IFrame, _chunk4DAZAO6Ycjs.__spreadValues.call(void 0, {}, props));
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
exports.CrossmintEmbeddedCheckout_Alpha = CrossmintEmbeddedCheckout_Alpha;
|
|
17
|
-
//# sourceMappingURL=chunk-
|
|
17
|
+
//# sourceMappingURL=chunk-6NPGETRZ.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "1.10.
|
|
2
|
+
var version = "1.10.4";
|
|
3
3
|
|
|
4
4
|
// src/consts/version.ts
|
|
5
5
|
var LIB_VERSION = version;
|
|
@@ -7,4 +7,4 @@ var LIB_VERSION = version;
|
|
|
7
7
|
export {
|
|
8
8
|
LIB_VERSION
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=chunk-
|
|
10
|
+
//# sourceMappingURL=chunk-6PCSAKDU.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../package.json","../src/consts/version.ts"],"sourcesContent":["{\n \"name\": \"@crossmint/client-sdk-react-ui\",\n \"version\": \"1.10.
|
|
1
|
+
{"version":3,"sources":["../package.json","../src/consts/version.ts"],"sourcesContent":["{\n \"name\": \"@crossmint/client-sdk-react-ui\",\n \"version\": \"1.10.4\",\n \"repository\": \"https://github.com/Crossmint/crossmint-sdk\",\n \"license\": \"Apache-2.0\",\n \"author\": \"Paella Labs Inc\",\n \"sideEffects\": false,\n \"type\": \"module\",\n \"exports\": {\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"files\": [\"dist\", \"src\", \"LICENSE\"],\n \"scripts\": {\n \"build\": \"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup\",\n \"dev\": \"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup --watch\",\n \"test:vitest\": \"vitest run\"\n },\n \"dependencies\": {\n \"@crossmint/client-sdk-auth\": \"workspace:*\",\n \"@crossmint/client-sdk-base\": \"workspace:*\",\n \"@crossmint/client-sdk-smart-wallet\": \"workspace:*\",\n \"@crossmint/client-sdk-window\": \"workspace:*\",\n \"@crossmint/common-sdk-auth\": \"workspace:*\",\n \"@crossmint/common-sdk-base\": \"workspace:*\",\n \"@dynamic-labs/ethereum\": \"2.6.3\",\n \"@dynamic-labs/sdk-react-core\": \"2.6.3\",\n \"@dynamic-labs/solana\": \"2.6.3\",\n \"@ethersproject/transactions\": \"5.7.0\",\n \"@farcaster/auth-kit\": \"0.6.0\",\n \"@headlessui/react\": \"2.1.5\",\n \"@radix-ui/react-dialog\": \"1.1.2\",\n \"@radix-ui/react-visually-hidden\": \"1.1.0\",\n \"@solana/web3.js\": \"1.95.1\",\n \"@tanstack/react-query\": \"5.51.18\",\n \"@twind/core\": \"1.1.3\",\n \"@twind/preset-tailwind\": \"1.1.4\",\n \"@wagmi/connectors\": \"5.3.3\",\n \"bs58\": \"5.0.0\",\n \"clsx\": \"2.1.1\",\n \"color\": \"4.2.3\",\n \"input-otp\": \"1.2.4\",\n \"lodash.isequal\": \"4.5.0\",\n \"react-jss\": \"10.10.0\",\n \"tailwind-merge\": \"2.4.0\",\n \"tailwindcss\": \"3.4.10\",\n \"viem\": \"2.17.5\",\n \"wagmi\": \"2.12.25\",\n \"zod\": \"3.22.4\"\n },\n \"devDependencies\": {\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/color\": \"4.2.0\",\n \"@types/lodash.isequal\": \"4.5.6\",\n \"@types/react\": \"^18.3.0\",\n \"@types/react-dom\": \"^18.3.0\",\n \"react\": \"^18.3.0\",\n \"react-dom\": \"^18.3.0\"\n },\n \"peerDependencies\": {\n \"react\": \">=17.0.2\",\n \"react-dom\": \">=17.0.2\"\n }\n}\n","import { version } from \"../../package.json\";\n\nexport const LIB_VERSION = version;\n"],"mappings":";AAEI,cAAW;;;ACAR,IAAM,cAAc;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkRYB3MSFQcjs = require('./chunk-RYB3MSFQ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkKEKBOJCFcjs = require('./chunk-KEKBOJCF.cjs');
|
|
@@ -13,7 +13,7 @@ function CrossmintCheckoutProvider({ children }) {
|
|
|
13
13
|
const [order, setOrder] = _react.useState.call(void 0, void 0);
|
|
14
14
|
const [orderClientSecret, setOrderClientSecret] = _react.useState.call(void 0, void 0);
|
|
15
15
|
const { crossmint } = _chunkKEKBOJCFcjs.useCrossmint.call(void 0, );
|
|
16
|
-
const apiClient =
|
|
16
|
+
const apiClient = _chunkRYB3MSFQcjs.createCrossmintApiClient.call(void 0, crossmint, {
|
|
17
17
|
usageOrigin: "client"
|
|
18
18
|
});
|
|
19
19
|
_react.useEffect.call(void 0, () => {
|
|
@@ -47,4 +47,4 @@ function useCrossmintCheckout() {
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
exports.CrossmintCheckoutProvider = CrossmintCheckoutProvider; exports.useCrossmintCheckout = useCrossmintCheckout;
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-AQELE4DZ.cjs.map
|
|
@@ -7,7 +7,7 @@ var _chunkQ3M4UH5Ucjs = require('./chunk-Q3M4UH5U.cjs');
|
|
|
7
7
|
var _chunkKLWDDALZcjs = require('./chunk-KLWDDALZ.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkITCHCRGXcjs = require('./chunk-ITCHCRGX.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -91,7 +91,7 @@ function CrossmintPayButton(buttonProps) {
|
|
|
91
91
|
showOverlay,
|
|
92
92
|
dismissOverlayOnClick,
|
|
93
93
|
setConnecting,
|
|
94
|
-
libVersion:
|
|
94
|
+
libVersion: _chunkITCHCRGXcjs.LIB_VERSION,
|
|
95
95
|
environment,
|
|
96
96
|
clientName: _clientsdkbase.clientNames.reactUi,
|
|
97
97
|
locale,
|
|
@@ -150,4 +150,4 @@ function CrossmintPayButton(buttonProps) {
|
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
exports.CrossmintPayButton = CrossmintPayButton;
|
|
153
|
-
//# sourceMappingURL=chunk-
|
|
153
|
+
//# sourceMappingURL=chunk-CY2PXN5Y.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkHSLAH2PNcjs = require('./chunk-HSLAH2PN.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkQ3UM7UCMcjs = require('./chunk-Q3UM7UCM.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunk5S4VO6RBcjs = require('./chunk-5S4VO6RB.cjs');
|
|
@@ -35,10 +35,10 @@ var _chunkB7LYPQ4Kcjs = require('./chunk-B7LYPQ4K.cjs');
|
|
|
35
35
|
var _chunkBE2ZLB3Lcjs = require('./chunk-BE2ZLB3L.cjs');
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunk5RX5WFEWcjs = require('./chunk-5RX5WFEW.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _chunkHCW4RO2Ocjs = require('./chunk-HCW4RO2O.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
var _chunkKNOUJZN5cjs = require('./chunk-KNOUJZN5.cjs');
|
|
@@ -134,6 +134,7 @@ var AuthFormProvider = ({
|
|
|
134
134
|
}) => {
|
|
135
135
|
const { crossmintAuth } = useCrossmintAuth();
|
|
136
136
|
const [step, setStep] = _react.useState.call(void 0, "initial");
|
|
137
|
+
const [error, setError] = _react.useState.call(void 0, null);
|
|
137
138
|
const [oauthUrlMap, setOauthUrlMap] = _react.useState.call(void 0, initialOAuthUrlMap);
|
|
138
139
|
const [isLoadingOauthUrlMap, setIsLoadingOauthUrlMap] = _react.useState.call(void 0, true);
|
|
139
140
|
const { loginMethods, baseUrl, setDialogOpen, appearance, embeddedWallets } = initialState;
|
|
@@ -152,8 +153,9 @@ var AuthFormProvider = ({
|
|
|
152
153
|
}));
|
|
153
154
|
const oauthUrlMap2 = Object.assign({}, ...yield Promise.all(oauthPromiseList));
|
|
154
155
|
setOauthUrlMap(oauthUrlMap2);
|
|
155
|
-
} catch (
|
|
156
|
-
console.error("Error fetching OAuth URLs:",
|
|
156
|
+
} catch (error2) {
|
|
157
|
+
console.error("Error fetching OAuth URLs:", error2);
|
|
158
|
+
setError("Unable to load oauth providers. Please try again later.");
|
|
157
159
|
} finally {
|
|
158
160
|
setIsLoadingOauthUrlMap(false);
|
|
159
161
|
}
|
|
@@ -169,12 +171,14 @@ var AuthFormProvider = ({
|
|
|
169
171
|
};
|
|
170
172
|
const value = {
|
|
171
173
|
step,
|
|
174
|
+
error,
|
|
172
175
|
baseUrl,
|
|
173
176
|
appearance,
|
|
174
177
|
loginMethods,
|
|
175
178
|
oauthUrlMap,
|
|
176
179
|
isLoadingOauthUrlMap,
|
|
177
180
|
setDialogOpen: handleToggleDialog,
|
|
181
|
+
setError,
|
|
178
182
|
setStep
|
|
179
183
|
};
|
|
180
184
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AuthFormContext.Provider, { value, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5S4VO6RBcjs.WagmiAuthProvider, { children }) });
|
|
@@ -186,6 +190,40 @@ var AuthFormProvider = ({
|
|
|
186
190
|
// src/components/auth/methods/email/EmailOTPInput.tsx
|
|
187
191
|
|
|
188
192
|
|
|
193
|
+
// src/components/auth/AuthFormBackButton.tsx
|
|
194
|
+
|
|
195
|
+
var AuthFormBackButton = (_a) => {
|
|
196
|
+
var _b = _a, {
|
|
197
|
+
className,
|
|
198
|
+
iconColor,
|
|
199
|
+
ringColor,
|
|
200
|
+
onClick
|
|
201
|
+
} = _b, props = _chunk4DAZAO6Ycjs.__objRest.call(void 0, _b, [
|
|
202
|
+
"className",
|
|
203
|
+
"iconColor",
|
|
204
|
+
"ringColor",
|
|
205
|
+
"onClick"
|
|
206
|
+
]);
|
|
207
|
+
const { setError } = useAuthForm();
|
|
208
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
209
|
+
"button",
|
|
210
|
+
_chunk4DAZAO6Ycjs.__spreadProps.call(void 0, _chunk4DAZAO6Ycjs.__spreadValues.call(void 0, {
|
|
211
|
+
className: _chunk5RX5WFEWcjs.classNames.call(void 0,
|
|
212
|
+
"absolute left-4 top-4 min-[480px]:!left-6 min-[480px]:!top-6 rounded-full opacity-70 ring-offset-background text-cm-text-primary transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-cm-accent focus:ring-offset-2 disabled:pointer-events-none",
|
|
213
|
+
className
|
|
214
|
+
),
|
|
215
|
+
onClick: (event) => {
|
|
216
|
+
setError(null);
|
|
217
|
+
onClick == null ? void 0 : onClick(event);
|
|
218
|
+
}
|
|
219
|
+
}, props), {
|
|
220
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHCW4RO2Ocjs.LeftArrowIcon, { className: "w-6 h-6", style: { color: iconColor } })
|
|
221
|
+
})
|
|
222
|
+
);
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
// src/components/auth/methods/email/EmailOTPInput.tsx
|
|
226
|
+
|
|
189
227
|
var EMAIL_VERIFICATION_TOKEN_LENGTH = 6;
|
|
190
228
|
function EmailOTPInput({
|
|
191
229
|
otpEmailData,
|
|
@@ -193,7 +231,7 @@ function EmailOTPInput({
|
|
|
193
231
|
}) {
|
|
194
232
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
195
233
|
const { crossmintAuth } = useCrossmintAuth();
|
|
196
|
-
const { appearance, setDialogOpen, setStep } = useAuthForm();
|
|
234
|
+
const { appearance, setDialogOpen, setStep, setError } = useAuthForm();
|
|
197
235
|
const [token, setToken] = _react.useState.call(void 0, "");
|
|
198
236
|
const [hasError, setHasError] = _react.useState.call(void 0, false);
|
|
199
237
|
const [loading, setLoading] = _react.useState.call(void 0, false);
|
|
@@ -209,8 +247,9 @@ function EmailOTPInput({
|
|
|
209
247
|
yield crossmintAuth == null ? void 0 : crossmintAuth.handleRefreshAuthMaterial(oneTimeSecret);
|
|
210
248
|
setDialogOpen(false);
|
|
211
249
|
setStep("initial");
|
|
212
|
-
} catch (
|
|
213
|
-
console.error("Error
|
|
250
|
+
} catch (error) {
|
|
251
|
+
console.error("Error confirming email OTP", error);
|
|
252
|
+
setError("Invalid code. Please try again.");
|
|
214
253
|
setHasError(true);
|
|
215
254
|
} finally {
|
|
216
255
|
setLoading(false);
|
|
@@ -222,7 +261,7 @@ function EmailOTPInput({
|
|
|
222
261
|
};
|
|
223
262
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
224
263
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
225
|
-
|
|
264
|
+
AuthFormBackButton,
|
|
226
265
|
{
|
|
227
266
|
onClick: handleOnBack,
|
|
228
267
|
iconColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary,
|
|
@@ -262,6 +301,7 @@ function EmailOTPInput({
|
|
|
262
301
|
onChange: (val) => {
|
|
263
302
|
setToken(val);
|
|
264
303
|
setHasError(false);
|
|
304
|
+
setError(null);
|
|
265
305
|
},
|
|
266
306
|
onComplete: handleOnSubmit,
|
|
267
307
|
disabled: loading,
|
|
@@ -310,7 +350,7 @@ var _color = require('color'); var _color2 = _interopRequireDefault(_color);
|
|
|
310
350
|
function EmailSignIn({ setOtpEmailData }) {
|
|
311
351
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
312
352
|
const { crossmintAuth } = useCrossmintAuth();
|
|
313
|
-
const { appearance, setStep } = useAuthForm();
|
|
353
|
+
const { appearance, setStep, setError } = useAuthForm();
|
|
314
354
|
const [emailInput, setEmailInput] = _react.useState.call(void 0, "");
|
|
315
355
|
const [emailError, setEmailError] = _react.useState.call(void 0, "");
|
|
316
356
|
const [isLoading, setIsLoading] = _react.useState.call(void 0, false);
|
|
@@ -329,7 +369,7 @@ function EmailSignIn({ setOtpEmailData }) {
|
|
|
329
369
|
setStep("otp");
|
|
330
370
|
} catch (_e2) {
|
|
331
371
|
setIsLoading(false);
|
|
332
|
-
|
|
372
|
+
setError("Failed to send email. Please try again or contact support.");
|
|
333
373
|
}
|
|
334
374
|
});
|
|
335
375
|
}
|
|
@@ -367,6 +407,7 @@ function EmailSignIn({ setOtpEmailData }) {
|
|
|
367
407
|
onChange: (e) => {
|
|
368
408
|
setEmailInput(e.target.value);
|
|
369
409
|
setEmailError("");
|
|
410
|
+
setError(null);
|
|
370
411
|
},
|
|
371
412
|
readOnly: isLoading,
|
|
372
413
|
"aria-describedby": "emailError"
|
|
@@ -443,14 +484,13 @@ var _clientsdkwindow = require('@crossmint/client-sdk-window');
|
|
|
443
484
|
var _zod = require('zod');
|
|
444
485
|
var useOAuthWindowListener = (provider) => {
|
|
445
486
|
const { crossmintAuth } = useCrossmintAuth();
|
|
446
|
-
const { oauthUrlMap } = useAuthForm();
|
|
487
|
+
const { oauthUrlMap, setError } = useAuthForm();
|
|
447
488
|
const [isLoading, setIsLoading] = _react.useState.call(void 0, false);
|
|
448
489
|
const childRef = _react.useRef.call(void 0, null);
|
|
449
490
|
_react.useEffect.call(void 0, () => {
|
|
450
491
|
if (childRef.current == null) {
|
|
451
492
|
childRef.current = new (0, _clientsdkwindow.ChildWindow)(window.opener || window.parent, "*", {
|
|
452
|
-
incomingEvents
|
|
453
|
-
outgoingEvents
|
|
493
|
+
incomingEvents
|
|
454
494
|
});
|
|
455
495
|
}
|
|
456
496
|
return () => {
|
|
@@ -464,6 +504,7 @@ var useOAuthWindowListener = (provider) => {
|
|
|
464
504
|
throw new Error("Child window not initialized");
|
|
465
505
|
}
|
|
466
506
|
setIsLoading(true);
|
|
507
|
+
setError(null);
|
|
467
508
|
const popup = yield _clientsdkwindow.PopupWindow.init(oauthUrlMap[provider], {
|
|
468
509
|
awaitToLoad: false,
|
|
469
510
|
crossOrigin: true,
|
|
@@ -477,7 +518,15 @@ var useOAuthWindowListener = (provider) => {
|
|
|
477
518
|
popup.window.close();
|
|
478
519
|
setIsLoading(false);
|
|
479
520
|
});
|
|
521
|
+
const handleError = (data) => {
|
|
522
|
+
var _a;
|
|
523
|
+
setError(data.error);
|
|
524
|
+
(_a = childRef.current) == null ? void 0 : _a.off("errorFromPopupCallback");
|
|
525
|
+
popup.window.close();
|
|
526
|
+
setIsLoading(false);
|
|
527
|
+
};
|
|
480
528
|
childRef.current.on("authMaterialFromPopupCallback", handleAuthMaterial);
|
|
529
|
+
childRef.current.on("errorFromPopupCallback", handleError);
|
|
481
530
|
const checkWindowClosure = setInterval(() => {
|
|
482
531
|
var _a;
|
|
483
532
|
if (popup.window.closed) {
|
|
@@ -493,10 +542,8 @@ var useOAuthWindowListener = (provider) => {
|
|
|
493
542
|
};
|
|
494
543
|
};
|
|
495
544
|
var incomingEvents = {
|
|
496
|
-
authMaterialFromPopupCallback: _zod.z.object({ oneTimeSecret: _zod.z.string() })
|
|
497
|
-
}
|
|
498
|
-
var outgoingEvents = {
|
|
499
|
-
authMaterialFromAuthFrame: _zod.z.object({ oneTimeSecret: _zod.z.string() })
|
|
545
|
+
authMaterialFromPopupCallback: _zod.z.object({ oneTimeSecret: _zod.z.string() }),
|
|
546
|
+
errorFromPopupCallback: _zod.z.object({ error: _zod.z.string() })
|
|
500
547
|
};
|
|
501
548
|
|
|
502
549
|
// src/components/auth/methods/google/GoogleSignIn.tsx
|
|
@@ -557,7 +604,7 @@ var _authkit = require('@farcaster/auth-kit');
|
|
|
557
604
|
|
|
558
605
|
function FarcasterSignIn() {
|
|
559
606
|
var _a, _b;
|
|
560
|
-
const { step, appearance, setStep } = useAuthForm();
|
|
607
|
+
const { step, appearance, setStep, setError } = useAuthForm();
|
|
561
608
|
if (step === "initial") {
|
|
562
609
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
563
610
|
"button",
|
|
@@ -573,6 +620,7 @@ function FarcasterSignIn() {
|
|
|
573
620
|
},
|
|
574
621
|
onClick: () => {
|
|
575
622
|
setStep("qrCode");
|
|
623
|
+
setError(null);
|
|
576
624
|
},
|
|
577
625
|
children: [
|
|
578
626
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHPOZ6I54cjs.FarcasterIcon, { className: "h-[25px] w-[25px] absolute left-[18px]" }),
|
|
@@ -597,7 +645,7 @@ function FarcasterSignIn() {
|
|
|
597
645
|
function FarcasterQRCode() {
|
|
598
646
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
599
647
|
const { crossmintAuth } = useCrossmintAuth();
|
|
600
|
-
const { appearance, setStep, setDialogOpen } = useAuthForm();
|
|
648
|
+
const { appearance, setStep, setDialogOpen, setError } = useAuthForm();
|
|
601
649
|
const [farcasterData, setFarcasterData] = _react.useState.call(void 0, null);
|
|
602
650
|
const farcasterProps = _react.useMemo.call(void 0,
|
|
603
651
|
() => ({
|
|
@@ -609,6 +657,7 @@ function FarcasterQRCode() {
|
|
|
609
657
|
);
|
|
610
658
|
const { signIn, url: qrCodeUrl, connect, signOut, isConnected } = _authkit.useSignIn.call(void 0, farcasterProps);
|
|
611
659
|
const handleFarcasterSignIn = (data) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
|
|
660
|
+
setError(null);
|
|
612
661
|
try {
|
|
613
662
|
const oneTimeSecret = yield crossmintAuth == null ? void 0 : crossmintAuth.signInWithFarcaster(data);
|
|
614
663
|
yield crossmintAuth == null ? void 0 : crossmintAuth.handleRefreshAuthMaterial(oneTimeSecret);
|
|
@@ -616,6 +665,7 @@ function FarcasterQRCode() {
|
|
|
616
665
|
setStep("initial");
|
|
617
666
|
} catch (error) {
|
|
618
667
|
console.error("Error during Farcaster sign-in:", error);
|
|
668
|
+
setError("Failed to sign in with Farcaster");
|
|
619
669
|
}
|
|
620
670
|
});
|
|
621
671
|
_react.useEffect.call(void 0, () => {
|
|
@@ -633,7 +683,7 @@ function FarcasterQRCode() {
|
|
|
633
683
|
}, []);
|
|
634
684
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
635
685
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
636
|
-
|
|
686
|
+
AuthFormBackButton,
|
|
637
687
|
{
|
|
638
688
|
onClick: () => {
|
|
639
689
|
signOut();
|
|
@@ -706,11 +756,11 @@ function FarcasterQRCode() {
|
|
|
706
756
|
] });
|
|
707
757
|
}
|
|
708
758
|
|
|
709
|
-
// src/components/auth/methods/web3/
|
|
759
|
+
// src/components/auth/methods/web3/Web3AuthFlowButton.tsx
|
|
710
760
|
|
|
711
|
-
function
|
|
761
|
+
function Web3AuthFlowButton() {
|
|
712
762
|
var _a, _b, _c, _d, _e;
|
|
713
|
-
const { step, appearance, setStep } = useAuthForm();
|
|
763
|
+
const { step, appearance, setStep, setError } = useAuthForm();
|
|
714
764
|
if (step !== "initial") {
|
|
715
765
|
return null;
|
|
716
766
|
}
|
|
@@ -727,7 +777,10 @@ function Web3SignIn() {
|
|
|
727
777
|
borderColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.border,
|
|
728
778
|
backgroundColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.buttonBackground
|
|
729
779
|
},
|
|
730
|
-
onClick: () =>
|
|
780
|
+
onClick: () => {
|
|
781
|
+
setStep("web3");
|
|
782
|
+
setError(null);
|
|
783
|
+
},
|
|
731
784
|
children: [
|
|
732
785
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
733
786
|
_chunkKNOUJZN5cjs.WalletIcon,
|
|
@@ -750,16 +803,15 @@ function Web3SignIn() {
|
|
|
750
803
|
);
|
|
751
804
|
}
|
|
752
805
|
|
|
753
|
-
// src/components/auth/methods/web3/
|
|
806
|
+
// src/components/auth/methods/web3/Web3ConnectorContainer.tsx
|
|
754
807
|
|
|
755
808
|
var _wagmi = require('wagmi');
|
|
756
809
|
|
|
757
|
-
function
|
|
810
|
+
function Web3ConnectorContainer({ providerType, flag, icon }) {
|
|
758
811
|
var _a, _b;
|
|
759
812
|
const { crossmintAuth } = useCrossmintAuth();
|
|
760
|
-
const { appearance } = useAuthForm();
|
|
813
|
+
const { appearance, error, setError } = useAuthForm();
|
|
761
814
|
const [isLoading, setIsLoading] = _react.useState.call(void 0, false);
|
|
762
|
-
const [error, setError] = _react.useState.call(void 0, null);
|
|
763
815
|
const chainId = _wagmi.useChainId.call(void 0, );
|
|
764
816
|
const { address, status: accountStatus } = _wagmi.useAccount.call(void 0, );
|
|
765
817
|
const { signMessageAsync, status: signMessageStatus } = _wagmi.useSignMessage.call(void 0, );
|
|
@@ -783,6 +835,7 @@ function Web3AuthWrapper({ providerType, flag, icon }) {
|
|
|
783
835
|
return;
|
|
784
836
|
}
|
|
785
837
|
setIsLoading(true);
|
|
838
|
+
setError(null);
|
|
786
839
|
try {
|
|
787
840
|
const res = yield crossmintAuth == null ? void 0 : crossmintAuth.signInWithSmartWallet(address);
|
|
788
841
|
const signature = yield signMessageAsync({ message: res.challenge });
|
|
@@ -798,7 +851,7 @@ function Web3AuthWrapper({ providerType, flag, icon }) {
|
|
|
798
851
|
});
|
|
799
852
|
const isLoadingOrPending = isLoading || accountStatus === "connecting" || accountStatus === "reconnecting" || signMessageStatus === "pending";
|
|
800
853
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
801
|
-
|
|
854
|
+
_chunkQ3UM7UCMcjs.Web3Connector,
|
|
802
855
|
{
|
|
803
856
|
icon,
|
|
804
857
|
appearance,
|
|
@@ -827,7 +880,7 @@ function Web3Connectors() {
|
|
|
827
880
|
if (step === "web3") {
|
|
828
881
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
829
882
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
830
|
-
|
|
883
|
+
AuthFormBackButton,
|
|
831
884
|
{
|
|
832
885
|
onClick: () => setStep("initial"),
|
|
833
886
|
iconColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary,
|
|
@@ -845,7 +898,7 @@ function Web3Connectors() {
|
|
|
845
898
|
) }),
|
|
846
899
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-[10px] w-full", children: [
|
|
847
900
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
848
|
-
|
|
901
|
+
_chunkHSLAH2PNcjs.Web3ConnectorButton,
|
|
849
902
|
{
|
|
850
903
|
title: "Metamask",
|
|
851
904
|
appearance,
|
|
@@ -861,7 +914,7 @@ function Web3Connectors() {
|
|
|
861
914
|
}
|
|
862
915
|
),
|
|
863
916
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
864
|
-
|
|
917
|
+
_chunkHSLAH2PNcjs.Web3ConnectorButton,
|
|
865
918
|
{
|
|
866
919
|
title: "WalletConnect",
|
|
867
920
|
appearance,
|
|
@@ -883,27 +936,31 @@ function Web3Connectors() {
|
|
|
883
936
|
if (step === "web3/metamask") {
|
|
884
937
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
885
938
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
886
|
-
|
|
939
|
+
AuthFormBackButton,
|
|
887
940
|
{
|
|
888
|
-
onClick: () =>
|
|
941
|
+
onClick: () => {
|
|
942
|
+
setStep("web3");
|
|
943
|
+
},
|
|
889
944
|
iconColor: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.textPrimary,
|
|
890
945
|
ringColor: (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.accent
|
|
891
946
|
}
|
|
892
947
|
),
|
|
893
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
948
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Web3ConnectorContainer, { providerType: "metaMaskSDK", flag: "isMetaMask", icon: _chunkQK5J7FD3cjs.metamaskIcon })
|
|
894
949
|
] });
|
|
895
950
|
}
|
|
896
951
|
if (step === "web3/walletconnect") {
|
|
897
952
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
898
953
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
899
|
-
|
|
954
|
+
AuthFormBackButton,
|
|
900
955
|
{
|
|
901
|
-
onClick: () =>
|
|
956
|
+
onClick: () => {
|
|
957
|
+
setStep("web3");
|
|
958
|
+
},
|
|
902
959
|
iconColor: (_f = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _f.textPrimary,
|
|
903
960
|
ringColor: (_g = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _g.accent
|
|
904
961
|
}
|
|
905
962
|
),
|
|
906
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
963
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, Web3ConnectorContainer, { providerType: "walletConnect", icon: _chunkQK5J7FD3cjs.walletConnectIcon })
|
|
907
964
|
] });
|
|
908
965
|
}
|
|
909
966
|
return null;
|
|
@@ -917,50 +974,73 @@ function Web3AuthFlow() {
|
|
|
917
974
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Web3Connectors, {});
|
|
918
975
|
}
|
|
919
976
|
if (step === "initial") {
|
|
920
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
977
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Web3AuthFlowButton, {});
|
|
921
978
|
}
|
|
922
979
|
return null;
|
|
923
980
|
}
|
|
924
981
|
|
|
925
982
|
// src/components/auth/AuthForm.tsx
|
|
926
983
|
|
|
984
|
+
|
|
927
985
|
function AuthForm({ className }) {
|
|
928
|
-
var _a, _b, _c, _d;
|
|
929
|
-
const { step, appearance, loginMethods, baseUrl } = useAuthForm();
|
|
930
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
style: { color: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary },
|
|
937
|
-
children: "Sign In"
|
|
938
|
-
}
|
|
986
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
987
|
+
const { step, appearance, loginMethods, baseUrl, error } = useAuthForm();
|
|
988
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
989
|
+
"div",
|
|
990
|
+
{
|
|
991
|
+
className: _chunk5RX5WFEWcjs.classNames.call(void 0,
|
|
992
|
+
"relative p-6 pb-4 !min-[480px]:p-10 !min-[480px]:pb-8 flex flex-col gap-[10px] antialiased animate-none",
|
|
993
|
+
className
|
|
939
994
|
),
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
995
|
+
children: [
|
|
996
|
+
error ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
997
|
+
"div",
|
|
998
|
+
{
|
|
999
|
+
className: "flex items-start justify-start w-full rounded-lg p-2 mt-4 bg-cm-danger-muted",
|
|
1000
|
+
style: {
|
|
1001
|
+
backgroundColor: new (0, _color2.default)((_b = (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.danger) != null ? _b : "#f44336").alpha(0.12).toString()
|
|
1002
|
+
},
|
|
1003
|
+
children: [
|
|
1004
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMSST6ZZcjs.AlertIcon, { customColor: (_d = (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.danger) != null ? _d : "#f44336" }),
|
|
1005
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "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
|
+
]
|
|
1007
|
+
}
|
|
1008
|
+
) : null,
|
|
1009
|
+
step === "initial" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
1010
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1011
|
+
"h1",
|
|
1012
|
+
{
|
|
1013
|
+
className: "text-2xl font-bold text-cm-text-primary",
|
|
1014
|
+
style: { color: (_g = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _g.textPrimary },
|
|
1015
|
+
children: "Sign In"
|
|
1016
|
+
}
|
|
1017
|
+
),
|
|
1018
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1019
|
+
"p",
|
|
1020
|
+
{
|
|
1021
|
+
className: "text-base font-normal mb-3 text-cm-text-secondary",
|
|
1022
|
+
style: { color: (_h = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _h.textSecondary },
|
|
1023
|
+
children: "Sign in using one of the options below"
|
|
1024
|
+
}
|
|
1025
|
+
)
|
|
1026
|
+
] }) : null,
|
|
1027
|
+
loginMethods.includes("email") ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
1028
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmailAuthFlow, {}),
|
|
1029
|
+
loginMethods.length > 1 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Divider, { appearance, text: "OR" }) : null
|
|
1030
|
+
] }) : null,
|
|
1031
|
+
loginMethods.includes("google") ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, GoogleSignIn, {}) : null,
|
|
1032
|
+
loginMethods.includes("farcaster") ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQQXBYOKAcjs.FarcasterProvider, { baseUrl, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FarcasterSignIn, {}) }) : null,
|
|
1033
|
+
loginMethods.includes("web3") ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Web3AuthFlow, {}) : null,
|
|
1034
|
+
step === "initial" || step === "otp" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1035
|
+
_chunkPBSL6JOFcjs.PoweredByCrossmint,
|
|
1036
|
+
{
|
|
1037
|
+
className: "mt-4 justify-center",
|
|
1038
|
+
color: (_j = (_i = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _i.textSecondary) != null ? _j : "#A4AFB2"
|
|
1039
|
+
}
|
|
1040
|
+
) : null
|
|
1041
|
+
]
|
|
1042
|
+
}
|
|
1043
|
+
);
|
|
964
1044
|
}
|
|
965
1045
|
|
|
966
1046
|
// src/components/auth/AuthFormDialog.tsx
|
|
@@ -979,7 +1059,7 @@ function AuthFormDialog({ open }) {
|
|
|
979
1059
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
980
1060
|
closeButtonColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary,
|
|
981
1061
|
closeButtonRingColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.accent,
|
|
982
|
-
className: "cm-responsive-border-radius-auth-dialog",
|
|
1062
|
+
className: "cm-responsive-border-radius-auth-dialog !p-0 !min-[480px]:p-0",
|
|
983
1063
|
style: {
|
|
984
1064
|
borderRadius: appearance == null ? void 0 : appearance.borderRadius,
|
|
985
1065
|
backgroundColor: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.background
|
|
@@ -1261,5 +1341,6 @@ function deriveErrorState(error) {
|
|
|
1261
1341
|
|
|
1262
1342
|
|
|
1263
1343
|
|
|
1264
|
-
|
|
1265
|
-
|
|
1344
|
+
|
|
1345
|
+
exports.WalletContext = WalletContext; exports.CrossmintWalletProvider = CrossmintWalletProvider; exports.useWallet = useWallet; exports.useCrossmintAuth = useCrossmintAuth; exports.useAuthForm = useAuthForm; exports.AuthFormProvider = AuthFormProvider; exports.AuthFormBackButton = AuthFormBackButton; exports.EMAIL_VERIFICATION_TOKEN_LENGTH = EMAIL_VERIFICATION_TOKEN_LENGTH; exports.EmailOTPInput = EmailOTPInput; exports.EmailSignIn = EmailSignIn; exports.EmailAuthFlow = EmailAuthFlow; exports.Divider = Divider; exports.useOAuthWindowListener = useOAuthWindowListener; exports.GoogleSignIn = GoogleSignIn; exports.FarcasterSignIn = FarcasterSignIn; exports.Web3AuthFlowButton = Web3AuthFlowButton; exports.Web3ConnectorContainer = Web3ConnectorContainer; exports.Web3Connectors = Web3Connectors; exports.Web3AuthFlow = Web3AuthFlow; exports.AuthForm = AuthForm; exports.AuthFormDialog = AuthFormDialog; exports.AuthContext = AuthContext; exports.CrossmintAuthProvider = CrossmintAuthProvider; exports.useAuth = useAuth;
|
|
1346
|
+
//# sourceMappingURL=chunk-EBMORHG3.cjs.map
|