@crossmint/client-sdk-react-native-ui 1.0.0-beta.5 → 1.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -163
- package/app.plugin.js +1 -1
- package/dist/chunk-2RDEJU3T.js +2 -0
- package/dist/chunk-2U67EBAU.js +1 -0
- package/dist/{chunk-VACQTZRT.js → chunk-2UY6GCV3.js} +1 -1
- package/dist/{chunk-LLHUAEZP.mjs → chunk-335OOXYN.mjs} +1 -1
- package/dist/chunk-3G67LZY4.js +2 -0
- package/dist/{chunk-X64DPUQJ.js → chunk-4MOBXEX6.js} +1 -1
- package/dist/chunk-4P5ABAFD.mjs +1 -0
- package/dist/{chunk-YVITECJT.js → chunk-6YOO7OTV.js} +1 -1
- package/dist/chunk-7JGGPJBX.mjs +1 -0
- package/dist/chunk-7JOOUJJ2.js +38 -0
- package/dist/{chunk-ZCKUSOGC.mjs → chunk-AHAHB7QD.mjs} +1 -1
- package/dist/chunk-AX72ILV2.js +1 -0
- package/dist/chunk-BOG3QIA2.js +1 -0
- package/dist/chunk-C7S2X5RD.mjs +1 -0
- package/dist/{chunk-QVLCNPNG.mjs → chunk-DYBYU4QW.mjs} +1 -1
- package/dist/chunk-IJN37RF2.js +1 -0
- package/dist/chunk-J62V5BQX.mjs +1 -0
- package/dist/{chunk-F5O5W34O.mjs → chunk-K6ZOIECD.mjs} +1 -1
- package/dist/chunk-LHEOII54.js +1 -0
- package/dist/{chunk-D5QADN6Z.mjs → chunk-NG4FYS2Z.mjs} +1 -1
- package/dist/{chunk-3MXWZO3W.mjs → chunk-NNGGH73Y.mjs} +1 -1
- package/dist/{chunk-F7VXWATP.js → chunk-NVBPI6JQ.js} +1 -1
- package/dist/chunk-QE2FX5MA.mjs +1 -0
- package/dist/{chunk-4HT7GY6N.js → chunk-QHJA7VYD.js} +1 -1
- package/dist/chunk-QHTHMZZV.mjs +1 -0
- package/dist/{chunk-HQFWYQ4L.js → chunk-QODMJ5UY.js} +1 -1
- package/dist/chunk-R4AKS6SV.js +1 -0
- package/dist/chunk-R4DCEEUP.mjs +38 -0
- package/dist/chunk-RIKAIN6N.js +1 -0
- package/dist/chunk-RWTMQGU7.js +1 -0
- package/dist/chunk-SAPISWWH.mjs +1 -0
- package/dist/{chunk-RFFLL7AO.js → chunk-SQMKAGYM.js} +1 -1
- package/dist/chunk-ST55IDAQ.mjs +1 -0
- package/dist/{chunk-6BGT7YJW.js → chunk-STDFVESG.js} +1 -1
- package/dist/chunk-TQIJ7OZD.js +1 -0
- package/dist/chunk-TSRZEXRU.mjs +1 -0
- package/dist/chunk-TVASK7FQ.js +1 -0
- package/dist/{chunk-SHTETN4C.js → chunk-U3CLRKGH.js} +1 -1
- package/dist/{chunk-RO3XNRC3.mjs → chunk-VNL4MD2H.mjs} +1 -1
- package/dist/chunk-W4PUVHWF.mjs +2 -0
- package/dist/{chunk-YLJDAK2S.mjs → chunk-WDMEQNBX.mjs} +1 -1
- package/dist/{chunk-4PMKF2DM.mjs → chunk-WGBLUFWU.mjs} +1 -1
- package/dist/{chunk-DC5HCBPK.js → chunk-WH3PVAVN.js} +1 -1
- package/dist/chunk-X7EQP7ZO.mjs +1 -0
- package/dist/chunk-XZ5LQIRB.mjs +1 -0
- package/dist/chunk-YJIX6E2P.mjs +0 -0
- package/dist/chunk-YMCYXFCG.mjs +2 -0
- package/dist/{chunk-OGYBEE5A.js → chunk-Z36IMAC2.js} +1 -1
- package/dist/{chunk-FX23A4BR.mjs → chunk-ZP2QWJOD.mjs} +1 -1
- package/dist/chunk-ZQ2BJNI7.js +1 -0
- package/dist/components/embed/index.js +1 -1
- package/dist/components/embed/index.mjs +1 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.mjs +1 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3WebView.js +1 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3WebView.mjs +1 -1
- package/dist/components/embed/v3/crypto/PayerConnectionHandler.js +1 -1
- package/dist/components/embed/v3/crypto/PayerConnectionHandler.mjs +1 -1
- package/dist/components/embed/v3/index.js +1 -1
- package/dist/components/embed/v3/index.mjs +1 -1
- package/dist/components/icons/MailCheckIcon.d.mts +6 -0
- package/dist/components/icons/MailCheckIcon.d.ts +6 -0
- package/dist/components/icons/MailCheckIcon.js +1 -0
- package/dist/components/icons/MailCheckIcon.mjs +1 -0
- package/dist/components/icons/MailIcon.d.mts +6 -0
- package/dist/components/icons/MailIcon.d.ts +6 -0
- package/dist/components/icons/MailIcon.js +1 -0
- package/dist/components/icons/MailIcon.mjs +1 -0
- package/dist/components/icons/PhoneIcon.d.mts +6 -0
- package/dist/components/icons/PhoneIcon.d.ts +6 -0
- package/dist/components/icons/PhoneIcon.js +1 -0
- package/dist/components/icons/PhoneIcon.mjs +1 -0
- package/dist/components/icons/PngIcon.d.mts +10 -0
- package/dist/components/icons/PngIcon.d.ts +10 -0
- package/dist/components/icons/PngIcon.js +1 -0
- package/dist/components/icons/PngIcon.mjs +1 -0
- package/dist/components/icons/SmartphoneIcon.d.mts +6 -0
- package/dist/components/icons/SmartphoneIcon.d.ts +6 -0
- package/dist/components/icons/SmartphoneIcon.js +1 -0
- package/dist/components/icons/SmartphoneIcon.mjs +1 -0
- package/dist/components/icons/XIcon.d.mts +6 -0
- package/dist/components/icons/XIcon.d.ts +6 -0
- package/dist/components/icons/XIcon.js +1 -0
- package/dist/components/icons/XIcon.mjs +1 -0
- package/dist/components/icons/index.d.mts +7 -0
- package/dist/components/icons/index.d.ts +7 -0
- package/dist/components/icons/index.js +1 -0
- package/dist/components/icons/index.mjs +1 -0
- package/dist/components/icons/types.d.mts +7 -0
- package/dist/components/icons/types.d.ts +7 -0
- package/dist/components/icons/types.js +1 -0
- package/dist/components/icons/types.mjs +0 -0
- package/dist/components/index.js +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/components/signers/BaseCodeInput.js +1 -1
- package/dist/components/signers/BaseCodeInput.mjs +1 -1
- package/dist/components/signers/BaseConfirmation.js +1 -1
- package/dist/components/signers/BaseConfirmation.mjs +1 -1
- package/dist/components/signers/EmailSignersDialog.js +1 -1
- package/dist/components/signers/EmailSignersDialog.mjs +1 -1
- package/dist/components/signers/PhoneSignersDialog.js +1 -1
- package/dist/components/signers/PhoneSignersDialog.mjs +1 -1
- package/dist/components/signers/index.js +1 -1
- package/dist/components/signers/index.mjs +1 -1
- package/dist/components/wallets/ExportPrivateKeyButton.js +1 -1
- package/dist/components/wallets/ExportPrivateKeyButton.mjs +1 -1
- package/dist/components/wallets/index.js +1 -1
- package/dist/components/wallets/index.mjs +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks/useAuth.js +1 -1
- package/dist/hooks/useAuth.mjs +1 -1
- package/dist/hooks/useCrossmintCheckout.js +1 -1
- package/dist/hooks/useCrossmintCheckout.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/logger/init.js +1 -1
- package/dist/logger/init.mjs +1 -1
- package/dist/plugin/mods/addQueryToAndroidManifest.js +1 -1
- package/dist/plugin/mods/addQueryToAndroidManifest.mjs +1 -1
- package/dist/plugin/withCrossmintUI.d.mts +6 -0
- package/dist/plugin/withCrossmintUI.d.ts +6 -0
- package/dist/plugin/withCrossmintUI.js +1 -0
- package/dist/plugin/withCrossmintUI.mjs +1 -0
- package/dist/plugin/withDeviceSigner.d.mts +5 -0
- package/dist/plugin/withDeviceSigner.d.ts +5 -0
- package/dist/plugin/withDeviceSigner.js +1 -0
- package/dist/plugin/withDeviceSigner.mjs +1 -0
- package/dist/plugin/withGooglePay.d.mts +2 -2
- package/dist/plugin/withGooglePay.d.ts +2 -2
- package/dist/plugin/withGooglePay.js +1 -1
- package/dist/plugin/withGooglePay.mjs +1 -1
- package/dist/providers/CrossmintAuthProvider.js +1 -1
- package/dist/providers/CrossmintAuthProvider.mjs +1 -1
- package/dist/providers/CrossmintProvider.js +1 -1
- package/dist/providers/CrossmintProvider.mjs +1 -1
- package/dist/providers/CrossmintWalletProvider.d.mts +2 -2
- package/dist/providers/CrossmintWalletProvider.d.ts +2 -2
- package/dist/providers/CrossmintWalletProvider.js +1 -1
- package/dist/providers/CrossmintWalletProvider.mjs +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/providers/index.mjs +1 -1
- package/dist/styles/index.js +1 -1
- package/dist/styles/index.mjs +1 -1
- package/dist/styles/theme.js +1 -1
- package/dist/styles/theme.mjs +1 -1
- package/dist/utils/SecureStorage.js +1 -1
- package/dist/utils/SecureStorage.mjs +1 -1
- package/dist/utils/createCrossmintApiClient.js +1 -1
- package/dist/utils/createCrossmintApiClient.mjs +1 -1
- package/dist/utils/embed/userAgent.js +1 -1
- package/dist/utils/embed/userAgent.mjs +1 -1
- package/dist/utils/eventEmitter.js +1 -1
- package/dist/utils/eventEmitter.mjs +1 -1
- package/package.json +5 -7
- package/dist/chunk-3QSVHCEH.mjs +0 -2
- package/dist/chunk-4XMG3KIU.mjs +0 -1
- package/dist/chunk-F4GXM2ZD.js +0 -1
- package/dist/chunk-J42HASCI.js +0 -1
- package/dist/chunk-MVVSGLQL.js +0 -2
- package/dist/chunk-PSSAAY7D.mjs +0 -1
- package/dist/chunk-VGA23PJK.mjs +0 -1
- package/dist/chunk-XNDIT72O.mjs +0 -2
- package/dist/chunk-XSBVXPEK.mjs +0 -1
- package/dist/chunk-YJORUMPB.js +0 -2
- package/dist/chunk-ZM4HMYQX.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEI5LOD4Yjs = require('./chunk-EI5LOD4Y.js');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEI5LOD4Yjs = require('./chunk-EI5LOD4Y.js');var _chunkIJN37RF2js = require('./chunk-IJN37RF2.js');var _react = require('react');var _reactnative = require('react-native');var _jsxruntime = require('react/jsx-runtime');function a({icon:H,title:L,description:F,helpText:N,onSubmitOTP:W,onResendCode:y,appearance:t,otpLength:E=9,keyboardType:U="default",autoComplete:$="one-time-code",textContentType:q="oneTimeCode"}){var f,h,B,C,S,I,P,k,R,z,w,O,v;let[r,x]=_react.useState.call(void 0, ""),[s,u]=_react.useState.call(void 0, !1),[c,d]=_react.useState.call(void 0, null),[m,T]=_react.useState.call(void 0, 0),G=()=>_chunkIJN37RF2js.f.call(void 0, this,null,function*(){if(r.length!==0){u(!0),d(null);try{yield W(r),x("")}catch(l){console.error("Failed to verify OTP",l),d("Invalid code. Please try again.")}finally{u(!1)}}}),J=()=>_chunkIJN37RF2js.f.call(void 0, this,null,function*(){if(!(m>0||!y)){u(!0),d(null);try{yield y(),T(60);let l=setInterval(()=>{T(A=>A<=1?(clearInterval(l),0):A-1)},1e3)}catch(l){console.error("Failed to resend OTP",l),d("Failed to resend code. Please try again.")}finally{u(!1)}}}),i=_reactnative.StyleSheet.create({container:{width:"100%"},iconContainer:{alignItems:"center",marginBottom:8},title:{fontSize:18,fontWeight:"600",color:((f=t==null?void 0:t.colors)==null?void 0:f.textPrimary)||_chunkEI5LOD4Yjs.a["cm-text-primary"],textAlign:"center",marginBottom:8,marginTop:16},description:{fontSize:14,color:((h=t==null?void 0:t.colors)==null?void 0:h.textSecondary)||_chunkEI5LOD4Yjs.a["cm-text-secondary"],textAlign:"center",marginBottom:24,lineHeight:20},otpInput:{borderWidth:1,borderColor:c?((B=t==null?void 0:t.colors)==null?void 0:B.danger)||_chunkEI5LOD4Yjs.a["cm-danger"]:((C=t==null?void 0:t.colors)==null?void 0:C.border)||_chunkEI5LOD4Yjs.a["cm-border"],borderRadius:(t==null?void 0:t.borderRadius)||12,backgroundColor:((S=t==null?void 0:t.colors)==null?void 0:S.inputBackground)||_chunkEI5LOD4Yjs.a["cm-muted-primary"],padding:16,fontSize:16,color:((I=t==null?void 0:t.colors)==null?void 0:I.textPrimary)||_chunkEI5LOD4Yjs.a["cm-text-primary"],marginBottom:16,textAlign:"center"},errorText:{fontSize:14,color:((P=t==null?void 0:t.colors)==null?void 0:P.danger)||_chunkEI5LOD4Yjs.a["cm-danger"],textAlign:"center",marginBottom:16},helpText:{fontSize:12,color:((k=t==null?void 0:t.colors)==null?void 0:k.textSecondary)||_chunkEI5LOD4Yjs.a["cm-text-secondary"],textAlign:"center",marginBottom:16,lineHeight:16},submitButton:{backgroundColor:((R=t==null?void 0:t.colors)==null?void 0:R.accent)||_chunkEI5LOD4Yjs.a["cm-accent"],paddingVertical:16,paddingHorizontal:32,borderRadius:(t==null?void 0:t.borderRadius)||12,alignItems:"center",marginBottom:16},submitButtonDisabled:{opacity:.6},submitButtonText:{fontSize:16,fontWeight:"500",color:((z=t==null?void 0:t.colors)==null?void 0:z.background)||_chunkEI5LOD4Yjs.a["cm-background-primary"]},resendButton:{alignSelf:"center",paddingVertical:12,paddingHorizontal:16},resendButtonText:{fontSize:14,color:((w=t==null?void 0:t.colors)==null?void 0:w.accent)||_chunkEI5LOD4Yjs.a["cm-accent"],textAlign:"center"},resendButtonDisabled:{opacity:.6}});return _jsxruntime.jsxs.call(void 0, _reactnative.View,{style:i.container,children:[_jsxruntime.jsx.call(void 0, _reactnative.View,{style:i.iconContainer,children:H}),_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:i.title,children:L}),_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:i.description,children:F}),_jsxruntime.jsx.call(void 0, _reactnative.TextInput,{style:i.otpInput,placeholder:"Enter code",placeholderTextColor:((O=t==null?void 0:t.colors)==null?void 0:O.textSecondary)||_chunkEI5LOD4Yjs.a["cm-text-secondary"],value:r,onChangeText:l=>{x(l),d(null)},keyboardType:U,autoComplete:$,textContentType:q,editable:!s,maxLength:E}),c&&_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:i.errorText,children:c}),_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:i.helpText,children:N}),_jsxruntime.jsx.call(void 0, _reactnative.TouchableOpacity,{style:[i.submitButton,(r.length===0||s)&&i.submitButtonDisabled],onPress:G,disabled:r.length===0||s,children:s?_jsxruntime.jsx.call(void 0, _reactnative.ActivityIndicator,{color:((v=t==null?void 0:t.colors)==null?void 0:v.background)||_chunkEI5LOD4Yjs.a["cm-background-primary"]}):_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:i.submitButtonText,children:"Submit"})}),y&&_jsxruntime.jsx.call(void 0, _reactnative.TouchableOpacity,{style:[i.resendButton,m>0&&i.resendButtonDisabled],onPress:J,disabled:m>0||s,children:_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:i.resendButtonText,children:m>0?`Re-send code in ${m}s`:"Re-send code"})})]})}exports.a = a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-D4347S2W.mjs";import{withAndroidManifest as t,AndroidConfig as r}from"@expo/config-plugins";var{addMetaDataItemToMainApplication:l,getMainApplicationOrThrow:d}=r.Manifest,u=(n,a={enableGooglePay:!1})=>a.enableGooglePay?t(n,o=>{let i=d(o.modResults);return l(i,"com.google.android.gms.wallet.api.enabled","true"),o.modResults=e(o.modResults,{intent:[{action:[{$:{"android:name":"org.chromium.intent.action.PAY"}}]},{action:[{$:{"android:name":"org.chromium.intent.action.IS_READY_TO_PAY"}}]},{action:[{$:{"android:name":"org.chromium.intent.action.UPDATE_PAYMENT_DETAILS"}}]}]}),o}):n;export{u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIJN37RF2js = require('./chunk-IJN37RF2.js');var _react = require('react');var _reactnative = require('react-native');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _clientsigners = require('@crossmint/client-signers');var _walletssdk = require('@crossmint/wallets-sdk');var _commonsdkbase = require('@crossmint/common-sdk-base');var _clientsdkrnwindow = require('@crossmint/client-sdk-rn-window');var _jsxruntime = require('react/jsx-runtime');function j({appearance:K}){let{wallet:r}=_clientsdkreactbase.useWallet.call(void 0, ),{crossmint:i}=_clientsdkreactbase.useCrossmint.call(void 0, ),a=_react.useRef.call(void 0, null),l=_react.useRef.call(void 0, null),[c,w]=_react.useState.call(void 0, "");_react.useEffect.call(void 0, ()=>{if(i!=null)try{let e=_commonsdkbase.validateAPIKey.call(void 0, i.apiKey);if(e.isValid){let t=_clientsigners.environmentUrlConfig[e.environment];w(`${t}/export`)}}catch(e){console.error("Failed to get TEE URL:",e)}},[i]);let E=_react.useCallback.call(void 0, e=>_chunkIJN37RF2js.f.call(void 0, this,null,function*(){if(!(r==null||a.current==null||e.nativeEvent.loading))try{if(r.signer!=null&&_walletssdk.isExportableSignerAdapter.call(void 0, r.signer)){let t=new (0, _clientsdkrnwindow.WebViewParent)(a,{incomingEvents:_clientsigners.exportSignerOutboundEvents,outgoingEvents:_clientsigners.exportSignerInboundEvents});l.current=t,yield t.handshakeWithChild(),yield r.signer._exportPrivateKey(t)}}catch(t){console.error("Failed to export private key:",t),_reactnative.Alert.alert("Export Failed","Failed to export private key. Please try again.")}}),[r]),d=_react.useCallback.call(void 0, e=>{let{nativeEvent:t}=e;console.error("WebView error:",t),_reactnative.Alert.alert("Export Failed","Failed to load export interface. Please try again.")},[]),m=_react.useCallback.call(void 0, e=>{l.current&&l.current.handleMessage(e)},[]);return c===""||r==null||r.signer==null||!_walletssdk.isExportableSignerAdapter.call(void 0, r.signer)?null:_jsxruntime.jsx.call(void 0, _reactnative.View,{style:n.webViewContainer,children:_jsxruntime.jsx.call(void 0, _clientsdkrnwindow.RNWebView,{ref:a,source:{uri:c},style:n.webView,javaScriptEnabled:!0,domStorageEnabled:!0,onLoadEnd:E,onError:d,onHttpError:d,onMessage:m,startInLoadingState:!0,renderLoading:()=>_jsxruntime.jsx.call(void 0, _reactnative.View,{style:n.loadingContainer,children:_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:n.loadingText,children:"Loading..."})})})})}var n=_reactnative.StyleSheet.create({webViewContainer:{height:56,borderWidth:1,borderColor:"#E5E5E5",borderRadius:12,overflow:"hidden"},webView:{flex:1},loadingContainer:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:"#F5F5F5"},loadingText:{fontSize:16,color:"#666666"}});exports.a = j;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-7JGGPJBX.mjs";import{e}from"./chunk-4P5ABAFD.mjs";var r=e((P,I)=>{I.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABZ0lEQVR4AbTUC1LDMAwE0MDFgJMBJwNOBn4ZLyNcUuzSdroj67crxWnvtxt/qsBj03pr+CzgvzT/4m8EkCAjUsn4zy3ANrP+jcBDb31t9q6A39yNCLuMCGRCm1SS+MnX3NQ5Au+9+mKi3n9iInCSuFYgAh+dcNxg9HvZvIlAHlEuOwzeLOdctvMSIpCmOnEuGHnOqZu2EbABaIxI/HErNdOIgAaTsnnnCQDBf2+AGBkgBLEqmpj4NOoGmvI2uVyEBCMitrzJKIAghHlUY4xvGHAmfPgHOQqkyeQ2QJBYFUYKhlCnJuB/x38TUFjJqshTS0YcUXM3scM/yCMBJFXEtMjEEcqBs5hckIH2AY4EFCsMgWLPWSw555Fc7gfOCShEQMS0fM+2ComdxV8CaTZtRMSqkJwNQY7PGm6bFdCg0WUSAjFC4I7Adny5/Te1IqAJCEEVMy3Isx6rmqUNNI9AAgiBKEtkr/0CAAD//0s8Y9YAAAAGSURBVAMAIbpVMfA3cdgAAAAASUVORK5CYII="});import{jsx as i}from"react/jsx-runtime";function t({size:p=22,color:c,strokeWidth:n=2}){return i(o,{source:r(),size:p,color:c})}export{t as a};
|
|
@@ -1 +1 @@
|
|
|
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; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
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; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk6YOO7OTVjs = require('./chunk-6YOO7OTV.js');var _commonsdkbase = require('@crossmint/common-sdk-base');var _reactnative = require('react-native');var _expoconstants = require('expo-constants'); var _expoconstants2 = _interopRequireDefault(_expoconstants);var _expodevice = require('expo-device'); var e = _interopRequireWildcard(_expodevice);function P(n,i){var s,c,f,g,v,m,u,l,p,k,L;let t=_commonsdkbase.validateAPIKey.call(void 0, n);if(!t.isValid)throw new Error(`Invalid API key: ${t.message}`);let{environment:d,projectId:I}=t,a=new (0, _commonsdkbase.SdkLogger)({packageName:_chunk6YOO7OTVjs.a.name,packageVersion:_chunk6YOO7OTVjs.a.version,environment:d,projectId:I,platform:"react-native",consoleLogLevel:i}),N=(m=(v=(c=(s=_expoconstants2.default.expoConfig)==null?void 0:s.ios)==null?void 0:c.bundleIdentifier)!=null?v:(g=(f=_expoconstants2.default.expoConfig)==null?void 0:f.android)==null?void 0:g.package)!=null?m:void 0,o={};e!=null&&(o.device=(p=(l=(u=e.modelName)!=null?u:e.deviceName)!=null?l:e.brand)!=null?p:void 0,o.os_version=(k=e.osVersion)!=null?k:void 0,o.os_name=(L=e.osName)!=null?L:void 0);let h=new (0, _commonsdkbase.ReactNativeDatadogSink)(d,N,o);return a.addSink(h),w(a),a}function w(n){_reactnative.AppState.addEventListener("change",i=>{(i==="background"||i==="inactive")&&typeof n.flush=="function"&&n.flush()})}exports.a = P;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTVASK7FQjs = require('./chunk-TVASK7FQ.js');var _chunkIJN37RF2js = require('./chunk-IJN37RF2.js');var r=_chunkIJN37RF2js.e.call(void 0, (t,c)=>{c.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABMElEQVR4AezRy20CMRAGYJQiUkcuSQu5pNxc0kJySR1Uwf+hNQ+tx14hIS4gDzue/7UML7s7f54B0wU/bEW/eTX1mufs4OCqFXf0C97D/k4xyKN7YDi4XUIV8BX2X4qQAaNcr44ZDAeX5orgUgXsAxIQMmDEMOPj0ZvBcHBpjuDlVxWAQ0DIgBFDxkpvBsPBpVnVKACZkAEjhj8ZKr0ZDCfj/pkFUDFg9J/L21J6M1hG9dkSUKs3IFsC2s69vTdXev8DbBgzC2DAqO38M27K/s1gOBn3zyiAkAEjhm3n9q43g+HgdhOqAAJCBowYMm4mejMYDi5Nw0/PKoCAkAEjhifR0pjBcHBpFuj8qAIwCBkwcu8VDAe3h++qgI+wFYO0w4ODq1bEKmBFvHXwDJhu7gAAAP//FX4TdAAAAAZJREFUAwAkFUAxInh9owAAAABJRU5ErkJggg=="});var _jsxruntime = require('react/jsx-runtime');function s({size:p=16,color:n,strokeWidth:I=2}){return _jsxruntime.jsx.call(void 0, _chunkTVASK7FQjs.a,{source:r(),size:p,color:n})}exports.a = s;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import{f as r}from"./chunk-4P5ABAFD.mjs";import{withDangerousMod as c}from"@expo/config-plugins";import d from"path";import s from"fs";var f=l=>c(l,["ios",i=>r(void 0,null,function*(){let t=d.join(i.modRequest.platformProjectRoot,"Podfile"),e=s.readFileSync(t,"utf8");e.includes("CROSSMINT_RN_PREBUILT_FIX")||(e=e.replace(/(ENV\['RCT_USE_RN_DEP'\][^\n]+\n)(ENV\['RCT_USE_PREBUILT_RNCORE'\][^\n]+\n)/,`$1$2ENV.delete('RCT_USE_RN_DEP') # CROSSMINT_RN_PREBUILT_FIX
|
|
2
|
+
ENV.delete('RCT_USE_PREBUILT_RNCORE') # CROSSMINT_RN_PREBUILT_FIX
|
|
3
|
+
`));let n="# @crossmint/expo-device-signer: CrossmintDeviceSigner autolinking exclusion";if(!e.includes(n)){let a=` ${n}
|
|
4
|
+
# RN 0.82 removed CallInvoker.h from TurboModuleUtils.h, breaking
|
|
5
|
+
# expo-modules-core@3.x. Inject it via a prefix header for that pod.
|
|
6
|
+
require 'fileutils'
|
|
7
|
+
pch_path = "#{installer.sandbox.root}/CrossmintExpoFixes.pch"
|
|
8
|
+
unless File.exist?(pch_path)
|
|
9
|
+
File.write(pch_path, [
|
|
10
|
+
"// Auto-generated by @crossmint/client-sdk-react-native-ui plugin",
|
|
11
|
+
"#ifdef __OBJC__",
|
|
12
|
+
"#endif",
|
|
13
|
+
"#ifdef __cplusplus",
|
|
14
|
+
"// RN 0.82 moved these headers; include from their new locations.",
|
|
15
|
+
"#include <ReactCommon/CallInvoker.h>",
|
|
16
|
+
"#include <ReactCommon/react/bridging/CallbackWrapper.h>",
|
|
17
|
+
"#endif",
|
|
18
|
+
].join("\\n") + "\\n")
|
|
19
|
+
end
|
|
20
|
+
installer.pods_project.targets.each do |target|
|
|
21
|
+
if target.name == 'ExpoModulesCore'
|
|
22
|
+
target.build_configurations.each do |config|
|
|
23
|
+
config.build_settings['GCC_PREFIX_HEADER'] = pch_path
|
|
24
|
+
config.build_settings['GCC_PRECOMPILE_PREFIX_HEADER'] = 'YES'
|
|
25
|
+
paths = config.build_settings['HEADER_SEARCH_PATHS'] || '$(inherited)'
|
|
26
|
+
# Needed so <ReactCommon/CallInvoker.h> resolves correctly
|
|
27
|
+
extra = '$(PODS_ROOT)/Headers/Public/React-callinvoker'
|
|
28
|
+
config.build_settings['HEADER_SEARCH_PATHS'] = "#{paths} #{extra}" unless paths.include?(extra)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
if target.name == 'CrossmintDeviceSigner'
|
|
32
|
+
target.build_configurations.each do |config|
|
|
33
|
+
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = ''
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
`,o=e.replace(/(post_install do \|installer\|)/,`$1
|
|
38
|
+
${a}`);if(o===e)throw new Error("[crossmint/client-sdk-react-native-ui] Could not inject post_install hook: expected 'post_install do |installer|' in Podfile");e=o}return s.writeFileSync(t,e),i})]);export{f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTVASK7FQjs = require('./chunk-TVASK7FQ.js');var _chunkIJN37RF2js = require('./chunk-IJN37RF2.js');var r=_chunkIJN37RF2js.e.call(void 0, (s,i)=>{i.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABPElEQVR4AdzVW1ICMRCF4ajL8FnXoetwLZZaLkzX4VpU6C+kh2Go4RZ4gcrJpZP+TxJCcVsu/Lkug/e4rb/QolO/kY8VTSl5RQJvEclxdE8ud5GJhTkYvEZQeYzqplMYgSiVmTvO9sVMp+5bfmXWqgU0w9EMTpBr+RrnTQ3MMfFFW2x8iJ5ikRy50V2XqcFzTH2EFIv3mQDbMcn5jgojmlWZGlgAOjaxM7FVxroWA2YiKgccw7hqalCDUUn2miTFsORpwAhYzBwgsBzjDc0Z5CJJYxNgYmINMDEx3tI+AwlMxqcBYyqmb82sDjHI5DSyY/2M72yPMdgJmpu8HoP/dsSH1vY0yajMvKLPRvyJ1g+rRxiBKZWZBl6Fp1ddzXYIAwtz+D/AE/Bn4X33CAMLc8OgBs5d5RWdmzvwlgAAAP//5FxmQQAAAAZJREFUAwDOiFAxJLPlDQAAAABJRU5ErkJggg=="});var _jsxruntime = require('react/jsx-runtime');function f({size:I=22,color:c,strokeWidth:p=2}){return _jsxruntime.jsx.call(void 0, _chunkTVASK7FQjs.a,{source:r(),size:I,color:c})}exports.a = f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-WGBLUFWU.mjs";import{a as e}from"./chunk-4P5ABAFD.mjs";import{jsx as t}from"react/jsx-runtime";function i(d){return t(o,e({},d))}export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6YOO7OTVjs = require('./chunk-6YOO7OTV.js');var _commonsdkbase = require('@crossmint/common-sdk-base');function a(i,t){return new (0, _commonsdkbase.CrossmintApiClient)(i,{internalConfig:{sdkMetadata:{name:"@crossmint/client-sdk-react-native-ui",version:_chunk6YOO7OTVjs.a.version},apiKeyExpectations:t}})}exports.a = a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o={name:"@crossmint/client-sdk-react-native-ui",version:"1.0.0-beta.7",repository:"https://github.com/Crossmint/crossmint-sdk",license:"Apache-2.0",author:"Paella Labs Inc",sideEffects:!1,main:"./dist/index.js",module:"./dist/index.mjs",types:"./dist/index.d.ts",files:["dist","app.plugin.js","LICENSE"],scripts:{build:"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup",dev:"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup --watch","generate:docs":"typedoc && node scripts/generate-reference.mjs"},dependencies:{"@crossmint/client-sdk-auth":"workspace:*","@crossmint/client-sdk-base":"workspace:*","@crossmint/client-sdk-react-base":"workspace:*","@crossmint/client-sdk-rn-window":"workspace:*","@crossmint/client-signers":"workspace:*","@crossmint/common-sdk-auth":"workspace:*","@crossmint/common-sdk-base":"workspace:*","@crossmint/wallets-sdk":"workspace:*","@solana/web3.js":"1.98.1",bs58:"^5.0.0","lodash.clonedeep":"4.5.0","lodash.isequal":"4.5.0",mitt:"3.0.1",zod:"3.22.4","@crossmint/expo-device-signer":"workspace:*"},devDependencies:{"@expo/config-plugins":"^9.0.17",typedoc:"0.28.16","@types/react":"19.1.10","expo-constants":"~18.0.9","expo-device":"~8.0.9","expo-secure-store":"~15.0.7","expo-web-browser":"~15.0.8"},peerDependencies:{"@crossmint/expo-device-signer":"0.1.0-beta.5","@expo/config-plugins":">=9.0.0","@solana/web3.js":"^1.98.1","expo-constants":">=17 <19","expo-device":">=7 <9","expo-secure-store":">=14 <16","expo-web-browser":">=14 <16",react:">=17.0.2","react-native":">=0.74.3","react-native-webview":">=13.15.0 <14"},peerDependenciesMeta:{"@crossmint/expo-device-signer":{optional:!0}}};export{o as a};
|
|
@@ -1 +1 @@
|
|
|
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 _chunkQODMJ5UYjs = require('./chunk-QODMJ5UY.js');var _react = require('react');var _expoconstants = require('expo-constants'); var _expoconstants2 = _interopRequireDefault(_expoconstants);var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');var l=_clientsdkreactbase.createLoggerContext.call(void 0, );function I({children:a,apiKey:o,overrideBaseUrl:C,consoleLogLevel:r}){var e,t,i,s,n;let g=_react.useMemo.call(void 0, ()=>_chunkQODMJ5UYjs.a.call(void 0, o,r),[o,r]),c=(n=(t=(e=_expoconstants2.default.expoConfig)==null?void 0:e.ios)==null?void 0:t.bundleIdentifier)!=null?n:(s=(i=_expoconstants2.default.expoConfig)==null?void 0:i.android)==null?void 0:s.package;return _jsxruntime.jsx.call(void 0, l.Provider,{value:g,children:_jsxruntime.jsx.call(void 0, _clientsdkreactbase.CrossmintProvider,{apiKey:o,appId:c,overrideBaseUrl:C,children:a})})}exports.a = l; exports.b = I;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTVASK7FQjs = require('./chunk-TVASK7FQ.js');var _chunkIJN37RF2js = require('./chunk-IJN37RF2.js');var r=_chunkIJN37RF2js.e.call(void 0, (f,c)=>{c.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABV0lEQVR4AdzUXVKDQBAEYPRi6snUk+nNdL4pmiIEE5DkJSl6l52Z7t4/8jzc+fdYBq+1W1+Fn4Og8VEa/WSLBCSYdOJAQ+O9+PohBi8V8HxW83QQNEpiYDIZtJvoDfA9arRmVjDG2tV2Zby3x7XVE29pIGFpDlqx8RaYLQ7uSf3S4K2y8z28ZkLYjKGog+2hMeS3NFBAdG5iZmLhpBcjzEQMhzgN48bSoIPVILtNSDWczoYYEM52EFSLo/YEfxmkCGluQhiYEDZjSP1Zf80AgYkZxoiwd8Le1SwhD9N3sCxYG8eIsPe1msTkYZdByLv6LVu0S3Asdk53WwFxl6C9soIcVrt2ZlujHlIdcXodj0GfeFW52z6sS2hi1Xr8C+MQBjMn7iLIT4csyETfiY0NIRzC4F1somcFAmYm6c5fgjr1AU4m5z3x7ucGHfhnw/RMnNatDGit4hcAAP//I+bVpgAAAAZJREFUAwC4slUxPmyOTgAAAABJRU5ErkJggg=="});var _jsxruntime = require('react/jsx-runtime');function b({size:i=22,color:n,strokeWidth:t=2}){return _jsxruntime.jsx.call(void 0, _chunkTVASK7FQjs.a,{source:r(),size:i,color:n})}exports.a = b;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-7JGGPJBX.mjs";import{e as i}from"./chunk-4P5ABAFD.mjs";var r=i((t,c)=>{c.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABMElEQVR4AezRy20CMRAGYJQiUkcuSQu5pNxc0kJySR1Uwf+hNQ+tx14hIS4gDzue/7UML7s7f54B0wU/bEW/eTX1mufs4OCqFXf0C97D/k4xyKN7YDi4XUIV8BX2X4qQAaNcr44ZDAeX5orgUgXsAxIQMmDEMOPj0ZvBcHBpjuDlVxWAQ0DIgBFDxkpvBsPBpVnVKACZkAEjhj8ZKr0ZDCfj/pkFUDFg9J/L21J6M1hG9dkSUKs3IFsC2s69vTdXev8DbBgzC2DAqO38M27K/s1gOBn3zyiAkAEjhm3n9q43g+HgdhOqAAJCBowYMm4mejMYDi5Nw0/PKoCAkAEjhifR0pjBcHBpFuj8qAIwCBkwcu8VDAe3h++qgI+wFYO0w4ODq1bEKmBFvHXwDJhu7gAAAP//FX4TdAAAAAZJREFUAwAkFUAxInh9owAAAABJRU5ErkJggg=="});import{jsx as e}from"react/jsx-runtime";function u({size:p=16,color:n,strokeWidth:I=2}){return e(o,{source:r(),size:p,color:n})}export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _reactnative = require('react-native');var _jsxruntime = require('react/jsx-runtime');function P({source:o,size:e=22,color:r}){return _jsxruntime.jsx.call(void 0, _reactnative.Image,{source:typeof o=="string"?{uri:o}:o,resizeMode:"contain",style:{width:e,height:e,tintColor:r}})}exports.a = P;
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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 _chunkIJN37RF2js = require('./chunk-IJN37RF2.js');var _exposecurestore = require('expo-secure-store'); var e = _interopRequireWildcard(_exposecurestore);var i=class{get(t){return _chunkIJN37RF2js.f.call(void 0, this,null,function*(){try{let r=yield e.getItemAsync(t);if(!r)return;try{let o=JSON.parse(r);if(o.expiresAt&&new Date(o.expiresAt)<new Date){yield this.remove(t);return}return o.value}catch(o){return r}}catch(r){console.error("Error reading from SecureStore:",r);return}})}set(t,r,o){return _chunkIJN37RF2js.f.call(void 0, this,null,function*(){try{if(o){let s=JSON.stringify({value:r,expiresAt:o});yield e.setItemAsync(t,s)}else yield e.setItemAsync(t,r)}catch(s){console.error("Error writing to SecureStore:",s)}})}remove(t){return _chunkIJN37RF2js.f.call(void 0, this,null,function*(){try{yield e.deleteItemAsync(t)}catch(r){console.error("Error removing from SecureStore:",r)}})}isAvailable(){return _chunkIJN37RF2js.f.call(void 0, this,null,function*(){try{return yield e.isAvailableAsync()}catch(t){return!1}})}};exports.a = i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-335OOXYN.mjs";import{useMemo as v}from"react";import d from"expo-constants";import{CrossmintProvider as f,createLoggerContext as P}from"@crossmint/client-sdk-react-base";import{jsx as p}from"react/jsx-runtime";var l=P();function N({children:a,apiKey:o,overrideBaseUrl:C,consoleLogLevel:r}){var e,t,i,s,n;let g=v(()=>m(o,r),[o,r]),c=(n=(t=(e=d.expoConfig)==null?void 0:e.ios)==null?void 0:t.bundleIdentifier)!=null?n:(s=(i=d.expoConfig)==null?void 0:i.android)==null?void 0:s.package;return p(l.Provider,{value:g,children:p(f,{apiKey:o,appId:c,overrideBaseUrl:C,children:a})})}export{l as a,N as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as C}from"./chunk-XZ5LQIRB.mjs";import{a as S}from"./chunk-TSRZEXRU.mjs";import{a as k}from"./chunk-NG4FYS2Z.mjs";import{a as T}from"./chunk-WDMEQNBX.mjs";import{a as f}from"./chunk-QHTHMZZV.mjs";import{a as e}from"./chunk-7USVT6EZ.mjs";import{View as d,StyleSheet as R,Dimensions as B,Modal as z,TouchableOpacity as D,Text as w}from"react-native";import{jsx as t,jsxs as P}from"react/jsx-runtime";var{width:V}=B.get("window");function L({phone:i,open:n,setOpen:v,step:O,onSubmitOTP:x,onResendOTPCode:I,onSubmitPhone:M,rejectRef:r,appearance:o}){var m,u,c,g,y,b;function s(){var h;n&&((h=r.current)==null||h.call(r,new Error("User cancelled")),v(!1))}let l=R.create({modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",padding:16},modalContainer:{backgroundColor:((m=o==null?void 0:o.colors)==null?void 0:m.background)||e["cm-background-primary"],borderRadius:(o==null?void 0:o.borderRadius)||12,padding:32,width:Math.min(V-32,400),maxHeight:"80%",position:"relative",alignItems:"center",shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:4,elevation:5},closeButton:{position:"absolute",top:16,right:16,width:32,height:32,borderRadius:6,backgroundColor:((u=o==null?void 0:o.colors)==null?void 0:u.inputBackground)||e["cm-muted-primary"],alignItems:"center",justifyContent:"center",zIndex:1}});return n?t(z,{visible:n,transparent:!0,animationType:"fade",onRequestClose:s,statusBarTranslucent:!0,children:t(d,{style:l.modalOverlay,children:P(d,{style:l.modalContainer,children:[t(D,{style:l.closeButton,onPress:s,hitSlop:{top:10,bottom:10,left:10,right:10},children:t(S,{size:16,color:((c=o==null?void 0:o.colors)==null?void 0:c.textSecondary)||e["cm-text-secondary"]})}),O==="initial"?t(T,{contactInfo:i!=null?i:"",contactType:"phone",icon:t(f,{size:22,color:((g=o==null?void 0:o.colors)==null?void 0:g.textPrimary)||e["cm-text-primary"]}),onConfirm:M,onCancel:s,appearance:o}):t(k,{contactInfo:i!=null?i:"",contactType:"phone",icon:t(d,{style:{backgroundColor:((y=o==null?void 0:o.colors)==null?void 0:y.accent)||e["cm-accent"],borderRadius:999,padding:12},children:t(C,{size:22,color:((b=o==null?void 0:o.colors)==null?void 0:b.background)||e["cm-background-primary"]})}),title:"Check your phone",description:P(w,{children:["A temporary login code has been sent via SMS to"," ",t(w,{style:{fontWeight:"bold"},children:i})]}),helpText:`Can't receive the SMS? Check your phone number.
|
|
2
|
+
Some messages may take several minutes to arrive.`,onSubmitOTP:x,onResendCode:I,appearance:o,otpLength:10,keyboardType:"number-pad",autoComplete:"sms-otp",textContentType:"oneTimeCode"})]})})}):null}export{L as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./chunk-7USVT6EZ.mjs";import{
|
|
1
|
+
import{a as i}from"./chunk-7USVT6EZ.mjs";import{f as w}from"./chunk-4P5ABAFD.mjs";import{useState as P}from"react";import{View as d,Text as n,TouchableOpacity as k,StyleSheet as W,ActivityIndicator as H}from"react-native";import{jsx as r,jsxs as s}from"react/jsx-runtime";function N({contactInfo:I,contactType:e,icon:v,onConfirm:z,onCancel:R,appearance:t}){var u,g,f,b,x,C,h,T,S,B;let[l,m]=P(!1),[c,y]=P(null),V=()=>w(this,null,function*(){m(!0),y(null);try{yield z()}catch(A){console.error(`Failed to send ${e} code`,A),y(`Failed to send ${e==="email"?"email":"SMS"}. Please try again.`)}finally{m(!1)}}),o=W.create({container:{width:"100%"},title:{fontSize:24,fontWeight:"600",color:((u=t==null?void 0:t.colors)==null?void 0:u.textPrimary)||i["cm-text-primary"],textAlign:"center",marginBottom:8},description:{fontSize:16,color:((g=t==null?void 0:t.colors)==null?void 0:g.textSecondary)||i["cm-text-secondary"],textAlign:"center",marginBottom:24,lineHeight:22},contactContainer:{borderWidth:1,borderColor:((f=t==null?void 0:t.colors)==null?void 0:f.border)||i["cm-border"],borderRadius:(t==null?void 0:t.borderRadius)||12,padding:16,marginBottom:24,flexDirection:"row",alignItems:"center"},contactText:{fontSize:16,color:((b=t==null?void 0:t.colors)==null?void 0:b.textPrimary)||i["cm-text-primary"],marginLeft:12,flex:1},errorText:{fontSize:14,color:((x=t==null?void 0:t.colors)==null?void 0:x.danger)||i["cm-danger"],textAlign:"center",marginBottom:16},buttonContainer:{flexDirection:"row",gap:12},button:{flex:1,paddingVertical:16,paddingHorizontal:24,borderRadius:999,alignItems:"center",justifyContent:"center",minHeight:52},primaryButton:{backgroundColor:((C=t==null?void 0:t.colors)==null?void 0:C.accent)||i["cm-accent"]},secondaryButton:{backgroundColor:"transparent",borderWidth:1,borderColor:((h=t==null?void 0:t.colors)==null?void 0:h.border)||i["cm-border"]},disabledButton:{opacity:.6},buttonText:{fontSize:16,fontWeight:"500",color:((T=t==null?void 0:t.colors)==null?void 0:T.background)||i["cm-background-primary"]},secondaryButtonText:{color:((S=t==null?void 0:t.colors)==null?void 0:S.textPrimary)||i["cm-text-primary"]}});return s(d,{style:o.container,children:[r(n,{style:o.title,children:"Confirm it's you"}),s(n,{style:o.description,children:["You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code",e==="phone"?" via SMS":"","."]}),s(d,{style:o.contactContainer,children:[v,r(n,{style:o.contactText,children:I})]}),c&&r(n,{style:o.errorText,children:c}),s(d,{style:o.buttonContainer,children:[r(k,{style:[o.button,o.secondaryButton],onPress:R,disabled:l,children:r(n,{style:[o.buttonText,o.secondaryButtonText],children:"Cancel"})}),r(k,{style:[o.button,o.primaryButton,l&&o.disabledButton],onPress:V,disabled:l,children:l?r(H,{color:((B=t==null?void 0:t.colors)==null?void 0:B.background)||i["cm-background-primary"]}):r(n,{style:o.buttonText,children:"Send code"})})]})]})}export{N as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as y}from"./chunk-ZP2QWJOD.mjs";import{c as h}from"./chunk-PCJMDUSI.mjs";import{a as f}from"./chunk-DYBYU4QW.mjs";import{a as p}from"./chunk-FFQ6EQCL.mjs";import{a as d,b as m}from"./chunk-4P5ABAFD.mjs";import{useCrossmint as S}from"@crossmint/client-sdk-react-base";import{useEffect as b,useRef as l,useState as g}from"react";import{View as W}from"react-native";import{crossmintEmbeddedCheckoutV3Service as I}from"@crossmint/client-sdk-base";import{RNWebView as A,WebViewParent as M}from"@crossmint/client-sdk-rn-window";import{embeddedCheckoutV3IncomingEvents as R,embeddedCheckoutV3OutgoingEvents as O}from"@crossmint/client-sdk-base";import{jsx as c,jsxs as L}from"react/jsx-runtime";function Y(t){var u;let[e,w]=g(null),[C,v]=g(0),E=l((u=t.payment.crypto.payer)==null?void 0:u.initialChain),n=l(t);if(U(t,n.current)){let r=d({},t),o=F(t,E.current);o.shouldPreserve&&(r.payment.crypto.payer=o.updatedPayer),n.current=r}let{crossmint:i}=S(),V=f(i,{usageOrigin:"client"}),P=I({apiClient:V}),s=l(null);b(()=>{let r=s.current;if(!r||e)return;let o=new M({current:r},{incomingEvents:R,outgoingEvents:O});w(o)},[s.current,e]),b(()=>{if(e==null)return;let r=a=>v(a.height);e.on("ui:height.changed",r);let o=a=>{p.emit("order:updated",a)};return e.on("order:updated",o),()=>{e.off("ui:height.changed"),e.off("order:updated")}},[e]);let k=r=>{e&&e.handleMessage(r)};return L(W,{style:{flex:1},children:[c(A,{ref:s,globals:i.appId?{crossmintAppId:i.appId}:void 0,source:{uri:P.iframe.getUrl(n.current)},onMessage:k,style:{width:"100%",minWidth:"100%",height:C,backgroundColor:"transparent",overflow:"hidden",opacity:1,padding:0,boxShadow:"none",borderWidth:0,transform:[{translateX:0}]},allowsInlineMediaPlayback:!0,mediaPlaybackRequiresUserAction:!1,allowsBackForwardNavigationGestures:!1,allowsLinkPreview:!1,scrollEnabled:!1,bounces:!1,showsHorizontalScrollIndicator:!1,showsVerticalScrollIndicator:!1,domStorageEnabled:!0,mixedContentMode:"always",allowFileAccess:!0,allowUniversalAccessFromFileURLs:!0,geolocationEnabled:!0,userAgent:h,paymentRequestEnabled:!0}),n.current.payment.crypto.enabled?n.current.payment.crypto.payer!=null?c(y,{payer:n.current.payment.crypto.payer,webViewClient:e}):c(H,{message:"If 'payment.crypto.enabled' is true, 'payment.crypto.payer' must be provided. Support for not providing a payer is not yet implemented."}):null]})}function U(t,e){return JSON.stringify(t)!==JSON.stringify(e)}function F(t,e){return t.payment.crypto.payer&&e!=null?{shouldPreserve:!0,updatedPayer:m(d({},t.payment.crypto.payer),{initialChain:e})}:{shouldPreserve:!1}}function H({message:t}){throw new Error(t)}export{Y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEI5LOD4Yjs = require('./chunk-EI5LOD4Y.js');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEI5LOD4Yjs = require('./chunk-EI5LOD4Y.js');var _chunkIJN37RF2js = require('./chunk-IJN37RF2.js');var _react = require('react');var _reactnative = require('react-native');var _jsxruntime = require('react/jsx-runtime');function M({contactInfo:I,contactType:e,icon:v,onConfirm:z,onCancel:R,appearance:t}){var u,g,f,b,x,C,h,T,S,B;let[l,m]=_react.useState.call(void 0, !1),[c,y]=_react.useState.call(void 0, null),V=()=>_chunkIJN37RF2js.f.call(void 0, this,null,function*(){m(!0),y(null);try{yield z()}catch(A){console.error(`Failed to send ${e} code`,A),y(`Failed to send ${e==="email"?"email":"SMS"}. Please try again.`)}finally{m(!1)}}),o=_reactnative.StyleSheet.create({container:{width:"100%"},title:{fontSize:24,fontWeight:"600",color:((u=t==null?void 0:t.colors)==null?void 0:u.textPrimary)||_chunkEI5LOD4Yjs.a["cm-text-primary"],textAlign:"center",marginBottom:8},description:{fontSize:16,color:((g=t==null?void 0:t.colors)==null?void 0:g.textSecondary)||_chunkEI5LOD4Yjs.a["cm-text-secondary"],textAlign:"center",marginBottom:24,lineHeight:22},contactContainer:{borderWidth:1,borderColor:((f=t==null?void 0:t.colors)==null?void 0:f.border)||_chunkEI5LOD4Yjs.a["cm-border"],borderRadius:(t==null?void 0:t.borderRadius)||12,padding:16,marginBottom:24,flexDirection:"row",alignItems:"center"},contactText:{fontSize:16,color:((b=t==null?void 0:t.colors)==null?void 0:b.textPrimary)||_chunkEI5LOD4Yjs.a["cm-text-primary"],marginLeft:12,flex:1},errorText:{fontSize:14,color:((x=t==null?void 0:t.colors)==null?void 0:x.danger)||_chunkEI5LOD4Yjs.a["cm-danger"],textAlign:"center",marginBottom:16},buttonContainer:{flexDirection:"row",gap:12},button:{flex:1,paddingVertical:16,paddingHorizontal:24,borderRadius:999,alignItems:"center",justifyContent:"center",minHeight:52},primaryButton:{backgroundColor:((C=t==null?void 0:t.colors)==null?void 0:C.accent)||_chunkEI5LOD4Yjs.a["cm-accent"]},secondaryButton:{backgroundColor:"transparent",borderWidth:1,borderColor:((h=t==null?void 0:t.colors)==null?void 0:h.border)||_chunkEI5LOD4Yjs.a["cm-border"]},disabledButton:{opacity:.6},buttonText:{fontSize:16,fontWeight:"500",color:((T=t==null?void 0:t.colors)==null?void 0:T.background)||_chunkEI5LOD4Yjs.a["cm-background-primary"]},secondaryButtonText:{color:((S=t==null?void 0:t.colors)==null?void 0:S.textPrimary)||_chunkEI5LOD4Yjs.a["cm-text-primary"]}});return _jsxruntime.jsxs.call(void 0, _reactnative.View,{style:o.container,children:[_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:o.title,children:"Confirm it's you"}),_jsxruntime.jsxs.call(void 0, _reactnative.Text,{style:o.description,children:["You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code",e==="phone"?" via SMS":"","."]}),_jsxruntime.jsxs.call(void 0, _reactnative.View,{style:o.contactContainer,children:[v,_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:o.contactText,children:I})]}),c&&_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:o.errorText,children:c}),_jsxruntime.jsxs.call(void 0, _reactnative.View,{style:o.buttonContainer,children:[_jsxruntime.jsx.call(void 0, _reactnative.TouchableOpacity,{style:[o.button,o.secondaryButton],onPress:R,disabled:l,children:_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:[o.buttonText,o.secondaryButtonText],children:"Cancel"})}),_jsxruntime.jsx.call(void 0, _reactnative.TouchableOpacity,{style:[o.button,o.primaryButton,l&&o.disabledButton],onPress:V,disabled:l,children:l?_jsxruntime.jsx.call(void 0, _reactnative.ActivityIndicator,{color:((B=t==null?void 0:t.colors)==null?void 0:B.background)||_chunkEI5LOD4Yjs.a["cm-background-primary"]}):_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:o.buttonText,children:"Send code"})})]})]})}exports.a = M;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as A}from"./chunk-VNL4MD2H.mjs";import{a as _}from"./chunk-YMCYXFCG.mjs";import{a as H}from"./chunk-W4PUVHWF.mjs";import{a as W,b as G,f as b}from"./chunk-4P5ABAFD.mjs";import{useCallback as S,useRef as g,useMemo as E,useEffect as K,useState as ee,useContext as re}from"react";import{Platform as ne,View as te}from"react-native";import{RNWebView as ae,WebViewParent as oe}from"@crossmint/client-sdk-rn-window";import{environmentUrlConfig as z,signerInboundEvents as se,signerOutboundEvents as ie,SignerErrorCode as ce}from"@crossmint/client-signers";import{validateAPIKey as le}from"@crossmint/common-sdk-base";import{CrossmintWalletBaseProvider as ue,CrossmintWalletBaseContext as B,useCrossmint as de}from"@crossmint/client-sdk-react-base";import{NativeDeviceSignerKeyStorage as we}from"@crossmint/expo-device-signer";import{useLogger as fe}from"@crossmint/client-sdk-react-base";import{Fragment as he,jsx as p,jsxs as j}from"react/jsx-runtime";var L="Passkey signers are not supported in React Native. Use a different signer type such as 'email', 'phone', or 'device'.";function ve(c){var i,v;return c==null?!1:!!(((i=c.recovery)==null?void 0:i.type)==="passkey"||(v=c.signers)!=null&&v.some(m=>m.type==="passkey"))}function me({children:c}){let i=re(B),v=S(d=>b(this,null,function*(){var R,I;if(((R=d.recovery)==null?void 0:R.type)==="passkey"||(I=d.signers)!=null&&I.some(r=>r.type==="passkey"))throw new Error(L);return i.createWallet(d)}),[i.createWallet]),m=S(d=>b(this,null,function*(){throw new Error(L)}),[]),V=E(()=>G(W({},i),{createWallet:v,createPasskeySigner:m}),[i,v,m]);return p(B.Provider,{value:V,children:c})}function pe({children:c,createOnLogin:i,appearance:v,showOtpSignerPrompt:m=!0,callbacks:V,deviceSignerKeyStorage:d}){let R=E(()=>d!=null?d:new we,[]),{crossmint:I}=de("CrossmintWalletProvider must be used within CrossmintProvider"),r=fe(A),{apiKey:N,appId:O}=I,D=E(()=>{let e=le(N);if(!e.isValid)throw new Error("Invalid API key");return e},[N]),F=E(()=>z[D.environment],[D.environment]),y=g(null),t=g(null),[T,J]=ee(!1),C=g(!1),l=g(!1),s=g(0),M=g(0),Y=E(()=>O!=null?{crossmintAppId:O}:{},[O]),w=S(e=>b(this,null,function*(){if(t.current!=null){let n=t.current;if(l.current){r.info("react-native.wallet.webview.handshake.skip.in-progress",{trigger:e,generation:s.current});return}if(C.current&&n.isConnected){r.info("react-native.wallet.webview.handshake.skip.already-connected",{trigger:e,generation:s.current});return}l.current=!0;let a=Date.now();M.current=a;let o=s.current;try{r.info("react-native.wallet.webview.handshake.start",{trigger:e,generation:o,platform:ne.OS}),C.current=!0,n.isConnected=!1,yield n.handshakeWithChild();let u=Date.now()-a;r.info("react-native.wallet.webview.handshake.success",{trigger:e,generation:o,durationMs:u})}catch(u){let f=Date.now()-a;o===s.current&&(C.current=!1),r.error("react-native.wallet.webview.handshake.error",{trigger:e,generation:o,durationMs:f,error:u instanceof Error?u.message:String(u)}),console.error("[CrossmintWalletProvider] Handshake error:",u)}finally{o===s.current&&(l.current=!1)}}else r.warn("react-native.wallet.webview.handshake.skip",{trigger:e,reason:"parent not initialized"})}),[r]);K(()=>{y.current!=null&&t.current==null&&(r.info("react-native.wallet.webview.initializing"),t.current=new oe(y,{incomingEvents:ie,outgoingEvents:se,handshakeOptions:{timeoutMs:3e4,intervalMs:100},recovery:{recoverableErrorCodes:[ce.IndexedDbFatal]}}),r.info("react-native.wallet.webview.initialized"),w("eager"))},[T,r,w]);let $=S(()=>b(this,null,function*(){var e,n;r.info("react-native.wallet.webview.onLoadEnd",{handshakeInProgress:l.current,isConnected:(n=(e=t.current)==null?void 0:e.isConnected)!=null?n:!1,generation:s.current}),yield w("onLoadEnd")}),[r,w]),q=S(e=>{var o,u;let n=t.current;if(n==null)return;let a=e.nativeEvent.data;if(a==="frame-ready"){r.info("react-native.wallet.webview.frame-ready.received",{handshakeInProgress:l.current,isConnected:(u=(o=t.current)==null?void 0:o.isConnected)!=null?u:!1,generation:s.current,msSinceHandshakeStart:M.current>0?Date.now()-M.current:null}),w("frame-ready");return}try{let f=JSON.parse(a);if(f&&typeof f.type=="string"&&f.type.startsWith("console.")){let x=f.type.split(".")[1],U=(f.data||[]).map(h=>{try{return h==="[Function]"||h==="[Circular Reference]"||h==="[Unserializable Object]"?h:JSON.parse(h)}catch(be){return h}}),k=`react-native.wallet.webview.console.${x}`,P={webview_args:U};switch(x){case"log":r.info(k,P);break;case"error":r.error(k,P);break;case"warn":r.warn(k,P);break;case"info":r.info(k,P);break;case"debug":r.debug(k,P);break;default:r.info("react-native.wallet.webview.console.unknown",{webview_method:x,webview_args:U})}return}}catch(f){}n.handleMessage(e)},[r,w]),Q=()=>{if(t.current==null)throw new Error("WebView not ready or handshake incomplete");return t.current},X=({emailSignerProps:e,phoneSignerProps:n})=>m?j(he,{children:[p(_,W({},e)),p(H,W({},n))]}):null,Z=()=>b(this,null,function*(){r.info("react-native.wallet.webview.init.start"),J(!0);let e=0,n=100;for(;t.current==null&&e<n;)yield new Promise(a=>setTimeout(a,50)),e++;if(t.current==null)throw r.error("react-native.wallet.webview.init.timeout",{attempts:e}),new Error("WebView not ready or handshake incomplete");r.info("react-native.wallet.webview.init.success",{attempts:e})});return K(()=>{if(ve(i))throw new Error(L)},[i]),j(ue,{createOnLogin:i,appearance:v,showOtpSignerPrompt:m,initializeWebView:Z,callbacks:V,renderUI:X,clientTEEConnection:Q,deviceSignerKeyStorage:R,children:[p(me,{children:c}),T&&p(te,{style:{position:"absolute",width:0,height:0,overflow:"hidden"},children:p(ae,{ref:y,source:{uri:F},globals:Y,onLoadEnd:$,onMessage:q,onError:e=>{console.error("[CrossmintWalletProvider] WebView error:",e.nativeEvent)},onHttpError:e=>{console.error("[CrossmintWalletProvider] WebView HTTP error:",e.nativeEvent)},onContentProcessDidTerminate:()=>{var n,a,o;let e=s.current;s.current++,r.warn("react-native.wallet.webview.process.terminated",{prevGeneration:e,newGeneration:s.current,wasConnected:(a=(n=t.current)==null?void 0:n.isConnected)!=null?a:!1,hadHandshakeInProgress:l.current}),C.current=!1,l.current=!1,t.current!=null&&(t.current.isConnected=!1),(o=y.current)==null||o.reload(),w("eager")},onRenderProcessGone:()=>{var n,a,o;let e=s.current;s.current++,r.warn("react-native.wallet.webview.process.renderGone",{prevGeneration:e,newGeneration:s.current,wasConnected:(a=(n=t.current)==null?void 0:n.isConnected)!=null?a:!1,hadHandshakeInProgress:l.current}),C.current=!1,l.current=!1,t.current!=null&&(t.current.isConnected=!1),(o=y.current)==null||o.reload(),w("eager")},style:{width:1,height:1},javaScriptCanOpenWindowsAutomatically:!1,thirdPartyCookiesEnabled:!1,sharedCookiesEnabled:!1,incognito:!1,setSupportMultipleWindows:!1,originWhitelist:[z[D.environment]],cacheEnabled:!0,cacheMode:"LOAD_DEFAULT"})})]})}function Me(c){return p(pe,W({},c))}export{Me as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-7JGGPJBX.mjs";import{e as I}from"./chunk-4P5ABAFD.mjs";var r=I((t,e)=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAxUlEQVR4AeyVbQrCQAxEqx5F9Gyi51E8m+JR/Ji3mIXQlM0PhUK3ZJZt8oa0oXTXw5+vqQZn9X1K76Rg8Qj3ETUAPAqLakqHAYsHrwMouIRuDhKx17JKClboYF72RVEDy90LkVuMNW91jRK18qNNb9AcZB9RH1FzAk1geV/RTTN5SOmY3Yj472/Tjy8weoOX8sSOJSljzVttUYPrt8q8s2cyLDbzsi+KGpxUuUijp1FuKmDx4HVM1AAAcKNN9kyGxSOLjw8AAAD//6BjmDAAAAAGSURBVAMAy+IoMbHLqDcAAAAASUVORK5CYII="});import{jsx as m}from"react/jsx-runtime";function u({size:n=22,color:p,strokeWidth:c=2}){return m(o,{source:r(),size:n,color:p})}export{u as a};
|
|
File without changes
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as w}from"./chunk-TSRZEXRU.mjs";import{a as T}from"./chunk-NG4FYS2Z.mjs";import{a as k}from"./chunk-WDMEQNBX.mjs";import{a as f}from"./chunk-C7S2X5RD.mjs";import{a as C}from"./chunk-J62V5BQX.mjs";import{a as e}from"./chunk-7USVT6EZ.mjs";import{View as l,Modal as M,StyleSheet as R,Dimensions as B,TouchableOpacity as E,Text as x}from"react-native";import{jsx as t,jsxs as I}from"react/jsx-runtime";var{width:z}=B.get("window");function X({email:i,open:n,setOpen:S,step:O,onSubmitOTP:v,onResendOTPCode:P,onSubmitEmail:V,rejectRef:r,appearance:o}){var m,u,c,g,b,h;function s(){var y;n&&((y=r.current)==null||y.call(r,new Error),S(!1))}let d=R.create({centeredView:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",padding:16},modalView:{backgroundColor:((m=o==null?void 0:o.colors)==null?void 0:m.background)||e["cm-background-primary"],borderRadius:(o==null?void 0:o.borderRadius)||12,padding:32,alignItems:"center",width:Math.min(z-32,400),maxHeight:"80%",position:"relative",shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:4,elevation:5},closeButton:{position:"absolute",top:16,right:16,width:32,height:32,borderRadius:6,backgroundColor:((u=o==null?void 0:o.colors)==null?void 0:u.inputBackground)||e["cm-muted-primary"],alignItems:"center",justifyContent:"center",zIndex:1}});return n?t(M,{visible:n,transparent:!0,animationType:"fade",onRequestClose:s,statusBarTranslucent:!0,children:t(l,{style:d.centeredView,children:I(l,{style:d.modalView,children:[t(E,{style:d.closeButton,onPress:s,hitSlop:{top:10,bottom:10,left:10,right:10},children:t(w,{size:16,color:((c=o==null?void 0:o.colors)==null?void 0:c.textSecondary)||e["cm-text-secondary"]})}),O==="initial"?t(k,{contactInfo:i!=null?i:"",contactType:"email",icon:t(C,{size:22,color:((g=o==null?void 0:o.colors)==null?void 0:g.textPrimary)||e["cm-text-primary"]}),onConfirm:V,onCancel:s,appearance:o}):t(T,{contactInfo:i!=null?i:"",contactType:"email",icon:t(l,{style:{backgroundColor:((b=o==null?void 0:o.colors)==null?void 0:b.accent)||e["cm-accent"],borderRadius:999,padding:12},children:t(f,{size:22,color:((h=o==null?void 0:o.colors)==null?void 0:h.background)||e["cm-background-primary"]})}),title:"Check your email",description:I(x,{children:["A temporary login code has been sent to"," ",t(x,{style:{fontWeight:"bold"},children:i})]}),helpText:`Can't find the email? Check spam folder.
|
|
2
|
+
Some emails may take several minutes to arrive.`,onSubmitOTP:v,onResendCode:P,appearance:o,otpLength:9,keyboardType:"default",autoComplete:"one-time-code",textContentType:"oneTimeCode"})]})})}):null}export{X as a};
|
|
@@ -1 +1 @@
|
|
|
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; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
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; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkU3CLRKGHjs = require('./chunk-U3CLRKGH.js');var _chunkIJN37RF2js = require('./chunk-IJN37RF2.js');var _react = require('react');var _expowebbrowser = require('expo-web-browser'); var n = _interopRequireWildcard(_expowebbrowser);var _expoconstants = require('expo-constants'); var _expoconstants2 = _interopRequireDefault(_expoconstants);var _reactnative = require('react-native');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');function U(){let r=_react.useContext.call(void 0, w);if(r==null)throw new Error("useCrossmintAuth must be used within a CrossmintAuthProvider");return r}var _jsxruntime = require('react/jsx-runtime');var W={google:null,twitter:null},F={crossmintAuth:void 0,login:()=>{},logout:()=>_chunkIJN37RF2js.f.call(void 0, void 0,null,function*(){}),jwt:void 0,user:void 0,status:"initializing",getUser:()=>{},loginWithOAuth:()=>Promise.resolve(),createAuthSession:()=>Promise.resolve(null)},w= exports.a =_react.createContext.call(void 0, F);function G({children:r}){let{setJwt:e}=_clientsdkreactbase.useCrossmint.call(void 0, ),{jwt:t}=U();return _react.useEffect.call(void 0, ()=>{e(t)},[e,t]),r}function V({children:r,appSchema:e}){let t=_clientsdkreactbase.useCrossmintAuthBase.call(void 0, ),[h,g]=_react.useState.call(void 0, W),[f,i]=_react.useState.call(void 0, !1),A=Array.isArray(e)?e[0]:e,P=_expoconstants2.default.executionEnvironment==="storeClient"||_expoconstants2.default.appOwnership==="expo"||!!_expoconstants2.default.expoVersion?"exp://127.0.0.1:8081":A,y=_react.useCallback.call(void 0, ()=>_chunkIJN37RF2js.f.call(void 0, this,null,function*(){try{let u=Object.keys(W).map(s=>_chunkIJN37RF2js.f.call(void 0, this,null,function*(){var m;let l=yield(m=t.crossmintAuth)==null?void 0:m.getOAuthUrl(s,{appSchema:P});return{[s]:l}})),a=Object.assign({},...yield Promise.all(u));g(a)}catch(o){console.error(o)}}),[t.crossmintAuth,P]);_react.useEffect.call(void 0, ()=>{t.user==null&&y()},[y,t.user]);let N=()=>t.status==="initializing"?"initializing":f?"in-progress":t.jwt!=null?"logged-in":"logged-out",E=o=>_chunkIJN37RF2js.f.call(void 0, this,null,function*(){var u,a;try{i(!0);let s=(a=h[o])!=null?a:yield(u=t.crossmintAuth)==null?void 0:u.getOAuthUrl(o,{appSchema:P});yield n.warmUpAsync();let l=new URL(s);if(o==="google"&&l.searchParams.append("provider_prompt","select_account"),_reactnative.Platform.OS==="android")yield n.openBrowserAsync(l.toString());else{let m=yield n.openAuthSessionAsync(l.toString());m.type==="success"&&(yield x(m.url))}yield n.coolDownAsync()}catch(s){throw console.error("[CrossmintAuthProvider] Error during OAuth login:",s),new Error(`Error during OAuth login: ${s}`)}finally{i(!1)}}),x=_react.useCallback.call(void 0, o=>_chunkIJN37RF2js.f.call(void 0, this,null,function*(){var a;let u=o.includes("://")?_(o):o;if(u!=null)try{return i(!0),yield(a=t.crossmintAuth)==null?void 0:a.handleRefreshAuthMaterial(u)}catch(s){throw s}finally{i(!1)}return null}),[t.crossmintAuth]);return _jsxruntime.jsx.call(void 0, w.Provider,{value:{crossmintAuth:t.crossmintAuth,logout:t.logout,jwt:t.jwt,user:t.user,status:N(),getUser:t.getUser,login:()=>{},loginWithOAuth:E,createAuthSession:x},children:_jsxruntime.jsx.call(void 0, G,{children:r})})}function ut(t){var h=t,{children:r}=h,e=_chunkIJN37RF2js.d.call(void 0, h,["children"]);var i,A;let g=(A=e.appSchema)!=null?A:(i=_expoconstants2.default.expoConfig)==null?void 0:i.scheme,f=_react.useMemo.call(void 0, ()=>{var C;return(C=e.storageProvider)!=null?C:new _chunkU3CLRKGHjs.a},[e.storageProvider]);return _jsxruntime.jsx.call(void 0, _clientsdkreactbase.CrossmintAuthBaseProvider,{onLoginSuccess:e.onLoginSuccess,refreshRoute:e.refreshRoute,logoutRoute:e.logoutRoute,storageProvider:f,children:_jsxruntime.jsx.call(void 0, V,{appSchema:g,children:r})})}var _=r=>{let e=/[?&]oneTimeSecret=([^&#]+)/,t=r.match(e);return t?decodeURIComponent(t[1]):void 0};exports.a = w; exports.b = ut; exports.c = U; exports.d = _clientsdkreactbase.useCrossmint; exports.e = _clientsdkreactbase.useWallet; exports.f = _clientsdkreactbase.useWalletOtpSigner;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{f as o}from"./chunk-4P5ABAFD.mjs";import{useEffect as a}from"react";function u({payer:r,webViewClient:e}){return a(()=>{if(e==null)return;let t=e.on("crypto:send-transaction",l=>o(this,[l],function*({chain:s,serializedTransaction:c}){try{yield r.handleChainSwitch(s);let n=yield r.handleSignAndSendTransaction(c);n.success?e.send("crypto:send-transaction:success",{txId:n.txId}):e.send("crypto:send-transaction:failed",{error:n.errorMessage})}catch(n){console.error("[PayerConnectionHandler] Failed to send transaction",n),e.send("crypto:send-transaction:failed",{error:n.message||"An unknown error occurred"})}}));return()=>{e.off(t)}},[e]),null}export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4MOBXEX6js = require('./chunk-4MOBXEX6.js');var _chunkIJN37RF2js = require('./chunk-IJN37RF2.js');var _jsxruntime = require('react/jsx-runtime');function s(d){return _jsxruntime.jsx.call(void 0, _chunk4MOBXEX6js.a,_chunkIJN37RF2js.a.call(void 0, {},d))}exports.a = s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-DKQZSNOO.js');require('../../chunk-72MMCJ2E.js');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-DKQZSNOO.js');require('../../chunk-72MMCJ2E.js');var _chunkZQ2BJNI7js = require('../../chunk-ZQ2BJNI7.js');require('../../chunk-4MOBXEX6.js');require('../../chunk-2UY6GCV3.js');require('../../chunk-YQEWHOQ7.js');require('../../chunk-SQMKAGYM.js');require('../../chunk-2D2RJCVX.js');require('../../chunk-6YOO7OTV.js');require('../../chunk-IJN37RF2.js');exports.CrossmintEmbeddedCheckout = _chunkZQ2BJNI7js.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../chunk-TIQGKXQA.mjs";import"../../chunk-MB7H3PBJ.mjs";import{a}from"../../chunk-
|
|
1
|
+
import"../../chunk-TIQGKXQA.mjs";import"../../chunk-MB7H3PBJ.mjs";import{a}from"../../chunk-SAPISWWH.mjs";import"../../chunk-WGBLUFWU.mjs";import"../../chunk-ZP2QWJOD.mjs";import"../../chunk-PCJMDUSI.mjs";import"../../chunk-DYBYU4QW.mjs";import"../../chunk-FFQ6EQCL.mjs";import"../../chunk-ST55IDAQ.mjs";import"../../chunk-4P5ABAFD.mjs";export{a as CrossmintEmbeddedCheckout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZQ2BJNI7js = require('../../../chunk-ZQ2BJNI7.js');require('../../../chunk-4MOBXEX6.js');require('../../../chunk-2UY6GCV3.js');require('../../../chunk-YQEWHOQ7.js');require('../../../chunk-SQMKAGYM.js');require('../../../chunk-2D2RJCVX.js');require('../../../chunk-6YOO7OTV.js');require('../../../chunk-IJN37RF2.js');exports.CrossmintEmbeddedCheckout = _chunkZQ2BJNI7js.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-SAPISWWH.mjs";import"../../../chunk-WGBLUFWU.mjs";import"../../../chunk-ZP2QWJOD.mjs";import"../../../chunk-PCJMDUSI.mjs";import"../../../chunk-DYBYU4QW.mjs";import"../../../chunk-FFQ6EQCL.mjs";import"../../../chunk-ST55IDAQ.mjs";import"../../../chunk-4P5ABAFD.mjs";export{a as CrossmintEmbeddedCheckout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4MOBXEX6js = require('../../../chunk-4MOBXEX6.js');require('../../../chunk-2UY6GCV3.js');require('../../../chunk-YQEWHOQ7.js');require('../../../chunk-SQMKAGYM.js');require('../../../chunk-2D2RJCVX.js');require('../../../chunk-6YOO7OTV.js');require('../../../chunk-IJN37RF2.js');exports.EmbeddedCheckoutV3WebView = _chunk4MOBXEX6js.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-WGBLUFWU.mjs";import"../../../chunk-ZP2QWJOD.mjs";import"../../../chunk-PCJMDUSI.mjs";import"../../../chunk-DYBYU4QW.mjs";import"../../../chunk-FFQ6EQCL.mjs";import"../../../chunk-ST55IDAQ.mjs";import"../../../chunk-4P5ABAFD.mjs";export{a as EmbeddedCheckoutV3WebView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2UY6GCV3js = require('../../../../chunk-2UY6GCV3.js');require('../../../../chunk-IJN37RF2.js');exports.PayerConnectionHandler = _chunk2UY6GCV3js.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../../chunk-
|
|
1
|
+
import{a}from"../../../../chunk-ZP2QWJOD.mjs";import"../../../../chunk-4P5ABAFD.mjs";export{a as PayerConnectionHandler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../../chunk-72MMCJ2E.js');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../../chunk-72MMCJ2E.js');var _chunkZQ2BJNI7js = require('../../../chunk-ZQ2BJNI7.js');require('../../../chunk-4MOBXEX6.js');require('../../../chunk-2UY6GCV3.js');require('../../../chunk-YQEWHOQ7.js');require('../../../chunk-SQMKAGYM.js');require('../../../chunk-2D2RJCVX.js');require('../../../chunk-6YOO7OTV.js');require('../../../chunk-IJN37RF2.js');exports.CrossmintEmbeddedCheckout = _chunkZQ2BJNI7js.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../chunk-MB7H3PBJ.mjs";import{a}from"../../../chunk-
|
|
1
|
+
import"../../../chunk-MB7H3PBJ.mjs";import{a}from"../../../chunk-SAPISWWH.mjs";import"../../../chunk-WGBLUFWU.mjs";import"../../../chunk-ZP2QWJOD.mjs";import"../../../chunk-PCJMDUSI.mjs";import"../../../chunk-DYBYU4QW.mjs";import"../../../chunk-FFQ6EQCL.mjs";import"../../../chunk-ST55IDAQ.mjs";import"../../../chunk-4P5ABAFD.mjs";export{a as CrossmintEmbeddedCheckout};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTQIJ7OZDjs = require('../../chunk-TQIJ7OZD.js');require('../../chunk-TVASK7FQ.js');require('../../chunk-IJN37RF2.js');exports.MailCheckIcon = _chunkTQIJ7OZDjs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../chunk-C7S2X5RD.mjs";import"../../chunk-7JGGPJBX.mjs";import"../../chunk-4P5ABAFD.mjs";export{a as MailCheckIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkRIKAIN6Njs = require('../../chunk-RIKAIN6N.js');require('../../chunk-TVASK7FQ.js');require('../../chunk-IJN37RF2.js');exports.MailIcon = _chunkRIKAIN6Njs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../chunk-J62V5BQX.mjs";import"../../chunk-7JGGPJBX.mjs";import"../../chunk-4P5ABAFD.mjs";export{a as MailIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2U67EBAUjs = require('../../chunk-2U67EBAU.js');require('../../chunk-TVASK7FQ.js');require('../../chunk-IJN37RF2.js');exports.PhoneIcon = _chunk2U67EBAUjs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../chunk-QHTHMZZV.mjs";import"../../chunk-7JGGPJBX.mjs";import"../../chunk-4P5ABAFD.mjs";export{a as PhoneIcon};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ImageSourcePropType } from 'react-native';
|
|
3
|
+
import { IconProps } from './types.mjs';
|
|
4
|
+
|
|
5
|
+
interface PngIconProps extends IconProps {
|
|
6
|
+
source: ImageSourcePropType;
|
|
7
|
+
}
|
|
8
|
+
declare function PngIcon({ source, size, color }: PngIconProps): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { PngIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ImageSourcePropType } from 'react-native';
|
|
3
|
+
import { IconProps } from './types.js';
|
|
4
|
+
|
|
5
|
+
interface PngIconProps extends IconProps {
|
|
6
|
+
source: ImageSourcePropType;
|
|
7
|
+
}
|
|
8
|
+
declare function PngIcon({ source, size, color }: PngIconProps): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { PngIcon };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTVASK7FQjs = require('../../chunk-TVASK7FQ.js');require('../../chunk-IJN37RF2.js');exports.PngIcon = _chunkTVASK7FQjs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../chunk-7JGGPJBX.mjs";import"../../chunk-4P5ABAFD.mjs";export{a as PngIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLHEOII54js = require('../../chunk-LHEOII54.js');require('../../chunk-TVASK7FQ.js');require('../../chunk-IJN37RF2.js');exports.SmartphoneIcon = _chunkLHEOII54js.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../chunk-XZ5LQIRB.mjs";import"../../chunk-7JGGPJBX.mjs";import"../../chunk-4P5ABAFD.mjs";export{a as SmartphoneIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkR4AKS6SVjs = require('../../chunk-R4AKS6SV.js');require('../../chunk-TVASK7FQ.js');require('../../chunk-IJN37RF2.js');exports.XIcon = _chunkR4AKS6SVjs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../chunk-TSRZEXRU.mjs";import"../../chunk-7JGGPJBX.mjs";import"../../chunk-4P5ABAFD.mjs";export{a as XIcon};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { MailCheckIcon } from './MailCheckIcon.mjs';
|
|
2
|
+
export { MailIcon } from './MailIcon.mjs';
|
|
3
|
+
export { PhoneIcon } from './PhoneIcon.mjs';
|
|
4
|
+
export { SmartphoneIcon } from './SmartphoneIcon.mjs';
|
|
5
|
+
export { XIcon } from './XIcon.mjs';
|
|
6
|
+
export { IconProps } from './types.mjs';
|
|
7
|
+
import 'react/jsx-runtime';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { MailCheckIcon } from './MailCheckIcon.js';
|
|
2
|
+
export { MailIcon } from './MailIcon.js';
|
|
3
|
+
export { PhoneIcon } from './PhoneIcon.js';
|
|
4
|
+
export { SmartphoneIcon } from './SmartphoneIcon.js';
|
|
5
|
+
export { XIcon } from './XIcon.js';
|
|
6
|
+
export { IconProps } from './types.js';
|
|
7
|
+
import 'react/jsx-runtime';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-RWTMQGU7.js');var _chunkLHEOII54js = require('../../chunk-LHEOII54.js');var _chunkR4AKS6SVjs = require('../../chunk-R4AKS6SV.js');var _chunkTQIJ7OZDjs = require('../../chunk-TQIJ7OZD.js');var _chunkRIKAIN6Njs = require('../../chunk-RIKAIN6N.js');var _chunk2U67EBAUjs = require('../../chunk-2U67EBAU.js');require('../../chunk-TVASK7FQ.js');require('../../chunk-IJN37RF2.js');exports.MailCheckIcon = _chunkTQIJ7OZDjs.a; exports.MailIcon = _chunkRIKAIN6Njs.a; exports.PhoneIcon = _chunk2U67EBAUjs.a; exports.SmartphoneIcon = _chunkLHEOII54js.a; exports.XIcon = _chunkR4AKS6SVjs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../chunk-YJIX6E2P.mjs";import{a as d}from"../../chunk-XZ5LQIRB.mjs";import{a as e}from"../../chunk-TSRZEXRU.mjs";import{a}from"../../chunk-C7S2X5RD.mjs";import{a as b}from"../../chunk-J62V5BQX.mjs";import{a as c}from"../../chunk-QHTHMZZV.mjs";import"../../chunk-7JGGPJBX.mjs";import"../../chunk-4P5ABAFD.mjs";export{a as MailCheckIcon,b as MailIcon,c as PhoneIcon,d as SmartphoneIcon,e as XIcon};
|