@loafmarkets/ui 0.1.82 → 0.1.84

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
@@ -13732,7 +13732,7 @@ function PropertyValuation({
13732
13732
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.5rem" }, children: [
13733
13733
  /* @__PURE__ */ jsxs(PricingModelDetail, { children: [
13734
13734
  /* @__PURE__ */ jsx(PropertyDetailLabel, { children: "Last Price" }),
13735
- /* @__PURE__ */ jsx(PricingDetailValue, { children: formatCurrency6(lastPrice) })
13735
+ /* @__PURE__ */ jsx(PricingDetailValue, { children: formatCompact(lastPrice) })
13736
13736
  ] }),
13737
13737
  /* @__PURE__ */ jsxs(PricingModelDetail, { children: [
13738
13738
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", width: "100%" }, children: [
@@ -13743,11 +13743,11 @@ function PropertyValuation({
13743
13743
  ] })
13744
13744
  ] }),
13745
13745
  /* @__PURE__ */ jsxs(PricingDetailValue, { style: { color: "var(--color-accent)", fontWeight: "bold" }, children: [
13746
- formatCurrency6(fairValue),
13746
+ formatCompact(fairValue),
13747
13747
  " ",
13748
13748
  /* @__PURE__ */ jsxs("span", { style: { fontSize: "0.85em", fontWeight: "normal", opacity: 0.8 }, children: [
13749
13749
  "(",
13750
- formatMillions(fairValue * tokensOutstanding),
13750
+ formatCompact(fairValue * tokensOutstanding),
13751
13751
  ")"
13752
13752
  ] })
13753
13753
  ] })
@@ -13764,7 +13764,7 @@ function PropertyValuation({
13764
13764
  /* @__PURE__ */ jsx(GaugeIndicator, { type: "fairValue", position: 50 }),
13765
13765
  /* @__PURE__ */ jsxs(GaugePriceTag, { position: gaugePosition, children: [
13766
13766
  /* @__PURE__ */ jsx("span", { children: "Last Price" }),
13767
- /* @__PURE__ */ jsx("span", { children: formatCurrency6(lastPrice) })
13767
+ /* @__PURE__ */ jsx("span", { children: formatCompact(lastPrice) })
13768
13768
  ] }),
13769
13769
  /* @__PURE__ */ jsx(GaugeIndicator, { type: "lastPrice", position: gaugePosition })
13770
13770
  ] }),
@@ -13772,36 +13772,36 @@ function PropertyValuation({
13772
13772
  /* @__PURE__ */ jsx(ValuationItem, { children: /* @__PURE__ */ jsxs(ValuationValue, { style: { color: "#4CAF50" }, children: [
13773
13773
  /* @__PURE__ */ jsxs("span", { children: [
13774
13774
  "< ",
13775
- formatCurrency6(undervaluedThreshold)
13775
+ formatCompact(undervaluedThreshold)
13776
13776
  ] }),
13777
13777
  /* @__PURE__ */ jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
13778
13778
  "(",
13779
- formatMillions(undervaluedThreshold * tokensOutstanding),
13779
+ formatCompact(undervaluedThreshold * tokensOutstanding),
13780
13780
  ")"
13781
13781
  ] })
13782
13782
  ] }) }),
13783
13783
  /* @__PURE__ */ jsx(ValuationItem, { children: /* @__PURE__ */ jsxs(ValuationValue, { style: { color: "var(--color-accent)" }, children: [
13784
- /* @__PURE__ */ jsx("span", { children: formatCurrency6(fairValue) }),
13784
+ /* @__PURE__ */ jsx("span", { children: formatCompact(fairValue) }),
13785
13785
  /* @__PURE__ */ jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
13786
13786
  "(",
13787
- formatMillions(fairValue * tokensOutstanding),
13787
+ formatCompact(fairValue * tokensOutstanding),
13788
13788
  ")"
13789
13789
  ] })
13790
13790
  ] }) }),
13791
13791
  /* @__PURE__ */ jsx(ValuationItem, { children: /* @__PURE__ */ jsxs(ValuationValue, { style: { color: "#F44336" }, children: [
13792
13792
  /* @__PURE__ */ jsxs("span", { children: [
13793
13793
  "> ",
13794
- formatCurrency6(overvaluedThreshold)
13794
+ formatCompact(overvaluedThreshold)
13795
13795
  ] }),
13796
13796
  /* @__PURE__ */ jsxs("span", { className: "valuation-amount-span", style: { fontSize: "0.8rem", fontWeight: "normal" }, children: [
13797
13797
  "(",
13798
- formatMillions(overvaluedThreshold * tokensOutstanding),
13798
+ formatCompact(overvaluedThreshold * tokensOutstanding),
13799
13799
  ")"
13800
13800
  ] })
13801
13801
  ] }) })
