@loafmarkets/ui 0.1.190 → 0.1.192

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 CHANGED
@@ -8585,21 +8585,26 @@ function PropertyOverview({
8585
8585
  const holdPct = Math.max(0, Math.min(100, (1 - turnover) * 100));
8586
8586
  return { holdPct, tradePct: +(100 - holdPct).toFixed(1) };
8587
8587
  })();
8588
+ const fmtDollar = (v) => {
8589
+ if (v >= 1e6) return `$${(v / 1e6).toFixed(2)}M`;
8590
+ if (v >= 1e3) return `$${Math.round(v).toLocaleString()}`;
8591
+ return `$${v.toFixed(2)}`;
8592
+ };
8588
8593
  const tokenStats = [
8589
- { label: "Token Price", value: isLoading && tokenPriceValue == null ? loadingSkeleton : tokenPriceValue ? `$${tokenPriceValue.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : "\u2014", gold: true },
8590
- { label: "24h Volume", value: isLoading && vol24hDollar == null ? loadingSkeleton : vol24hDollar != null && vol24hDollar > 0 ? `$${vol24hDollar.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : "\u2014" },
8591
- { label: "Current Dividend Yield", value: isLoading && currentDividendYield == null ? loadingSkeleton : currentDividendYield ? `${currentDividendYield}%` : "\u2014" },
8592
- { label: "Open Orders", value: isLoading && openOrdersValue == null ? loadingSkeleton : openOrdersValue != null && openOrdersValue > 0 ? `$${openOrdersValue.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : "\u2014" },
8593
- { label: "Token Holders", value: isLoading && holderCount == null ? loadingSkeleton : holderCount != null ? holderCount.toLocaleString() : "\u2014" }
8594
+ { label: "Token Price", value: isLoading && tokenPriceValue == null ? loadingSkeleton : tokenPriceValue ? `$${tokenPriceValue.toFixed(2)}` : "\u2014", gold: true },
8595
+ { label: "24h Volume", value: isLoading && vol24hDollar == null ? loadingSkeleton : vol24hDollar != null && vol24hDollar > 0 ? fmtDollar(vol24hDollar) : "\u2014" },
8596
+ { label: "Dividend Yield", value: isLoading && currentDividendYield == null ? loadingSkeleton : currentDividendYield ? `${currentDividendYield}%` : "\u2014" },
8597
+ { label: "Open Orders", value: isLoading && openOrdersValue == null ? loadingSkeleton : openOrdersValue != null && openOrdersValue > 0 ? fmtDollar(openOrdersValue) : "\u2014" },
8598
+ { label: "Holders", value: isLoading && holderCount == null ? loadingSkeleton : holderCount != null ? holderCount.toLocaleString() : "\u2014" }
8594
8599
  ];
8595
8600
  const annualDividend = resolvedValuation ? resolvedValuation * 0.02 : null;
8596
8601
  const monthlyDivPerShare = annualDividend && resolvedTokensIssued ? annualDividend / 12 / resolvedTokensIssued : null;
8597
8602
  const propertyStats = [
8598
- { label: "Property Value", value: isLoading && tokenMarketCap == null ? loadingSkeleton : tokenMarketCap ? tokenMarketCap >= 1e6 ? `$${(tokenMarketCap / 1e6).toFixed(1)}M` : `$${tokenMarketCap.toLocaleString()}` : "\u2014" },
8599
- { label: "Number of Offers", value: "3" },
8600
- { label: "Growth (Past 5 Years)", value: "+90%" },
8601
- { label: "Last Dividend", value: isLoading && monthlyDivPerShare == null ? loadingSkeleton : monthlyDivPerShare != null ? `${(monthlyDivPerShare * 100).toFixed(1)}c per Share` : "\u2014" },
8602
- { label: "Upcoming Dividend", value: (() => {
8603
+ { label: "Property Value", value: isLoading && tokenMarketCap == null ? loadingSkeleton : tokenMarketCap ? fmtDollar(tokenMarketCap) : "\u2014" },
8604
+ { label: "Offers", value: "3" },
8605
+ { label: "Growth (5yr)", value: "+90%" },
8606
+ { label: "Last Dividend", value: isLoading && monthlyDivPerShare == null ? loadingSkeleton : monthlyDivPerShare != null ? `$${monthlyDivPerShare.toFixed(2)}` : "\u2014" },
8607
+ { label: "Next Dividend", value: (() => {
8603
8608
  const now = /* @__PURE__ */ new Date();
8604
8609
  const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0);
8605
8610
  while (lastDay.getDay() === 0 || lastDay.getDay() === 6) lastDay.setDate(lastDay.getDate() - 1);
@@ -8640,7 +8645,7 @@ function PropertyOverview({
8640
8645
  /* @__PURE__ */ jsxRuntime.jsx(TrustBadgeLabel, { children: "Land Title" })
8641
8646
  ] }),
8642
8647
  /* @__PURE__ */ jsxRuntime.jsxs(TrustBadge, { children: [
8643
- /* @__PURE__ */ jsxRuntime.jsx(TrustBadgeLogoWrap, { children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: "/savills.png", alt: "Savills", style: { height: 38, borderRadius: 3, filter: "grayscale(1) brightness(10)", opacity: 0.5 } }) }),
8648
+ /* @__PURE__ */ jsxRuntime.jsx(TrustBadgeLogoWrap, { children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: "/savills.png", alt: "Savills", style: { height: 38, borderRadius: 3, opacity: 0.85 } }) }),
8644
8649
  /* @__PURE__ */ jsxRuntime.jsx(TrustBadgeLabel, { children: "Valuation" })
8645
8650
  ] })
8646
8651
  ] })