@web3modal/react
Advanced tools
Comparing version 2.5.0 to 2.5.1-8e23a9a1
@@ -13,4 +13,4 @@ import type { ConfigCtrlState, ThemeCtrlState } from '@web3modal/core'; | ||
*/ | ||
declare function CreateWeb3Modal({ ethereumClient, ...config }: Web3ModalProps): React.JSX.Element; | ||
declare function CreateWeb3Modal({ ethereumClient, ...config }: Web3ModalProps): React.JSX.Element | null; | ||
export declare const Web3Modal: React.MemoExoticComponent<typeof CreateWeb3Modal>; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import o,{memo as g,useCallback as E,useEffect as i,useState as j}from"react";import{ThemeCtrl as a,ClientCtrl as M,ConfigCtrl as S,OptionsCtrl as $,ModalCtrl as l,EventsCtrl as W}from"@web3modal/core";var I=Object.defineProperty,s=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,p=(t,e,r)=>e in t?I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,k=(t,e)=>{for(var r in e||(e={}))V.call(e,r)&&p(t,r,e[r]);if(s)for(var r of s(e))T.call(e,r)&&p(t,r,e[r]);return t};function le(t){const{size:e}=t;return o.createElement("div",{style:{width:e,height:e}},o.createElement("w3m-qrcode",k({},t)))}var x=Object.defineProperty,u=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,f=(t,e,r)=>e in t?x(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,z=(t,e)=>{for(var r in e||(e={}))D.call(e,r)&&f(t,r,e[r]);if(u)for(var r of u(e))q.call(e,r)&&f(t,r,e[r]);return t};function ce(t){return o.createElement("w3m-core-button",z({},t))}var B=Object.defineProperty,v=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,m=(t,e,r)=>e in t?B(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Q=(t,e)=>{for(var r in e||(e={}))L.call(e,r)&&m(t,r,e[r]);if(v)for(var r of v(e))N.call(e,r)&&m(t,r,e[r]);return t};function U(t){return o.createElement("w3m-modal",Q({},t))}var A=Object.defineProperty,F=Object.defineProperties,G=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,y=(t,e,r)=>e in t?A(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,H=(t,e)=>{for(var r in e||(e={}))C.call(e,r)&&y(t,r,e[r]);if(c)for(var r of c(e))P.call(e,r)&&y(t,r,e[r]);return t},J=(t,e)=>F(t,G(e)),K=(t,e)=>{var r={};for(var n in t)C.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&c)for(var n of c(t))e.indexOf(n)<0&&P.call(t,n)&&(r[n]=t[n]);return r};function R(t){var e=t,{ethereumClient:r}=e,n=K(e,["ethereumClient"]);const b=E(async()=>{a.setThemeConfig(n),r&&M.setEthereumClient(r),S.setConfig(J(H({},n),{walletConnectVersion:r?.walletConnectVersion})),await import("@web3modal/ui"),$.setIsUiLoaded(!0)},[r,n]);return i(()=>{b()},[b]),o.createElement(U,null)}const ie=g(R);var X=Object.defineProperty,O=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,w=(t,e,r)=>e in t?X(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_=(t,e)=>{for(var r in e||(e={}))Y.call(e,r)&&w(t,r,e[r]);if(O)for(var r of O(e))Z.call(e,r)&&w(t,r,e[r]);return t};function be(t){return o.createElement("w3m-network-switch",_({},t))}var ee=Object.defineProperty,d=Object.getOwnPropertySymbols,re=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,h=(t,e,r)=>e in t?ee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ne=(t,e)=>{for(var r in e||(e={}))re.call(e,r)&&h(t,r,e[r]);if(d)for(var r of d(e))te.call(e,r)&&h(t,r,e[r]);return t};function se(){const[t,e]=j(l.state);return i(()=>{const r=l.subscribe(n=>e(ne({},n)));return()=>{r()}},[]),{isOpen:t.open,open:l.open,close:l.close,setDefaultChain:$.setSelectedChain}}function pe(t){i(()=>{const e=W.subscribe(t);return()=>{e()}},[])}function ue(){const[t,e]=j({themeMode:a.state.themeMode,themeVariables:a.state.themeVariables});return i(()=>{const r=a.subscribe(n=>e({themeMode:n.themeMode,themeVariables:n.themeVariables}));return()=>{r()}},[]),{theme:t,setTheme:a.setThemeConfig}}export{le as W3mQrCode,ce as Web3Button,ie as Web3Modal,be as Web3NetworkSwitch,se as useWeb3Modal,pe as useWeb3ModalEvents,ue as useWeb3ModalTheme}; | ||
import n,{memo as M,useState as b,useCallback as S,useEffect as i}from"react";import{ThemeCtrl as a,ClientCtrl as I,ConfigCtrl as W,OptionsCtrl as $,ModalCtrl as l,EventsCtrl as V}from"@web3modal/core";var T=Object.defineProperty,s=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,u=(t,e,r)=>e in t?T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D=(t,e)=>{for(var r in e||(e={}))x.call(e,r)&&u(t,r,e[r]);if(s)for(var r of s(e))k.call(e,r)&&u(t,r,e[r]);return t};function ie(t){const{size:e}=t;return n.createElement("div",{style:{width:e,height:e}},n.createElement("w3m-qrcode",D({},t)))}var q=Object.defineProperty,p=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,f=(t,e,r)=>e in t?q(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,L=(t,e)=>{for(var r in e||(e={}))z.call(e,r)&&f(t,r,e[r]);if(p)for(var r of p(e))B.call(e,r)&&f(t,r,e[r]);return t};function be(t){return n.createElement("w3m-core-button",L({},t))}var N=Object.defineProperty,v=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,m=(t,e,r)=>e in t?N(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,A=(t,e)=>{for(var r in e||(e={}))Q.call(e,r)&&m(t,r,e[r]);if(v)for(var r of v(e))U.call(e,r)&&m(t,r,e[r]);return t};function F(t){return n.createElement("w3m-modal",A({},t))}var G=Object.defineProperty,H=Object.defineProperties,J=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,y=(t,e,r)=>e in t?G(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,K=(t,e)=>{for(var r in e||(e={}))j.call(e,r)&&y(t,r,e[r]);if(c)for(var r of c(e))C.call(e,r)&&y(t,r,e[r]);return t},R=(t,e)=>H(t,J(e)),X=(t,e)=>{var r={};for(var o in t)j.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&c)for(var o of c(t))e.indexOf(o)<0&&C.call(t,o)&&(r[o]=t[o]);return r};function Y(t){var e=t,{ethereumClient:r}=e,o=X(e,["ethereumClient"]);const[P,g]=b(!1),E=S(async()=>{a.setThemeConfig(o),r&&I.setEthereumClient(r),W.setConfig(R(K({},o),{walletConnectVersion:r?.walletConnectVersion})),await import("@web3modal/ui"),$.setIsUiLoaded(!0),g(!0)},[r,o]);return i(()=>{E()},[]),P?n.createElement(F,null):null}const se=M(Y);var Z=Object.defineProperty,O=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,w=(t,e,r)=>e in t?Z(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,re=(t,e)=>{for(var r in e||(e={}))_.call(e,r)&&w(t,r,e[r]);if(O)for(var r of O(e))ee.call(e,r)&&w(t,r,e[r]);return t};function ue(t){return n.createElement("w3m-network-switch",re({},t))}var te=Object.defineProperty,d=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,h=(t,e,r)=>e in t?te(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ae=(t,e)=>{for(var r in e||(e={}))oe.call(e,r)&&h(t,r,e[r]);if(d)for(var r of d(e))ne.call(e,r)&&h(t,r,e[r]);return t};function pe(){const[t,e]=b(l.state);return i(()=>{const r=l.subscribe(o=>e(ae({},o)));return()=>{r()}},[]),{isOpen:t.open,open:l.open,close:l.close,setDefaultChain:$.setSelectedChain}}function fe(t){i(()=>{const e=V.subscribe(t);return()=>{e()}},[])}function ve(){const[t,e]=b({themeMode:a.state.themeMode,themeVariables:a.state.themeVariables});return i(()=>{const r=a.subscribe(o=>e({themeMode:o.themeMode,themeVariables:o.themeVariables}));return()=>{r()}},[]),{theme:t,setTheme:a.setThemeConfig}}export{ie as W3mQrCode,be as Web3Button,se as Web3Modal,ue as Web3NetworkSwitch,pe as useWeb3Modal,fe as useWeb3ModalEvents,ve as useWeb3ModalTheme}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@web3modal/react", | ||
"version": "2.5.0", | ||
"version": "2.5.1-8e23a9a1", | ||
"main": "dist/index.js", | ||
@@ -20,7 +20,7 @@ "type": "module", | ||
"dependencies": { | ||
"@web3modal/core": "2.5.0", | ||
"@web3modal/ui": "2.5.0" | ||
"@web3modal/core": "2.5.1-8e23a9a1", | ||
"@web3modal/ui": "2.5.1-8e23a9a1" | ||
}, | ||
"devDependencies": { | ||
"@web3modal/ethereum": "2.5.0" | ||
"@web3modal/ethereum": "2.5.1-8e23a9a1" | ||
}, | ||
@@ -27,0 +27,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
22099
1
+ Added@web3modal/core@2.5.1-8e23a9a1(transitive)
+ Added@web3modal/ui@2.5.1-8e23a9a1(transitive)
- Removed@web3modal/core@2.5.0(transitive)
- Removed@web3modal/ui@2.5.0(transitive)
Updated@web3modal/ui@2.5.1-8e23a9a1