Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@web3modal/react

Package Overview
Dependencies
Maintainers
4
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3modal/react - npm Package Compare versions

Comparing version 2.1.2 to 2.2.0-02f443d

1

dist/_types/src/components/Modal.d.ts

@@ -0,1 +1,2 @@

/// <reference types="react" />
import type { W3mModal } from '@web3modal/ui';

@@ -2,0 +3,0 @@ /**

3

dist/_types/src/components/Web3Button.d.ts

@@ -0,1 +1,2 @@

/// <reference types="react" />
import type { W3mCoreButton } from '@web3modal/ui';

@@ -12,5 +13,5 @@ /**

interface IntrinsicElements {
'w3m-core-button': Pick<W3mCoreButton, 'balance' | 'icon' | 'label'>;
'w3m-core-button': Pick<W3mCoreButton, 'avatar' | 'balance' | 'icon' | 'label'>;
}
}
}

@@ -1,15 +0,14 @@

import type { ConfigCtrlState } from '@web3modal/core';
/// <reference types="react" />
import type { ConfigCtrlState, ThemeCtrlState } from '@web3modal/core';
import type { EthereumClient } from '@web3modal/ethereum';
import React from 'react';
/**
* Props
*/
interface Props extends Omit<ConfigCtrlState, 'enableStandaloneMode' | 'standaloneChains' | 'walletConnectVersion'> {
type Props = Omit<ConfigCtrlState, 'enableStandaloneMode' | 'standaloneChains' | 'walletConnectVersion'> & ThemeCtrlState & {
ethereumClient?: EthereumClient;
}
};
/**
* Component
*/
declare function CreateWeb3Modal({ ethereumClient, ...config }: Props): JSX.Element;
export declare const Web3Modal: React.MemoExoticComponent<typeof CreateWeb3Modal>;
export declare function Web3Modal({ ethereumClient, ...config }: Props): JSX.Element;
export {};

@@ -0,1 +1,2 @@

/// <reference types="react" />
import type { W3mNetworkSwitch } from '@web3modal/ui';

@@ -2,0 +3,0 @@ /**

export declare function useWeb3ModalTheme(): {
theme: {
themeMode: "dark" | "light" | undefined;
themeColor: "blackWhite" | "blue" | "default" | "green" | "magenta" | "orange" | "purple" | "teal" | undefined;
themeBackground: "gradient" | "themeColor" | undefined;
};
setTheme: (theme: Pick<import("@web3modal/core").ConfigCtrlState, "themeBackground" | "themeColor" | "themeMode">) => void;
setTheme: (theme: import("@web3modal/core").ThemeCtrlState) => void;
};

@@ -1,2 +0,2 @@

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};
import c,{useCallback as C,useEffect as i,useState as d}from"react";import{ThemeCtrl as a,ClientCtrl as P,ConfigCtrl as g,OptionsCtrl as h,ModalCtrl as o}from"@web3modal/core";var E=Object.defineProperty,p=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,u=(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)&&u(t,r,e[r]);if(p)for(var r of p(e))S.call(e,r)&&u(t,r,e[r]);return t};function Y(t){return c.createElement("w3m-core-button",I({},t))}var T=Object.defineProperty,f=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,s=(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)&&s(t,r,e[r]);if(f)for(var r of f(e))k.call(e,r)&&s(t,r,e[r]);return t};function D(t){return c.createElement("w3m-modal",x({},t))}var V=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?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)&&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"),h.setIsUiLoaded(!0)},[r,n]);return i(()=>{b()},[b]),c.createElement(D,null)}var z=Object.defineProperty,m=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,y=(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)&&y(t,r,e[r]);if(m)for(var r of m(e))F.call(e,r)&&y(t,r,e[r]);return t};function _(t){return c.createElement("w3m-network-switch",G({},t))}var H=Object.defineProperty,O=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable,w=(t,e,r)=>e in t?H(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Q=(t,e)=>{for(var r in e||(e={}))J.call(e,r)&&w(t,r,e[r]);if(O)for(var r of O(e))K.call(e,r)&&w(t,r,e[r]);return t};function ee(){const[t,e]=d(o.state);return i(()=>{const r=o.subscribe(n=>e(Q({},n)));return()=>{r()}},[]),{isOpen:t.open,open:o.open,close:o.close,setDefaultChain:h.setSelectedChain}}function re(){const[t,e]=d({themeMode:a.state.themeMode});return i(()=>{const r=a.subscribe(n=>e({themeMode:n.themeMode}));return()=>{r()}},[]),{theme:t,setTheme:a.setThemeConfig}}export{Y as Web3Button,Z as Web3Modal,_ as Web3NetworkSwitch,ee as useWeb3Modal,re as useWeb3ModalTheme};
//# sourceMappingURL=index.js.map
{
"name": "@web3modal/react",
"version": "2.1.2",
"version": "2.2.0-02f443d",
"main": "dist/index.js",

@@ -19,4 +19,4 @@ "type": "module",

"dependencies": {
"@web3modal/core": "2.1.2",
"@web3modal/ui": "2.1.2"
"@web3modal/core": "2.2.0-02f443d",
"@web3modal/ui": "2.2.0-02f443d"
},

@@ -26,3 +26,3 @@ "devDependencies": {

"@types/react-dom": "18.0.11",
"@web3modal/ethereum": "2.1.2",
"@web3modal/ethereum": "2.2.0-02f443d",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc