@crossmint/client-sdk-react-ui 2.5.11 → 2.6.1
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-25H3TIZC.cjs +1 -0
- package/dist/{chunk-WTFE475B.js → chunk-3CFNQJJP.js} +1 -1
- package/dist/{chunk-WHUNYZQD.js → chunk-4HSZ5QA3.js} +1 -1
- package/dist/chunk-6SBTKAH5.js +1 -0
- package/dist/{chunk-LAJPUUTU.js → chunk-7QHXEG2B.js} +1 -1
- package/dist/{chunk-ULZFU6FH.js → chunk-7YFDEKIS.js} +1 -1
- package/dist/chunk-AJMHVVST.js +0 -0
- package/dist/{chunk-TQFETWXB.js → chunk-ANYQCOAS.js} +1 -2
- package/dist/{chunk-NOV4WKFA.js → chunk-AZ72RWXJ.js} +1 -1
- package/dist/chunk-CJIGM5NM.cjs +11 -0
- package/dist/{chunk-ETXV2PGP.cjs → chunk-D6U5UVY5.cjs} +1 -1
- package/dist/{chunk-RUOPTNMB.js → chunk-EDALLTZG.js} +1 -1
- package/dist/{chunk-L6XM2WBD.cjs → chunk-EIZTL5ZR.cjs} +1 -1
- package/dist/{chunk-VFP74OBW.js → chunk-EQZT3BNQ.js} +1 -1
- package/dist/{chunk-OIOJYRRW.js → chunk-ETAEFFCS.js} +1 -1
- package/dist/{chunk-OZFB444X.cjs → chunk-GRQTI7FW.cjs} +1 -1
- package/dist/{chunk-VNEMKR3Q.cjs → chunk-GS26S4PZ.cjs} +1 -1
- package/dist/{chunk-CD6E2BGD.cjs → chunk-GTOPYCJZ.cjs} +1 -1
- package/dist/chunk-H322H5U4.js +0 -0
- package/dist/{chunk-ZLROMXSY.js → chunk-HDMQDMYK.js} +1 -1
- package/dist/{chunk-PC74ALET.cjs → chunk-HNV3LB4A.cjs} +1 -1
- package/dist/chunk-HPQWNC3N.js +1 -0
- package/dist/{chunk-R3NRAEQ6.cjs → chunk-HW3C6SZ3.cjs} +1 -1
- package/dist/{chunk-YAHXNHDL.cjs → chunk-HY343EBZ.cjs} +1 -1
- package/dist/{chunk-B7XUVQ2G.cjs → chunk-HYTK6Q53.cjs} +1 -1
- package/dist/{chunk-PXXFGGF5.js → chunk-IYXBLWD6.js} +1 -1
- package/dist/{chunk-ZMGWLGIG.cjs → chunk-K4PQLDMB.cjs} +66 -67
- package/dist/chunk-L4GNBTZ2.js +11 -0
- package/dist/{chunk-N2FP2XTI.cjs → chunk-M2ROWHEX.cjs} +1 -2
- package/dist/{chunk-QVM6WPJU.cjs → chunk-MT6VKH35.cjs} +1 -1
- package/dist/chunk-N6VR4G4F.js +1 -0
- package/dist/{chunk-ROR436KN.cjs → chunk-NBKAOA6M.cjs} +1 -1
- package/dist/{chunk-QK65AMJQ.js → chunk-NOJYXLE6.js} +2 -2
- package/dist/chunk-OVF2O2K6.cjs +1 -0
- package/dist/chunk-P6L63A7R.js +1 -0
- package/dist/{chunk-VLBYZIVH.js → chunk-RBJONDY6.js} +69 -70
- package/dist/{chunk-3WYCPRI3.js → chunk-SYXEPOIS.js} +1 -1
- package/dist/chunk-TRJUDJBN.cjs +1 -0
- package/dist/{chunk-FEJYV47D.cjs → chunk-UW7D7KRK.cjs} +1 -1
- package/dist/{chunk-7FK25E6E.cjs → chunk-W2SHS5OF.cjs} +1 -1
- package/dist/{chunk-WNQJ5UVX.js → chunk-XHWTQ4PQ.js} +1 -1
- package/dist/chunk-Y6ECDD2W.cjs +1 -0
- package/dist/{chunk-PAEAGEX7.cjs → chunk-Z74ZQMXU.cjs} +1 -1
- package/dist/chunk-ZWOTV25D.cjs +1 -0
- 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/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 +1 -1
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +1 -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/card-management/CrossmintPaymentMethodManagement.cjs +1 -0
- package/dist/components/card-management/CrossmintPaymentMethodManagement.d.cts +6 -0
- package/dist/components/card-management/CrossmintPaymentMethodManagement.d.ts +6 -0
- package/dist/components/card-management/CrossmintPaymentMethodManagement.js +1 -0
- package/dist/components/card-management/CrossmintPaymentMethodManagementIFrame.cjs +1 -0
- package/dist/components/card-management/CrossmintPaymentMethodManagementIFrame.d.cts +6 -0
- package/dist/components/card-management/CrossmintPaymentMethodManagementIFrame.d.ts +6 -0
- package/dist/components/card-management/CrossmintPaymentMethodManagementIFrame.js +1 -0
- package/dist/components/card-management/index.cjs +1 -0
- package/dist/components/card-management/index.d.cts +3 -0
- package/dist/components/card-management/index.d.ts +3 -0
- package/dist/components/card-management/index.js +1 -0
- package/dist/components/common/OAuthButton.cjs +1 -1
- package/dist/components/common/OAuthButton.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/PayerConnectionHandler.cjs +1 -1
- package/dist/components/embed/v3/crypto/PayerConnectionHandler.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 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/signers/BaseCodeInput.cjs +1 -1
- package/dist/components/signers/BaseCodeInput.js +1 -1
- 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 -0
- package/dist/components/wallets/ExportPrivateKeyButton.d.cts +9 -0
- package/dist/components/wallets/ExportPrivateKeyButton.d.ts +9 -0
- package/dist/components/wallets/ExportPrivateKeyButton.js +1 -0
- package/dist/components/wallets/index.cjs +1 -0
- package/dist/components/wallets/index.d.cts +3 -0
- package/dist/components/wallets/index.d.ts +3 -0
- package/dist/components/wallets/index.js +1 -0
- 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 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/providers/CrossmintAuthProvider.cjs +1 -1
- package/dist/providers/CrossmintAuthProvider.js +1 -1
- package/dist/providers/CrossmintWalletProvider.cjs +1 -1
- package/dist/providers/CrossmintWalletProvider.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 +1 -1
- package/dist/providers/dynamic/DynamicWalletProvider.js +1 -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 +6 -6
- package/dist/chunk-5X3MPD2V.js +0 -1
- package/dist/chunk-QLPV72AE.cjs +0 -1
- package/dist/chunk-SPO2RJZH.js +0 -1
- /package/dist/{chunk-QI37PBS5.cjs → chunk-2PVYNZP7.cjs} +0 -0
- /package/dist/{chunk-3BUVHV54.js → chunk-35TG4MVY.js} +0 -0
- /package/dist/{chunk-S73E6EBO.cjs → chunk-7QY27V3R.cjs} +0 -0
- /package/dist/{chunk-5MZTUSMQ.js → chunk-QVXTNSBH.js} +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{r as l,s as c}from"./chunk-RBJONDY6.js";import{a as p}from"./chunk-DFSB3TWF.js";import{d as s}from"./chunk-PXDN3KFO.js";import{useState as u,useCallback as x,useRef as b,useEffect as w}from"react";import y from"@emotion/styled";import{environmentUrlConfig as E,exportSignerInboundEvents as h,exportSignerOutboundEvents as v}from"@crossmint/client-signers";import{validateAPIKey as U}from"@crossmint/common-sdk-base";import{isExportableSigner as m}from"@crossmint/wallets-sdk";import{IFrameWindow as P,SignersWindowTransport as I}from"@crossmint/client-sdk-window";import{jsx as S}from"react/jsx-runtime";var K=y.iframe`
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 56px;
|
|
4
|
+
border: 1px solid ${o=>{var r,t;return((t=(r=o.appearance)==null?void 0:r.colors)==null?void 0:t.border)||p["cm-border"]}};
|
|
5
|
+
border-radius: ${o=>{var r;return((r=o.appearance)==null?void 0:r.borderRadius)||"12px"}};
|
|
6
|
+
background: transparent;
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 0;
|
|
9
|
+
outline: none;
|
|
10
|
+
box-shadow: none;
|
|
11
|
+
`;function A({appearance:o}){let{wallet:r}=c(),{crossmint:t}=l(),i=b(null),[n,d]=u("");w(()=>{if(t!=null)try{let e=U(t.apiKey);if(e.isValid){let g=E[e.environment],a=new URL(`${g}/export`);a.searchParams.set("targetOrigin",window.location.origin),d(a.toString())}}catch(e){console.error("Failed to get TEE URL:",e)}},[t]);let f=x(()=>s(this,null,function*(){if(!(r==null||i.current==null))try{if(m(r.signer)){let e=yield P.init(i.current,{targetOrigin:new URL(n).origin,incomingEvents:v,outgoingEvents:h},I);yield e.handshakeWithChild(),yield r.signer._exportPrivateKey(e)}}catch(e){console.error("Failed to export private key:",e)}}),[r,n]);return n.toString()===""||r==null||!m(r.signer)?null:S(K,{ref:i,src:n.toString(),appearance:o,title:"Export Private Key",allow:"clipboard-write",onLoad:f})}export{A as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkDJZOP4MTcjs = require('./chunk-DJZOP4MT.cjs');var _chunkAHMPKIEYcjs = require('./chunk-AHMPKIEY.cjs');var _chunkS4BKL6MRcjs = require('./chunk-S4BKL6MR.cjs');var _chunk3X24JZVGcjs = require('./chunk-3X24JZVG.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunkNRN4WNQLcjs = require('./chunk-NRN4WNQL.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _color = require('color'); var _color2 = _interopRequireDefault(_color);var _jsxruntime = require('react/jsx-runtime');var z=_styled2.default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: center;
|
|
@@ -64,7 +64,6 @@
|
|
|
64
64
|
display: flex;
|
|
65
65
|
align-items: center;
|
|
66
66
|
padding-right: 16px;
|
|
67
|
-
aspect-ratio: 1/1;
|
|
68
67
|
`,M=_styled2.default.button`
|
|
69
68
|
${_chunk3X24JZVGcjs.a}
|
|
70
69
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkO3H2EYFAcjs = require('./chunk-O3H2EYFA.cjs');var _chunkSCHRLC2Icjs = require('./chunk-SCHRLC2I.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunkQYQERFYLcjs = require('./chunk-QYQERFYL.cjs');var _chunkVI6TW7JTcjs = require('./chunk-VI6TW7JT.cjs');var _chunkTWX7ZBKZcjs = require('./chunk-TWX7ZBKZ.cjs');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _jsxruntime = require('react/jsx-runtime');var v=_styled2.default.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-P6L63A7R.js";import{a as t}from"./chunk-PXDN3KFO.js";import{jsx as m}from"react/jsx-runtime";function s(n){return m(e,t({},n))}export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUW7D7KRKcjs = require('./chunk-UW7D7KRK.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');function n(r){_clientsdkbase.assertValidValidateNFTDetailProps.call(void 0, r);let o=_clientsdkbase.getNFTDetailSrc.call(void 0, r,_chunkUW7D7KRKcjs.a);return _jsxruntime.jsx.call(void 0, "iframe",{src:o,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-details"})}exports.a = n;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as y}from"./chunk-RV2X7AFS.js";import{a as f}from"./chunk-UG5R7IPH.js";import{a}from"./chunk-DFSB3TWF.js";import{a as l}from"./chunk-OOLXYAO7.js";import{a as C}from"./chunk-77PBG2JJ.js";import{a as g}from"./chunk-HVZ5M3FY.js";import r from"@emotion/styled";import{Fragment as R,jsx as t,jsxs as i}from"react/jsx-runtime";var v=r.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -95,4 +95,4 @@ import{a as g}from"./chunk-UG5R7IPH.js";import{a as y}from"./chunk-RV2X7AFS.js";
|
|
|
95
95
|
&:hover {
|
|
96
96
|
opacity: 0.8;
|
|
97
97
|
}
|
|
98
|
-
`;function p({title:o,content:e,primaryButton:n,secondaryAction:k,open:h,appearance:c}){var m;return t(y,{open:h,appearance:c,showCloseButton:!1,children:i(v,{children:[t(P,{children:t(
|
|
98
|
+
`;function p({title:o,content:e,primaryButton:n,secondaryAction:k,open:h,appearance:c}){var m;return t(y,{open:h,appearance:c,showCloseButton:!1,children:i(v,{children:[t(P,{children:t(g,{appearance:c})}),t(b,{children:t(w,{appearance:c,children:o})}),t(B,{children:t(T,{appearance:c,children:e})}),i(I,{children:[n,k]}),t(S,{children:t(f,{color:(m=c==null?void 0:c.colors)==null?void 0:m.textSecondary})})]})})}var s=({appearance:o,onClick:e,children:n})=>i(A,{appearance:o,onClick:e,children:[t(F,{appearance:o,children:n}),t($,{children:n})]});function E({state:o,appearance:e}){if(!o.open||o.type==null)return null;switch(o.type){case"create-wallet":return t(p,{open:o.open,title:"Create Your Wallet",appearance:e,content:i(R,{children:[t(U,{children:"You're about to create a wallet."}),i(x,{children:[i(d,{children:[t(u,{children:t(C,{})}),"Your wallet will be secured with a passkey"]}),i(d,{children:[t(u,{children:t(l,{})}),"Your device will ask you for your fingerprint, face, or screen lock to set it up"]})]})]}),primaryButton:t(s,{appearance:e,onClick:o.primaryActionOnClick,children:"Create Wallet"})});case"create-wallet-error":return t(p,{open:o.open,title:"Wallet Creation Failed",appearance:e,content:t("div",{children:"We couldn't create your wallet. This could be due to rejecting the request, a timeout, or not having access to your passkey on this device."}),primaryButton:t(s,{appearance:e,onClick:o.primaryActionOnClick,children:"Try again"})});case"transaction":return t(p,{open:o.open,title:"Use Your Wallet",appearance:e,content:t(x,{children:i(d,{children:[t(u,{children:t(l,{})}),t("span",{children:"Your device will ask you for your fingerprint, face, or screen lock to authorize this action."})]})}),primaryButton:t(s,{appearance:e,onClick:o.primaryActionOnClick,children:"Use Wallet"})});case"transaction-error":return t(p,{open:o.open,title:"Wallet Access Failed",appearance:e,content:t("div",{children:"We couldn't access your wallet. This could be due to rejecting the request, a timeout, or not having access to your passkey on this device."}),primaryButton:t(s,{appearance:e,onClick:o.primaryActionOnClick,children:"Try again"}),secondaryAction:t(L,{href:"https://docs.crossmint.com/wallets/signers-and-custody#passkey",rel:"noopener noreferrer",target:"_blank",appearance:e,children:"Troubleshoot"})});case"not-supported":return t(p,{open:o.open,title:"Passkeys Not Supported on This Device",appearance:e,content:t("div",{children:"To access your wallet with a passkey, switch to a device or browser that supports passkeys, such as Chrome or Safari on a smartphone, tablet, or modern computer"}),primaryButton:t(s,{appearance:e,onClick:o.primaryActionOnClick,children:"Understood"})});default:return null}}export{E as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-XHWTQ4PQ.js";import{createPaymentMethodManagementService as p}from"@crossmint/client-sdk-base";import{useCrossmint as d}from"@crossmint/client-sdk-react-base";import{useEffect as o,useRef as g,useState as m}from"react";import{jsx as u}from"react/jsx-runtime";function S(i){let[e,s]=m(null),[c,h]=m(0),n=g(null),{crossmint:l}=d(),f=a(l,{usageOrigin:"client"}),r=p({apiClient:f});return o(()=>{let t=n.current;!t||e||s(r.iframe.createClient(t))},[n.current,e]),o(()=>{if(e!=null)return e.on("ui:height.changed",t=>h(t.height)),()=>{e.off("ui:height.changed")}},[e]),u("iframe",{ref:n,src:r.iframe.getUrl(i),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:`${c}px`,backgroundColor:"transparent"}})}export{S as a};
|
|
@@ -1,48 +1,4 @@
|
|
|
1
|
-
import{a as Tt}from"./chunk-LI7QMYLA.js";import{b as ht}from"./chunk-4KDASQO6.js";import{a as
|
|
2
|
-
.wallet-list__scroll-container { padding: 0px !important; }
|
|
3
|
-
.wallet-list__search-container { padding-left: 0px !important; padding-right: 0px !important; }
|
|
4
|
-
.dynamic-footer { display: none !important; }
|
|
5
|
-
h1 { color: ${(d=a==null?void 0:a.colors)==null?void 0:d.textPrimary} !important; }
|
|
6
|
-
* { 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=zt(()=>{if(e)return r.includes("web3:evm-only")?[jt]:r.includes("web3:solana-only")?[Gt]:[jt,Gt]},[e,r]);return _t(gt,{apiKeyEnvironment:t,settings:{walletConnectors:y,cssOverrides:l,events:{onAuthFailure(d,u){console.error("[DynamicWalletProvider] onAuthFailure",d,u)}},handlers:{handleConnectedWallet:d=>w(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 C=yield(m=d.connector)==null?void 0:m.proveOwnership(u,f.challenge);if(C==null)throw new Error("Failed to get signature from wallet");let W=C;if(v==="solana"){let L=Buffer.from(C,"base64");W=Pe.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:_t(be,{enabled:e,onSdkLoaded:i,onWalletConnected:c,jwt:x,children:o})},`${t}-${r.join(",")}`)}import{Fragment as Kt,jsx as T,jsxs as Qt}from"react/jsx-runtime";var We={crossmintAuth:void 0,login:()=>{},logout:()=>{},jwt:void 0,user:void 0,status:"initializing",getUser:()=>{},experimental_externalWalletSigner:void 0,experimental_loginWithOAuth:()=>Promise.resolve(),loginMethods:[]},at=Oe(We);function Te({children:o,appearance:e,termsOfServiceText:t,prefetchOAuthUrls:r=!0,authModalTitle:a,onLoginSuccess:i,loginMethods:c=["email","google"]}){let n=Nt(),{crossmint:x,experimental_setCustomAuth:l,experimental_customAuth:y}=Ie("CrossmintAuthProvider must be used within CrossmintProvider"),g=ke(x.apiKey),[p,d]=tt(!1),[u,m]=tt(void 0),[h,v]=tt(!0),f=c.some(I=>I.startsWith("web3")),[C,W]=tt(void 0),A=Ee(null);it(()=>{var I,G;n.jwt==null&&(y==null?void 0:y.jwt)!=null&&l(void 0),C!=null||((I=n.user)==null?void 0:I.email)!=null?l({jwt:n.jwt,email:(G=n.user)==null?void 0:G.email,externalWalletSigner:C}):l({jwt:n.jwt})},[C,n.jwt,n.user,l,y]),it(()=>{n.jwt!=null&&p&&d(!1)},[n.jwt,p]);let L=et(I=>{if(n.jwt!=null){console.log("User already logged in");return}I!=null&&typeof I=="string"&&m(I),d(!0)},[n.jwt]),j=et(()=>n.status==="initializing"||f&&!h?"initializing":n.jwt!=null?"logged-in":p?"in-progress":"logged-out",[n.status,n.jwt,f,h,p]),ft=et(I=>w(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=Se(()=>R(B({},n),{login:L,status:j(),experimental_externalWalletSigner:C,experimental_loginWithOAuth:ft,loginMethods:c}),[n,L,j,C,ft,c]);return T(at.Provider,{value:se,children:T(Pt,{setDialogOpen:(I,G)=>{d(I),G&&(i==null||i())},initialState:{appearance:e,loginMethods:c,termsOfServiceText:t,authModalTitle:a,baseUrl:g,defaultEmail:u},children:T(Mt,{prefetchOAuthUrls:j()==="logged-out"&&r,children:T(Ue,{loginWithOAuthRef:A,children:f?Qt(Ht,{apiKeyEnvironment:x.apiKey.includes("production")?"production":"staging",loginMethods:c,appearance:e,onSdkLoaded:v,onWalletConnected:W,children:[o,T(ot,{open:p})]}):Qt(Kt,{children:[o,T(ot,{open:p})]})})})})})}function Ue({children:o,loginWithOAuthRef:e}){let{startOAuthLogin:t}=$(),r=Nt(),a=et(i=>w(this,null,function*(){if(r.jwt!=null){console.log("User already logged in");return}yield t(i)}),[r.jwt,t]);return it(()=>{e.current=a},[a,e]),T(Kt,{children:o})}function tr({children:o,appearance:e,termsOfServiceText:t,prefetchOAuthUrls:r=!0,authModalTitle:a,onLoginSuccess:i,loginMethods:c=["email","google"],refreshRoute:n,logoutRoute:x}){return T(Fe,{onLoginSuccess:i,refreshRoute:n,logoutRoute:x,children:T(Te,{onLoginSuccess:i,appearance:e,termsOfServiceText:t,prefetchOAuthUrls:r,authModalTitle:a,loginMethods:c,children:o})})}function F(){let o=Le(at);if(o==null)throw new Error("useCrossmintAuth must be used within a CrossmintAuthProvider");return o}var Dt=F;import{jsx as b,jsxs as K}from"react/jsx-runtime";var Be=M.div`
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
`,Re=M.div`
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
align-items: center;
|
|
13
|
-
justify-content: flex-start;
|
|
14
|
-
width: 100%;
|
|
15
|
-
`,$e=M.div`
|
|
16
|
-
position: relative;
|
|
17
|
-
left: 12px;
|
|
18
|
-
`,Me=M.p`
|
|
19
|
-
font-size: 16px;
|
|
20
|
-
font-weight: 400;
|
|
21
|
-
margin: 16px 0 4px 0;
|
|
22
|
-
text-align: center;
|
|
23
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||s["cm-text-primary"]}};
|
|
24
|
-
`,De=M.p`
|
|
25
|
-
text-align: center;
|
|
26
|
-
padding: 0 16px;
|
|
27
|
-
margin: 0;
|
|
28
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||s["cm-text-secondary"]}};
|
|
29
|
-
font-size: 14px;
|
|
30
|
-
line-height: 1.4;
|
|
31
|
-
`,ze=M.div`
|
|
32
|
-
padding: 32px 0;
|
|
33
|
-
`,Q=M(Ot)`
|
|
34
|
-
@media (max-width: 379px) {
|
|
35
|
-
width: 40px;
|
|
36
|
-
height: 56px;
|
|
37
|
-
font-size: 28px;
|
|
38
|
-
margin: 0;
|
|
39
|
-
}
|
|
40
|
-
`,je=M.div`
|
|
41
|
-
font-size: 12px;
|
|
42
|
-
line-height: 1.3;
|
|
43
|
-
text-align: center;
|
|
44
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||s["cm-text-secondary"]}};
|
|
45
|
-
`;function Vt({otpEmailData:o,setOtpEmailData:e}){var h,v,f,C,W;let{crossmintAuth:t}=F(),{appearance:r,setDialogOpen:a,setStep:i,setError:c}=P(),[n,x]=lt(""),[l,y]=lt(!1),[g,p]=lt(!1),d=()=>w(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=()=>w(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 K(Be,{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}),K(Re,{children:[b($e,{children:b(At,{customAccentColor:(f=r==null?void 0:r.colors)==null?void 0:f.accent,customButtonBackgroundColor:(C=r==null?void 0:r.colors)==null?void 0:C.buttonBackground,customBackgroundColor:(W=r==null?void 0:r.colors)==null?void 0:W.background})}),b(Me,{appearance:r,children:"Check your email"}),K(De,{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(ze,{children:b(bt,{maxLength:6,value:n,onChange:A=>{x(A),y(!1),c(null)},onComplete:d,disabled:g,appearance:r,children:K(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})]})})}),K(je,{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})]})]})}import{useState as ct}from"react";import Jt from"color";import D from"@emotion/styled";import{isEmailValid as ut}from"@crossmint/common-sdk-auth";import qt from"@emotion/styled";import{jsx as st,jsxs as He}from"react/jsx-runtime";var Ge=qt.button`
|
|
1
|
+
import{a as Tt}from"./chunk-LI7QMYLA.js";import{a as Ft}from"./chunk-JSNUJJQJ.js";import{b as ht}from"./chunk-4KDASQO6.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-AC2SJG3Q.js";import{a as P,b as Pt}from"./chunk-2F3UEXTE.js";import{a as Wt}from"./chunk-KFFPM6JM.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 xt,b as yt,c as Ct}from"./chunk-RV2X7AFS.js";import{a as It}from"./chunk-UG5R7IPH.js";import{a as N}from"./chunk-NZUCXN2O.js";import{a as s}from"./chunk-DFSB3TWF.js";import{a as kt}from"./chunk-UHFCB2EY.js";import{a as Y}from"./chunk-OAHZHKRR.js";import{a as X}from"./chunk-UAFW3OWA.js";import{a as At}from"./chunk-C3JRTLQP.js";import{a as B,b as R,c as q,d as w}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)=>w(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=>w(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(()=>w(this,null,function*(){x(!0);try{let h=(r||[]).filter(f=>f in Rt).map(f=>w(this,null,function*(){let C=yield t==null?void 0:t.getOAuthUrl(f);return{[f]:C}})),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)=>w(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`
|
|
46
2
|
${N}
|
|
47
3
|
|
|
48
4
|
display: flex;
|
|
@@ -65,28 +21,28 @@ import{a as Tt}from"./chunk-LI7QMYLA.js";import{b as ht}from"./chunk-4KDASQO6.js
|
|
|
65
21
|
outline: none;
|
|
66
22
|
background-color: theme["cm-hover"];
|
|
67
23
|
}
|
|
68
|
-
`,
|
|
24
|
+
`,ve=zt.span`
|
|
69
25
|
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||s["cm-accent"]}};
|
|
70
26
|
font-size: 14px;
|
|
71
27
|
font-weight: 400;
|
|
72
|
-
`;function
|
|
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`
|
|
73
29
|
display: flex;
|
|
74
30
|
flex-direction: column;
|
|
75
31
|
align-items: flex-start;
|
|
76
32
|
justify-content: flex-start;
|
|
77
33
|
width: 100%;
|
|
78
34
|
border-radius: 8px;
|
|
79
|
-
`,
|
|
35
|
+
`,be=M.div`
|
|
80
36
|
width: 100%;
|
|
81
|
-
`,
|
|
37
|
+
`,Se=M.label`
|
|
82
38
|
display: block;
|
|
83
39
|
margin-bottom: 5px;
|
|
84
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"]}};
|
|
85
41
|
font-size: 14px;
|
|
86
42
|
font-weight: 400;
|
|
87
|
-
`,
|
|
43
|
+
`,Oe=M.form`
|
|
88
44
|
position: relative;
|
|
89
|
-
`,
|
|
45
|
+
`,Ee=M.input`
|
|
90
46
|
${N}
|
|
91
47
|
|
|
92
48
|
/* Base input styles */
|
|
@@ -112,14 +68,14 @@ import{a as Tt}from"./chunk-LI7QMYLA.js";import{b as ht}from"./chunk-4KDASQO6.js
|
|
|
112
68
|
|
|
113
69
|
&:focus {
|
|
114
70
|
outline: none;
|
|
115
|
-
box-shadow: 0 0 0 2px ${o=>{var e,t;return new
|
|
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()}};
|
|
116
72
|
}
|
|
117
73
|
|
|
118
74
|
&:read-only {
|
|
119
75
|
cursor: not-allowed;
|
|
120
76
|
opacity: 0.7;
|
|
121
77
|
}
|
|
122
|
-
`,
|
|
78
|
+
`,ke=M.div`
|
|
123
79
|
position: absolute;
|
|
124
80
|
right: 0;
|
|
125
81
|
top: 0;
|
|
@@ -127,8 +83,7 @@ import{a as Tt}from"./chunk-LI7QMYLA.js";import{b as ht}from"./chunk-4KDASQO6.js
|
|
|
127
83
|
display: flex;
|
|
128
84
|
align-items: center;
|
|
129
85
|
padding-right: 16px;
|
|
130
|
-
|
|
131
|
-
`,Je=D.button`
|
|
86
|
+
`,Ie=M.button`
|
|
132
87
|
${N}
|
|
133
88
|
|
|
134
89
|
font-weight: 500;
|
|
@@ -152,30 +107,30 @@ import{a as Tt}from"./chunk-LI7QMYLA.js";import{b as ht}from"./chunk-4KDASQO6.js
|
|
|
152
107
|
}
|
|
153
108
|
|
|
154
109
|
&:not(:disabled):focus-visible {
|
|
155
|
-
box-shadow: 0 0 0 2px ${o=>{var e,t;return new
|
|
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()}};
|
|
156
111
|
}
|
|
157
|
-
`,
|
|
112
|
+
`,Fe=M.p`
|
|
158
113
|
font-size: 12px;
|
|
159
114
|
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)||s["cm-danger"]}};
|
|
160
115
|
margin: 8px 0 8px 0;
|
|
161
|
-
`;function
|
|
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 w(this,null,function*(){f.preventDefault(),p(!0);try{let C=n.trim().toLowerCase(),W=yield e==null?void 0:e.sendEmailOtp(C);o({email:C,emailId:W.emailId}),a("otp")}catch(C){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`
|
|
162
117
|
display: flex;
|
|
163
118
|
flex-direction: column;
|
|
164
119
|
align-items: center;
|
|
165
120
|
gap: 16px;
|
|
166
|
-
|
|
121
|
+
`,$e=D.div`
|
|
167
122
|
text-align: center;
|
|
168
|
-
`,
|
|
123
|
+
`,Me=D.h3`
|
|
169
124
|
font-size: 18px;
|
|
170
125
|
font-weight: 600;
|
|
171
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"]}};
|
|
172
127
|
margin: 0 0 8px 0;
|
|
173
|
-
`,
|
|
128
|
+
`,De=D.p`
|
|
174
129
|
font-size: 16px;
|
|
175
130
|
font-weight: 400;
|
|
176
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"]}};
|
|
177
132
|
margin: 0;
|
|
178
|
-
`,
|
|
133
|
+
`,ze=D.div`
|
|
179
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"]}};
|
|
180
135
|
aspect-ratio: 1;
|
|
181
136
|
border-radius: ${o=>{var e;return((e=o.appearance)==null?void 0:e.borderRadius)||"8px"}};
|
|
@@ -183,18 +138,18 @@ import{a as Tt}from"./chunk-LI7QMYLA.js";import{b as ht}from"./chunk-4KDASQO6.js
|
|
|
183
138
|
display: flex;
|
|
184
139
|
align-items: center;
|
|
185
140
|
justify-content: center;
|
|
186
|
-
`,
|
|
141
|
+
`,je=D.div`
|
|
187
142
|
min-height: 246px;
|
|
188
143
|
display: flex;
|
|
189
144
|
align-items: center;
|
|
190
145
|
justify-content: center;
|
|
191
|
-
`,
|
|
146
|
+
`,Ge=D.p`
|
|
192
147
|
font-size: 16px;
|
|
193
148
|
text-align: center;
|
|
194
149
|
font-weight: 400;
|
|
195
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"]}};
|
|
196
151
|
margin: 0;
|
|
197
|
-
`,
|
|
152
|
+
`,_e=D.a`
|
|
198
153
|
font-size: 16px;
|
|
199
154
|
font-weight: 400;
|
|
200
155
|
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textLink)||s["cm-accent"]}};
|
|
@@ -203,7 +158,7 @@ import{a as Tt}from"./chunk-LI7QMYLA.js";import{b as ht}from"./chunk-4KDASQO6.js
|
|
|
203
158
|
&:hover {
|
|
204
159
|
text-decoration: underline;
|
|
205
160
|
}
|
|
206
|
-
`;function
|
|
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=>w(this,null,function*(){a(null);try{let C=yield o==null?void 0:o.signInWithFarcaster(f);yield o==null?void 0:o.handleRefreshAuthMaterial(C),r(!1),t("initial")}catch(C){console.error("Error during Farcaster sign-in:",C),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`
|
|
207
162
|
position: relative;
|
|
208
163
|
padding: 40px 24px 30px 24px;
|
|
209
164
|
display: flex;
|
|
@@ -215,7 +170,7 @@ import{a as Tt}from"./chunk-LI7QMYLA.js";import{b as ht}from"./chunk-4KDASQO6.js
|
|
|
215
170
|
@media (min-width: 480px) {
|
|
216
171
|
padding: 40px 40px 30px 40px;
|
|
217
172
|
}
|
|
218
|
-
`,
|
|
173
|
+
`,Ve=Jt.div`
|
|
219
174
|
display: flex;
|
|
220
175
|
align-items: flex-start;
|
|
221
176
|
justify-content: flex-start;
|
|
@@ -223,9 +178,53 @@ import{a as Tt}from"./chunk-LI7QMYLA.js";import{b as ht}from"./chunk-4KDASQO6.js
|
|
|
223
178
|
padding: 8px;
|
|
224
179
|
gap: 8px;
|
|
225
180
|
margin-top: 34px;
|
|
226
|
-
background-color: ${o=>{var e,t,r;return new
|
|
227
|
-
`;function
|
|
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:`
|
|
228
183
|
p a {
|
|
229
184
|
color: ${(m=(u=t==null?void 0:t.colors)==null?void 0:u.textLink)!=null?m:s["cm-link"]};
|
|
230
185
|
}
|
|
231
|
-
`}),c]}):null,e==="initial"||e==="otp"?E(
|
|
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 w(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=>w(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=>w(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=>w(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 C=yield(m=d.connector)==null?void 0:m.proveOwnership(u,f.challenge);if(C==null)throw new Error("Failed to get signature from wallet");let W=C;if(v==="solana"){let L=Buffer.from(C,"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:()=>{},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")),[C,W]=ot(void 0),A=oo(null);mt(()=>{var I,G;n.jwt==null&&(y==null?void 0:y.jwt)!=null&&l(void 0),C!=null||((I=n.user)==null?void 0:I.email)!=null?l({jwt:n.jwt,email:(G=n.user)==null?void 0:G.email,externalWalletSigner:C}):l({jwt:n.jwt})},[C,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=>w(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:C,experimental_loginWithOAuth:ft,loginMethods:c}),[n,L,j,C,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=>w(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,C,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=()=>w(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=()=>w(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:(C=r==null?void 0:r.colors)==null?void 0:C.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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-HPQWNC3N.js";import{assertValidNFTCollectionViewProps as r,getNFTCollectionViewSrc as t}from"@crossmint/client-sdk-base";import{jsx as n}from"react/jsx-runtime";function w(o){r(o);let i=t(o,e);return n("iframe",{src:i,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-collection-view"})}export{w as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');function m({payer:n,iframeClient:e}){return _react.useEffect.call(void 0, ()=>{if(e==null)return;let c=e.on("crypto:send-transaction",r=>_chunk2WSEHVNPcjs.d.call(void 0, this,[r],function*({chain:o,serializedTransaction:d}){try{yield n.handleChainSwitch(o);let s=yield n.handleSignAndSendTransaction(d),i=s.success?s.txId:"";s.success?e.send("crypto:send-transaction:success",{txId:i}):e.send("crypto:send-transaction:failed",{error:s.errorMessage})}catch(s){console.error("[SignerConnectionHandler] Failed to send transaction",s),e.send("crypto:send-transaction:failed",{error:s.message||"An unknown error occurred"})}})),a=e.on("crypto:sign-message",d=>_chunk2WSEHVNPcjs.d.call(void 0, this,[d],function*({message:o}){try{if(n.handleSignMessage==null)throw new Error("handleSignMessage is not implemented on payer");let r=yield n.handleSignMessage(o);e.send("crypto:sign-message:success",{signature:r});return}catch(r){console.error("[PayerConnectionHandler] failed to sign message",r),e.send("crypto:sign-message:failed",{error:r.message})}}));return()=>{e.off(c),e.off(a)}},[e,n]),null}exports.a = m;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="2.
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="2.6.1";var c=s;exports.a = c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUW7D7KRKcjs = require('./chunk-UW7D7KRK.cjs');var _commonsdkbase = require('@crossmint/common-sdk-base');function C(t,i){return new (0, _commonsdkbase.CrossmintApiClient)(t,{internalConfig:{sdkMetadata:{name:"@crossmint/client-sdk-react-ui",version:_chunkUW7D7KRKcjs.a},apiKeyExpectations:i}})}exports.a = C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-HPQWNC3N.js";import{CrossmintApiClient as e}from"@crossmint/common-sdk-base";function m(t,i){return new e(t,{internalConfig:{sdkMetadata:{name:"@crossmint/client-sdk-react-ui",version:n},apiKeyExpectations:i}})}export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHNV3LB4Acjs = require('./chunk-HNV3LB4A.cjs');var _chunkGS26S4PZcjs = require('./chunk-GS26S4PZ.cjs');var _chunkMT6VKH35cjs = require('./chunk-MT6VKH35.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');var p=m=>()=>{throw new Error(`${m} is not available. Make sure you're using an email or phone signer wallet.`)};function L({children:m,showPasskeyHelpers:P=!0,appearance:d,createOnLogin:e,callbacks:n}){let{experimental_customAuth:i}=_clientsdkreactbase.useCrossmint.call(void 0, ),[F,y]=_react.useState.call(void 0, {open:!1}),[A,c]=_react.useState.call(void 0, !1),[N,j]=_react.useState.call(void 0, "initial"),[q,h]=_react.useState.call(void 0, !1),[O,V]=_react.useState.call(void 0, "initial"),B=_react.useRef.call(void 0, !1),f=_react.useRef.call(void 0, p("sendEmailWithOtp")),S=_react.useRef.call(void 0, p("verifyOtp")),v=_react.useRef.call(void 0, p("sendPhoneWithOtp")),C=_react.useRef.call(void 0, p("verifyPhoneOtp")),t=_react.useRef.call(void 0, p("reject")),T=(e==null?void 0:e.signer.type)==="phone"&&(e==null?void 0:e.signer.phone)!=null?e.signer.phone:i==null?void 0:i.phone,R=(e==null?void 0:e.signer.type)==="email"&&(e==null?void 0:e.signer.email)!=null?e.signer.email:i==null?void 0:i.email,g=_react.useCallback.call(void 0, o=>()=>new Promise(r=>{if(!P){r();return}y({type:o,open:!0,primaryActionOnClick:()=>{y({open:!1}),r()},secondaryActionOnClick:()=>{y({open:!1}),r()}})}),[P]),w=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield f.current(),j("otp")}catch(o){console.error("Failed to send email OTP",o),t.current(new Error("Failed to send email OTP"))}}),I=o=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield S.current(o),c(!1)}catch(r){console.error("Failed to verify OTP",r),t.current(new Error("Failed to verify OTP"))}}),E=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield v.current(),V("otp")}catch(o){console.error("Failed to send phone OTP",o),t.current(new Error("Failed to send phone OTP"))}}),U=o=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield C.current(o),h(!1)}catch(r){console.error("Failed to verify phone OTP",r),t.current(new Error("Failed to verify phone OTP"))}});return _jsxruntime.jsxs.call(void 0, _clientsdkreactbase.CrossmintWalletBaseProvider,{createOnLogin:e,onAuthRequired:(o,r,b,_)=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){(e==null?void 0:e.signer.type)==="phone"&&e.signer.phone?(h(o),v.current=r,C.current=b):(c(o),f.current=r,S.current=b),B.current=o,t.current=_}),callbacks:(()=>{let o=n==null?void 0:n.onWalletCreationStart,r=n==null?void 0:n.onTransactionStart;return(e==null?void 0:e.signer.type)==="passkey"&&P&&(o=g("create-wallet"),r=g("transaction")),{onWalletCreationStart:o,onTransactionStart:r}})(),children:[m,_jsxruntime.jsx.call(void 0, _chunkHNV3LB4Acjs.a,{rejectRef:t,email:R,open:A&&R!=null,setOpen:c,step:N,onSubmitOTP:I,onResendOTPCode:w,onSubmitEmail:w,appearance:d}),_jsxruntime.jsx.call(void 0, _chunkGS26S4PZcjs.a,{rejectRef:t,phone:T,open:q&&T!=null,setOpen:h,step:O,onSubmitOTP:U,onResendOTPCode:E,onSubmitPhone:E,appearance:d}),_jsxruntime.jsx.call(void 0, _chunkMT6VKH35cjs.a,{state:F,appearance:d})]})}exports.a = L;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkW2SHS5OFcjs = require('./chunk-W2SHS5OF.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 I(i){let[e,s]=_react.useState.call(void 0, null),[c,h]=_react.useState.call(void 0, 0),n=_react.useRef.call(void 0, null),{crossmint:l}=_clientsdkreactbase.useCrossmint.call(void 0, ),f=_chunkW2SHS5OFcjs.a.call(void 0, l,{usageOrigin:"client"}),r=_clientsdkbase.createPaymentMethodManagementService.call(void 0, {apiClient:f});return _react.useEffect.call(void 0, ()=>{let t=n.current;!t||e||s(r.iframe.createClient(t))},[n.current,e]),_react.useEffect.call(void 0, ()=>{if(e!=null)return e.on("ui:height.changed",t=>h(t.height)),()=>{e.off("ui:height.changed")}},[e]),_jsxruntime.jsx.call(void 0, "iframe",{ref:n,src:r.iframe.getUrl(i),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:`${c}px`,backgroundColor:"transparent"}})}exports.a = I;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkD6U5UVY5cjs = require('../chunk-D6U5UVY5.cjs');require('../chunk-UW7D7KRK.cjs');require('../chunk-2WSEHVNP.cjs');exports.CrossmintNFTCollectionView = _chunkD6U5UVY5cjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-SYXEPOIS.js";import"../chunk-HPQWNC3N.js";import"../chunk-PXDN3KFO.js";export{a as CrossmintNFTCollectionView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNBKAOA6Mcjs = require('../chunk-NBKAOA6M.cjs');require('../chunk-UW7D7KRK.cjs');require('../chunk-2WSEHVNP.cjs');exports.CrossmintNFTDetail = _chunkNBKAOA6Mcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-EDALLTZG.js";import"../chunk-HPQWNC3N.js";import"../chunk-PXDN3KFO.js";export{a as CrossmintNFTDetail};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkK4PQLDMBcjs = require('../../chunk-K4PQLDMB.cjs');require('../../chunk-NXEC4PED.cjs');require('../../chunk-ZNFOZDZO.cjs');require('../../chunk-UV7TO6A4.cjs');require('../../chunk-BR77Q3PK.cjs');require('../../chunk-PZ3KXKJD.cjs');require('../../chunk-KSUMPQND.cjs');require('../../chunk-6O6IJTQD.cjs');require('../../chunk-XBXL7GMY.cjs');require('../../chunk-GTOPYCJZ.cjs');require('../../chunk-S5QCH2ED.cjs');require('../../chunk-HNUI5756.cjs');require('../../chunk-UMWTEGO6.cjs');require('../../chunk-YCYSZLQ2.cjs');require('../../chunk-Z74ZQMXU.cjs');require('../../chunk-HNV3LB4A.cjs');require('../../chunk-GS26S4PZ.cjs');require('../../chunk-M2ROWHEX.cjs');require('../../chunk-OVJIGWD7.cjs');require('../../chunk-DJZOP4MT.cjs');require('../../chunk-AHMPKIEY.cjs');require('../../chunk-S4BKL6MR.cjs');require('../../chunk-MT6VKH35.cjs');require('../../chunk-O3H2EYFA.cjs');require('../../chunk-SCHRLC2I.cjs');require('../../chunk-YGN7O63X.cjs');require('../../chunk-QHI4DOG7.cjs');require('../../chunk-3X24JZVG.cjs');require('../../chunk-EAWYV5ZO.cjs');require('../../chunk-FQ246XXN.cjs');require('../../chunk-W5RDCN5G.cjs');require('../../chunk-QYQERFYL.cjs');require('../../chunk-VXAHFAP4.cjs');require('../../chunk-EO53B7LL.cjs');require('../../chunk-BPEDL7VV.cjs');require('../../chunk-VI6TW7JT.cjs');require('../../chunk-TWX7ZBKZ.cjs');require('../../chunk-EDALAJ5I.cjs');require('../../chunk-NRN4WNQL.cjs');require('../../chunk-CDQFTAM2.cjs');require('../../chunk-I4GMMHQR.cjs');require('../../chunk-HW3C6SZ3.cjs');require('../../chunk-W2SHS5OF.cjs');require('../../chunk-UW7D7KRK.cjs');require('../../chunk-2WSEHVNP.cjs');exports.AuthForm = _chunkK4PQLDMBcjs.k;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{k as a}from"../../chunk-RBJONDY6.js";import"../../chunk-LI7QMYLA.js";import"../../chunk-ZHPSJCFM.js";import"../../chunk-TQ3JBX7K.js";import"../../chunk-JSNUJJQJ.js";import"../../chunk-4KDASQO6.js";import"../../chunk-LTY4MYLM.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"../../chunk-3CFNQJJP.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-NOJYXLE6.js";import"../../chunk-RV2X7AFS.js";import"../../chunk-UG5R7IPH.js";import"../../chunk-BWCRTWMO.js";import"../../chunk-HGHYGPCN.js";import"../../chunk-NZUCXN2O.js";import"../../chunk-DFSB3TWF.js";import"../../chunk-H34D6PAN.js";import"../../chunk-UHFCB2EY.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-7QHXEG2B.js";import"../../chunk-XHWTQ4PQ.js";import"../../chunk-HPQWNC3N.js";import"../../chunk-PXDN3KFO.js";export{a as AuthForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkK4PQLDMBcjs = require('../../chunk-K4PQLDMB.cjs');require('../../chunk-NXEC4PED.cjs');require('../../chunk-ZNFOZDZO.cjs');require('../../chunk-UV7TO6A4.cjs');require('../../chunk-BR77Q3PK.cjs');require('../../chunk-PZ3KXKJD.cjs');require('../../chunk-KSUMPQND.cjs');require('../../chunk-6O6IJTQD.cjs');require('../../chunk-XBXL7GMY.cjs');require('../../chunk-GTOPYCJZ.cjs');require('../../chunk-S5QCH2ED.cjs');require('../../chunk-HNUI5756.cjs');require('../../chunk-UMWTEGO6.cjs');require('../../chunk-YCYSZLQ2.cjs');require('../../chunk-Z74ZQMXU.cjs');require('../../chunk-HNV3LB4A.cjs');require('../../chunk-GS26S4PZ.cjs');require('../../chunk-M2ROWHEX.cjs');require('../../chunk-OVJIGWD7.cjs');require('../../chunk-DJZOP4MT.cjs');require('../../chunk-AHMPKIEY.cjs');require('../../chunk-S4BKL6MR.cjs');require('../../chunk-MT6VKH35.cjs');require('../../chunk-O3H2EYFA.cjs');require('../../chunk-SCHRLC2I.cjs');require('../../chunk-YGN7O63X.cjs');require('../../chunk-QHI4DOG7.cjs');require('../../chunk-3X24JZVG.cjs');require('../../chunk-EAWYV5ZO.cjs');require('../../chunk-FQ246XXN.cjs');require('../../chunk-W5RDCN5G.cjs');require('../../chunk-QYQERFYL.cjs');require('../../chunk-VXAHFAP4.cjs');require('../../chunk-EO53B7LL.cjs');require('../../chunk-BPEDL7VV.cjs');require('../../chunk-VI6TW7JT.cjs');require('../../chunk-TWX7ZBKZ.cjs');require('../../chunk-EDALAJ5I.cjs');require('../../chunk-NRN4WNQL.cjs');require('../../chunk-CDQFTAM2.cjs');require('../../chunk-I4GMMHQR.cjs');require('../../chunk-HW3C6SZ3.cjs');require('../../chunk-W2SHS5OF.cjs');require('../../chunk-UW7D7KRK.cjs');require('../../chunk-2WSEHVNP.cjs');exports.default = _chunkK4PQLDMBcjs.l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{l as a}from"../../chunk-RBJONDY6.js";import"../../chunk-LI7QMYLA.js";import"../../chunk-ZHPSJCFM.js";import"../../chunk-TQ3JBX7K.js";import"../../chunk-JSNUJJQJ.js";import"../../chunk-4KDASQO6.js";import"../../chunk-LTY4MYLM.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"../../chunk-3CFNQJJP.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-NOJYXLE6.js";import"../../chunk-RV2X7AFS.js";import"../../chunk-UG5R7IPH.js";import"../../chunk-BWCRTWMO.js";import"../../chunk-HGHYGPCN.js";import"../../chunk-NZUCXN2O.js";import"../../chunk-DFSB3TWF.js";import"../../chunk-H34D6PAN.js";import"../../chunk-UHFCB2EY.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-7QHXEG2B.js";import"../../chunk-XHWTQ4PQ.js";import"../../chunk-HPQWNC3N.js";import"../../chunk-PXDN3KFO.js";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHY343EBZcjs = require('../../chunk-HY343EBZ.cjs');require('../../chunk-K4PQLDMB.cjs');require('../../chunk-NXEC4PED.cjs');require('../../chunk-ZNFOZDZO.cjs');require('../../chunk-UV7TO6A4.cjs');require('../../chunk-BR77Q3PK.cjs');require('../../chunk-PZ3KXKJD.cjs');require('../../chunk-KSUMPQND.cjs');require('../../chunk-6O6IJTQD.cjs');require('../../chunk-XBXL7GMY.cjs');require('../../chunk-GTOPYCJZ.cjs');require('../../chunk-S5QCH2ED.cjs');require('../../chunk-HNUI5756.cjs');require('../../chunk-UMWTEGO6.cjs');require('../../chunk-YCYSZLQ2.cjs');require('../../chunk-Z74ZQMXU.cjs');require('../../chunk-HNV3LB4A.cjs');require('../../chunk-GS26S4PZ.cjs');require('../../chunk-M2ROWHEX.cjs');require('../../chunk-OVJIGWD7.cjs');require('../../chunk-DJZOP4MT.cjs');require('../../chunk-AHMPKIEY.cjs');require('../../chunk-S4BKL6MR.cjs');require('../../chunk-MT6VKH35.cjs');require('../../chunk-O3H2EYFA.cjs');require('../../chunk-SCHRLC2I.cjs');require('../../chunk-YGN7O63X.cjs');require('../../chunk-QHI4DOG7.cjs');require('../../chunk-3X24JZVG.cjs');require('../../chunk-EAWYV5ZO.cjs');require('../../chunk-FQ246XXN.cjs');require('../../chunk-W5RDCN5G.cjs');require('../../chunk-QYQERFYL.cjs');require('../../chunk-VXAHFAP4.cjs');require('../../chunk-EO53B7LL.cjs');require('../../chunk-BPEDL7VV.cjs');require('../../chunk-VI6TW7JT.cjs');require('../../chunk-TWX7ZBKZ.cjs');require('../../chunk-EDALAJ5I.cjs');require('../../chunk-NRN4WNQL.cjs');require('../../chunk-CDQFTAM2.cjs');require('../../chunk-I4GMMHQR.cjs');require('../../chunk-HW3C6SZ3.cjs');require('../../chunk-W2SHS5OF.cjs');require('../../chunk-UW7D7KRK.cjs');require('../../chunk-2WSEHVNP.cjs');exports.EmbeddedAuthForm = _chunkHY343EBZcjs.a;
|