@web3modal/react
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -7,3 +7,3 @@ import type { ConfigCtrlState } from '@web3modal/core'; | ||
*/ | ||
interface Props extends Omit<ConfigCtrlState, 'enableStandaloneMode' | 'standaloneChains'> { | ||
interface Props extends Omit<ConfigCtrlState, 'enableStandaloneMode' | 'standaloneChains' | 'walletConnectVersion'> { | ||
ethereumClient?: EthereumClient; | ||
@@ -10,0 +10,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import l,{memo as w,useCallback as j,useEffect as c,useState as h}from"react";import{ClientCtrl as $,ConfigCtrl as n,OptionsCtrl as d,ModalCtrl as a}from"@web3modal/core";var C=Object.defineProperty,u=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,p=(t,e,r)=>e in t?C(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,E=(t,e)=>{for(var r in e||(e={}))g.call(e,r)&&p(t,r,e[r]);if(u)for(var r of u(e))P.call(e,r)&&p(t,r,e[r]);return t};function K(t){return l.createElement("w3m-core-button",E({},t))}var M=Object.defineProperty,b=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,s=(t,e,r)=>e in t?M(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,I=(t,e)=>{for(var r in e||(e={}))S.call(e,r)&&s(t,r,e[r]);if(b)for(var r of b(e))k.call(e,r)&&s(t,r,e[r]);return t};function B(t){return l.createElement("w3m-modal",I({},t))}var f=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,T=(t,e)=>{var r={};for(var o in t)W.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&f)for(var o of f(t))e.indexOf(o)<0&&x.call(t,o)&&(r[o]=t[o]);return r};function D(t){var e=t,{ethereumClient:r}=e,o=T(e,["ethereumClient"]);const i=j(async()=>{r&&$.setEthereumClient(r),n.setConfig(o),await import("@web3modal/ui"),d.setIsUiLoaded(!0)},[r,o]);return c(()=>{i()},[i]),l.createElement(B,null)}const Q=w(D);var L=Object.defineProperty,m=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,v=(t,e,r)=>e in t?L(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,q=(t,e)=>{for(var r in e||(e={}))N.call(e,r)&&v(t,r,e[r]);if(m)for(var r of m(e))U.call(e,r)&&v(t,r,e[r]);return t};function R(t){return l.createElement("w3m-network-switch",q({},t))}var z=Object.defineProperty,y=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,O=(t,e,r)=>e in t?z(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,G=(t,e)=>{for(var r in e||(e={}))A.call(e,r)&&O(t,r,e[r]);if(y)for(var r of y(e))F.call(e,r)&&O(t,r,e[r]);return t};function V(){const[t,e]=h(a.state);return c(()=>{const r=a.subscribe(o=>e(G({},o)));return()=>{r()}},[]),{isOpen:t.open,open:a.open,close:a.close,setDefaultChain:d.setSelectedChain}}function X(){const[t,e]=h({themeMode:n.state.themeMode,themeColor:n.state.themeColor,themeBackground:n.state.themeBackground});return c(()=>{const r=n.subscribe(o=>e({themeMode:o.themeMode,themeColor:o.themeColor,themeBackground:o.themeBackground}));return()=>{r()}},[]),{theme:t,setTheme:n.setThemeConfig}}export{K as Web3Button,Q as Web3Modal,R as Web3NetworkSwitch,V as useWeb3Modal,X as useWeb3ModalTheme}; | ||
import c,{memo as $,useCallback as g,useEffect as i,useState as d}from"react";import{ClientCtrl as P,ConfigCtrl as n,OptionsCtrl as w,ModalCtrl as a}from"@web3modal/core";var E=Object.defineProperty,b=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,p=(t,e,r)=>e in t?E(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,k=(t,e)=>{for(var r in e||(e={}))M.call(e,r)&&p(t,r,e[r]);if(b)for(var r of b(e))S.call(e,r)&&p(t,r,e[r]);return t};function Z(t){return c.createElement("w3m-core-button",k({},t))}var I=Object.defineProperty,s=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,f=(t,e,r)=>e in t?I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e||(e={}))B.call(e,r)&&f(t,r,e[r]);if(s)for(var r of s(e))W.call(e,r)&&f(t,r,e[r]);return t};function T(t){return c.createElement("w3m-modal",x({},t))}var V=Object.defineProperty,D=Object.defineProperties,L=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,m=(t,e,r)=>e in t?V(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,N=(t,e)=>{for(var r in e||(e={}))j.call(e,r)&&m(t,r,e[r]);if(l)for(var r of l(e))C.call(e,r)&&m(t,r,e[r]);return t},U=(t,e)=>D(t,L(e)),q=(t,e)=>{var r={};for(var o in t)j.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&l)for(var o of l(t))e.indexOf(o)<0&&C.call(t,o)&&(r[o]=t[o]);return r};function z(t){var e=t,{ethereumClient:r}=e,o=q(e,["ethereumClient"]);const u=g(async()=>{r&&P.setEthereumClient(r),n.setConfig(U(N({},o),{walletConnectVersion:r?.walletConnectVersion})),await import("@web3modal/ui"),w.setIsUiLoaded(!0)},[r,o]);return i(()=>{u()},[u]),c.createElement(T,null)}const _=$(z);var A=Object.defineProperty,v=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,G=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={}))F.call(e,r)&&y(t,r,e[r]);if(v)for(var r of v(e))G.call(e,r)&&y(t,r,e[r]);return t};function ee(t){return c.createElement("w3m-network-switch",H({},t))}var J=Object.defineProperty,O=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,h=(t,e,r)=>e in t?J(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,R=(t,e)=>{for(var r in e||(e={}))K.call(e,r)&&h(t,r,e[r]);if(O)for(var r of O(e))Q.call(e,r)&&h(t,r,e[r]);return t};function re(){const[t,e]=d(a.state);return i(()=>{const r=a.subscribe(o=>e(R({},o)));return()=>{r()}},[]),{isOpen:t.open,open:a.open,close:a.close,setDefaultChain:w.setSelectedChain}}function te(){const[t,e]=d({themeMode:n.state.themeMode,themeColor:n.state.themeColor,themeBackground:n.state.themeBackground});return i(()=>{const r=n.subscribe(o=>e({themeMode:o.themeMode,themeColor:o.themeColor,themeBackground:o.themeBackground}));return()=>{r()}},[]),{theme:t,setTheme:n.setThemeConfig}}export{Z as Web3Button,_ as Web3Modal,ee as Web3NetworkSwitch,re as useWeb3Modal,te as useWeb3ModalTheme}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@web3modal/react", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"main": "dist/index.js", | ||
@@ -19,4 +19,4 @@ "type": "module", | ||
"dependencies": { | ||
"@web3modal/core": "2.1.0", | ||
"@web3modal/ui": "2.1.0" | ||
"@web3modal/core": "2.1.1", | ||
"@web3modal/ui": "2.1.1" | ||
}, | ||
@@ -26,3 +26,3 @@ "devDependencies": { | ||
"@types/react-dom": "18.0.10", | ||
"@web3modal/ethereum": "2.1.0", | ||
"@web3modal/ethereum": "2.1.1", | ||
"eslint-plugin-react": "7.32.2", | ||
@@ -29,0 +29,0 @@ "eslint-plugin-react-hooks": "4.6.0", |
Sorry, the diff of this file is not supported yet
15478
95
+ Added@web3modal/core@2.1.1(transitive)
+ Added@web3modal/ui@2.1.1(transitive)
- Removed@web3modal/core@2.1.0(transitive)
- Removed@web3modal/ui@2.1.0(transitive)
Updated@web3modal/core@2.1.1
Updated@web3modal/ui@2.1.1