nftychat-universe 1.3.9 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.cjs.js CHANGED
@@ -12348,8 +12348,6 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes
12348
12348
  } : void 0;
12349
12349
  var Popover$1 = Popover;
12350
12350
 
12351
- var logo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAACo5JREFUeJzdnHtwVNUdx7+/s3cfSTbJbgiBBIggQuKgaNgwVusrIA+ZMhYpwWFMgNGKtjN2nLH1H6eWcTq1Tttx2qk1PrBsxKkBqS1KSSIErLVW2RQpahLAR0ISAwt57Wbf99c/8k727uPeuyHymYHk3nPO95z7u/fcc36/c24IU8idDQ2SJ9C6jIVYSoTFMstFBFoAIAOAfegnAHgBdAPwgvEFCWphRgvJ8kmrubDxaFlZeKraTKmuwFHvLARjE4AyEG4HI1OTIKEfjPcAPgKifa5Vla36tFSpuhSwtNaZIQkqJ+ZKALcDEKmoB4AMwjFmOMOMvSfXVHr1rkBXAznqq7IjctqPBNFjBJ6pp3Y8GOgWzC9z0Pisa/0Wt166uhjomoO/z7IJ+3428Apw6rttHJiID/eEejeeWfdon1YxzY9+aa3zsWzJdp4Fr5wGxgEAYqa7so02d0m980nNYmoLOg5U5cJs+QCgRVobkVq4BQH/d13rd6jqdqqeoNJ/vLoOZkvb9DcOANBimNPal9XvuVdN6aQNVFLrfJoNhncAsqip8DJhIo686ahz7ky2YFJdrLRu9wsM2pFsJdMKJqdrTcXWRLMnbKDSWudbTLhHXaumFwz6a+PqioS6XEJdzFH35z9dKcYBAAJvKK3bvSuRvHENVFLrfBqgh7U3a3rBoO2Out3PxMsXs4uVHtp1DwvpLf2aNe1gikS+d/zu7QeVMiga6OYPanJC/f52JnybRqvkIfjh981TmicpdrGgx/fhFW8cAGBYYEr7p1Jy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pWMrHrt4OO78pP8HHdEzvj58E/Tp1bxhHnetrvztxJOKgQ5H3e5mgKbHgnuKYaLPGldVLImWphjNzjTKNxFB99s07SD4zRnm25SSFQ10tGx7jyykzUrpVwgsIrTh37eUK+4Zjrke0rhyywEi2jl5//uVgQA/9fHaikOx8iQUbHUccj4PgUf0ada04RXX6soH42VKOBq9rK56P4E3aGvT9IBk7D++tnJjInkTXnIc/MZTfiF+zukMA0y7EzUOkOTOVtfqbY8MvpO+lS8lFsDPXWsqtiVTSNWCz/JD1WvZwPuZkfgC/GWFA2Bxn2tNRdKfl6ree3fzBzU5wX7/v0DQZ1tpqiB8bsqw3BprKI9dXCPL33U+GpHxLAFmrVr6wiEwP+Vas+1XWlR02fW9pKbGarH732DG3TQFf9UqJgwZAgdh9212lY7GddSi68UsaaixWkKBBwB+AkC+ntoJcIGYnw+b5OdOlG1X3viYJCm5244DVekwWTYRoYJBZUjhn+hixhEhqJr9A/vGRgL1IuXd4aaDr80NS7yRwCt58IuibI2SPQx+j5gOhyV+85OVW/X5xEeBKX1fbKqpMZyx+UsMzEuZsBhERWCaD3AWABtG90t6APQA1AfgS0BuIUaLDP5kYW/6ib3l5brFWOPxf6w6mf8F5a6JAAAAAElFTkSuQmCC";
12352
-
12353
12351
  /**
12354
12352
  * Get ENS infomation resolved from the provided wallet address or ENS name
12355
12353
  * @param { string } - wallet address or ENS name
@@ -12369,7 +12367,7 @@ async function getDisplayName(param) {
12369
12367
  const cacheData = sessionCacheSerialize[param];
12370
12368
 
12371
12369
  if (cacheData !== undefined) {
12372
- return cacheData['displayName'];
12370
+ return truncateEns(cacheData['displayName'], 18);
12373
12371
  }
12374
12372
  } // Fetches data if not in cache
12375
12373
 
@@ -12381,7 +12379,25 @@ async function getDisplayName(param) {
12381
12379
 
12382
12380
  sessionCacheSerialize[param] = data;
12383
12381
  sessionStorage.setItem("display_name_session_cache", JSON.stringify(sessionCacheSerialize));
12384
- return data['displayName'];
12382
+ return truncateEns(data['displayName'], 18);
12383
+ } // Make sure ens is short on page
12384
+
12385
+ function truncateEns(str, max_length) {
12386
+ let ens;
12387
+ let left;
12388
+ let right;
12389
+ let letters_to_remove;
12390
+
12391
+ if (str.length >= max_length) {
12392
+ letters_to_remove = Math.floor((str.length - max_length) / 2);
12393
+ left = str.substring(0, Math.floor(str.length / 2 - letters_to_remove));
12394
+ right = str.substring(Math.floor(str.length / 2) + letters_to_remove, str.length);
12395
+ ens = left + "..." + right;
12396
+ } else {
12397
+ ens = str;
12398
+ }
12399
+
12400
+ return ens;
12385
12401
  }
12386
12402
  const shortenAddress = address => {
12387
12403
  return address.slice(0, 6) + "..." + address.slice(-4);
@@ -12396,6 +12412,27 @@ function formatDmMessage(message) {
12396
12412
  return tempMessage;
12397
12413
  }
12398
12414
 
12415
+ function InboxButton({
12416
+ showRecentMessages,
12417
+ setShowRecentMessages,
12418
+ inboxNotEmpty
12419
+ }) {
12420
+ return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
12421
+ children: /*#__PURE__*/jsxRuntime.jsxs("button", {
12422
+ className: `universal_dm__inbox ${showRecentMessages ? "universal_dm__inbox__selected" : ""}`,
12423
+ onClick: () => setShowRecentMessages(!showRecentMessages),
12424
+ children: [/*#__PURE__*/jsxRuntime.jsx(Icon, {
12425
+ className: "universal_dm__inbox_icon",
12426
+ icon: "bi:inbox"
12427
+ }), inboxNotEmpty && /*#__PURE__*/jsxRuntime.jsx("div", {
12428
+ className: "universal_dm__inbox_badge"
12429
+ })]
12430
+ })
12431
+ });
12432
+ }
12433
+
12434
+ var bestagonSuccessImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAAvCAYAAACsaemzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAPmSURBVHgBzZpPUtswFMbfU3BX7Uxu0HCDAGWmS7IgLUvWHf74BJATACcATpAA7XQJu7ahM8meQNMT1EdgQTexZfXJTlw7lhMH21i/YSa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lwtwNrxyi8bywBh/2judVmivIs3Ha/oOSUe2nqki1aUwJjVaZBoHU7ZNseppUgsq2ccebF9OR+j0F38bTJdHzBc/nGUGkNizAeCH4YpvIsquFX0xKw0Lv+gRJdCEucFa6KiNSCJmAuagYyT+Tbgxl1bf7vAAAAABJRU5ErkJggg==";
12435
+
12399
12436
  function DmButton(props) {
12400
12437
  // Wamgi hooks
12401
12438
  const {
@@ -12419,10 +12456,14 @@ function DmButton(props) {
12419
12456
  const [popoverAnchor, setPopoverAnchor] = React.useState(null);
12420
12457
  const [displayName, setDisplayName] = React.useState(props.displayName);
12421
12458
  const [displayText, setDisplayText] = React.useState(props.displayText);
12459
+ const [userName, setUserName] = React.useState("");
12422
12460
  const [conversations, setConversations] = React.useState([]);
12423
12461
  const [authenticated, setAuthenticated] = React.useState(false); // const displayName = "Poapdispenser.eth";
12424
12462
  // const address = "0x11B002247efc78A149F4e6aDc9F143b47bE9123D"
12425
- // Wallet modal
12463
+
12464
+ const [showRecentMessages, setShowRecentMessages] = React.useState(false);
12465
+ const [inboxNotEmpty, setInboxNotEmpty] = React.useState(false);
12466
+ const [messageSentScreen, setMessageSentScreen] = React.useState(false); // Wallet modal
12426
12467
  // Connectors 0: metamask, 1:WalletConnect, 2: coinbase
12427
12468
 
12428
12469
  const [walletPopoverOpen, setWalletPopoverOpen] = React.useState(false); // UseEffect to warn user on error
@@ -12431,7 +12472,18 @@ function DmButton(props) {
12431
12472
  if (wagmiError) {
12432
12473
  _t.error("Wallet not detected.");
12433
12474
  }
12434
- }, [wagmiError]); //useEffect if displayName not defined
12475
+ }, [wagmiError]); //useEffect to resolve username
12476
+
12477
+ React.useEffect(() => {
12478
+ async function resolveUserName() {
12479
+ if (!userName || userName === "") {
12480
+ const tempUserName = await getDisplayName(wagmiAddress);
12481
+ setUserName(tempUserName);
12482
+ }
12483
+ }
12484
+
12485
+ resolveUserName();
12486
+ }, [userName, wagmiAddress]); //useEffect if displayName not defined
12435
12487
 
