@loafmarkets/ui 0.1.351 → 0.1.352

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
@@ -8997,7 +8997,9 @@ function PropertyOverview({
8997
8997
  volume24h,
8998
8998
  openOrdersValue,
8999
8999
  holderCount,
9000
- priceHistory: priceHistoryProp
9000
+ priceHistory: priceHistoryProp,
9001
+ beta = false,
9002
+ marketHours
9001
9003
  }) {
9002
9004
  const [isDescExpanded, setDescExpanded] = useState(false);
9003
9005
  const [showDividendHistory, setShowDividendHistory] = useState(false);
@@ -9059,20 +9061,21 @@ function PropertyOverview({
9059
9061
  { label: "Open Orders", value: isLoading && openOrdersValue == null ? loadingSkeleton : openOrdersValue != null && openOrdersValue > 0 ? fmtDollar(openOrdersValue) : "\u2014" },
9060
9062
  { label: "Holders", value: isLoading && holderCount == null ? loadingSkeleton : holderCount != null ? holderCount.toLocaleString() : "\u2014" }
9061
9063
  ];
9062
- const annualDividend = resolvedValuation ? resolvedValuation * 0.02 : null;
9063
- const monthlyDivPerShare = annualDividend && resolvedTokensIssued ? annualDividend / 12 / resolvedTokensIssued : null;
9064
+ const growthPct = overviewData?.growth5Yr;
9064
9065
  const propertyStats = [
9065
9066
  { label: "Property Value", value: isLoading && tokenMarketCap == null ? loadingSkeleton : tokenMarketCap ? fmtDollar(tokenMarketCap) : "\u2014" },
9066
- { label: "Offers", value: "3" },
9067
- { label: "Growth (5yr)", value: "+90%" },
9068
- { label: "Last Dividend", value: isLoading && monthlyDivPerShare == null ? loadingSkeleton : monthlyDivPerShare != null ? `$${monthlyDivPerShare.toFixed(2)}` : "\u2014" },
9069
- { label: "Next Dividend", value: (() => {
9070
- const now = /* @__PURE__ */ new Date();
9071
- const lastDay = new Date(now.getFullYear(), now.getMonth() + 1, 0);
9072
- while (lastDay.getDay() === 0 || lastDay.getDay() === 6) lastDay.setDate(lastDay.getDate() - 1);
9073
- return lastDay.toLocaleDateString("en-AU", { day: "2-digit", month: "short", year: "numeric" });
9074
- })() }
9067
+ ...beta ? [] : [{ label: "Offers", value: "3" }],
9068
+ { label: "Growth (5yr)", value: growthPct != null ? `${growthPct > 0 ? "+" : ""}${growthPct}%` : "\u2014" },
9069
+ { label: "Last Dividend", value: overviewData?.lastDividend != null ? `$${overviewData.lastDividend.toFixed(2)}` : "\u2014" },
9070
+ { label: "Next Dividend", value: overviewData?.nextDividendDate != null ? new Date(overviewData.nextDividendDate * 1e3).toLocaleDateString("en-AU", { day: "2-digit", month: "short", year: "numeric" }) : "\u2014" }
9075
9071
  ];
9072
+ const ownershipLabel = overviewData?.ownership ? overviewData.ownership.charAt(0).toUpperCase() + overviewData.ownership.slice(1).toLowerCase() : null;
9073
+ const propertyHistory = overviewData?.propertyHistory ?? [];
9074
+ const closedDays = marketHours?.marketClosedDays.filter((d) => d.toLowerCase() !== "never") ?? [];
9075
+ const tradingHoursValue = marketHours ? marketHours.marketOpenTime === marketHours.marketCloseTime ? "24 Hours" : `${marketHours.marketOpenTime} \u2013 ${marketHours.marketCloseTime}` : "";
9076
+ const tradingDaysValue = marketHours ? closedDays.length ? `Closed ${closedDays.join(", ")}` : "Every day" : "";
9077
+ const tradingHoursNote = marketHours ? `All times shown in ${marketHours.marketTimezone}.` : "";
9078
+ const showTradingHours = marketHours != null;
9076
9079
  return /* @__PURE__ */ jsxs(Wrapper, { children: [
9077
9080
  /* @__PURE__ */ jsxs(Section, { children: [
9078
9081
  /* @__PURE__ */ jsx(SectionHeader, { children: "About" }),
@@ -9124,7 +9127,7 @@ function PropertyOverview({
9124
9127
  /* @__PURE__ */ jsx(StatsRowLabel, { children: "Token Performance" }),
9125
9128
  /* @__PURE__ */ jsx(StatsHRow, { children: tokenStats.map((item) => /* @__PURE__ */ jsxs(StatsHCell, { children: [
9126
9129
  /* @__PURE__ */ jsx(StatsHCellLabel, { children: item.label }),
9127
- item.label === "Holders" && holderCount != null ? /* @__PURE__ */ jsx(StatValueClickable, { onClick: () => setShowHolders(true), children: item.value }) : /* @__PURE__ */ jsx(StatsHCellValue, { $gold: !!item.gold, children: item.value })
9130
+ item.label === "Holders" && holderCount != null && !beta ? /* @__PURE__ */ jsx(StatValueClickable, { onClick: () => setShowHolders(true), children: item.value }) : /* @__PURE__ */ jsx(StatsHCellValue, { $gold: !!item.gold, children: item.value })
9128
9131
  ] }, item.label)) })
9129
9132
  ] }),
9130
9133
  /* @__PURE__ */ jsxs(StatsRowSection, { children: [
@@ -9133,7 +9136,7 @@ function PropertyOverview({
9133
9136
  /* @__PURE__ */ jsx(StatsHCellLabel, { children: item.label }),
9134
9137
  /* @__PURE__ */ jsx(StatsHCellValue, { children: item.value })
9135
9138
  ] }, item.label)) }),
9136
- /* @__PURE__ */ jsx(DividendHistoryBtn, { onClick: () => setShowDividendHistory(true), children: "See Dividend History \u2192" })
9139
+ !beta && /* @__PURE__ */ jsx(DividendHistoryBtn, { onClick: () => setShowDividendHistory(true), children: "See Dividend History \u2192" })
9137
9140
  ] })
9138
9141
  ] }),
