@loafmarkets/ui 0.1.431 → 0.1.432
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 +28 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16720,6 +16720,23 @@ var sideLabel = (side) => side?.toUpperCase() === "SELL" ? "Sell" : "Buy";
|
|
|
16720
16720
|
var isLiveOrder = (o) => o.status === "OPEN" || o.status === "PARTIALLY_FILLED" || o.status === "PENDING" || o.status === "ARMED";
|
|
16721
16721
|
var isMarketType = (type) => type === "MARKET" || type.endsWith("_MARKET");
|
|
16722
16722
|
var filledLabel = (order) => order.filledQuantity == null ? "\u2014" : `${order.quantity > 0 ? Math.round(order.filledQuantity / order.quantity * 100) : 0}%`;
|
|
16723
|
+
var ReasonMarker = styled10__default.default.span`
|
|
16724
|
+
display: inline-flex;
|
|
16725
|
+
align-items: center;
|
|
16726
|
+
justify-content: center;
|
|
16727
|
+
width: 0.95rem;
|
|
16728
|
+
height: 0.95rem;
|
|
16729
|
+
margin-left: 0.3rem;
|
|
16730
|
+
border: 1px solid rgba(246, 70, 93, 0.5);
|
|
16731
|
+
border-radius: 50%;
|
|
16732
|
+
color: #f6465d;
|
|
16733
|
+
font-size: 0.6rem;
|
|
16734
|
+
font-style: italic;
|
|
16735
|
+
font-weight: 600;
|
|
16736
|
+
line-height: 1;
|
|
16737
|
+
cursor: help;
|
|
16738
|
+
flex-shrink: 0;
|
|
16739
|
+
`;
|
|
16723
16740
|
var TriggerText = styled10__default.default.span`
|
|
16724
16741
|
display: block;
|
|
16725
16742
|
font-size: 0.68rem;
|
|
@@ -17387,7 +17404,7 @@ function PortfolioActivityPanel({
|
|
|
17387
17404
|
] })
|
|
17388
17405
|
] }, `open-${order.id}`);
|
|
17389
17406
|
}) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17390
|
-
/* @__PURE__ */ jsxRuntime.jsxs(GridHeader, { $columns: onCancelOrder ? "0.
|
|
17407
|
+
/* @__PURE__ */ jsxRuntime.jsxs(GridHeader, { $columns: onCancelOrder ? "0.45fr 1.05fr 0.55fr 1fr 0.8fr 1.1fr 0.7fr 0.85fr 82px" : "0.45fr 1.05fr 0.55fr 1fr 0.8fr 1.1fr 0.7fr 0.85fr", children: [
|
|
17391
17408
|
/* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "ID" }),
|
|
17392
17409
|
/* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Asset" }),
|
|
17393
17410
|
/* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Side" }),
|
|
@@ -17404,7 +17421,7 @@ function PortfolioActivityPanel({
|
|
|
17404
17421
|
const filledPercent = filledLabel(order);
|
|
17405
17422
|
const isCancelling = cancellingOrderId === order.id;
|
|
17406
17423
|
const sideColor = sideLabel(order.side) === "Buy" ? "#0ecb81" : "#f6465d";
|
|
17407
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(GridRow, { $columns: onCancelOrder ? "0.
|
|
17424
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(GridRow, { $columns: onCancelOrder ? "0.45fr 1.05fr 0.55fr 1fr 0.8fr 1.1fr 0.7fr 0.85fr 82px" : "0.45fr 1.05fr 0.55fr 1fr 0.8fr 1.1fr 0.7fr 0.85fr", children: [
|
|
17408
17425
|
/* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: order.id > 0 ? `#${order.id}` : "\u2014" }) }),
|
|
17409
17426
|
/* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $primary: true, $color: sideColor, $noHoverColor: true, $clickable: !!onAssetClick, onClick: onAssetClick ? () => onAssetClick(order.tokenName) : void 0, children: order.tokenName }) }),
|
|
17410
17427
|
/* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(SideBadge, { $side: sideLabel(order.side), children: sideLabel(order.side) }) }),
|
|
@@ -17413,7 +17430,7 @@ function PortfolioActivityPanel({
|
|
|
17413
17430
|
formatNumber2(order.quantity),
|
|
17414
17431
|
order.ticker && /* @__PURE__ */ jsxRuntime.jsx(TickerTag, { children: order.ticker.toUpperCase() })
|
|
17415
17432
|
] }) }),
|
|
17416
|
-
/* @__PURE__ */ jsxRuntime.jsxs(GridCell, { children: [
|
|
17433
|
+
/* @__PURE__ */ jsxRuntime.jsxs(GridCell, { $stack: order.triggerPrice != null, children: [
|
|
17417
17434
|
/* @__PURE__ */ jsxRuntime.jsx(CellText, { children: isMarket || !order.price ? "Market" : formatCurrency4(order.price) }),
|
|
17418
17435
|
order.triggerPrice != null && /* @__PURE__ */ jsxRuntime.jsxs(TriggerText, { children: [
|
|
17419
17436
|
"Trigger ",
|
|
@@ -17423,7 +17440,7 @@ function PortfolioActivityPanel({
|
|
|
17423
17440
|
/* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: filledPercent }) }),
|
|
17424
17441
|
/* @__PURE__ */ jsxRuntime.jsxs(GridCell, { children: [
|
|
17425
17442
|
/* @__PURE__ */ jsxRuntime.jsx(ActivityTag, { $color: meta.color, $bg: meta.bg, children: prettyLabel(order.status) }),
|
|
17426
|
-
order.triggerPrice != null && order.rejectionReason && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17443
|
+
order.triggerPrice != null && order.rejectionReason && /* @__PURE__ */ jsxRuntime.jsx(ReasonMarker, { title: order.rejectionReason, "aria-label": "Why this order failed", children: "i" })
|
|
17427
17444
|
] }),
|
|
17428
17445
|
onCancelOrder && /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17429
17446
|
CancelButton,
|
|
@@ -17507,7 +17524,7 @@ function PortfolioActivityPanel({
|
|
|
17507
17524
|
] }, rowKey);
|
|
17508
17525
|
}),
|
|
17509
17526
|
mergedOrderHistory.length > 0 && !compactPositions && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17510
|
-
/* @__PURE__ */ jsxRuntime.jsxs(GridHeader, { $columns: "0.
|
|
17527
|
+
/* @__PURE__ */ jsxRuntime.jsxs(GridHeader, { $columns: "0.45fr 1.05fr 0.55fr 1fr 0.8fr 1.1fr 0.7fr 0.85fr 1fr", children: [
|
|
17511
17528
|
/* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "ID" }),
|
|
17512
17529
|
/* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Asset" }),
|
|
17513
17530
|
/* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Side" }),
|
|
@@ -17524,7 +17541,7 @@ function PortfolioActivityPanel({
|
|
|
17524
17541
|
const filledPercent = filledLabel(order);
|
|
17525
17542
|
const typeLabel = order.isOfferingOrder ? "Initial Offering" : prettyLabel(order.type);
|
|
17526
17543
|
const sideColor = sideLabel(order.side) === "Buy" ? "#0ecb81" : "#f6465d";
|
|
17527
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(GridRow, { $columns: "0.
|
|
17544
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(GridRow, { $columns: "0.45fr 1.05fr 0.55fr 1fr 0.8fr 1.1fr 0.7fr 0.85fr 1fr", children: [
|
|
17528
17545
|
/* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: order.id > 0 ? `#${order.id}` : "\u2014" }) }),
|
|
17529
17546
|
/* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $primary: true, $color: sideColor, $noHoverColor: true, $clickable: !!onAssetClick, onClick: onAssetClick ? () => onAssetClick(order.tokenName) : void 0, children: order.tokenName }) }),
|
|
17530
17547
|
/* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(SideBadge, { $side: sideLabel(order.side), children: sideLabel(order.side) }) }),
|
|
@@ -17533,7 +17550,7 @@ function PortfolioActivityPanel({
|
|
|
17533
17550
|
formatNumber2(order.quantity),
|
|
17534
17551
|
order.ticker && /* @__PURE__ */ jsxRuntime.jsx(TickerTag, { children: order.ticker.toUpperCase() })
|
|
17535
17552
|
] }) }),
|
|
17536
|
-
/* @__PURE__ */ jsxRuntime.jsxs(GridCell, { children: [
|
|
17553
|
+
/* @__PURE__ */ jsxRuntime.jsxs(GridCell, { $stack: order.triggerPrice != null, children: [
|
|
17537
17554
|
/* @__PURE__ */ jsxRuntime.jsx(CellText, { children: isMarket || !order.price ? "Market" : formatCurrency4(order.price) }),
|
|
17538
17555
|
order.triggerPrice != null && /* @__PURE__ */ jsxRuntime.jsxs(TriggerText, { children: [
|
|
17539
17556
|
"Trigger ",
|
|
@@ -17543,7 +17560,7 @@ function PortfolioActivityPanel({
|
|
|
17543
17560
|
/* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: filledPercent }) }),
|
|
17544
17561
|
/* @__PURE__ */ jsxRuntime.jsxs(GridCell, { children: [
|
|
17545
17562
|
/* @__PURE__ */ jsxRuntime.jsx(ActivityTag, { $color: meta.color, $bg: meta.bg, children: prettyLabel(order.status) }),
|
|
17546
|
-
order.triggerPrice != null && order.rejectionReason && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17563
|
+
order.triggerPrice != null && order.rejectionReason && /* @__PURE__ */ jsxRuntime.jsx(ReasonMarker, { title: order.rejectionReason, "aria-label": "Why this order failed", children: "i" })
|
|
17547
17564
|
] }),
|
|
17548
17565
|
/* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: formatTimestamp(order.createdAt) }) })
|
|
17549
17566
|
] }, order.id);
|
|
@@ -18016,7 +18033,9 @@ var GridRow = styled10__default.default.div`
|
|
|
18016
18033
|
`;
|
|
18017
18034
|
var GridCell = styled10__default.default.div`
|
|
18018
18035
|
display: flex;
|
|
18019
|
-
align-items: center;
|
|
18036
|
+
align-items: ${(p) => p.$stack ? "flex-start" : "center"};
|
|
18037
|
+
flex-direction: ${(p) => p.$stack ? "column" : "row"};
|
|
18038
|
+
justify-content: center;
|
|
18020
18039
|
min-width: 0;
|
|
18021
18040
|
`;
|
|
18022
18041
|
var CellText = styled10__default.default.span`
|