@loafmarkets/ui 0.1.355 → 0.1.357

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.d.mts CHANGED
@@ -772,8 +772,6 @@ type PropertyOverviewProps = {
772
772
  chain?: string;
773
773
  percentageTokenized?: number | null;
774
774
  volume24h?: number | null;
775
- openOrdersValue?: number | null;
776
- holderCount?: number | null;
777
775
  priceHistory?: {
778
776
  time: number;
779
777
  close: number;
@@ -788,7 +786,7 @@ type PropertyOverviewProps = {
788
786
  marketClosedDays: readonly string[];
789
787
  } | null;
790
788
  };
791
- declare function PropertyOverview({ propertyName: _propertyName, location, midPrice, onTradeClick, onDocumentsClick, onPhotosClick, description: descriptionProp, tradeButtonLabel, images, galleryCategories, videoUrl, tokenName, landSizeSqm: landProp, buildingSizeSqm: buildingProp, features: featuresProp, propertyInfo: _propertyInfoProp, overviewData, bedrooms, bathrooms, carSpaces, propertyTypeLabel, tokensIssued: tokensIssuedProp, isLoading, ticker, contractAddress, chain, volume24h, openOrdersValue, holderCount, priceHistory: priceHistoryProp, beta, marketHours, }: PropertyOverviewProps): react_jsx_runtime.JSX.Element;
789
+ declare function PropertyOverview({ propertyName: _propertyName, location, midPrice, onTradeClick, onDocumentsClick, onPhotosClick, description: descriptionProp, tradeButtonLabel, images, galleryCategories, videoUrl, tokenName, landSizeSqm: landProp, buildingSizeSqm: buildingProp, features: featuresProp, propertyInfo: _propertyInfoProp, overviewData, bedrooms, bathrooms, carSpaces, propertyTypeLabel, tokensIssued: tokensIssuedProp, isLoading, ticker, contractAddress, chain, volume24h, priceHistory: priceHistoryProp, beta, marketHours, }: PropertyOverviewProps): react_jsx_runtime.JSX.Element;
792
790
 
793
791
  type OfferStatus = 'active' | 'rejected' | 'expired' | 'historical' | 'pending';
794
792
  type PropertyOffer = {
package/dist/index.d.ts CHANGED
@@ -772,8 +772,6 @@ type PropertyOverviewProps = {
772
772
  chain?: string;
773
773
  percentageTokenized?: number | null;
774
774
  volume24h?: number | null;
775
- openOrdersValue?: number | null;
776
- holderCount?: number | null;
777
775
  priceHistory?: {
778
776
  time: number;
779
777
  close: number;
@@ -788,7 +786,7 @@ type PropertyOverviewProps = {
788
786
  marketClosedDays: readonly string[];
789
787
  } | null;
790
788
  };
791
- declare function PropertyOverview({ propertyName: _propertyName, location, midPrice, onTradeClick, onDocumentsClick, onPhotosClick, description: descriptionProp, tradeButtonLabel, images, galleryCategories, videoUrl, tokenName, landSizeSqm: landProp, buildingSizeSqm: buildingProp, features: featuresProp, propertyInfo: _propertyInfoProp, overviewData, bedrooms, bathrooms, carSpaces, propertyTypeLabel, tokensIssued: tokensIssuedProp, isLoading, ticker, contractAddress, chain, volume24h, openOrdersValue, holderCount, priceHistory: priceHistoryProp, beta, marketHours, }: PropertyOverviewProps): react_jsx_runtime.JSX.Element;
789
+ declare function PropertyOverview({ propertyName: _propertyName, location, midPrice, onTradeClick, onDocumentsClick, onPhotosClick, description: descriptionProp, tradeButtonLabel, images, galleryCategories, videoUrl, tokenName, landSizeSqm: landProp, buildingSizeSqm: buildingProp, features: featuresProp, propertyInfo: _propertyInfoProp, overviewData, bedrooms, bathrooms, carSpaces, propertyTypeLabel, tokensIssued: tokensIssuedProp, isLoading, ticker, contractAddress, chain, volume24h, priceHistory: priceHistoryProp, beta, marketHours, }: PropertyOverviewProps): react_jsx_runtime.JSX.Element;
792
790
 
793
791
  type OfferStatus = 'active' | 'rejected' | 'expired' | 'historical' | 'pending';
794
792
  type PropertyOffer = {
package/dist/index.js CHANGED
@@ -4592,6 +4592,11 @@ var PriceChart = React5__namespace.forwardRef(
4592
4592
  );
4593
4593
  PriceChart.displayName = "PriceChart";
4594
4594
  var formatPrice3 = (value, currencySymbol) => {
4595
+ const abs = Math.abs(value);
4596
+ if (abs >= 1e6) {
4597
+ const unit = abs >= 1e12 ? { v: 1e12, s: "T" } : abs >= 1e9 ? { v: 1e9, s: "B" } : { v: 1e6, s: "M" };
4598
+ return `${currencySymbol}${(value / unit.v).toFixed(1)}${unit.s}`;
4599
+ }
4595
4600
  return `${currencySymbol}${value.toLocaleString(void 0, {
4596
4601
  minimumFractionDigits: 0,
4597
4602
  maximumFractionDigits: 2
@@ -9033,15 +9038,12 @@ function PropertyOverview({
9033
9038
  contractAddress,
9034
9039
  chain = "Base (Ethereum L2)",
9035
9040
  volume24h,
9036
- openOrdersValue,
9037
- holderCount,
9038
9041
  priceHistory: priceHistoryProp,
9039
9042
  beta = false,
9040
9043
  marketHours
9041
9044
  }) {
9042
9045
  const [isDescExpanded, setDescExpanded] = React5.useState(false);
9043
9046
  const [showDividendHistory, setShowDividendHistory] = React5.useState(false);
9044
- const [showHolders, setShowHolders] = React5.useState(false);
9045
9047
  const [copiedAddress, setCopiedAddress] = React5.useState(false);
9046
9048
  const [statsTab, setStatsTab] = React5.useState("token");
9047
9049
  const description = descriptionProp ?? overviewData?.description ?? DEFAULT_DESCRIPTION;
@@ -9079,7 +9081,7 @@ function PropertyOverview({
9079
9081
  ] });
9080
9082
  const tokenDetailsItems = [
9081
9083
  { label: "Chain", value: chainValue },
9082
- { label: "On-Chain Address", value: contractAddress ? truncateAddress(contractAddress) : "\u2014", mono: true, link: contractAddress ? `https://basescan.org/address/${contractAddress}` : void 0, copyValue: contractAddress },
9084
+ { label: "On-Chain Address", value: contractAddress ? truncateAddress(contractAddress) : "\u2014", mono: true, link: contractAddress ? `https://sepolia.basescan.org/address/${contractAddress}` : void 0, copyValue: contractAddress },
9083
9085
  { label: "Token Ticker", value: ticker ?? "\u2014" },
9084
9086
  { label: "Total Circulating Tokens", value: isLoading && resolvedTokensIssued == null ? loadingSkeleton : resolvedTokensIssued?.toLocaleString() ?? "\u2014" },
9085
9087
  { label: "Legal Structuring", value: "See Documents", docLink: true },
@@ -9095,9 +9097,7 @@ function PropertyOverview({
9095
9097
  const tokenStats = [
9096
9098
  { label: "Token Price", value: isLoading && tokenPriceValue == null ? loadingSkeleton : tokenPriceValue ? `$${tokenPriceValue.toFixed(2)}` : "\u2014", gold: true },
9097
9099
  { label: "24h Volume", value: isLoading && vol24hDollar == null ? loadingSkeleton : vol24hDollar != null && vol24hDollar > 0 ? fmtDollar(vol24hDollar) : "\u2014" },
9098
- { label: "Dividend Yield", value: isLoading && currentDividendYield == null ? loadingSkeleton : currentDividendYield ? `${currentDividendYield}%` : "\u2014" },
9099
- { label: "Open Orders", value: isLoading && openOrdersValue == null ? loadingSkeleton : openOrdersValue != null && openOrdersValue > 0 ? fmtDollar(openOrdersValue) : "\u2014" },
9100
- { label: "Holders", value: isLoading && holderCount == null ? loadingSkeleton : holderCount != null ? holderCount.toLocaleString() : "\u2014" }
9100
+ { label: "Dividend Yield", value: isLoading && currentDividendYield == null ? loadingSkeleton : currentDividendYield ? `${currentDividendYield}%` : "\u2014" }
9101
9101
  ];
9102
9102
  const growthPct = overviewData?.growth5Yr;
9103
9103
  const propertyStats = [
@@ -9164,7 +9164,7 @@ function PropertyOverview({
9164
9164
  /* @__PURE__ */ jsxRuntime.jsx(StatsRowLabel, { children: "Token Performance" }),
9165
9165
  /* @__PURE__ */ jsxRuntime.jsx(StatsHRow, { children: tokenStats.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(StatsHCell, { children: [
9166
9166
  /* @__PURE__ */ jsxRuntime.jsx(StatsHCellLabel, { children: item.label }),
9167
- item.label === "Holders" && holderCount != null && !beta ? /* @__PURE__ */ jsxRuntime.jsx(StatValueClickable, { onClick: () => setShowHolders(true), children: item.value }) : /* @__PURE__ */ jsxRuntime.jsx(StatsHCellValue, { $gold: !!item.gold, children: item.value })
9167
+ /* @__PURE__ */ jsxRuntime.jsx(StatsHCellValue, { $gold: !!item.gold, children: item.value })
9168
9168
  ] }, item.label)) })
9169
9169
  ] }),
9170
9170
  /* @__PURE__ */ jsxRuntime.jsxs(StatsRowSection, { children: [
@@ -9183,7 +9183,7 @@ function PropertyOverview({
9183
9183
  ] }),
9184
9184
  statsTab === "token" && /* @__PURE__ */ jsxRuntime.jsx(StatsTabContent, { children: tokenStats.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(StatRow, { $gold: !!item.gold, children: [
9185
9185
  /* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: item.label }),
9186
- item.label === "Holders" && holderCount != null && !beta ? /* @__PURE__ */ jsxRuntime.jsx(StatValueClickable, { onClick: () => setShowHolders(true), children: item.value }) : /* @__PURE__ */ jsxRuntime.jsx(StatValue, { $gold: !!item.gold, children: item.value })
9186
+ /* @__PURE__ */ jsxRuntime.jsx(StatValue, { $gold: !!item.gold, children: item.value })
9187
9187
  ] }, item.label)) }),
9188
9188
  statsTab === "property" && /* @__PURE__ */ jsxRuntime.jsxs(StatsTabContent, { children: [
9189
9189
  propertyStats.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(StatRow, { children: [
@@ -9205,14 +9205,6 @@ function PropertyOverview({
9205
9205
  onClose: () => setShowDividendHistory(false)
9206
9206
  }
9207
9207
  ),
9208
- showHolders && /* @__PURE__ */ jsxRuntime.jsx(
9209
- HoldersPopup,
9210
- {
9211
- contractAddress,
9212
- ticker,
9213
- onClose: () => setShowHolders(false)
9214
- }
9215
- ),
9216
9208
  /* @__PURE__ */ jsxRuntime.jsxs(Section, { children: [
9217
9209
  /* @__PURE__ */ jsxRuntime.jsx(SectionHeader, { children: "The Asset" }),
9218
9210
  galleryImages.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -9269,14 +9261,6 @@ function PropertyOverview({
9269
9261
  /* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: "Suburb Median" }),
9270
9262
  /* @__PURE__ */ jsxRuntime.jsx(StatValue, { children: overviewData?.suburbMedian != null ? fmtDollar(overviewData.suburbMedian) : "\u2014" })
9271
9263
  ] }),
9272
- /* @__PURE__ */ jsxRuntime.jsxs(StatRow, { children: [
9273
- /* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: "5yr Property Growth" }),
9274
- /* @__PURE__ */ jsxRuntime.jsx(StatValue, { style: growthPct != null && growthPct > 0 ? { color: "#4ade80" } : void 0, children: growthPct != null ? `${growthPct > 0 ? "+" : ""}${growthPct}%` : "\u2014" })
9275
- ] }),
9276
- /* @__PURE__ */ jsxRuntime.jsxs(StatRow, { children: [
9277
- /* @__PURE__ */ jsxRuntime.jsx(StatLabel, { children: "Current Dividend" }),
9278
- /* @__PURE__ */ jsxRuntime.jsx(StatValue, { children: overviewData?.lastDividend != null ? `$${overviewData.lastDividend.toFixed(2)} / share / mo` : "\u2014" })
9279
- ] }),
9280
9264
  propertyHistory.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9281
9265
  /* @__PURE__ */ jsxRuntime.jsx(StatsColumnHeader, { style: { marginTop: "1.25rem" }, children: "Capital History" }),
9282
9266
  /* @__PURE__ */ jsxRuntime.jsx(TimelineWrap, { children: propertyHistory.map((h, i) => {
@@ -9501,65 +9485,6 @@ function DividendHistoryPopup({
9501
9485
  ] }) })
9502
9486
  ] }) });
9503
9487
  }
9504
- var MOCK_HOLDERS = [
9505
- { rank: 1, address: "0xA1b2...9F3e", label: "Loaf Treasury", tokens: 12500, pct: 25 },
9506
- { rank: 2, address: "0xC4d5...1A7b", label: null, tokens: 6200, pct: 12.4 },
9507
- { rank: 3, address: "0xE8f9...3C2d", label: null, tokens: 4800, pct: 9.6 },
9508
- { rank: 4, address: "0x2B3c...7D4e", label: "Market Maker", tokens: 3500, pct: 7 },
9509
- { rank: 5, address: "0x5F6a...8E1c", label: null, tokens: 2900, pct: 5.8 },
9510
- { rank: 6, address: "0x7A8b...0F2d", label: null, tokens: 2400, pct: 4.8 },
9511
- { rank: 7, address: "0x9C0d...4A3e", label: null, tokens: 1800, pct: 3.6 },
9512
- { rank: 8, address: "0xB1e2...6C5f", label: null, tokens: 1500, pct: 3 },
9513
- { rank: 9, address: "0xD3f4...8E7a", label: null, tokens: 1200, pct: 2.4 },
9514
- { rank: 10, address: "0xF5a6...2B9c", label: null, tokens: 950, pct: 1.9 }
9515
- ];
9516
- function HoldersPopup({
9517
- contractAddress,
9518
- ticker,
9519
- onClose
9520
- }) {
9521
- React5.useEffect(() => {
9522
- const handleEsc = (e) => {
9523
- if (e.key === "Escape") onClose();
9524
- };
9525
- window.addEventListener("keydown", handleEsc);
9526
- return () => window.removeEventListener("keydown", handleEsc);
9527
- }, [onClose]);
9528
- const basescanUrl = contractAddress ? `https://basescan.org/token/${contractAddress}#balances` : "https://basescan.org";
9529
- return /* @__PURE__ */ jsxRuntime.jsx(DivPopupOverlay, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(HoldersPanel, { onClick: (e) => e.stopPropagation(), children: [
9530
- /* @__PURE__ */ jsxRuntime.jsxs(DivPopupHeader, { children: [
9531
- /* @__PURE__ */ jsxRuntime.jsxs(DivPopupTitle, { children: [
9532
- "Top Holders",
9533
- ticker ? ` (${ticker})` : ""
9534
- ] }),
9535
- /* @__PURE__ */ jsxRuntime.jsxs(HoldersHeaderRight, { children: [
9536
- /* @__PURE__ */ jsxRuntime.jsx(HoldersBasescanLink, { href: basescanUrl, target: "_blank", rel: "noopener noreferrer", children: "View on BaseScan\xA0\u2197" }),
9537
- /* @__PURE__ */ jsxRuntime.jsx(DivPopupClose, { onClick: onClose, "aria-label": "Close holders", children: "\u2715" })
9538
- ] })
9539
- ] }),
9540
- /* @__PURE__ */ jsxRuntime.jsxs(HoldersTableWrap, { children: [
9541
- /* @__PURE__ */ jsxRuntime.jsxs(HoldersTableHeader, { children: [
9542
- /* @__PURE__ */ jsxRuntime.jsx(HoldersColRank, { children: "#" }),
9543
- /* @__PURE__ */ jsxRuntime.jsx(HoldersColAddr, { children: "Address" }),
9544
- /* @__PURE__ */ jsxRuntime.jsx(HoldersColTokens, { children: "Tokens" }),
9545
- /* @__PURE__ */ jsxRuntime.jsx(HoldersColPct, { children: "%" })
9546
- ] }),
9547
- MOCK_HOLDERS.map((h) => /* @__PURE__ */ jsxRuntime.jsxs(HoldersTableRow, { children: [
9548
- /* @__PURE__ */ jsxRuntime.jsx(HoldersColRank, { children: h.rank }),
9549
- /* @__PURE__ */ jsxRuntime.jsxs(HoldersColAddr, { children: [
9550
- /* @__PURE__ */ jsxRuntime.jsx(HolderAddrLink, { href: `https://basescan.org/address/${h.address.replace("...", "")}`, target: "_blank", rel: "noopener noreferrer", children: h.address }),
9551
- h.label && /* @__PURE__ */ jsxRuntime.jsx(HolderLabel, { children: h.label })
9552
- ] }),
9553
- /* @__PURE__ */ jsxRuntime.jsx(HoldersColTokens, { children: h.tokens.toLocaleString() }),
9554
- /* @__PURE__ */ jsxRuntime.jsxs(HoldersColPct, { children: [
9555
- h.pct.toFixed(1),
9556
- "%"
9557
- ] })
9558
- ] }, h.rank))
9559
- ] }),
9560
- /* @__PURE__ */ jsxRuntime.jsx(HoldersFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(HoldersFullListBtn, { href: basescanUrl, target: "_blank", rel: "noopener noreferrer", children: "See Full List of Holders\xA0\u2197" }) })
9561
- ] }) });
9562
- }
9563
9488
  var Wrapper = styled9__default.default.div`
9564
9489
  display: flex;
9565
9490
  flex-direction: column;
@@ -10169,133 +10094,6 @@ var DivTableTD = styled9__default.default.td`
10169
10094
  font-size: 0.82rem;
10170
10095
  color: rgba(255,255,255,0.75);
10171
10096
  `;
10172
- var HoldersPanel = styled9__default.default.div`
10173
- background: #111;
10174
- border: 1px solid rgba(255,255,255,0.08);
10175
- border-radius: 14px;
10176
- width: 90%;
10177
- max-width: 520px;
10178
- max-height: 85vh;
10179
- overflow-y: auto;
10180
- display: flex;
10181
- flex-direction: column;
10182
- `;
10183
- var HoldersHeaderRight = styled9__default.default.div`
10184
- display: flex;
10185
- align-items: center;
10186
- gap: 1rem;
10187
- `;
10188
- var HoldersBasescanLink = styled9__default.default.a`
10189
- font-size: 0.75rem;
10190
- color: rgba(255,255,255,0.4);
10191
- text-decoration: none;
10192
- transition: color 0.15s;
10193
- &:hover { color: rgba(212,175,55,0.9); }
10194
- `;
10195
- var HoldersTableWrap = styled9__default.default.div`
10196
- padding: 0 1.5rem;
10197
- `;
10198
- var HoldersTableHeader = styled9__default.default.div`
10199
- display: flex;
10200
- align-items: center;
10201
- padding: 0.6rem 0;
10202
- border-bottom: 1px solid rgba(255,255,255,0.08);
10203
- font-size: 0.65rem;
10204
- font-weight: 500;
10205
- color: rgba(255,255,255,0.4);
10206
- text-transform: uppercase;
10207
- letter-spacing: 0.06em;
10208
- `;
10209
- var HoldersTableRow = styled9__default.default.div`
10210
- display: flex;
10211
- align-items: center;
10212
- padding: 0.6rem 0;
10213
- border-bottom: 1px solid rgba(255,255,255,0.03);
10214
- font-size: 0.82rem;
10215
- color: rgba(255,255,255,0.75);
10216
- border-radius: 6px;
10217
- transition: background 0.15s;
10218
- &:hover { background: rgba(255,255,255,0.03); }
10219
- &:last-child { border-bottom: none; }
10220
- `;
10221
- var HoldersColRank = styled9__default.default.span`
10222
- width: 32px;
10223
- flex-shrink: 0;
10224
- color: rgba(255,255,255,0.35);
10225
- font-size: 0.75rem;
10226
- `;
10227
- var HoldersColAddr = styled9__default.default.span`
10228
- flex: 1;
10229
- min-width: 0;
10230
- display: flex;
10231
- align-items: center;
10232
- gap: 0.5rem;
10233
- `;
10234
- var HolderAddrLink = styled9__default.default.a`
10235
- font-family: monospace;
10236
- font-size: 0.8rem;
10237
- color: rgba(255,255,255,0.7);
10238
- text-decoration: none;
10239
- &:hover { color: rgba(212,175,55,0.9); }
10240
- `;
10241
- var HolderLabel = styled9__default.default.span`
10242
- font-size: 0.68rem;
10243
- color: rgba(212,175,55,0.7);
10244
- background: rgba(212,175,55,0.08);
10245
- padding: 1px 6px;
10246
- border-radius: 4px;
10247
- white-space: nowrap;
10248
- `;
10249
- var HoldersColTokens = styled9__default.default.span`
10250
- width: 90px;
10251
- text-align: right;
10252
- flex-shrink: 0;
10253
- font-variant-numeric: tabular-nums;
10254
- `;
10255
- var HoldersColPct = styled9__default.default.span`
10256
- width: 55px;
10257
- text-align: right;
10258
- flex-shrink: 0;
10259
- font-variant-numeric: tabular-nums;
10260
- color: rgba(255,255,255,0.5);
10261
- `;
10262
- var HoldersFooter = styled9__default.default.div`
10263
- padding: 1rem 1.5rem 1.25rem;
10264
- display: flex;
10265
- justify-content: center;
10266
- `;
10267
- var HoldersFullListBtn = styled9__default.default.a`
10268
- display: inline-flex;
10269
- align-items: center;
10270
- padding: 0.55rem 1.5rem;
10271
- border: 1px solid rgba(255,255,255,0.1);
10272
- border-radius: 8px;
10273
- background: rgba(255,255,255,0.03);
10274
- color: rgba(255,255,255,0.6);
10275
- font-size: 0.78rem;
10276
- font-weight: 500;
10277
- text-decoration: none;
10278
- transition: border-color 0.15s, color 0.15s, background 0.15s;
10279
- &:hover {
10280
- border-color: rgba(212,175,55,0.4);
10281
- color: rgba(212,175,55,0.9);
10282
- background: rgba(212,175,55,0.05);
10283
- }
10284
- `;
10285
- var StatValueClickable = styled9__default.default.span`
10286
- font-size: 0.88rem;
10287
- font-weight: 500;
10288
- color: #fff;
10289
- cursor: pointer;
10290
- text-decoration: underline;
10291
- text-underline-offset: 3px;
10292
- text-decoration-color: rgba(255,255,255,0.15);
10293
- transition: color 0.15s, text-decoration-color 0.15s;
10294
- &:hover {
10295
- color: rgba(212,175,55,0.9);
10296
- text-decoration-color: rgba(212,175,55,0.5);
10297
- }
10298
- `;
10299
10097
  var STATUS_BG = {
10300
10098
  active: "rgba(14,203,129,0.18)",
10301
10099
  rejected: "rgba(246,70,93,0.18)",