9139
9142
  /* @__PURE__ */ jsx(StatsMobile, { children: /* @__PURE__ */ jsxs(StatsTabbedCard, { children: [
@@ -9143,14 +9146,14 @@ function PropertyOverview({
9143
9146
  ] }),
9144
9147
  statsTab === "token" && /* @__PURE__ */ jsx(StatsTabContent, { children: tokenStats.map((item) => /* @__PURE__ */ jsxs(StatRow, { $gold: !!item.gold, children: [
9145
9148
  /* @__PURE__ */ jsx(StatLabel, { children: item.label }),
9146
- item.label === "Holders" && holderCount != null ? /* @__PURE__ */ jsx(StatValueClickable, { onClick: () => setShowHolders(true), children: item.value }) : /* @__PURE__ */ jsx(StatValue, { $gold: !!item.gold, children: item.value })
9149
+ item.label === "Holders" && holderCount != null && !beta ? /* @__PURE__ */ jsx(StatValueClickable, { onClick: () => setShowHolders(true), children: item.value }) : /* @__PURE__ */ jsx(StatValue, { $gold: !!item.gold, children: item.value })
9147
9150
  ] }, item.label)) }),
9148
9151
  statsTab === "property" && /* @__PURE__ */ jsxs(StatsTabContent, { children: [
9149
9152
  propertyStats.map((item) => /* @__PURE__ */ jsxs(StatRow, { children: [
9150
9153
  /* @__PURE__ */ jsx(StatLabel, { children: item.label }),
9151
9154
  /* @__PURE__ */ jsx(StatValue, { children: item.value })
9152
9155
  ] }, item.label)),
9153
- /* @__PURE__ */ jsx(DividendHistoryBtn, { onClick: () => setShowDividendHistory(true), children: "See Dividend History \u2192" })
9156
+ !beta && /* @__PURE__ */ jsx(DividendHistoryBtn, { onClick: () => setShowDividendHistory(true), children: "See Dividend History \u2192" })
9154
9157
  ] })
9155
9158
  ] }) })