12436
12488
  React.useEffect(() => {
12437
12489
  async function resolveDisplayName() {
@@ -12451,6 +12503,7 @@ function DmButton(props) {
12451
12503
  }, [displayName, props.displayText, props.address]); // badge of unread messages
12452
12504
 
12453
12505
  React.useEffect(() => {
12506
+ if (["", undefined, null].includes(props.address)) return;
12454
12507
  fetch(mainUrl + "/v1/unread_message_count?address=" + props.address, {
12455
12508
  method: "get"
12456
12509
  }).then(payload => {
@@ -12458,7 +12511,21 @@ function DmButton(props) {
12458
12511
  }).then(data => {
12459
12512
  setNumberOfNotifications(data);
12460
12513
  });
12461
- }, [props.address]); // Checks validity of signature
12514
+ }, [props.address]);
12515
+ React.useEffect(() => {
12516
+ if (["", undefined, null].includes(wagmiAddress)) return;
12517
+ fetch(mainUrl + "/v1/unread_message_count?address=" + wagmiAddress, {
12518
+ method: "get"
12519
+ }).then(payload => {
12520
+ return payload.json();
12521
+ }).then(data => {
12522
+ if (data > 0) {
12523
+ setInboxNotEmpty(true);
12524
+ } else {
12525
+ setInboxNotEmpty(false);
12526
+ }
12527
+ });
12528
+ }, [wagmiAddress]); // Checks validity of signature
12462
12529
 
12463
12530
  async function checkSignature(tempAddress = wagmiAddress, signature = "0x") {
12464
12531
  const signatureUrl = `${mainUrl}/v1/authenticate?address=${tempAddress}&signature=${signature}&source=${window.location.hostname}`;
@@ -12534,15 +12601,16 @@ function DmButton(props) {
12534
12601
  if (!!wagmiAddress && !!popoverAnchor) {
12535
12602
  getAccessToken();
12536
12603
  }
12537
- }, [popoverAnchor, wagmiAddress]); // useEffect to fetch conversations if user is same as props.address
12604
+ }, [popoverAnchor, wagmiAddress]); // useEffect to fetch conversations if user has authenticated
12538
12605
 
12539
12606
  React.useEffect(() => {
12540
- if (props.address === wagmiAddress && authenticated) {
12607
+ if (authenticated) {
12541
12608
  getConversations();
12542
12609
  }
12543
12610
  }, [props.address, wagmiAddress, authenticated]);
12544
12611
 
12545
12612
  async function sendClick() {
12613
+ if (messageText === "") return;
12546
12614
  const tempAccessToken = await getAccessToken();
12547
12615
  const payload = {
12548
12616
  address: props.address,
@@ -12574,7 +12642,7 @@ function DmButton(props) {
12574
12642
  _t.success("Message sent!");
12575
12643
  setNumberOfNotifications(num => num + 1);
12576
12644
  setMessageText("");
12577
- setPopoverAnchor(null);
12645
+ setMessageSentScreen(true);
12578
12646
  });
12579
12647
  }
12580
12648
 
@@ -12597,10 +12665,16 @@ function DmButton(props) {
12597
12665
  className: "universal_button__icon",
12598
12666
  icon: "ant-design:message-outlined"
12599
12667
  })]
