@loafmarkets/ui 0.1.208 → 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;
@@ -8601,46 +8602,30 @@ function PropertyOverview({
8601
8602
  /* @__PURE__ */ jsx(PrimaryBtn, { onClick: onTradeClick, children: tradeButtonLabel })
8602
8603
  ] })
8603
8604
  ] }),
8604
- /* @__PURE__ */ jsxs(AboutRight, { children: [
8605
- /* @__PURE__ */ jsxs(TokenDetailsCard, { children: [
8606
- /* @__PURE__ */ jsx(TokenDetailsTitle, { children: "Token Details" }),
8607
- tokenDetailsItems.map((item) => /* @__PURE__ */ jsxs(TokenDetailRow, { children: [
8608
- /* @__PURE__ */ jsx(TokenDetailLabel, { children: item.label }),
8609
- /* @__PURE__ */ jsxs(TokenDetailValue, { $mono: !!item.mono, children: [
8610
- item.link ? /* @__PURE__ */ jsx("a", { href: item.link, target: "_blank", rel: "noopener noreferrer", style: { color: "#3380FF", textDecoration: "none" }, children: item.value }) : item.value,
8611
- item.copyValue && /* @__PURE__ */ jsx(
8612
- CopyBtn,
8613
- {
8614
- onClick: () => {
8615
- navigator.clipboard.writeText(item.copyValue);
8616
- setCopiedAddress(true);
8617
- setTimeout(() => setCopiedAddress(false), 1500);
8618
- },
8619
- title: copiedAddress ? "Copied!" : "Copy address",
8620
- children: copiedAddress ? /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) }) : /* @__PURE__ */ jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
8621
- /* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
8622
- /* @__PURE__ */ jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
8623
- ] })
8624
- }
8625
- )
8626
- ] })
8627
- ] }, item.label))
8628
- ] }),
8629
- /* @__PURE__ */ jsx(TrustBadgesCard, { children: /* @__PURE__ */ jsxs(TrustBadgesRow, { children: [
8630
- /* @__PURE__ */ jsxs(TrustBadge, { children: [
8631
- /* @__PURE__ */ jsx(TrustBadgeLogoWrap, { children: /* @__PURE__ */ jsx("img", { src: "/Baker_McKenzie.png", alt: "Baker McKenzie", style: { height: 38, filter: "grayscale(1) brightness(10)", opacity: 0.5 } }) }),
8632
- /* @__PURE__ */ jsx(TrustBadgeLabel, { children: "Legal Structuring" })
8633
- ] }),
8634
- /* @__PURE__ */ jsxs(TrustBadge, { children: [
8635
- /* @__PURE__ */ jsx(TrustBadgeLogoWrap, { children: /* @__PURE__ */ jsx("img", { src: "/NSW_registry.png", alt: "NSW Land Registry", style: { height: 40, filter: "grayscale(1) brightness(10)", opacity: 0.5 } }) }),
8636
- /* @__PURE__ */ jsx(TrustBadgeLabel, { children: "Land Title" })
8637
- ] }),
8638
- /* @__PURE__ */ jsxs(TrustBadge, { children: [
8639
- /* @__PURE__ */ jsx(TrustBadgeLogoWrap, { children: /* @__PURE__ */ jsx("img", { src: "/savills.png", alt: "Savills", style: { height: 38, borderRadius: 3, filter: "grayscale(1) brightness(1.2) contrast(1.6)", opacity: 0.7 } }) }),
8640
- /* @__PURE__ */ jsx(TrustBadgeLabel, { children: "Valuation" })
8605
+ /* @__PURE__ */ jsx(AboutRight, { children: /* @__PURE__ */ jsxs(TokenDetailsCard, { children: [
8606
+ /* @__PURE__ */ jsx(TokenDetailsTitle, { children: "Token Details" }),
8607
+ tokenDetailsItems.map((item) => /* @__PURE__ */ jsxs(TokenDetailRow, { children: [
8608
+ /* @__PURE__ */ jsx(TokenDetailLabel, { children: item.label }),
8609
+ /* @__PURE__ */ jsxs(TokenDetailValue, { $mono: !!item.mono, children: [
8610
+ item.link ? /* @__PURE__ */ jsx("a", { href: item.link, target: "_blank", rel: "noopener noreferrer", style: { color: "#3380FF", textDecoration: "none" }, children: item.value }) : item.value,
8611
+ item.copyValue && /* @__PURE__ */ jsx(
8612
+ CopyBtn,
8613
+ {
8614
+ onClick: () => {
8615
+ navigator.clipboard.writeText(item.copyValue);
8616
+ setCopiedAddress(true);
8617
+ setTimeout(() => setCopiedAddress(false), 1500);
8618
+ },
8619
+ title: copiedAddress ? "Copied!" : "Copy address",
8620
+ children: copiedAddress ? /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx("path", { d: "M20 6L9 17l-5-5" }) }) : /* @__PURE__ */ jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
8621
+ /* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
8622
+ /* @__PURE__ */ jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
8623
+ ] })
8624
+ }
8625
+ )
8641
8626
  ] })
8642
- ] }) })
8643
- ] })
8627
+ ] }, item.label))
8628
+ ] }) })
8644
8629
  ] })
