nftychat-universe 1.3.8 → 1.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +29 -10
- package/dist/index.esm.js +29 -10
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
@@ -7,9 +7,10 @@ var wagmi = require('wagmi');
|
|
7
7
|
var coinbaseWallet = require('wagmi/connectors/coinbaseWallet');
|
8
8
|
var metaMask = require('wagmi/connectors/metaMask');
|
9
9
|
var walletConnect = require('wagmi/connectors/walletConnect');
|
10
|
-
var _public = require('wagmi/providers/public');
|
11
10
|
var jsxRuntime = require('react/jsx-runtime');
|
12
11
|
var ReactDOM = require('react-dom');
|
12
|
+
var infura = require('wagmi/providers/infura');
|
13
|
+
var alchemy = require('wagmi/providers/alchemy');
|
13
14
|
|
14
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
15
16
|
|
@@ -12368,7 +12369,6 @@ async function getDisplayName(param) {
|
|
12368
12369
|
const cacheData = sessionCacheSerialize[param];
|
12369
12370
|
|
12370
12371
|
if (cacheData !== undefined) {
|
12371
|
-
console.log("cacheData", cacheData);
|
12372
12372
|
return cacheData['displayName'];
|
12373
12373
|
}
|
12374
12374
|
} // Fetches data if not in cache
|
@@ -12381,7 +12381,6 @@ async function getDisplayName(param) {
|
|
12381
12381
|
|
12382
12382
|
sessionCacheSerialize[param] = data;
|
12383
12383
|
sessionStorage.setItem("display_name_session_cache", JSON.stringify(sessionCacheSerialize));
|
12384
|
-
console.log(data);
|
12385
12384
|
return data['displayName'];
|
12386
12385
|
}
|
12387
12386
|
const shortenAddress = address => {
|
@@ -12419,6 +12418,7 @@ function DmButton(props) {
|
|
12419
12418
|
const [messageText, setMessageText] = React.useState("");
|
12420
12419
|
const [popoverAnchor, setPopoverAnchor] = React.useState(null);
|
12421
12420
|
const [displayName, setDisplayName] = React.useState(props.displayName);
|
12421
|
+
const [displayText, setDisplayText] = React.useState(props.displayText);
|
12422
12422
|
const [conversations, setConversations] = React.useState([]);
|
12423
12423
|
const [authenticated, setAuthenticated] = React.useState(false); // const displayName = "Poapdispenser.eth";
|
12424
12424
|
// const address = "0x11B002247efc78A149F4e6aDc9F143b47bE9123D"
|
@@ -12442,7 +12442,13 @@ function DmButton(props) {
|
|
12442
12442
|
}
|
12443
12443
|
|
12444
12444
|
resolveDisplayName();
|
12445
|
-
}, [displayName, props.address]); //
|
12445
|
+
}, [displayName, props.address]); // useEffect if displayText not defined
|
12446
|
+
|
12447
|
+
React.useEffect(() => {
|
12448
|
+
if ([undefined, null].includes(props.displayText)) {
|
12449
|
+
setDisplayText(`DM ${displayName ? displayName : shortenAddress(props.address)}`);
|
12450
|
+
}
|
12451
|
+
}, [displayName, props.displayText, props.address]); // badge of unread messages
|
12446
12452
|
|
12447
12453
|
React.useEffect(() => {
|
12448
12454
|
fetch(mainUrl + "/v1/unread_message_count?address=" + props.address, {
|
@@ -12591,10 +12597,16 @@ function DmButton(props) {
|
|
12591
12597
|
className: "universal_button__icon",
|
12592
12598
|
icon: "ant-design:message-outlined"
|
12593
12599
|
})]
|
12594
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
12600
|
+
}), popoverAnchor !== null && authenticated === false ? /*#__PURE__*/jsxRuntime.jsx("span", {
|
12595
12601
|
className: "universal_button__text",
|
12596
|
-
children:
|
12597
|
-
})
|
12602
|
+
children: "Waiting for Signature"
|
12603
|
+
}) : wagmiAddress === props.address ? /*#__PURE__*/jsxRuntime.jsx("span", {
|
12604
|
+
className: "universal_button__text",
|
12605
|
+
children: "Recent Messages"
|
12606
|
+
}) : displayText !== "" ? /*#__PURE__*/jsxRuntime.jsx("span", {
|
12607
|
+
className: "universal_button__text",
|
12608
|
+
children: displayText
|
12609
|
+
}) : ""]
|
12598
12610
|
}), /*#__PURE__*/jsxRuntime.jsx(Popover$1, {
|
12599
12611
|
anchorEl: popoverAnchor,
|
12600
12612
|
anchorOrigin: {
|
@@ -12626,7 +12638,7 @@ function DmButton(props) {
|
|
12626
12638
|
rel: "noopener noreferrer",
|
12627
12639
|
target: "_blank",
|
12628
12640
|
styel: {
|
12629
|
-
textDecoration:
|
12641
|
+
textDecoration: "none"
|
12630
12642
|
},
|
12631
12643
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
12632
12644
|
className: "universal_button_popover__subtitle",
|
@@ -12686,7 +12698,7 @@ function DmButton(props) {
|
|
12686
12698
|
rel: "noopener noreferrer",
|
12687
12699
|
target: "_blank",
|
12688
12700
|
style: {
|
12689
|
-
textDecoration:
|
12701
|
+
textDecoration: "none"
|
12690
12702
|
},
|
12691
12703
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
12692
12704
|
className: "universal_button_popover__content_left",
|
@@ -12738,10 +12750,16 @@ var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r
|
|
12738
12750
|
var css = "* {\n --message-height:44px\n}\n.universal_button,\n.universal_button *,\n.universal_button_popover__container,\n.universal_button_popover__container *,\n.wallet_popover__modal,\n.wallet_popover__modal * {\n --gray1: hsl(0 0% 99%);\n --gray2: hsl(0 0% 97.3%);\n --gray3: hsl(0 0% 95.1%);\n --gray4: hsl(0 0% 93%);\n --gray5: hsl(0 0% 90.9%);\n --gray6: hsl(0 0% 88.7%);\n --gray7: hsl(0 0% 85.8%);\n --gray8: hsl(0 0% 78%);\n --gray9: hsl(0 0% 56.1%);\n --gray10: hsl(0 0% 52.3%);\n --gray11: hsl(0 0% 43.5%);\n --gray12: hsl(0 0% 9%);\n\n --button-text: #467ee5;\n\n font-family: \"Inter\", sans-serif;\n}\n\n.universal_button___dark,\n.universal_button___dark *,\n.universal_button_popover__container___dark,\n.universal_button_popover__container___dark *,\n.wallet_popover__modal___dark,\n.wallet_popover__modal___dark * {\n --gray1: hsl(0 0% 8.5%);\n --gray2: hsl(0 0% 11%);\n --gray3: hsl(0 0% 13.6%);\n --gray4: hsl(0 0% 15.8%);\n --gray5: hsl(0 0% 17.9%);\n --gray6: hsl(0 0% 20.5%);\n --gray7: hsl(0 0% 24.3%);\n --gray8: hsl(0 0% 31.2%);\n --gray9: hsl(0 0% 43.9%);\n --gray10: hsl(0 0% 49.4%);\n --gray11: hsl(0 0% 62.8%);\n --gray12: hsl(0 0% 93%);\n\n --button-text: #94eede;\n}\n\n.universal_button {\n position: relative;\n}\n\n.universal_button__button {\n align-items: center;\n background-color: var(--gray1);\n border-radius: 9999px;\n border: 1px solid var(--gray2);\n box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n color: var(--button-text);\n cursor: pointer;\n display: flex;\n font-family: Inter, sans-serif;\n gap: 8px;\n justify-content: center;\n padding: 8px 16px;\n transition: color 200ms, background-color 200ms;\n}\n\n.universal_button__button:hover {\n background-color: var(--gray3);\n}\n\n.universal_button__icon_container {\n align-items: center;\n display: flex;\n height: 24px;\n justify-content: center;\n position: relative;\n width: 24px;\n}\n\n.universal_button__badge {\n align-items: center;\n background-color: #fa2449;\n border-radius: 9999px;\n color: white;\n display: flex;\n font-size: 10px;\n height: 14px;\n justify-content: center;\n position: absolute;\n right: -4px;\n top: -4px;\n width: 14px;\n}\n\n.universal_button__icon {\n height: 100%;\n width: 100%;\n}\n\n.universal_button__text {\n font-size: 16px;\n font-weight: 400;\n}\n\n.universal_button_popover {\n border-radius: 6px;\n}\n\n\n.universal_button_popover__container {\n background-color: var(--gray1);\n display: flex;\n flex-direction: column;\n width: 384px;\n}\n\n.universal_button_popover__textarea {\n background-color: var(--gray1);\n border-radius: 6px;\n border: 1px solid var(--gray6);\n color: var(--gray12);\n font-family: Inter, sans-serif;\n font-size: 1rem;\n margin-bottom: 6px;\n min-height: 66px;\n outline: none;\n padding: 8px;\n resize: none;\n transition: border-color 200ms;\n flex: auto;\n}\n\n.universal_button_popover__textarea:focus {\n border-color: var(--gray8);\n}\n\n\n/* recent messages */\n.universal_button_popover__messages {\n display: flex;\n justify-content: space-between;\n margin: 12px; \n flex-direction: column;\n}\n\n.message__container{\n margin-bottom: 8px; \n display: flex;\n justify-content: space-between;\n cursor: pointer;\n height: var(--message-height);\n}\n\n.message_title{\n font-family: Inter;\n font-size: 16px;\n font-weight: 600;\n line-height: 19px;\n letter-spacing: 0em;\n text-align: left;\n color: var(--gray12)\n}\n.message_text{\n font-family: Inter;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n letter-spacing: 0em;\n text-align: left;\n color: var(--gray10);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: clip;\n}\n.message_separator {\n width: 100%;\n border: 1px solid var(--gray6);\n height: 0px;\n margin-bottom: 12px;\n}\n.message_text__container{\n display: flex;\n flex-direction: column;\n max-width: 96%; \n}\n\n.message__badge {\n align-items: center;\n background-color: #fa2449;\n border-radius: 9999px;\n color: white;\n display: flex;\n font-size: 10px;\n height: 14px;\n justify-content: center;\n width: 14px;\n}\n.hover_text {\n color: var(--button-text);\n opacity: 0;\n -webkit-transition: all 300ms ease-in-out;\n -o-transition: all 300ms ease-in-out;\n transition: all 300ms ease-in-out;\n text-align: center;\n position: absolute;\n display: flex;\n align-items: center; /** Y-axis align **/\n justify-content: center; /** X-axis align **/\n width: 98%;\n height: var(--message-height);\n}\n.message__container:hover .message_text__container,\n.message__container:hover .message__badge{\n -webkit-transition: all 300ms ease-in-out;\n -o-transition: all 300ms ease-in-out;\n transition: all 300ms ease-in-out;\n -webkit-filter: blur(2px);\n -moz-filter: blur(2px);\n -ms-filter: blur(2px);\n -o-filter: blur(2px);\n filter: blur(2px);\n}\n.message__container:hover .hover_text {\n -webkit-opacity: 1;\n opacity: 1;\n}\n\n\n.universal_button_popover__content {\n align-items: center;\n display: flex;\n justify-content: space-between;\n margin: 12px;\n}\n\n.universal_button_popover__content_top {\n align-items: center;\n display: flex;\n justify-content: space-between;\n margin: 12px 12px 8px 12px;\n}\n\n.universal_button_popover__content_bottom {\n align-items: center;\n display: flex;\n justify-content: space-between;\n margin: 0px 12px 12px 12px;\n}\n\n.universal_button_popover__content_left {\n align-items: center;\n display: flex;\n gap: 8px;\n}\n\n.universal_button_popover__subtitle{\n align-items: center;\n display: flex;\n gap: 8px;\n}\n\n.universal_button_popover__user_text {\n text-decoration: none;\n color: var(--gray11);\n font-family: Inter, sans-serif;\n font-size: 16px;\n}\n\n\n.universal_button_popover__link_text{\n color: var(--button-text);\n}\n\n.universal_button_popover__content a:hover, \n.universal_button_popover__content a:visited, \n.universal_button_popover__content a:link, \n.universal_button_popover__content a:active\n{\n text-decoration: none;\n}\n\n.universal_button_popover__send {\n align-items: center;\n background-color: transparent;\n border-radius: 9999px;\n border: none;\n color: var(--button-text);\n cursor: pointer;\n display: flex;\n height: 32px;\n justify-content: center;\n padding: 6px;\n transition: color 200ms, background-color 200ms;\n width: 32px;\n}\n\n.universal_button_popover__send:hover {\n background-color: var(--gray3);\n}\n\n.universal_button_popover__send_icon {\n height: 100%;\n width: 100%;\n}\n\n/* Wallet popover */\n.wallet_popover {\n /* border: red dashed 1px; */\n align-items: center;\n cursor: pointer;\n display: flex;\n height: 100vh;\n justify-content: center;\n width: 100vw;\n}\n\n.wallet_popover__modal {\n align-items: center;\n background-color: var(--gray1);\n border-radius: 14px;\n border: 1px solid var(--gray6);\n box-shadow: 0px 2px 4px rgb(0 0 0 / 6%), 0px 4px 6px rgb(0 0 0 / 10%);\n cursor: default;\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin: 0 24px;\n max-width: 360px;\n overflow: hidden;\n padding: 24px;\n pointer-events: auto;\n position: relative;\n width: 100%;\n z-index: 1;\n}\n\n.wallet_popover__button {\n align-items: center;\n background-color: #298574;\n border-radius: 9999px;\n border: none;\n color: white;\n cursor: pointer;\n cursor: pointer;\n display: flex;\n font-size: 15px;\n font-weight: 500;\n height: 48px;\n justify-content: center;\n transition: background-color 150ms;\n user-select: none;\n width: 164px;\n}\n\n.wallet_popover__button:enabled:hover {\n background-color: hsl(169, 53%, 40%);\n}\n\n.wallet_popover__button:enabled:active {\n background-color: hsl(169, 53%, 45%);\n}\n\n.wallet_popover__button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n";
|
12739
12751
|
n(css,{});
|
12740
12752
|
|
12753
|
+
const infuraId = "806586b223e14b3eb1e6e4285bf8240e";
|
12754
|
+
const alchemyKey = "zlvaztiS9mtCfBps34F7pqBQdOWzv3_l";
|
12741
12755
|
const {
|
12742
12756
|
chains,
|
12743
12757
|
provider
|
12744
|
-
} = wagmi.configureChains([wagmi.chain.mainnet, wagmi.chain.polygon, wagmi.chain.optimism, wagmi.chain.arbitrum], [
|
12758
|
+
} = wagmi.configureChains([wagmi.chain.mainnet, wagmi.chain.polygon, wagmi.chain.optimism, wagmi.chain.arbitrum], [alchemy.alchemyProvider({
|
12759
|
+
apiKey: alchemyKey
|
12760
|
+
}), infura.infuraProvider({
|
12761
|
+
infuraId: infuraId
|
12762
|
+
})]);
|
12745
12763
|
const defaultWagmiClient = wagmi.createClient({
|
12746
12764
|
autoConnect: true,
|
12747
12765
|
connectors: [new metaMask.MetaMaskConnector({
|
@@ -12764,6 +12782,7 @@ function UniversalDm(props) {
|
|
12764
12782
|
client: defaultWagmiClient,
|
12765
12783
|
children: [/*#__PURE__*/jsxRuntime.jsx(Ie, {}), /*#__PURE__*/jsxRuntime.jsx(DmButton, {
|
12766
12784
|
address: props.address,
|
12785
|
+
displayText: props.displayText,
|
12767
12786
|
displayName: props.displayName,
|
12768
12787
|
theme: props.theme || "light",
|
12769
12788
|
popoverDirection: props.popoverDirection || "top"
|
package/dist/index.esm.js
CHANGED
@@ -4,10 +4,11 @@ import { useAccount, useConnect, useSignMessage, configureChains, chain, createC
|
|
4
4
|
import { CoinbaseWalletConnector } from 'wagmi/connectors/coinbaseWallet';
|
5
5
|
import { MetaMaskConnector } from 'wagmi/connectors/metaMask';
|
6
6
|
import { WalletConnectConnector } from 'wagmi/connectors/walletConnect';
|
7
|
-
import { publicProvider } from 'wagmi/providers/public';
|
8
7
|
import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
9
8
|
import * as ReactDOM from 'react-dom';
|
10
9
|
import ReactDOM__default from 'react-dom';
|
10
|
+
import { infuraProvider } from 'wagmi/providers/infura';
|
11
|
+
import { alchemyProvider } from 'wagmi/providers/alchemy';
|
11
12
|
|
12
13
|
let e$1={data:""},t$1=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e$1,l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,n$2=/\n+/g,o=(e,t)=>{let r="",l="",a="";for(let n in e){let c=e[n];"@"==n[0]?"i"==n[1]?r=n+" "+c+";":l+="f"==n[1]?o(c,n):n+"{"+o(c,"k"==n[1]?"":t)+"}":"object"==typeof c?l+=o(c,t?t.replace(/([^,])+/g,e=>n.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=o.p?o.p(n,c):n+":"+c+";");}return r+(t&&a?t+"{"+a+"}":a)+l},c={},s=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s(e[r]);return t}return e},i=(e,t,r,i,p)=>{let u=s(e),d=c[u]||(c[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(u));if(!c[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l.exec(e.replace(a,""));)t[4]?o.shift():t[3]?(r=t[3].replace(n$2," ").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n$2," ").trim();return o[0]})(e);c[d]=o(p?{["@keyframes "+d]:t}:t,r?"":"."+d);}let f=r&&c.g?c.g:null;return r&&(c.g=c[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(c[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o(e,""):!1===e?"":e;}return e+l+(null==n?"":n)},"");function u$1(e){let r=this||{},l=e.call?e(r.p):e;return i(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t$1(r.target),r.g,r.o,r.k)}let d,f,g;u$1.bind({g:1});let h$1=u$1.bind({k:1});function m(e,t,r,l){o.p=t,d=e,f=r,g=l;}function j(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\d+/.test(s),c.className=u$1.apply(r,l)+(s?" "+s:""),t&&(c.ref=o);let i=e;return e[0]&&(i=c.as||e,delete c.as),g&&i[0]&&g(c),d(i,c)}return t?t(a):a}}
|
13
14
|
|
@@ -12341,7 +12342,6 @@ async function getDisplayName(param) {
|
|
12341
12342
|
const cacheData = sessionCacheSerialize[param];
|
12342
12343
|
|
12343
12344
|
if (cacheData !== undefined) {
|
12344
|
-
console.log("cacheData", cacheData);
|
12345
12345
|
return cacheData['displayName'];
|
12346
12346
|
}
|
12347
12347
|
} // Fetches data if not in cache
|
@@ -12354,7 +12354,6 @@ async function getDisplayName(param) {
|
|
12354
12354
|
|
12355
12355
|
sessionCacheSerialize[param] = data;
|
12356
12356
|
sessionStorage.setItem("display_name_session_cache", JSON.stringify(sessionCacheSerialize));
|
12357
|
-
console.log(data);
|
12358
12357
|
return data['displayName'];
|
12359
12358
|
}
|
12360
12359
|
const shortenAddress = address => {
|
@@ -12392,6 +12391,7 @@ function DmButton(props) {
|
|
12392
12391
|
const [messageText, setMessageText] = useState("");
|
12393
12392
|
const [popoverAnchor, setPopoverAnchor] = useState(null);
|
12394
12393
|
const [displayName, setDisplayName] = useState(props.displayName);
|
12394
|
+
const [displayText, setDisplayText] = useState(props.displayText);
|
12395
12395
|
const [conversations, setConversations] = useState([]);
|
12396
12396
|
const [authenticated, setAuthenticated] = useState(false); // const displayName = "Poapdispenser.eth";
|
12397
12397
|
// const address = "0x11B002247efc78A149F4e6aDc9F143b47bE9123D"
|
@@ -12415,7 +12415,13 @@ function DmButton(props) {
|
|
12415
12415
|
}
|
12416
12416
|
|
12417
12417
|
resolveDisplayName();
|
12418
|
-
}, [displayName, props.address]); //
|
12418
|
+
}, [displayName, props.address]); // useEffect if displayText not defined
|
12419
|
+
|
12420
|
+
useEffect(() => {
|
12421
|
+
if ([undefined, null].includes(props.displayText)) {
|
12422
|
+
setDisplayText(`DM ${displayName ? displayName : shortenAddress(props.address)}`);
|
12423
|
+
}
|
12424
|
+
}, [displayName, props.displayText, props.address]); // badge of unread messages
|
12419
12425
|
|
12420
12426
|
useEffect(() => {
|
12421
12427
|
fetch(mainUrl + "/v1/unread_message_count?address=" + props.address, {
|
@@ -12564,10 +12570,16 @@ function DmButton(props) {
|
|
12564
12570
|
className: "universal_button__icon",
|
12565
12571
|
icon: "ant-design:message-outlined"
|
12566
12572
|
})]
|
12567
|
-
}), /*#__PURE__*/jsx("span", {
|
12573
|
+
}), popoverAnchor !== null && authenticated === false ? /*#__PURE__*/jsx("span", {
|
12568
12574
|
className: "universal_button__text",
|
12569
|
-
children:
|
12570
|
-
})
|
12575
|
+
children: "Waiting for Signature"
|
12576
|
+
}) : wagmiAddress === props.address ? /*#__PURE__*/jsx("span", {
|
12577
|
+
className: "universal_button__text",
|
12578
|
+
children: "Recent Messages"
|
12579
|
+
}) : displayText !== "" ? /*#__PURE__*/jsx("span", {
|
12580
|
+
className: "universal_button__text",
|
12581
|
+
children: displayText
|
12582
|
+
}) : ""]
|
12571
12583
|
}), /*#__PURE__*/jsx(Popover$1, {
|
12572
12584
|
anchorEl: popoverAnchor,
|
12573
12585
|
anchorOrigin: {
|
@@ -12599,7 +12611,7 @@ function DmButton(props) {
|
|
12599
12611
|
rel: "noopener noreferrer",
|
12600
12612
|
target: "_blank",
|
12601
12613
|
styel: {
|
12602
|
-
textDecoration:
|
12614
|
+
textDecoration: "none"
|
12603
12615
|
},
|
12604
12616
|
children: /*#__PURE__*/jsxs("div", {
|
12605
12617
|
className: "universal_button_popover__subtitle",
|
@@ -12659,7 +12671,7 @@ function DmButton(props) {
|
|
12659
12671
|
rel: "noopener noreferrer",
|
12660
12672
|
target: "_blank",
|
12661
12673
|
style: {
|
12662
|
-
textDecoration:
|
12674
|
+
textDecoration: "none"
|
12663
12675
|
},
|
12664
12676
|
children: /*#__PURE__*/jsxs("div", {
|
12665
12677
|
className: "universal_button_popover__content_left",
|
@@ -12711,10 +12723,16 @@ var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r
|
|
12711
12723
|
var css = "* {\n --message-height:44px\n}\n.universal_button,\n.universal_button *,\n.universal_button_popover__container,\n.universal_button_popover__container *,\n.wallet_popover__modal,\n.wallet_popover__modal * {\n --gray1: hsl(0 0% 99%);\n --gray2: hsl(0 0% 97.3%);\n --gray3: hsl(0 0% 95.1%);\n --gray4: hsl(0 0% 93%);\n --gray5: hsl(0 0% 90.9%);\n --gray6: hsl(0 0% 88.7%);\n --gray7: hsl(0 0% 85.8%);\n --gray8: hsl(0 0% 78%);\n --gray9: hsl(0 0% 56.1%);\n --gray10: hsl(0 0% 52.3%);\n --gray11: hsl(0 0% 43.5%);\n --gray12: hsl(0 0% 9%);\n\n --button-text: #467ee5;\n\n font-family: \"Inter\", sans-serif;\n}\n\n.universal_button___dark,\n.universal_button___dark *,\n.universal_button_popover__container___dark,\n.universal_button_popover__container___dark *,\n.wallet_popover__modal___dark,\n.wallet_popover__modal___dark * {\n --gray1: hsl(0 0% 8.5%);\n --gray2: hsl(0 0% 11%);\n --gray3: hsl(0 0% 13.6%);\n --gray4: hsl(0 0% 15.8%);\n --gray5: hsl(0 0% 17.9%);\n --gray6: hsl(0 0% 20.5%);\n --gray7: hsl(0 0% 24.3%);\n --gray8: hsl(0 0% 31.2%);\n --gray9: hsl(0 0% 43.9%);\n --gray10: hsl(0 0% 49.4%);\n --gray11: hsl(0 0% 62.8%);\n --gray12: hsl(0 0% 93%);\n\n --button-text: #94eede;\n}\n\n.universal_button {\n position: relative;\n}\n\n.universal_button__button {\n align-items: center;\n background-color: var(--gray1);\n border-radius: 9999px;\n border: 1px solid var(--gray2);\n box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n color: var(--button-text);\n cursor: pointer;\n display: flex;\n font-family: Inter, sans-serif;\n gap: 8px;\n justify-content: center;\n padding: 8px 16px;\n transition: color 200ms, background-color 200ms;\n}\n\n.universal_button__button:hover {\n background-color: var(--gray3);\n}\n\n.universal_button__icon_container {\n align-items: center;\n display: flex;\n height: 24px;\n justify-content: center;\n position: relative;\n width: 24px;\n}\n\n.universal_button__badge {\n align-items: center;\n background-color: #fa2449;\n border-radius: 9999px;\n color: white;\n display: flex;\n font-size: 10px;\n height: 14px;\n justify-content: center;\n position: absolute;\n right: -4px;\n top: -4px;\n width: 14px;\n}\n\n.universal_button__icon {\n height: 100%;\n width: 100%;\n}\n\n.universal_button__text {\n font-size: 16px;\n font-weight: 400;\n}\n\n.universal_button_popover {\n border-radius: 6px;\n}\n\n\n.universal_button_popover__container {\n background-color: var(--gray1);\n display: flex;\n flex-direction: column;\n width: 384px;\n}\n\n.universal_button_popover__textarea {\n background-color: var(--gray1);\n border-radius: 6px;\n border: 1px solid var(--gray6);\n color: var(--gray12);\n font-family: Inter, sans-serif;\n font-size: 1rem;\n margin-bottom: 6px;\n min-height: 66px;\n outline: none;\n padding: 8px;\n resize: none;\n transition: border-color 200ms;\n flex: auto;\n}\n\n.universal_button_popover__textarea:focus {\n border-color: var(--gray8);\n}\n\n\n/* recent messages */\n.universal_button_popover__messages {\n display: flex;\n justify-content: space-between;\n margin: 12px; \n flex-direction: column;\n}\n\n.message__container{\n margin-bottom: 8px; \n display: flex;\n justify-content: space-between;\n cursor: pointer;\n height: var(--message-height);\n}\n\n.message_title{\n font-family: Inter;\n font-size: 16px;\n font-weight: 600;\n line-height: 19px;\n letter-spacing: 0em;\n text-align: left;\n color: var(--gray12)\n}\n.message_text{\n font-family: Inter;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n letter-spacing: 0em;\n text-align: left;\n color: var(--gray10);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: clip;\n}\n.message_separator {\n width: 100%;\n border: 1px solid var(--gray6);\n height: 0px;\n margin-bottom: 12px;\n}\n.message_text__container{\n display: flex;\n flex-direction: column;\n max-width: 96%; \n}\n\n.message__badge {\n align-items: center;\n background-color: #fa2449;\n border-radius: 9999px;\n color: white;\n display: flex;\n font-size: 10px;\n height: 14px;\n justify-content: center;\n width: 14px;\n}\n.hover_text {\n color: var(--button-text);\n opacity: 0;\n -webkit-transition: all 300ms ease-in-out;\n -o-transition: all 300ms ease-in-out;\n transition: all 300ms ease-in-out;\n text-align: center;\n position: absolute;\n display: flex;\n align-items: center; /** Y-axis align **/\n justify-content: center; /** X-axis align **/\n width: 98%;\n height: var(--message-height);\n}\n.message__container:hover .message_text__container,\n.message__container:hover .message__badge{\n -webkit-transition: all 300ms ease-in-out;\n -o-transition: all 300ms ease-in-out;\n transition: all 300ms ease-in-out;\n -webkit-filter: blur(2px);\n -moz-filter: blur(2px);\n -ms-filter: blur(2px);\n -o-filter: blur(2px);\n filter: blur(2px);\n}\n.message__container:hover .hover_text {\n -webkit-opacity: 1;\n opacity: 1;\n}\n\n\n.universal_button_popover__content {\n align-items: center;\n display: flex;\n justify-content: space-between;\n margin: 12px;\n}\n\n.universal_button_popover__content_top {\n align-items: center;\n display: flex;\n justify-content: space-between;\n margin: 12px 12px 8px 12px;\n}\n\n.universal_button_popover__content_bottom {\n align-items: center;\n display: flex;\n justify-content: space-between;\n margin: 0px 12px 12px 12px;\n}\n\n.universal_button_popover__content_left {\n align-items: center;\n display: flex;\n gap: 8px;\n}\n\n.universal_button_popover__subtitle{\n align-items: center;\n display: flex;\n gap: 8px;\n}\n\n.universal_button_popover__user_text {\n text-decoration: none;\n color: var(--gray11);\n font-family: Inter, sans-serif;\n font-size: 16px;\n}\n\n\n.universal_button_popover__link_text{\n color: var(--button-text);\n}\n\n.universal_button_popover__content a:hover, \n.universal_button_popover__content a:visited, \n.universal_button_popover__content a:link, \n.universal_button_popover__content a:active\n{\n text-decoration: none;\n}\n\n.universal_button_popover__send {\n align-items: center;\n background-color: transparent;\n border-radius: 9999px;\n border: none;\n color: var(--button-text);\n cursor: pointer;\n display: flex;\n height: 32px;\n justify-content: center;\n padding: 6px;\n transition: color 200ms, background-color 200ms;\n width: 32px;\n}\n\n.universal_button_popover__send:hover {\n background-color: var(--gray3);\n}\n\n.universal_button_popover__send_icon {\n height: 100%;\n width: 100%;\n}\n\n/* Wallet popover */\n.wallet_popover {\n /* border: red dashed 1px; */\n align-items: center;\n cursor: pointer;\n display: flex;\n height: 100vh;\n justify-content: center;\n width: 100vw;\n}\n\n.wallet_popover__modal {\n align-items: center;\n background-color: var(--gray1);\n border-radius: 14px;\n border: 1px solid var(--gray6);\n box-shadow: 0px 2px 4px rgb(0 0 0 / 6%), 0px 4px 6px rgb(0 0 0 / 10%);\n cursor: default;\n display: flex;\n flex-direction: column;\n gap: 16px;\n margin: 0 24px;\n max-width: 360px;\n overflow: hidden;\n padding: 24px;\n pointer-events: auto;\n position: relative;\n width: 100%;\n z-index: 1;\n}\n\n.wallet_popover__button {\n align-items: center;\n background-color: #298574;\n border-radius: 9999px;\n border: none;\n color: white;\n cursor: pointer;\n cursor: pointer;\n display: flex;\n font-size: 15px;\n font-weight: 500;\n height: 48px;\n justify-content: center;\n transition: background-color 150ms;\n user-select: none;\n width: 164px;\n}\n\n.wallet_popover__button:enabled:hover {\n background-color: hsl(169, 53%, 40%);\n}\n\n.wallet_popover__button:enabled:active {\n background-color: hsl(169, 53%, 45%);\n}\n\n.wallet_popover__button:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n";
|
12712
12724
|
n(css,{});
|
12713
12725
|
|
12726
|
+
const infuraId = "806586b223e14b3eb1e6e4285bf8240e";
|
12727
|
+
const alchemyKey = "zlvaztiS9mtCfBps34F7pqBQdOWzv3_l";
|
12714
12728
|
const {
|
12715
12729
|
chains,
|
12716
12730
|
provider
|
12717
|
-
} = configureChains([chain.mainnet, chain.polygon, chain.optimism, chain.arbitrum], [
|
12731
|
+
} = configureChains([chain.mainnet, chain.polygon, chain.optimism, chain.arbitrum], [alchemyProvider({
|
12732
|
+
apiKey: alchemyKey
|
12733
|
+
}), infuraProvider({
|
12734
|
+
infuraId: infuraId
|
12735
|
+
})]);
|
12718
12736
|
const defaultWagmiClient = createClient({
|
12719
12737
|
autoConnect: true,
|
12720
12738
|
connectors: [new MetaMaskConnector({
|
@@ -12737,6 +12755,7 @@ function UniversalDm(props) {
|
|
12737
12755
|
client: defaultWagmiClient,
|
12738
12756
|
children: [/*#__PURE__*/jsx(Ie, {}), /*#__PURE__*/jsx(DmButton, {
|
12739
12757
|
address: props.address,
|
12758
|
+
displayText: props.displayText,
|
12740
12759
|
displayName: props.displayName,
|
12741
12760
|
theme: props.theme || "light",
|
12742
12761
|
popoverDirection: props.popoverDirection || "top"
|