12600
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
12668
+ }), popoverAnchor !== null && authenticated === false ? /*#__PURE__*/jsxRuntime.jsx("span", {
12601
12669
  className: "universal_button__text",
12602
- children: popoverAnchor !== null && authenticated === false ? "Waiting for Signature" : wagmiAddress === props.address ? "Recent Messages" : displayText
12603
- })]
12670
+ children: "Waiting for Signature"
12671
+ }) : wagmiAddress === props.address ? /*#__PURE__*/jsxRuntime.jsx("span", {
12672
+ className: "universal_button__text",
12673
+ children: "Recent Messages"
12674
+ }) : displayText !== "" ? /*#__PURE__*/jsxRuntime.jsx("span", {
12675
+ className: "universal_button__text",
12676
+ children: displayText
12677
+ }) : ""]
12604
12678
  }), /*#__PURE__*/jsxRuntime.jsx(Popover$1, {
12605
12679
  anchorEl: popoverAnchor,
12606
12680
  anchorOrigin: {
@@ -12619,40 +12693,26 @@ function DmButton(props) {
12619
12693
  vertical: props.popoverDirection === "bottom" ? "top" : "bottom",
12620
12694
  horizontal: "center"
12621
12695
  },
12622
- children: /*#__PURE__*/jsxRuntime.jsx("div", {
12696
+ children: /*#__PURE__*/jsxRuntime.jsxs("div", {
12623
12697
  className: props.theme === "dark" ? "universal_button_popover__container universal_button_popover__container___dark" : "universal_button_popover__container",
12624
- children: wagmiAddress === props.address ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
12698
+ children: [(wagmiAddress === props.address || showRecentMessages) && !messageSentScreen && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
12625
12699
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
12626
- className: "universal_button_popover__content",
12700
+ className: "universal_dm__content universal_dm__top",
12627
12701
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
12628
- className: "message_title",
12702
+ className: "universal_dm__title",
12629
12703
  children: " Recent Messages "
12630
- }), /*#__PURE__*/jsxRuntime.jsx("a", {
12631
- href: "https://nftychat.xyz",
12632
- rel: "noopener noreferrer",
12633
- target: "_blank",
12634
- styel: {
12635
- textDecoration: 'none'
12636
- },
12637
- children: /*#__PURE__*/jsxRuntime.jsxs("div", {
12638
- className: "universal_button_popover__subtitle",
12639
- children: [/*#__PURE__*/jsxRuntime.jsx("span", {
12640
- className: "universal_button_popover__link_text",
12641
- children: "View All"
12642
- }), /*#__PURE__*/jsxRuntime.jsx("img", {
12643
- src: logo,
12644
- alt: "Logo",
12645
- style: {
12646
- width: 24,
12647
- height: 24
12648
- }
12649
- })]
12650
- })
12704
+ }), /*#__PURE__*/jsxRuntime.jsx(InboxButton, {
12705
+ showRecentMessages: showRecentMessages,
12706
+ setShowRecentMessages: setShowRecentMessages,
12707
+ inboxNotEmpty: inboxNotEmpty
12651
12708
  })]
12652
12709
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
12653
- className: "message_separator"
12710
+ className: "universal_dm__content",
12711
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
12712
+ className: "message_separator"
12713
+ })
12654
12714
  }), /*#__PURE__*/jsxRuntime.jsx("div", {
12655
- className: "universal_button_popover__messages",
12715
+ className: "universal_dm__messages",
12656
12716
  children: conversations.map(conversation => /*#__PURE__*/jsxRuntime.jsxs("div", {
12657
12717
  className: "message__container",
12658
12718
  onClick: () => {
@@ -12660,7 +12720,7 @@ function DmButton(props) {
12660
12720
  },
12661
12721
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
12662
12722
  className: "hover_text",
12663
- children: " View on nftychat"
12723
+ children: " View on nftychat.xyz"
12664
12724
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
12665
12725
  className: "message_text__container",
12666
12726
  children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
@@ -12675,49 +12735,110 @@ function DmButton(props) {
12675
12735
  children: conversation.unread_message_count
12676
12736
  })]
12677
12737
  }, conversation.conversation_id))
12738
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
12739
+ className: "universal_dm__content universal_dm__bottom_2",
12740
+ children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
12741
+ className: "universal_dm__user_text",
12742
+ children: ["Connected: ", userName]
12743
+ }), /*#__PURE__*/jsxRuntime.jsxs("a", {
12744
+ href: "https://nftychat.xyz",
12745
+ rel: "noopener noreferrer",
12746
+ target: "_blank",
12747
+ className: "universal_dm__nfty_link",
12748
+ children: [" ", "View all", /*#__PURE__*/jsxRuntime.jsx(Icon, {
12749
+ className: "universal_dm__link_arrow",
12750
+ icon: "bi:arrow-right"
12751
+ })]
12752
+ })]
12678
12753
  })]
12679
- }) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
12680
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
12681
- className: "universal_button_popover__content_top",
12754
+ }), wagmiAddress !== props.address && !showRecentMessages && !messageSentScreen && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
12755
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
12756
+ className: "universal_dm__content universal_dm__top",
12757
+ children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
12758
+ className: "universal_dm__title",
12759
+ children: [" Message ", displayName, " "]
12760
+ }), /*#__PURE__*/jsxRuntime.jsx(InboxButton, {
12761
+ showRecentMessages: showRecentMessages,
12762
+ setShowRecentMessages: setShowRecentMessages
12763
+ })]
12764
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
12765
+ className: "universal_dm__content",
12766
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
12767
+ className: "message_separator"
12768
+ })
12769
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
12770
+ className: "universal_dm__content",
12682
12771
  children: /*#__PURE__*/jsxRuntime.jsx("textarea", {
12683
- className: "universal_button_popover__textarea",
12772
+ className: "universal_dm__textarea",
12684
12773
  spellCheck: false,
12685
12774
  value: messageText,
12686
12775
  onChange: e => setMessageText(e.target.value)
12687
12776
  })
12688
12777
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
12689
- className: "universal_button_popover__content_bottom",
12690
- children: [/*#__PURE__*/jsxRuntime.jsx("a", {
12691
- href: "https://nftychat.xyz",
12692
- rel: "noopener noreferrer",
12693
- target: "_blank",
12694
- style: {
12695
- textDecoration: 'none'
12696
- },
12697
- children: /*#__PURE__*/jsxRuntime.jsxs("div", {
12698
- className: "universal_button_popover__content_left",
12699
- children: [/*#__PURE__*/jsxRuntime.jsx("img", {
12700
- src: logo,
12701
- alt: "Logo",
12702
- style: {
12703
- width: 24,
12704
- height: 24
12705
- }
12706
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
12707
- className: "universal_button_popover__user_text",
12708
- children: "Sent via nftychat"
12709
- })]
12710
- })
12778
+ className: "universal_dm__content universal_dm__bottom_1",
12779
+ children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
12780
+ className: "universal_dm__user_text",
12781
+ children: ["Connected: ", userName]
12711
12782
  }), /*#__PURE__*/jsxRuntime.jsx("button", {
12712
- className: "universal_button_popover__send",
12783
+ className: "universal_dm__send",
12713
12784
  onClick: sendClick,
12714
12785
  children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
12715
- className: "universal_button_popover__send_icon",
12716
- icon: "ant-design:send-outlined"
12786
+ className: "universal_dm__send_icon",
12787
+ icon: "fluent:send-24-filled"
12717
12788
  })
12718
12789
  })]
12719
12790
  })]
12720
- })
12791
+ }), messageSentScreen && /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
12792
+ children: /*#__PURE__*/jsxRuntime.jsxs("div", {
12793
+ className: "universal_dm__message_sent",
12794
+ children: [/*#__PURE__*/jsxRuntime.jsx("img", {
12795
+ className: "universal_dm__message_sent__image",
12796
+ src: bestagonSuccessImg,
12797
+ alt: "successIcon"
12798
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
12799
+ className: "universal_dm__message_sent__text",
12800
+ children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
12801
+ className: "universal_dm__message_sent__title",
12802
+ children: ["Message sent to ", displayName]
12803
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
12804
+ className: "universal_dm__message_sent__subtitle",
12805
+ children: "Send another message or view recent messages"
12806
+ })]
12807
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
12808
+ className: "universal_dm__message_sent__button_group",
12809
+ children: [/*#__PURE__*/jsxRuntime.jsxs("button", {
12810
+ className: "universal_dm__message_sent__button",
12811
+ onClick: () => {
12812
+ setMessageSentScreen(false);
12813
+ setShowRecentMessages(false);
12814
+ },
12815
+ children: [/*#__PURE__*/jsxRuntime.jsx(Icon, {
12816
+ className: "universal_dm__message_sent__button_icon",
12817
+ icon: "ant-design:message-outlined"
12818
+ }), "Send Message"]
12819
+ }), /*#__PURE__*/jsxRuntime.jsxs("button", {
12820
+ className: "universal_dm__message_sent__button",
12821
+ onClick: () => {
12822
+ setMessageSentScreen(false);
12823
+ setShowRecentMessages(true);
12824
+ },
12825
+ children: [/*#__PURE__*/jsxRuntime.jsx(Icon, {
12826
+ className: "universal_dm__message_sent__button_icon",
12827
+ icon: "bi:inbox"
12828
+ }), "View Messages"]
12829
+ })]
12830
+ })]
12831
+ })
12832
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
12833
+ className: "universal_dm__bottom_border",
12834
+ children: /*#__PURE__*/jsxRuntime.jsx("a", {
12835
+ href: "https://nftychat.xyz",
12836
+ rel: "noopener noreferrer",
12837
+ target: "_blank",
12838
+ className: "universal_dm__bottom_border__text",
12839
+ children: "\u26A1\uFE0F by nftychat"
12840
+ })
12841
+ })]
12721
12842
  })
