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