9156
9159
  ] }),
@@ -9199,122 +9202,61 @@ function PropertyOverview({
9199
9202
  /* @__PURE__ */ jsxs(StatsColumn, { children: [
9200
9203
  /* @__PURE__ */ jsx(StatsColumnHeader, { children: "Asset Specification" }),
9201
9204
  /* @__PURE__ */ jsxs(StatRow, { children: [
9202
- /* @__PURE__ */ jsx(StatLabel, { children: "Land (Freehold)" }),
9203
- /* @__PURE__ */ jsxs(StatValue, { children: [
9204
- landSize?.toLocaleString() ?? "1,848",
9205
- " sqm"
9206
- ] })
9205
+ /* @__PURE__ */ jsxs(StatLabel, { children: [
9206
+ "Land",
9207
+ ownershipLabel ? ` (${ownershipLabel})` : ""
9208
+ ] }),
9209
+ /* @__PURE__ */ jsx(StatValue, { children: landSize != null ? `${landSize.toLocaleString()} sqm` : "\u2014" })
9207
9210
  ] }),
9208
9211
  /* @__PURE__ */ jsxs(StatRow, { children: [
9209
9212
  /* @__PURE__ */ jsx(StatLabel, { children: "Interior" }),
9210
- /* @__PURE__ */ jsxs(StatValue, { children: [
9211
- buildingSize?.toLocaleString() ?? "~800",
9212
- " sqm"
9213
- ] })
9213
+ /* @__PURE__ */ jsx(StatValue, { children: buildingSize != null ? `${buildingSize.toLocaleString()} sqm` : "\u2014" })
9214
9214
  ] }),
9215
9215
  /* @__PURE__ */ jsxs(StatRow, { children: [
9216
9216
  /* @__PURE__ */ jsx(StatLabel, { children: "Built" }),
9217
- /* @__PURE__ */ jsx(StatValue, { children: "c.1880" })
9217
+ /* @__PURE__ */ jsx(StatValue, { children: overviewData?.yearBuilt ?? "\u2014" })
9218
9218
  ] }),
9219
9219
  /* @__PURE__ */ jsxs(StatRow, { children: [
9220
9220
  /* @__PURE__ */ jsx(StatLabel, { children: "Heritage Status" }),
9221
- /* @__PURE__ */ jsx(StatValue, { children: "Historic Site (Not Protected)" })
9221
+ /* @__PURE__ */ jsx(StatValue, { children: overviewData?.heritageStatus || "\u2014" })
9222
9222
  ] }),
9223
9223
  /* @__PURE__ */ jsxs(StatRow, { children: [
9224
9224
  /* @__PURE__ */ jsx(StatLabel, { children: "Zoning" }),
9225
- /* @__PURE__ */ jsx(StatValue, { children: "R3 Medium Density" })
9225
+ /* @__PURE__ */ jsx(StatValue, { children: overviewData?.zoning || "\u2014" })
9226
9226
  ] }),
9227
9227
  /* @__PURE__ */ jsxs(StatRow, { children: [
9228
9228
  /* @__PURE__ */ jsx(StatLabel, { children: "Development Optionality" }),
9229
- /* @__PURE__ */ jsx(StatValue, { style: { color: "#4ade80" }, children: "Low-rise / Apartments Permitted" })
9229
+ /* @__PURE__ */ jsx(StatValue, { children: overviewData?.developmentOptionality || "\u2014" })
9230
9230
  ] }),
9231
9231
  /* @__PURE__ */ jsxs(StatRow, { children: [
9232
- /* @__PURE__ */ jsx(StatLabel, { children: "Suburb Median (6 Bed)" }),
9233
- /* @__PURE__ */ jsx(StatValue, { children: "$5.5M (Mosman)" })
9232
+ /* @__PURE__ */ jsx(StatLabel, { children: "Suburb Median" }),
9233
+ /* @__PURE__ */ jsx(StatValue, { children: overviewData?.suburbMedian != null ? fmtDollar(overviewData.suburbMedian) : "\u2014" })
9234
9234
  ] }),
9235
9235
  /* @__PURE__ */ jsxs(StatRow, { children: [
9236
9236
  /* @__PURE__ */ jsx(StatLabel, { children: "5yr Property Growth" }),
9237
- /* @__PURE__ */ jsx(StatValue, { style: { color: "#4ade80" }, children: "+90%" })
9237
+ /* @__PURE__ */ jsx(StatValue, { style: growthPct != null && growthPct > 0 ? { color: "#4ade80" } : void 0, children: growthPct != null ? `${growthPct > 0 ? "+" : ""}${growthPct}%` : "\u2014" })
9238
9238
  ] }),
9239
9239
  /* @__PURE__ */ jsxs(StatRow, { children: [
9240
9240
  /* @__PURE__ */ jsx(StatLabel, { children: "Current Dividend" }),
9241
- /* @__PURE__ */ jsx(StatValue, { style: { color: "#4ade80" }, children: "$0.042 / share / mo" })
9241
+ /* @__PURE__ */ jsx(StatValue, { children: overviewData?.lastDividend != null ? `$${overviewData.lastDividend.toFixed(2)} / share / mo` : "\u2014" })
9242
9242
  ] }),
9243
- /* @__PURE__ */ jsx(StatsColumnHeader, { style: { marginTop: "1.25rem" }, children: "Capital History" }),
9244
- /* @__PURE__ */ jsxs(TimelineWrap, { children: [
9245
- /* @__PURE__ */ jsxs(TimelineEntry, { children: [
9246
- /* @__PURE__ */ jsx(TimelineYear, { children: "1880s" }),
9247
- /* @__PURE__ */ jsx(TimelineDot, {}),
9248
- /* @__PURE__ */ jsx(TimelineDetail, { children: /* @__PURE__ */ jsx(TimelineLabel, { children: "Built c.1880, Pre-Federation" }) })
9249
- ] }),
9250
- /* @__PURE__ */ jsxs(TimelineEntry, { children: [
9251
- /* @__PURE__ */ jsx(TimelineYear, { children: "1976" }),
9252
- /* @__PURE__ */ jsx(TimelineDot, {}),
9253
- /* @__PURE__ */ jsxs(TimelineDetail, { children: [
9254
- /* @__PURE__ */ jsx(TimelineLabel, { children: "Acquired" }),
9255
- /* @__PURE__ */ jsx(TimelinePriceWrap, { children: /* @__PURE__ */ jsx(TimelinePrice, { children: "\xA340,000" }) })
9256
- ] })
9257
- ] }),
9258
- /* @__PURE__ */ jsxs(TimelineEntry, { children: [
9259
- /* @__PURE__ */ jsx(TimelineYear, { children: "1993" }),
9260
- /* @__PURE__ */ jsx(TimelineDot, {}),
9261
- /* @__PURE__ */ jsxs(TimelineDetail, { children: [
9262
- /* @__PURE__ */ jsxs(TimelineLabel, { children: [
9263
- "Sold ",
9264
- /* @__PURE__ */ jsx(TimelineHoldPeriod, { children: "17 yrs" })
9265
- ] }),
9266
- /* @__PURE__ */ jsxs(TimelinePriceWrap, { children: [
9267
- /* @__PURE__ */ jsx(TimelineGain, { children: "+1,563%" }),
9268
- /* @__PURE__ */ jsx(TimelinePrice, { children: "$1.33M" })
9269
- ] })
9270
- ] })
9271
- ] }),
9272
- /* @__PURE__ */ jsxs(TimelineEntry, { children: [
9273
- /* @__PURE__ */ jsx(TimelineYear, { children: "2006" }),
9274
- /* @__PURE__ */ jsx(TimelineDot, {}),
9275
- /* @__PURE__ */ jsxs(TimelineDetail, { children: [
9276
- /* @__PURE__ */ jsxs(TimelineLabel, { children: [
9277
- "Sold ",
9278
- /* @__PURE__ */ jsx(TimelineHoldPeriod, { children: "13 yrs" })
9279
- ] }),
9280
- /* @__PURE__ */ jsxs(TimelinePriceWrap, { children: [
9281
- /* @__PURE__ */ jsx(TimelineGain, { children: "+491%" }),
9282
- /* @__PURE__ */ jsx(TimelinePrice, { children: "$7.86M" })
9283
- ] })
9284
- ] })
9285
- ] }),
9286
- /* @__PURE__ */ jsxs(TimelineEntry, { children: [
9287
- /* @__PURE__ */ jsx(TimelineYear, { children: "2021" }),
9288
- /* @__PURE__ */ jsx(TimelineDot, {}),
9289
- /* @__PURE__ */ jsxs(TimelineDetail, { children: [
9290
- /* @__PURE__ */ jsxs(TimelineLabel, { children: [
9291
- "Sold (COVID correction) ",
9292
- /* @__PURE__ */ jsx(TimelineHoldPeriod, { children: "15 yrs" })
9293
- ] }),
9294
- /* @__PURE__ */ jsxs(TimelinePriceWrap, { children: [
9295
- /* @__PURE__ */ jsx(TimelineGain, { children: "+16%" }),
9296
- /* @__PURE__ */ jsx(TimelinePrice, { children: "$9.09M" })
9297
- ] })
9298
- ] })
9299
- ] }),
9300
- /* @__PURE__ */ jsxs(TimelineEntry, { $last: true, children: [
9301
- /* @__PURE__ */ jsx(TimelineYear, { children: "2026" }),
9302
- /* @__PURE__ */ jsx(TimelineDot, { $active: true }),
9303
- /* @__PURE__ */ jsxs(TimelineDetail, { children: [
9304
- /* @__PURE__ */ jsxs(TimelineLabel, { children: [
9305
- "Loaf Offering ",
9306
- /* @__PURE__ */ jsx(TimelineHoldPeriod, { children: "5 yrs" })
9307
- ] }),
9308
- /* @__PURE__ */ jsxs(TimelinePriceWrap, { children: [
9309
- /* @__PURE__ */ jsx(TimelineGain, { children: "+105%" }),
9310
- /* @__PURE__ */ jsx(TimelinePrice, { $gold: true, children: "$18.65M" })
9243
+ propertyHistory.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
9244
+ /* @__PURE__ */ jsx(StatsColumnHeader, { style: { marginTop: "1.25rem" }, children: "Capital History" }),
9245
+ /* @__PURE__ */ jsx(TimelineWrap, { children: propertyHistory.map((h, i) => {
9246
+ const last = i === propertyHistory.length - 1;
9247
+ return /* @__PURE__ */ jsxs(TimelineEntry, { $last: last, children: [
9248
+ /* @__PURE__ */ jsx(TimelineYear, { children: h.year }),
9249
+ /* @__PURE__ */ jsx(TimelineDot, { $active: last }),
9250
+ /* @__PURE__ */ jsxs(TimelineDetail, { children: [
9251
+ /* @__PURE__ */ jsx(TimelineLabel, { children: h.event }),
9252
+ h.amount != null && /* @__PURE__ */ jsx(TimelinePriceWrap, { children: /* @__PURE__ */ jsx(TimelinePrice, { $gold: last, children: fmtDollar(h.amount) }) })
9311
9253
  ] })
9312
- ] })
9313
- ] })
9254
+ ] }, `${h.year}-${i}`);
9255
+ }) })
9314
9256
  ] })
9315
9257
  ] })
9316
9258
  ] }),
9317
- /* @__PURE__ */ jsxs(AssetBentoNarratives, { children: [
9259
+ !beta && /* @__PURE__ */ jsxs(AssetBentoNarratives, { children: [
9318
9260
  /* @__PURE__ */ jsxs(NarrativeCard, { children: [
9319
9261
  /* @__PURE__ */ jsx(NarrativeIcon, { children: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ jsx("path", { d: "M22 12h-4l-3 9L9 3l-3 9H2" }) }) }),
9320
9262
  /* @__PURE__ */ jsx(NarrativeTitle, { children: "Generational Compounding" }),
@@ -9336,23 +9278,23 @@ function PropertyOverview({
9336
9278
  ] })
9337
9279
  ] })
9338
9280
  ] }),
9339
- /* @__PURE__ */ jsxs(Section, { children: [
9281
+ showTradingHours && /* @__PURE__ */ jsxs(Section, { children: [
9340
9282
  /* @__PURE__ */ jsx(SectionHeader, { children: "Trading Hours" }),
9341
9283
  /* @__PURE__ */ jsxs(TradingHoursCard, { children: [
9342
9284
  /* @__PURE__ */ jsxs(TradingHoursRow, { children: [
9343
9285
  /* @__PURE__ */ jsx(THLabel, { children: "Session" }),
9344
- /* @__PURE__ */ jsx(THLabel, { children: "Hours (AEST)" }),
9286
+ /* @__PURE__ */ jsx(THLabel, { children: "Hours" }),
9345
9287
  /* @__PURE__ */ jsx(THLabel, { children: "Days" })
9346
9288
  ] }),
9347
9289
  /* @__PURE__ */ jsxs(TradingHoursRow, { $last: true, children: [
9348
9290
  /* @__PURE__ */ jsx(THValue, { children: "Continuous Trading" }),
9349
- /* @__PURE__ */ jsx(THValue, { children: "10:00 \u2013 16:00" }),
9350
- /* @__PURE__ */ jsx(THValue, { children: "Mon \u2013 Fri" })
9291
+ /* @__PURE__ */ jsx(THValue, { children: tradingHoursValue }),
9292
+ /* @__PURE__ */ jsx(THValue, { children: tradingDaysValue })
9351
9293
  ] }),
9352
- /* @__PURE__ */ jsx(TradingHoursNote, { children: "All times are Australian Eastern Standard Time (AEST/AEDT). Markets are closed on Australian public holidays." })
9294
+ /* @__PURE__ */ jsx(TradingHoursNote, { children: tradingHoursNote })
9353
9295
  ] })
9354
9296
  ] }),
9355
- /* @__PURE__ */ jsxs(Section, { children: [
9297
+ !beta && /* @__PURE__ */ jsxs(Section, { children: [
9356
9298
  /* @__PURE__ */ jsx(SectionHeader, { children: "Tokenholder Security" }),
9357
9299
  /* @__PURE__ */ jsxs(SecurityGrid, { children: [
9358
9300
  /* @__PURE__ */ jsxs(SecurityCol, { children: [
@@ -9972,22 +9914,6 @@ var TimelinePrice = styled9.span`
9972
9914
  color: ${(p) => p.$gold ? "#D4AF37" : "#fff"};
9973
9915
  font-variant-numeric: tabular-nums;
9974
9916
  `;
9975
- var TimelineGain = styled9.span`
9976
- font-size: 0.68rem;
9977
- font-weight: 600;
9978
- color: #4ade80;
9979
- background: rgba(74,222,128,0.08);
9980
- border: 1px solid rgba(74,222,128,0.15);
9981
- padding: 1px 6px;
9982
- border-radius: 4px;
9983
- font-variant-numeric: tabular-nums;
9984
- white-space: nowrap;
9985
- `;
9986
- var TimelineHoldPeriod = styled9.span`
9987
- font-size: 0.68rem;
9988
- color: rgba(255,255,255,0.25);
9989
- font-weight: 400;
9990
- `;
9991
9917
  var FeaturesPanel = styled9.div`
9992
9918
  display: flex;
9993
9919
  flex-wrap: wrap;