12722
12843
  }), /*#__PURE__*/jsxRuntime.jsx(Modal$1, {
12723
12844
  "aria-labelledby": "wallet_popover",
@@ -12741,7 +12862,7 @@ function DmButton(props) {
12741
12862
 
12742
12863
  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}}
12743
12864
 
12744
- 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";
12865
+ 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 --background: #fff;\n --primary-text: #19191A;\n --secondary-text: #606166;\n --bottom-border: #f3f3f3;\n --main-gray: #dedede;\n --button-hover: #ccc;\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 --background: #0f0f0f;\n --primary-text: #fff;\n --secondary-text: #ccc;\n --bottom-border: #2c2c27;\n --main-gray: #2c2c2f;\n --button-hover: #4f4f55;\n}\n\n.universal_button {\n position: relative;\n}\n\n.universal_button__button {\n align-items: center;\n background-color: var(--background);\n border-radius: 9999px;\n border: 1px solid var(--main-gray);\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(--primary-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(--button-hover);\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.universal_dm__inbox_badge{\n align-items: center;\n background-color: #fa2449;\n border-radius: 9999px;\n color: white;\n display: flex;\n justify-content: center;\n position: absolute;\n right: 20px;\n top: 12px;\n height: 8px;\n width: 8px;\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(--background);\n display: flex;\n flex-direction: column;\n width: 384px;\n}\n\n.universal_dm__textarea {\n background-color: var(--background);\n border-radius: 6px;\n border: 1px solid var(--main-gray);\n color: var(--primary-text);\n font-family: Inter, sans-serif;\n font-size: 1rem;\n margin-bottom: 8px;\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_dm__textarea:focus {\n border-color: var(--button-hover);\n}\n\n.universal_dm__title{\n font-family: 'Noto Sans';\n font-size: 18px;\n font-weight: 600;\n text-align: left;\n color: var(--primary-text)\n}\n\n/* recent messages */\n.universal_dm__messages {\n display: flex;\n justify-content: space-between;\n margin: 0px 16px 8px 16px;\n flex-direction: column;\n}\n\n.message__container{\n margin-bottom: 8px; \n align-items: center;\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 text-align: left;\n color: var(--primary-text)\n}\n.message_text{\n font-family: Inter;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n min-height: 24px;\n letter-spacing: 0em;\n text-align: left;\n color: var(--secondary-text);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: clip;\n}\n.message_separator {\n width: 100%;\n border: 1px solid var(--main-gray);\n height: 0px;\n margin-bottom: 12px;\n} \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(--primary-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(3px);\n -moz-filter: blur(3px);\n -ms-filter: blur(3px);\n -o-filter: blur(3px);\n filter: blur(3px);\n}\n.message__container:hover .hover_text {\n -webkit-opacity: 1;\n opacity: 1;\n}\n\n.universal_dm__content {\n padding: 0px 16px;\n align-items: center;\n display: flex;\n justify-content: space-between;\n}\n\n.universal_dm__top {\n margin-bottom: 8px;\n margin-top: 10px;\n}\n\n.universal_dm__bottom_1 {\n margin-bottom: 20px;\n}\n.universal_dm__bottom_2 {\n margin-bottom: 16px;\n}\n\n\n.universal_button_popover__content {\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_dm__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_dm__user_text {\n text-decoration: none;\n color: var(--secondary-text);\n font-family: Inter, sans-serif;\n font-size: 13px;\n}\n\n.universal_dm__nfty_link {\n text-decoration: none;\n color: var(--primary-text);\n font-family: Inter, sans-serif;\n font-size: 13px;\n display: flex;\n align-items: center;\n}\n\n.universal_dm__link_arrow{\n margin-left: 4px\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/* inbox button */\n.universal_dm__inbox {\n align-items: center;\n background-color: transparent;\n border-radius: 9999px;\n border: none;\n color: var(--primary-text);\n cursor: pointer;\n display: flex;\n justify-content: center;\n transition: color 200ms, background-color 200ms;\n width: 32px;\n}\n.universal_dm__inbox__selected{\n background-color: var(--main-gray); \n}\n.universal_dm__inbox:hover {\n background-color: var(--button-hover); \n}\n\n.universal_dm__inbox_icon {\n height: 100%;\n width: 100%;\n}\n\n/* Send button */\n.universal_dm__send {\n align-items: center;\n background-color: transparent;\n border-radius: 9999px;\n border: none;\n color: var(--primary-text);\n cursor: pointer;\n display: flex;\n height: 24px;\n width: 24px;\n justify-content: center;\n padding: 3px 1px 3px 3px;\n transition: color 200ms, background-color 200ms;\n background-color: var(--main-gray);\n}\n\n.universal_dm__send:hover {\n background-color: var(--button-hover);\n}\n\n.universal_dm__send_icon {\n height: 100%;\n width: 100%;\n}\n.universal_dm__bottom_border {\n background-color: var(--bottom-border);\n padding:8px;\n align-items: center;\n justify-content: center;\n display: flex;\n}\n.universal_dm__bottom_border__text {\n color: var(--primary-text);\n text-decoration: none;\n font-size: 13px;\n}\n\n/* Message sent screen */\n.universal_dm__message_sent {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.universal_dm__message_sent__image{\n margin-top: 24px;\n margin-bottom: 18px;\n}\n\n.universal_dm__message_sent__text {\n margin-bottom: 32px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.universal_dm__message_sent__title {\n color: var(--primary-text);\n font-weight: 700;\n font-size: 16px;\n margin-bottom: 8px;\n}\n.universal_dm__message_sent__subtitle {\n color: var(--primary-text);\n font-weight: 400;\n font-size: 13px;\n}\n\n.universal_dm__message_sent__button_group{\n display: flex;\n align-items: center;\n justify-content:space-between;\n margin: 0px 16px 24px 16px;\n width: calc(100% - 32px);\n}\n.universal_dm__message_sent__button{\n padding: 10px 22px;\n padding-top: 10px;\n color: var(--primary-text);\n background-color: var(--main-gray);\n border: none;\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: left;\n cursor: pointer;\n}\n.universal_dm__message_sent__button:hover{\n background-color: var(--button-hover);\n }\n .universal_dm__message_sent__button_icon{\n height: 20px;\n width: 20px;\n margin-right: 6px;\n}\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(--background);\n border-radius: 14px;\n border: 1px solid var(--main-gray);\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";
12745
12866
  n(css,{});
12746
12867
 
12747
12868
  const infuraId = "806586b223e14b3eb1e6e4285bf8240e";
package/dist/index.esm.js CHANGED
@@ -12321,8 +12321,6 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes
12321
12321
  } : void 0;
12322
12322
  var Popover$1 = Popover;
12323
12323
 
