@loafmarkets/ui 0.1.26 → 0.1.28

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
@@ -8434,12 +8434,6 @@ var STATUS_COLOR2 = {
8434
8434
  CLOSED: "#848e9c",
8435
8435
  CANCELLED: "#f6465d"
8436
8436
  };
8437
- var recentOrderPurchases = [
8438
- { name: "investor_au", amount: 12500 },
8439
- { name: "sydney_prop", amount: 25e3 },
8440
- { name: "heritage_inv", amount: 5e4 },
8441
- { name: "mosman_buyer", amount: 7500 }
8442
- ];
8443
8437
  function AssetSelectorBar({ propertyName, tokenPrice, offeringValuation }) {
8444
8438
  const [isDropdownOpen, setIsDropdownOpen] = useState(false);
8445
8439
  return /* @__PURE__ */ jsx(AssetSelectorWrapper, { children: /* @__PURE__ */ jsxs(IPOAssetSelector, { children: [
@@ -8709,7 +8703,7 @@ function OfferingProgressCard({
8709
8703
  /* @__PURE__ */ jsx(CountdownUnitLabel, { children: "S" })
8710
8704
  ] })
8711
8705
  ] })
8712
- ] }) : /* @__PURE__ */ jsx(PreLiveStatus, { $statusColor: statusColor, children: ipoStatus === "CLOSED" ? "Sale Completed" : ipoStatus === "CANCELLED" ? "Sale Cancelled" : "Sale Not Yet Open" }),
8706
+ ] }) : /* @__PURE__ */ jsx(PreLiveStatus, { $statusColor: statusColor, children: "Sale Not Yet Open" }),
8713
8707
  /* @__PURE__ */ jsxs("div", { style: { textAlign: "right" }, children: [
8714
8708
  /* @__PURE__ */ jsx(MetricLabel2, { children: "Offering Valuation" }),
8715
8709
  /* @__PURE__ */ jsxs(MetricValue2, { children: [
@@ -8921,7 +8915,16 @@ var ProgressBar = styled23.div`
8921
8915
  transition: width 0.5s ease;
8922
8916
  }
8923
8917
  `;
8924
- function VideoActivitySection({ ipoStarted }) {
8918
+ function VideoActivitySection({
8919
+ ipoStarted,
8920
+ recentOrders = [],
8921
+ ordersAllocated = 0,
8922
+ tokenPrice = 0
8923
+ }) {
8924
+ const sortedOrders = useMemo(
8925
+ () => [...recentOrders].sort((a, b) => b.timestamp - a.timestamp),
8926
+ [recentOrders]
8927
+ );
8925
8928
  return /* @__PURE__ */ jsxs(Section4, { children: [
8926
8929
  /* @__PURE__ */ jsxs(VideoPanel, { children: [
8927
8930
  /* @__PURE__ */ jsx("div", { className: "section-header", children: /* @__PURE__ */ jsx("h3", { children: "Musgrave" }) }),
@@ -8936,15 +8939,15 @@ function VideoActivitySection({ ipoStarted }) {
8936
8939
  /* @__PURE__ */ jsx(LiveIndicatorDot, { $active: ipoStarted }),
8937
8940
  "Recent Order Activity"
8938
8941
  ] }),
8939
- /* @__PURE__ */ jsx("span", { children: ipoStarted ? "Active orders: 1,247" : "Waiting for Offer to Open" })
8942
+ /* @__PURE__ */ jsx("span", { children: ipoStarted ? `Active orders: ${ordersAllocated.toLocaleString()}` : "Waiting for Offer to Open" })
8940
8943
  ] }),
8941
- /* @__PURE__ */ jsx("div", { className: "activity-content", children: ipoStarted ? /* @__PURE__ */ jsx("div", { className: "activity-list", children: recentOrderPurchases.map((purchase, i) => /* @__PURE__ */ jsxs("div", { className: "purchase-row", children: [
8942
- /* @__PURE__ */ jsx("span", { children: purchase.name }),
8944
+ /* @__PURE__ */ jsx("div", { className: "activity-content", children: ipoStarted ? /* @__PURE__ */ jsx("div", { className: "activity-list", children: sortedOrders.map((order) => /* @__PURE__ */ jsxs("div", { className: "purchase-row", children: [
8945
+ /* @__PURE__ */ jsx("span", { children: order.buyerHandle || `${order.buyerAddress.slice(0, 6)}...${order.buyerAddress.slice(-4)}` }),
8943
8946
  /* @__PURE__ */ jsxs("strong", { children: [
8944
8947
  "$",
8945
- purchase.amount.toLocaleString()
8948
+ (tokenPrice * order.quantity).toLocaleString(void 0, { maximumFractionDigits: 0 })
8946
8949
  ] })
8947
- ] }, i)) }) : /* @__PURE__ */ jsxs("div", { className: "activity-empty", children: [
8950
+ ] }, order.txHash)) }) : /* @__PURE__ */ jsxs("div", { className: "activity-empty", children: [
8948
8951
  /* @__PURE__ */ jsx("div", { className: "spinner" }),
8949
8952
  /* @__PURE__ */ jsx("p", { children: "Activity will appear once the Offering opens" })
8950
8953
  ] }) })
@@ -9823,7 +9826,7 @@ function GalleryMapSection({ propertyLocation }) {
9823
9826
  /* @__PURE__ */ jsx(
9824
9827
  "iframe",
9825
9828
  {
9826
- src: "https://demo.loafmarkets.com/map/musgrave?embed=true&zoom=14&hideOthers=true",
9829
+ src: "/map/musgrave?embed=true&zoom=14&hideOthers=true",
9827
9830
  width: "100%",
9828
9831
  height: "100%",
9829
9832
  style: { border: 0, minHeight: "400px", pointerEvents: "auto" },
@@ -10545,7 +10548,9 @@ function PropertyBuy({
10545
10548
  onDeposit,
10546
10549
  initialUserSubscriptions = [],
10547
10550
  opensAt,
10548
- isPrivateClient = false
10551
+ isPrivateClient = false,
10552
+ recentOrders = [],
10553
+ ordersAllocated = 0
10549
10554
  }) {
10550
10555
  const [sliderValue, setSliderValue] = useState(0);
10551
10556
  const [availableBalance, setAvailableBalance] = useState(walletUsdcBalance ?? 125e3);
@@ -10719,7 +10724,15 @@ function PropertyBuy({
10719
10724
  opensAt
10720
10725
  }
10721
10726
  ),
10722
- /* @__PURE__ */ jsx(VideoActivitySection, { ipoStarted }),
10727
+ /* @__PURE__ */ jsx(
10728
+ VideoActivitySection,
10729
+ {
10730
+ ipoStarted,
10731
+ recentOrders,
10732
+ ordersAllocated,
10733
+ tokenPrice
10734
+ }
10735
+ ),
10723
10736
  /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
10724
10737
  /* @__PURE__ */ jsx(
10725
10738
  OrderPanel,