@crossmint/client-sdk-react-ui 2.6.0 → 2.6.2
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-G4FVERWY.cjs → chunk-2GB2K5GH.cjs} +1 -1
- package/dist/chunk-4JTGONQX.js +1 -0
- package/dist/chunk-6SBTKAH5.js +1 -0
- package/dist/chunk-744RBDFD.js +1 -0
- package/dist/{chunk-B2CV3WUI.js → chunk-CSRKNCBJ.js} +1 -1
- package/dist/{chunk-KJZRDNES.js → chunk-DEBSHP3N.js} +1 -1
- package/dist/{chunk-OBHUAZOC.js → chunk-ELYBLWYQ.js} +1 -1
- package/dist/{chunk-D2HT2AS3.cjs → chunk-FABL2J72.cjs} +1 -1
- package/dist/{chunk-AVUWZGK5.js → chunk-IPODMPQ3.js} +1 -1
- package/dist/chunk-JAK75VD2.cjs +1 -0
- package/dist/{chunk-7OCQREEW.js → chunk-KR4HHRGX.js} +1 -1
- package/dist/{chunk-VYPNHOLP.cjs → chunk-KT5POAWD.cjs} +1 -1
- package/dist/{chunk-GTON4UIR.js → chunk-N2XNEOYY.js} +1 -1
- package/dist/{chunk-PFGWRUOS.cjs → chunk-NZSFOOOR.cjs} +1 -1
- package/dist/{chunk-PENG4IPU.cjs → chunk-QOGEHNUR.cjs} +1 -1
- package/dist/chunk-RBFOVHH4.js +1 -0
- package/dist/{chunk-GNX5JGAE.cjs → chunk-RWEZP3VA.cjs} +1 -1
- package/dist/{chunk-QN7MU6JV.cjs → chunk-T7PP6CAV.cjs} +1 -1
- package/dist/{chunk-R76IBLCJ.cjs → chunk-TJ4Z6RY2.cjs} +1 -1
- package/dist/chunk-TRJUDJBN.cjs +1 -0
- package/dist/{chunk-NS2MLSP2.js → chunk-VUBHTQQS.js} +1 -1
- package/dist/{chunk-URFYYXWS.js → chunk-WKOTHVYY.js} +1 -1
- package/dist/chunk-WYNDNHDI.cjs +1 -0
- package/dist/{chunk-UVK3YX7I.cjs → chunk-YEPSQAHG.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/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/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 -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/PayerConnectionHandler.cjs +1 -1
- package/dist/components/embed/v3/crypto/PayerConnectionHandler.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.js +1 -1
- package/dist/components/wallets/ExportPrivateKeyButton.cjs +1 -1
- package/dist/components/wallets/ExportPrivateKeyButton.js +1 -1
- package/dist/components/wallets/index.cjs +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 +1 -1
- package/dist/index.d.ts +1 -1
- 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.d.cts +3 -3
- package/dist/providers/CrossmintWalletProvider.d.ts +3 -3
- 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.d.cts +1 -1
- package/dist/providers/index.d.ts +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-33DH6AP2.js +0 -1
- package/dist/chunk-3CFNQJJP.js +0 -1
- package/dist/chunk-5X3MPD2V.js +0 -1
- package/dist/chunk-QLPV72AE.cjs +0 -1
- package/dist/chunk-S62ZSBPT.js +0 -1
- package/dist/chunk-Z74ZQMXU.cjs +0 -1
- package/dist/chunk-ZCPBPPGV.cjs +0 -1
package/dist/providers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as a,o as b}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{a as c}from"../chunk-
|
|
1
|
+
import{n as a,o as b}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{a as c}from"../chunk-4JTGONQX.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-DEBSHP3N.js";import"../chunk-N2XNEOYY.js";import"../chunk-RBFOVHH4.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 _chunkT7PP6CAVcjs = require('../chunk-T7PP6CAV.cjs');require('../chunk-2GB2K5GH.cjs');require('../chunk-2WSEHVNP.cjs');exports.createCrossmintApiClient = _chunkT7PP6CAVcjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-N2XNEOYY.js";import"../chunk-RBFOVHH4.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": "2.6.
|
|
3
|
+
"version": "2.6.2",
|
|
4
4
|
"repository": "https://github.com/Crossmint/crossmint-sdk",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Paella Labs Inc",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"react-transition-group": "4.4.5",
|
|
39
39
|
"viem": "2.33.1",
|
|
40
40
|
"zod": "3.22.4",
|
|
41
|
-
"@crossmint/client-sdk-auth": "1.2.
|
|
42
|
-
"@crossmint/client-sdk-base": "1.7.
|
|
43
|
-
"@crossmint/client-sdk-react-base": "0.7.
|
|
44
|
-
"@crossmint/client-signers": "0.0.20",
|
|
45
|
-
"@crossmint/common-sdk-auth": "1.0.57",
|
|
46
|
-
"@crossmint/common-sdk-base": "0.9.7",
|
|
41
|
+
"@crossmint/client-sdk-auth": "1.2.36",
|
|
42
|
+
"@crossmint/client-sdk-base": "1.7.3",
|
|
43
|
+
"@crossmint/client-sdk-react-base": "0.7.3",
|
|
47
44
|
"@crossmint/client-sdk-window": "1.0.5",
|
|
48
|
-
"@crossmint/
|
|
45
|
+
"@crossmint/client-signers": "0.1.0",
|
|
46
|
+
"@crossmint/common-sdk-auth": "1.0.58",
|
|
47
|
+
"@crossmint/common-sdk-base": "0.9.7",
|
|
48
|
+
"@crossmint/wallets-sdk": "0.18.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@testing-library/react": "^16.0.1",
|
package/dist/chunk-33DH6AP2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s="2.6.0";var a=s;export{a};
|
package/dist/chunk-3CFNQJJP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as k}from"./chunk-ETAEFFCS.js";import{a as W}from"./chunk-AZ72RWXJ.js";import{a as D}from"./chunk-NOJYXLE6.js";import{d as s}from"./chunk-PXDN3KFO.js";import{useState as l,useCallback as $,useRef as a}from"react";import{CrossmintWalletBaseProvider as z,useCrossmint as G}from"@crossmint/client-sdk-react-base";import{jsx as u,jsxs as J}from"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 ee({children:m,showPasskeyHelpers:P=!0,appearance:d,createOnLogin:e,callbacks:n}){let{experimental_customAuth:i}=G(),[F,y]=l({open:!1}),[A,c]=l(!1),[N,j]=l("initial"),[q,h]=l(!1),[O,V]=l("initial"),B=a(!1),f=a(p("sendEmailWithOtp")),S=a(p("verifyOtp")),v=a(p("sendPhoneWithOtp")),C=a(p("verifyPhoneOtp")),t=a(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=$(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=()=>s(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=>s(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=()=>s(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=>s(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 J(z,{createOnLogin:e,onAuthRequired:(o,r,b,_)=>s(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,u(k,{rejectRef:t,email:R,open:A&&R!=null,setOpen:c,step:N,onSubmitOTP:I,onResendOTPCode:w,onSubmitEmail:w,appearance:d}),u(W,{rejectRef:t,phone:T,open:q&&T!=null,setOpen:h,step:O,onSubmitOTP:U,onResendOTPCode:E,onSubmitPhone:E,appearance:d}),u(D,{state:F,appearance:d})]})}export{ee as a};
|
package/dist/chunk-5X3MPD2V.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as o}from"./chunk-PXDN3KFO.js";import{useEffect as d}from"react";function p({payer:n,iframeClient:e}){return d(()=>{if(e==null)return;let t=e.on("crypto:send-transaction",k=>o(this,[k],function*({chain:s,serializedTransaction:c}){try{yield n.handleChainSwitch(s);let r=yield n.handleSignAndSendTransaction(c),a=r.success?r.txId:"";r.success?e.send("crypto:send-transaction:success",{txId:a}):e.send("crypto:send-transaction:failed",{error:r.errorMessage})}catch(r){console.error("[SignerConnectionHandler] Failed to send transaction",r),e.send("crypto:send-transaction:failed",{error:r.message||"An unknown error occurred"})}}));return()=>{e.off(t)}},[e]),null}export{p as a};
|
package/dist/chunk-QLPV72AE.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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 t=e.on("crypto:send-transaction",h=>_chunk2WSEHVNPcjs.d.call(void 0, this,[h],function*({chain:s,serializedTransaction:c}){try{yield n.handleChainSwitch(s);let r=yield n.handleSignAndSendTransaction(c),a=r.success?r.txId:"";r.success?e.send("crypto:send-transaction:success",{txId:a}):e.send("crypto:send-transaction:failed",{error:r.errorMessage})}catch(r){console.error("[SignerConnectionHandler] Failed to send transaction",r),e.send("crypto:send-transaction:failed",{error:r.message||"An unknown error occurred"})}}));return()=>{e.off(t)}},[e]),null}exports.a = m;
|
package/dist/chunk-S62ZSBPT.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as y}from"./chunk-5X3MPD2V.js";import{a as l}from"./chunk-GTON4UIR.js";import{a,b as p}from"./chunk-PXDN3KFO.js";import{useCrossmint as E}from"@crossmint/client-sdk-react-base";import{lazy as v,useEffect as h,useRef as s,useState as f}from"react";import{crossmintEmbeddedCheckoutV3Service as S}from"@crossmint/client-sdk-base";import{Fragment as x,jsx as o,jsxs as H}from"react/jsx-runtime";var V=v(()=>import("./components/embed/v3/crypto/CryptoWalletConnectionHandler.js").then(r=>({default:r.CryptoWalletConnectionHandler})));function K(r){var m;let[e,C]=f(null),[P,b]=f(0),g=s((m=r.payment.crypto.payer)==null?void 0:m.initialChain),n=s(r);if(I(r,n.current)){let t=a({},r),u=w(r,g.current);u.shouldPreserve&&(t.payment.crypto.payer=u.updatedPayer),n.current=t}let{crossmint:k}=E(),c=l(k,{usageOrigin:"client"}),d=S({apiClient:c}),i=s(null);return h(()=>{let t=i.current;!t||e||C(d.iframe.createClient(t))},[i.current,e]),h(()=>{if(e!=null)return e.on("ui:height.changed",t=>b(t.height)),()=>{e.off("ui:height.changed")}},[e]),H(x,{children:[o("iframe",{ref:i,src:d.iframe.getUrl(n.current),id:"crossmint-embedded-checkout.iframe",role:"crossmint-embedded-checkout.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:`${P}px`,backgroundColor:"transparent"}}),n.current.payment.crypto.enabled?n.current.payment.crypto.payer!=null?o(y,{payer:n.current.payment.crypto.payer,iframeClient:e}):o(V,{iframeClient:e,apiKeyEnvironment:c.parsedAPIKey.environment}):null,o("span",{id:"crossmint-focus-target",tabIndex:-1})]})}function I(r,e){return JSON.stringify(r)!==JSON.stringify(e)}function w(r,e){return r.payment.crypto.payer&&e!=null?{shouldPreserve:!0,updatedPayer:p(a({},r.payment.crypto.payer),{initialChain:e})}:{shouldPreserve:!1}}export{K as a};
|
package/dist/chunk-Z74ZQMXU.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;
|
package/dist/chunk-ZCPBPPGV.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkQLPV72AEcjs = require('./chunk-QLPV72AE.cjs');var _chunkQN7MU6JVcjs = require('./chunk-QN7MU6JV.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _react = require('react');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');var V=_react.lazy.call(void 0, ()=>Promise.resolve().then(() => _interopRequireWildcard(require("./components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs"))).then(r=>({default:r.CryptoWalletConnectionHandler})));function J(r){var m;let[e,C]=_react.useState.call(void 0, null),[P,b]=_react.useState.call(void 0, 0),g=_react.useRef.call(void 0, (m=r.payment.crypto.payer)==null?void 0:m.initialChain),n=_react.useRef.call(void 0, r);if(I(r,n.current)){let t=_chunk2WSEHVNPcjs.a.call(void 0, {},r),u=w(r,g.current);u.shouldPreserve&&(t.payment.crypto.payer=u.updatedPayer),n.current=t}let{crossmint:k}=_clientsdkreactbase.useCrossmint.call(void 0, ),c=_chunkQN7MU6JVcjs.a.call(void 0, k,{usageOrigin:"client"}),d=_clientsdkbase.crossmintEmbeddedCheckoutV3Service.call(void 0, {apiClient:c}),i=_react.useRef.call(void 0, null);return _react.useEffect.call(void 0, ()=>{let t=i.current;!t||e||C(d.iframe.createClient(t))},[i.current,e]),_react.useEffect.call(void 0, ()=>{if(e!=null)return e.on("ui:height.changed",t=>b(t.height)),()=>{e.off("ui:height.changed")}},[e]),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "iframe",{ref:i,src:d.iframe.getUrl(n.current),id:"crossmint-embedded-checkout.iframe",role:"crossmint-embedded-checkout.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:`${P}px`,backgroundColor:"transparent"}}),n.current.payment.crypto.enabled?n.current.payment.crypto.payer!=null?_jsxruntime.jsx.call(void 0, _chunkQLPV72AEcjs.a,{payer:n.current.payment.crypto.payer,iframeClient:e}):_jsxruntime.jsx.call(void 0, V,{iframeClient:e,apiKeyEnvironment:c.parsedAPIKey.environment}):null,_jsxruntime.jsx.call(void 0, "span",{id:"crossmint-focus-target",tabIndex:-1})]})}function I(r,e){return JSON.stringify(r)!==JSON.stringify(e)}function w(r,e){return r.payment.crypto.payer&&e!=null?{shouldPreserve:!0,updatedPayer:_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},r.payment.crypto.payer),{initialChain:e})}:{shouldPreserve:!1}}exports.a = J;
|