@loafmarkets/ui 0.1.135 → 0.1.137
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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -767,8 +767,9 @@ type PropertyOffer = {
|
|
|
767
767
|
};
|
|
768
768
|
type PropertyOffersProps = {
|
|
769
769
|
offers: PropertyOffer[];
|
|
770
|
+
totalShares?: number | null;
|
|
770
771
|
};
|
|
771
|
-
declare function PropertyOffers({ offers }: PropertyOffersProps): react_jsx_runtime.JSX.Element;
|
|
772
|
+
declare function PropertyOffers({ offers, totalShares }: PropertyOffersProps): react_jsx_runtime.JSX.Element;
|
|
772
773
|
|
|
773
774
|
declare function PropertyHistory(): react_jsx_runtime.JSX.Element;
|
|
774
775
|
|
package/dist/index.d.ts
CHANGED
|
@@ -767,8 +767,9 @@ type PropertyOffer = {
|
|
|
767
767
|
};
|
|
768
768
|
type PropertyOffersProps = {
|
|
769
769
|
offers: PropertyOffer[];
|
|
770
|
+
totalShares?: number | null;
|
|
770
771
|
};
|
|
771
|
-
declare function PropertyOffers({ offers }: PropertyOffersProps): react_jsx_runtime.JSX.Element;
|
|
772
|
+
declare function PropertyOffers({ offers, totalShares }: PropertyOffersProps): react_jsx_runtime.JSX.Element;
|
|
772
773
|
|
|
773
774
|
declare function PropertyHistory(): react_jsx_runtime.JSX.Element;
|
|
774
775
|
|
package/dist/index.js
CHANGED
|
@@ -2162,8 +2162,8 @@ function DesktopOrderbookLayout({
|
|
|
2162
2162
|
)
|
|
2163
2163
|
] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3", children: rightHeader })
|
|
2164
2164
|
] }),
|
|
2165
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col min-h-0 px-4 pt-
|
|
2166
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-3 px-3
|
|
2165
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col min-h-0 px-4 pt-0", children: [
|
|
2166
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-3 px-3 pb-1 pt-0.5 text-xs text-white/60", children: [
|
|
2167
2167
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: priceLabel }),
|
|
2168
2168
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-right", children: amountLabel }),
|
|
2169
2169
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-right", children: tab === "orderbook" ? "Total" : "Time" })
|
|
@@ -8561,7 +8561,15 @@ var STATUS_COLOR = {
|
|
|
8561
8561
|
historical: "#3861fb",
|
|
8562
8562
|
expired: "rgba(255,255,255,0.7)"
|
|
8563
8563
|
};
|
|
8564
|
-
function
|
|
8564
|
+
function parsePrice(price) {
|
|
8565
|
+
return Number(price.replace(/[^0-9.]/g, ""));
|
|
8566
|
+
}
|
|
8567
|
+
function formatPerShare(price, totalShares) {
|
|
8568
|
+
const total = parsePrice(price);
|
|
8569
|
+
const perShare = total / totalShares;
|
|
8570
|
+
return `$${perShare.toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}/Share`;
|
|
8571
|
+
}
|
|
8572
|
+
function PropertyOffers({ offers, totalShares }) {
|
|
8565
8573
|
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "bg-[rgba(30,32,38,0.95)] rounded-md p-7 border border-white/[0.08]", children: [
|
|
8566
8574
|
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex justify-between items-center gap-4 flex-wrap", children: [
|
|
8567
8575
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "m-0 text-xl font-semibold", children: "Active & Historical Buyout Offers" }),
|
|
@@ -8592,6 +8600,11 @@ function PropertyOffers({ offers }) {
|
|
|
8592
8600
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-[240px]", children: [
|
|
8593
8601
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "font-semibold text-[1.15rem] inline-flex items-center gap-2", children: [
|
|
8594
8602
|
offer.price,
|
|
8603
|
+
totalShares && totalShares > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[0.85rem] font-normal text-white/55", children: [
|
|
8604
|
+
"(",
|
|
8605
|
+
formatPerShare(offer.price, totalShares),
|
|
8606
|
+
")"
|
|
8607
|
+
] }),
|
|
8595
8608
|
(offer.price === "$17,000,000" || offer.price === "$15,500,000") && /* @__PURE__ */ jsxRuntime.jsx(OfferPricePulse, { $variant: offer.price === "$17,000,000" ? "positive" : "alert" })
|
|
8596
8609
|
] }),
|
|
8597
8610
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[0.85rem] text-white/65 mt-[0.3rem]", children: [
|