8645
8630
  ] }),
8646
8631
  /* @__PURE__ */ jsxs(Section, { children: [
@@ -8650,7 +8635,7 @@ function PropertyOverview({
8650
8635
  /* @__PURE__ */ jsx(StatsColumnHeader, { children: "Token Performance" }),
8651
8636
  tokenStats.map((item) => /* @__PURE__ */ jsxs(StatRow, { $gold: !!item.gold, children: [
8652
8637
  /* @__PURE__ */ jsx(StatLabel, { children: item.label }),
8653
- /* @__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 })
8654
8639
  ] }, item.label)),
8655
8640
  holdRatio && /* @__PURE__ */ jsxs(HoldRatioWrap, { children: [
8656
8641
  /* @__PURE__ */ jsxs(HoldRatioTitle, { children: [
@@ -8697,6 +8682,14 @@ function PropertyOverview({
8697
8682
  onClose: () => setShowDividendHistory(false)
8698
8683
  }
8699
8684
  ),
8685
+ showHolders && /* @__PURE__ */ jsx(
8686
+ HoldersPopup,
8687
+ {
8688
+ contractAddress,
8689
+ ticker,
8690
+ onClose: () => setShowHolders(false)
8691
+ }
8692
+ ),
8700
8693
  galleryImages.length > 0 && /* @__PURE__ */ jsx(GalleryBreakout, { children: /* @__PURE__ */ jsx(
8701
8694
  GalleryMapSection,
8702
8695
  {
@@ -9082,6 +9075,65 @@ function DividendHistoryPopup({
9082
9075
  ] }) })
9083
9076
  ] }) });
9084
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
+ }
9085
9137
  var Wrapper = styled9.div`
9086
9138
  display: flex;
9087
9139
  flex-direction: column;
@@ -9217,7 +9269,7 @@ var TokenDetailValue = styled9.span`
9217
9269
  font-weight: 500;
9218
9270
  font-family: ${(p) => p.$mono ? "'SF Mono', 'Fira Code', monospace" : "inherit"};
9219
9271
  `;
9220
- var TrustBadgesCard = styled9.div`
9272
+ styled9.div`
9221
9273
  background: rgba(255,255,255,0.025);
9222
9274
  border: 1px solid rgba(255,255,255,0.06);
9223
9275
  border-radius: 10px;
@@ -9231,12 +9283,12 @@ styled9.div`
9231
9283
  font-weight: 500;
9232
9284
  margin-bottom: 0.85rem;
9233
9285
  `;
9234
- var TrustBadgesRow = styled9.div`
9286
+ styled9.div`
9235
9287
  display: flex;
9236
9288
  gap: 0.5rem;
9237
9289
  justify-content: space-between;
9238
9290
  `;
9239
- var TrustBadge = styled9.div`
9291
+ styled9.div`
9240
9292
  display: flex;
9241
9293
  flex-direction: column;
9242
9294
  align-items: center;
@@ -9244,13 +9296,13 @@ var TrustBadge = styled9.div`
9244
9296
  flex: 1;
9245
9297
  min-width: 0;
9246
9298
  `;
9247
- var TrustBadgeLogoWrap = styled9.div`
9299
+ styled9.div`
9248
9300
  display: flex;
9249
9301
  align-items: center;
9250
9302
  justify-content: center;
9251
9303
  height: 44px;
9252
9304
  `;
9253
- var TrustBadgeLabel = styled9.span`
9305
+ styled9.span`
9254
9306
  font-size: 0.62rem;
9255
9307
  color: rgba(255,255,255,0.35);
9256
9308
  font-weight: 400;
@@ -9866,6 +9918,133 @@ var DivTableTD = styled9.td`
9866
9918
  font-size: 0.82rem;
9867
9919
  color: rgba(255,255,255,0.75);
9868
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
+ `;
9869
10048
  var STATUS_BG = {
9870
10049
  active: "rgba(14,203,129,0.18)",
9871
10050
  rejected: "rgba(246,70,93,0.18)",