@loafmarkets/ui 0.1.209 → 0.1.210

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.mjs CHANGED
@@ -8497,6 +8497,7 @@ function PropertyOverview({
8497
8497
  }) {
8498
8498
  const [isDescExpanded, setDescExpanded] = useState(false);
8499
8499
  const [showDividendHistory, setShowDividendHistory] = useState(false);
8500
+ const [showHolders, setShowHolders] = useState(false);
8500
8501
  const [copiedAddress, setCopiedAddress] = useState(false);
8501
8502
  const description = descriptionProp ?? overviewData?.description ?? DEFAULT_DESCRIPTION;
8502
8503
  const landSize = landProp ?? overviewData?.landSizeSqm ?? null;
@@ -8634,7 +8635,7 @@ function PropertyOverview({
8634
8635
  /* @__PURE__ */ jsx(StatsColumnHeader, { children: "Token Performance" }),
8635
8636
  tokenStats.map((item) => /* @__PURE__ */ jsxs(StatRow, { $gold: !!item.gold, children: [
8636
8637
  /* @__PURE__ */ jsx(StatLabel, { children: item.label }),
8637
- /* @__PURE__ */ jsx(StatValue, { $gold: !!item.gold, children: item.value })
8638
+ item.label === "Holders" && holderCount != null ? /* @__PURE__ */ jsx(StatValueClickable, { onClick: () => setShowHolders(true), children: item.value }) : /* @__PURE__ */ jsx(StatValue, { $gold: !!item.gold, children: item.value })
8638
8639
  ] }, item.label)),
8639
8640
  holdRatio && /* @__PURE__ */ jsxs(HoldRatioWrap, { children: [
8640
8641
  /* @__PURE__ */ jsxs(HoldRatioTitle, { children: [
@@ -8681,6 +8682,14 @@ function PropertyOverview({
8681
8682
  onClose: () => setShowDividendHistory(false)
8682
8683
  }
8683
8684
  ),
8685
+ showHolders && /* @__PURE__ */ jsx(
8686
+ HoldersPopup,
8687
+ {
8688
+ contractAddress,
8689
+ ticker,
8690
+ onClose: () => setShowHolders(false)
8691
+ }
8692
+ ),
8684
8693
  galleryImages.length > 0 && /* @__PURE__ */ jsx(GalleryBreakout, { children: /* @__PURE__ */ jsx(
8685
8694
  GalleryMapSection,
8686
8695
  {
@@ -9066,6 +9075,65 @@ function DividendHistoryPopup({
9066
9075
  ] }) })
9067
9076
  ] }) });
9068
9077
  }
9078
+ var MOCK_HOLDERS = [
9079
+ { rank: 1, address: "0xA1b2...9F3e", label: "Loaf Treasury", tokens: 12500, pct: 25 },
9080
+ { rank: 2, address: "0xC4d5...1A7b", label: null, tokens: 6200, pct: 12.4 },
9081
+ { rank: 3, address: "0xE8f9...3C2d", label: null, tokens: 4800, pct: 9.6 },
9082
+ { rank: 4, address: "0x2B3c...7D4e", label: "Market Maker", tokens: 3500, pct: 7 },
9083
+ { rank: 5, address: "0x5F6a...8E1c", label: null, tokens: 2900, pct: 5.8 },
9084
+ { rank: 6, address: "0x7A8b...0F2d", label: null, tokens: 2400, pct: 4.8 },
9085
+ { rank: 7, address: "0x9C0d...4A3e", label: null, tokens: 1800, pct: 3.6 },
9086
+ { rank: 8, address: "0xB1e2...6C5f", label: null, tokens: 1500, pct: 3 },
9087
+ { rank: 9, address: "0xD3f4...8E7a", label: null, tokens: 1200, pct: 2.4 },
9088
+ { rank: 10, address: "0xF5a6...2B9c", label: null, tokens: 950, pct: 1.9 }
9089
+ ];
9090
+ function HoldersPopup({
9091
+ contractAddress,
9092
+ ticker,
9093
+ onClose
9094
+ }) {
9095
+ useEffect(() => {
9096
+ const handleEsc = (e) => {
9097
+ if (e.key === "Escape") onClose();
9098
+ };
9099
+ window.addEventListener("keydown", handleEsc);
9100
+ return () => window.removeEventListener("keydown", handleEsc);
9101
+ }, [onClose]);
9102
+ const basescanUrl = contractAddress ? `https://basescan.org/token/${contractAddress}#balances` : "https://basescan.org";
9103
+ return /* @__PURE__ */ jsx(DivPopupOverlay, { onClick: onClose, children: /* @__PURE__ */ jsxs(HoldersPanel, { onClick: (e) => e.stopPropagation(), children: [
9104
+ /* @__PURE__ */ jsxs(DivPopupHeader, { children: [
9105
+ /* @__PURE__ */ jsxs(DivPopupTitle, { children: [
9106
+ "Top Holders",
9107
+ ticker ? ` (${ticker})` : ""
9108
+ ] }),
9109
+ /* @__PURE__ */ jsxs(HoldersHeaderRight, { children: [
9110
+ /* @__PURE__ */ jsx(HoldersBasescanLink, { href: basescanUrl, target: "_blank", rel: "noopener noreferrer", children: "View on BaseScan\xA0\u2197" }),
9111
+ /* @__PURE__ */ jsx(DivPopupClose, { onClick: onClose, "aria-label": "Close holders", children: "\u2715" })
9112
+ ] })
9113
+ ] }),
9114
+ /* @__PURE__ */ jsxs(HoldersTableWrap, { children: [
9115
+ /* @__PURE__ */ jsxs(HoldersTableHeader, { children: [
9116
+ /* @__PURE__ */ jsx(HoldersColRank, { children: "#" }),
9117
+ /* @__PURE__ */ jsx(HoldersColAddr, { children: "Address" }),
9118
+ /* @__PURE__ */ jsx(HoldersColTokens, { children: "Tokens" }),
9119
+ /* @__PURE__ */ jsx(HoldersColPct, { children: "%" })
9120
+ ] }),
9121
+ MOCK_HOLDERS.map((h) => /* @__PURE__ */ jsxs(HoldersTableRow, { children: [
9122
+ /* @__PURE__ */ jsx(HoldersColRank, { children: h.rank }),
9123
+ /* @__PURE__ */ jsxs(HoldersColAddr, { children: [
9124
+ /* @__PURE__ */ jsx(HolderAddrLink, { href: `https://basescan.org/address/${h.address.replace("...", "")}`, target: "_blank", rel: "noopener noreferrer", children: h.address }),
9125
+ h.label && /* @__PURE__ */ jsx(HolderLabel, { children: h.label })
9126
+ ] }),
9127
+ /* @__PURE__ */ jsx(HoldersColTokens, { children: h.tokens.toLocaleString() }),
9128
+ /* @__PURE__ */ jsxs(HoldersColPct, { children: [
9129
+ h.pct.toFixed(1),
9130
+ "%"
9131
+ ] })
9132
+ ] }, h.rank))
9133
+ ] }),
9134
+ /* @__PURE__ */ jsx(HoldersFooter, { children: /* @__PURE__ */ jsx(HoldersFullListBtn, { href: basescanUrl, target: "_blank", rel: "noopener noreferrer", children: "See Full List of Holders\xA0\u2197" }) })
9135
+ ] }) });
9136
+ }
9069
9137
  var Wrapper = styled9.div`
9070
9138
  display: flex;
9071
9139
  flex-direction: column;
@@ -9850,6 +9918,133 @@ var DivTableTD = styled9.td`
9850
9918
  font-size: 0.82rem;
9851
9919
  color: rgba(255,255,255,0.75);
9852
9920
  `;
9921
+ var HoldersPanel = styled9.div`
9922
+ background: #111;
9923
+ border: 1px solid rgba(255,255,255,0.08);
9924
+ border-radius: 14px;
9925
+ width: 90%;
9926
+ max-width: 520px;
9927
+ max-height: 85vh;
9928
+ overflow-y: auto;
9929
+ display: flex;
9930
+ flex-direction: column;
9931
+ `;
9932
+ var HoldersHeaderRight = styled9.div`
9933
+ display: flex;
9934
+ align-items: center;
9935
+ gap: 1rem;
9936
+ `;
9937
+ var HoldersBasescanLink = styled9.a`
9938
+ font-size: 0.75rem;
9939
+ color: rgba(255,255,255,0.4);
9940
+ text-decoration: none;
9941
+ transition: color 0.15s;
9942
+ &:hover { color: rgba(212,175,55,0.9); }
9943
+ `;
9944
+ var HoldersTableWrap = styled9.div`
9945
+ padding: 0 1.5rem;
9946
+ `;
9947
+ var HoldersTableHeader = styled9.div`
9948
+ display: flex;
9949
+ align-items: center;
9950
+ padding: 0.6rem 0;
9951
+ border-bottom: 1px solid rgba(255,255,255,0.08);
9952
+ font-size: 0.65rem;
9953
+ font-weight: 500;
9954
+ color: rgba(255,255,255,0.4);
9955
+ text-transform: uppercase;
9956
+ letter-spacing: 0.06em;
9957
+ `;
9958
+ var HoldersTableRow = styled9.div`
9959
+ display: flex;
9960
+ align-items: center;
9961
+ padding: 0.6rem 0;
9962
+ border-bottom: 1px solid rgba(255,255,255,0.03);
9963
+ font-size: 0.82rem;
9964
+ color: rgba(255,255,255,0.75);
9965
+ border-radius: 6px;
9966
+ transition: background 0.15s;
9967
+ &:hover { background: rgba(255,255,255,0.03); }
9968
+ &:last-child { border-bottom: none; }
9969
+ `;
9970
+ var HoldersColRank = styled9.span`
9971
+ width: 32px;
9972
+ flex-shrink: 0;
9973
+ color: rgba(255,255,255,0.35);
9974
+ font-size: 0.75rem;
9975
+ `;
9976
+ var HoldersColAddr = styled9.span`
9977
+ flex: 1;
9978
+ min-width: 0;
9979
+ display: flex;
9980
+ align-items: center;
9981
+ gap: 0.5rem;
9982
+ `;
9983
+ var HolderAddrLink = styled9.a`
9984
+ font-family: monospace;
9985
+ font-size: 0.8rem;
9986
+ color: rgba(255,255,255,0.7);
9987
+ text-decoration: none;
9988
+ &:hover { color: rgba(212,175,55,0.9); }
9989
+ `;
9990
+ var HolderLabel = styled9.span`
9991
+ font-size: 0.68rem;
9992
+ color: rgba(212,175,55,0.7);
9993
+ background: rgba(212,175,55,0.08);
9994
+ padding: 1px 6px;
9995
+ border-radius: 4px;
9996
+ white-space: nowrap;
9997
+ `;
9998
+ var HoldersColTokens = styled9.span`
9999
+ width: 90px;
10000
+ text-align: right;
10001
+ flex-shrink: 0;
10002
+ font-variant-numeric: tabular-nums;
10003
+ `;
10004
+ var HoldersColPct = styled9.span`
10005
+ width: 55px;
10006
+ text-align: right;
10007
+ flex-shrink: 0;
10008
+ font-variant-numeric: tabular-nums;
10009
+ color: rgba(255,255,255,0.5);
10010
+ `;
10011
+ var HoldersFooter = styled9.div`
10012
+ padding: 1rem 1.5rem 1.25rem;
10013
+ display: flex;
10014
+ justify-content: center;
10015
+ `;
10016
+ var HoldersFullListBtn = styled9.a`
10017
+ display: inline-flex;
10018
+ align-items: center;
10019
+ padding: 0.55rem 1.5rem;
10020
+ border: 1px solid rgba(255,255,255,0.1);
10021
+ border-radius: 8px;
10022
+ background: rgba(255,255,255,0.03);
10023
+ color: rgba(255,255,255,0.6);
10024
+ font-size: 0.78rem;
10025
+ font-weight: 500;
10026
+ text-decoration: none;
10027
+ transition: border-color 0.15s, color 0.15s, background 0.15s;
10028
+ &:hover {
10029
+ border-color: rgba(212,175,55,0.4);
10030
+ color: rgba(212,175,55,0.9);
10031
+ background: rgba(212,175,55,0.05);
10032
+ }
10033
+ `;
10034
+ var StatValueClickable = styled9.span`
10035
+ font-size: 0.88rem;
10036
+ font-weight: 600;
10037
+ color: #fff;
10038
+ cursor: pointer;
10039
+ text-decoration: underline;
10040
+ text-underline-offset: 3px;
10041
+ text-decoration-color: rgba(255,255,255,0.15);
10042
+ transition: color 0.15s, text-decoration-color 0.15s;
10043
+ &:hover {
10044
+ color: rgba(212,175,55,0.9);
10045
+ text-decoration-color: rgba(212,175,55,0.5);
10046
+ }
10047
+ `;
9853
10048
  var STATUS_BG = {
9854
10049
  active: "rgba(14,203,129,0.18)",
9855
10050
  rejected: "rgba(246,70,93,0.18)",