13802
13802
  ] })
13803
13803
  ] }),
13804
- /* @__PURE__ */ jsxs(HiddenMobileChart, { children: [
13804
+ /* @__PURE__ */ jsxs("div", { children: [
13805
13805
  /* @__PURE__ */ jsx("h3", { style: { marginBottom: "1rem", fontSize: "1.1rem", color: "#fff" }, children: "Historical Valuation" }),
13806
13806
  /* @__PURE__ */ jsx(ChartContainer, { children: /* @__PURE__ */ jsxs(ChartBackground, { children: [
13807
13807
  axisLabels.map((label, index) => /* @__PURE__ */ jsx(YAxisLabel, { style: { top: `${10 + index * 22}%` }, children: label }, `${label}-${index}`)),
@@ -13920,15 +13920,7 @@ function PropertyValuation({
13920
13920
  ] })
13921
13921
  ] }) })
13922
13922
  ] })
13923
- ] }),
13924
- /* @__PURE__ */ jsx("h3", { className: "desktop-only-historical-chart", style: { marginBottom: "1rem", fontSize: "1.1rem", color: "#fff" }, children: "Historical Valuation" }),
13925
- /* @__PURE__ */ jsx(ChartContainer, { className: "desktop-only-historical-chart", children: /* @__PURE__ */ jsxs(ChartBackground, { children: [
13926
- axisLabels.map((label, index) => /* @__PURE__ */ jsx(YAxisLabel, { style: { top: `${10 + index * 22}%` }, children: label }, `${label}-${index}`)),
13927
- /* @__PURE__ */ jsxs(ValuationSvg, { viewBox: `0 0 ${CHART_WIDTH} ${CHART_HEIGHT}`, preserveAspectRatio: "none", children: [
13928
- valuationPath ? /* @__PURE__ */ jsx("path", { d: valuationPath, fill: "none", stroke: "#D4AF37", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) : null,
13929
- fairValuePath ? /* @__PURE__ */ jsx("path", { d: fairValuePath, fill: "none", stroke: "#FFFFFF", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) : null
13930
- ] })
13931
- ] }) })
13923
+ ] })
13932
13924
  ] })
13933
13925
  ] }),
13934
13926
  /* @__PURE__ */ jsxs(RecentSalesSection, { children: [
@@ -14002,6 +13994,14 @@ function formatMillions(value) {
14002
13994
  }
14003
13995
  return `$${(value / 1e6).toFixed(2)}m`;
14004
13996
  }
13997
+ function formatCompact(value) {
13998
+ if (value == null || !Number.isFinite(value)) return "\u2014";
13999
+ const abs = Math.abs(value);
14000
+ if (abs >= 1e9) return `$${(value / 1e9).toFixed(2)}B`;
14001
+ if (abs >= 1e6) return `$${(value / 1e6).toFixed(2)}M`;
14002
+ if (abs >= 1e3) return `$${(value / 1e3).toFixed(1)}K`;
14003
+ return formatCurrency6(value);
14004
+ }
14005
14005
  function formatBedroomLabel(bedrooms) {
14006
14006
  if (!Number.isFinite(bedrooms)) return "\u2014";
14007
14007
  return `${bedrooms} Bed`;
@@ -14125,12 +14125,6 @@ var GaugePriceTag = styled25.div`
14125
14125
  color: var(--color-accent);
14126
14126
  }
14127
14127
  `;
14128
- var HiddenMobileChart = styled25.div`
14129
- display: none;
14130
- @media (max-width: 480px) {
14131
- display: block;
14132
- }
14133
- `;
14134
14128
  var ValuationWrapper = styled25.div`
14135
14129
  display: flex;
14136
14130
  flex-direction: column;
@@ -14282,7 +14276,7 @@ var ValuationValue = styled25.div`
14282
14276
  font-size: 0.72rem;
14283
14277
 
14284
14278
  .valuation-amount-span {
14285
- font-size: 0.68rem !important;
14279
+ display: none;
14286
14280
  }
14287
14281
  }
14288
14282
  `;