@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.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,36 +13798,36 @@ 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
  ] }) })
13828
13828
  ] })
13829
13829
  ] }),
13830
- /* @__PURE__ */ jsxRuntime.jsxs(HiddenMobileChart, { children: [
13830
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
13831
13831
  /* @__PURE__ */ jsxRuntime.jsx("h3", { style: { marginBottom: "1rem", fontSize: "1.1rem", color: "#fff" }, children: "Historical Valuation" }),
13832
13832
  /* @__PURE__ */ jsxRuntime.jsx(ChartContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs(ChartBackground, { children: [
13833
13833
  axisLabels.map((label, index) => /* @__PURE__ */ jsxRuntime.jsx(YAxisLabel, { style: { top: `${10 + index * 22}%` }, children: label }, `${label}-${index}`)),
@@ -13946,15 +13946,7 @@ function PropertyValuation({
13946
13946
  ] })
13947
13947
  ] }) })
13948
13948
  ] })
13949
- ] }),
13950
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "desktop-only-historical-chart", style: { marginBottom: "1rem", fontSize: "1.1rem", color: "#fff" }, children: "Historical Valuation" }),
13951
- /* @__PURE__ */ jsxRuntime.jsx(ChartContainer, { className: "desktop-only-historical-chart", children: /* @__PURE__ */ jsxRuntime.jsxs(ChartBackground, { children: [
13952
- axisLabels.map((label, index) => /* @__PURE__ */ jsxRuntime.jsx(YAxisLabel, { style: { top: `${10 + index * 22}%` }, children: label }, `${label}-${index}`)),
13953
- /* @__PURE__ */ jsxRuntime.jsxs(ValuationSvg, { viewBox: `0 0 ${CHART_WIDTH} ${CHART_HEIGHT}`, preserveAspectRatio: "none", children: [
13954
- valuationPath ? /* @__PURE__ */ jsxRuntime.jsx("path", { d: valuationPath, fill: "none", stroke: "#D4AF37", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) : null,
13955
- fairValuePath ? /* @__PURE__ */ jsxRuntime.jsx("path", { d: fairValuePath, fill: "none", stroke: "#FFFFFF", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", vectorEffect: "non-scaling-stroke" }) : null
13956
- ] })
13957
- ] }) })
13949
+ ] })
13958
13950
  ] })
13959
13951
  ] }),
13960
13952
  /* @__PURE__ */ jsxRuntime.jsxs(RecentSalesSection, { children: [
@@ -14028,6 +14020,14 @@ function formatMillions(value) {
14028
14020
  }
14029
14021
  return `$${(value / 1e6).toFixed(2)}m`;
14030
14022
  }
14023
+ function formatCompact(value) {
14024
+ if (value == null || !Number.isFinite(value)) return "\u2014";
14025
+ const abs = Math.abs(value);
14026
+ if (abs >= 1e9) return `$${(value / 1e9).toFixed(2)}B`;
14027
+ if (abs >= 1e6) return `$${(value / 1e6).toFixed(2)}M`;
14028
+ if (abs >= 1e3) return `$${(value / 1e3).toFixed(1)}K`;
14029
+ return formatCurrency6(value);
14030
+ }
14031
14031
  function formatBedroomLabel(bedrooms) {
14032
14032
  if (!Number.isFinite(bedrooms)) return "\u2014";
14033
14033
  return `${bedrooms} Bed`;
@@ -14151,12 +14151,6 @@ var GaugePriceTag = styled25__default.default.div`
14151
14151
  color: var(--color-accent);
14152
14152
  }
14153
14153
  `;
14154
- var HiddenMobileChart = styled25__default.default.div`
14155
- display: none;
14156
- @media (max-width: 480px) {
14157
- display: block;
14158
- }
14159
- `;
14160
14154
  var ValuationWrapper = styled25__default.default.div`
14161
14155
  display: flex;
14162
14156
  flex-direction: column;
@@ -14308,7 +14302,7 @@ var ValuationValue = styled25__default.default.div`
14308
14302
  font-size: 0.72rem;
14309
14303
 
14310
14304
  .valuation-amount-span {
14311
- font-size: 0.68rem !important;
14305
+ display: none;
14312
14306
  }
14313
14307
  }
14314
14308
  `;