@loafmarkets/ui 0.1.340 → 0.1.342

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 CHANGED
@@ -1731,21 +1731,6 @@ function useAmountChangeFlash(ref, amount, side) {
1731
1731
  prevAmountRef.current = amount;
1732
1732
  }, [amount, ref, side]);
1733
1733
  }
1734
- function useMidPriceFlash(ref, midPrice, restBgColor) {
1735
- const prevMidRef = React5__namespace.useRef(midPrice);
1736
- React5__namespace.useEffect(() => {
1737
- const prev = prevMidRef.current;
1738
- const node = ref.current;
1739
- if (prev !== midPrice && prev > 0 && midPrice > 0 && node && typeof node.animate === "function") {
1740
- const color = midPrice > prev ? FLASH_UP_COLOR : FLASH_DOWN_COLOR;
1741
- node.animate(
1742
- [{ backgroundColor: color }, { backgroundColor: restBgColor }],
1743
- { duration: FLASH_DURATION_MS, easing: "ease-out" }
1744
- );
1745
- }
1746
- prevMidRef.current = midPrice;
1747
- }, [midPrice, ref, restBgColor]);
1748
- }
1749
1734
  function ExternalLinkIcon() {
1750
1735
  return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1 9L9 1M9 1H4M9 1V6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
1751
1736
  }