12324
- var logo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48G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/GWFA2Bxn2tNRdKfl6ree3fzBzU5wX7/v0DQZ1tpqiB8bsqw3BprKI9dXCPL33U+GpHxLAFmrVr6wiEwP+Vas+1XWlR02fW9pKbGarH732DG3TQFf9UqJgwZAgdh9212lY7GddSi68UsaaixWkKBBwB+AkC+ntoJcIGYnw+b5OdOlG1X3viYJCm5244DVekwWTYRoYJBZUjhn+hixhEhqJr9A/vGRgL1IuXd4aaDr80NS7yRwCt58IuibI2SPQx+j5gOhyV+85OVW/X5xEeBKX1fbKqpMZyx+UsMzEuZsBhERWCaD3AWABtG90t6APQA1AfgS0BuIUaLDP5kYW/6ib3l5brFWOPxf6w6mf8F5a6JAAAAAElFTkSuQmCC";
12325
-
12326
12324
  /**
12327
12325
  * Get ENS infomation resolved from the provided wallet address or ENS name
12328
12326
  * @param { string } - wallet address or ENS name
@@ -12342,7 +12340,7 @@ async function getDisplayName(param) {
12342
12340
  const cacheData = sessionCacheSerialize[param];
12343
12341
 
12344
12342
  if (cacheData !== undefined) {
12345
- return cacheData['displayName'];
12343
+ return truncateEns(cacheData['displayName'], 18);
12346
12344
  }
12347
12345
  } // Fetches data if not in cache
12348
12346
 
@@ -12354,7 +12352,25 @@ async function getDisplayName(param) {
12354
12352
 
12355
12353
  sessionCacheSerialize[param] = data;
12356
12354
  sessionStorage.setItem("display_name_session_cache", JSON.stringify(sessionCacheSerialize));
12357
- return data['displayName'];
12355
+ return truncateEns(data['displayName'], 18);
12356
+ } // Make sure ens is short on page
12357
+
12358
+ function truncateEns(str, max_length) {
12359
+ let ens;
12360
+ let left;
12361
+ let right;
12362
+ let letters_to_remove;
12363
+
12364
+ if (str.length >= max_length) {
12365
+ letters_to_remove = Math.floor((str.length - max_length) / 2);
12366
+ left = str.substring(0, Math.floor(str.length / 2 - letters_to_remove));
12367
+ right = str.substring(Math.floor(str.length / 2) + letters_to_remove, str.length);
12368
+ ens = left + "..." + right;
12369
+ } else {
12370
+ ens = str;
12371
+ }
12372
+
12373
+ return ens;
12358
12374
  }
12359
12375
  const shortenAddress = address => {
12360
12376
  return address.slice(0, 6) + "..." + address.slice(-4);
@@ -12369,6 +12385,27 @@ function formatDmMessage(message) {
12369
12385
  return tempMessage;
12370
12386
  }
12371
12387
 
12388
+ function InboxButton({
12389
+ showRecentMessages,
12390
+ setShowRecentMessages,
12391
+ inboxNotEmpty
12392
+ }) {
12393
+ return /*#__PURE__*/jsx(Fragment$1, {
12394
+ children: /*#__PURE__*/jsxs("button", {
12395
+ className: `universal_dm__inbox ${showRecentMessages ? "universal_dm__inbox__selected" : ""}`,
12396
+ onClick: () => setShowRecentMessages(!showRecentMessages),
12397
+ children: [/*#__PURE__*/jsx(Icon, {
12398
+ className: "universal_dm__inbox_icon",
12399
+ icon: "bi:inbox"
12400
+ }), inboxNotEmpty && /*#__PURE__*/jsx("div", {
12401
+ className: "universal_dm__inbox_badge"
12402
+ })]
12403
+ })
12404
+ });
12405
+ }
12406
+
12407
+ var bestagonSuccessImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAAvCAYAAACsaemzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAPmSURBVHgBzZpPUtswFMbfU3BX7Uxu0HCDAGWmS7IgLUvWHf74BJATACcATpAA7XQJu7ahM8meQNMT1EdgQTexZfXJTlw7lhMH21i/YSaxJWJ/lvTp6ckIz2S9+6XOgdcnxyjwERk8Qs4IF6oCRdW/CFSZK+gY3wJiVQhRZ4DWoLnTmNRfggV5d3u1QT/UdoHXMFyAAoSA/EHvz4d+n8SMvwvvvBDu73B1Bguw1r06IDE9+loDTSBRw/BxakHve19r9DzOQDcY60cOISW2zY9AP6zB5k4/fCKVoPVumwa/uw+aQUPqZPpcKlNwoXINuoFw87C525k+PbeFVruX+6CRCYyx+BM3VQU467+kEdi2rZWrgRTDeWO4ZVqqwpldbuTYB6hb6zBsDZtqMV5xUoFsHZorD0E3XJjptomCNLVpQtRXv18mPmjlGJJGQAVt0JdHbrxZHja2Y7GjsoVIjKatE1Bdcv4q7zEmSMZroJ9Nx6Cg9NAPx6JEBI3jtTKNwEJEuRSw0lS2bSc2LFi0gmcENSgHb36RsZn8hFSixIZczoTPBIL81iktXotMlvJzLGoucm0WPg4EUfOVFa8pZ35mGGmNqRa2cc+2S7RppZjVn5/b6C7UWwIb91qoJJvOS4wksHGUzUXJjVPIjKBJDqupqiI9UYevxMTcXp5mCbcMw1hmyHAPskNP212hO+3PrSnFCEXL3F4dZY0dndFon8nYCLIRdB1uONt0x8PEmhMxTTNSxxcjjiEjtIKtM7+rPB+aCM3AbhsmDU6noRRVsJgJJIgNIQNyHgiHIEpRLySGcnY3jPJ2J5ANb1Vb710HhjAtijm8VbQYwnI573vzEAWkPRlGQCZwyI3XjXBIX//WrhkAG3dbZidcswAxgC60Bh93z3By4Uql8gcyExc1TRFiCOu+ubssv3gTqxzUdJGsXQ+kY1bsp0j3C1OQmEh+LojlnFfuWVbHG/+8UpRcZxUhhug8NP/n5wJBciALF3NoJQmJcp6C2HDtx8VeUXlxmgMj9xzLKdCT/JXDZDuGdUDwPk1WHSgEPL9v7kSii9gSnGy8BblBQWZhYmSE4sRaPSbIz+aniMlKRhqBKnuqzPqQcjMfgygMK2wEYZSCfBuHc9AUBpXt5LIE8rPx3OncNT8lxp+JgvK18fyYtulpZu4PPVBspJNByGgmaRtlwtwNrxyi8bywBh/2judVmivIs3Ha/oOSUe2nqki1aUwJjVaZBoHU7ZNseppUgsq2ccebF9OR+j0F38bTJdHzBc/nGUGkNizAeCH4YpvIsquFX0xKw0Lv+gRJdCEucFa6KiNSCJmAuagYyT+Tbgxl1bf7vAAAAABJRU5ErkJggg==";
12408
+
12372
12409
  function DmButton(props) {
12373
12410
  // Wamgi hooks
12374
12411
  const {
@@ -12392,10 +12429,14 @@ function DmButton(props) {
12392
12429
  const [popoverAnchor, setPopoverAnchor] = useState(null);
12393
12430
  const [displayName, setDisplayName] = useState(props.displayName);
12394
12431
  const [displayText, setDisplayText] = useState(props.displayText);
12432
+ const [userName, setUserName] = useState("");
12395
12433
  const [conversations, setConversations] = useState([]);
12396
12434
  const [authenticated, setAuthenticated] = useState(false); // const displayName = "Poapdispenser.eth";
12397
12435
  // const address = "0x11B002247efc78A149F4e6aDc9F143b47bE9123D"
12398
- // Wallet modal
12436
+
12437
+ const [showRecentMessages, setShowRecentMessages] = useState(false);
12438
+ const [inboxNotEmpty, setInboxNotEmpty] = useState(false);
12439
+ const [messageSentScreen, setMessageSentScreen] = useState(false); // Wallet modal
12399
12440
  // Connectors 0: metamask, 1:WalletConnect, 2: coinbase
12400
12441
 
12401
12442
  const [walletPopoverOpen, setWalletPopoverOpen] = useState(false); // UseEffect to warn user on error
@@ -12404,7 +12445,18 @@ function DmButton(props) {
12404
12445
  if (wagmiError) {
12405
12446
  _t.error("Wallet not detected.");
12406
12447
  }
12407
- }, [wagmiError]); //useEffect if displayName not defined
12448
+ }, [wagmiError]); //useEffect to resolve username
12449
+
12450
+ useEffect(() => {
12451
+ async function resolveUserName() {
12452
+ if (!userName || userName === "") {
12453
+ const tempUserName = await getDisplayName(wagmiAddress);
12454
+ setUserName(tempUserName);
12455
+ }
12456
+ }
12457
+
12458
+ resolveUserName();
12459
+ }, [userName, wagmiAddress]); //useEffect if displayName not defined
12408
12460
 
