@crossmint/client-sdk-react-ui 2.6.17 → 3.0.0
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-5CU74TAA.js +1 -0
- package/dist/{chunk-73XVCYPH.cjs → chunk-64YKD3VV.cjs} +1 -1
- package/dist/{chunk-WN6KNFYP.js → chunk-6MIHLYJK.js} +1 -1
- package/dist/chunk-6SHLJS5F.cjs +1 -0
- package/dist/chunk-7O34YRD5.js +1 -0
- package/dist/{chunk-GG3WKQG7.js → chunk-AC2SJG3Q.js} +1 -1
- package/dist/chunk-AENARY6B.cjs +180 -0
- package/dist/{chunk-3GQHN6K5.cjs → chunk-AM2LP6OA.cjs} +1 -1
- package/dist/chunk-AU3VQ3FZ.cjs +1 -0
- package/dist/{chunk-YCVGGKNO.js → chunk-AZ72RWXJ.js} +1 -1
- package/dist/{chunk-2JE4R2XO.js → chunk-BA44FXE6.js} +1 -1
- package/dist/{chunk-QF7R4UM7.js → chunk-EQJXHQXI.js} +1 -1
- package/dist/{chunk-4KWOGABX.js → chunk-ETAEFFCS.js} +1 -1
- package/dist/{chunk-YTMXTBHQ.js → chunk-EUJ5GQ5N.js} +1 -1
- package/dist/chunk-F6X2ZGRY.js +1 -0
- package/dist/{chunk-RVCYJAKY.cjs → chunk-GS26S4PZ.cjs} +1 -1
- package/dist/{chunk-TZP33ZEU.cjs → chunk-H4U5OTBS.cjs} +1 -1
- package/dist/{chunk-C3MBKVLB.cjs → chunk-HNV3LB4A.cjs} +1 -1
- package/dist/{chunk-GFGJL7BJ.cjs → chunk-HOZJUW3M.cjs} +1 -1
- package/dist/chunk-I6UUWJCL.cjs +1 -0
- package/dist/{chunk-5JBAFOQI.js → chunk-IBUBTQ42.js} +1 -1
- package/dist/chunk-ILP5ZA7W.js +180 -0
- package/dist/{chunk-SSQYOHWB.cjs → chunk-JCG2KY4G.cjs} +1 -1
- package/dist/chunk-JEFMDNXO.js +1 -0
- package/dist/{chunk-PIDVMDD2.js → chunk-JGWSU6QP.js} +1 -1
- package/dist/{chunk-WEZO24N7.js → chunk-KDDZO4YX.js} +1 -1
- package/dist/{chunk-IC3B2QFJ.js → chunk-KJQTGUGV.js} +1 -1
- package/dist/{chunk-3AIPQMME.cjs → chunk-KMSV2Y6J.cjs} +1 -1
- package/dist/chunk-LHI636RZ.cjs +1 -0
- package/dist/{chunk-TTHIYMFU.js → chunk-LI7QMYLA.js} +1 -1
- package/dist/{chunk-NYIJKTTL.js → chunk-LMKGXH5T.js} +1 -1
- package/dist/{chunk-TMMBKPWH.js → chunk-LMXT72IJ.js} +1 -1
- package/dist/{chunk-DJTBSDTY.js → chunk-MY7Z6LTZ.js} +1 -1
- package/dist/{chunk-5LTXPYXD.cjs → chunk-NXEC4PED.cjs} +1 -1
- package/dist/chunk-OUS4XLPU.js +1 -0
- package/dist/{chunk-H65BGTCH.cjs → chunk-PKYYC5N5.cjs} +1 -1
- package/dist/{chunk-2CXF3CLF.cjs → chunk-QRMYO2NX.cjs} +1 -1
- package/dist/{chunk-PRRCD32U.cjs → chunk-S5QCH2ED.cjs} +1 -1
- package/dist/chunk-SGMSQYXA.cjs +1 -0
- package/dist/{chunk-I4KUTLEI.js → chunk-T4JTHWXU.js} +1 -1
- package/dist/{chunk-76WX7MJH.cjs → chunk-TE27CKWW.cjs} +1 -1
- package/dist/{chunk-V3TDTZGR.js → chunk-TQ3JBX7K.js} +1 -1
- package/dist/{chunk-JJEOOOMI.cjs → chunk-UDNW7GHL.cjs} +1 -1
- package/dist/{chunk-TLXGITLY.cjs → chunk-UV7TO6A4.cjs} +2 -2
- package/dist/chunk-VHFWR2IK.cjs +1 -0
- package/dist/{chunk-WQVHJ4U5.cjs → chunk-WNUSI552.cjs} +2 -2
- package/dist/{chunk-2ES3NHBW.cjs → chunk-WPDCUPIT.cjs} +1 -1
- package/dist/{chunk-PY5KRKC4.cjs → chunk-XX4K26MY.cjs} +1 -1
- package/dist/{chunk-EO7HS4N3.js → chunk-YHU5Q3JI.js} +1 -1
- package/dist/chunk-YYZYQ3CJ.js +0 -0
- package/dist/{chunk-NDDN6KQ5.js → chunk-ZHPSJCFM.js} +1 -1
- package/dist/{chunk-75CRB74H.cjs → chunk-ZNFOZDZO.cjs} +1 -1
- package/dist/components/CrossmintNFTCollectionView.cjs +1 -1
- package/dist/components/CrossmintNFTCollectionView.js +1 -1
- package/dist/components/CrossmintNFTDetail.cjs +1 -1
- package/dist/components/CrossmintNFTDetail.js +1 -1
- package/dist/components/auth/AuthForm.cjs +1 -1
- package/dist/components/auth/AuthForm.js +1 -1
- package/dist/components/auth/AuthFormBackButton.cjs +1 -1
- package/dist/components/auth/AuthFormBackButton.js +1 -1
- package/dist/components/auth/AuthFormDialog.cjs +1 -1
- package/dist/components/auth/AuthFormDialog.js +1 -1
- package/dist/components/auth/EmbeddedAuthForm.cjs +1 -1
- package/dist/components/auth/EmbeddedAuthForm.js +1 -1
- package/dist/components/auth/PasskeyPrompt.cjs +1 -1
- package/dist/components/auth/PasskeyPrompt.js +1 -1
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs +1 -1
- package/dist/components/auth/methods/email/EmailAuthFlow.js +1 -1
- package/dist/components/auth/methods/email/EmailOTPInput.cjs +1 -1
- package/dist/components/auth/methods/email/EmailOTPInput.js +1 -1
- package/dist/components/auth/methods/email/EmailSignIn.cjs +1 -1
- package/dist/components/auth/methods/email/EmailSignIn.js +1 -1
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +46 -1
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +46 -1
- package/dist/components/auth/methods/google/ContinueWithGoogle.cjs +1 -1
- package/dist/components/auth/methods/google/ContinueWithGoogle.js +1 -1
- package/dist/components/auth/methods/google/GoogleSignIn.cjs +1 -1
- package/dist/components/auth/methods/google/GoogleSignIn.js +1 -1
- package/dist/components/auth/methods/twitter/TwitterSignIn.cjs +1 -1
- package/dist/components/auth/methods/twitter/TwitterSignIn.js +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.js +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.js +1 -1
- package/dist/components/auth/methods/web3/Web3Connectors.cjs +1 -1
- package/dist/components/auth/methods/web3/Web3Connectors.js +1 -1
- package/dist/components/card-management/CrossmintPaymentMethodManagement.cjs +1 -1
- package/dist/components/card-management/CrossmintPaymentMethodManagement.js +1 -1
- package/dist/components/card-management/CrossmintPaymentMethodManagementIFrame.cjs +1 -1
- package/dist/components/card-management/CrossmintPaymentMethodManagementIFrame.js +1 -1
- package/dist/components/card-management/index.cjs +1 -1
- package/dist/components/card-management/index.js +1 -1
- package/dist/components/embed/index.cjs +1 -1
- package/dist/components/embed/index.js +1 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +1 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +1 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +1 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs +1 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js +1 -1
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs +1 -1
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js +1 -1
- package/dist/components/embed/v3/index.cjs +1 -1
- package/dist/components/embed/v3/index.js +1 -1
- package/dist/components/hosted/index.cjs +1 -1
- package/dist/components/hosted/index.js +1 -1
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.cjs +1 -1
- package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.js +1 -1
- package/dist/components/hosted/v3/index.cjs +1 -1
- package/dist/components/hosted/v3/index.js +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.cts +2 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +1 -1
- package/dist/components/order-intent/OrderIntentVerification.cjs +1 -1
- package/dist/components/order-intent/OrderIntentVerification.d.cts +1 -1
- package/dist/components/order-intent/OrderIntentVerification.d.ts +1 -1
- package/dist/components/order-intent/OrderIntentVerification.js +1 -1
- package/dist/components/order-intent/index.cjs +1 -1
- package/dist/components/order-intent/index.js +1 -1
- package/dist/components/payment-method-agentic-enrollment/PaymentMethodAgenticEnrollmentVerification.cjs +1 -0
- package/dist/components/payment-method-agentic-enrollment/PaymentMethodAgenticEnrollmentVerification.d.cts +12 -0
- package/dist/components/payment-method-agentic-enrollment/PaymentMethodAgenticEnrollmentVerification.d.ts +12 -0
- package/dist/components/payment-method-agentic-enrollment/PaymentMethodAgenticEnrollmentVerification.js +1 -0
- package/dist/components/payment-method-agentic-enrollment/index.cjs +1 -0
- package/dist/components/payment-method-agentic-enrollment/index.d.cts +3 -0
- package/dist/components/payment-method-agentic-enrollment/index.d.ts +3 -0
- package/dist/components/payment-method-agentic-enrollment/index.js +1 -0
- package/dist/components/signers/EmailSignersDialog.cjs +1 -1
- package/dist/components/signers/EmailSignersDialog.js +1 -1
- package/dist/components/signers/PhoneSignersDialog.cjs +1 -1
- package/dist/components/signers/PhoneSignersDialog.js +1 -1
- package/dist/components/signers/index.cjs +1 -1
- package/dist/components/signers/index.js +1 -1
- package/dist/components/wallets/ExportPrivateKeyButton.cjs +1 -1
- package/dist/components/wallets/ExportPrivateKeyButton.d.cts +2 -1
- package/dist/components/wallets/ExportPrivateKeyButton.d.ts +2 -1
- package/dist/components/wallets/ExportPrivateKeyButton.js +1 -1
- package/dist/components/wallets/index.cjs +1 -1
- package/dist/components/wallets/index.d.cts +1 -1
- package/dist/components/wallets/index.d.ts +1 -1
- package/dist/components/wallets/index.js +1 -1
- package/dist/consts/version.cjs +1 -1
- package/dist/consts/version.js +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useAuth.cjs +1 -1
- package/dist/hooks/useAuth.js +1 -1
- package/dist/hooks/useCrossmintCheckout.cjs +1 -1
- package/dist/hooks/useCrossmintCheckout.js +1 -1
- package/dist/hooks/useOAuthWindowListener.cjs +1 -1
- package/dist/hooks/useOAuthWindowListener.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/providers/CrossmintAuthProvider.cjs +1 -1
- package/dist/providers/CrossmintAuthProvider.js +1 -1
- package/dist/providers/CrossmintProvider.cjs +1 -1
- package/dist/providers/CrossmintProvider.js +1 -1
- package/dist/providers/CrossmintWalletProvider.cjs +1 -1
- package/dist/providers/CrossmintWalletProvider.js +1 -1
- package/dist/providers/auth/FarcasterProvider.cjs +1 -1
- package/dist/providers/auth/FarcasterProvider.js +1 -1
- package/dist/providers/auth/OAuthFlowProvider.cjs +1 -1
- package/dist/providers/auth/OAuthFlowProvider.js +1 -1
- package/dist/providers/dynamic/DynamicWalletProvider.cjs +6 -1
- package/dist/providers/dynamic/DynamicWalletProvider.js +6 -1
- package/dist/providers/index.cjs +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/utils/createCrossmintApiClient.cjs +1 -1
- package/dist/utils/createCrossmintApiClient.js +1 -1
- package/package.json +8 -8
- package/dist/chunk-2ZE6WGPX.js +0 -1
- package/dist/chunk-3TODY3FY.cjs +0 -1
- package/dist/chunk-74WTJ7XP.cjs +0 -1
- package/dist/chunk-7STEMUBW.js +0 -1
- package/dist/chunk-BCP5RVJO.js +0 -230
- package/dist/chunk-BR77Q3PK.cjs +0 -1
- package/dist/chunk-GSVZY7YL.js +0 -1
- package/dist/chunk-JSNUJJQJ.js +0 -1
- package/dist/chunk-KXIAPJK6.cjs +0 -1
- package/dist/chunk-XZJJ2NDY.js +0 -1
- package/dist/chunk-YXQAMA7D.cjs +0 -230
- package/dist/chunk-YZJIE7CP.cjs +0 -1
- /package/dist/{chunk-QI37PBS5.cjs → chunk-2PVYNZP7.cjs} +0 -0
- /package/dist/{chunk-J2CHI2A2.cjs → chunk-4M5LNKYM.cjs} +0 -0
- /package/dist/{chunk-C2TAQBAD.js → chunk-NTFFCZWX.js} +0 -0
- /package/dist/{chunk-5MZTUSMQ.js → chunk-QVXTNSBH.js} +0 -0
package/dist/providers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{l as a,m as b}from"../chunk-ILP5ZA7W.js";import"../chunk-LI7QMYLA.js";import"../chunk-ZHPSJCFM.js";import"../chunk-TQ3JBX7K.js";import"../chunk-ED6OVXN6.js";import"../chunk-O5IPDCMT.js";import"../chunk-4HSZ5QA3.js";import"../chunk-AC2SJG3Q.js";import"../chunk-2F3UEXTE.js";import"../chunk-KFFPM6JM.js";import"../chunk-HHI2XRKR.js";import{a as c}from"../chunk-IBUBTQ42.js";import"../chunk-ETAEFFCS.js";import"../chunk-AZ72RWXJ.js";import"../chunk-ANYQCOAS.js";import"../chunk-LUSXGZYB.js";import"../chunk-JL7YHC7D.js";import"../chunk-AOBO3CEQ.js";import"../chunk-23YVHBPI.js";import"../chunk-EUJ5GQ5N.js";import"../chunk-UG5R7IPH.js";import"../chunk-RV2X7AFS.js";import"../chunk-BWCRTWMO.js";import"../chunk-HGHYGPCN.js";import"../chunk-NZUCXN2O.js";import"../chunk-DFSB3TWF.js";import"../chunk-H34D6PAN.js";import"../chunk-OOLXYAO7.js";import"../chunk-OAHZHKRR.js";import"../chunk-QFUZG5YR.js";import"../chunk-BAXCSO7J.js";import"../chunk-77PBG2JJ.js";import"../chunk-HVZ5M3FY.js";import"../chunk-XFYW7RD2.js";import"../chunk-UAFW3OWA.js";import"../chunk-H3CPTTQQ.js";import"../chunk-C3JRTLQP.js";import"../chunk-6MIHLYJK.js";import"../chunk-LMKGXH5T.js";import"../chunk-5CU74TAA.js";import"../chunk-JEFMDNXO.js";import"../chunk-PXDN3KFO.js";export{a as AuthContext,b as CrossmintAuthProvider,c as CrossmintWalletProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk64YKD3VVcjs = require('../chunk-64YKD3VV.cjs');require('../chunk-SGMSQYXA.cjs');require('../chunk-6SHLJS5F.cjs');require('../chunk-2WSEHVNP.cjs');exports.createCrossmintApiClient = _chunk64YKD3VVcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-LMKGXH5T.js";import"../chunk-5CU74TAA.js";import"../chunk-JEFMDNXO.js";import"../chunk-PXDN3KFO.js";export{a as createCrossmintApiClient};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossmint/client-sdk-react-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"repository": "https://github.com/Crossmint/crossmint-sdk",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Paella Labs Inc",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"LICENSE"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@basis-theory-ai/react": "
|
|
21
|
+
"@basis-theory-ai/react": "2.0.0-beta.3",
|
|
22
22
|
"@dynamic-labs/ethereum": "4.28.0",
|
|
23
23
|
"@dynamic-labs/sdk-react-core": "4.28.0",
|
|
24
24
|
"@dynamic-labs/solana": "4.28.0",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"react-transition-group": "4.4.5",
|
|
40
40
|
"viem": "2.33.1",
|
|
41
41
|
"zod": "3.22.4",
|
|
42
|
-
"@crossmint/client-sdk-auth": "1.2.
|
|
43
|
-
"@crossmint/client-sdk-base": "1.
|
|
44
|
-
"@crossmint/client-sdk-
|
|
42
|
+
"@crossmint/client-sdk-auth": "1.2.48",
|
|
43
|
+
"@crossmint/client-sdk-react-base": "1.0.3",
|
|
44
|
+
"@crossmint/client-sdk-base": "2.0.0",
|
|
45
45
|
"@crossmint/client-sdk-window": "1.0.9",
|
|
46
46
|
"@crossmint/client-signers": "0.1.2",
|
|
47
|
-
"@crossmint/common-sdk-auth": "1.0.
|
|
48
|
-
"@crossmint/common-sdk-base": "0.9.
|
|
49
|
-
"@crossmint/wallets-sdk": "0.
|
|
47
|
+
"@crossmint/common-sdk-auth": "1.0.70",
|
|
48
|
+
"@crossmint/common-sdk-base": "0.9.18",
|
|
49
|
+
"@crossmint/wallets-sdk": "0.20.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@testing-library/react": "^16.0.1",
|
package/dist/chunk-2ZE6WGPX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t="2.6.17";var a={name:"@crossmint/client-sdk-react-ui",version:t,repository:"https://github.com/Crossmint/crossmint-sdk",license:"Apache-2.0",author:"Paella Labs Inc",sideEffects:!1,type:"module",exports:{import:"./dist/index.js",require:"./dist/index.cjs"},main:"./dist/index.cjs",module:"./dist/index.js",types:"./dist/index.d.ts",files:["dist","LICENSE"],scripts:{build:"cross-env NODE_OPTIONS='--max-old-space-size=16384' tsup",dev:"cross-env NODE_OPTIONS='--max-old-space-size=16384' tsup --watch","test:vitest":"vitest run","generate:docs":"typedoc && node scripts/generate-reference.mjs"},dependencies:{"@basis-theory-ai/react":"^1.0.1-beta.9","@crossmint/client-sdk-auth":"workspace:*","@crossmint/client-sdk-base":"workspace:*","@crossmint/client-sdk-react-base":"workspace:*","@crossmint/client-sdk-window":"workspace:*","@crossmint/client-signers":"workspace:*","@crossmint/common-sdk-auth":"workspace:*","@crossmint/common-sdk-base":"workspace:*","@crossmint/wallets-sdk":"workspace:*","@dynamic-labs/ethereum":"4.28.0","@dynamic-labs/sdk-react-core":"4.28.0","@dynamic-labs/solana":"4.28.0","@dynamic-labs/sui":"4.28.0","@emotion/react":"^11.11.0","@emotion/styled":"11.14.1","@ethersproject/transactions":"5.7.0","@farcaster/auth-kit":"0.6.0","@mysten/sui":"1.24.0","@solana/web3.js":"1.98.1",bs58:"5.0.0",clsx:"2.1.1",color:"4.2.3","input-otp":"1.4.2","lodash.isequal":"4.5.0",ox:"0.6.9","react-jss":"10.10.0","react-transition-group":"4.4.5",viem:"2.33.1",zod:"3.22.4"},devDependencies:{"@testing-library/react":"^16.0.1","@types/color":"4.2.0","@types/lodash.isequal":"4.5.6","@types/react":"^19.1.10","@types/react-dom":"^19.1.0","@types/react-transition-group":"4.4.12","pino-pretty":"^7.6.0",react:"^19.1.0","react-dom":"^19.1.0",typedoc:"0.28.16"},peerDependencies:{"@solana/web3.js":"^1.98.1",react:">=17.0.2","react-dom":">=17.0.2"}};export{t as a,a as b};
|
package/dist/chunk-3TODY3FY.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYZJIE7CPcjs = require('./chunk-YZJIE7CP.cjs');var e=_chunkYZJIE7CPcjs.a;exports.a = e;
|
package/dist/chunk-74WTJ7XP.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('@basis-theory-ai/react');var _react3 = require('react');var _jsxruntime = require('react/jsx-runtime');function h(t){return _jsxruntime.jsx.call(void 0, _react.BtAiProvider,{jwt:t.config.btJwt,environment:t.config.environment,children:_jsxruntime.jsx.call(void 0, P,_chunk2WSEHVNPcjs.a.call(void 0, {},t))})}function P({config:t,orderIntent:i,onVerificationComplete:n,onVerificationError:e}){let{verifyPurchaseIntent:o}=_react.useBtAi.call(void 0, ),s=_react3.useCallback.call(void 0, ()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{let r=yield o(t.btProjectId,i.payment.externalOrderIntentId);n==null||n(r)}catch(r){e==null||e(r)}}),[o,t.btProjectId,i.orderIntentId,n,e]);return _react3.useEffect.call(void 0, ()=>{s()},[s]),null}exports.a = h;
|
package/dist/chunk-7STEMUBW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk-NYIJKTTL.js";import{createPaymentMethodManagementService as g}from"@crossmint/client-sdk-base";import{useCrossmint as u}from"@crossmint/client-sdk-react-base";import{useEffect as i,useRef as y,useState as s}from"react";import{jsx as M}from"react/jsx-runtime";function v(n){let[e,c]=s(null),[d,f]=s(0),a=y(null),{crossmint:h}=u(),l=o(h,{usageOrigin:"client"}),m=g({apiClient:l});return i(()=>{let t=a.current;!t||e||c(m.iframe.createClient(t))},[a.current,e]),i(()=>{if(e!=null)return e.on("ui:height.changed",t=>f(t.height)),e.on("payment-method:selected",t=>{var r;return(r=n.onPaymentMethodSelected)==null?void 0:r.call(n,t)}),e.on("order-intent:created",t=>{var r;(r=n.onOrderIntentCreated)==null||r.call(n,t.orderIntent,t.verificationConfig)}),()=>{e.off("ui:height.changed"),e.off("payment-method:selected"),e.off("order-intent:created")}},[e]),M("iframe",{ref:a,src:m.iframe.getUrl(n),id:"crossmint-payment-method-management.iframe",role:"crossmint-payment-method-management.iframe",allow:"payment *; microphone; camera",style:{boxShadow:"none",border:"none",padding:"0px",width:"100%",minWidth:"100%",overflow:"hidden",display:"block",userSelect:"none",transform:"translate(0px)",opacity:"1",transition:"ease 0s, opacity 0.4s ease 0.1s",height:`${d}px`,backgroundColor:"transparent"}})}export{v as a};
|
package/dist/chunk-BCP5RVJO.js
DELETED
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import{a as Tt}from"./chunk-TTHIYMFU.js";import{b as ht}from"./chunk-4KDASQO6.js";import{a as Ft}from"./chunk-JSNUJJQJ.js";import{a as gt}from"./chunk-LTY4MYLM.js";import{a as Et}from"./chunk-ED6OVXN6.js";import{a as bt,b as St,c as Ot}from"./chunk-O5IPDCMT.js";import{a as H}from"./chunk-4HSZ5QA3.js";import{a as J}from"./chunk-GG3WKQG7.js";import{a as P,b as Pt}from"./chunk-2F3UEXTE.js";import{a as Wt}from"./chunk-KFFPM6JM.js";import{a as kt}from"./chunk-UHFCB2EY.js";import{a as Y}from"./chunk-OAHZHKRR.js";import{a as wt}from"./chunk-JL7YHC7D.js";import{a as _}from"./chunk-AOBO3CEQ.js";import{a as vt}from"./chunk-23YVHBPI.js";import{a as It}from"./chunk-UG5R7IPH.js";import{a as xt,b as yt,c as Ct}from"./chunk-RV2X7AFS.js";import{a as N}from"./chunk-NZUCXN2O.js";import{a as s}from"./chunk-DFSB3TWF.js";import{a as At}from"./chunk-C3JRTLQP.js";import{a as X}from"./chunk-UAFW3OWA.js";import{a as B,b as R,c as q,d as C}from"./chunk-PXDN3KFO.js";import{useState as dt}from"react";import z from"@emotion/styled";import{useCrossmint as Nn,useWallet as Kn}from"@crossmint/client-sdk-react-base";import{useContext as co}from"react";import{useEffect as mt,useMemo as to,useState as ot,useCallback as rt,createContext as eo,useRef as oo}from"react";import{validateApiKeyAndGetCrossmintBaseUrl as ro}from"@crossmint/common-sdk-base";import{useCrossmint as no,CrossmintAuthBaseProvider as io,useCrossmintAuthBase as ae}from"@crossmint/client-sdk-react-base";import Ne from"color";import Jt from"@emotion/styled";import{useState as We}from"react";import{useState as it}from"react";import Gt from"color";import M from"@emotion/styled";import{isEmailValid as at}from"@crossmint/common-sdk-auth";import{createContext as he,useCallback as Lt,useContext as xe,useEffect as ye,useState as Bt}from"react";import{useEffect as ce,useRef as ue,useState as me,useCallback as pe}from"react";import{ChildWindow as de,PopupWindow as fe}from"@crossmint/client-sdk-window";import{z as Z}from"zod";var Ut=(o,e)=>{let{crossmintAuth:t}=F(),[r,a]=me(null),i=ue(null);return ce(()=>(i.current==null&&(i.current=new de(window.opener||window.parent,"*",{incomingEvents:ge})),()=>{i.current!=null&&i.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:pe((n,x)=>C(void 0,null,function*(){if(i.current==null)throw new Error("Child window not initialized");a(n),e(null),console.log("createPopupAndSetupListeners",n,x),console.log("oauthUrlMap",o),console.log("oauthUrlMap[provider]",o[n]);let l=new URL(o[n]);if(x!=null){let u=Array.from(l.searchParams.entries());l.search="",x&&l.searchParams.append("provider_login_hint",x),u.forEach(([m,h])=>{l.searchParams.append(m,h)})}let y=yield fe.init(l.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),g=u=>C(void 0,null,function*(){var m,h;yield t==null?void 0:t.handleRefreshAuthMaterial(u.oneTimeSecret),(m=i.current)==null||m.off("authMaterialFromPopupCallback"),(h=y.window)==null||h.close(),a(null)}),p=u=>{var m,h;e(u.error),(m=i.current)==null||m.off("errorFromPopupCallback"),(h=y.window)==null||h.close(),a(null)};i.current.on("authMaterialFromPopupCallback",g),i.current.on("errorFromPopupCallback",p);let d=setInterval(()=>{var u,m;(u=y.window)!=null&&u.closed&&(clearInterval(d),a(null),(m=i.current)==null||m.off("authMaterialFromPopupCallback"))},2500)}),[o,t,e]),isLoading:r!=null,activeOAuthProvider:r}},ge={authMaterialFromPopupCallback:Z.object({oneTimeSecret:Z.string()}),errorFromPopupCallback:Z.object({error:Z.string()})};import{jsx as Ce}from"react/jsx-runtime";var Rt={google:"",twitter:""},$t=he(void 0);function $(){let o=xe($t);if(!o)throw new Error("useOAuthFlow must be used within an OAuthFlowProvider");return o}function Mt({children:o,prefetchOAuthUrls:e}){let{crossmintAuth:t,loginMethods:r}=Dt(),{setError:a}=P(),[i,c]=Bt(Rt),[n,x]=Bt(!0),{createPopupAndSetupListeners:l,isLoading:y,activeOAuthProvider:g}=Ut(i,a),p=Lt(()=>C(this,null,function*(){x(!0);try{let h=(r||[]).filter(f=>f in Rt).map(f=>C(this,null,function*(){let w=yield t==null?void 0:t.getOAuthUrl(f);return{[f]:w}})),v=Object.assign({},...yield Promise.all(h));c(v)}catch(m){a(m instanceof Error?m.message:"Unable to load oauth providers. Please try again later.")}finally{x(!1)}}),[r,t,a]);ye(()=>{e&&p()},[p,e]);let u={startOAuthLogin:Lt((m,h)=>C(this,null,function*(){yield l(m,h)}),[l]),isLoading:n||y,activeOAuthProvider:g};return Ce($t.Provider,{value:u,children:o})}import zt from"@emotion/styled";import{jsx as nt,jsxs as Ae}from"react/jsx-runtime";var we=zt.button`
|
|
2
|
-
${N}
|
|
3
|
-
|
|
4
|
-
display: flex;
|
|
5
|
-
align-items: center;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
gap: 8px;
|
|
8
|
-
height: 32px;
|
|
9
|
-
padding: 0 10px;
|
|
10
|
-
border: 1px solid ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.border)||s["cm-border"]}};
|
|
11
|
-
border-radius: ${o=>{var e;return((e=o.appearance)==null?void 0:e.borderRadius)||"12px"}};
|
|
12
|
-
background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.buttonBackground)||s["cm-background-primary"]}};
|
|
13
|
-
cursor: ${o=>o.isLoading?"not-allowed":"pointer"};
|
|
14
|
-
|
|
15
|
-
/* Hover and focus states */
|
|
16
|
-
&:hover {
|
|
17
|
-
background-color: ${o=>o.isLoading?s["cm-muted-primary"]:s["cm-hover"]};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&:focus {
|
|
21
|
-
outline: none;
|
|
22
|
-
background-color: theme["cm-hover"];
|
|
23
|
-
}
|
|
24
|
-
`,ve=zt.span`
|
|
25
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||s["cm-accent"]}};
|
|
26
|
-
font-size: 14px;
|
|
27
|
-
font-weight: 400;
|
|
28
|
-
`;function jt({emailInput:o,appearance:e}){var i,c;let{startOAuthLogin:t,activeOAuthProvider:r}=$(),a=r==="google";return Ae(we,{type:"button",appearance:e,isLoading:a,onClick:a?void 0:()=>t("google",o.trim().toLowerCase()),children:[nt(Y,{style:{height:"18px",width:"18px"}}),a?nt(_,{style:{color:(i=e==null?void 0:e.colors)==null?void 0:i.textSecondary,fill:(c=e==null?void 0:e.colors)==null?void 0:c.textPrimary,width:"18px",height:"18px"}}):nt(ve,{appearance:e,children:"Continue"})]})}import{jsx as T,jsxs as lt}from"react/jsx-runtime";var Pe=M.div`
|
|
29
|
-
display: flex;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
align-items: flex-start;
|
|
32
|
-
justify-content: flex-start;
|
|
33
|
-
width: 100%;
|
|
34
|
-
border-radius: 8px;
|
|
35
|
-
`,be=M.div`
|
|
36
|
-
width: 100%;
|
|
37
|
-
`,Se=M.label`
|
|
38
|
-
display: block;
|
|
39
|
-
margin-bottom: 5px;
|
|
40
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||s["cm-text-primary"]}};
|
|
41
|
-
font-size: 14px;
|
|
42
|
-
font-weight: 400;
|
|
43
|
-
`,Oe=M.form`
|
|
44
|
-
position: relative;
|
|
45
|
-
`,Ee=M.input`
|
|
46
|
-
${N}
|
|
47
|
-
|
|
48
|
-
/* Base input styles */
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-grow: 1;
|
|
51
|
-
text-align: left;
|
|
52
|
-
padding-left: 16px;
|
|
53
|
-
padding-right: ${o=>o.showGoogleButton?"132px":"80px"};
|
|
54
|
-
height: 58px;
|
|
55
|
-
width: 100%;
|
|
56
|
-
border: 1px solid;
|
|
57
|
-
border-color: ${o=>{var e,t,r,a;return o.hasError?((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)||s["cm-danger"]:((a=(r=o.appearance)==null?void 0:r.colors)==null?void 0:a.border)||s["cm-border"]}};
|
|
58
|
-
border-radius: ${o=>{var e;return((e=o.appearance)==null?void 0:e.borderRadius)||"12px"}};
|
|
59
|
-
background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.inputBackground)||s["cm-background-primary"]}};
|
|
60
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||s["cm-text-primary"]}};
|
|
61
|
-
font-size: 16px;
|
|
62
|
-
transition: border-color 200ms ease-in-out, box-shadow 200ms ease-in-out;
|
|
63
|
-
|
|
64
|
-
&::placeholder {
|
|
65
|
-
font-weight: 400;
|
|
66
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||s["cm-text-secondary"]}};
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&:focus {
|
|
70
|
-
outline: none;
|
|
71
|
-
box-shadow: 0 0 0 2px ${o=>{var e,t;return new Gt(((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||s["cm-accent"]).alpha(.18).toString()}};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&:read-only {
|
|
75
|
-
cursor: not-allowed;
|
|
76
|
-
opacity: 0.7;
|
|
77
|
-
}
|
|
78
|
-
`,ke=M.div`
|
|
79
|
-
position: absolute;
|
|
80
|
-
right: 0;
|
|
81
|
-
top: 0;
|
|
82
|
-
bottom: 0;
|
|
83
|
-
display: flex;
|
|
84
|
-
align-items: center;
|
|
85
|
-
padding-right: 16px;
|
|
86
|
-
`,Ie=M.button`
|
|
87
|
-
${N}
|
|
88
|
-
|
|
89
|
-
font-weight: 500;
|
|
90
|
-
white-space: nowrap;
|
|
91
|
-
background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.inputBackground)||s["cm-background-primary"]}};
|
|
92
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||s["cm-accent"]}};
|
|
93
|
-
cursor: ${o=>o.disabled?"not-allowed":"pointer"};
|
|
94
|
-
opacity: ${o=>o.disabled?.6:1};
|
|
95
|
-
border: none;
|
|
96
|
-
padding: 8px 12px;
|
|
97
|
-
border-radius: 6px;
|
|
98
|
-
transition: opacity 200ms ease;
|
|
99
|
-
|
|
100
|
-
&:hover:not(:disabled) {
|
|
101
|
-
opacity: 0.8;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&:focus-visible {
|
|
105
|
-
outline: 2px solid ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||s["cm-accent"]}};
|
|
106
|
-
outline-offset: 2px;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&:not(:disabled):focus-visible {
|
|
110
|
-
box-shadow: 0 0 0 2px ${o=>{var e,t;return new Gt(((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||s["cm-accent"]).alpha(.18).toString()}};
|
|
111
|
-
}
|
|
112
|
-
`,Fe=M.p`
|
|
113
|
-
font-size: 12px;
|
|
114
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)||s["cm-danger"]}};
|
|
115
|
-
margin: 8px 0 8px 0;
|
|
116
|
-
`;function _t({setOtpEmailData:o}){var m,h,v;let{crossmintAuth:e}=F(),{appearance:t,defaultEmail:r,setStep:a,setError:i,loginMethods:c}=P(),[n,x]=it(r!=null?r:""),[l,y]=it(""),[g,p]=it(!1),d=n.toLowerCase().includes("@gmail.com")&&!n.toLowerCase().includes("+")&&at(n)&&!g&&c.includes("google");function u(f){return C(this,null,function*(){f.preventDefault(),p(!0);try{let w=n.trim().toLowerCase(),W=yield e==null?void 0:e.sendEmailOtp(w);o({email:w,emailId:W.emailId}),a("otp")}catch(w){p(!1),i("Failed to send email. Please try again or contact support.")}})}return T(Pe,{children:lt(be,{children:[T(Se,{appearance:t,children:"Email"}),lt(Oe,{role:"form",onSubmit:f=>{if(d){f.preventDefault();return}at(n)?u(f):f.preventDefault()},noValidate:!0,children:[T(vt,{children:"Email"}),T(Ee,{id:"emailInput",appearance:t,hasError:!!l,showGoogleButton:d,type:"email",placeholder:"your@email.com",value:n,onChange:f=>{x(f.target.value),y(""),i(null)},readOnly:g,"aria-describedby":"emailError"}),lt(ke,{children:[l&&T(X,{customColor:(m=t==null?void 0:t.colors)==null?void 0:m.danger}),g&&T(_,{style:{color:(h=t==null?void 0:t.colors)==null?void 0:h.textSecondary,fill:(v=t==null?void 0:t.colors)==null?void 0:v.textPrimary}}),d?T(jt,{emailInput:n,appearance:t}):!l&&!g?T(Ie,{type:"submit",appearance:t,disabled:!at(n)||g,children:"Submit"}):null]})]}),l&&T(Fe,{appearance:t,id:"emailError",children:l})]})})}import{jsx as Ht}from"react/jsx-runtime";function Nt(){let{step:o}=P(),[e,t]=We(null);return o==="otp"?Ht(Qt,{otpEmailData:e,setOtpEmailData:t}):o==="initial"?Ht(_t,{setOtpEmailData:t}):null}import{jsx as st}from"react/jsx-runtime";function Kt(e){var o=q(e,[]);var n;let{step:t,appearance:r}=P(),{startOAuthLogin:a,activeOAuthProvider:i}=$(),c=i==="google";return t!=="initial"?null:st(H,R(B({icon:st(Y,{style:{height:"25px",width:"25px"}}),isLoading:c,appearance:r,onButtonClick:()=>a("google")},o),{children:st("span",{style:{color:(n=r==null?void 0:r.colors)==null?void 0:n.textPrimary},children:"Sign in with Google"})}))}import{useEffect as ct,useMemo as Te,useState as Ue}from"react";import{useSignIn as Le,QRCode as Be}from"@farcaster/auth-kit";import D from"@emotion/styled";import{Fragment as Qe,jsx as k,jsxs as tt}from"react/jsx-runtime";var Re=D.div`
|
|
117
|
-
display: flex;
|
|
118
|
-
flex-direction: column;
|
|
119
|
-
align-items: center;
|
|
120
|
-
gap: 16px;
|
|
121
|
-
`,$e=D.div`
|
|
122
|
-
text-align: center;
|
|
123
|
-
`,Me=D.h3`
|
|
124
|
-
font-size: 18px;
|
|
125
|
-
font-weight: 600;
|
|
126
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||s["cm-text-primary"]}};
|
|
127
|
-
margin: 0 0 8px 0;
|
|
128
|
-
`,De=D.p`
|
|
129
|
-
font-size: 16px;
|
|
130
|
-
font-weight: 400;
|
|
131
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||s["cm-text-secondary"]}};
|
|
132
|
-
margin: 0;
|
|
133
|
-
`,ze=D.div`
|
|
134
|
-
background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.inputBackground)||s["cm-background-primary"]}};
|
|
135
|
-
aspect-ratio: 1;
|
|
136
|
-
border-radius: ${o=>{var e;return((e=o.appearance)==null?void 0:e.borderRadius)||"8px"}};
|
|
137
|
-
padding: 16px;
|
|
138
|
-
display: flex;
|
|
139
|
-
align-items: center;
|
|
140
|
-
justify-content: center;
|
|
141
|
-
`,je=D.div`
|
|
142
|
-
min-height: 246px;
|
|
143
|
-
display: flex;
|
|
144
|
-
align-items: center;
|
|
145
|
-
justify-content: center;
|
|
146
|
-
`,Ge=D.p`
|
|
147
|
-
font-size: 16px;
|
|
148
|
-
text-align: center;
|
|
149
|
-
font-weight: 400;
|
|
150
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||s["cm-text-secondary"]}};
|
|
151
|
-
margin: 0;
|
|
152
|
-
`,_e=D.a`
|
|
153
|
-
font-size: 16px;
|
|
154
|
-
font-weight: 400;
|
|
155
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textLink)||s["cm-accent"]}};
|
|
156
|
-
text-decoration: none;
|
|
157
|
-
|
|
158
|
-
&:hover {
|
|
159
|
-
text-decoration: underline;
|
|
160
|
-
}
|
|
161
|
-
`;function Vt(){let{step:o,appearance:e,setStep:t,setError:r}=P();return o==="initial"?k(H,{icon:k(kt,{style:{height:"25px",width:"25px"}}),appearance:e,onButtonClick:()=>{t("qrCode"),r(null)},children:"Sign in with Farcaster"}):o==="qrCode"?k(He,{}):null}function He(){var u,m,h,v;let{crossmintAuth:o}=F(),{appearance:e,setStep:t,setDialogOpen:r,setError:a}=P(),[i,c]=Ue(null),n=Te(()=>({onSuccess:f=>{c(f)}}),[]),{signIn:x,url:l,connect:y,signOut:g,isConnected:p}=Le(n),d=f=>C(this,null,function*(){a(null);try{let w=yield o==null?void 0:o.signInWithFarcaster(f);yield o==null?void 0:o.handleRefreshAuthMaterial(w),r(!1),t("initial")}catch(w){console.error("Error during Farcaster sign-in:",w),a("Failed to sign in with Farcaster")}});return ct(()=>{i!=null&&d(i)},[i]),ct(()=>{p&&x()},[p]),ct(()=>{y()},[]),tt("div",{children:[k(J,{onClick:()=>{g(),t("initial")},iconColor:(u=e==null?void 0:e.colors)==null?void 0:u.textPrimary,ringColor:(m=e==null?void 0:e.colors)==null?void 0:m.accent}),tt(Re,{children:[tt($e,{children:[k(Me,{appearance:e,children:"Sign in with Farcaster"}),k(De,{appearance:e,children:"Scan with your phone's camera to continue."})]}),k(ze,{appearance:e,children:l!=null?k(Be,{uri:l,size:280}):k(je,{children:k(_,{style:{color:(h=e==null?void 0:e.colors)==null?void 0:h.textSecondary,fill:(v=e==null?void 0:e.colors)==null?void 0:v.textPrimary}})})}),l?tt(Qe,{children:[k(Ge,{appearance:e,children:"Alternatively, click on this link to open Warpcast."}),k(_e,{href:l,rel:"noopener noreferrer",target:"_blank",appearance:e,children:"Open Warpcast"})]}):k("div",{style:{height:"66px"}})]})]})}import{jsx as qt}from"react/jsx-runtime";function Xt(e){var o=q(e,[]);let{step:t,appearance:r}=P(),{startOAuthLogin:a,activeOAuthProvider:i}=$(),c=i==="twitter";return t!=="initial"?null:qt(H,R(B({icon:qt(Wt,{style:{height:"22px",width:"22px"}}),isLoading:c,appearance:r,onButtonClick:()=>a("twitter")},o),{children:"Sign in with X"}))}import{jsx as E,jsxs as K}from"react/jsx-runtime";var Ke=Jt.div`
|
|
162
|
-
position: relative;
|
|
163
|
-
padding: 40px 24px 30px 24px;
|
|
164
|
-
display: flex;
|
|
165
|
-
flex-direction: column;
|
|
166
|
-
gap: 10px;
|
|
167
|
-
-webkit-font-smoothing: antialiased;
|
|
168
|
-
animation: none;
|
|
169
|
-
|
|
170
|
-
@media (min-width: 480px) {
|
|
171
|
-
padding: 40px 40px 30px 40px;
|
|
172
|
-
}
|
|
173
|
-
`,Ve=Jt.div`
|
|
174
|
-
display: flex;
|
|
175
|
-
align-items: flex-start;
|
|
176
|
-
justify-content: flex-start;
|
|
177
|
-
border-radius: 8px;
|
|
178
|
-
padding: 8px;
|
|
179
|
-
gap: 8px;
|
|
180
|
-
margin-top: 34px;
|
|
181
|
-
background-color: ${o=>{var e,t,r;return new Ne((r=(t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)!=null?r:s["cm-danger"]).alpha(.12).toString()}};
|
|
182
|
-
`;function Yt({style:o}){var x,l,y,g,p,d,u,m,h,v;let{step:e,appearance:t,loginMethods:r,baseUrl:a,error:i,termsOfServiceText:c,authModalTitle:n}=P();return K(Ke,{style:o,children:[i!=null?K(Ve,{appearance:t,children:[E("div",{style:{minWidth:"20px"},children:E(X,{customColor:(l=(x=t==null?void 0:t.colors)==null?void 0:x.danger)!=null?l:s["cm-danger"]})}),E("p",{style:{fontSize:"14px",margin:0,color:(g=(y=t==null?void 0:t.colors)==null?void 0:y.danger)!=null?g:s["cm-danger"]},children:i})]}):null,e==="initial"?K("div",{children:[E(yt,{appearance:t,children:n!=null?n:"Sign in to Crossmint"}),E(Ct,{appearance:t,children:"Access using one of the options below."})]}):null,r.includes("google")?E(Kt,{}):null,r.includes("farcaster")?E(Ft,{baseUrl:a,children:E(Vt,{})}):null,r.includes("twitter")?E(Xt,{}):null,r.some(f=>f.startsWith("web3"))?E(Tt,{}):null,r.includes("email")?K("div",{children:[r.length>1?E(Et,{appearance:t,text:"OR"}):null,E(Nt,{})]}):null,e==="initial"&&c!=null?K("div",{style:{fontSize:"0.875rem",textAlign:"center",marginTop:"0.5rem",color:(d=(p=t==null?void 0:t.colors)==null?void 0:p.textSecondary)!=null?d:s["cm-text-secondary"]},children:[E("style",{children:`
|
|
183
|
-
p a {
|
|
184
|
-
color: ${(m=(u=t==null?void 0:t.colors)==null?void 0:u.textLink)!=null?m:s["cm-link"]};
|
|
185
|
-
}
|
|
186
|
-
`}),c]}):null,e==="initial"||e==="otp"?E(It,{style:{marginTop:"1rem",justifyContent:"center"},color:(v=(h=t==null?void 0:t.colors)==null?void 0:h.textSecondary)!=null?v:s["cm-text-secondary"]}):null]})}import{jsx as Zt}from"react/jsx-runtime";function et({open:o}){let{appearance:e,setDialogOpen:t}=P();return Zt(xt,{open:o,setDialogOpen:t,appearance:e,children:Zt(Yt,{style:{maxWidth:"448px",padding:"0px"}})})}import{useEffect as ut,useMemo as te}from"react";import{useDynamicContext as qe}from"@dynamic-labs/sdk-react-core";import{isEthereumWallet as Xe}from"@dynamic-labs/ethereum";import{isSolanaWallet as Je}from"@dynamic-labs/solana";import Ye from"bs58";import{EthereumWalletConnectors as ee}from"@dynamic-labs/ethereum";import{SolanaWalletConnectors as oe}from"@dynamic-labs/solana";import{jsx as re}from"react/jsx-runtime";function Ze({children:o,enabled:e,onSdkLoaded:t,onWalletConnected:r,jwt:a}){let{primaryWallet:i,sdkHasLoaded:c,removeWallet:n,handleUnlinkWallet:x}=qe(),l=!e||c;return ut(()=>{l&&(t==null||t(l))},[l,t]),ut(()=>{a==null&&l&&i!=null&&(n(i.id),x(i.id))},[a,l,i,n,x]),ut(()=>{function y(){return C(this,null,function*(){try{if(Xe(i)){let g=yield i.getWalletClient(),p={type:"external-wallet",address:g.account.address,viemAccount:R(B({},g.account),{signMessage:d=>C(this,null,function*(){return yield g.signMessage({message:d.message})})})};r(p)}else if(Je(i)){let g=yield i.getSigner(),p={type:"external-wallet",address:i.address,onSignTransaction:d=>C(this,null,function*(){return yield g.signTransaction(d)})};r(p)}else throw new Error("Unsupported wallet type")}catch(g){throw console.error("Failed to get admin signer",g),new Error("Failed to get admin signer")}})}i!=null&&a!=null&&y()},[i,a,r]),o}function ne({children:o,enabled:e=!0,apiKeyEnvironment:t,loginMethods:r=["web3"],appearance:a,onSdkLoaded:i,onWalletConnected:c}){var g,p;let{crossmintAuth:n,jwt:x}=F(),l=te(()=>{var d,u;return`.powered-by-dynamic { display: none !important; }
|
|
187
|
-
.wallet-list__scroll-container { padding: 0px !important; }
|
|
188
|
-
.wallet-list__search-container { padding-left: 0px !important; padding-right: 0px !important; }
|
|
189
|
-
.dynamic-footer { display: none !important; }
|
|
190
|
-
h1 { color: ${(d=a==null?void 0:a.colors)==null?void 0:d.textPrimary} !important; }
|
|
191
|
-
* { color: ${(u=a==null?void 0:a.colors)==null?void 0:u.textSecondary} !important; }`},[(g=a==null?void 0:a.colors)==null?void 0:g.textPrimary,(p=a==null?void 0:a.colors)==null?void 0:p.textSecondary]),y=te(()=>{if(e)return r.includes("web3:evm-only")?[ee]:r.includes("web3:solana-only")?[oe]:[ee,oe]},[e,r]);return re(gt,{apiKeyEnvironment:t,settings:{walletConnectors:y,cssOverrides:l,events:{onAuthFailure(d,u){console.error("[DynamicWalletProvider] onAuthFailure",d,u)}},handlers:{handleConnectedWallet:d=>C(this,null,function*(){var m;if(!n)return console.error("[DynamicWalletProvider] crossmintAuth is not available"),!1;let u=d.address;if(u==null)return console.error("[DynamicWalletProvider] handleConnectedWallet: address is missing"),!1;try{let v=(yield ht(d))==="solana"?"solana":"evm",f=yield n.signInWithSmartWallet(u,v);if((f==null?void 0:f.challenge)==null)throw new Error("No challenge received from signInWithSmartWallet");let w=yield(m=d.connector)==null?void 0:m.proveOwnership(u,f.challenge);if(w==null)throw new Error("Failed to get signature from wallet");let W=w;if(v==="solana"){let L=Buffer.from(w,"base64");W=Ye.encode(L)}let A=yield n.authenticateSmartWallet(u,v,W);if((A==null?void 0:A.oneTimeSecret)==null)throw new Error("No oneTimeSecret received from authenticateSmartWallet");return yield n.handleRefreshAuthMaterial(A.oneTimeSecret),!0}catch(h){return console.error("[DynamicWalletProvider] Error handling wallet connection:",h),!1}})}},children:re(Ze,{enabled:e,onSdkLoaded:i,onWalletConnected:c,jwt:x,children:o})},`${t}-${r.join(",")}`)}import{Fragment as le,jsx as U,jsxs as ie}from"react/jsx-runtime";var ao={crossmintAuth:void 0,login:()=>{},logout:()=>C(void 0,null,function*(){}),jwt:void 0,user:void 0,status:"initializing",getUser:()=>{},experimental_externalWalletSigner:void 0,experimental_loginWithOAuth:()=>Promise.resolve(),loginMethods:[]},pt=eo(ao);function lo({children:o,appearance:e,termsOfServiceText:t,prefetchOAuthUrls:r=!0,authModalTitle:a,onLoginSuccess:i,loginMethods:c=["email","google"]}){let n=ae(),{crossmint:x,experimental_setCustomAuth:l,experimental_customAuth:y}=no("CrossmintAuthProvider must be used within CrossmintProvider"),g=ro(x.apiKey),[p,d]=ot(!1),[u,m]=ot(void 0),[h,v]=ot(!0),f=c.some(I=>I.startsWith("web3")),[w,W]=ot(void 0),A=oo(null);mt(()=>{var I,G;n.jwt==null&&(y==null?void 0:y.jwt)!=null&&l(void 0),w!=null||((I=n.user)==null?void 0:I.email)!=null?l({jwt:n.jwt,email:(G=n.user)==null?void 0:G.email,externalWalletSigner:w}):l({jwt:n.jwt})},[w,n.jwt,n.user,l,y]),mt(()=>{n.jwt!=null&&p&&d(!1)},[n.jwt,p]);let L=rt(I=>{if(n.jwt!=null){console.log("User already logged in");return}I!=null&&typeof I=="string"&&m(I),d(!0)},[n.jwt]),j=rt(()=>n.status==="initializing"||f&&!h?"initializing":n.jwt!=null?"logged-in":p?"in-progress":"logged-out",[n.status,n.jwt,f,h,p]),ft=rt(I=>C(this,null,function*(){var G;if(n.jwt!=null){console.log("User already logged in");return}yield(G=A.current)==null?void 0:G.call(A,I)}),[n.jwt]),se=to(()=>R(B({},n),{login:L,status:j(),experimental_externalWalletSigner:w,experimental_loginWithOAuth:ft,loginMethods:c}),[n,L,j,w,ft,c]);return U(pt.Provider,{value:se,children:U(Pt,{setDialogOpen:(I,G)=>{d(I),G&&(i==null||i())},initialState:{appearance:e,loginMethods:c,termsOfServiceText:t,authModalTitle:a,baseUrl:g,defaultEmail:u},children:U(Mt,{prefetchOAuthUrls:j()==="logged-out"&&r,children:U(so,{loginWithOAuthRef:A,children:f?ie(ne,{apiKeyEnvironment:x.apiKey.includes("production")?"production":"staging",loginMethods:c,appearance:e,onSdkLoaded:v,onWalletConnected:W,children:[o,U(et,{open:p})]}):ie(le,{children:[o,U(et,{open:p})]})})})})})}function so({children:o,loginWithOAuthRef:e}){let{startOAuthLogin:t}=$(),r=ae(),a=rt(i=>C(this,null,function*(){if(r.jwt!=null){console.log("User already logged in");return}yield t(i)}),[r.jwt,t]);return mt(()=>{e.current=a},[a,e]),U(le,{children:o})}function Fn({children:o,appearance:e,termsOfServiceText:t,prefetchOAuthUrls:r=!0,authModalTitle:a,onLoginSuccess:i,loginMethods:c=["email","google"],refreshRoute:n,logoutRoute:x}){return U(io,{onLoginSuccess:i,refreshRoute:n,logoutRoute:x,children:U(lo,{onLoginSuccess:i,appearance:e,termsOfServiceText:t,prefetchOAuthUrls:r,authModalTitle:a,loginMethods:c,children:o})})}function F(){let o=co(pt);if(o==null)throw new Error("useCrossmintAuth must be used within a CrossmintAuthProvider");return o}var Dt=F;import{jsx as b,jsxs as V}from"react/jsx-runtime";var uo=z.div`
|
|
192
|
-
display: flex;
|
|
193
|
-
flex-direction: column;
|
|
194
|
-
`,mo=z.div`
|
|
195
|
-
display: flex;
|
|
196
|
-
flex-direction: column;
|
|
197
|
-
align-items: center;
|
|
198
|
-
justify-content: flex-start;
|
|
199
|
-
width: 100%;
|
|
200
|
-
`,po=z.div`
|
|
201
|
-
position: relative;
|
|
202
|
-
left: 12px;
|
|
203
|
-
`,fo=z.p`
|
|
204
|
-
font-size: 16px;
|
|
205
|
-
font-weight: 400;
|
|
206
|
-
margin: 16px 0 4px 0;
|
|
207
|
-
text-align: center;
|
|
208
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||s["cm-text-primary"]}};
|
|
209
|
-
`,go=z.p`
|
|
210
|
-
text-align: center;
|
|
211
|
-
padding: 0 16px;
|
|
212
|
-
margin: 0;
|
|
213
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||s["cm-text-secondary"]}};
|
|
214
|
-
font-size: 14px;
|
|
215
|
-
line-height: 1.4;
|
|
216
|
-
`,ho=z.div`
|
|
217
|
-
padding: 32px 0;
|
|
218
|
-
`,Q=z(Ot)`
|
|
219
|
-
@media (max-width: 379px) {
|
|
220
|
-
width: 40px;
|
|
221
|
-
height: 56px;
|
|
222
|
-
font-size: 28px;
|
|
223
|
-
margin: 0;
|
|
224
|
-
}
|
|
225
|
-
`,xo=z.div`
|
|
226
|
-
font-size: 12px;
|
|
227
|
-
line-height: 1.3;
|
|
228
|
-
text-align: center;
|
|
229
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||s["cm-text-secondary"]}};
|
|
230
|
-
`;function Qt({otpEmailData:o,setOtpEmailData:e}){var h,v,f,w,W;let{crossmintAuth:t}=F(),{appearance:r,setDialogOpen:a,setStep:i,setError:c}=P(),[n,x]=dt(""),[l,y]=dt(!1),[g,p]=dt(!1),d=()=>C(this,null,function*(){var A,L;p(!0);try{let j=yield t==null?void 0:t.confirmEmailOtp((A=o==null?void 0:o.email)!=null?A:"",(L=o==null?void 0:o.emailId)!=null?L:"",n);yield t==null?void 0:t.handleRefreshAuthMaterial(j),a(!1,!0),i("initial")}catch(j){console.error("Error confirming email OTP",j),c("Invalid code. Please try again."),y(!0)}finally{p(!1)}}),u=()=>C(this,null,function*(){var A;try{yield t==null?void 0:t.sendEmailOtp((A=o==null?void 0:o.email)!=null?A:"")}catch(L){c("Failed to resend code. Please try again.")}});return V(uo,{children:[b(J,{onClick:()=>{i("initial"),e(null)},iconColor:(h=r==null?void 0:r.colors)==null?void 0:h.textPrimary,ringColor:(v=r==null?void 0:r.colors)==null?void 0:v.accent}),V(mo,{children:[b(po,{children:b(At,{customAccentColor:(f=r==null?void 0:r.colors)==null?void 0:f.accent,customButtonBackgroundColor:(w=r==null?void 0:r.colors)==null?void 0:w.buttonBackground,customBackgroundColor:(W=r==null?void 0:r.colors)==null?void 0:W.background})}),b(fo,{appearance:r,children:"Check your email"}),V(go,{appearance:r,children:["A temporary login code has been sent to",b("br",{}),o!=null&&o.email?b("strong",{children:o.email}):"your email address"]}),b(ho,{children:b(bt,{maxLength:6,value:n,onChange:A=>{x(A),y(!1),c(null)},onComplete:d,disabled:g,appearance:r,children:V(St,{children:[b(Q,{index:0,hasError:l}),b(Q,{index:1,hasError:l}),b(Q,{index:2,hasError:l}),b(Q,{index:3,hasError:l}),b(Q,{index:4,hasError:l}),b(Q,{index:5,hasError:l})]})})}),V(xo,{appearance:r,children:["Can't find the email? Check spam folder.",b("br",{}),"Some emails may take several minutes to arrive."]}),b(wt,{initialSeconds:60,appearance:r,countdownText:A=>`Re-send code in ${A}s`,countdownCompleteText:"Re-send code",handleOnClick:u})]})]})}export{Qt as a,Ut as b,$ as c,Mt as d,jt as e,_t as f,Nt as g,Kt as h,Vt as i,Xt as j,Yt as k,et as l,ne as m,pt as n,Fn as o,F as p,Dt as q,Nn as r,Kn as s};
|
package/dist/chunk-BR77Q3PK.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _authkit = require('@farcaster/auth-kit');var _jsxruntime = require('react/jsx-runtime');function c({baseUrl:t,children:i}){let e={rpcUrl:"https://mainnet.optimism.io",domain:new URL(t).hostname.replace(/^www\./,""),siweUri:`${t}api/2024-09-26/session/sdk/auth/authenticate`};return _jsxruntime.jsx.call(void 0, _authkit.AuthKitProvider,{config:e,children:i})}exports.a = c;
|
package/dist/chunk-GSVZY7YL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk-2ZE6WGPX.js";var i=o;export{i as a};
|
package/dist/chunk-JSNUJJQJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{AuthKitProvider as r}from"@farcaster/auth-kit";import{jsx as o}from"react/jsx-runtime";function s({baseUrl:t,children:i}){let e={rpcUrl:"https://mainnet.optimism.io",domain:new URL(t).hostname.replace(/^www\./,""),siweUri:`${t}api/2024-09-26/session/sdk/auth/authenticate`};return o(r,{config:e,children:i})}export{s as a};
|
package/dist/chunk-KXIAPJK6.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk73XVCYPHcjs = require('./chunk-73XVCYPH.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');function b(n){let[e,c]=_react.useState.call(void 0, null),[d,f]=_react.useState.call(void 0, 0),a=_react.useRef.call(void 0, null),{crossmint:h}=_clientsdkreactbase.useCrossmint.call(void 0, ),l=_chunk73XVCYPHcjs.a.call(void 0, h,{usageOrigin:"client"}),m=_clientsdkbase.createPaymentMethodManagementService.call(void 0, {apiClient:l});return _react.useEffect.call(void 0, ()=>{let t=a.current;!t||e||c(m.iframe.createClient(t))},[a.current,e]),_react.useEffect.call(void 0, ()=>{if(e!=null)return e.on("ui:height.changed",t=>f(t.height)),e.on("payment-method:selected",t=>{var r;return(r=n.onPaymentMethodSelected)==null?void 0:r.call(n,t)}),e.on("order-intent:created",t=>{var r;(r=n.onOrderIntentCreated)==null||r.call(n,t.orderIntent,t.verificationConfig)}),()=>{e.off("ui:height.changed"),e.off("payment-method:selected"),e.off("order-intent:created")}},[e]),_jsxruntime.jsx.call(void 0, "iframe",{ref:a,src:m.iframe.getUrl(n),id:"crossmint-payment-method-management.iframe",role:"crossmint-payment-method-management.iframe",allow:"payment *; microphone; camera",style:{boxShadow:"none",border:"none",padding:"0px",width:"100%",minWidth:"100%",overflow:"hidden",display:"block",userSelect:"none",transform:"translate(0px)",opacity:"1",transition:"ease 0s, opacity 0.4s ease 0.1s",height:`${d}px`,backgroundColor:"transparent"}})}exports.a = b;
|
package/dist/chunk-XZJJ2NDY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as d,d as a}from"./chunk-PXDN3KFO.js";import{useBtAi as c,BtAiProvider as f}from"@basis-theory-ai/react";import{useEffect as u,useCallback as y}from"react";import{jsx as I}from"react/jsx-runtime";function b(t){return I(f,{jwt:t.config.btJwt,environment:t.config.environment,children:I(P,d({},t))})}function P({config:t,orderIntent:i,onVerificationComplete:n,onVerificationError:e}){let{verifyPurchaseIntent:o}=c(),s=y(()=>a(this,null,function*(){try{let r=yield o(t.btProjectId,i.payment.externalOrderIntentId);n==null||n(r)}catch(r){e==null||e(r)}}),[o,t.btProjectId,i.orderIntentId,n,e]);return u(()=>{s()},[s]),null}export{b as a};
|