@web3modal/react
Advanced tools
Comparing version 2.4.7 to 2.5.0
@@ -7,3 +7,3 @@ import type { ConfigCtrlState, ThemeCtrlState } from '@web3modal/core'; | ||
*/ | ||
export type Web3ModalProps = Omit<ConfigCtrlState, 'enableAuthMode' | 'enableStandaloneMode' | 'standaloneChains' | 'walletConnectVersion'> & ThemeCtrlState & { | ||
export type Web3ModalProps = Omit<ConfigCtrlState, 'walletConnectVersion'> & ThemeCtrlState & { | ||
ethereumClient?: EthereumClient; | ||
@@ -10,0 +10,0 @@ }; |
@@ -1,1 +0,2 @@ | ||
import n,{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 I}from"@web3modal/core";var W=Object.defineProperty,s=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,p=(t,e,r)=>e in t?W(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,k=(t,e)=>{for(var r in e||(e={}))T.call(e,r)&&p(t,r,e[r]);if(s)for(var r of s(e))V.call(e,r)&&p(t,r,e[r]);return t};function le(t){const{size:e}=t;return n.createElement("div",{style:{width:e,height:e}},n.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 n.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 n.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 o in t)C.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&&P.call(t,o)&&(r[o]=t[o]);return r};function R(t){var e=t,{ethereumClient:r}=e,o=K(e,["ethereumClient"]);const b=E(async()=>{a.setThemeConfig(o),r&&M.setEthereumClient(r),S.setConfig(J(H({},o),{walletConnectVersion:r?.walletConnectVersion})),await import("@web3modal/ui"),$.setIsUiLoaded(!0)},[r,o]);return i(()=>{b()},[b]),n.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 n.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,oe=(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(o=>e(oe({},o)));return()=>{r()}},[]),{isOpen:t.open,open:l.open,close:l.close,setDefaultChain:$.setSelectedChain}}function pe(t){i(()=>{const e=I.subscribe(t);return()=>{e()}},[])}function ue(){const[t,e]=j({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{le as W3mQrCode,ce as Web3Button,ie as Web3Modal,be as Web3NetworkSwitch,se as useWeb3Modal,pe as useWeb3ModalEvents,ue as useWeb3ModalTheme}; | ||
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}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@web3modal/react", | ||
"version": "2.4.7", | ||
"version": "2.5.0", | ||
"main": "dist/index.js", | ||
@@ -20,7 +20,7 @@ "type": "module", | ||
"dependencies": { | ||
"@web3modal/core": "2.4.7", | ||
"@web3modal/ui": "2.4.7" | ||
"@web3modal/core": "2.5.0", | ||
"@web3modal/ui": "2.5.0" | ||
}, | ||
"devDependencies": { | ||
"@web3modal/ethereum": "2.4.7" | ||
"@web3modal/ethereum": "2.5.0" | ||
}, | ||
@@ -27,0 +27,0 @@ "peerDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21846
13
176
+ Added@web3modal/core@2.5.0(transitive)
+ Added@web3modal/ui@2.5.0(transitive)
+ Addedvaltio@1.10.6(transitive)
- Removed@web3modal/core@2.4.7(transitive)
- Removed@web3modal/ui@2.4.7(transitive)
- Removedvaltio@1.10.5(transitive)
Updated@web3modal/core@2.5.0
Updated@web3modal/ui@2.5.0