@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.mjs
CHANGED
|
@@ -11942,49 +11942,41 @@ function PortfolioActivityPanel({
|
|
|
11942
11942
|
] }),
|
|
11943
11943
|
activeTab === "positions" && showPositionsTab && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11944
11944
|
positions.length === 0 && /* @__PURE__ */ jsx(EmptyState, { children: "No positions yet. Subscribe to an offering or buy on the secondary market." }),
|
|
11945
|
-
positions.length > 0 && /* @__PURE__ */
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11949
|
-
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
|
|
11945
|
+
positions.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11946
|
+
/* @__PURE__ */ jsxs(PositionsHeader, { children: [
|
|
11947
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { children: "Asset" }),
|
|
11948
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { $align: "right", children: "Size" }),
|
|
11949
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { $align: "right", children: "Value" }),
|
|
11950
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { $align: "right", children: "Entry Price" }),
|
|
11951
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { $align: "right", children: "Mark Price" }),
|
|
11952
|
+
/* @__PURE__ */ jsx(PositionsHeaderCell, { $align: "right", children: "PNL (%)" })
|
|
11953
|
+
] }),
|
|
11954
|
+
pageSlice(positions).map((pos) => {
|
|
11955
|
+
const currentValue = pos.quantity * pos.marketPrice;
|
|
11956
|
+
const costBasis = pos.quantity * pos.averageEntryPrice;
|
|
11957
|
+
const pnl = pos.propertyPnl ?? currentValue - costBasis;
|
|
11958
|
+
const pnlPercent = pos.propertyPnlPercent ?? pos.percentChange ?? 0;
|
|
11959
|
+
const isPositive = pnl >= 0;
|
|
11960
|
+
return /* @__PURE__ */ jsxs(PositionsRow, { onClick: () => onPositionClick?.(pos.tokenName, pos.isIpoAllocation), children: [
|
|
11961
|
+
/* @__PURE__ */ jsx(PositionsCell, { children: /* @__PURE__ */ jsx(HoldingsProperty, { children: pos.tokenName }) }),
|
|
11962
|
+
/* @__PURE__ */ jsx(PositionsCell, { $align: "right", children: /* @__PURE__ */ jsx("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: formatNumber2(pos.quantity) }) }),
|
|
11963
|
+
/* @__PURE__ */ jsx(PositionsCell, { $align: "right", children: /* @__PURE__ */ jsx("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: formatCurrency5(currentValue) }) }),
|
|
11964
|
+
/* @__PURE__ */ jsx(PositionsCell, { $align: "right", children: /* @__PURE__ */ jsx("span", { style: { color: "rgba(255,255,255,0.7)", fontSize: "0.8rem" }, children: formatCurrency5(pos.averageEntryPrice) }) }),
|
|
11965
|
+
/* @__PURE__ */ jsx(PositionsCell, { $align: "right", children: /* @__PURE__ */ jsx("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: formatCurrency5(pos.marketPrice) }) }),
|
|
11966
|
+
/* @__PURE__ */ jsxs(PositionsCell, { $align: "right", children: [
|
|
11967
|
+
/* @__PURE__ */ jsxs(PnLAmount, { $positive: isPositive, children: [
|
|
11968
|
+
isPositive ? "+" : "-",
|
|
11969
|
+
formatCurrency5(Math.abs(pnl))
|
|
11960
11970
|
] }),
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
formatNumber2(pos.quantity),
|
|
11967
|
-
" ",
|
|
11968
|
-
pos.tokenName
|
|
11969
|
-
] }),
|
|
11970
|
-
/* @__PURE__ */ jsxs(HoldingsAvgEntry, { children: [
|
|
11971
|
-
"Avg ",
|
|
11972
|
-
formatCurrency5(pos.averageEntryPrice)
|
|
11973
|
-
] })
|
|
11974
|
-
] }),
|
|
11975
|
-
/* @__PURE__ */ jsxs(HoldingsPnL, { children: [
|
|
11976
|
-
/* @__PURE__ */ jsxs(PnLAmount, { $positive: isPositive, children: [
|
|
11977
|
-
isPositive ? "+" : "-",
|
|
11978
|
-
formatCurrency5(Math.abs(pnl))
|
|
11979
|
-
] }),
|
|
11980
|
-
/* @__PURE__ */ jsxs(PnLPercentage, { $positive: isPositive, children: [
|
|
11981
|
-
isPositive ? "+" : "",
|
|
11982
|
-
pnlPercent.toFixed(1),
|
|
11983
|
-
"%"
|
|
11971
|
+
/* @__PURE__ */ jsxs(PnLPercentage, { $positive: isPositive, children: [
|
|
11972
|
+
isPositive ? "+" : "",
|
|
11973
|
+
pnlPercent.toFixed(1),
|
|
11974
|
+
"%"
|
|
11975
|
+
] })
|
|
11984
11976
|
] })
|
|
11985
|
-
] })
|
|
11986
|
-
|
|
11987
|
-
|
|
11977
|
+
] }, pos.tokenName);
|
|
11978
|
+
})
|
|
11979
|
+
] })
|
|
11988
11980
|
] }),
|
|
11989
11981
|
activeTab === "subscriptions" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11990
11982
|
offeringOrders.length === 0 && /* @__PURE__ */ jsx(EmptyState, { children: "IPO allocations will appear here once you subscribe." }),
|
|
@@ -12366,53 +12358,42 @@ var PaginationLabel = styled25.span`
|
|
|
12366
12358
|
font-size: 0.8rem;
|
|
12367
12359
|
color: rgba(255, 255, 255, 0.4);
|
|
12368
12360
|
`;
|
|
12369
|
-
var
|
|
12361
|
+
var PositionsHeader = styled25.div`
|
|
12362
|
+
display: grid;
|
|
12363
|
+
grid-template-columns: 1.2fr 0.8fr 1fr 1fr 1fr 1.2fr;
|
|
12364
|
+
gap: 0 0.5rem;
|
|
12365
|
+
padding: 0.4rem 0.5rem;
|
|
12366
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
|
12367
|
+
`;
|
|
12368
|
+
var PositionsHeaderCell = styled25.div`
|
|
12369
|
+
font-size: 0.68rem;
|
|
12370
|
+
font-weight: 500;
|
|
12371
|
+
color: rgba(255, 255, 255, 0.4);
|
|
12372
|
+
text-align: ${(p) => p.$align || "left"};
|
|
12373
|
+
white-space: nowrap;
|
|
12374
|
+
`;
|
|
12375
|
+
var PositionsRow = styled25.div`
|
|
12370
12376
|
display: grid;
|
|
12371
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
12377
|
+
grid-template-columns: 1.2fr 0.8fr 1fr 1fr 1fr 1.2fr;
|
|
12372
12378
|
align-items: center;
|
|
12373
|
-
|
|
12374
|
-
|
|
12379
|
+
gap: 0 0.5rem;
|
|
12380
|
+
padding: 0.5rem 0.5rem;
|
|
12375
12381
|
cursor: pointer;
|
|
12376
|
-
|
|
12382
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.03);
|
|
12383
|
+
&:last-child { border-bottom: none; }
|
|
12384
|
+
&:hover { background: rgba(255, 255, 255, 0.02); }
|
|
12377
12385
|
`;
|
|
12378
|
-
var
|
|
12386
|
+
var PositionsCell = styled25.div`
|
|
12379
12387
|
display: flex;
|
|
12380
12388
|
flex-direction: column;
|
|
12381
|
-
|
|
12389
|
+
align-items: ${(p) => p.$align === "right" ? "flex-end" : "flex-start"};
|
|
12390
|
+
gap: 0.1rem;
|
|
12382
12391
|
`;
|
|
12383
12392
|
var HoldingsProperty = styled25.div`
|
|
12384
|
-
font-size: 0.
|
|
12393
|
+
font-size: 0.8rem;
|
|
12385
12394
|
font-weight: 600;
|
|
12386
12395
|
color: #fff;
|
|
12387
12396
|
`;
|
|
12388
|
-
var HoldingsPortfolio = styled25.div`
|
|
12389
|
-
font-size: 0.7rem;
|
|
12390
|
-
color: rgba(255, 255, 255, 0.5);
|
|
12391
|
-
span {
|
|
12392
|
-
color: var(--color-accent, #E6C87E);
|
|
12393
|
-
font-weight: 500;
|
|
12394
|
-
}
|
|
12395
|
-
`;
|
|
12396
|
-
var HoldingsQuantity = styled25.div`
|
|
12397
|
-
display: flex;
|
|
12398
|
-
flex-direction: column;
|
|
12399
|
-
align-items: center;
|
|
12400
|
-
gap: 0.15rem;
|
|
12401
|
-
font-size: 0.85rem;
|
|
12402
|
-
font-weight: 500;
|
|
12403
|
-
color: #fff;
|
|
12404
|
-
`;
|
|
12405
|
-
var HoldingsAvgEntry = styled25.div`
|
|
12406
|
-
font-size: 0.7rem;
|
|
12407
|
-
color: var(--color-accent, #E6C87E);
|
|
12408
|
-
font-weight: 500;
|
|
12409
|
-
`;
|
|
12410
|
-
var HoldingsPnL = styled25.div`
|
|
12411
|
-
display: flex;
|
|
12412
|
-
flex-direction: column;
|
|
12413
|
-
align-items: flex-end;
|
|
12414
|
-
gap: 0.15rem;
|
|
12415
|
-
`;
|
|
12416
12397
|
var PnLAmount = styled25.div`
|
|
12417
12398
|
font-size: 0.85rem;
|
|
12418
12399
|
font-weight: 600;
|