@loafmarkets/ui 0.1.355 → 0.1.357
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.d.mts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +9 -211
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -211
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4566,6 +4566,11 @@ var PriceChart = React5.forwardRef(
|
|
|
4566
4566
|
);
|
|
4567
4567
|
PriceChart.displayName = "PriceChart";
|
|
4568
4568
|
var formatPrice3 = (value, currencySymbol) => {
|
|
4569
|
+
const abs = Math.abs(value);
|
|
4570
|
+
if (abs >= 1e6) {
|
|
4571
|
+
const unit = abs >= 1e12 ? { v: 1e12, s: "T" } : abs >= 1e9 ? { v: 1e9, s: "B" } : { v: 1e6, s: "M" };
|
|
4572
|
+
return `${currencySymbol}${(value / unit.v).toFixed(1)}${unit.s}`;
|
|
4573
|
+
}
|
|
4569
4574
|
return `${currencySymbol}${value.toLocaleString(void 0, {
|
|
4570
4575
|
minimumFractionDigits: 0,
|
|
4571
4576
|
maximumFractionDigits: 2
|
|
@@ -9007,15 +9012,12 @@ function PropertyOverview({
|
|
|
9007
9012
|
contractAddress,
|
|
9008
9013
|
chain = "Base (Ethereum L2)",
|
|
9009
9014
|
volume24h,
|
|
9010
|
-
openOrdersValue,
|
|
9011
|
-
holderCount,
|
|
9012
9015
|
priceHistory: priceHistoryProp,
|
|
9013
9016
|
beta = false,
|
|
9014
9017
|
marketHours
|
|
9015
9018
|
}) {
|
|
9016
9019
|
const [isDescExpanded, setDescExpanded] = useState(false);
|
|
9017
9020
|
const [showDividendHistory, setShowDividendHistory] = useState(false);
|
|
9018
|
-
const [showHolders, setShowHolders] = useState(false);
|
|
9019
9021
|
const [copiedAddress, setCopiedAddress] = useState(false);
|
|
9020
9022
|
const [statsTab, setStatsTab] = useState("token");
|
|
9021
9023
|
const description = descriptionProp ?? overviewData?.description ?? DEFAULT_DESCRIPTION;
|
|
@@ -9053,7 +9055,7 @@ function PropertyOverview({
|
|
|
9053
9055
|
] });
|
|
9054
9056
|
const tokenDetailsItems = [
|
|
9055
9057
|
{ label: "Chain", value: chainValue },
|
|
9056
|
-
{ label: "On-Chain Address", value: contractAddress ? truncateAddress(contractAddress) : "\u2014", mono: true, link: contractAddress ? `https://basescan.org/address/${contractAddress}` : void 0, copyValue: contractAddress },
|
|
9058
|
+
{ label: "On-Chain Address", value: contractAddress ? truncateAddress(contractAddress) : "\u2014", mono: true, link: contractAddress ? `https://sepolia.basescan.org/address/${contractAddress}` : void 0, copyValue: contractAddress },
|
|
9057
9059
|
{ label: "Token Ticker", value: ticker ?? "\u2014" },
|
|
9058
9060
|
{ label: "Total Circulating Tokens", value: isLoading && resolvedTokensIssued == null ? loadingSkeleton : resolvedTokensIssued?.toLocaleString() ?? "\u2014" },
|
|
9059
9061
|
{ label: "Legal Structuring", value: "See Documents", docLink: true },
|
|
@@ -9069,9 +9071,7 @@ function PropertyOverview({
|
|
|
9069
9071
|
const tokenStats = [
|
|
9070
9072
|
{ label: "Token Price", value: isLoading && tokenPriceValue == null ? loadingSkeleton : tokenPriceValue ? `$${tokenPriceValue.toFixed(2)}` : "\u2014", gold: true },
|
|
9071
9073
|
{ label: "24h Volume", value: isLoading && vol24hDollar == null ? loadingSkeleton : vol24hDollar != null && vol24hDollar > 0 ? fmtDollar(vol24hDollar) : "\u2014" },
|
|
9072
|
-
{ label: "Dividend Yield", value: isLoading && currentDividendYield == null ? loadingSkeleton : currentDividendYield ? `${currentDividendYield}%` : "\u2014" }
|
|
9073
|
-
{ label: "Open Orders", value: isLoading && openOrdersValue == null ? loadingSkeleton : openOrdersValue != null && openOrdersValue > 0 ? fmtDollar(openOrdersValue) : "\u2014" },
|
|
9074
|
-
{ label: "Holders", value: isLoading && holderCount == null ? loadingSkeleton : holderCount != null ? holderCount.toLocaleString() : "\u2014" }
|
|
9074
|
+
{ label: "Dividend Yield", value: isLoading && currentDividendYield == null ? loadingSkeleton : currentDividendYield ? `${currentDividendYield}%` : "\u2014" }
|
|
9075
9075
|
];
|
|
9076
9076
|
const growthPct = overviewData?.growth5Yr;
|
|
9077
9077
|
const propertyStats = [
|
|
@@ -9138,7 +9138,7 @@ function PropertyOverview({
|
|
|
9138
9138
|
/* @__PURE__ */ jsx(StatsRowLabel, { children: "Token Performance" }),
|
|
9139
9139
|
/* @__PURE__ */ jsx(StatsHRow, { children: tokenStats.map((item) => /* @__PURE__ */ jsxs(StatsHCell, { children: [
|
|
9140
9140
|
/* @__PURE__ */ jsx(StatsHCellLabel, { children: item.label }),
|
|
9141
|
-
|
|
9141
|
+
/* @__PURE__ */ jsx(StatsHCellValue, { $gold: !!item.gold, children: item.value })
|
|
9142
9142
|
] }, item.label)) })
|
|
9143
9143
|
] }),
|
|
9144
9144
|
/* @__PURE__ */ jsxs(StatsRowSection, { children: [
|
|
@@ -9157,7 +9157,7 @@ function PropertyOverview({
|
|
|
9157
9157
|
] }),
|
|
9158
9158
|
statsTab === "token" && /* @__PURE__ */ jsx(StatsTabContent, { children: tokenStats.map((item) => /* @__PURE__ */ jsxs(StatRow, { $gold: !!item.gold, children: [
|
|
9159
9159
|
/* @__PURE__ */ jsx(StatLabel, { children: item.label }),
|
|
9160
|
-
|
|
9160
|
+
/* @__PURE__ */ jsx(StatValue, { $gold: !!item.gold, children: item.value })
|
|
9161
9161
|
] }, item.label)) }),
|
|
9162
9162
|
statsTab === "property" && /* @__PURE__ */ jsxs(StatsTabContent, { children: [
|
|
9163
9163
|
propertyStats.map((item) => /* @__PURE__ */ jsxs(StatRow, { children: [
|
|
@@ -9179,14 +9179,6 @@ function PropertyOverview({
|
|
|
9179
9179
|
onClose: () => setShowDividendHistory(false)
|
|
9180
9180
|
}
|
|
9181
9181
|
),
|
|
9182
|
-
showHolders && /* @__PURE__ */ jsx(
|
|
9183
|
-
HoldersPopup,
|
|
9184
|
-
{
|
|
9185
|
-
contractAddress,
|
|
9186
|
-
ticker,
|
|
9187
|
-
onClose: () => setShowHolders(false)
|
|
9188
|
-
}
|
|
9189
|
-
),
|
|
9190
9182
|
/* @__PURE__ */ jsxs(Section, { children: [
|
|
9191
9183
|
/* @__PURE__ */ jsx(SectionHeader, { children: "The Asset" }),
|
|
9192
9184
|
galleryImages.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -9243,14 +9235,6 @@ function PropertyOverview({
|
|
|
9243
9235
|
/* @__PURE__ */ jsx(StatLabel, { children: "Suburb Median" }),
|
|
9244
9236
|
/* @__PURE__ */ jsx(StatValue, { children: overviewData?.suburbMedian != null ? fmtDollar(overviewData.suburbMedian) : "\u2014" })
|
|
9245
9237
|
] }),
|
|
9246
|
-
/* @__PURE__ */ jsxs(StatRow, { children: [
|
|
9247
|
-
/* @__PURE__ */ jsx(StatLabel, { children: "5yr Property Growth" }),
|
|
9248
|
-
/* @__PURE__ */ jsx(StatValue, { style: growthPct != null && growthPct > 0 ? { color: "#4ade80" } : void 0, children: growthPct != null ? `${growthPct > 0 ? "+" : ""}${growthPct}%` : "\u2014" })
|
|
9249
|
-
] }),
|
|
9250
|
-
/* @__PURE__ */ jsxs(StatRow, { children: [
|
|
9251
|
-
/* @__PURE__ */ jsx(StatLabel, { children: "Current Dividend" }),
|
|
9252
|
-
/* @__PURE__ */ jsx(StatValue, { children: overviewData?.lastDividend != null ? `$${overviewData.lastDividend.toFixed(2)} / share / mo` : "\u2014" })
|
|
9253
|
-
] }),
|
|
9254
9238
|
propertyHistory.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9255
9239
|
/* @__PURE__ */ jsx(StatsColumnHeader, { style: { marginTop: "1.25rem" }, children: "Capital History" }),
|
|
9256
9240
|
/* @__PURE__ */ jsx(TimelineWrap, { children: propertyHistory.map((h, i) => {
|
|
@@ -9475,65 +9459,6 @@ function DividendHistoryPopup({
|
|
|
9475
9459
|
] }) })
|
|
9476
9460
|
] }) });
|
|
9477
9461
|
}
|
|
9478
|
-
var MOCK_HOLDERS = [
|
|
9479
|
-
{ rank: 1, address: "0xA1b2...9F3e", label: "Loaf Treasury", tokens: 12500, pct: 25 },
|
|
9480
|
-
{ rank: 2, address: "0xC4d5...1A7b", label: null, tokens: 6200, pct: 12.4 },
|
|
9481
|
-
{ rank: 3, address: "0xE8f9...3C2d", label: null, tokens: 4800, pct: 9.6 },
|
|
9482
|
-
{ rank: 4, address: "0x2B3c...7D4e", label: "Market Maker", tokens: 3500, pct: 7 },
|
|
9483
|
-
{ rank: 5, address: "0x5F6a...8E1c", label: null, tokens: 2900, pct: 5.8 },
|
|
9484
|
-
{ rank: 6, address: "0x7A8b...0F2d", label: null, tokens: 2400, pct: 4.8 },
|
|
9485
|
-
{ rank: 7, address: "0x9C0d...4A3e", label: null, tokens: 1800, pct: 3.6 },
|
|
9486
|
-
{ rank: 8, address: "0xB1e2...6C5f", label: null, tokens: 1500, pct: 3 },
|
|
9487
|
-
{ rank: 9, address: "0xD3f4...8E7a", label: null, tokens: 1200, pct: 2.4 },
|
|
9488
|
-
{ rank: 10, address: "0xF5a6...2B9c", label: null, tokens: 950, pct: 1.9 }
|
|
9489
|
-
];
|
|
9490
|
-
function HoldersPopup({
|
|
9491
|
-
contractAddress,
|
|
9492
|
-
ticker,
|
|
9493
|
-
onClose
|
|
9494
|
-
}) {
|
|
9495
|
-
useEffect(() => {
|
|
9496
|
-
const handleEsc = (e) => {
|
|
9497
|
-
if (e.key === "Escape") onClose();
|
|
9498
|
-
};
|
|
9499
|
-
window.addEventListener("keydown", handleEsc);
|
|
9500
|
-
return () => window.removeEventListener("keydown", handleEsc);
|
|
9501
|
-
}, [onClose]);
|
|
9502
|
-
const basescanUrl = contractAddress ? `https://basescan.org/token/${contractAddress}#balances` : "https://basescan.org";
|
|
9503
|
-
return /* @__PURE__ */ jsx(DivPopupOverlay, { onClick: onClose, children: /* @__PURE__ */ jsxs(HoldersPanel, { onClick: (e) => e.stopPropagation(), children: [
|
|
9504
|
-
/* @__PURE__ */ jsxs(DivPopupHeader, { children: [
|
|
9505
|
-
/* @__PURE__ */ jsxs(DivPopupTitle, { children: [
|
|
9506
|
-
"Top Holders",
|
|
9507
|
-
ticker ? ` (${ticker})` : ""
|
|
9508
|
-
] }),
|
|
9509
|
-
/* @__PURE__ */ jsxs(HoldersHeaderRight, { children: [
|
|
9510
|
-
/* @__PURE__ */ jsx(HoldersBasescanLink, { href: basescanUrl, target: "_blank", rel: "noopener noreferrer", children: "View on BaseScan\xA0\u2197" }),
|
|
9511
|
-
/* @__PURE__ */ jsx(DivPopupClose, { onClick: onClose, "aria-label": "Close holders", children: "\u2715" })
|
|
9512
|
-
] })
|
|
9513
|
-
] }),
|
|
9514
|
-
/* @__PURE__ */ jsxs(HoldersTableWrap, { children: [
|
|
9515
|
-
/* @__PURE__ */ jsxs(HoldersTableHeader, { children: [
|
|
9516
|
-
/* @__PURE__ */ jsx(HoldersColRank, { children: "#" }),
|
|
9517
|
-
/* @__PURE__ */ jsx(HoldersColAddr, { children: "Address" }),
|
|
9518
|
-
/* @__PURE__ */ jsx(HoldersColTokens, { children: "Tokens" }),
|
|
9519
|
-
/* @__PURE__ */ jsx(HoldersColPct, { children: "%" })
|
|
9520
|
-
] }),
|
|
9521
|
-
MOCK_HOLDERS.map((h) => /* @__PURE__ */ jsxs(HoldersTableRow, { children: [
|
|
9522
|
-
/* @__PURE__ */ jsx(HoldersColRank, { children: h.rank }),
|
|
9523
|
-
/* @__PURE__ */ jsxs(HoldersColAddr, { children: [
|
|
9524
|
-
/* @__PURE__ */ jsx(HolderAddrLink, { href: `https://basescan.org/address/${h.address.replace("...", "")}`, target: "_blank", rel: "noopener noreferrer", children: h.address }),
|
|
9525
|
-
h.label && /* @__PURE__ */ jsx(HolderLabel, { children: h.label })
|
|
9526
|
-
] }),
|
|
9527
|
-
/* @__PURE__ */ jsx(HoldersColTokens, { children: h.tokens.toLocaleString() }),
|
|
9528
|
-
/* @__PURE__ */ jsxs(HoldersColPct, { children: [
|
|
9529
|
-
h.pct.toFixed(1),
|
|
9530
|
-
"%"
|
|
9531
|
-
] })
|
|
9532
|
-
] }, h.rank))
|
|
9533
|
-
] }),
|
|
9534
|
-
/* @__PURE__ */ jsx(HoldersFooter, { children: /* @__PURE__ */ jsx(HoldersFullListBtn, { href: basescanUrl, target: "_blank", rel: "noopener noreferrer", children: "See Full List of Holders\xA0\u2197" }) })
|
|
9535
|
-
] }) });
|
|
9536
|
-
}
|
|
9537
9462
|
var Wrapper = styled9.div`
|
|
9538
9463
|
display: flex;
|
|
9539
9464
|
flex-direction: column;
|
|
@@ -10143,133 +10068,6 @@ var DivTableTD = styled9.td`
|
|
|
10143
10068
|
font-size: 0.82rem;
|
|
10144
10069
|
color: rgba(255,255,255,0.75);
|
|
10145
10070
|
`;
|
|
10146
|
-
var HoldersPanel = styled9.div`
|
|
10147
|
-
background: #111;
|
|
10148
|
-
border: 1px solid rgba(255,255,255,0.08);
|
|
10149
|
-
border-radius: 14px;
|
|
10150
|
-
width: 90%;
|
|
10151
|
-
max-width: 520px;
|
|
10152
|
-
max-height: 85vh;
|
|
10153
|
-
overflow-y: auto;
|
|
10154
|
-
display: flex;
|
|
10155
|
-
flex-direction: column;
|
|
10156
|
-
`;
|
|
10157
|
-
var HoldersHeaderRight = styled9.div`
|
|
10158
|
-
display: flex;
|
|
10159
|
-
align-items: center;
|
|
10160
|
-
gap: 1rem;
|
|
10161
|
-
`;
|
|
10162
|
-
var HoldersBasescanLink = styled9.a`
|
|
10163
|
-
font-size: 0.75rem;
|
|
10164
|
-
color: rgba(255,255,255,0.4);
|
|
10165
|
-
text-decoration: none;
|
|
10166
|
-
transition: color 0.15s;
|
|
10167
|
-
&:hover { color: rgba(212,175,55,0.9); }
|
|
10168
|
-
`;
|
|
10169
|
-
var HoldersTableWrap = styled9.div`
|
|
10170
|
-
padding: 0 1.5rem;
|
|
10171
|
-
`;
|
|
10172
|
-
var HoldersTableHeader = styled9.div`
|
|
10173
|
-
display: flex;
|
|
10174
|
-
align-items: center;
|
|
10175
|
-
padding: 0.6rem 0;
|
|
10176
|
-
border-bottom: 1px solid rgba(255,255,255,0.08);
|
|
10177
|
-
font-size: 0.65rem;
|
|
10178
|
-
font-weight: 500;
|
|
10179
|
-
color: rgba(255,255,255,0.4);
|
|
10180
|
-
text-transform: uppercase;
|
|
10181
|
-
letter-spacing: 0.06em;
|
|
10182
|
-
`;
|
|
10183
|
-
var HoldersTableRow = styled9.div`
|
|
10184
|
-
display: flex;
|
|
10185
|
-
align-items: center;
|
|
10186
|
-
padding: 0.6rem 0;
|
|
10187
|
-
border-bottom: 1px solid rgba(255,255,255,0.03);
|
|
10188
|
-
font-size: 0.82rem;
|
|
10189
|
-
color: rgba(255,255,255,0.75);
|
|
10190
|
-
border-radius: 6px;
|
|
10191
|
-
transition: background 0.15s;
|
|
10192
|
-
&:hover { background: rgba(255,255,255,0.03); }
|
|
10193
|
-
&:last-child { border-bottom: none; }
|
|
10194
|
-
`;
|
|
10195
|
-
var HoldersColRank = styled9.span`
|
|
10196
|
-
width: 32px;
|
|
10197
|
-
flex-shrink: 0;
|
|
10198
|
-
color: rgba(255,255,255,0.35);
|
|
10199
|
-
font-size: 0.75rem;
|
|
10200
|
-
`;
|
|
10201
|
-
var HoldersColAddr = styled9.span`
|
|
10202
|
-
flex: 1;
|
|
10203
|
-
min-width: 0;
|
|
10204
|
-
display: flex;
|
|
10205
|
-
align-items: center;
|
|
10206
|
-
gap: 0.5rem;
|
|
10207
|
-
`;
|
|
10208
|
-
var HolderAddrLink = styled9.a`
|
|
10209
|
-
font-family: monospace;
|
|
10210
|
-
font-size: 0.8rem;
|
|
10211
|
-
color: rgba(255,255,255,0.7);
|
|
10212
|
-
text-decoration: none;
|
|
10213
|
-
&:hover { color: rgba(212,175,55,0.9); }
|
|
10214
|
-
`;
|
|
10215
|
-
var HolderLabel = styled9.span`
|
|
10216
|
-
font-size: 0.68rem;
|
|
10217
|
-
color: rgba(212,175,55,0.7);
|
|
10218
|
-
background: rgba(212,175,55,0.08);
|
|
10219
|
-
padding: 1px 6px;
|
|
10220
|
-
border-radius: 4px;
|
|
10221
|
-
white-space: nowrap;
|
|
10222
|
-
`;
|
|
10223
|
-
var HoldersColTokens = styled9.span`
|
|
10224
|
-
width: 90px;
|
|
10225
|
-
text-align: right;
|
|
10226
|
-
flex-shrink: 0;
|
|
10227
|
-
font-variant-numeric: tabular-nums;
|
|
10228
|
-
`;
|
|
10229
|
-
var HoldersColPct = styled9.span`
|
|
10230
|
-
width: 55px;
|
|
10231
|
-
text-align: right;
|
|
10232
|
-
flex-shrink: 0;
|
|
10233
|
-
font-variant-numeric: tabular-nums;
|
|
10234
|
-
color: rgba(255,255,255,0.5);
|
|
10235
|
-
`;
|
|
10236
|
-
var HoldersFooter = styled9.div`
|
|
10237
|
-
padding: 1rem 1.5rem 1.25rem;
|
|
10238
|
-
display: flex;
|
|
10239
|
-
justify-content: center;
|
|
10240
|
-
`;
|
|
10241
|
-
var HoldersFullListBtn = styled9.a`
|
|
10242
|
-
display: inline-flex;
|
|
10243
|
-
align-items: center;
|
|
10244
|
-
padding: 0.55rem 1.5rem;
|
|
10245
|
-
border: 1px solid rgba(255,255,255,0.1);
|
|
10246
|
-
border-radius: 8px;
|
|
10247
|
-
background: rgba(255,255,255,0.03);
|
|
10248
|
-
color: rgba(255,255,255,0.6);
|
|
10249
|
-
font-size: 0.78rem;
|
|
10250
|
-
font-weight: 500;
|
|
10251
|
-
text-decoration: none;
|
|
10252
|
-
transition: border-color 0.15s, color 0.15s, background 0.15s;
|
|
10253
|
-
&:hover {
|
|
10254
|
-
border-color: rgba(212,175,55,0.4);
|
|
10255
|
-
color: rgba(212,175,55,0.9);
|
|
10256
|
-
background: rgba(212,175,55,0.05);
|
|
10257
|
-
}
|
|
10258
|
-
`;
|
|
10259
|
-
var StatValueClickable = styled9.span`
|
|
10260
|
-
font-size: 0.88rem;
|
|
10261
|
-
font-weight: 500;
|
|
10262
|
-
color: #fff;
|
|
10263
|
-
cursor: pointer;
|
|
10264
|
-
text-decoration: underline;
|
|
10265
|
-
text-underline-offset: 3px;
|
|
10266
|
-
text-decoration-color: rgba(255,255,255,0.15);
|
|
10267
|
-
transition: color 0.15s, text-decoration-color 0.15s;
|
|
10268
|
-
&:hover {
|
|
10269
|
-
color: rgba(212,175,55,0.9);
|
|
10270
|
-
text-decoration-color: rgba(212,175,55,0.5);
|
|
10271
|
-
}
|
|
10272
|
-
`;
|
|
10273
10071
|
var STATUS_BG = {
|
|
10274
10072
|
active: "rgba(14,203,129,0.18)",
|
|
10275
10073
|
rejected: "rgba(246,70,93,0.18)",
|