@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.mjs CHANGED
@@ -8559,21 +8559,26 @@ function PropertyOverview({
8559
8559
  const holdPct = Math.max(0, Math.min(100, (1 - turnover) * 100));
8560
8560
  return { holdPct, tradePct: +(100 - holdPct).toFixed(1) };
8561
8561
  })();
8562
+ const fmtDollar = (v) => {
8563
+ if (v >= 1e6) return `$${(v / 1e6).toFixed(2)}M`;
8564
+ if (v >= 1e3) return `$${Math.round(v).toLocaleString()}`;
8565
+ return `$${v.toFixed(2)}`;
8566
+ };
8562
8567
  const tokenStats = [
8563
- { label: "Token Price", value: isLoading && tokenPriceValue == null ? loadingSkeleton : tokenPriceValue ? `$${tokenPriceValue.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : "\u2014", gold: true },
8564
- { label: "24h Volume", value: isLoading && vol24hDollar == null ? loadingSkeleton : vol24hDollar != null && vol24hDollar > 0 ? `$${vol24hDollar.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : "\u2014" },
8565
- { label: "Current Dividend Yield", value: isLoading && currentDividendYield == null ? loadingSkeleton : currentDividendYield ? `${currentDividendYield}%` : "\u2014" },
8566
- { label: "Open Orders", value: isLoading && openOrdersValue == null ? loadingSkeleton : openOrdersValue != null && openOrdersValue > 0 ? `$${openOrdersValue.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : "\u2014" },
8567
- { label: "Token Holders", value: isLoading && holderCount == null ? loadingSkeleton : holderCount != null ? holderCount.toLocaleString() : "\u2014" }
8568
+ { label: "Token Price", value: isLoading && tokenPriceValue == null ? loadingSkeleton : tokenPriceValue ? `$${tokenPriceValue.toFixed(2)}` : "\u2014", gold: true },
8569
+ { label: "24h Volume", value: isLoading && vol24hDollar == null ? loadingSkeleton : vol24hDollar != null && vol24hDollar > 0 ? fmtDollar(vol24hDollar) : "\u2014" },
8570
+ { label: "Dividend Yield", value: isLoading && currentDividendYield == null ? loadingSkeleton : currentDividendYield ? `${currentDividendYield}%` : "\u2014" },
8571
+ { label: "Open Orders", value: isLoading && openOrdersValue == null ? loadingSkeleton : openOrdersValue != null && openOrdersValue > 0 ? fmtDollar(openOrdersValue) : "\u2014" },
8572
+ { label: "Holders", value: isLoading && holderCount == null ? loadingSkeleton : holderCount != null ? holderCount.toLocaleString() : "\u2014" }
8568
8573
  ];
8569
8574
  const annualDividend = resolvedValuation ? resolvedValuation * 0.02 : null;
8570
8575
  const monthlyDivPerShare = annualDividend && resolvedTokensIssued ? annualDividend / 12 / resolvedTokensIssued : null;
8571
8576
  const propertyStats = [
8572
- { label: "Property Value", value: isLoading && tokenMarketCap == null ? loadingSkeleton : tokenMarketCap ? tokenMarketCap >= 1e6 ? `$${(tokenMarketCap / 1e6).toFixed(1)}M` : `$${tokenMarketCap.toLocaleString()}` : "\u2014" },
8573
- { label: "Number of Offers", value: "3" },
8574
- { label: "Growth (Past 5 Years)", value: "+90%" },
8575
- { label: "Last Dividend", value: isLoading && monthlyDivPerShare == null ? loadingSkeleton : monthlyDivPerShare != null ? `${(monthlyDivPerShare * 100).toFixed(1)}c per Share` : "\u2014" },
8576
- { label: "Upcoming Dividend", value: (() => {
8577
+ { label: "Property Value", value: isLoading && tokenMarketCap == null ? loadingSkeleton : tokenMarketCap ? fmtDollar(tokenMarketCap) : "\u2014" },
8578
+ { label: "Offers", value: "3" },
8579
+ { label: "Growth (5yr)", value: "+90%" },
8580
+ { label: "Last Dividend", value: isLoading && monthlyDivPerShare == null ? loadingSkeleton : monthlyDivPerShare != null ? `$${monthlyDivPerShare.toFixed(2)}` : "\u2014" },
8581
+ { label: "Next Dividend", value: (() => {
8577
8582
  const now = /* @__PURE__ */ new Date();
8578
8583
  const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0);
8579
8584
  while (lastDay.getDay() === 0 || lastDay.getDay() === 6) lastDay.setDate(lastDay.getDate() - 1);
@@ -8614,7 +8619,7 @@ function PropertyOverview({
8614
8619
  /* @__PURE__ */ jsx(TrustBadgeLabel, { children: "Land Title" })
8615
8620
  ] }),
8616
8621
  /* @__PURE__ */ jsxs(TrustBadge, { children: [
8617
- /* @__PURE__ */ jsx(TrustBadgeLogoWrap, { children: /* @__PURE__ */ jsx("img", { src: "/savills.png", alt: "Savills", style: { height: 38, borderRadius: 3, filter: "grayscale(1) brightness(10)", opacity: 0.5 } }) }),
8622
+ /* @__PURE__ */ jsx(TrustBadgeLogoWrap, { children: /* @__PURE__ */ jsx("img", { src: "/savills.png", alt: "Savills", style: { height: 38, borderRadius: 3, opacity: 0.85 } }) }),
8618
8623
  /* @__PURE__ */ jsx(TrustBadgeLabel, { children: "Valuation" })
8619
8624
  ] })
8620
8625
  ] })