@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.js +196 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +196 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8523,6 +8523,7 @@ function PropertyOverview({
|
|
|
8523
8523
|
}) {
|
|
8524
8524
|
const [isDescExpanded, setDescExpanded] = React5.useState(false);
|
|
8525
8525
|
const [showDividendHistory, setShowDividendHistory] = React5.useState(false);
|
|
8526
|
+
const [showHolders, setShowHolders] = React5.useState(false);
|
|
8526
8527
|
const [copiedAddress, setCopiedAddress] = React5.useState(false);
|
|
8527
8528
|
const description = descriptionProp ?? overviewData?.description ?? DEFAULT_DESCRIPTION;
|
|
8528
8529
|
const landSize = landProp ?? overviewData?.landSizeSqm ?? null;
|
|
@@ -8660,7 +8661,7 @@ function PropertyOverview({
|
|
|
8660
8661
|
/* @__PURE__ */ jsxRuntime.jsx(StatsColumnHeader, { children: "Token Performance" }),
|
|
8661
8662
|
tokenStats.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(StatRow, { $gold: !!item.gold, children: [
|
|
8662
8663
|
/* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: item.label }),
|
|
8663
|
-
/* @__PURE__ */ jsxRuntime.jsx(StatValue, { $gold: !!item.gold, children: item.value })
|
|
8664
|
+
item.label === "Holders" && holderCount != null ? /* @__PURE__ */ jsxRuntime.jsx(StatValueClickable, { onClick: () => setShowHolders(true), children: item.value }) : /* @__PURE__ */ jsxRuntime.jsx(StatValue, { $gold: !!item.gold, children: item.value })
|
|
8664
8665
|
] }, item.label)),
|
|
8665
8666
|
holdRatio && /* @__PURE__ */ jsxRuntime.jsxs(HoldRatioWrap, { children: [
|
|
8666
8667
|
/* @__PURE__ */ jsxRuntime.jsxs(HoldRatioTitle, { children: [
|
|
@@ -8707,6 +8708,14 @@ function PropertyOverview({
|
|
|
8707
8708
|
onClose: () => setShowDividendHistory(false)
|
|
8708
8709
|
}
|
|
8709
8710
|
),
|
|
8711
|
+
showHolders && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8712
|
+
HoldersPopup,
|
|
8713
|
+
{
|
|
8714
|
+
contractAddress,
|
|
8715
|
+
ticker,
|
|
8716
|
+
onClose: () => setShowHolders(false)
|
|
8717
|
+
}
|
|
8718
|
+
),
|
|
8710
8719
|
galleryImages.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(GalleryBreakout, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8711
8720
|
GalleryMapSection,
|
|
8712
8721
|
{
|
|
@@ -9092,6 +9101,65 @@ function DividendHistoryPopup({
|
|
|
9092
9101
|
] }) })
|
|
9093
9102
|
] }) });
|
|
9094
9103
|
}
|
|
9104
|
+
var MOCK_HOLDERS = [
|
|
9105
|
+
{ rank: 1, address: "0xA1b2...9F3e", label: "Loaf Treasury", tokens: 12500, pct: 25 },
|
|
9106
|
+
{ rank: 2, address: "0xC4d5...1A7b", label: null, tokens: 6200, pct: 12.4 },
|
|
9107
|
+
{ rank: 3, address: "0xE8f9...3C2d", label: null, tokens: 4800, pct: 9.6 },
|
|
9108
|
+
{ rank: 4, address: "0x2B3c...7D4e", label: "Market Maker", tokens: 3500, pct: 7 },
|
|
9109
|
+
{ rank: 5, address: "0x5F6a...8E1c", label: null, tokens: 2900, pct: 5.8 },
|
|
9110
|
+
{ rank: 6, address: "0x7A8b...0F2d", label: null, tokens: 2400, pct: 4.8 },
|
|
9111
|
+
{ rank: 7, address: "0x9C0d...4A3e", label: null, tokens: 1800, pct: 3.6 },
|
|
9112
|
+
{ rank: 8, address: "0xB1e2...6C5f", label: null, tokens: 1500, pct: 3 },
|
|
9113
|
+
{ rank: 9, address: "0xD3f4...8E7a", label: null, tokens: 1200, pct: 2.4 },
|
|
9114
|
+
{ rank: 10, address: "0xF5a6...2B9c", label: null, tokens: 950, pct: 1.9 }
|
|
9115
|
+
];
|
|
9116
|
+
function HoldersPopup({
|
|
9117
|
+
contractAddress,
|
|
9118
|
+
ticker,
|
|
9119
|
+
onClose
|
|
9120
|
+
}) {
|
|
9121
|
+
React5.useEffect(() => {
|
|
9122
|
+
const handleEsc = (e) => {
|
|
9123
|
+
if (e.key === "Escape") onClose();
|
|
9124
|
+
};
|
|
9125
|
+
window.addEventListener("keydown", handleEsc);
|
|
9126
|
+
return () => window.removeEventListener("keydown", handleEsc);
|
|
9127
|
+
}, [onClose]);
|
|
9128
|
+
const basescanUrl = contractAddress ? `https://basescan.org/token/${contractAddress}#balances` : "https://basescan.org";
|
|
9129
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DivPopupOverlay, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(HoldersPanel, { onClick: (e) => e.stopPropagation(), children: [
|
|
9130
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DivPopupHeader, { children: [
|
|
9131
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DivPopupTitle, { children: [
|
|
9132
|
+
"Top Holders",
|
|
9133
|
+
ticker ? ` (${ticker})` : ""
|
|
9134
|
+
] }),
|
|
9135
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HoldersHeaderRight, { children: [
|
|
9136
|
+
/* @__PURE__ */ jsxRuntime.jsx(HoldersBasescanLink, { href: basescanUrl, target: "_blank", rel: "noopener noreferrer", children: "View on BaseScan\xA0\u2197" }),
|
|
9137
|
+
/* @__PURE__ */ jsxRuntime.jsx(DivPopupClose, { onClick: onClose, "aria-label": "Close holders", children: "\u2715" })
|
|
9138
|
+
] })
|
|
9139
|
+
] }),
|
|
9140
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HoldersTableWrap, { children: [
|
|
9141
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HoldersTableHeader, { children: [
|
|
9142
|
+
/* @__PURE__ */ jsxRuntime.jsx(HoldersColRank, { children: "#" }),
|
|
9143
|
+
/* @__PURE__ */ jsxRuntime.jsx(HoldersColAddr, { children: "Address" }),
|
|
9144
|
+
/* @__PURE__ */ jsxRuntime.jsx(HoldersColTokens, { children: "Tokens" }),
|
|
9145
|
+
/* @__PURE__ */ jsxRuntime.jsx(HoldersColPct, { children: "%" })
|
|
9146
|
+
] }),
|
|
9147
|
+
MOCK_HOLDERS.map((h) => /* @__PURE__ */ jsxRuntime.jsxs(HoldersTableRow, { children: [
|
|
9148
|
+
/* @__PURE__ */ jsxRuntime.jsx(HoldersColRank, { children: h.rank }),
|
|
9149
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HoldersColAddr, { children: [
|
|
9150
|
+
/* @__PURE__ */ jsxRuntime.jsx(HolderAddrLink, { href: `https://basescan.org/address/${h.address.replace("...", "")}`, target: "_blank", rel: "noopener noreferrer", children: h.address }),
|
|
9151
|
+
h.label && /* @__PURE__ */ jsxRuntime.jsx(HolderLabel, { children: h.label })
|
|
9152
|
+
] }),
|
|
9153
|
+
/* @__PURE__ */ jsxRuntime.jsx(HoldersColTokens, { children: h.tokens.toLocaleString() }),
|
|
9154
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HoldersColPct, { children: [
|
|
9155
|
+
h.pct.toFixed(1),
|
|
9156
|
+
"%"
|
|
9157
|
+
] })
|
|
9158
|
+
] }, h.rank))
|
|
9159
|
+
] }),
|
|
9160
|
+
/* @__PURE__ */ jsxRuntime.jsx(HoldersFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(HoldersFullListBtn, { href: basescanUrl, target: "_blank", rel: "noopener noreferrer", children: "See Full List of Holders\xA0\u2197" }) })
|
|
9161
|
+
] }) });
|
|
9162
|
+
}
|
|
9095
9163
|
var Wrapper = styled9__default.default.div`
|
|
9096
9164
|
display: flex;
|
|
9097
9165
|
flex-direction: column;
|
|
@@ -9876,6 +9944,133 @@ var DivTableTD = styled9__default.default.td`
|
|
|
9876
9944
|
font-size: 0.82rem;
|
|
9877
9945
|
color: rgba(255,255,255,0.75);
|
|
9878
9946
|
`;
|
|
9947
|
+
var HoldersPanel = styled9__default.default.div`
|
|
9948
|
+
background: #111;
|
|
9949
|
+
border: 1px solid rgba(255,255,255,0.08);
|
|
9950
|
+
border-radius: 14px;
|
|
9951
|
+
width: 90%;
|
|
9952
|
+
max-width: 520px;
|
|
9953
|
+
max-height: 85vh;
|
|
9954
|
+
overflow-y: auto;
|
|
9955
|
+
display: flex;
|
|
9956
|
+
flex-direction: column;
|
|
9957
|
+
`;
|
|
9958
|
+
var HoldersHeaderRight = styled9__default.default.div`
|
|
9959
|
+
display: flex;
|
|
9960
|
+
align-items: center;
|
|
9961
|
+
gap: 1rem;
|
|
9962
|
+
`;
|
|
9963
|
+
var HoldersBasescanLink = styled9__default.default.a`
|
|
9964
|
+
font-size: 0.75rem;
|
|
9965
|
+
color: rgba(255,255,255,0.4);
|
|
9966
|
+
text-decoration: none;
|
|
9967
|
+
transition: color 0.15s;
|
|
9968
|
+
&:hover { color: rgba(212,175,55,0.9); }
|
|
9969
|
+
`;
|
|
9970
|
+
var HoldersTableWrap = styled9__default.default.div`
|
|
9971
|
+
padding: 0 1.5rem;
|
|
9972
|
+
`;
|
|
9973
|
+
var HoldersTableHeader = styled9__default.default.div`
|
|
9974
|
+
display: flex;
|
|
9975
|
+
align-items: center;
|
|
9976
|
+
padding: 0.6rem 0;
|
|
9977
|
+
border-bottom: 1px solid rgba(255,255,255,0.08);
|
|
9978
|
+
font-size: 0.65rem;
|
|
9979
|
+
font-weight: 500;
|
|
9980
|
+
color: rgba(255,255,255,0.4);
|
|
9981
|
+
text-transform: uppercase;
|
|
9982
|
+
letter-spacing: 0.06em;
|
|
9983
|
+
`;
|
|
9984
|
+
var HoldersTableRow = styled9__default.default.div`
|
|
9985
|
+
display: flex;
|
|
9986
|
+
align-items: center;
|
|
9987
|
+
padding: 0.6rem 0;
|
|
9988
|
+
border-bottom: 1px solid rgba(255,255,255,0.03);
|
|
9989
|
+
font-size: 0.82rem;
|
|
9990
|
+
color: rgba(255,255,255,0.75);
|
|
9991
|
+
border-radius: 6px;
|
|
9992
|
+
transition: background 0.15s;
|
|
9993
|
+
&:hover { background: rgba(255,255,255,0.03); }
|
|
9994
|
+
&:last-child { border-bottom: none; }
|
|
9995
|
+
`;
|
|
9996
|
+
var HoldersColRank = styled9__default.default.span`
|
|
9997
|
+
width: 32px;
|
|
9998
|
+
flex-shrink: 0;
|
|
9999
|
+
color: rgba(255,255,255,0.35);
|
|
10000
|
+
font-size: 0.75rem;
|
|
10001
|
+
`;
|
|
10002
|
+
var HoldersColAddr = styled9__default.default.span`
|
|
10003
|
+
flex: 1;
|
|
10004
|
+
min-width: 0;
|
|
10005
|
+
display: flex;
|
|
10006
|
+
align-items: center;
|
|
10007
|
+
gap: 0.5rem;
|
|
10008
|
+
`;
|
|
10009
|
+
var HolderAddrLink = styled9__default.default.a`
|
|
10010
|
+
font-family: monospace;
|
|
10011
|
+
font-size: 0.8rem;
|
|
10012
|
+
color: rgba(255,255,255,0.7);
|
|
10013
|
+
text-decoration: none;
|
|
10014
|
+
&:hover { color: rgba(212,175,55,0.9); }
|
|
10015
|
+
`;
|
|
10016
|
+
var HolderLabel = styled9__default.default.span`
|
|
10017
|
+
font-size: 0.68rem;
|
|
10018
|
+
color: rgba(212,175,55,0.7);
|
|
10019
|
+
background: rgba(212,175,55,0.08);
|
|
10020
|
+
padding: 1px 6px;
|
|
10021
|
+
border-radius: 4px;
|
|
10022
|
+
white-space: nowrap;
|
|
10023
|
+
`;
|
|
10024
|
+
var HoldersColTokens = styled9__default.default.span`
|
|
10025
|
+
width: 90px;
|
|
10026
|
+
text-align: right;
|
|
10027
|
+
flex-shrink: 0;
|
|
10028
|
+
font-variant-numeric: tabular-nums;
|
|
10029
|
+
`;
|
|
10030
|
+
var HoldersColPct = styled9__default.default.span`
|
|
10031
|
+
width: 55px;
|
|
10032
|
+
text-align: right;
|
|
10033
|
+
flex-shrink: 0;
|
|
10034
|
+
font-variant-numeric: tabular-nums;
|
|
10035
|
+
color: rgba(255,255,255,0.5);
|
|
10036
|
+
`;
|
|
10037
|
+
var HoldersFooter = styled9__default.default.div`
|
|
10038
|
+
padding: 1rem 1.5rem 1.25rem;
|
|
10039
|
+
display: flex;
|
|
10040
|
+
justify-content: center;
|
|
10041
|
+
`;
|
|
10042
|
+
var HoldersFullListBtn = styled9__default.default.a`
|
|
10043
|
+
display: inline-flex;
|
|
10044
|
+
align-items: center;
|
|
10045
|
+
padding: 0.55rem 1.5rem;
|
|
10046
|
+
border: 1px solid rgba(255,255,255,0.1);
|
|
10047
|
+
border-radius: 8px;
|
|
10048
|
+
background: rgba(255,255,255,0.03);
|
|
10049
|
+
color: rgba(255,255,255,0.6);
|
|
10050
|
+
font-size: 0.78rem;
|
|
10051
|
+
font-weight: 500;
|
|
10052
|
+
text-decoration: none;
|
|
10053
|
+
transition: border-color 0.15s, color 0.15s, background 0.15s;
|
|
10054
|
+
&:hover {
|
|
10055
|
+
border-color: rgba(212,175,55,0.4);
|
|
10056
|
+
color: rgba(212,175,55,0.9);
|
|
10057
|
+
background: rgba(212,175,55,0.05);
|
|
10058
|
+
}
|
|
10059
|
+
`;
|
|
10060
|
+
var StatValueClickable = styled9__default.default.span`
|
|
10061
|
+
font-size: 0.88rem;
|
|
10062
|
+
font-weight: 600;
|
|
10063
|
+
color: #fff;
|
|
10064
|
+
cursor: pointer;
|
|
10065
|
+
text-decoration: underline;
|
|
10066
|
+
text-underline-offset: 3px;
|
|
10067
|
+
text-decoration-color: rgba(255,255,255,0.15);
|
|
10068
|
+
transition: color 0.15s, text-decoration-color 0.15s;
|
|
10069
|
+
&:hover {
|
|
10070
|
+
color: rgba(212,175,55,0.9);
|
|
10071
|
+
text-decoration-color: rgba(212,175,55,0.5);
|
|
10072
|
+
}
|
|
10073
|
+
`;
|
|
9879
10074
|
var STATUS_BG = {
|
|
9880
10075
|
active: "rgba(14,203,129,0.18)",
|
|
9881
10076
|
rejected: "rgba(246,70,93,0.18)",
|