@crossmint/client-sdk-react-ui 3.1.0 → 4.0.0-beta.3
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-AC2SJG3Q.js → chunk-3KRI6RPH.js} +1 -1
- package/dist/{chunk-3VXH3OYA.cjs → chunk-3MSQQMNH.cjs} +1 -1
- package/dist/chunk-4UNNQD2T.cjs +1 -0
- package/dist/{chunk-MBD5UYIO.js → chunk-5AY3IHYU.js} +1 -1
- package/dist/{chunk-ZUZSQ7MV.js → chunk-64RAWJVF.js} +1 -1
- package/dist/chunk-7VMVFOHE.js +180 -0
- package/dist/{chunk-6O6IJTQD.cjs → chunk-B6QHHE3H.cjs} +2 -2
- package/dist/{chunk-GQCQXCRF.cjs → chunk-CXBQ7PFR.cjs} +1 -1
- package/dist/chunk-DPZOXP7S.js +1 -0
- package/dist/{chunk-EUJ5GQ5N.js → chunk-DX2X3VXF.js} +1 -1
- package/dist/{chunk-Z63AMNFC.js → chunk-EHII5VK3.js} +1 -1
- package/dist/{chunk-F7XK4JLV.cjs → chunk-EZF5VIWX.cjs} +1 -1
- package/dist/{chunk-MQ4VT3B3.js → chunk-FVLCR636.js} +1 -1
- package/dist/{chunk-AM2LP6OA.cjs → chunk-FY5C3KSC.cjs} +2 -2
- package/dist/{chunk-TRRCF4CP.cjs → chunk-GMBOLRUZ.cjs} +2 -2
- package/dist/{chunk-ED6OVXN6.js → chunk-HF2EK5FS.js} +1 -1
- package/dist/{chunk-AZ72RWXJ.js → chunk-HHJC55PV.js} +1 -1
- package/dist/{chunk-4Y6HGDQ2.cjs → chunk-K3VVCCQU.cjs} +1 -1
- package/dist/{chunk-UG5R7IPH.js → chunk-K46QOB2A.js} +1 -1
- package/dist/chunk-KOCFZR2N.js +1 -0
- package/dist/chunk-LCT7VG2X.js +1 -0
- package/dist/{chunk-72W5LYBO.cjs → chunk-LFSVJJZQ.cjs} +1 -1
- package/dist/{chunk-S5QCH2ED.cjs → chunk-MJEEI5UM.cjs} +2 -2
- package/dist/{chunk-HNUI5756.cjs → chunk-P3VXDTFO.cjs} +1 -1
- package/dist/{chunk-ZBQVSQHO.js → chunk-PBNC52Z5.js} +1 -1
- package/dist/{chunk-5EEUBUOQ.js → chunk-PCHH754J.js} +3 -3
- package/dist/{chunk-6OUG64LE.js → chunk-PIKIX7YL.js} +1 -1
- package/dist/chunk-R42SMTOC.cjs +1 -0
- package/dist/{chunk-DCBC7IZ3.js → chunk-RWEIAW6Y.js} +1 -1
- package/dist/{chunk-YCYF74UF.cjs → chunk-T2D3SZMN.cjs} +1 -1
- package/dist/{chunk-EW5RUCP5.cjs → chunk-U5ZIDQYF.cjs} +1 -1
- package/dist/chunk-UFGS4JPD.cjs +1 -0
- package/dist/{chunk-IOWLD7B2.js → chunk-VIIMJGVX.js} +1 -1
- package/dist/{chunk-GS26S4PZ.cjs → chunk-WOSI63Y5.cjs} +1 -1
- package/dist/chunk-WSSZ3FJH.js +1 -0
- package/dist/{chunk-NXPJGBU5.cjs → chunk-X2UDG2ZJ.cjs} +1 -1
- package/dist/chunk-X4OZYT2S.cjs +180 -0
- package/dist/{chunk-7BUQHAOY.js → chunk-XI4L444Z.js} +1 -1
- package/dist/{chunk-SCHRLC2I.cjs → chunk-XP33TL43.cjs} +1 -1
- package/dist/{chunk-4G2YKL4J.cjs → chunk-YCJQNPVA.cjs} +1 -1
- package/dist/{chunk-R6JOQRVP.cjs → chunk-YHN4VS4N.cjs} +1 -1
- package/dist/{chunk-Z6S2CGXB.js → chunk-ZKFHYZSV.js} +1 -1
- package/dist/{chunk-DM23DZ37.js → chunk-ZRUMC5LH.js} +1 -1
- package/dist/chunk-ZSKZ362F.js +1 -0
- package/dist/{chunk-EAU6OXPG.cjs → chunk-ZYALODAT.cjs} +1 -1
- package/dist/components/CrossmintNFTCollectionView.cjs +1 -1
- package/dist/components/CrossmintNFTCollectionView.js +1 -1
- package/dist/components/CrossmintNFTDetail.cjs +1 -1
- package/dist/components/CrossmintNFTDetail.js +1 -1
- package/dist/components/auth/AuthForm.cjs +1 -1
- package/dist/components/auth/AuthForm.js +1 -1
- package/dist/components/auth/AuthFormBackButton.cjs +1 -1
- package/dist/components/auth/AuthFormBackButton.js +1 -1
- package/dist/components/auth/AuthFormDialog.cjs +1 -1
- package/dist/components/auth/AuthFormDialog.js +1 -1
- package/dist/components/auth/EmbeddedAuthForm.cjs +1 -1
- package/dist/components/auth/EmbeddedAuthForm.js +1 -1
- package/dist/components/auth/PasskeyPrompt.cjs +1 -1
- package/dist/components/auth/PasskeyPrompt.js +1 -1
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs +1 -1
- package/dist/components/auth/methods/email/EmailAuthFlow.js +1 -1
- package/dist/components/auth/methods/email/EmailOTPInput.cjs +1 -1
- package/dist/components/auth/methods/email/EmailOTPInput.js +1 -1
- package/dist/components/auth/methods/email/EmailSignIn.cjs +1 -1
- package/dist/components/auth/methods/email/EmailSignIn.js +1 -1
- package/dist/components/auth/methods/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/common/Divider.cjs +1 -1
- package/dist/components/common/Divider.js +1 -1
- package/dist/components/common/SecuredByCrossmint.cjs +1 -1
- package/dist/components/common/SecuredByCrossmint.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/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/signers/EmailSignersDialog.cjs +1 -1
- package/dist/components/signers/EmailSignersDialog.js +1 -1
- package/dist/components/signers/PhoneSignersDialog.cjs +1 -1
- package/dist/components/signers/PhoneSignersDialog.js +1 -1
- package/dist/components/signers/index.cjs +1 -1
- package/dist/components/signers/index.js +1 -1
- package/dist/components/wallets/ExportPrivateKeyButton.cjs +1 -1
- package/dist/components/wallets/ExportPrivateKeyButton.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.d.cts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useAuth.cjs +1 -1
- package/dist/hooks/useAuth.d.cts +2 -3
- package/dist/hooks/useAuth.d.ts +2 -3
- 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/icons/chevronRight.cjs +1 -1
- package/dist/icons/chevronRight.js +1 -1
- package/dist/icons/wallet.cjs +1 -1
- package/dist/icons/wallet.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/providers/CrossmintAuthProvider.cjs +1 -1
- package/dist/providers/CrossmintAuthProvider.js +1 -1
- package/dist/providers/CrossmintProvider.cjs +1 -1
- package/dist/providers/CrossmintProvider.js +1 -1
- package/dist/providers/CrossmintWalletProvider.cjs +1 -1
- package/dist/providers/CrossmintWalletProvider.js +1 -1
- package/dist/providers/auth/AuthFormProvider.cjs +1 -1
- package/dist/providers/auth/AuthFormProvider.d.cts +1 -1
- package/dist/providers/auth/AuthFormProvider.d.ts +1 -1
- package/dist/providers/auth/AuthFormProvider.js +1 -1
- package/dist/providers/auth/OAuthFlowProvider.cjs +1 -1
- package/dist/providers/auth/OAuthFlowProvider.js +1 -1
- package/dist/providers/index.cjs +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/types/wallet.cjs +1 -1
- package/dist/types/wallet.d.cts +1 -1
- package/dist/types/wallet.d.ts +1 -1
- package/dist/types/wallet.js +1 -1
- package/dist/utils/createCrossmintApiClient.cjs +1 -1
- package/dist/utils/createCrossmintApiClient.js +1 -1
- package/package.json +7 -8
- package/dist/chunk-2F3UEXTE.js +0 -1
- package/dist/chunk-37SPIIXL.js +0 -1
- package/dist/chunk-AEXTSRO5.cjs +0 -180
- package/dist/chunk-CDQFTAM2.cjs +0 -1
- package/dist/chunk-CGUXWE5X.cjs +0 -1
- package/dist/chunk-DKG6EYTF.js +0 -1
- package/dist/chunk-H3CPTTQQ.js +0 -1
- package/dist/chunk-HHI2XRKR.js +0 -1
- package/dist/chunk-IBUBTQ42.js +0 -1
- package/dist/chunk-LI7QMYLA.js +0 -1
- package/dist/chunk-NXEC4PED.cjs +0 -1
- package/dist/chunk-OVORFYD6.cjs +0 -1
- package/dist/chunk-TQ3JBX7K.js +0 -13
- package/dist/chunk-UHFCB2EY.js +0 -1
- package/dist/chunk-UT3YBBVW.js +0 -180
- package/dist/chunk-UV7TO6A4.cjs +0 -13
- package/dist/chunk-W5RDCN5G.cjs +0 -1
- package/dist/chunk-WPDCUPIT.cjs +0 -1
- package/dist/chunk-YCYSZLQ2.cjs +0 -1
- package/dist/chunk-ZHPSJCFM.js +0 -46
- package/dist/chunk-ZNFOZDZO.cjs +0 -46
- package/dist/chunk-ZQ7752MO.js +0 -1
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +0 -46
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.d.cts +0 -8
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.d.ts +0 -8
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +0 -46
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +0 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.d.cts +0 -5
- package/dist/components/auth/methods/web3/Web3AuthFlow.d.ts +0 -5
- package/dist/components/auth/methods/web3/Web3AuthFlow.js +0 -1
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs +0 -1
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.d.cts +0 -5
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.d.ts +0 -5
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.js +0 -1
- package/dist/components/auth/methods/web3/Web3Connectors.cjs +0 -1
- package/dist/components/auth/methods/web3/Web3Connectors.d.cts +0 -5
- package/dist/components/auth/methods/web3/Web3Connectors.d.ts +0 -5
- package/dist/components/auth/methods/web3/Web3Connectors.js +0 -1
- package/dist/icons/farcaster.cjs +0 -1
- package/dist/icons/farcaster.d.cts +0 -7
- package/dist/icons/farcaster.d.ts +0 -7
- package/dist/icons/farcaster.js +0 -1
- package/dist/providers/auth/FarcasterProvider.cjs +0 -1
- package/dist/providers/auth/FarcasterProvider.d.cts +0 -12
- package/dist/providers/auth/FarcasterProvider.d.ts +0 -12
- package/dist/providers/auth/FarcasterProvider.js +0 -1
- package/dist/providers/dynamic/DynamicWalletProvider.cjs +0 -6
- package/dist/providers/dynamic/DynamicWalletProvider.d.cts +0 -22
- package/dist/providers/dynamic/DynamicWalletProvider.d.ts +0 -22
- package/dist/providers/dynamic/DynamicWalletProvider.js +0 -6
- /package/dist/{chunk-IDLIUHK2.cjs → chunk-4QNMBBTI.cjs} +0 -0
package/dist/chunk-UT3YBBVW.js
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import{a as Pt}from"./chunk-LI7QMYLA.js";import{a as vt}from"./chunk-ED6OVXN6.js";import{a as yt,b as Ct,c as At}from"./chunk-O5IPDCMT.js";import{a as J}from"./chunk-4HSZ5QA3.js";import{a as wt}from"./chunk-AC2SJG3Q.js";import{a as C,b as xt}from"./chunk-2F3UEXTE.js";import{a as Ot}from"./chunk-KFFPM6JM.js";import{a as ht}from"./chunk-JL7YHC7D.js";import{a as X}from"./chunk-AOBO3CEQ.js";import{a as ft}from"./chunk-23YVHBPI.js";import{a as bt}from"./chunk-UG5R7IPH.js";import{a as pt,b as mt,c as dt}from"./chunk-RV2X7AFS.js";import{a as G}from"./chunk-NZUCXN2O.js";import{a as s}from"./chunk-DFSB3TWF.js";import{a as q}from"./chunk-OAHZHKRR.js";import{a as N}from"./chunk-UAFW3OWA.js";import{a as gt}from"./chunk-C3JRTLQP.js";import{a as z,b as j,c as V,d as y}from"./chunk-PXDN3KFO.js";import{useState as ut}from"react";import U from"@emotion/styled";import{useCrossmint as Dr,useWallet as Gr}from"@crossmint/client-sdk-react-base";import{useContext as Wo}from"react";import{useEffect as at,useMemo as Oo,useState as Y,useCallback as Z,createContext as Po,useRef as So,lazy as ko,Suspense as Eo}from"react";import{validateApiKeyAndGetCrossmintBaseUrl as Io}from"@crossmint/common-sdk-base";import{useCrossmint as Fo,CrossmintAuthBaseProvider as Lo,useCrossmintAuthBase as Vt}from"@crossmint/client-sdk-react-base";import{lazy as yo,Suspense as Co}from"react";import Ao from"color";import Ht from"@emotion/styled";import{useState as xo}from"react";import{useState as ot}from"react";import Mt from"color";import T from"@emotion/styled";import{isEmailValid as et}from"@crossmint/common-sdk-auth";import{createContext as oo,useCallback as kt,useContext as eo,useEffect as ro,useState as Et}from"react";import{useEffect as Xt,useRef as qt,useState as Jt,useCallback as Qt}from"react";import{ChildWindow as Yt,PopupWindow as Zt}from"@crossmint/client-sdk-window";import{z as Q}from"zod";var St=(o,e)=>{let{crossmintAuth:t}=W(),[r,a]=Jt(null),i=qt(null);return Xt(()=>(i.current==null&&(i.current=new Yt(window.opener||window.parent,"*",{incomingEvents:to})),()=>{i.current!=null&&i.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:Qt((n,h)=>y(void 0,null,function*(){if(i.current==null)throw new Error("Child window not initialized");a(n),e(null),console.log("createPopupAndSetupListeners",n,h),console.log("oauthUrlMap",o),console.log("oauthUrlMap[provider]",o[n]);let l=new URL(o[n]);if(h!=null){let f=Array.from(l.searchParams.entries());l.search="",h&&l.searchParams.append("provider_login_hint",h),f.forEach(([c,p])=>{l.searchParams.append(c,p)})}let g=yield Zt.init(l.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),x=f=>y(void 0,null,function*(){var c,p;yield t==null?void 0:t.handleRefreshAuthMaterial(f.oneTimeSecret),(c=i.current)==null||c.off("authMaterialFromPopupCallback"),(p=g.window)==null||p.close(),a(null)}),m=f=>{var c,p;e(f.error),(c=i.current)==null||c.off("errorFromPopupCallback"),(p=g.window)==null||p.close(),a(null)};i.current.on("authMaterialFromPopupCallback",x),i.current.on("errorFromPopupCallback",m);let v=setInterval(()=>{var f,c;(f=g.window)!=null&&f.closed&&(clearInterval(v),a(null),(c=i.current)==null||c.off("authMaterialFromPopupCallback"))},2500)}),[o,t,e]),isLoading:r!=null,activeOAuthProvider:r}},to={authMaterialFromPopupCallback:Q.object({oneTimeSecret:Q.string()}),errorFromPopupCallback:Q.object({error:Q.string()})};import{jsx as no}from"react/jsx-runtime";var It={google:"",twitter:""},Ft=oo(void 0);function L(){let o=eo(Ft);if(!o)throw new Error("useOAuthFlow must be used within an OAuthFlowProvider");return o}function Lt({children:o,prefetchOAuthUrls:e}){let{crossmintAuth:t,loginMethods:r}=Tt(),{setError:a}=C(),[i,u]=Et(It),[n,h]=Et(!0),{createPopupAndSetupListeners:l,isLoading:g,activeOAuthProvider:x}=St(i,a),m=kt(()=>y(this,null,function*(){h(!0);try{let p=(r||[]).filter(d=>d in It).map(d=>y(this,null,function*(){let b=yield t==null?void 0:t.getOAuthUrl(d);return{[d]:b}})),k=Object.assign({},...yield Promise.all(p));u(k)}catch(c){a(c instanceof Error?c.message:"Unable to load oauth providers. Please try again later.")}finally{h(!1)}}),[r,t,a]);ro(()=>{e&&m()},[m,e]);let f={startOAuthLogin:kt((c,p)=>y(this,null,function*(){yield l(c,p)}),[l]),isLoading:n||g,activeOAuthProvider:x};return no(Ft.Provider,{value:f,children:o})}import Ut from"@emotion/styled";import{jsx as tt,jsxs as so}from"react/jsx-runtime";var io=Ut.button`
|
|
2
|
-
${G}
|
|
3
|
-
|
|
4
|
-
display: flex;
|
|
5
|
-
align-items: center;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
gap: 8px;
|
|
8
|
-
height: 32px;
|
|
9
|
-
padding: 0 10px;
|
|
10
|
-
border: 1px solid ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.border)||s["cm-border"]}};
|
|
11
|
-
border-radius: ${o=>{var e;return((e=o.appearance)==null?void 0:e.borderRadius)||"12px"}};
|
|
12
|
-
background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.buttonBackground)||s["cm-background-primary"]}};
|
|
13
|
-
cursor: ${o=>o.isLoading?"not-allowed":"pointer"};
|
|
14
|
-
|
|
15
|
-
/* Hover and focus states */
|
|
16
|
-
&:hover {
|
|
17
|
-
background-color: ${o=>o.isLoading?s["cm-muted-primary"]:s["cm-hover"]};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&:focus {
|
|
21
|
-
outline: none;
|
|
22
|
-
background-color: theme["cm-hover"];
|
|
23
|
-
}
|
|
24
|
-
`,ao=Ut.span`
|
|
25
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||s["cm-accent"]}};
|
|
26
|
-
font-size: 14px;
|
|
27
|
-
font-weight: 400;
|
|
28
|
-
`;function Bt({emailInput:o,appearance:e}){var i,u;let{startOAuthLogin:t,activeOAuthProvider:r}=L(),a=r==="google";return so(io,{type:"button",appearance:e,isLoading:a,onClick:a?void 0:()=>t("google",o.trim().toLowerCase()),children:[tt(q,{style:{height:"18px",width:"18px"}}),a?tt(X,{style:{color:(i=e==null?void 0:e.colors)==null?void 0:i.textSecondary,fill:(u=e==null?void 0:e.colors)==null?void 0:u.textPrimary,width:"18px",height:"18px"}}):tt(ao,{appearance:e,children:"Continue"})]})}import{jsx as F,jsxs as rt}from"react/jsx-runtime";var lo=T.div`
|
|
29
|
-
display: flex;
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
align-items: flex-start;
|
|
32
|
-
justify-content: flex-start;
|
|
33
|
-
width: 100%;
|
|
34
|
-
border-radius: 8px;
|
|
35
|
-
`,uo=T.div`
|
|
36
|
-
width: 100%;
|
|
37
|
-
`,co=T.label`
|
|
38
|
-
display: block;
|
|
39
|
-
margin-bottom: 5px;
|
|
40
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||s["cm-text-primary"]}};
|
|
41
|
-
font-size: 14px;
|
|
42
|
-
font-weight: 400;
|
|
43
|
-
`,po=T.form`
|
|
44
|
-
position: relative;
|
|
45
|
-
`,mo=T.input`
|
|
46
|
-
${G}
|
|
47
|
-
|
|
48
|
-
/* Base input styles */
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-grow: 1;
|
|
51
|
-
text-align: left;
|
|
52
|
-
padding-left: 16px;
|
|
53
|
-
padding-right: ${o=>o.showGoogleButton?"132px":"80px"};
|
|
54
|
-
height: 58px;
|
|
55
|
-
width: 100%;
|
|
56
|
-
border: 1px solid;
|
|
57
|
-
border-color: ${o=>{var e,t,r,a;return o.hasError?((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)||s["cm-danger"]:((a=(r=o.appearance)==null?void 0:r.colors)==null?void 0:a.border)||s["cm-border"]}};
|
|
58
|
-
border-radius: ${o=>{var e;return((e=o.appearance)==null?void 0:e.borderRadius)||"12px"}};
|
|
59
|
-
background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.inputBackground)||s["cm-background-primary"]}};
|
|
60
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||s["cm-text-primary"]}};
|
|
61
|
-
font-size: 16px;
|
|
62
|
-
transition: border-color 200ms ease-in-out, box-shadow 200ms ease-in-out;
|
|
63
|
-
|
|
64
|
-
&::placeholder {
|
|
65
|
-
font-weight: 400;
|
|
66
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||s["cm-text-secondary"]}};
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&:focus {
|
|
70
|
-
outline: none;
|
|
71
|
-
box-shadow: 0 0 0 2px ${o=>{var e,t;return new Mt(((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||s["cm-accent"]).alpha(.18).toString()}};
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&:read-only {
|
|
75
|
-
cursor: not-allowed;
|
|
76
|
-
opacity: 0.7;
|
|
77
|
-
}
|
|
78
|
-
`,ho=T.div`
|
|
79
|
-
position: absolute;
|
|
80
|
-
right: 0;
|
|
81
|
-
top: 0;
|
|
82
|
-
bottom: 0;
|
|
83
|
-
display: flex;
|
|
84
|
-
align-items: center;
|
|
85
|
-
padding-right: 16px;
|
|
86
|
-
`,fo=T.button`
|
|
87
|
-
${G}
|
|
88
|
-
|
|
89
|
-
font-weight: 500;
|
|
90
|
-
white-space: nowrap;
|
|
91
|
-
background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.inputBackground)||s["cm-background-primary"]}};
|
|
92
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||s["cm-accent"]}};
|
|
93
|
-
cursor: ${o=>o.disabled?"not-allowed":"pointer"};
|
|
94
|
-
opacity: ${o=>o.disabled?.6:1};
|
|
95
|
-
border: none;
|
|
96
|
-
padding: 8px 12px;
|
|
97
|
-
border-radius: 6px;
|
|
98
|
-
transition: opacity 200ms ease;
|
|
99
|
-
|
|
100
|
-
&:hover:not(:disabled) {
|
|
101
|
-
opacity: 0.8;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&:focus-visible {
|
|
105
|
-
outline: 2px solid ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||s["cm-accent"]}};
|
|
106
|
-
outline-offset: 2px;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&:not(:disabled):focus-visible {
|
|
110
|
-
box-shadow: 0 0 0 2px ${o=>{var e,t;return new Mt(((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||s["cm-accent"]).alpha(.18).toString()}};
|
|
111
|
-
}
|
|
112
|
-
`,go=T.p`
|
|
113
|
-
font-size: 12px;
|
|
114
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)||s["cm-danger"]}};
|
|
115
|
-
margin: 8px 0 8px 0;
|
|
116
|
-
`;function Wt({setOtpEmailData:o}){var c,p,k;let{crossmintAuth:e}=W(),{appearance:t,defaultEmail:r,setStep:a,setError:i,loginMethods:u}=C(),[n,h]=ot(r!=null?r:""),[l,g]=ot(""),[x,m]=ot(!1),v=n.toLowerCase().includes("@gmail.com")&&!n.toLowerCase().includes("+")&&et(n)&&!x&&u.includes("google");function f(d){return y(this,null,function*(){d.preventDefault(),m(!0);try{let b=n.trim().toLowerCase(),R=yield e==null?void 0:e.sendEmailOtp(b);o({email:b,emailId:R.emailId}),a("otp")}catch(b){m(!1),i("Failed to send email. Please try again or contact support.")}})}return F(lo,{children:rt(uo,{children:[F(co,{appearance:t,children:"Email"}),rt(po,{role:"form",onSubmit:d=>{if(v){d.preventDefault();return}et(n)?f(d):d.preventDefault()},noValidate:!0,children:[F(ft,{children:"Email"}),F(mo,{id:"emailInput",appearance:t,hasError:!!l,showGoogleButton:v,type:"email",placeholder:"your@email.com",value:n,onChange:d=>{h(d.target.value),g(""),i(null)},readOnly:x,"aria-describedby":"emailError"}),rt(ho,{children:[l&&F(N,{customColor:(c=t==null?void 0:t.colors)==null?void 0:c.danger}),x&&F(X,{style:{color:(p=t==null?void 0:t.colors)==null?void 0:p.textSecondary,fill:(k=t==null?void 0:t.colors)==null?void 0:k.textPrimary}}),v?F(Bt,{emailInput:n,appearance:t}):!l&&!x?F(fo,{type:"submit",appearance:t,disabled:!et(n)||x,children:"Submit"}):null]})]}),l&&F(go,{appearance:t,id:"emailError",children:l})]})})}import{jsx as Rt}from"react/jsx-runtime";function zt(){let{step:o}=C(),[e,t]=xo(null);return o==="otp"?Rt($t,{otpEmailData:e,setOtpEmailData:t}):o==="initial"?Rt(Wt,{setOtpEmailData:t}):null}import{jsx as nt}from"react/jsx-runtime";function jt(e){var o=V(e,[]);var n;let{step:t,appearance:r}=C(),{startOAuthLogin:a,activeOAuthProvider:i}=L(),u=i==="google";return t!=="initial"?null:nt(J,j(z({icon:nt(q,{style:{height:"25px",width:"25px"}}),isLoading:u,appearance:r,onButtonClick:()=>a("google")},o),{children:nt("span",{style:{color:(n=r==null?void 0:r.colors)==null?void 0:n.textPrimary},children:"Sign in with Google"})}))}import{jsx as Dt}from"react/jsx-runtime";function Gt(e){var o=V(e,[]);let{step:t,appearance:r}=C(),{startOAuthLogin:a,activeOAuthProvider:i}=L(),u=i==="twitter";return t!=="initial"?null:Dt(J,j(z({icon:Dt(Ot,{style:{height:"22px",width:"22px"}}),isLoading:u,appearance:r,onButtonClick:()=>a("twitter")},o),{children:"Sign in with X"}))}import{jsx as A,jsxs as H}from"react/jsx-runtime";var wo=yo(()=>Promise.all([import("./providers/auth/FarcasterProvider.js"),import("./components/auth/methods/farcaster/FarcasterSignIn.js")]).then(([o,e])=>({default:({baseUrl:t})=>A(o.FarcasterProvider,{baseUrl:t,children:A(e.FarcasterSignIn,{})})}))),vo=Ht.div`
|
|
117
|
-
position: relative;
|
|
118
|
-
padding: 40px 24px 30px 24px;
|
|
119
|
-
display: flex;
|
|
120
|
-
flex-direction: column;
|
|
121
|
-
gap: 10px;
|
|
122
|
-
-webkit-font-smoothing: antialiased;
|
|
123
|
-
animation: none;
|
|
124
|
-
|
|
125
|
-
@media (min-width: 480px) {
|
|
126
|
-
padding: 40px 40px 30px 40px;
|
|
127
|
-
}
|
|
128
|
-
`,bo=Ht.div`
|
|
129
|
-
display: flex;
|
|
130
|
-
align-items: flex-start;
|
|
131
|
-
justify-content: flex-start;
|
|
132
|
-
border-radius: 8px;
|
|
133
|
-
padding: 8px;
|
|
134
|
-
gap: 8px;
|
|
135
|
-
margin-top: 34px;
|
|
136
|
-
background-color: ${o=>{var e,t,r;return new Ao((r=(t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)!=null?r:s["cm-danger"]).alpha(.12).toString()}};
|
|
137
|
-
`;function _t({style:o}){var h,l,g,x,m,v,f,c,p,k;let{step:e,appearance:t,loginMethods:r,baseUrl:a,error:i,termsOfServiceText:u,authModalTitle:n}=C();return H(vo,{style:o,children:[i!=null?H(bo,{appearance:t,children:[A("div",{style:{minWidth:"20px"},children:A(N,{customColor:(l=(h=t==null?void 0:t.colors)==null?void 0:h.danger)!=null?l:s["cm-danger"]})}),A("p",{style:{fontSize:"14px",margin:0,color:(x=(g=t==null?void 0:t.colors)==null?void 0:g.danger)!=null?x:s["cm-danger"]},children:i})]}):null,e==="initial"?H("div",{children:[A(mt,{appearance:t,children:n!=null?n:"Sign in to Crossmint"}),A(dt,{appearance:t,children:"Access using one of the options below."})]}):null,r.includes("google")?A(jt,{}):null,r.includes("farcaster")?A(Co,{fallback:null,children:A(wo,{baseUrl:a})}):null,r.includes("twitter")?A(Gt,{}):null,r.some(d=>d.startsWith("web3"))?A(Pt,{}):null,r.includes("email")?H("div",{children:[r.length>1?A(vt,{appearance:t,text:"OR"}):null,A(zt,{})]}):null,e==="initial"&&u!=null?H("div",{style:{fontSize:"0.875rem",textAlign:"center",marginTop:"0.5rem",color:(v=(m=t==null?void 0:t.colors)==null?void 0:m.textSecondary)!=null?v:s["cm-text-secondary"]},children:[A("style",{children:`
|
|
138
|
-
p a {
|
|
139
|
-
color: ${(c=(f=t==null?void 0:t.colors)==null?void 0:f.textLink)!=null?c:s["cm-link"]};
|
|
140
|
-
}
|
|
141
|
-
`}),u]}):null,e==="initial"||e==="otp"?A(bt,{style:{marginTop:"1rem",justifyContent:"center"},color:(k=(p=t==null?void 0:t.colors)==null?void 0:p.textSecondary)!=null?k:s["cm-text-secondary"]}):null]})}import{jsx as Kt}from"react/jsx-runtime";function _({open:o}){let{appearance:e,setDialogOpen:t}=C();return Kt(pt,{open:o,setDialogOpen:t,appearance:e,children:Kt(_t,{style:{maxWidth:"448px",padding:"0px"}})})}import{Fragment as st,jsx as I,jsxs as it}from"react/jsx-runtime";var To=ko(()=>import("./providers/dynamic/DynamicWalletProvider.js").then(o=>({default:o.DynamicWalletProvider}))),Uo={crossmintAuth:void 0,login:()=>{},logout:()=>y(void 0,null,function*(){}),jwt:void 0,user:void 0,status:"initializing",getUser:()=>{},experimental_externalWalletSigner:void 0,experimental_loginWithOAuth:()=>Promise.resolve(),loginMethods:[]},lt=Po(Uo);function Bo({children:o,appearance:e,termsOfServiceText:t,prefetchOAuthUrls:r=!0,authModalTitle:a,onLoginSuccess:i,loginMethods:u=["email","google"]}){let n=Vt(),{crossmint:h,experimental_setCustomAuth:l,experimental_customAuth:g}=Fo("CrossmintAuthProvider must be used within CrossmintProvider"),x=Io(h.apiKey),[m,v]=Y(!1),[f,c]=Y(void 0),[p,k]=Y(!0),d=u.some(E=>E.startsWith("web3")),[b,R]=Y(void 0),O=So(null);at(()=>{var E,M;n.jwt==null&&(g==null?void 0:g.jwt)!=null&&l(void 0),b!=null||((E=n.user)==null?void 0:E.email)!=null?l({jwt:n.jwt,email:(M=n.user)==null?void 0:M.email,externalWalletSigner:b}):l({jwt:n.jwt})},[b,n.jwt,n.user,l,g]),at(()=>{n.jwt!=null&&m&&v(!1)},[n.jwt,m]);let $=Z(E=>{if(n.jwt!=null){console.log("User already logged in");return}E!=null&&typeof E=="string"&&c(E),v(!0)},[n.jwt]),B=Z(()=>n.status==="initializing"||d&&!p?"initializing":n.jwt!=null?"logged-in":m?"in-progress":"logged-out",[n.status,n.jwt,d,p,m]),ct=Z(E=>y(this,null,function*(){var M;if(n.jwt!=null){console.log("User already logged in");return}yield(M=O.current)==null?void 0:M.call(O,E)}),[n.jwt]),Nt=Oo(()=>j(z({},n),{login:$,status:B(),experimental_externalWalletSigner:b,experimental_loginWithOAuth:ct,loginMethods:u}),[n,$,B,b,ct,u]);return I(lt.Provider,{value:Nt,children:I(xt,{setDialogOpen:(E,M)=>{v(E),M&&(i==null||i())},initialState:{appearance:e,loginMethods:u,termsOfServiceText:t,authModalTitle:a,baseUrl:x,defaultEmail:f},children:I(Lt,{prefetchOAuthUrls:B()==="logged-out"&&r,children:I(Mo,{loginWithOAuthRef:O,children:d?I(Eo,{fallback:it(st,{children:[o,I(_,{open:m})]}),children:it(To,{apiKeyEnvironment:h.apiKey.includes("production")?"production":"staging",loginMethods:u,appearance:e,onSdkLoaded:k,onWalletConnected:R,children:[o,I(_,{open:m})]})}):it(st,{children:[o,I(_,{open:m})]})})})})})}function Mo({children:o,loginWithOAuthRef:e}){let{startOAuthLogin:t}=L(),r=Vt(),a=Z(i=>y(this,null,function*(){if(r.jwt!=null){console.log("User already logged in");return}yield t(i)}),[r.jwt,t]);return at(()=>{e.current=a},[a,e]),I(st,{children:o})}function Pr({children:o,appearance:e,termsOfServiceText:t,prefetchOAuthUrls:r=!0,authModalTitle:a,onLoginSuccess:i,loginMethods:u=["email","google"],refreshRoute:n,logoutRoute:h}){return I(Lo,{onLoginSuccess:i,refreshRoute:n,logoutRoute:h,children:I(Bo,{onLoginSuccess:i,appearance:e,termsOfServiceText:t,prefetchOAuthUrls:r,authModalTitle:a,loginMethods:u,children:o})})}function W(){let o=Wo(lt);if(o==null)throw new Error("useCrossmintAuth must be used within a CrossmintAuthProvider");return o}var Tt=W;import{jsx as w,jsxs as K}from"react/jsx-runtime";var Ro=U.div`
|
|
142
|
-
display: flex;
|
|
143
|
-
flex-direction: column;
|
|
144
|
-
`,$o=U.div`
|
|
145
|
-
display: flex;
|
|
146
|
-
flex-direction: column;
|
|
147
|
-
align-items: center;
|
|
148
|
-
justify-content: flex-start;
|
|
149
|
-
width: 100%;
|
|
150
|
-
`,zo=U.div`
|
|
151
|
-
position: relative;
|
|
152
|
-
left: 12px;
|
|
153
|
-
`,jo=U.p`
|
|
154
|
-
font-size: 16px;
|
|
155
|
-
font-weight: 400;
|
|
156
|
-
margin: 16px 0 4px 0;
|
|
157
|
-
text-align: center;
|
|
158
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||s["cm-text-primary"]}};
|
|
159
|
-
`,Do=U.p`
|
|
160
|
-
text-align: center;
|
|
161
|
-
padding: 0 16px;
|
|
162
|
-
margin: 0;
|
|
163
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||s["cm-text-secondary"]}};
|
|
164
|
-
font-size: 14px;
|
|
165
|
-
line-height: 1.4;
|
|
166
|
-
`,Go=U.div`
|
|
167
|
-
padding: 32px 0;
|
|
168
|
-
`,D=U(At)`
|
|
169
|
-
@media (max-width: 379px) {
|
|
170
|
-
width: 40px;
|
|
171
|
-
height: 56px;
|
|
172
|
-
font-size: 28px;
|
|
173
|
-
margin: 0;
|
|
174
|
-
}
|
|
175
|
-
`,Ho=U.div`
|
|
176
|
-
font-size: 12px;
|
|
177
|
-
line-height: 1.3;
|
|
178
|
-
text-align: center;
|
|
179
|
-
color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||s["cm-text-secondary"]}};
|
|
180
|
-
`;function $t({otpEmailData:o,setOtpEmailData:e}){var p,k,d,b,R;let{crossmintAuth:t}=W(),{appearance:r,setDialogOpen:a,setStep:i,setError:u}=C(),[n,h]=ut(""),[l,g]=ut(!1),[x,m]=ut(!1),v=()=>y(this,null,function*(){var O,$;m(!0);try{let B=yield t==null?void 0:t.confirmEmailOtp((O=o==null?void 0:o.email)!=null?O:"",($=o==null?void 0:o.emailId)!=null?$:"",n);yield t==null?void 0:t.handleRefreshAuthMaterial(B),a(!1,!0),i("initial")}catch(B){console.error("Error confirming email OTP",B),u("Invalid code. Please try again."),g(!0)}finally{m(!1)}}),f=()=>y(this,null,function*(){var O;try{yield t==null?void 0:t.sendEmailOtp((O=o==null?void 0:o.email)!=null?O:"")}catch($){u("Failed to resend code. Please try again.")}});return K(Ro,{children:[w(wt,{onClick:()=>{i("initial"),e(null)},iconColor:(p=r==null?void 0:r.colors)==null?void 0:p.textPrimary,ringColor:(k=r==null?void 0:r.colors)==null?void 0:k.accent}),K($o,{children:[w(zo,{children:w(gt,{customAccentColor:(d=r==null?void 0:r.colors)==null?void 0:d.accent,customButtonBackgroundColor:(b=r==null?void 0:r.colors)==null?void 0:b.buttonBackground,customBackgroundColor:(R=r==null?void 0:r.colors)==null?void 0:R.background})}),w(jo,{appearance:r,children:"Check your email"}),K(Do,{appearance:r,children:["A temporary login code has been sent to",w("br",{}),o!=null&&o.email?w("strong",{children:o.email}):"your email address"]}),w(Go,{children:w(yt,{maxLength:6,value:n,onChange:O=>{h(O),g(!1),u(null)},onComplete:v,disabled:x,appearance:r,children:K(Ct,{children:[w(D,{index:0,hasError:l}),w(D,{index:1,hasError:l}),w(D,{index:2,hasError:l}),w(D,{index:3,hasError:l}),w(D,{index:4,hasError:l}),w(D,{index:5,hasError:l})]})})}),K(Ho,{appearance:r,children:["Can't find the email? Check spam folder.",w("br",{}),"Some emails may take several minutes to arrive."]}),w(ht,{initialSeconds:60,appearance:r,countdownText:O=>`Re-send code in ${O}s`,countdownCompleteText:"Re-send code",handleOnClick:f})]})]})}export{$t as a,St as b,L as c,Lt as d,Bt as e,Wt as f,zt as g,jt as h,Gt as i,_t as j,_ as k,lt as l,Pr as m,W as n,Tt as o,Dr as p,Gr as q};
|
package/dist/chunk-UV7TO6A4.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkS5QCH2EDcjs = require('./chunk-S5QCH2ED.cjs');var _chunkHNUI5756cjs = require('./chunk-HNUI5756.cjs');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _sdkreactcore = require('@dynamic-labs/sdk-react-core');var _jsxruntime = require('react/jsx-runtime');var s=_styled2.default.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
align-items: center;
|
|
5
|
-
`,C=_styled2.default.div`
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
gap: 10px;
|
|
9
|
-
width: 100%;
|
|
10
|
-
`,f=_styled2.default.div`
|
|
11
|
-
/* Widget container styles */
|
|
12
|
-
min-height: 325px;
|
|
13
|
-
`;function W(){var i,e;let{appearance:t,step:c,setStep:d}=_chunkHNUI5756cjs.a.call(void 0, );return c==="web3"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkS5QCH2EDcjs.a,{onClick:()=>d("initial"),iconColor:(i=t==null?void 0:t.colors)==null?void 0:i.textPrimary,ringColor:(e=t==null?void 0:t.colors)==null?void 0:e.accent}),_jsxruntime.jsx.call(void 0, s,{children:_jsxruntime.jsx.call(void 0, C,{children:_jsxruntime.jsx.call(void 0, f,{children:_jsxruntime.jsx.call(void 0, _sdkreactcore.DynamicEmbeddedWidget,{background:"none"})})})})]}):null}exports.a = W;
|
package/dist/chunk-W5RDCN5G.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');var h=({style:H})=>_jsxruntime.jsxs.call(void 0, "svg",{width:"24",height:"24",viewBox:"0 0 1000 1000",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:H,children:[_jsxruntime.jsx.call(void 0, "rect",{width:"1000",height:"1000",fill:"#855DCD"}),_jsxruntime.jsx.call(void 0, "path",{d:"M257.778 155.556H742.222V844.444H671.111V528.889H670.414C662.554 441.677 589.258 373.333 500 373.333C410.742 373.333 337.446 441.677 329.586 528.889H328.889V844.444H257.778V155.556Z",fill:"white"}),_jsxruntime.jsx.call(void 0, "path",{d:"M128.889 253.333L157.778 351.111H182.222V746.667C169.949 746.667 160 756.616 160 768.889V795.556H155.556C143.283 795.556 133.333 805.505 133.333 817.778V844.444H382.222V817.778C382.222 805.505 372.273 795.556 360 795.556H355.556V768.889C355.556 756.616 345.606 746.667 333.333 746.667H306.667V253.333H128.889Z",fill:"white"}),_jsxruntime.jsx.call(void 0, "path",{d:"M675.555 746.667C663.282 746.667 653.333 756.616 653.333 768.889V795.556H648.889C636.616 795.556 626.667 805.505 626.667 817.778V844.444H875.555V817.778C875.555 805.505 865.606 795.556 853.333 795.556H848.889V768.889C848.889 756.616 838.94 746.667 826.667 746.667V351.111H851.111L880 253.333H702.222V746.667H675.555Z",fill:"white"})]});exports.a = h;
|
package/dist/chunk-WPDCUPIT.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 _chunkAM2LP6OAcjs = require('./chunk-AM2LP6OA.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');function c({emailSignerProps:t,phoneSignerProps:n,passkeyPromptProps:e}){return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkHNV3LB4Acjs.a,_chunk2WSEHVNPcjs.a.call(void 0, {},t)),_jsxruntime.jsx.call(void 0, _chunkGS26S4PZcjs.a,_chunk2WSEHVNPcjs.a.call(void 0, {},n)),e!=null&&_jsxruntime.jsx.call(void 0, _chunkAM2LP6OAcjs.a,_chunk2WSEHVNPcjs.a.call(void 0, {},e))]})}function y({children:t,showPasskeyHelpers:n=!0,appearance:e,createOnLogin:l,callbacks:m}){return _jsxruntime.jsx.call(void 0, _clientsdkreactbase.CrossmintWalletBaseProvider,{createOnLogin:l,appearance:e,showPasskeyHelpers:n,callbacks:m,renderUI:c,children:t})}exports.a = y;
|
package/dist/chunk-YCYSZLQ2.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');function n({style:o}){var t;return _jsxruntime.jsx.call(void 0, "svg",{style:o,width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:_jsxruntime.jsx.call(void 0, "path",{d:"M15.0566 12.5H15.067M1.10156 3.5V17.5C1.10156 18.6046 2.02718 19.5 3.16898 19.5H17.6409C18.7827 19.5 19.7083 18.6046 19.7083 17.5V7.5C19.7083 6.39543 18.7827 5.5 17.6409 5.5L3.16898 5.5C2.02718 5.5 1.10156 4.60457 1.10156 3.5ZM1.10156 3.5C1.10156 2.39543 2.02718 1.5 3.16898 1.5H15.5735M15.5735 12.5C15.5735 12.7761 15.3421 13 15.0566 13C14.7712 13 14.5398 12.7761 14.5398 12.5C14.5398 12.2239 14.7712 12 15.0566 12C15.3421 12 15.5735 12.2239 15.5735 12.5Z",stroke:(t=o==null?void 0:o.color)!=null?t:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}exports.a = n;
|
package/dist/chunk-ZHPSJCFM.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import{a as p}from"./chunk-2F3UEXTE.js";import{a as u}from"./chunk-HHI2XRKR.js";import{a as l}from"./chunk-23YVHBPI.js";import{a as s}from"./chunk-NZUCXN2O.js";import{a as n}from"./chunk-DFSB3TWF.js";import{a as m}from"./chunk-H3CPTTQQ.js";import i from"@emotion/styled";import{jsx as r,jsxs as y}from"react/jsx-runtime";var f=i.button`
|
|
2
|
-
${s}
|
|
3
|
-
|
|
4
|
-
/* Base button styles */
|
|
5
|
-
position: relative;
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
width: 100%;
|
|
10
|
-
padding: 16px;
|
|
11
|
-
font-size: 16px;
|
|
12
|
-
min-height: 56px;
|
|
13
|
-
border: none;
|
|
14
|
-
border-radius: ${e=>{var t;return((t=e.appearance)==null?void 0:t.borderRadius)||"12px"}};
|
|
15
|
-
background-color: ${e=>{var t,o;return((o=(t=e.appearance)==null?void 0:t.colors)==null?void 0:o.buttonBackground)||n["cm-muted-primary"]}};
|
|
16
|
-
color: ${e=>{var t,o;return((o=(t=e.appearance)==null?void 0:t.colors)==null?void 0:o.textPrimary)||n["cm-text-primary"]}};
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
|
|
19
|
-
/* Transitions */
|
|
20
|
-
transition: background-color 200ms ease-in-out;
|
|
21
|
-
|
|
22
|
-
&:hover {
|
|
23
|
-
background-color: ${e=>{var t,o;return((o=(t=e.appearance)==null?void 0:t.colors)==null?void 0:o.backgroundSecondary)||n["cm-hover"]}};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&:focus {
|
|
27
|
-
outline: none;
|
|
28
|
-
background-color: ${n["cm-hover"]};
|
|
29
|
-
}
|
|
30
|
-
`,x=i.div`
|
|
31
|
-
position: absolute;
|
|
32
|
-
left: 20px;
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
justify-content: center;
|
|
36
|
-
`,g=i.div`
|
|
37
|
-
position: absolute;
|
|
38
|
-
right: 20px;
|
|
39
|
-
display: flex;
|
|
40
|
-
align-items: center;
|
|
41
|
-
justify-content: center;
|
|
42
|
-
`,h=i.span`
|
|
43
|
-
font-weight: 400;
|
|
44
|
-
margin: 0 32px;
|
|
45
|
-
color: ${e=>{var t,o;return((o=(t=e.appearance)==null?void 0:t.colors)==null?void 0:o.textPrimary)||n["cm-text-primary"]}};
|
|
46
|
-
`;function S(){var a,c;let{step:e,appearance:t,setStep:o,setError:d}=p();return e!=="initial"?null:y(f,{appearance:t,onClick:()=>{o("web3"),d(null)},children:[r(x,{children:r(u,{style:{height:"21px",width:"21px",color:(a=t==null?void 0:t.colors)==null?void 0:a.textPrimary}})}),r(h,{appearance:t,children:"Continue with a wallet"}),r(g,{children:r(m,{style:{height:"21px",width:"21px",color:(c=t==null?void 0:t.colors)==null?void 0:c.textSecondary}})}),r(l,{children:"Continue with a wallet"})]})}export{S as a};
|
package/dist/chunk-ZNFOZDZO.cjs
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkHNUI5756cjs = require('./chunk-HNUI5756.cjs');var _chunkYCYSZLQ2cjs = require('./chunk-YCYSZLQ2.cjs');var _chunkS4BKL6MRcjs = require('./chunk-S4BKL6MR.cjs');var _chunk3X24JZVGcjs = require('./chunk-3X24JZVG.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunkCDQFTAM2cjs = require('./chunk-CDQFTAM2.cjs');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _jsxruntime = require('react/jsx-runtime');var f=_styled2.default.button`
|
|
2
|
-
${_chunk3X24JZVGcjs.a}
|
|
3
|
-
|
|
4
|
-
/* Base button styles */
|
|
5
|
-
position: relative;
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: center;
|
|
9
|
-
width: 100%;
|
|
10
|
-
padding: 16px;
|
|
11
|
-
font-size: 16px;
|
|
12
|
-
min-height: 56px;
|
|
13
|
-
border: none;
|
|
14
|
-
border-radius: ${e=>{var t;return((t=e.appearance)==null?void 0:t.borderRadius)||"12px"}};
|
|
15
|
-
background-color: ${e=>{var t,o;return((o=(t=e.appearance)==null?void 0:t.colors)==null?void 0:o.buttonBackground)||_chunkEAWYV5ZOcjs.a["cm-muted-primary"]}};
|
|
16
|
-
color: ${e=>{var t,o;return((o=(t=e.appearance)==null?void 0:t.colors)==null?void 0:o.textPrimary)||_chunkEAWYV5ZOcjs.a["cm-text-primary"]}};
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
|
|
19
|
-
/* Transitions */
|
|
20
|
-
transition: background-color 200ms ease-in-out;
|
|
21
|
-
|
|
22
|
-
&:hover {
|
|
23
|
-
background-color: ${e=>{var t,o;return((o=(t=e.appearance)==null?void 0:t.colors)==null?void 0:o.backgroundSecondary)||_chunkEAWYV5ZOcjs.a["cm-hover"]}};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&:focus {
|
|
27
|
-
outline: none;
|
|
28
|
-
background-color: ${_chunkEAWYV5ZOcjs.a["cm-hover"]};
|
|
29
|
-
}
|
|
30
|
-
`,x=_styled2.default.div`
|
|
31
|
-
position: absolute;
|
|
32
|
-
left: 20px;
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
justify-content: center;
|
|
36
|
-
`,g=_styled2.default.div`
|
|
37
|
-
position: absolute;
|
|
38
|
-
right: 20px;
|
|
39
|
-
display: flex;
|
|
40
|
-
align-items: center;
|
|
41
|
-
justify-content: center;
|
|
42
|
-
`,h=_styled2.default.span`
|
|
43
|
-
font-weight: 400;
|
|
44
|
-
margin: 0 32px;
|
|
45
|
-
color: ${e=>{var t,o;return((o=(t=e.appearance)==null?void 0:t.colors)==null?void 0:o.textPrimary)||_chunkEAWYV5ZOcjs.a["cm-text-primary"]}};
|
|
46
|
-
`;function R(){var a,c;let{step:e,appearance:t,setStep:o,setError:d}=_chunkHNUI5756cjs.a.call(void 0, );return e!=="initial"?null:_jsxruntime.jsxs.call(void 0, f,{appearance:t,onClick:()=>{o("web3"),d(null)},children:[_jsxruntime.jsx.call(void 0, x,{children:_jsxruntime.jsx.call(void 0, _chunkYCYSZLQ2cjs.a,{style:{height:"21px",width:"21px",color:(a=t==null?void 0:t.colors)==null?void 0:a.textPrimary}})}),_jsxruntime.jsx.call(void 0, h,{appearance:t,children:"Continue with a wallet"}),_jsxruntime.jsx.call(void 0, g,{children:_jsxruntime.jsx.call(void 0, _chunkCDQFTAM2cjs.a,{style:{height:"21px",width:"21px",color:(c=t==null?void 0:t.colors)==null?void 0:c.textSecondary}})}),_jsxruntime.jsx.call(void 0, _chunkS4BKL6MRcjs.a,{children:"Continue with a wallet"})]})}exports.a = R;
|
package/dist/chunk-ZQ7752MO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t="3.1.0";var c={name:"@crossmint/client-sdk-react-ui",version:t,repository:"https://github.com/Crossmint/crossmint-sdk",license:"Apache-2.0",author:"Paella Labs Inc",sideEffects:!1,type:"module",exports:{import:"./dist/index.js",require:"./dist/index.cjs"},main:"./dist/index.cjs",module:"./dist/index.js",types:"./dist/index.d.ts",files:["dist","LICENSE"],scripts:{build:"cross-env NODE_OPTIONS='--max-old-space-size=16384' tsup",dev:"cross-env NODE_OPTIONS='--max-old-space-size=16384' tsup --watch","test:vitest":"vitest run","generate:docs":"typedoc && node scripts/generate-reference.mjs"},dependencies:{"@basis-theory/react-agentic":"1.0.2","@crossmint/client-sdk-auth":"workspace:*","@crossmint/client-sdk-base":"workspace:*","@crossmint/client-sdk-react-base":"workspace:*","@crossmint/client-sdk-window":"workspace:*","@crossmint/client-signers":"workspace:*","@crossmint/common-sdk-auth":"workspace:*","@crossmint/common-sdk-base":"workspace:*","@crossmint/wallets-sdk":"workspace:*","@dynamic-labs/ethereum":"4.28.0","@dynamic-labs/sdk-react-core":"4.28.0","@dynamic-labs/solana":"4.28.0","@dynamic-labs/sui":"4.28.0","@emotion/react":"^11.11.0","@emotion/styled":"11.14.1","@ethersproject/transactions":"5.7.0","@farcaster/auth-kit":"0.6.0","@mysten/sui":"1.24.0","@solana/web3.js":"1.98.1",bs58:"5.0.0",clsx:"2.1.1",color:"4.2.3","input-otp":"1.4.2","lodash.isequal":"4.5.0",ox:"0.6.9","react-jss":"10.10.0","react-transition-group":"4.4.5",viem:"2.33.1",zod:"3.22.4"},devDependencies:{"@testing-library/react":"^16.0.1","@types/color":"4.2.0","@types/lodash.isequal":"4.5.6","@types/react":"^19.1.10","@types/react-dom":"^19.1.0","@types/react-transition-group":"4.4.12","pino-pretty":"^7.6.0",react:"^19.1.0","react-dom":"^19.1.0",typedoc:"0.28.16"},peerDependencies:{"@solana/web3.js":"^1.98.1",react:">=17.0.2","react-dom":">=17.0.2"}};export{t as a,c as b};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkW5RDCN5Gcjs = require('../../../../chunk-W5RDCN5G.cjs');var _chunkAEXTSRO5cjs = require('../../../../chunk-AEXTSRO5.cjs');require('../../../../chunk-NXEC4PED.cjs');require('../../../../chunk-ZNFOZDZO.cjs');require('../../../../chunk-UV7TO6A4.cjs');require('../../../../chunk-6O6IJTQD.cjs');require('../../../../chunk-XBXL7GMY.cjs');var _chunkGTOPYCJZcjs = require('../../../../chunk-GTOPYCJZ.cjs');var _chunkS5QCH2EDcjs = require('../../../../chunk-S5QCH2ED.cjs');var _chunkHNUI5756cjs = require('../../../../chunk-HNUI5756.cjs');require('../../../../chunk-UMWTEGO6.cjs');require('../../../../chunk-YCYSZLQ2.cjs');require('../../../../chunk-WPDCUPIT.cjs');require('../../../../chunk-HNV3LB4A.cjs');require('../../../../chunk-GS26S4PZ.cjs');require('../../../../chunk-M2ROWHEX.cjs');require('../../../../chunk-OVJIGWD7.cjs');require('../../../../chunk-DJZOP4MT.cjs');var _chunkAHMPKIEYcjs = require('../../../../chunk-AHMPKIEY.cjs');require('../../../../chunk-S4BKL6MR.cjs');require('../../../../chunk-AM2LP6OA.cjs');require('../../../../chunk-SCHRLC2I.cjs');require('../../../../chunk-O3H2EYFA.cjs');require('../../../../chunk-YGN7O63X.cjs');require('../../../../chunk-QHI4DOG7.cjs');require('../../../../chunk-3X24JZVG.cjs');var _chunkEAWYV5ZOcjs = require('../../../../chunk-EAWYV5ZO.cjs');require('../../../../chunk-FQ246XXN.cjs');require('../../../../chunk-QYQERFYL.cjs');require('../../../../chunk-VXAHFAP4.cjs');require('../../../../chunk-EO53B7LL.cjs');require('../../../../chunk-BPEDL7VV.cjs');require('../../../../chunk-VI6TW7JT.cjs');require('../../../../chunk-TWX7ZBKZ.cjs');require('../../../../chunk-EDALAJ5I.cjs');require('../../../../chunk-NRN4WNQL.cjs');require('../../../../chunk-CDQFTAM2.cjs');require('../../../../chunk-I4GMMHQR.cjs');require('../../../../chunk-F7XK4JLV.cjs');require('../../../../chunk-72W5LYBO.cjs');require('../../../../chunk-CGUXWE5X.cjs');require('../../../../chunk-OVORFYD6.cjs');var _chunk2WSEHVNPcjs = require('../../../../chunk-2WSEHVNP.cjs');var _react = require('react');var _authkit = require('@farcaster/auth-kit');var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _jsxruntime = require('react/jsx-runtime');var z=_styled2.default.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
align-items: center;
|
|
5
|
-
gap: 16px;
|
|
6
|
-
`,O=_styled2.default.div`
|
|
7
|
-
text-align: center;
|
|
8
|
-
`,P=_styled2.default.h3`
|
|
9
|
-
font-size: 18px;
|
|
10
|
-
font-weight: 600;
|
|
11
|
-
color: ${t=>{var e,n;return((n=(e=t.appearance)==null?void 0:e.colors)==null?void 0:n.textPrimary)||_chunkEAWYV5ZOcjs.a["cm-text-primary"]}};
|
|
12
|
-
margin: 0 0 8px 0;
|
|
13
|
-
`,W=_styled2.default.p`
|
|
14
|
-
font-size: 16px;
|
|
15
|
-
font-weight: 400;
|
|
16
|
-
color: ${t=>{var e,n;return((n=(e=t.appearance)==null?void 0:e.colors)==null?void 0:n.textSecondary)||_chunkEAWYV5ZOcjs.a["cm-text-secondary"]}};
|
|
17
|
-
margin: 0;
|
|
18
|
-
`,q=_styled2.default.div`
|
|
19
|
-
background-color: ${t=>{var e,n;return((n=(e=t.appearance)==null?void 0:e.colors)==null?void 0:n.inputBackground)||_chunkEAWYV5ZOcjs.a["cm-background-primary"]}};
|
|
20
|
-
aspect-ratio: 1;
|
|
21
|
-
border-radius: ${t=>{var e;return((e=t.appearance)==null?void 0:e.borderRadius)||"8px"}};
|
|
22
|
-
padding: 16px;
|
|
23
|
-
display: flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
justify-content: center;
|
|
26
|
-
`,L=_styled2.default.div`
|
|
27
|
-
min-height: 246px;
|
|
28
|
-
display: flex;
|
|
29
|
-
align-items: center;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
`,M=_styled2.default.p`
|
|
32
|
-
font-size: 16px;
|
|
33
|
-
text-align: center;
|
|
34
|
-
font-weight: 400;
|
|
35
|
-
color: ${t=>{var e,n;return((n=(e=t.appearance)==null?void 0:e.colors)==null?void 0:n.textSecondary)||_chunkEAWYV5ZOcjs.a["cm-text-secondary"]}};
|
|
36
|
-
margin: 0;
|
|
37
|
-
`,j=_styled2.default.a`
|
|
38
|
-
font-size: 16px;
|
|
39
|
-
font-weight: 400;
|
|
40
|
-
color: ${t=>{var e,n;return((n=(e=t.appearance)==null?void 0:e.colors)==null?void 0:n.textLink)||_chunkEAWYV5ZOcjs.a["cm-accent"]}};
|
|
41
|
-
text-decoration: none;
|
|
42
|
-
|
|
43
|
-
&:hover {
|
|
44
|
-
text-decoration: underline;
|
|
45
|
-
}
|
|
46
|
-
`;function re(){_react.useEffect.call(void 0, ()=>{console.warn("[DEPRECATED] FarcasterSignIn is deprecated and will be removed in a future release.")},[]);let{step:t,appearance:e,setStep:n,setError:l}=_chunkHNUI5756cjs.a.call(void 0, );return t==="initial"?_jsxruntime.jsx.call(void 0, _chunkGTOPYCJZcjs.a,{icon:_jsxruntime.jsx.call(void 0, _chunkW5RDCN5Gcjs.a,{style:{height:"25px",width:"25px"}}),appearance:e,onButtonClick:()=>{n("qrCode"),l(null)},children:"Sign in with Farcaster"}):t==="qrCode"?_jsxruntime.jsx.call(void 0, _,{}):null}function _(){var x,h,C,y;let{crossmintAuth:t}=_chunkAEXTSRO5cjs.n.call(void 0, ),{appearance:e,setStep:n,setDialogOpen:l,setError:g}=_chunkHNUI5756cjs.a.call(void 0, ),[p,v]=_react.useState.call(void 0, null),D=_react.useMemo.call(void 0, ()=>({onSuccess:d=>{v(d)}}),[]),{signIn:U,url:i,connect:Q,signOut:T,isConnected:u}=_authkit.useSignIn.call(void 0, D),b=d=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){g(null);try{let f=yield t==null?void 0:t.signInWithFarcaster(d);yield t==null?void 0:t.handleRefreshAuthMaterial(f),l(!1),n("initial")}catch(f){console.error("Error during Farcaster sign-in:",f),g("Failed to sign in with Farcaster")}});return _react.useEffect.call(void 0, ()=>{p!=null&&b(p)},[p]),_react.useEffect.call(void 0, ()=>{u&&U()},[u]),_react.useEffect.call(void 0, ()=>{Q()},[]),_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, _chunkS5QCH2EDcjs.a,{onClick:()=>{T(),n("initial")},iconColor:(x=e==null?void 0:e.colors)==null?void 0:x.textPrimary,ringColor:(h=e==null?void 0:e.colors)==null?void 0:h.accent}),_jsxruntime.jsxs.call(void 0, z,{children:[_jsxruntime.jsxs.call(void 0, O,{children:[_jsxruntime.jsx.call(void 0, P,{appearance:e,children:"Sign in with Farcaster"}),_jsxruntime.jsx.call(void 0, W,{appearance:e,children:"Scan with your phone's camera to continue."})]}),_jsxruntime.jsx.call(void 0, q,{appearance:e,children:i!=null?_jsxruntime.jsx.call(void 0, _authkit.QRCode,{uri:i,size:280}):_jsxruntime.jsx.call(void 0, L,{children:_jsxruntime.jsx.call(void 0, _chunkAHMPKIEYcjs.a,{style:{color:(C=e==null?void 0:e.colors)==null?void 0:C.textSecondary,fill:(y=e==null?void 0:e.colors)==null?void 0:y.textPrimary}})})}),i?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, M,{appearance:e,children:"Alternatively, click on this link to open Warpcast."}),_jsxruntime.jsx.call(void 0, j,{href:i,rel:"noopener noreferrer",target:"_blank",appearance:e,children:"Open Warpcast"})]}):_jsxruntime.jsx.call(void 0, "div",{style:{height:"66px"}})]})]})}exports.FarcasterSignIn = re;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Farcaster authentication is deprecated and will be removed in a future release.
|
|
5
|
-
*/
|
|
6
|
-
declare function FarcasterSignIn(): react_jsx_runtime.JSX.Element | null;
|
|
7
|
-
|
|
8
|
-
export { FarcasterSignIn };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated Farcaster authentication is deprecated and will be removed in a future release.
|
|
5
|
-
*/
|
|
6
|
-
declare function FarcasterSignIn(): react_jsx_runtime.JSX.Element | null;
|
|
7
|
-
|
|
8
|
-
export { FarcasterSignIn };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import{a as w}from"../../../../chunk-UHFCB2EY.js";import{n as R}from"../../../../chunk-UT3YBBVW.js";import"../../../../chunk-LI7QMYLA.js";import"../../../../chunk-ZHPSJCFM.js";import"../../../../chunk-TQ3JBX7K.js";import"../../../../chunk-ED6OVXN6.js";import"../../../../chunk-O5IPDCMT.js";import{a as k}from"../../../../chunk-4HSZ5QA3.js";import{a as F}from"../../../../chunk-AC2SJG3Q.js";import{a as m}from"../../../../chunk-2F3UEXTE.js";import"../../../../chunk-KFFPM6JM.js";import"../../../../chunk-HHI2XRKR.js";import"../../../../chunk-IBUBTQ42.js";import"../../../../chunk-ETAEFFCS.js";import"../../../../chunk-AZ72RWXJ.js";import"../../../../chunk-ANYQCOAS.js";import"../../../../chunk-LUSXGZYB.js";import"../../../../chunk-JL7YHC7D.js";import{a as I}from"../../../../chunk-AOBO3CEQ.js";import"../../../../chunk-23YVHBPI.js";import"../../../../chunk-EUJ5GQ5N.js";import"../../../../chunk-UG5R7IPH.js";import"../../../../chunk-RV2X7AFS.js";import"../../../../chunk-BWCRTWMO.js";import"../../../../chunk-HGHYGPCN.js";import"../../../../chunk-NZUCXN2O.js";import{a}from"../../../../chunk-DFSB3TWF.js";import"../../../../chunk-H34D6PAN.js";import"../../../../chunk-OOLXYAO7.js";import"../../../../chunk-OAHZHKRR.js";import"../../../../chunk-QFUZG5YR.js";import"../../../../chunk-BAXCSO7J.js";import"../../../../chunk-77PBG2JJ.js";import"../../../../chunk-HVZ5M3FY.js";import"../../../../chunk-XFYW7RD2.js";import"../../../../chunk-UAFW3OWA.js";import"../../../../chunk-H3CPTTQQ.js";import"../../../../chunk-C3JRTLQP.js";import"../../../../chunk-ZUZSQ7MV.js";import"../../../../chunk-7BUQHAOY.js";import"../../../../chunk-37SPIIXL.js";import"../../../../chunk-ZQ7752MO.js";import{d as S}from"../../../../chunk-PXDN3KFO.js";import{useEffect as s,useMemo as A,useState as E}from"react";import{useSignIn as B,QRCode as $}from"@farcaster/auth-kit";import o from"@emotion/styled";import{Fragment as G,jsx as r,jsxs as c}from"react/jsx-runtime";var z=o.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
align-items: center;
|
|
5
|
-
gap: 16px;
|
|
6
|
-
`,O=o.div`
|
|
7
|
-
text-align: center;
|
|
8
|
-
`,P=o.h3`
|
|
9
|
-
font-size: 18px;
|
|
10
|
-
font-weight: 600;
|
|
11
|
-
color: ${t=>{var e,n;return((n=(e=t.appearance)==null?void 0:e.colors)==null?void 0:n.textPrimary)||a["cm-text-primary"]}};
|
|
12
|
-
margin: 0 0 8px 0;
|
|
13
|
-
`,W=o.p`
|
|
14
|
-
font-size: 16px;
|
|
15
|
-
font-weight: 400;
|
|
16
|
-
color: ${t=>{var e,n;return((n=(e=t.appearance)==null?void 0:e.colors)==null?void 0:n.textSecondary)||a["cm-text-secondary"]}};
|
|
17
|
-
margin: 0;
|
|
18
|
-
`,q=o.div`
|
|
19
|
-
background-color: ${t=>{var e,n;return((n=(e=t.appearance)==null?void 0:e.colors)==null?void 0:n.inputBackground)||a["cm-background-primary"]}};
|
|
20
|
-
aspect-ratio: 1;
|
|
21
|
-
border-radius: ${t=>{var e;return((e=t.appearance)==null?void 0:e.borderRadius)||"8px"}};
|
|
22
|
-
padding: 16px;
|
|
23
|
-
display: flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
justify-content: center;
|
|
26
|
-
`,L=o.div`
|
|
27
|
-
min-height: 246px;
|
|
28
|
-
display: flex;
|
|
29
|
-
align-items: center;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
`,M=o.p`
|
|
32
|
-
font-size: 16px;
|
|
33
|
-
text-align: center;
|
|
34
|
-
font-weight: 400;
|
|
35
|
-
color: ${t=>{var e,n;return((n=(e=t.appearance)==null?void 0:e.colors)==null?void 0:n.textSecondary)||a["cm-text-secondary"]}};
|
|
36
|
-
margin: 0;
|
|
37
|
-
`,j=o.a`
|
|
38
|
-
font-size: 16px;
|
|
39
|
-
font-weight: 400;
|
|
40
|
-
color: ${t=>{var e,n;return((n=(e=t.appearance)==null?void 0:e.colors)==null?void 0:n.textLink)||a["cm-accent"]}};
|
|
41
|
-
text-decoration: none;
|
|
42
|
-
|
|
43
|
-
&:hover {
|
|
44
|
-
text-decoration: underline;
|
|
45
|
-
}
|
|
46
|
-
`;function oe(){s(()=>{console.warn("[DEPRECATED] FarcasterSignIn is deprecated and will be removed in a future release.")},[]);let{step:t,appearance:e,setStep:n,setError:l}=m();return t==="initial"?r(k,{icon:r(w,{style:{height:"25px",width:"25px"}}),appearance:e,onButtonClick:()=>{n("qrCode"),l(null)},children:"Sign in with Farcaster"}):t==="qrCode"?r(_,{}):null}function _(){var x,h,C,y;let{crossmintAuth:t}=R(),{appearance:e,setStep:n,setDialogOpen:l,setError:g}=m(),[p,v]=E(null),D=A(()=>({onSuccess:d=>{v(d)}}),[]),{signIn:U,url:i,connect:Q,signOut:T,isConnected:u}=B(D),b=d=>S(this,null,function*(){g(null);try{let f=yield t==null?void 0:t.signInWithFarcaster(d);yield t==null?void 0:t.handleRefreshAuthMaterial(f),l(!1),n("initial")}catch(f){console.error("Error during Farcaster sign-in:",f),g("Failed to sign in with Farcaster")}});return s(()=>{p!=null&&b(p)},[p]),s(()=>{u&&U()},[u]),s(()=>{Q()},[]),c("div",{children:[r(F,{onClick:()=>{T(),n("initial")},iconColor:(x=e==null?void 0:e.colors)==null?void 0:x.textPrimary,ringColor:(h=e==null?void 0:e.colors)==null?void 0:h.accent}),c(z,{children:[c(O,{children:[r(P,{appearance:e,children:"Sign in with Farcaster"}),r(W,{appearance:e,children:"Scan with your phone's camera to continue."})]}),r(q,{appearance:e,children:i!=null?r($,{uri:i,size:280}):r(L,{children:r(I,{style:{color:(C=e==null?void 0:e.colors)==null?void 0:C.textSecondary,fill:(y=e==null?void 0:e.colors)==null?void 0:y.textPrimary}})})}),i?c(G,{children:[r(M,{appearance:e,children:"Alternatively, click on this link to open Warpcast."}),r(j,{href:i,rel:"noopener noreferrer",target:"_blank",appearance:e,children:"Open Warpcast"})]}):r("div",{style:{height:"66px"}})]})]})}export{oe as FarcasterSignIn};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNXEC4PEDcjs = require('../../../../chunk-NXEC4PED.cjs');require('../../../../chunk-ZNFOZDZO.cjs');require('../../../../chunk-UV7TO6A4.cjs');require('../../../../chunk-S5QCH2ED.cjs');require('../../../../chunk-HNUI5756.cjs');require('../../../../chunk-YCYSZLQ2.cjs');require('../../../../chunk-S4BKL6MR.cjs');require('../../../../chunk-QHI4DOG7.cjs');require('../../../../chunk-3X24JZVG.cjs');require('../../../../chunk-EAWYV5ZO.cjs');require('../../../../chunk-EO53B7LL.cjs');require('../../../../chunk-CDQFTAM2.cjs');require('../../../../chunk-2WSEHVNP.cjs');exports.Web3AuthFlow = _chunkNXEC4PEDcjs.a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"../../../../chunk-LI7QMYLA.js";import"../../../../chunk-ZHPSJCFM.js";import"../../../../chunk-TQ3JBX7K.js";import"../../../../chunk-AC2SJG3Q.js";import"../../../../chunk-2F3UEXTE.js";import"../../../../chunk-HHI2XRKR.js";import"../../../../chunk-23YVHBPI.js";import"../../../../chunk-HGHYGPCN.js";import"../../../../chunk-NZUCXN2O.js";import"../../../../chunk-DFSB3TWF.js";import"../../../../chunk-QFUZG5YR.js";import"../../../../chunk-H3CPTTQQ.js";import"../../../../chunk-PXDN3KFO.js";export{a as Web3AuthFlow};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZNFOZDZOcjs = require('../../../../chunk-ZNFOZDZO.cjs');require('../../../../chunk-HNUI5756.cjs');require('../../../../chunk-YCYSZLQ2.cjs');require('../../../../chunk-S4BKL6MR.cjs');require('../../../../chunk-QHI4DOG7.cjs');require('../../../../chunk-3X24JZVG.cjs');require('../../../../chunk-EAWYV5ZO.cjs');require('../../../../chunk-CDQFTAM2.cjs');require('../../../../chunk-2WSEHVNP.cjs');exports.Web3AuthFlowButton = _chunkZNFOZDZOcjs.a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"../../../../chunk-ZHPSJCFM.js";import"../../../../chunk-2F3UEXTE.js";import"../../../../chunk-HHI2XRKR.js";import"../../../../chunk-23YVHBPI.js";import"../../../../chunk-HGHYGPCN.js";import"../../../../chunk-NZUCXN2O.js";import"../../../../chunk-DFSB3TWF.js";import"../../../../chunk-H3CPTTQQ.js";import"../../../../chunk-PXDN3KFO.js";export{a as Web3AuthFlowButton};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUV7TO6A4cjs = require('../../../../chunk-UV7TO6A4.cjs');require('../../../../chunk-S5QCH2ED.cjs');require('../../../../chunk-HNUI5756.cjs');require('../../../../chunk-QHI4DOG7.cjs');require('../../../../chunk-3X24JZVG.cjs');require('../../../../chunk-EAWYV5ZO.cjs');require('../../../../chunk-EO53B7LL.cjs');require('../../../../chunk-2WSEHVNP.cjs');exports.Web3Connectors = _chunkUV7TO6A4cjs.a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"../../../../chunk-TQ3JBX7K.js";import"../../../../chunk-AC2SJG3Q.js";import"../../../../chunk-2F3UEXTE.js";import"../../../../chunk-HGHYGPCN.js";import"../../../../chunk-NZUCXN2O.js";import"../../../../chunk-DFSB3TWF.js";import"../../../../chunk-QFUZG5YR.js";import"../../../../chunk-PXDN3KFO.js";export{a as Web3Connectors};
|
package/dist/icons/farcaster.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkW5RDCN5Gcjs = require('../chunk-W5RDCN5G.cjs');require('../chunk-2WSEHVNP.cjs');exports.FarcasterIcon = _chunkW5RDCN5Gcjs.a;
|
package/dist/icons/farcaster.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"../chunk-UHFCB2EY.js";import"../chunk-PXDN3KFO.js";export{a as FarcasterIcon};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-2WSEHVNP.cjs');var _authkit = require('@farcaster/auth-kit');var _jsxruntime = require('react/jsx-runtime');function c({baseUrl:t,children:i}){let e={rpcUrl:"https://mainnet.optimism.io",domain:new URL(t).hostname.replace(/^www\./,""),siweUri:`${t}api/2024-09-26/session/sdk/auth/authenticate`};return _jsxruntime.jsx.call(void 0, _authkit.AuthKitProvider,{config:e,children:i})}exports.FarcasterProvider = c;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated Farcaster authentication is deprecated and will be removed in a future release.
|
|
6
|
-
*/
|
|
7
|
-
declare function FarcasterProvider({ baseUrl, children }: {
|
|
8
|
-
baseUrl: string;
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
}): react_jsx_runtime.JSX.Element;
|
|
11
|
-
|
|
12
|
-
export { FarcasterProvider };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated Farcaster authentication is deprecated and will be removed in a future release.
|
|
6
|
-
*/
|
|
7
|
-
declare function FarcasterProvider({ baseUrl, children }: {
|
|
8
|
-
baseUrl: string;
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
}): react_jsx_runtime.JSX.Element;
|
|
11
|
-
|
|
12
|
-
export { FarcasterProvider };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../chunk-PXDN3KFO.js";import{AuthKitProvider as r}from"@farcaster/auth-kit";import{jsx as o}from"react/jsx-runtime";function s({baseUrl:t,children:i}){let e={rpcUrl:"https://mainnet.optimism.io",domain:new URL(t).hostname.replace(/^www\./,""),siweUri:`${t}api/2024-09-26/session/sdk/auth/authenticate`};return o(r,{config:e,children:i})}export{s as FarcasterProvider};
|