nftychat-universe 1.2.1 → 1.3.0
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 +151 -58
- package/dist/index.esm.js +152 -59
- package/nftychat-universe-v1.2.1.tgz +0 -0
- package/package.json +1 -1
- package/nftychat-universe-v1.2.0.tgz +0 -0
package/dist/index.cjs.js
CHANGED
@@ -12410,7 +12410,9 @@ function DmButton(props) {
|
|
12410
12410
|
const [accessToken, setAccessToken] = React.useState(null);
|
12411
12411
|
const [messageText, setMessageText] = React.useState("");
|
12412
12412
|
const [popoverAnchor, setPopoverAnchor] = React.useState(null);
|
12413
|
-
const [displayName, setDisplayName] = React.useState(props.displayName);
|
12413
|
+
const [displayName, setDisplayName] = React.useState(props.displayName);
|
12414
|
+
const [conversations, setConversations] = React.useState([]);
|
12415
|
+
const [authenticated, setAuthenticated] = React.useState(false); // const displayName = "Poapdispenser.eth";
|
12414
12416
|
// const address = "0x11B002247efc78A149F4e6aDc9F143b47bE9123D"
|
12415
12417
|
// Wallet modal
|
12416
12418
|
// Connectors 0: metamask, 1:WalletConnect, 2: coinbase
|
@@ -12440,19 +12442,14 @@ function DmButton(props) {
|
|
12440
12442
|
return payload.json();
|
12441
12443
|
}).then(data => {
|
12442
12444
|
setNumberOfNotifications(data);
|
12445
|
+
console.log(data);
|
12443
12446
|
});
|
12444
|
-
}, [props.address]);
|
12447
|
+
}, [props.address]);
|
12445
12448
|
|
12446
|
-
|
12447
|
-
|
12448
|
-
setPopoverAnchor(null);
|
12449
|
-
}
|
12450
|
-
}, [props.address, wagmiAddress]);
|
12449
|
+
async function getAccessToken() {
|
12450
|
+
let tempAccessToken = localStorage.getItem("token_" + wagmiAddress);
|
12451
12451
|
|
12452
|
-
|
12453
|
-
let tempAccessToken = accessToken;
|
12454
|
-
|
12455
|
-
if (accessToken === null) {
|
12452
|
+
if (!tempAccessToken) {
|
12456
12453
|
const message_response = await fetch(mainUrl + "/v1/siwe_message?address=" + wagmiAddress);
|
12457
12454
|
const data = await message_response.json();
|
12458
12455
|
const siwe_message = data.siwe_message;
|
@@ -12462,6 +12459,49 @@ function DmButton(props) {
|
|
12462
12459
|
tempAccessToken = await checkSignature(wagmiAddress, signature);
|
12463
12460
|
}
|
12464
12461
|
|
12462
|
+
localStorage.setItem("token_" + wagmiAddress, tempAccessToken);
|
12463
|
+
setAuthenticated(true);
|
12464
|
+
return tempAccessToken;
|
12465
|
+
}
|
12466
|
+
|
12467
|
+
async function getConversations() {
|
12468
|
+
const tempAccessToken = await getAccessToken();
|
12469
|
+
fetch(mainUrl + "/v1/conversations", {
|
12470
|
+
headers: {
|
12471
|
+
Accept: "application/json",
|
12472
|
+
"Content-Type": "application/json",
|
12473
|
+
Authorization: "Bearer " + tempAccessToken
|
12474
|
+
}
|
12475
|
+
}).then(response => {
|
12476
|
+
if (!response.ok) {
|
12477
|
+
response.json().then(data => {
|
12478
|
+
_t.error(data["detail"]);
|
12479
|
+
}); // TODO: Unsure what error is trying to throw
|
12480
|
+
|
12481
|
+
throw new Error("error");
|
12482
|
+
}
|
12483
|
+
|
12484
|
+
return response.json();
|
12485
|
+
}).then(payload => {
|
12486
|
+
setConversations(payload.slice(0, 3));
|
12487
|
+
});
|
12488
|
+
} // useEffect to get signature after click
|
12489
|
+
|
12490
|
+
|
12491
|
+
React.useEffect(() => {
|
12492
|
+
if (!!wagmiAddress && !!popoverAnchor) {
|
12493
|
+
getAccessToken();
|
12494
|
+
}
|
12495
|
+
}, [popoverAnchor, wagmiAddress]); // useEffect to fetch conversations if user is same as props.address
|
12496
|
+
|
12497
|
+
React.useEffect(() => {
|
12498
|
+
if (props.address === wagmiAddress && authenticated) {
|
12499
|
+
getConversations();
|
12500
|
+
}
|
12501
|
+
}, [props.address, wagmiAddress, authenticated]);
|
12502
|
+
|
12503
|
+
async function sendClick() {
|
12504
|
+
const tempAccessToken = await getAccessToken();
|
12465
12505
|
const payload = {
|
12466
12506
|
address: props.address,
|
12467
12507
|
message_text: messageText
|
@@ -12521,15 +12561,8 @@ function DmButton(props) {
|
|
12521
12561
|
className: "universal_button__button",
|
12522
12562
|
type: "button",
|
12523
12563
|
onClick: event => {
|
12524
|
-
|
12525
|
-
|
12526
|
-
} else {
|
12527
|
-
if (!wagmiAddress) {
|
12528
|
-
setWalletPopoverOpen(true);
|
12529
|
-
}
|
12530
|
-
|
12531
|
-
setPopoverAnchor(event.currentTarget);
|
12532
|
-
}
|
12564
|
+
setWalletPopoverOpen(true);
|
12565
|
+
setPopoverAnchor(event.currentTarget);
|
12533
12566
|
},
|
12534
12567
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
12535
12568
|
className: "universal_button__icon_container",
|
@@ -12542,7 +12575,7 @@ function DmButton(props) {
|
|
12542
12575
|
})]
|
12543
12576
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
12544
12577
|
className: "universal_button__text",
|
12545
|
-
children: wagmiAddress === props.address ? "
|
12578
|
+
children: popoverAnchor !== null && authenticated === false ? "Waiting for Signature" : wagmiAddress === props.address ? "Recent Messages" : `DM ${displayName ? displayName : shortenAddress(props.address)}`
|
12546
12579
|
})]
|
12547
12580
|
}), /*#__PURE__*/jsxRuntime.jsx(Popover$1, {
|
12548
12581
|
anchorEl: popoverAnchor,
|
@@ -12557,50 +12590,110 @@ function DmButton(props) {
|
|
12557
12590
|
marginTop: -8
|
12558
12591
|
},
|
12559
12592
|
onClose: () => setPopoverAnchor(null),
|
12560
|
-
open: popoverAnchor !== null &&
|
12593
|
+
open: popoverAnchor !== null && authenticated,
|
12561
12594
|
transformOrigin: {
|
12562
12595
|
vertical: props.popoverDirection === "bottom" ? "top" : "bottom",
|
12563
12596
|
horizontal: "center"
|
12564
12597
|
},
|
12565
|
-
children: /*#__PURE__*/jsxRuntime.
|
12598
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
12566
12599
|
className: props.theme === "dark" ? "universal_button_popover__container universal_button_popover__container___dark" : "universal_button_popover__container",
|
12567
|
-
children:
|
12568
|
-
|
12569
|
-
|
12570
|
-
|
12571
|
-
|
12572
|
-
|
12573
|
-
|
12574
|
-
|
12575
|
-
|
12576
|
-
|
12577
|
-
|
12578
|
-
|
12579
|
-
|
12580
|
-
|
12581
|
-
|
12582
|
-
|
12583
|
-
|
12584
|
-
|
12585
|
-
|
12586
|
-
|
12587
|
-
|
12588
|
-
|
12589
|
-
|
12590
|
-
|
12591
|
-
|
12592
|
-
|
12600
|
+
children: wagmiAddress === props.address ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
12601
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
12602
|
+
className: "universal_button_popover__content",
|
12603
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
12604
|
+
className: "message_title",
|
12605
|
+
children: " Recent Messages "
|
12606
|
+
}), /*#__PURE__*/jsxRuntime.jsx("a", {
|
12607
|
+
href: "https://nftychat.xyz",
|
12608
|
+
rel: "noopener noreferrer",
|
12609
|
+
target: "_blank",
|
12610
|
+
styel: {
|
12611
|
+
textDecoration: 'none'
|
12612
|
+
},
|
12613
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
12614
|
+
className: "universal_button_popover__subtitle",
|
12615
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
12616
|
+
className: "universal_button_popover__link_text",
|
12617
|
+
children: "View All"
|
12618
|
+
}), /*#__PURE__*/jsxRuntime.jsx("img", {
|
12619
|
+
src: logo,
|
12620
|
+
alt: "Logo",
|
12621
|
+
style: {
|
12622
|
+
width: 24,
|
12623
|
+
height: 24
|
12624
|
+
}
|
12625
|
+
})]
|
12626
|
+
})
|
12627
|
+
})]
|
12628
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
12629
|
+
className: "message_separator"
|
12630
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
12631
|
+
className: "universal_button_popover__messages",
|
12632
|
+
children: conversations.map(conversation => /*#__PURE__*/jsxRuntime.jsxs("div", {
|
12633
|
+
className: "message__container",
|
12634
|
+
onClick: () => {
|
12635
|
+
window.open("https://nftychat.xyz/dms/" + conversation.conversation_id, "_blank");
|
12636
|
+
},
|
12637
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
12638
|
+
className: "hover_text",
|
12639
|
+
children: " View on nftychat"
|
12640
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
12641
|
+
className: "message_text__container",
|
12642
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
12643
|
+
className: "message_title",
|
12644
|
+
children: [" ", conversation.conversation_name]
|
12645
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
12646
|
+
className: "message_text",
|
12647
|
+
children: conversation.latest_message_text
|
12648
|
+
})]
|
12649
|
+
}), conversation.unread_message_count > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
12650
|
+
className: "message__badge",
|
12651
|
+
children: conversation.unread_message_count
|
12593
12652
|
})]
|
12653
|
+
}, conversation.conversation_id))
|
12654
|
+
})]
|
12655
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
12656
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
12657
|
+
className: "universal_button_popover__content_top",
|
12658
|
+
children: /*#__PURE__*/jsxRuntime.jsx("textarea", {
|
12659
|
+
className: "universal_button_popover__textarea",
|
12660
|
+
spellCheck: false,
|
12661
|
+
value: messageText,
|
12662
|
+
onChange: e => setMessageText(e.target.value)
|
12594
12663
|
})
|
12595
|
-
}), /*#__PURE__*/jsxRuntime.
|
12596
|
-
className: "
|
12597
|
-
|
12598
|
-
|
12599
|
-
|
12600
|
-
|
12601
|
-
|
12664
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
12665
|
+
className: "universal_button_popover__content_bottom",
|
12666
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("a", {
|
12667
|
+
href: "https://nftychat.xyz",
|
12668
|
+
rel: "noopener noreferrer",
|
12669
|
+
target: "_blank",
|
12670
|
+
styel: {
|
12671
|
+
textDecoration: 'none'
|
12672
|
+
},
|
12673
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
12674
|
+
className: "universal_button_popover__content_left",
|
12675
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("img", {
|
12676
|
+
src: logo,
|
12677
|
+
alt: "Logo",
|
12678
|
+
style: {
|
12679
|
+
width: 24,
|
12680
|
+
height: 24
|
12681
|
+
}
|
12682
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
12683
|
+
className: "universal_button_popover__user_text",
|
12684
|
+
children: "Sent via nftychat"
|
12685
|
+
})]
|
12686
|
+
})
|
12687
|
+
}), /*#__PURE__*/jsxRuntime.jsx("button", {
|
12688
|
+
className: "universal_button_popover__send",
|
12689
|
+
onClick: sendClick,
|
12690
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
12691
|
+
className: "universal_button_popover__send_icon",
|
12692
|
+
icon: "ant-design:send-outlined"
|
12693
|
+
})
|
12694
|
+
})]
|
12602
12695
|
})]
|
12603
|
-
})
|
12696
|
+
})
|
12604
12697
|
})
|
12605
12698
|
}), /*#__PURE__*/jsxRuntime.jsx(Modal$1, {
|
12606
12699
|
"aria-labelledby": "wallet_popover",
|
@@ -12624,7 +12717,7 @@ function DmButton(props) {
|
|
12624
12717
|
|
12625
12718
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
12626
12719
|
|
12627
|
-
var css = ".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
|
12720
|
+
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: ellipsis;\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}\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";
|
12628
12721
|
n(css,{});
|
12629
12722
|
|
12630
12723
|
const {
|
package/dist/index.esm.js
CHANGED
@@ -5,7 +5,7 @@ import { CoinbaseWalletConnector } from 'wagmi/connectors/coinbaseWallet';
|
|
5
5
|
import { MetaMaskConnector } from 'wagmi/connectors/metaMask';
|
6
6
|
import { WalletConnectConnector } from 'wagmi/connectors/walletConnect';
|
7
7
|
import { publicProvider } from 'wagmi/providers/public';
|
8
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
8
|
+
import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
9
9
|
import * as ReactDOM from 'react-dom';
|
10
10
|
import ReactDOM__default from 'react-dom';
|
11
11
|
|
@@ -12383,7 +12383,9 @@ function DmButton(props) {
|
|
12383
12383
|
const [accessToken, setAccessToken] = useState(null);
|
12384
12384
|
const [messageText, setMessageText] = useState("");
|
12385
12385
|
const [popoverAnchor, setPopoverAnchor] = useState(null);
|
12386
|
-
const [displayName, setDisplayName] = useState(props.displayName);
|
12386
|
+
const [displayName, setDisplayName] = useState(props.displayName);
|
12387
|
+
const [conversations, setConversations] = useState([]);
|
12388
|
+
const [authenticated, setAuthenticated] = useState(false); // const displayName = "Poapdispenser.eth";
|
12387
12389
|
// const address = "0x11B002247efc78A149F4e6aDc9F143b47bE9123D"
|
12388
12390
|
// Wallet modal
|
12389
12391
|
// Connectors 0: metamask, 1:WalletConnect, 2: coinbase
|
@@ -12413,19 +12415,14 @@ function DmButton(props) {
|
|
12413
12415
|
return payload.json();
|
12414
12416
|
}).then(data => {
|
12415
12417
|
setNumberOfNotifications(data);
|
12418
|
+
console.log(data);
|
12416
12419
|
});
|
12417
|
-
}, [props.address]);
|
12420
|
+
}, [props.address]);
|
12418
12421
|
|
12419
|
-
|
12420
|
-
|
12421
|
-
setPopoverAnchor(null);
|
12422
|
-
}
|
12423
|
-
}, [props.address, wagmiAddress]);
|
12422
|
+
async function getAccessToken() {
|
12423
|
+
let tempAccessToken = localStorage.getItem("token_" + wagmiAddress);
|
12424
12424
|
|
12425
|
-
|
12426
|
-
let tempAccessToken = accessToken;
|
12427
|
-
|
12428
|
-
if (accessToken === null) {
|
12425
|
+
if (!tempAccessToken) {
|
12429
12426
|
const message_response = await fetch(mainUrl + "/v1/siwe_message?address=" + wagmiAddress);
|
12430
12427
|
const data = await message_response.json();
|
12431
12428
|
const siwe_message = data.siwe_message;
|
@@ -12435,6 +12432,49 @@ function DmButton(props) {
|
|
12435
12432
|
tempAccessToken = await checkSignature(wagmiAddress, signature);
|
12436
12433
|
}
|
12437
12434
|
|
12435
|
+
localStorage.setItem("token_" + wagmiAddress, tempAccessToken);
|
12436
|
+
setAuthenticated(true);
|
12437
|
+
return tempAccessToken;
|
12438
|
+
}
|
12439
|
+
|
12440
|
+
async function getConversations() {
|
12441
|
+
const tempAccessToken = await getAccessToken();
|
12442
|
+
fetch(mainUrl + "/v1/conversations", {
|
12443
|
+
headers: {
|
12444
|
+
Accept: "application/json",
|
12445
|
+
"Content-Type": "application/json",
|
12446
|
+
Authorization: "Bearer " + tempAccessToken
|
12447
|
+
}
|
12448
|
+
}).then(response => {
|
12449
|
+
if (!response.ok) {
|
12450
|
+
response.json().then(data => {
|
12451
|
+
_t.error(data["detail"]);
|
12452
|
+
}); // TODO: Unsure what error is trying to throw
|
12453
|
+
|
12454
|
+
throw new Error("error");
|
12455
|
+
}
|
12456
|
+
|
12457
|
+
return response.json();
|
12458
|
+
}).then(payload => {
|
12459
|
+
setConversations(payload.slice(0, 3));
|
12460
|
+
});
|
12461
|
+
} // useEffect to get signature after click
|
12462
|
+
|
12463
|
+
|
12464
|
+
useEffect(() => {
|
12465
|
+
if (!!wagmiAddress && !!popoverAnchor) {
|
12466
|
+
getAccessToken();
|
12467
|
+
}
|
12468
|
+
}, [popoverAnchor, wagmiAddress]); // useEffect to fetch conversations if user is same as props.address
|
12469
|
+
|
12470
|
+
useEffect(() => {
|
12471
|
+
if (props.address === wagmiAddress && authenticated) {
|
12472
|
+
getConversations();
|
12473
|
+
}
|
12474
|
+
}, [props.address, wagmiAddress, authenticated]);
|
12475
|
+
|
12476
|
+
async function sendClick() {
|
12477
|
+
const tempAccessToken = await getAccessToken();
|
12438
12478
|
const payload = {
|
12439
12479
|
address: props.address,
|
12440
12480
|
message_text: messageText
|
@@ -12494,15 +12534,8 @@ function DmButton(props) {
|
|
12494
12534
|
className: "universal_button__button",
|
12495
12535
|
type: "button",
|
12496
12536
|
onClick: event => {
|
12497
|
-
|
12498
|
-
|
12499
|
-
} else {
|
12500
|
-
if (!wagmiAddress) {
|
12501
|
-
setWalletPopoverOpen(true);
|
12502
|
-
}
|
12503
|
-
|
12504
|
-
setPopoverAnchor(event.currentTarget);
|
12505
|
-
}
|
12537
|
+
setWalletPopoverOpen(true);
|
12538
|
+
setPopoverAnchor(event.currentTarget);
|
12506
12539
|
},
|
12507
12540
|
children: [/*#__PURE__*/jsxs("div", {
|
12508
12541
|
className: "universal_button__icon_container",
|
@@ -12515,7 +12548,7 @@ function DmButton(props) {
|
|
12515
12548
|
})]
|
12516
12549
|
}), /*#__PURE__*/jsx("span", {
|
12517
12550
|
className: "universal_button__text",
|
12518
|
-
children: wagmiAddress === props.address ? "
|
12551
|
+
children: popoverAnchor !== null && authenticated === false ? "Waiting for Signature" : wagmiAddress === props.address ? "Recent Messages" : `DM ${displayName ? displayName : shortenAddress(props.address)}`
|
12519
12552
|
})]
|
12520
12553
|
}), /*#__PURE__*/jsx(Popover$1, {
|
12521
12554
|
anchorEl: popoverAnchor,
|
@@ -12530,50 +12563,110 @@ function DmButton(props) {
|
|
12530
12563
|
marginTop: -8
|
12531
12564
|
},
|
12532
12565
|
onClose: () => setPopoverAnchor(null),
|
12533
|
-
open: popoverAnchor !== null &&
|
12566
|
+
open: popoverAnchor !== null && authenticated,
|
12534
12567
|
transformOrigin: {
|
12535
12568
|
vertical: props.popoverDirection === "bottom" ? "top" : "bottom",
|
12536
12569
|
horizontal: "center"
|
12537
12570
|
},
|
12538
|
-
children: /*#__PURE__*/
|
12571
|
+
children: /*#__PURE__*/jsx("div", {
|
12539
12572
|
className: props.theme === "dark" ? "universal_button_popover__container universal_button_popover__container___dark" : "universal_button_popover__container",
|
12540
|
-
children:
|
12541
|
-
|
12542
|
-
|
12543
|
-
|
12544
|
-
|
12545
|
-
|
12546
|
-
|
12547
|
-
|
12548
|
-
|
12549
|
-
|
12550
|
-
|
12551
|
-
|
12552
|
-
|
12553
|
-
|
12554
|
-
|
12555
|
-
|
12556
|
-
|
12557
|
-
|
12558
|
-
|
12559
|
-
|
12560
|
-
|
12561
|
-
|
12562
|
-
|
12563
|
-
|
12564
|
-
|
12565
|
-
|
12573
|
+
children: wagmiAddress === props.address ? /*#__PURE__*/jsxs(Fragment$1, {
|
12574
|
+
children: [/*#__PURE__*/jsxs("div", {
|
12575
|
+
className: "universal_button_popover__content",
|
12576
|
+
children: [/*#__PURE__*/jsx("span", {
|
12577
|
+
className: "message_title",
|
12578
|
+
children: " Recent Messages "
|
12579
|
+
}), /*#__PURE__*/jsx("a", {
|
12580
|
+
href: "https://nftychat.xyz",
|
12581
|
+
rel: "noopener noreferrer",
|
12582
|
+
target: "_blank",
|
12583
|
+
styel: {
|
12584
|
+
textDecoration: 'none'
|
12585
|
+
},
|
12586
|
+
children: /*#__PURE__*/jsxs("div", {
|
12587
|
+
className: "universal_button_popover__subtitle",
|
12588
|
+
children: [/*#__PURE__*/jsx("span", {
|
12589
|
+
className: "universal_button_popover__link_text",
|
12590
|
+
children: "View All"
|
12591
|
+
}), /*#__PURE__*/jsx("img", {
|
12592
|
+
src: logo,
|
12593
|
+
alt: "Logo",
|
12594
|
+
style: {
|
12595
|
+
width: 24,
|
12596
|
+
height: 24
|
12597
|
+
}
|
12598
|
+
})]
|
12599
|
+
})
|
12600
|
+
})]
|
12601
|
+
}), /*#__PURE__*/jsx("div", {
|
12602
|
+
className: "message_separator"
|
12603
|
+
}), /*#__PURE__*/jsx("div", {
|
12604
|
+
className: "universal_button_popover__messages",
|
12605
|
+
children: conversations.map(conversation => /*#__PURE__*/jsxs("div", {
|
12606
|
+
className: "message__container",
|
12607
|
+
onClick: () => {
|
12608
|
+
window.open("https://nftychat.xyz/dms/" + conversation.conversation_id, "_blank");
|
12609
|
+
},
|
12610
|
+
children: [/*#__PURE__*/jsx("div", {
|
12611
|
+
className: "hover_text",
|
12612
|
+
children: " View on nftychat"
|
12613
|
+
}), /*#__PURE__*/jsxs("div", {
|
12614
|
+
className: "message_text__container",
|
12615
|
+
children: [/*#__PURE__*/jsxs("span", {
|
12616
|
+
className: "message_title",
|
12617
|
+
children: [" ", conversation.conversation_name]
|
12618
|
+
}), /*#__PURE__*/jsx("span", {
|
12619
|
+
className: "message_text",
|
12620
|
+
children: conversation.latest_message_text
|
12621
|
+
})]
|
12622
|
+
}), conversation.unread_message_count > 0 && /*#__PURE__*/jsx("div", {
|
12623
|
+
className: "message__badge",
|
12624
|
+
children: conversation.unread_message_count
|
12566
12625
|
})]
|
12626
|
+
}, conversation.conversation_id))
|
12627
|
+
})]
|
12628
|
+
}) : /*#__PURE__*/jsxs(Fragment$1, {
|
12629
|
+
children: [/*#__PURE__*/jsx("div", {
|
12630
|
+
className: "universal_button_popover__content_top",
|
12631
|
+
children: /*#__PURE__*/jsx("textarea", {
|
12632
|
+
className: "universal_button_popover__textarea",
|
12633
|
+
spellCheck: false,
|
12634
|
+
value: messageText,
|
12635
|
+
onChange: e => setMessageText(e.target.value)
|
12567
12636
|
})
|
12568
|
-
}), /*#__PURE__*/
|
12569
|
-
className: "
|
12570
|
-
|
12571
|
-
|
12572
|
-
|
12573
|
-
|
12574
|
-
|
12637
|
+
}), /*#__PURE__*/jsxs("div", {
|
12638
|
+
className: "universal_button_popover__content_bottom",
|
12639
|
+
children: [/*#__PURE__*/jsx("a", {
|
12640
|
+
href: "https://nftychat.xyz",
|
12641
|
+
rel: "noopener noreferrer",
|
12642
|
+
target: "_blank",
|
12643
|
+
styel: {
|
12644
|
+
textDecoration: 'none'
|
12645
|
+
},
|
12646
|
+
children: /*#__PURE__*/jsxs("div", {
|
12647
|
+
className: "universal_button_popover__content_left",
|
12648
|
+
children: [/*#__PURE__*/jsx("img", {
|
12649
|
+
src: logo,
|
12650
|
+
alt: "Logo",
|
12651
|
+
style: {
|
12652
|
+
width: 24,
|
12653
|
+
height: 24
|
12654
|
+
}
|
12655
|
+
}), /*#__PURE__*/jsx("span", {
|
12656
|
+
className: "universal_button_popover__user_text",
|
12657
|
+
children: "Sent via nftychat"
|
12658
|
+
})]
|
12659
|
+
})
|
12660
|
+
}), /*#__PURE__*/jsx("button", {
|
12661
|
+
className: "universal_button_popover__send",
|
12662
|
+
onClick: sendClick,
|
12663
|
+
children: /*#__PURE__*/jsx(Icon, {
|
12664
|
+
className: "universal_button_popover__send_icon",
|
12665
|
+
icon: "ant-design:send-outlined"
|
12666
|
+
})
|
12667
|
+
})]
|
12575
12668
|
})]
|
12576
|
-
})
|
12669
|
+
})
|
12577
12670
|
})
|
12578
12671
|
}), /*#__PURE__*/jsx(Modal$1, {
|
12579
12672
|
"aria-labelledby": "wallet_popover",
|
@@ -12597,7 +12690,7 @@ function DmButton(props) {
|
|
12597
12690
|
|
12598
12691
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
12599
12692
|
|
12600
|
-
var css = ".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
|
12693
|
+
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: ellipsis;\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}\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";
|
12601
12694
|
n(css,{});
|
12602
12695
|
|
12603
12696
|
const {
|
Binary file
|
package/package.json
CHANGED
Binary file
|