@loafmarkets/ui 0.1.82 → 0.1.83

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
@@ -13758,7 +13758,7 @@ function PropertyValuation({
13758
13758
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.5rem" }, children: [
13759
13759
  /* @__PURE__ */ jsxRuntime.jsxs(PricingModelDetail, { children: [
13760
13760
  /* @__PURE__ */ jsxRuntime.jsx(PropertyDetailLabel, { children: "Last Price" }),
13761
- /* @__PURE__ */ jsxRuntime.jsx(PricingDetailValue, { children: formatCurrency6(lastPrice) })
13761
+ /* @__PURE__ */ jsxRuntime.jsx(PricingDetailValue, { children: formatCompact(lastPrice) })
13762
13762
  ] }),
13763
13763
  /* @__PURE__ */ jsxRuntime.jsxs(PricingModelDetail, { children: [
13764
13764
  /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", width: "100%" }, children: [
@@ -13769,11 +13769,11 @@ function PropertyValuation({
13769
13769
  ] })
13770
13770
  ] }),
13771
13771
  /* @__PURE__ */ jsxRuntime.jsxs(PricingDetailValue, { style: { color: "var(--color-accent)", fontWeight: "bold" }, children: [
13772
- formatCurrency6(fairValue),
13772
+ formatCompact(fairValue),
13773
13773
  " ",
13774
13774
  /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: "0.85em", fontWeight: "normal", opacity: 0.8 }, children: [
13775
13775
  "(",
13776
- formatMillions(fairValue * tokensOutstanding),
13776
+ formatCompact(fairValue * tokensOutstanding),
13777
13777
  ")"
13778
13778
  ] })
13779
13779
  ] })
@@ -13790,7 +13790,7 @@ function PropertyValuation({
13790
13790
  /* @__PURE__ */ jsxRuntime.jsx(GaugeIndicator, { type: "fairValue", position: 50 }),
13791
13791
  /* @__PURE__ */ jsxRuntime.jsxs(GaugePriceTag, { position: gaugePosition, children: [
13792
13792
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Last Price" }),
13793
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatCurrency6(lastPrice) })
13793
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatCompact(lastPrice) })
13794
13794
  ] }),
13795
13795
  /* @__PURE__ */ jsxRuntime.jsx(GaugeIndicator, { type: "lastPrice", position: gaugePosition })
13796
13796
  ] }),
@@ -13798,30 +13798,30 @@ function PropertyValuation({
13798
13798
  /* @__PURE__ */ jsxRuntime.jsx(ValuationItem, { children: /* @__PURE__ */ jsxRuntime.jsxs(ValuationValue, { style: { color: "#4CAF50" }, children: [
13799
13799
  /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
13800
13800
  "< ",
13801
- formatCurrency6(undervaluedThreshold)
13801
+ formatCompact(undervaluedThreshold)
13802
13802
  ] }),
13803
13803
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
13804
13804
  "(",
13805
- formatMillions(undervaluedThreshold * tokensOutstanding),
13805
+ formatCompact(undervaluedThreshold * tokensOutstanding),
13806
13806
  ")"
13807
13807
  ] })
13808
13808
  ] }) }),
13809
13809
  /* @__PURE__ */ jsxRuntime.jsx(ValuationItem, { children: /* @__PURE__ */ jsxRuntime.jsxs(ValuationValue, { style: { color: "var(--color-accent)" }, children: [
13810
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatCurrency6(fairValue) }),
13810
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: formatCompact(fairValue) }),
13811
13811
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
13812
13812
  "(",
13813
- formatMillions(fairValue * tokensOutstanding),
13813
+ formatCompact(fairValue * tokensOutstanding),
13814
13814
  ")"
13815
13815
  ] })
13816
13816
  ] }) }),
13817
13817
  /* @__PURE__ */ jsxRuntime.jsx(ValuationItem, { children: /* @__PURE__ */ jsxRuntime.jsxs(ValuationValue, { style: { color: "#F44336" }, children: [
13818
13818
  /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
13819
13819
  "> ",
13820
- formatCurrency6(overvaluedThreshold)
13820
+ formatCompact(overvaluedThreshold)
13821
13821
  ] }),
13822
13822
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
13823
13823
  "(",
13824
- formatMillions(overvaluedThreshold * tokensOutstanding),
13824
+ formatCompact(overvaluedThreshold * tokensOutstanding),
13825
13825
  ")"
13826
13826
  ] })
13827
13827
  ] }) })
@@ -14028,6 +14028,14 @@ function formatMillions(value) {
14028
14028
  }
14029
14029
  return `$${(value / 1e6).toFixed(2)}m`;
14030
14030
  }
14031
+ function formatCompact(value) {
14032
+ if (value == null || !Number.isFinite(value)) return "\u2014";
14033
+ const abs = Math.abs(value);
14034
+ if (abs >= 1e9) return `$${(value / 1e9).toFixed(2)}B`;
14035
+ if (abs >= 1e6) return `$${(value / 1e6).toFixed(2)}M`;
14036
+ if (abs >= 1e3) return `$${(value / 1e3).toFixed(1)}K`;
14037
+ return formatCurrency6(value);
14038
+ }
14031
14039
  function formatBedroomLabel(bedrooms) {
14032
14040
  if (!Number.isFinite(bedrooms)) return "\u2014";
14033
14041
  return `${bedrooms} Bed`;
@@ -14308,7 +14316,7 @@ var ValuationValue = styled25__default.default.div`
14308
14316
  font-size: 0.72rem;
14309
14317
 
14310
14318
  .valuation-amount-span {
14311
- font-size: 0.68rem !important;
14319
+ display: none;
14312
14320
  }
14313
14321
  }
14314
14322
  `;