12409
12461
  useEffect(() => {
12410
12462
  async function resolveDisplayName() {
@@ -12424,6 +12476,7 @@ function DmButton(props) {
12424
12476
  }, [displayName, props.displayText, props.address]); // badge of unread messages
12425
12477
 
12426
12478
  useEffect(() => {
12479
+ if (["", undefined, null].includes(props.address)) return;
12427
12480
  fetch(mainUrl + "/v1/unread_message_count?address=" + props.address, {
12428
12481
  method: "get"
12429
12482
  }).then(payload => {
@@ -12431,7 +12484,21 @@ function DmButton(props) {
12431
12484
  }).then(data => {
12432
12485
  setNumberOfNotifications(data);
12433
12486
  });
12434
- }, [props.address]); // Checks validity of signature
12487
+ }, [props.address]);
12488
+ useEffect(() => {
12489
+ if (["", undefined, null].includes(wagmiAddress)) return;
12490
+ fetch(mainUrl + "/v1/unread_message_count?address=" + wagmiAddress, {
12491
+ method: "get"
12492
+ }).then(payload => {
12493
+ return payload.json();
12494
+ }).then(data => {
12495
+ if (data > 0) {
12496
+ setInboxNotEmpty(true);
12497
+ } else {
12498
+ setInboxNotEmpty(false);
12499
+ }
12500
+ });
12501
+ }, [wagmiAddress]); // Checks validity of signature
12435
12502
 
12436
12503
  async function checkSignature(tempAddress = wagmiAddress, signature = "0x") {
12437
12504
  const signatureUrl = `${mainUrl}/v1/authenticate?address=${tempAddress}&signature=${signature}&source=${window.location.hostname}`;
@@ -12507,15 +12574,16 @@ function DmButton(props) {
12507
12574
  if (!!wagmiAddress && !!popoverAnchor) {
12508
12575
  getAccessToken();
12509
12576
  }
12510
- }, [popoverAnchor, wagmiAddress]); // useEffect to fetch conversations if user is same as props.address
12577
+ }, [popoverAnchor, wagmiAddress]); // useEffect to fetch conversations if user has authenticated
12511
12578
 
12512
12579
  useEffect(() => {
12513
- if (props.address === wagmiAddress && authenticated) {
12580
+ if (authenticated) {
12514
12581
  getConversations();
12515
12582
  }
12516
12583
  }, [props.address, wagmiAddress, authenticated]);
12517
12584
 
12518
12585
  async function sendClick() {
12586
+ if (messageText === "") return;
12519
12587
  const tempAccessToken = await getAccessToken();
12520
12588
  const payload = {
12521
12589
  address: props.address,
@@ -12547,7 +12615,7 @@ function DmButton(props) {
12547
12615
  _t.success("Message sent!");
12548
12616
  setNumberOfNotifications(num => num + 1);
12549
12617
  setMessageText("");
12550
- setPopoverAnchor(null);
12618
+ setMessageSentScreen(true);
12551
12619
  });
12552
12620
  }
12553
12621
 
@@ -12570,10 +12638,16 @@ function DmButton(props) {
12570
12638
  className: "universal_button__icon",
12571
12639
  icon: "ant-design:message-outlined"
12572
12640
  })]