@@ -2089,8 +2074,6 @@ function DesktopOrderbookLayout({
2089
2074
  compactLevelCount: _compactLevelCount,
2090
2075
  fillHeight
2091
2076
  }) {
2092
- const midRef = React5__namespace.useRef(null);
2093
- useMidPriceFlash(midRef, midPrice, "#0b1a24");
2094
2077
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2095
2078
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-4 pt-4", children: [
2096
2079
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
@@ -2218,7 +2201,6 @@ function DesktopOrderbookLayout({
2218
2201
  /* @__PURE__ */ jsxRuntime.jsx(
2219
2202
  "div",
2220
2203
  {
2221
- ref: midRef,
2222
2204
  className: "flex items-center gap-2 bg-[#0b1a24] px-3 py-2 flex-shrink-0 overflow-hidden orderbook-mid-row",
2223
2205
  children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("text-lg font-semibold tabular-nums whitespace-nowrap orderbook-mid-price", midClass), children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: 110, height: 20 }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2224
2206
  "$",
@@ -2287,8 +2269,6 @@ function MobileOrderbookLayout({
2287
2269
  levelCount: _levelCount,
2288
2270
  compactLevelCount: effectiveCompactLevels
2289
2271
  }) {
2290
- const midRef = React5__namespace.useRef(null);
2291
- useMidPriceFlash(midRef, midPrice, "transparent");
2292
2272
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2293
2273
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 pt-2", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
2294
2274
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
@@ -2374,7 +2354,6 @@ function MobileOrderbookLayout({
2374
2354
  /* @__PURE__ */ jsxRuntime.jsxs(
2375
2355
  "div",
2376
2356
  {
2377
- ref: midRef,
2378
2357
  className: "grid",
2379
2358
  style: {
2380
2359
  gridTemplateColumns: "1.2fr 0.8fr",
@@ -3163,7 +3142,7 @@ function PropertyMediaRow({
3163
3142
  videoTitle,
3164
3143
  className
3165
3144
  }) {
3166
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4 lg:flex-row lg:items-stretch lg:gap-6 lg:h-[700px]", className), children: [
3145
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4 lg:flex-row lg:items-stretch lg:gap-6 lg:h-[480px] xl:h-[700px]", className), children: [
3167
3146
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:hidden h-[320px]", children: /* @__PURE__ */ jsxRuntime.jsx(PropertyTour, { title: videoTitle, src: videoSrc, className: "h-full w-full !max-w-none" }) }),
3168
3147
  /* @__PURE__ */ jsxRuntime.jsx(
3169
3148
  "div",
@@ -11441,13 +11420,9 @@ var IPOAssetSelector = styled9__default.default.div`
11441
11420
  &:hover { box-shadow: 0 12px 32px rgba(0,0,0,0.4); border-color: rgba(255,255,255,0.15); }
11442
11421
 
11443
11422
  @media (max-width: 768px) {
11444
- flex-wrap: wrap;
11445
- padding: 0.75rem 1rem;
11446
- gap: 0.5rem;
11447
- }
11448
-
11449
- @media (max-width: 480px) {
11423
+ flex-wrap: nowrap;
11450
11424
  padding: 0.6rem 0.75rem;
11425
+ gap: 0.4rem;
11451
11426
  }
11452
11427
  `;
11453
11428
  var AssetThumbnail = styled9__default.default.img`
@@ -11526,9 +11501,9 @@ var SelectorMetrics = styled9__default.default.div`
11526
11501
  var TrailingWrapper = styled9__default.default.div`
11527
11502
  display: flex;
11528
11503
  align-items: center;
11504
+ flex-shrink: 0;
11529
11505
 
11530
11506
  @media (max-width: 768px) {
11531
- width: 100%;
11532
11507
  overflow-x: auto;
11533
11508
  -webkit-overflow-scrolling: touch;
11534
11509
  scrollbar-width: none;
@@ -11543,7 +11518,7 @@ var TrailingInner = styled9__default.default.div`
11543
11518
  display: inline-flex;
11544
11519
  align-items: center;
11545
11520
  min-width: max-content;
11546
- gap: 0.75rem;
11521
+ gap: 0.5rem;
11547
11522
  }
11548
11523
  `;
11549
11524
  var MetricLabel = styled9__default.default.span`
@@ -13379,6 +13354,7 @@ function OrderConfirmationModal({
13379
13354
  onConfirm();
13380
13355
  },
13381
13356
  disabled: isPlacing,
13357
+ "data-placing": isPlacing,
13382
13358
  children: isPlacing ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
13383
13359
  /* @__PURE__ */ jsxRuntime.jsx(Spinner, { "aria-hidden": true }),
13384
13360
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: placingLabel })
@@ -13410,6 +13386,7 @@ var Modal = styled9__default.default.div`
13410
13386
  max-width: 480px;
13411
13387
  width: 90%;
13412
13388
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
13389
+ overflow: hidden;
13413
13390
  `;
13414
13391
  var ModalHeader = styled9__default.default.div`
13415
13392
  display: flex;
@@ -13544,6 +13521,7 @@ var BaseButton = styled9__default.default.button`
13544
13521
  justify-content: center;
13545
13522
  white-space: nowrap;
13546
13523
  flex-shrink: 0;
13524
+ overflow: hidden;
13547
13525
  &:disabled {
13548
13526
  cursor: not-allowed;
13549
13527
  opacity: 0.75;
@@ -13559,6 +13537,10 @@ var PrimaryButton = styled9__default.default(BaseButton)`
13559
13537
  color: #fff;
13560
13538
  border: none;
13561
13539
  box-shadow: 0 4px 12px rgba(14,203,129,0.3);
13540
+ &[data-placing='true'] {
13541
+ font-size: 0.8rem;
13542
+ padding: 0.75rem 0.9rem;
13543
+ }
13562
13544
  `;
13563
13545
 
13564
13546
  // src/components/property-buy/constants.ts
@@ -14033,23 +14015,29 @@ function PortfolioActivityPanel({
14033
14015
  activeTab === "subscriptions" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14034
14016
  offeringOrders.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(EmptyState, { children: "IPO allocations will appear here once you subscribe." }),
14035
14017
  offeringOrders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14036
- /* @__PURE__ */ jsxRuntime.jsxs(GridHeader, { $columns: "1.2fr 0.8fr 1fr 1fr 0.8fr 1fr", children: [
14018
+ /* @__PURE__ */ jsxRuntime.jsxs(GridHeader, { $columns: "1.2fr 0.8fr 1fr 1fr 0.8fr 1fr 36px", children: [
14037
14019
  /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Asset" }),
14038
14020
  /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Qty" }),
14039
14021
  /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Price" }),
14040
14022
  /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Total" }),
14041
14023
  /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Status" }),
14042
- /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Date" })
14024
+ /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Date" }),
14025
+ /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, {})
14043
14026
  ] }),
14044
14027
  pagedOfferingOrders.map((order) => {
14045
14028
  const meta = getOrderStatusMeta(order.status);
14046
- return /* @__PURE__ */ jsxRuntime.jsxs(GridRow, { $columns: "1.2fr 0.8fr 1fr 1fr 0.8fr 1fr", children: [
14029
+ return /* @__PURE__ */ jsxRuntime.jsxs(GridRow, { $columns: "1.2fr 0.8fr 1fr 1fr 0.8fr 1fr 36px", children: [
14047
14030
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $primary: true, children: order.tokenName }) }),
14048
14031
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { children: formatNumber2(order.quantity) }) }),
14049
14032
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: formatCurrency4(order.price) }) }),
14050
14033
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { children: formatCurrency4(order.price * order.quantity) }) }),
14051
14034
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(ActivityTag, { $color: meta.color, $bg: meta.bg, children: prettyLabel(order.status) }) }),
14052
- /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: formatTimestamp(order.createdAt) }) })
14035
+ /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: formatTimestamp(order.createdAt) }) }),
14036
+ /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: order.txHash && /* @__PURE__ */ jsxRuntime.jsx(TxLink, { href: `${_blockExplorerBaseUrl}/${order.txHash}`, target: "_blank", rel: "noopener noreferrer", title: "View on BaseScan", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
14037
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
14038
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "15 3 21 3 21 9" }),
14039
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
14040
+ ] }) }) })
14053
14041
  ] }, `${order.tokenName}-${order.txHash}-${order.createdAt}`);
