@loafmarkets/ui 0.1.100 → 0.1.101
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 +58 -77
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +58 -77
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11968,49 +11968,41 @@ function PortfolioActivityPanel({
|
|
|
11968
11968
|
] }),
|
|
11969
11969
|
activeTab === "positions" && showPositionsTab && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11970
11970
|
positions.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(EmptyState, { children: "No positions yet. Subscribe to an offering or buy on the secondary market." }),
|
|
11971
|
-
positions.length > 0 && /* @__PURE__ */ jsxRuntime.
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11971
|
+
positions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11972
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PositionsHeader, { children: [
|
|
11973
|
+
/* @__PURE__ */ jsxRuntime.jsx(PositionsHeaderCell, { children: "Asset" }),
|
|
11974
|
+
/* @__PURE__ */ jsxRuntime.jsx(PositionsHeaderCell, { $align: "right", children: "Size" }),
|
|
11975
|
+
/* @__PURE__ */ jsxRuntime.jsx(PositionsHeaderCell, { $align: "right", children: "Value" }),
|
|
11976
|
+
/* @__PURE__ */ jsxRuntime.jsx(PositionsHeaderCell, { $align: "right", children: "Entry Price" }),
|
|
11977
|
+
/* @__PURE__ */ jsxRuntime.jsx(PositionsHeaderCell, { $align: "right", children: "Mark Price" }),
|
|
11978
|
+
/* @__PURE__ */ jsxRuntime.jsx(PositionsHeaderCell, { $align: "right", children: "PNL (%)" })
|
|
11979
|
+
] }),
|
|
11980
|
+
pageSlice(positions).map((pos) => {
|
|
11981
|
+
const currentValue = pos.quantity * pos.marketPrice;
|
|
11982
|
+
const costBasis = pos.quantity * pos.averageEntryPrice;
|
|
11983
|
+
const pnl = pos.propertyPnl ?? currentValue - costBasis;
|
|
11984
|
+
const pnlPercent = pos.propertyPnlPercent ?? pos.percentChange ?? 0;
|
|
11985
|
+
const isPositive = pnl >= 0;
|
|
11986
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(PositionsRow, { onClick: () => onPositionClick?.(pos.tokenName, pos.isIpoAllocation), children: [
|
|
11987
|
+
/* @__PURE__ */ jsxRuntime.jsx(PositionsCell, { children: /* @__PURE__ */ jsxRuntime.jsx(HoldingsProperty, { children: pos.tokenName }) }),
|
|
11988
|
+
/* @__PURE__ */ jsxRuntime.jsx(PositionsCell, { $align: "right", children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: formatNumber2(pos.quantity) }) }),
|
|
11989
|
+
/* @__PURE__ */ jsxRuntime.jsx(PositionsCell, { $align: "right", children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: formatCurrency5(currentValue) }) }),
|
|
11990
|
+
/* @__PURE__ */ jsxRuntime.jsx(PositionsCell, { $align: "right", children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "rgba(255,255,255,0.7)", fontSize: "0.8rem" }, children: formatCurrency5(pos.averageEntryPrice) }) }),
|
|
11991
|
+
/* @__PURE__ */ jsxRuntime.jsx(PositionsCell, { $align: "right", children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: formatCurrency5(pos.marketPrice) }) }),
|
|
11992
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PositionsCell, { $align: "right", children: [
|
|
11993
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PnLAmount, { $positive: isPositive, children: [
|
|
11994
|
+
isPositive ? "+" : "-",
|
|
11995
|
+
formatCurrency5(Math.abs(pnl))
|
|
11986
11996
|
] }),
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
11991
|
-
|
|
11992
|
-
formatNumber2(pos.quantity),
|
|
11993
|
-
" ",
|
|
11994
|
-
pos.tokenName
|
|
11995
|
-
] }),
|
|
11996
|
-
/* @__PURE__ */ jsxRuntime.jsxs(HoldingsAvgEntry, { children: [
|
|
11997
|
-
"Avg ",
|
|
11998
|
-
formatCurrency5(pos.averageEntryPrice)
|
|
11999
|
-
] })
|
|
12000
|
-
] }),
|
|
12001
|
-
/* @__PURE__ */ jsxRuntime.jsxs(HoldingsPnL, { children: [
|
|
12002
|
-
/* @__PURE__ */ jsxRuntime.jsxs(PnLAmount, { $positive: isPositive, children: [
|
|
12003
|
-
isPositive ? "+" : "-",
|
|
12004
|
-
formatCurrency5(Math.abs(pnl))
|
|
12005
|
-
] }),
|
|
12006
|
-
/* @__PURE__ */ jsxRuntime.jsxs(PnLPercentage, { $positive: isPositive, children: [
|
|
12007
|
-
isPositive ? "+" : "",
|
|
12008
|
-
pnlPercent.toFixed(1),
|
|
12009
|
-
"%"
|
|
11997
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PnLPercentage, { $positive: isPositive, children: [
|
|
11998
|
+
isPositive ? "+" : "",
|
|
11999
|
+
pnlPercent.toFixed(1),
|
|
12000
|
+
"%"
|
|
12001
|
+
] })
|
|
12010
12002
|
] })
|
|
12011
|
-
] })
|
|
12012
|
-
|
|
12013
|
-
|
|
12003
|
+
] }, pos.tokenName);
|
|
12004
|
+
})
|
|
12005
|
+
] })
|
|
12014
12006
|
] }),
|
|
12015
12007
|
activeTab === "subscriptions" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
12016
12008
|
offeringOrders.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(EmptyState, { children: "IPO allocations will appear here once you subscribe." }),
|
|
@@ -12392,53 +12384,42 @@ var PaginationLabel = styled25__default.default.span`
|
|
|
12392
12384
|
font-size: 0.8rem;
|
|
12393
12385
|
color: rgba(255, 255, 255, 0.4);
|
|
12394
12386
|
`;
|
|
12395
|
-
var
|
|
12387
|
+
var PositionsHeader = styled25__default.default.div`
|
|
12388
|
+
display: grid;
|
|
12389
|
+
grid-template-columns: 1.2fr 0.8fr 1fr 1fr 1fr 1.2fr;
|
|
12390
|
+
gap: 0 0.5rem;
|
|
12391
|
+
padding: 0.4rem 0.5rem;
|
|
12392
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
|
12393
|
+
`;
|
|
12394
|
+
var PositionsHeaderCell = styled25__default.default.div`
|
|
12395
|
+
font-size: 0.68rem;
|
|
12396
|
+
font-weight: 500;
|
|
12397
|
+
color: rgba(255, 255, 255, 0.4);
|
|
12398
|
+
text-align: ${(p) => p.$align || "left"};
|
|
12399
|
+
white-space: nowrap;
|
|
12400
|
+
`;
|
|
12401
|
+
var PositionsRow = styled25__default.default.div`
|
|
12396
12402
|
display: grid;
|
|
12397
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
12403
|
+
grid-template-columns: 1.2fr 0.8fr 1fr 1fr 1fr 1.2fr;
|
|
12398
12404
|
align-items: center;
|
|
12399
|
-
|
|
12400
|
-
|
|
12405
|
+
gap: 0 0.5rem;
|
|
12406
|
+
padding: 0.5rem 0.5rem;
|
|
12401
12407
|
cursor: pointer;
|
|
12402
|
-
|
|
12408
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.03);
|
|
12409
|
+
&:last-child { border-bottom: none; }
|
|
12410
|
+
&:hover { background: rgba(255, 255, 255, 0.02); }
|
|
12403
12411
|
`;
|
|
12404
|
-
var
|
|
12412
|
+
var PositionsCell = styled25__default.default.div`
|
|
12405
12413
|
display: flex;
|
|
12406
12414
|
flex-direction: column;
|
|
12407
|
-
|
|
12415
|
+
align-items: ${(p) => p.$align === "right" ? "flex-end" : "flex-start"};
|
|
12416
|
+
gap: 0.1rem;
|
|
12408
12417
|
`;
|
|
12409
12418
|
var HoldingsProperty = styled25__default.default.div`
|
|
12410
|
-
font-size: 0.
|
|
12419
|
+
font-size: 0.8rem;
|
|
12411
12420
|
font-weight: 600;
|
|
12412
12421
|
color: #fff;
|
|
12413
12422
|
`;
|
|
12414
|
-
var HoldingsPortfolio = styled25__default.default.div`
|
|
12415
|
-
font-size: 0.7rem;
|
|
12416
|
-
color: rgba(255, 255, 255, 0.5);
|
|
12417
|
-
span {
|
|
12418
|
-
color: var(--color-accent, #E6C87E);
|
|
12419
|
-
font-weight: 500;
|
|
12420
|
-
}
|
|
12421
|
-
`;
|
|
12422
|
-
var HoldingsQuantity = styled25__default.default.div`
|
|
12423
|
-
display: flex;
|
|
12424
|
-
flex-direction: column;
|
|
12425
|
-
align-items: center;
|
|
12426
|
-
gap: 0.15rem;
|
|
12427
|
-
font-size: 0.85rem;
|
|
12428
|
-
font-weight: 500;
|
|
12429
|
-
color: #fff;
|
|
12430
|
-
`;
|
|
12431
|
-
var HoldingsAvgEntry = styled25__default.default.div`
|
|
12432
|
-
font-size: 0.7rem;
|
|
12433
|
-
color: var(--color-accent, #E6C87E);
|
|
12434
|
-
font-weight: 500;
|
|
12435
|
-
`;
|
|
12436
|
-
var HoldingsPnL = styled25__default.default.div`
|
|
12437
|
-
display: flex;
|
|
12438
|
-
flex-direction: column;
|
|
12439
|
-
align-items: flex-end;
|
|
12440
|
-
gap: 0.15rem;
|
|
12441
|
-
`;
|
|
12442
12423
|
var PnLAmount = styled25__default.default.div`
|
|
12443
12424
|
font-size: 0.85rem;
|
|
12444
12425
|
font-weight: 600;
|