12573
- }), /*#__PURE__*/jsx("span", {
12641
+ }), popoverAnchor !== null && authenticated === false ? /*#__PURE__*/jsx("span", {
12574
12642
  className: "universal_button__text",
12575
- children: popoverAnchor !== null && authenticated === false ? "Waiting for Signature" : wagmiAddress === props.address ? "Recent Messages" : displayText
12576
- })]
12643
+ children: "Waiting for Signature"
12644
+ }) : wagmiAddress === props.address ? /*#__PURE__*/jsx("span", {
12645
+ className: "universal_button__text",
12646
+ children: "Recent Messages"
12647
+ }) : displayText !== "" ? /*#__PURE__*/jsx("span", {
12648
+ className: "universal_button__text",
12649
+ children: displayText
12650
+ }) : ""]
12577
12651
  }), /*#__PURE__*/jsx(Popover$1, {
12578
12652
  anchorEl: popoverAnchor,
12579
12653
  anchorOrigin: {
@@ -12592,40 +12666,26 @@ function DmButton(props) {
12592
12666
  vertical: props.popoverDirection === "bottom" ? "top" : "bottom",
12593
12667
  horizontal: "center"
12594
12668
  },
12595
- children: /*#__PURE__*/jsx("div", {
12669
+ children: /*#__PURE__*/jsxs("div", {
12596
12670
  className: props.theme === "dark" ? "universal_button_popover__container universal_button_popover__container___dark" : "universal_button_popover__container",
12597
- children: wagmiAddress === props.address ? /*#__PURE__*/jsxs(Fragment$1, {
12671
+ children: [(wagmiAddress === props.address || showRecentMessages) && !messageSentScreen && /*#__PURE__*/jsxs(Fragment$1, {
12598
12672
  children: [/*#__PURE__*/jsxs("div", {
12599
- className: "universal_button_popover__content",
12673
+ className: "universal_dm__content universal_dm__top",
12600
12674
  children: [/*#__PURE__*/jsx("span", {
12601
- className: "message_title",
12675
+ className: "universal_dm__title",
12602
12676
  children: " Recent Messages "
12603
- }), /*#__PURE__*/jsx("a", {
12604
- href: "https://nftychat.xyz",
12605
- rel: "noopener noreferrer",
12606
- target: "_blank",
12607
- styel: {
12608
- textDecoration: 'none'
12609
- },
12610
- children: /*#__PURE__*/jsxs("div", {
12611
- className: "universal_button_popover__subtitle",
12612
- children: [/*#__PURE__*/jsx("span", {
12613
- className: "universal_button_popover__link_text",
12614
- children: "View All"
12615
- }), /*#__PURE__*/jsx("img", {
12616
- src: logo,
12617
- alt: "Logo",
12618
- style: {
12619
- width: 24,
12620
- height: 24
12621
- }
12622
- })]
12623
- })
12677
+ }), /*#__PURE__*/jsx(InboxButton, {
12678
+ showRecentMessages: showRecentMessages,
12679
+ setShowRecentMessages: setShowRecentMessages,
12680
+ inboxNotEmpty: inboxNotEmpty
12624
12681
  })]
12625
12682
  }), /*#__PURE__*/jsx("div", {
12626
- className: "message_separator"
12683
+ className: "universal_dm__content",
12684
+ children: /*#__PURE__*/jsx("div", {
12685
+ className: "message_separator"
12686
+ })
12627
12687
  }), /*#__PURE__*/jsx("div", {
12628
- className: "universal_button_popover__messages",
12688
+ className: "universal_dm__messages",
12629
12689
  children: conversations.map(conversation => /*#__PURE__*/jsxs("div", {
12630
12690
  className: "message__container",
12631
12691
  onClick: () => {
@@ -12633,7 +12693,7 @@ function DmButton(props) {
12633
12693
  },
12634
12694
  children: [/*#__PURE__*/jsx("div", {
12635
12695
  className: "hover_text",
12636
- children: " View on nftychat"
12696
+ children: " View on nftychat.xyz"
12637
12697
  }), /*#__PURE__*/jsxs("div", {
12638
12698
  className: "message_text__container",
12639
12699
  children: [/*#__PURE__*/jsxs("span", {
@@ -12648,49 +12708,110 @@ function DmButton(props) {
12648
12708
  children: conversation.unread_message_count
12649
12709
  })]
12650
12710
  }, conversation.conversation_id))
12711
+ }), /*#__PURE__*/jsxs("div", {
12712
+ className: "universal_dm__content universal_dm__bottom_2",
12713
+ children: [/*#__PURE__*/jsxs("span", {
12714
+ className: "universal_dm__user_text",
12715
+ children: ["Connected: ", userName]
12716
+ }), /*#__PURE__*/jsxs("a", {
12717
+ href: "https://nftychat.xyz",
12718
+ rel: "noopener noreferrer",
12719
+ target: "_blank",
12720
+ className: "universal_dm__nfty_link",
12721
+ children: [" ", "View all", /*#__PURE__*/jsx(Icon, {
12722
+ className: "universal_dm__link_arrow",
12723
+ icon: "bi:arrow-right"
12724
+ })]
12725
+ })]
12651
12726
  })]
12652
- }) : /*#__PURE__*/jsxs(Fragment$1, {
12653
- children: [/*#__PURE__*/jsx("div", {
12654
- className: "universal_button_popover__content_top",
12727
+ }), wagmiAddress !== props.address && !showRecentMessages && !messageSentScreen && /*#__PURE__*/jsxs(Fragment$1, {
12728
+ children: [/*#__PURE__*/jsxs("div", {
12729
+ className: "universal_dm__content universal_dm__top",
12730
+ children: [/*#__PURE__*/jsxs("span", {
12731
+ className: "universal_dm__title",
12732
+ children: [" Message ", displayName, " "]
12733
+ }), /*#__PURE__*/jsx(InboxButton, {
12734
+ showRecentMessages: showRecentMessages,
12735
+ setShowRecentMessages: setShowRecentMessages
12736
+ })]
12737
+ }), /*#__PURE__*/jsx("div", {
12738
+ className: "universal_dm__content",
12739
+ children: /*#__PURE__*/jsx("div", {
12740
+ className: "message_separator"
12741
+ })
12742
+ }), /*#__PURE__*/jsx("div", {
12743
+ className: "universal_dm__content",
12655
12744
  children: /*#__PURE__*/jsx("textarea", {
12656
- className: "universal_button_popover__textarea",
12745
+ className: "universal_dm__textarea",
12657
12746
  spellCheck: false,
12658
12747
  value: messageText,
12659
12748
  onChange: e => setMessageText(e.target.value)
12660
12749
  })
12661
12750
  }), /*#__PURE__*/jsxs("div", {
12662
- className: "universal_button_popover__content_bottom",
12663
- children: [/*#__PURE__*/jsx("a", {
12664
- href: "https://nftychat.xyz",
12665
- rel: "noopener noreferrer",
12666
- target: "_blank",
12667
- style: {
12668
- textDecoration: 'none'
12669
- },
12670
- children: /*#__PURE__*/jsxs("div", {
12671
- className: "universal_button_popover__content_left",
12672
- children: [/*#__PURE__*/jsx("img", {
12673
- src: logo,
12674
- alt: "Logo",
12675
- style: {
12676
- width: 24,
12677
- height: 24
12678
- }
12679
- }), /*#__PURE__*/jsx("span", {
12680
- className: "universal_button_popover__user_text",
12681
- children: "Sent via nftychat"
12682
- })]
12683
- })
12751
+ className: "universal_dm__content universal_dm__bottom_1",
12752
+ children: [/*#__PURE__*/jsxs("span", {
12753
+ className: "universal_dm__user_text",
12754
+ children: ["Connected: ", userName]
12684
12755
  }), /*#__PURE__*/jsx("button", {
12685
- className: "universal_button_popover__send",
12756
+ className: "universal_dm__send",
12686
12757
  onClick: sendClick,
12687
12758
  children: /*#__PURE__*/jsx(Icon, {
12688
- className: "universal_button_popover__send_icon",
12689
- icon: "ant-design:send-outlined"
12759
+ className: "universal_dm__send_icon",
12760
+ icon: "fluent:send-24-filled"
12690
12761
  })
12691
12762
  })]
12692
12763
  })]
12693
- })
12764
+ }), messageSentScreen && /*#__PURE__*/jsx(Fragment$1, {
12765
+ children: /*#__PURE__*/jsxs("div", {
12766
+ className: "universal_dm__message_sent",
12767
+ children: [/*#__PURE__*/jsx("img", {
12768
+ className: "universal_dm__message_sent__image",
12769
+ src: bestagonSuccessImg,
12770
+ alt: "successIcon"
12771
+ }), /*#__PURE__*/jsxs("div", {
12772
+ className: "universal_dm__message_sent__text",
12773
+ children: [/*#__PURE__*/jsxs("span", {
12774
+ className: "universal_dm__message_sent__title",
12775
+ children: ["Message sent to ", displayName]
12776
+ }), /*#__PURE__*/jsx("span", {
12777
+ className: "universal_dm__message_sent__subtitle",
12778
+ children: "Send another message or view recent messages"
12779
+ })]
12780
+ }), /*#__PURE__*/jsxs("div", {
12781
+ className: "universal_dm__message_sent__button_group",
12782
+ children: [/*#__PURE__*/jsxs("button", {
12783
+ className: "universal_dm__message_sent__button",
12784
+ onClick: () => {
12785
+ setMessageSentScreen(false);
12786
+ setShowRecentMessages(false);
12787
+ },
12788
+ children: [/*#__PURE__*/jsx(Icon, {
12789
+ className: "universal_dm__message_sent__button_icon",
12790
+ icon: "ant-design:message-outlined"
12791
+ }), "Send Message"]
12792
+ }), /*#__PURE__*/jsxs("button", {
12793
+ className: "universal_dm__message_sent__button",
12794
+ onClick: () => {
12795
+ setMessageSentScreen(false);
12796
+ setShowRecentMessages(true);
12797
+ },
12798
+ children: [/*#__PURE__*/jsx(Icon, {
12799
+ className: "universal_dm__message_sent__button_icon",
12800
+ icon: "bi:inbox"
12801
+ }), "View Messages"]
12802
+ })]
12803
+ })]
12804
+ })
12805
+ }), /*#__PURE__*/jsx("div", {
12806
+ className: "universal_dm__bottom_border",
12807
+ children: /*#__PURE__*/jsx("a", {
12808
+ href: "https://nftychat.xyz",
12809
+ rel: "noopener noreferrer",
12810
+ target: "_blank",
12811
+ className: "universal_dm__bottom_border__text",
12812
+ children: "\u26A1\uFE0F by nftychat"
12813
+ })
12814
+ })]
12694
12815
  })
12695
12816
  }), /*#__PURE__*/jsx(Modal$1, {
12696
12817
  "aria-labelledby": "wallet_popover",
@@ -12714,7 +12835,7 @@ function DmButton(props) {
12714
12835
 
12715
12836
  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}}
12716
12837
 
12717
- 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";
12838
+ 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 --background: #fff;\n --primary-text: #19191A;\n --secondary-text: #606166;\n --bottom-border: #f3f3f3;\n --main-gray: #dedede;\n --button-hover: #ccc;\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 --background: #0f0f0f;\n --primary-text: #fff;\n --secondary-text: #ccc;\n --bottom-border: #2c2c27;\n --main-gray: #2c2c2f;\n --button-hover: #4f4f55;\n}\n\n.universal_button {\n position: relative;\n}\n\n.universal_button__button {\n align-items: center;\n background-color: var(--background);\n border-radius: 9999px;\n border: 1px solid var(--main-gray);\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(--primary-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(--button-hover);\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.universal_dm__inbox_badge{\n align-items: center;\n background-color: #fa2449;\n border-radius: 9999px;\n color: white;\n display: flex;\n justify-content: center;\n position: absolute;\n right: 20px;\n top: 12px;\n height: 8px;\n width: 8px;\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(--background);\n display: flex;\n flex-direction: column;\n width: 384px;\n}\n\n.universal_dm__textarea {\n background-color: var(--background);\n border-radius: 6px;\n border: 1px solid var(--main-gray);\n color: var(--primary-text);\n font-family: Inter, sans-serif;\n font-size: 1rem;\n margin-bottom: 8px;\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_dm__textarea:focus {\n border-color: var(--button-hover);\n}\n\n.universal_dm__title{\n font-family: 'Noto Sans';\n font-size: 18px;\n font-weight: 600;\n text-align: left;\n color: var(--primary-text)\n}\n\n/* recent messages */\n.universal_dm__messages {\n display: flex;\n justify-content: space-between;\n margin: 0px 16px 8px 16px;\n flex-direction: column;\n}\n\n.message__container{\n margin-bottom: 8px; \n align-items: center;\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 text-align: left;\n color: var(--primary-text)\n}\n.message_text{\n font-family: Inter;\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n min-height: 24px;\n letter-spacing: 0em;\n text-align: left;\n color: var(--secondary-text);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: clip;\n}\n.message_separator {\n width: 100%;\n border: 1px solid var(--main-gray);\n height: 0px;\n margin-bottom: 12px;\n} \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(--primary-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(3px);\n -moz-filter: blur(3px);\n -ms-filter: blur(3px);\n -o-filter: blur(3px);\n filter: blur(3px);\n}\n.message__container:hover .hover_text {\n -webkit-opacity: 1;\n opacity: 1;\n}\n\n.universal_dm__content {\n padding: 0px 16px;\n align-items: center;\n display: flex;\n justify-content: space-between;\n}\n\n.universal_dm__top {\n margin-bottom: 8px;\n margin-top: 10px;\n}\n\n.universal_dm__bottom_1 {\n margin-bottom: 20px;\n}\n.universal_dm__bottom_2 {\n margin-bottom: 16px;\n}\n\n\n.universal_button_popover__content {\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_dm__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_dm__user_text {\n text-decoration: none;\n color: var(--secondary-text);\n font-family: Inter, sans-serif;\n font-size: 13px;\n}\n\n.universal_dm__nfty_link {\n text-decoration: none;\n color: var(--primary-text);\n font-family: Inter, sans-serif;\n font-size: 13px;\n display: flex;\n align-items: center;\n}\n\n.universal_dm__link_arrow{\n margin-left: 4px\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/* inbox button */\n.universal_dm__inbox {\n align-items: center;\n background-color: transparent;\n border-radius: 9999px;\n border: none;\n color: var(--primary-text);\n cursor: pointer;\n display: flex;\n justify-content: center;\n transition: color 200ms, background-color 200ms;\n width: 32px;\n}\n.universal_dm__inbox__selected{\n background-color: var(--main-gray); \n}\n.universal_dm__inbox:hover {\n background-color: var(--button-hover); \n}\n\n.universal_dm__inbox_icon {\n height: 100%;\n width: 100%;\n}\n\n/* Send button */\n.universal_dm__send {\n align-items: center;\n background-color: transparent;\n border-radius: 9999px;\n border: none;\n color: var(--primary-text);\n cursor: pointer;\n display: flex;\n height: 24px;\n width: 24px;\n justify-content: center;\n padding: 3px 1px 3px 3px;\n transition: color 200ms, background-color 200ms;\n background-color: var(--main-gray);\n}\n\n.universal_dm__send:hover {\n background-color: var(--button-hover);\n}\n\n.universal_dm__send_icon {\n height: 100%;\n width: 100%;\n}\n.universal_dm__bottom_border {\n background-color: var(--bottom-border);\n padding:8px;\n align-items: center;\n justify-content: center;\n display: flex;\n}\n.universal_dm__bottom_border__text {\n color: var(--primary-text);\n text-decoration: none;\n font-size: 13px;\n}\n\n/* Message sent screen */\n.universal_dm__message_sent {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n\n.universal_dm__message_sent__image{\n margin-top: 24px;\n margin-bottom: 18px;\n}\n\n.universal_dm__message_sent__text {\n margin-bottom: 32px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n}\n.universal_dm__message_sent__title {\n color: var(--primary-text);\n font-weight: 700;\n font-size: 16px;\n margin-bottom: 8px;\n}\n.universal_dm__message_sent__subtitle {\n color: var(--primary-text);\n font-weight: 400;\n font-size: 13px;\n}\n\n.universal_dm__message_sent__button_group{\n display: flex;\n align-items: center;\n justify-content:space-between;\n margin: 0px 16px 24px 16px;\n width: calc(100% - 32px);\n}\n.universal_dm__message_sent__button{\n padding: 10px 22px;\n padding-top: 10px;\n color: var(--primary-text);\n background-color: var(--main-gray);\n border: none;\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: left;\n cursor: pointer;\n}\n.universal_dm__message_sent__button:hover{\n background-color: var(--button-hover);\n }\n .universal_dm__message_sent__button_icon{\n height: 20px;\n width: 20px;\n margin-right: 6px;\n}\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(--background);\n border-radius: 14px;\n border: 1px solid var(--main-gray);\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";
12718
12839
  n(css,{});
12719
12840
 
12720
12841
  const infuraId = "806586b223e14b3eb1e6e4285bf8240e";
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/nftychat/nftychat-universe"
6
6
  },
7
- "version": "1.3.9",
7
+ "version": "1.4.0",
8
8
  "license": "MIT",
9
9
  "description": "nftychat plugins for your website",
10
10
  "author": "nftychat",
Binary file