14054
14042
  })
14055
14043
  ] })
@@ -14137,14 +14125,15 @@ function PortfolioActivityPanel({
14137
14125
  activeTab === "trades" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14138
14126
  tradeHistory.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(EmptyState, { children: "Completed trades will appear here." }),
14139
14127
  tradeHistory.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14140
- /* @__PURE__ */ jsxRuntime.jsxs(GridHeader, { $columns: "1.2fr 0.6fr 0.8fr 1fr 1fr 1fr 1fr", children: [
14128
+ /* @__PURE__ */ jsxRuntime.jsxs(GridHeader, { $columns: "1.2fr 0.6fr 0.8fr 1fr 1fr 1fr 1fr 36px", children: [
14141
14129
  /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Asset" }),
14142
14130
  /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Side" }),
14143
14131
  /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Qty" }),
14144
14132
  /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Price" }),
14145
14133
  /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Total" }),
14146
14134
  /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Settlement" }),
14147
- /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Date" })
14135
+ /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, { children: "Date" }),
14136
+ /* @__PURE__ */ jsxRuntime.jsx(GridHeaderCell, {})
14148
14137
  ] }),
14149
14138
  pagedTradeHistory.map((trade) => {
14150
14139
  const s = trade.status?.toUpperCase();
@@ -14153,14 +14142,19 @@ function PortfolioActivityPanel({
14153
14142
  const isSettling = !isSettled && !isFailed && !!trade.status;
14154
14143
  const settlementLabel = isSettled ? "Settled" : isFailed ? "Settlement Failed" : isSettling ? prettyLabel(trade.status) : "\u2014";
14155
14144
  const settlementMeta = isSettled ? { color: "#0ecb81", bg: "rgba(14,203,129,0.1)" } : isFailed ? { color: "#f6465d", bg: "rgba(246,70,93,0.12)" } : isSettling ? { color: "#f0b90b", bg: "rgba(240,185,11,0.15)" } : null;
14156
- return /* @__PURE__ */ jsxRuntime.jsxs(GridRow, { $columns: "1.2fr 0.6fr 0.8fr 1fr 1fr 1fr 1fr", children: [
14145
+ return /* @__PURE__ */ jsxRuntime.jsxs(GridRow, { $columns: "1.2fr 0.6fr 0.8fr 1fr 1fr 1fr 1fr 36px", children: [
14157
14146
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $primary: true, children: trade.tokenName }) }),
14158
14147
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(SideBadge, { $side: sideLabel(trade.side), children: sideLabel(trade.side) }) }),
14159
14148
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { children: formatNumber2(trade.quantity) }) }),
14160
14149
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { children: formatCurrency4(trade.price) }) }),
14161
14150
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { children: formatCurrency4(trade.price * trade.quantity) }) }),
14162
14151
  /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: settlementMeta ? /* @__PURE__ */ jsxRuntime.jsx(ActivityTag, { $color: settlementMeta.color, $bg: settlementMeta.bg, children: settlementLabel }) : /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: "\u2014" }) }),
14163
- /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: formatTimestamp(trade.executedAt) }) })
14152
+ /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: /* @__PURE__ */ jsxRuntime.jsx(CellText, { $muted: true, children: formatTimestamp(trade.executedAt) }) }),
14153
+ /* @__PURE__ */ jsxRuntime.jsx(GridCell, { children: trade.txHash && /* @__PURE__ */ jsxRuntime.jsx(TxLink, { href: `${_blockExplorerBaseUrl}/${trade.txHash}`, target: "_blank", rel: "noopener noreferrer", title: "View on BaseScan", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "15", height: "15", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
14154
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
14155
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "15 3 21 3 21 9" }),
14156
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
14157
+ ] }) }) })
14164
14158
  ] }, trade.tradeId);
14165
14159
  })
14166
14160
  ] })