@agg-market/ui 3.0.0 → 4.0.0

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.
Files changed (85) hide show
  1. package/dist/chart.js +18 -5
  2. package/dist/chart.mjs +2 -2
  3. package/dist/{chunk-LK5D3ZTK.mjs → chunk-3QLOUBDJ.mjs} +1 -1
  4. package/dist/{chunk-4KMFDCAH.mjs → chunk-3W7NBJLU.mjs} +2 -2
  5. package/dist/{chunk-KCPDVBIZ.mjs → chunk-4S3I6X7F.mjs} +14 -13
  6. package/dist/{chunk-OA2IZ3VW.mjs → chunk-5ADMXO3Y.mjs} +1 -1
  7. package/dist/{chunk-7NISYVSJ.mjs → chunk-6JG6I5AY.mjs} +1 -1
  8. package/dist/{chunk-TA7LKYKP.mjs → chunk-DCORNTCY.mjs} +1 -1
  9. package/dist/{chunk-QYZKC7KG.mjs → chunk-GNSPZ53C.mjs} +87 -86
  10. package/dist/{chunk-422MCIXV.mjs → chunk-HOXTJ742.mjs} +15 -11
  11. package/dist/{chunk-KFOATMAE.mjs → chunk-JNH64AKR.mjs} +32 -25
  12. package/dist/{chunk-DL7STJQ5.mjs → chunk-LA3FBBSJ.mjs} +3 -3
  13. package/dist/{chunk-CTVMT3VL.mjs → chunk-LCZKSITC.mjs} +2 -2
  14. package/dist/chunk-M4RJHRFT.mjs +445 -0
  15. package/dist/{chunk-D5FTFSKL.mjs → chunk-MBHTXNHX.mjs} +4 -4
  16. package/dist/{chunk-O46OFVH6.mjs → chunk-MJHKBCXQ.mjs} +2 -2
  17. package/dist/{chunk-2MJY6RVY.mjs → chunk-NH2G3POM.mjs} +1 -1
  18. package/dist/{chunk-BEDUFOIG.mjs → chunk-OH56VUYK.mjs} +6 -20
  19. package/dist/{chunk-BN5VVHNV.mjs → chunk-OJVTGNIF.mjs} +17 -4
  20. package/dist/{chunk-6425RRBI.mjs → chunk-P2PJBO5C.mjs} +1 -1
  21. package/dist/{chunk-D7JTOGYP.mjs → chunk-PORVP72S.mjs} +22 -2
  22. package/dist/{chunk-5GDNWQZS.mjs → chunk-QLMVKLNJ.mjs} +1 -1
  23. package/dist/{chunk-GHB3GOCW.mjs → chunk-QM7CGMFG.mjs} +5 -21
  24. package/dist/connect-button.js +22 -2
  25. package/dist/connect-button.mjs +2 -2
  26. package/dist/deposit-modal.js +22 -2
  27. package/dist/deposit-modal.mjs +2 -2
  28. package/dist/event-list-item-details.js +235 -243
  29. package/dist/event-list-item-details.mjs +7 -7
  30. package/dist/event-list-item.js +178 -210
  31. package/dist/event-list-item.mjs +4 -4
  32. package/dist/event-list.js +181 -225
  33. package/dist/event-list.mjs +5 -5
  34. package/dist/event-market-page.d.mts +1 -1
  35. package/dist/event-market-page.d.ts +1 -1
  36. package/dist/event-market-page.js +498 -576
  37. package/dist/event-market-page.mjs +11 -12
  38. package/dist/home-page.js +181 -225
  39. package/dist/home-page.mjs +6 -6
  40. package/dist/index.d.mts +3 -3
  41. package/dist/index.d.ts +3 -3
  42. package/dist/index.js +331 -347
  43. package/dist/index.mjs +21 -21
  44. package/dist/market-details.d.mts +1 -1
  45. package/dist/market-details.d.ts +1 -1
  46. package/dist/market-details.js +345 -417
  47. package/dist/market-details.mjs +7 -8
  48. package/dist/onboarding-modal.js +35 -14
  49. package/dist/onboarding-modal.mjs +2 -2
  50. package/dist/place-order.d.mts +1 -1
  51. package/dist/place-order.d.ts +1 -1
  52. package/dist/place-order.js +173 -191
  53. package/dist/place-order.mjs +3 -3
  54. package/dist/profile-modal.js +22 -2
  55. package/dist/profile-modal.mjs +2 -2
  56. package/dist/search.d.mts +1 -1
  57. package/dist/search.d.ts +1 -1
  58. package/dist/search.js +22 -2
  59. package/dist/search.mjs +2 -2
  60. package/dist/settlement.d.mts +1 -1
  61. package/dist/settlement.d.ts +1 -1
  62. package/dist/settlement.js +173 -191
  63. package/dist/settlement.mjs +3 -3
  64. package/dist/skeleton.js +151 -189
  65. package/dist/skeleton.mjs +1 -1
  66. package/dist/styles.css +1 -1
  67. package/dist/switch-button.js +2 -2
  68. package/dist/switch-button.mjs +1 -1
  69. package/dist/tailwind.css +1 -1
  70. package/dist/user-profile-page.d.mts +1 -1
  71. package/dist/user-profile-page.d.ts +1 -1
  72. package/dist/user-profile-page.js +22 -2
  73. package/dist/user-profile-page.mjs +2 -2
  74. package/dist/venue-logo.d.mts +3 -2
  75. package/dist/venue-logo.d.ts +3 -2
  76. package/dist/venue-logo.js +22 -2
  77. package/dist/venue-logo.mjs +1 -1
  78. package/dist/{venue-logo.types-HRf1yBLD.d.mts → venue-logo.types-CGUc22ly.d.mts} +3 -1
  79. package/dist/{venue-logo.types-D8Cu2rAm.d.ts → venue-logo.types-Dqr39S1-.d.ts} +3 -1
  80. package/dist/withdraw-modal.js +22 -2
  81. package/dist/withdraw-modal.mjs +2 -2
  82. package/package.json +2 -2
  83. package/dist/chunk-V52WSZHQ.mjs +0 -482
  84. package/dist/{types-JBf1DZlH.d.ts → types-DkGlbmXq.d.mts} +2 -2
  85. package/dist/{types-JBf1DZlH.d.mts → types-DkGlbmXq.d.ts} +2 -2
package/dist/index.js CHANGED
@@ -441,6 +441,7 @@ var EventListItemSkeletonView = ({
441
441
  isStandalone = false
442
442
  }) => {
443
443
  const labels = (0, import_hooks4.useLabels)();
444
+ const outcomeTitleWidths = ["w-40", "w-[200px]"];
444
445
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
445
446
  Card,
446
447
  {
@@ -450,35 +451,23 @@ var EventListItemSkeletonView = ({
450
451
  "aria-busy": isStandalone || void 0,
451
452
  "aria-hidden": isStandalone ? void 0 : true,
452
453
  children: [
453
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex w-full items-start gap-3", children: [
454
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-10 w-10 rounded-agg-lg" }),
455
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-1 flex-col gap-2", children: [
456
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm" }),
457
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-5 w-[68%] rounded-agg-sm" })
458
- ] })
454
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex h-14 w-full items-center gap-3 justify-stretch", children: [
455
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "size-10! rounded-agg-lg" }),
456
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-6 w-fit flex-1 rounded-agg-sm" })
459
457
  ] }),
460
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex flex-col gap-3", children: [0, 1].map((index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
461
- "div",
462
- {
463
- className: "grid w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-3",
464
- children: [
465
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
466
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
467
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-9 w-[101px] rounded-agg-full" })
468
- ]
469
- },
470
- index
471
- )) }),
472
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center justify-between gap-2 text-agg-muted-foreground", children: [
473
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-2", children: [
474
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" }),
458
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex flex-col gap-3", children: outcomeTitleWidths.map((outcomeTitleWidth, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex w-full items-center justify-between gap-3", children: [
459
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: cn("h-5 rounded-agg-sm", outcomeTitleWidth) }),
460
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" })
461
+ ] }, index)) }),
462
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center justify-between gap-5 text-agg-muted-foreground", children: [
463
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
464
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-5 w-[100px] rounded-agg-sm" }),
475
465
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-1", children: [
476
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" }),
477
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" }),
478
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "size-3 rounded-agg-full" })
466
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "size-[14px] rounded-agg-sm" }),
467
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "size-[14px] rounded-agg-sm" })
479
468
  ] })
480
469
  ] }),
481
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-4 w-20 rounded-agg-sm" })
470
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
482
471
  ] })
483
472
  ]
484
473
  }
@@ -498,13 +487,9 @@ var EventListSkeletonView = ({ className, ariaLabel }) => {
498
487
  "aria-label": ariaLabel != null ? ariaLabel : labels.eventList.loading("events"),
499
488
  "aria-busy": true,
500
489
  children: [
501
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("header", { className: "flex w-full flex-col items-start justify-between gap-2 md:flex-row md:flex-nowrap md:items-center md:gap-4", children: [
502
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-7 w-40 rounded-agg-sm" }),
503
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex max-w-full gap-2", children: [
504
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
505
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-10 w-20 rounded-agg-full" }),
506
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-10 w-24 rounded-agg-full" })
507
- ] })
490
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("header", { className: "flex w-full flex-col items-start justify-between gap-3 md:flex-row md:flex-nowrap md:items-center md:gap-5", children: [
491
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-7 w-[120px] rounded-agg-md" }),
492
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SkeletonBlock, { className: "h-8 w-full rounded-agg-md md:w-[400px]" })
508
493
  ] }),
509
494
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "grid grid-cols-1 gap-5 md:grid-cols-3", children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
510
495
  EventListItemSkeletonView,
@@ -556,30 +541,26 @@ var EventListItemDetailsSkeletonView = ({
556
541
  "aria-label": ariaLabel != null ? ariaLabel : labels.eventItemDetails.loading,
557
542
  "aria-busy": true,
558
543
  children: [
559
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex w-full items-start gap-3 md:gap-4", children: [
560
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "size-10 rounded-agg-lg md:size-[60px]" }),
561
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 flex-col gap-2", children: [
562
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-5 w-[82%] rounded-agg-sm md:h-7 md:w-[55%]" }),
563
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-2 overflow-hidden", children: [
564
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
565
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" }),
566
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-8 w-28 rounded-agg-full" })
567
- ] })
568
- ] })
544
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex h-14 w-full items-center gap-3 justify-stretch", children: [
545
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "size-10! rounded-agg-lg" }),
546
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-6 w-fit flex-1 rounded-agg-sm" })
569
547
  ] }),
570
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-4", children: [
571
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-10 w-full rounded-agg-full md:w-[220px]" }),
572
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-2 overflow-hidden", children: [
573
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
574
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
575
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" }),
576
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-9 w-20 rounded-agg-full" })
548
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex w-full flex-col gap-4 md:gap-6", children: [
549
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex w-full flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
550
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex max-w-full gap-2 overflow-hidden", children: [
551
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" }),
552
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" }),
553
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-9 w-[100px] rounded-agg-full" })
554
+ ] }),
555
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-9 w-full max-w-[221px] rounded-agg-full md:w-[221px]" })
556
+ ] }),
557
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
558
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-[220px] w-full rounded-agg-xl md:h-[240px]" }),
559
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-between", children: [
560
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-5 w-[59px] rounded-agg-sm" }),
561
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-5 w-40 rounded-agg-sm" })
562
+ ] })
577
563
  ] })
578
- ] }),
579
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "h-[300px] w-full rounded-agg-xl", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-full w-full rounded-agg-xl" }) }),
580
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-between", children: [
581
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
582
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SkeletonBlock, { className: "h-5 w-40 rounded-agg-sm" })
583
564
  ] })
584
565
  ]
585
566
  }
@@ -603,6 +584,77 @@ var orderBookRowLimitDefault = 4;
603
584
 
604
585
  // src/primitives/skeleton/views/market-details-skeleton-view.tsx
605
586
  var import_jsx_runtime7 = require("react/jsx-runtime");
587
+ var orderBookAskBarWidths = [
588
+ "w-[52px] md:w-[240px]",
589
+ "w-[48px] md:w-[200px]",
590
+ "w-[40px] md:w-[120px]",
591
+ "w-[36px] md:w-[60px]"
592
+ ];
593
+ var orderBookBidBarWidths = [
594
+ "w-[36px] md:w-[60px]",
595
+ "w-[40px] md:w-[120px]",
596
+ "w-[48px] md:w-[200px]",
597
+ "w-[52px] md:w-[240px]"
598
+ ];
599
+ var MarketDetailsHeaderSkeleton = () => {
600
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-3 px-4 py-3 md:px-5", children: [
601
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:min-w-52 md:gap-4", children: [
602
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-12 rounded-agg-lg md:size-[60px]" }),
603
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex min-w-0 flex-col gap-2", children: [
604
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-6 w-[132px] rounded-agg-sm" }),
605
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-[141px] rounded-agg-sm" })
606
+ ] })
607
+ ] }),
608
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-[60px] rounded-agg-md" }),
609
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex w-full gap-2 md:w-auto", children: [
610
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-full rounded-agg-full md:w-[135px]" }),
611
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-9 w-full rounded-agg-full md:w-[131px]" })
612
+ ] })
613
+ ] });
614
+ };
615
+ var MarketDetailsTabsSkeleton = () => {
616
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex h-14 items-end px-4 md:px-5", children: [
617
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex h-full flex-col items-end justify-end rounded-t-agg-lg", children: [
618
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }) }),
619
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-[3px] w-full rounded-t-agg-sm" })
620
+ ] }),
621
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex h-full flex-col justify-center", children: [
622
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "px-4 py-3", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-6 w-12 rounded-agg-sm" }) }),
623
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-[3px] w-full" })
624
+ ] })
625
+ ] });
626
+ };
627
+ var MarketDetailsOrderBookRows = ({
628
+ side,
629
+ barWidths
630
+ }) => {
631
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-col gap-2", children: barWidths.map((barWidthClassName, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-2", children: [
632
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2 md:grid-cols-[88px_1fr_1fr_minmax(120px,220px)] md:gap-6", children: [
633
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center gap-1 md:gap-3", children: [
634
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
635
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
636
+ ] }),
637
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 rounded-agg-sm" }),
638
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-5 rounded-agg-sm" }),
639
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: cn("h-2 rounded-agg-full", barWidthClassName) }) })
640
+ ] }),
641
+ index < barWidths.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null
642
+ ] }, `${side}-row-${index}`)) });
643
+ };
644
+ var MarketDetailsOderbookSkeleton = ({
645
+ className
646
+ }) => {
647
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cn("flex flex-col gap-5", className), children: [
648
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-2", children: [
649
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
650
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MarketDetailsOrderBookRows, { side: "ask", barWidths: orderBookAskBarWidths })
651
+ ] }),
652
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-2", children: [
653
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-10 rounded-agg-sm" }),
654
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MarketDetailsOrderBookRows, { side: "bid", barWidths: orderBookBidBarWidths })
655
+ ] })
656
+ ] });
657
+ };
606
658
  var MarketDetailsSkeletonView = ({
607
659
  className,
608
660
  ariaLabel,
@@ -617,60 +669,12 @@ var MarketDetailsSkeletonView = ({
617
669
  "aria-label": ariaLabel != null ? ariaLabel : labels.marketDetails.loading,
618
670
  "aria-busy": true,
619
671
  children: [
620
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-3 p-4 md:px-5 md:py-4", children: [
621
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
622
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
623
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "size-12 rounded-agg-lg md:size-[60px]" }),
624
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex min-w-0 flex-col gap-2", children: [
625
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-6 w-40 rounded-agg-sm" }),
626
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-28 rounded-agg-sm" })
627
- ] })
628
- ] }),
629
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-8 w-16 rounded-agg-sm" })
630
- ] }),
631
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex gap-2", children: [
632
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" }),
633
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-10 flex-1 rounded-agg-full" })
634
- ] })
635
- ] }),
672
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MarketDetailsHeaderSkeleton, {}),
636
673
  isDetailed ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
637
674
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
638
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex h-14 items-end", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-full w-full rounded-none" }) }),
675
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MarketDetailsTabsSkeleton, {}),
639
676
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
640
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-4 p-5", children: [
641
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-3", children: [
642
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
643
- [0, 1, 2, 3].map((index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
644
- "div",
645
- {
646
- className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
647
- children: [
648
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
649
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
650
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
651
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-2 rounded-agg-full" })
652
- ]
653
- },
654
- `ask-${index}`
655
- ))
656
- ] }),
657
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex flex-col gap-3", children: [
658
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 w-12 rounded-agg-sm" }),
659
- [0, 1, 2, 3].map((index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
660
- "div",
661
- {
662
- className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2",
663
- children: [
664
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
665
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
666
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-4 rounded-agg-sm" }),
667
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SkeletonBlock, { className: "h-2 rounded-agg-full" })
668
- ]
669
- },
670
- `bid-${index}`
671
- ))
672
- ] })
673
- ] })
677
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(MarketDetailsOderbookSkeleton, { className: "p-5" })
674
678
  ] }) : null
675
679
  ]
676
680
  }
@@ -681,65 +685,46 @@ MarketDetailsSkeletonView.displayName = "MarketDetailsSkeletonView";
681
685
  // src/primitives/skeleton/views/place-order-skeleton-view.tsx
682
686
  var import_jsx_runtime8 = require("react/jsx-runtime");
683
687
  var placeOrderCardClassName = "overflow-hidden rounded-agg-xl border border-agg-border bg-agg-secondary shadow-none hover:shadow-none";
688
+ var TabsSkeletonBar = () => {
689
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex w-full items-end border-b border-agg-border", children: [
690
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col rounded-t-agg-lg", children: [
691
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "px-5 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-10 rounded-agg-sm" }) }),
692
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-[3px] w-full rounded-t-agg-sm" })
693
+ ] }),
694
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col", children: [
695
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "px-5 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-10 rounded-agg-sm" }) }),
696
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "h-[3px] w-full" })
697
+ ] })
698
+ ] });
699
+ };
684
700
  var ContentBody = () => {
685
701
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn("flex flex-col gap-6 p-5"), children: [
686
702
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
687
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-start justify-between gap-5", children: [
688
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [
689
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-12 w-12 shrink-0 rounded-agg-lg" }),
690
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
691
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 w-[92%] rounded-agg-sm" }),
692
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 w-[80%] rounded-agg-sm" })
693
- ] })
694
- ] }),
695
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-6 rounded-agg-sm" })
703
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
704
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "size-12 shrink-0 rounded-agg-lg" }),
705
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
706
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-[92%] max-w-[240px] rounded-agg-sm" }),
707
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-[64%] max-w-[160px] rounded-agg-sm" })
708
+ ] })
696
709
  ] }),
697
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 w-28 rounded-agg-sm" })
710
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-[92px] rounded-agg-sm" }),
711
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TabsSkeletonBar, {})
698
712
  ] }),
699
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex h-11 items-end border-b border-agg-separator", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-8", children: [
700
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
701
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" }),
702
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-[3px] w-12 rounded-t-agg-sm" })
703
- ] }),
704
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
705
- ] }) }),
706
713
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-4", children: [
707
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex gap-2", children: [
714
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex w-full gap-2", children: [
708
715
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" }),
709
716
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-11 flex-1 rounded-agg-full" })
710
717
  ] }),
711
718
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
712
719
  /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
713
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }),
714
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-28 rounded-agg-sm" })
720
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 w-[63px] rounded-agg-sm" }),
721
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-[118px] rounded-agg-sm" })
715
722
  ] }),
716
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-9 w-28 rounded-agg-sm" })
723
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: cn("text-agg-3xl font-agg-bold leading-agg-9 text-agg-separator"), children: "$0" })
717
724
  ] })
718
725
  ] }),
719
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
720
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "rounded-agg-lg border border-agg-trade-highlight-border bg-agg-trade-highlight-surface p-3", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-3", children: [
721
- [0, 1].map((index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-3", children: [
722
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
723
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center gap-2", children: [
724
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
725
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" })
726
- ] }),
727
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-5 w-10 rounded-agg-sm" })
728
- ] }),
729
- index === 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "h-px w-full bg-agg-trade-highlight-border" }) : null
730
- ] }, `place-order-route-${index}`)),
731
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "mx-auto h-5 w-40 rounded-agg-sm" })
732
- ] }) }),
733
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-36 rounded-agg-sm" })
734
- ] }),
735
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
736
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col gap-2", children: [
737
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-6 w-20 rounded-agg-sm" }),
738
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-24 rounded-agg-sm" })
739
- ] }),
740
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-9 w-36 rounded-agg-sm" })
741
- ] }),
742
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-[88%] self-center rounded-agg-sm" })
726
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-12 w-full rounded-agg-full" }),
727
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[240px] self-center rounded-agg-sm" })
743
728
  ] });
744
729
  };
745
730
  var PlaceOrderSkeletonView = ({
@@ -753,19 +738,7 @@ var PlaceOrderSkeletonView = ({
753
738
  role: "status",
754
739
  "aria-label": ariaLabel != null ? ariaLabel : "Loading place order",
755
740
  "aria-busy": true,
756
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex w-full items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
757
- Card,
758
- {
759
- className: cn(
760
- placeOrderCardClassName,
761
- "w-full max-w-[400px] rounded-t-agg-xl rounded-b-none border-b-0"
762
- ),
763
- children: [
764
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ContentBody, {}),
765
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "border-t border-agg-separator bg-agg-secondary p-4", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(SkeletonBlock, { className: "h-12 w-full rounded-agg-full" }) })
766
- ]
767
- }
768
- ) })
741
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex w-full items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Card, { className: cn(placeOrderCardClassName, "w-full"), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ContentBody, {}) }) })
769
742
  }
770
743
  );
771
744
  };
@@ -791,38 +764,27 @@ var SettlementSkeletonView = ({
791
764
  "aria-label": ariaLabel != null ? ariaLabel : labels.trading.settlementLoading,
792
765
  "aria-busy": true,
793
766
  children: [
794
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-1 md:flex-row md:items-center md:justify-between md:gap-4", children: [
795
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-20 rounded-agg-sm" }),
796
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-full max-w-80 rounded-agg-sm" })
767
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full items-center justify-between gap-4", children: [
768
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[81px] rounded-agg-sm" }),
769
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-full max-w-[240px] rounded-agg-sm" })
797
770
  ] }),
798
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-2", children: [
799
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-52 rounded-agg-sm" }),
771
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
772
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-[200px] rounded-agg-sm" }),
800
773
  /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-2", children: [
801
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[88%] rounded-agg-sm" }),
802
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[84%] rounded-agg-sm" }),
803
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[80%] rounded-agg-sm" }),
804
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[74%] rounded-agg-sm" })
774
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[320px] rounded-agg-sm" }),
775
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-full max-w-[280px] rounded-agg-sm" })
805
776
  ] })
806
777
  ] }),
807
778
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
808
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-3", children: [
809
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-2", children: [
810
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2", children: [
811
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
812
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-24 rounded-agg-sm" }),
813
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-4 rounded-agg-sm" })
814
- ] }),
815
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-2 pl-6", children: [
816
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-full rounded-agg-sm" }),
817
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[92%] rounded-agg-sm" }),
818
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-[34%] rounded-agg-sm" })
819
- ] })
779
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full flex-col gap-3", children: [
780
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2", children: [
781
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
782
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-[100px] rounded-agg-sm" })
820
783
  ] }),
821
- [0, 1, 2].map((index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2", children: [
822
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-full" }),
823
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-20 rounded-agg-sm" }),
824
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-4 w-4 rounded-agg-sm" })
825
- ] }, `settlement-venue-${index}`))
784
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center gap-2", children: [
785
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "size-4 rounded-agg-sm" }),
786
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(SkeletonBlock, { className: "h-5 w-[60px] rounded-agg-sm" })
787
+ ] })
826
788
  ] })
827
789
  ]
828
790
  }
@@ -923,10 +885,10 @@ var SwitchButton = ({
923
885
  return null;
924
886
  }
925
887
  const handleKeyDown = (event, optionIndex) => {
926
- if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") {
888
+ if ((event == null ? void 0 : event.key) !== "ArrowLeft" && (event == null ? void 0 : event.key) !== "ArrowRight") {
927
889
  return;
928
890
  }
929
- event.preventDefault();
891
+ event == null ? void 0 : event.preventDefault();
930
892
  const nextOptionIndex = resolveNextEnabledIndex(
931
893
  options,
932
894
  optionIndex,
@@ -2550,6 +2512,13 @@ var venueLogoRegistry = {
2550
2512
  opinion: LogoOpinionIcon,
2551
2513
  probable: LogoProbableIcon
2552
2514
  };
2515
+ var VENUE_LOGO_BASE_URL = "https://assets.snagsolutions.io/public/prediction-markets/logos";
2516
+ var venueLogoUrlRegistry = {
2517
+ kalshi: `${VENUE_LOGO_BASE_URL}/kalshi.png`,
2518
+ polymarket: `${VENUE_LOGO_BASE_URL}/polymarket.png`,
2519
+ opinion: `${VENUE_LOGO_BASE_URL}/opinion.png`,
2520
+ probable: `${VENUE_LOGO_BASE_URL}/probable.png`
2521
+ };
2553
2522
  var venueLogoLabels = {
2554
2523
  kalshi: "Kalshi",
2555
2524
  polymarket: "Polymarket",
@@ -2567,6 +2536,7 @@ var sizeClasses2 = {
2567
2536
  var import_jsx_runtime58 = require("react/jsx-runtime");
2568
2537
  var VenueLogo = ({
2569
2538
  venue,
2539
+ variant = "icon",
2570
2540
  isColor = true,
2571
2541
  isMonochromatic = false,
2572
2542
  color,
@@ -2576,8 +2546,20 @@ var VenueLogo = ({
2576
2546
  title
2577
2547
  }) => {
2578
2548
  const labels = (0, import_hooks10.useLabels)();
2579
- const Component = venueLogoRegistry[venue];
2580
2549
  const sizeClass = sizeClasses2[size];
2550
+ const resolvedLabel = ariaLabel != null ? ariaLabel : labels.venues[venue];
2551
+ if (variant === "logo") {
2552
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2553
+ "img",
2554
+ {
2555
+ src: venueLogoUrlRegistry[venue],
2556
+ alt: resolvedLabel,
2557
+ title,
2558
+ className: cn("shrink-0 rounded-agg-lg object-cover", sizeClass, className)
2559
+ }
2560
+ );
2561
+ }
2562
+ const Component = venueLogoRegistry[venue];
2581
2563
  const resolvedIsColor = isMonochromatic ? false : isColor;
2582
2564
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2583
2565
  Component,
@@ -2585,7 +2567,7 @@ var VenueLogo = ({
2585
2567
  className: cn("group/agg-venue-logo", "shrink-0", sizeClass, className),
2586
2568
  isColor: resolvedIsColor,
2587
2569
  color,
2588
- "aria-label": ariaLabel != null ? ariaLabel : labels.venues[venue],
2570
+ "aria-label": resolvedLabel,
2589
2571
  title
2590
2572
  }
2591
2573
  );
@@ -3189,8 +3171,18 @@ var normalizeSeries = (series) => {
3189
3171
  var defaultValueFormatter = (value) => {
3190
3172
  return `${Math.round(value)}%`;
3191
3173
  };
3192
- var defaultTimeFormatter = (timestamp) => {
3193
- return import_dayjs.default.unix(timestamp).format("MMM D");
3174
+ var resolveTimeFormatter = (windowSeconds) => {
3175
+ return (timestamp) => {
3176
+ if (!Number.isFinite(timestamp))
3177
+ return "";
3178
+ if (windowSeconds <= 48 * 60 * 60) {
3179
+ return import_dayjs.default.unix(timestamp).format("HH:mm");
3180
+ }
3181
+ if (windowSeconds <= 14 * 24 * 60 * 60) {
3182
+ return import_dayjs.default.unix(timestamp).format("MMM D HH:mm");
3183
+ }
3184
+ return import_dayjs.default.unix(timestamp).format("MMM D");
3185
+ };
3194
3186
  };
3195
3187
  var toLivelinePoints = (points) => {
3196
3188
  return points.map((point) => ({
@@ -3313,6 +3305,9 @@ var LineChart = ({
3313
3305
  const windowSeconds = (0, import_react3.useMemo)(() => {
3314
3306
  return resolveWindowSeconds(normalizedSeries);
3315
3307
  }, [normalizedSeries]);
3308
+ const timeFormatter = (0, import_react3.useMemo)(() => {
3309
+ return resolveTimeFormatter(windowSeconds);
3310
+ }, [windowSeconds]);
3316
3311
  const seriesControls = showSeriesControls && normalizedSeries.length > 0 ? (_a = renderSeriesControls == null ? void 0 : renderSeriesControls({
3317
3312
  series: normalizedSeries,
3318
3313
  activeSeriesId,
@@ -3351,7 +3346,7 @@ var LineChart = ({
3351
3346
  pulse: false,
3352
3347
  window: windowSeconds,
3353
3348
  formatValue: defaultValueFormatter,
3354
- formatTime: defaultTimeFormatter,
3349
+ formatTime: timeFormatter,
3355
3350
  padding: {
3356
3351
  top: 12,
3357
3352
  right: 80,
@@ -4652,27 +4647,14 @@ var import_hooks21 = require("@agg-market/hooks");
4652
4647
 
4653
4648
  // src/events/item/event-list-item.utils.ts
4654
4649
  var resolveEventListItemEvent = (fetchedEvent) => {
4655
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
4656
4650
  if (!fetchedEvent)
4657
4651
  return void 0;
4658
- const fallbackVenueEvent = fetchedEvent.venueEvents[0];
4659
- if (!fallbackVenueEvent)
4660
- return void 0;
4661
4652
  const mergedVenueMarkets = fetchedEvent.markets.flatMap(
4662
- (venueEvent) => venueEvent.venueMarkets
4653
+ (market) => market.venueMarkets
4663
4654
  );
4664
- const venueMarkets = mergedVenueMarkets.length > 0 ? mergedVenueMarkets : [];
4665
- if ((venueMarkets == null ? void 0 : venueMarkets.length) === 0)
4655
+ if (mergedVenueMarkets.length === 0)
4666
4656
  return void 0;
4667
- return __spreadProps(__spreadValues({}, fetchedEvent), {
4668
- id: fetchedEvent.id,
4669
- title: fetchedEvent.title || fallbackVenueEvent.title,
4670
- description: (_b = (_a = fetchedEvent.description) != null ? _a : fallbackVenueEvent.description) != null ? _b : null,
4671
- volume: (_d = (_c = fetchedEvent.volume) != null ? _c : fallbackVenueEvent.volume) != null ? _d : null,
4672
- startDate: (_f = (_e = fetchedEvent.startDate) != null ? _e : fallbackVenueEvent.startDate) != null ? _f : null,
4673
- endDate: (_h = (_g = fetchedEvent.endDate) != null ? _g : fallbackVenueEvent.endDate) != null ? _h : null,
4674
- creationDate: (_j = (_i = fetchedEvent.creationDate) != null ? _i : fallbackVenueEvent.creationDate) != null ? _j : null
4675
- });
4657
+ return fetchedEvent;
4676
4658
  };
4677
4659
  var normalizeProbability = (value) => {
4678
4660
  if (typeof value !== "number" || !Number.isFinite(value))
@@ -4773,15 +4755,14 @@ var resolveTileTitle = (event, primaryVenueMarket, titleOverride) => {
4773
4755
  return event.title;
4774
4756
  };
4775
4757
  var resolveTileImage = (event, primaryVenueMarket, imageOverride) => {
4776
- var _a, _b, _c, _d, _e, _f;
4777
4758
  if (typeof imageOverride === "string" && imageOverride.trim()) {
4778
4759
  return imageOverride;
4779
4760
  }
4780
4761
  if (typeof (primaryVenueMarket == null ? void 0 : primaryVenueMarket.image) === "string" && primaryVenueMarket.image.trim()) {
4781
4762
  return primaryVenueMarket.image;
4782
4763
  }
4783
- if (typeof ((_b = (_a = event.venueEvents) == null ? void 0 : _a[0]) == null ? void 0 : _b.image) === "string" && ((_d = (_c = event.venueEvents) == null ? void 0 : _c[0]) == null ? void 0 : _d.image.trim())) {
4784
- return (_f = (_e = event.venueEvents) == null ? void 0 : _e[0]) == null ? void 0 : _f.image;
4764
+ if (typeof event.image === "string" && event.image.trim()) {
4765
+ return event.image;
4785
4766
  }
4786
4767
  return void 0;
4787
4768
  };
@@ -5170,18 +5151,22 @@ var resolveOutcomesByVenue = (venueMarkets, selectedOutcomeLabel) => {
5170
5151
  };
5171
5152
  }).filter((item) => item != null);
5172
5153
  };
5173
- var buildPriceHistoryGroups = (selectedOutcomes) => {
5174
- const venueMarketOutcomeIdsByVenue = /* @__PURE__ */ new Map();
5175
- selectedOutcomes.forEach(({ venue, outcome }) => {
5176
- var _a;
5177
- if (!venueMarketOutcomeIdsByVenue.has(venue)) {
5178
- venueMarketOutcomeIdsByVenue.set(venue, []);
5154
+ var buildPriceHistoryGroups = (selectedOutcomes, fallbackMarketId) => {
5155
+ const marketIdByVenue = /* @__PURE__ */ new Map();
5156
+ selectedOutcomes.forEach(({ venue, market }) => {
5157
+ var _a, _b;
5158
+ const marketWithCanonicalId = market;
5159
+ const canonicalMarketId = (_a = marketWithCanonicalId.marketId) != null ? _a : fallbackMarketId;
5160
+ if (!canonicalMarketId)
5161
+ return;
5162
+ if (!marketIdByVenue.has(venue)) {
5163
+ marketIdByVenue.set(venue, /* @__PURE__ */ new Set());
5179
5164
  }
5180
- (_a = venueMarketOutcomeIdsByVenue.get(venue)) == null ? void 0 : _a.push(outcome.id);
5165
+ (_b = marketIdByVenue.get(venue)) == null ? void 0 : _b.add(canonicalMarketId);
5181
5166
  });
5182
- return [...venueMarketOutcomeIdsByVenue.entries()].map(([venue, venueMarketOutcomeIds]) => ({
5167
+ return [...marketIdByVenue.entries()].map(([venue, marketIds]) => ({
5183
5168
  venue,
5184
- venueMarketOutcomeIds
5169
+ venueMarketOutcomeIds: [...marketIds]
5185
5170
  })).filter((group) => group.venueMarketOutcomeIds.length > 0);
5186
5171
  };
5187
5172
  var resolveSeriesColor = (venue, index) => {
@@ -5241,13 +5226,18 @@ var resolveAverageProbability = (values) => {
5241
5226
  return validValues.reduce((sum, value) => sum + value, 0) / validValues.length;
5242
5227
  };
5243
5228
  var resolveOutcomeCandidateIds = (market, outcome) => {
5244
- var _a;
5245
- return [outcome.id, (_a = outcome.externalIdentifier) != null ? _a : void 0, market.externalIdentifier].filter(
5246
- (value) => typeof value === "string" && value.trim().length > 0
5247
- );
5229
+ var _a, _b;
5230
+ const marketWithCanonicalId = market;
5231
+ return [
5232
+ outcome.id,
5233
+ (_a = outcome.externalIdentifier) != null ? _a : void 0,
5234
+ market.externalIdentifier,
5235
+ (_b = marketWithCanonicalId.marketId) != null ? _b : void 0
5236
+ ].filter((value) => typeof value === "string" && value.trim().length > 0);
5248
5237
  };
5249
5238
  var EventListItemDetailsGraphSection = ({
5250
5239
  venueMarkets,
5240
+ canonicalMarketId,
5251
5241
  selectedOutcomeLabel,
5252
5242
  onSelectedOutcomeLabelChange,
5253
5243
  switchLabels,
@@ -5340,8 +5330,8 @@ var EventListItemDetailsGraphSection = ({
5340
5330
  return [...outcomeByModeAndId.values()];
5341
5331
  }, [selectedOutcomesByMode]);
5342
5332
  const priceHistoryGroups = (0, import_react9.useMemo)(() => {
5343
- return buildPriceHistoryGroups(allOutcomesForHistory);
5344
- }, [allOutcomesForHistory]);
5333
+ return buildPriceHistoryGroups(allOutcomesForHistory, canonicalMarketId);
5334
+ }, [allOutcomesForHistory, canonicalMarketId]);
5345
5335
  const timeWindow = (0, import_react9.useMemo)(() => {
5346
5336
  return getTimeWindowByRange(selectedTimeRange);
5347
5337
  }, [selectedTimeRange]);
@@ -5545,11 +5535,12 @@ var EventListItemDetailsContent = ({
5545
5535
  ariaLabel,
5546
5536
  defaultTimeRange
5547
5537
  }) => {
5538
+ var _a, _b;
5548
5539
  const config = (0, import_hooks22.useSdkUiConfig)();
5549
5540
  const labels = (0, import_hooks22.useLabels)();
5550
5541
  const venueMarkets = (0, import_react9.useMemo)(() => {
5551
- var _a, _b, _c;
5552
- return (_c = (_b = (_a = event.markets) == null ? void 0 : _a[0]) == null ? void 0 : _b.venueMarkets) != null ? _c : [];
5542
+ var _a2, _b2, _c;
5543
+ return (_c = (_b2 = (_a2 = event.markets) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.venueMarkets) != null ? _c : [];
5553
5544
  }, [event.markets]);
5554
5545
  const primaryVenueMarket = (0, import_react9.useMemo)(() => {
5555
5546
  return selectPrimaryVenueMarket(venueMarkets);
@@ -5587,9 +5578,9 @@ var EventListItemDetailsContent = ({
5587
5578
  if (outcomeLabels.length === 0)
5588
5579
  return void 0;
5589
5580
  return [...outcomeLabels].sort((left, right) => {
5590
- var _a, _b;
5591
- const leftProbability = (_a = probabilityByLabel.get(left)) != null ? _a : -1;
5592
- const rightProbability = (_b = probabilityByLabel.get(right)) != null ? _b : -1;
5581
+ var _a2, _b2;
5582
+ const leftProbability = (_a2 = probabilityByLabel.get(left)) != null ? _a2 : -1;
5583
+ const rightProbability = (_b2 = probabilityByLabel.get(right)) != null ? _b2 : -1;
5593
5584
  return rightProbability - leftProbability;
5594
5585
  })[0];
5595
5586
  }, [outcomeLabels, probabilityByLabel]);
@@ -5605,18 +5596,18 @@ var EventListItemDetailsContent = ({
5605
5596
  setSelectedOutcomeLabel(fallbackOutcomeLabel);
5606
5597
  }, [isDateOutcomeMarket, mainOutcomeLabel, outcomeLabels, selectedOutcomeLabel]);
5607
5598
  const switchLabels = (0, import_react9.useMemo)(() => {
5608
- var _a, _b;
5599
+ var _a2, _b2;
5609
5600
  if (isDateOutcomeMarket) {
5610
5601
  return [labels.eventItemDetails.yes, labels.eventItemDetails.no];
5611
5602
  }
5612
5603
  const sortedOutcomeLabels = [...outcomeLabels].sort((left, right) => {
5613
- var _a2, _b2;
5614
- const leftProbability = (_a2 = probabilityByLabel.get(left)) != null ? _a2 : -1;
5615
- const rightProbability = (_b2 = probabilityByLabel.get(right)) != null ? _b2 : -1;
5604
+ var _a3, _b3;
5605
+ const leftProbability = (_a3 = probabilityByLabel.get(left)) != null ? _a3 : -1;
5606
+ const rightProbability = (_b3 = probabilityByLabel.get(right)) != null ? _b3 : -1;
5616
5607
  return rightProbability - leftProbability;
5617
5608
  });
5618
- const firstLabel = (_a = sortedOutcomeLabels[0]) != null ? _a : labels.eventItemDetails.yes;
5619
- const secondLabel = (_b = sortedOutcomeLabels.find((label) => label !== firstLabel)) != null ? _b : firstLabel;
5609
+ const firstLabel = (_a2 = sortedOutcomeLabels[0]) != null ? _a2 : labels.eventItemDetails.yes;
5610
+ const secondLabel = (_b2 = sortedOutcomeLabels.find((label) => label !== firstLabel)) != null ? _b2 : firstLabel;
5620
5611
  return [firstLabel, secondLabel];
5621
5612
  }, [
5622
5613
  isDateOutcomeMarket,
@@ -5626,8 +5617,8 @@ var EventListItemDetailsContent = ({
5626
5617
  probabilityByLabel
5627
5618
  ]);
5628
5619
  const volumeLabel = (0, import_react9.useMemo)(() => {
5629
- var _a;
5630
- const resolvedVolume = typeof event.volume === "number" ? event.volume : (_a = primaryVenueMarket == null ? void 0 : primaryVenueMarket.volume) != null ? _a : void 0;
5620
+ var _a2;
5621
+ const resolvedVolume = typeof event.volume === "number" ? event.volume : (_a2 = primaryVenueMarket == null ? void 0 : primaryVenueMarket.volume) != null ? _a2 : void 0;
5631
5622
  if (typeof resolvedVolume !== "number")
5632
5623
  return "";
5633
5624
  return `${config.formatCompactCurrency(resolvedVolume)} ${labels.eventItemDetails.volumeSuffix}`;
@@ -5725,6 +5716,7 @@ var EventListItemDetailsContent = ({
5725
5716
  EventListItemDetailsGraphSection,
5726
5717
  {
5727
5718
  venueMarkets,
5719
+ canonicalMarketId: (_b = (_a = event.markets) == null ? void 0 : _a[0]) == null ? void 0 : _b.id,
5728
5720
  selectedOutcomeLabel,
5729
5721
  onSelectedOutcomeLabelChange: setSelectedOutcomeLabel,
5730
5722
  switchLabels,
@@ -5976,8 +5968,7 @@ var resolveSubtitle = ({
5976
5968
  };
5977
5969
  var resolveOrderBookRows = ({
5978
5970
  data,
5979
- side,
5980
- depth
5971
+ side
5981
5972
  }) => {
5982
5973
  if (!(data == null ? void 0 : data.length))
5983
5974
  return [];
@@ -6008,9 +5999,8 @@ var resolveOrderBookRows = ({
6008
5999
  return left.price - right.price;
6009
6000
  return right.price - left.price;
6010
6001
  });
6011
- const limitedRows = sortedRows.slice(0, Math.max(1, depth));
6012
- const maxTotal = limitedRows.reduce((currentMax, row) => Math.max(currentMax, row.total), 0) || 1;
6013
- return limitedRows.map((row) => __spreadProps(__spreadValues({}, row), {
6002
+ const maxTotal = sortedRows.reduce((currentMax, row) => Math.max(currentMax, row.total), 0) || 1;
6003
+ return sortedRows.map((row) => __spreadProps(__spreadValues({}, row), {
6014
6004
  barScale: row.total / maxTotal
6015
6005
  }));
6016
6006
  };
@@ -6123,44 +6113,59 @@ var OrderBookRows = ({
6123
6113
  rows,
6124
6114
  title,
6125
6115
  formatNumber,
6126
- formatCurrency
6116
+ formatCurrency,
6117
+ visibleRows
6127
6118
  }) => {
6128
6119
  const labels = (0, import_hooks23.useLabels)();
6129
6120
  const isAsks = title === labels.marketDetails.asks;
6130
6121
  const priceClassName = isAsks ? "text-agg-orderbook-ask" : "text-agg-orderbook-bid";
6131
6122
  const barClassName = isAsks ? "bg-agg-orderbook-ask/10" : "bg-agg-orderbook-bid/10";
6123
+ const maxVisibleRows = Math.max(1, visibleRows);
6124
+ const orderBookRowHeightPx = 28;
6125
+ const orderBookDividerHeightPx = 1;
6126
+ const orderBookRowGapPx = 8;
6127
+ const orderBookVisibleHeightPx = maxVisibleRows * orderBookRowHeightPx + Math.max(0, maxVisibleRows - 1) * (orderBookDividerHeightPx + orderBookRowGapPx);
6132
6128
  return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex flex-col gap-2", children: [
6133
6129
  /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "caption-caps", children: title }),
6134
- rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex flex-col gap-2", children: [
6135
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2 md:grid-cols-[88px_1fr_1fr_minmax(120px,220px)] md:gap-6", children: [
6136
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center gap-1 md:gap-3", children: [
6137
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(VenueLogo, { venue: row.venue, size: "small" }),
6138
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6139
- "span",
6140
- {
6141
- className: cn(
6142
- "text-agg-xs font-agg-bold leading-agg-4 md:text-agg-sm md:leading-agg-5",
6143
- priceClassName
6144
- ),
6145
- children: formatProbabilityCents(row.price)
6146
- }
6147
- )
6148
- ] }),
6149
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "truncate text-agg-xs leading-agg-4 text-center text-agg-foreground md:text-agg-sm md:leading-agg-5", children: formatNumber(row.size) }),
6150
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "truncate text-agg-xs leading-agg-4 text-center text-agg-foreground md:text-agg-sm md:leading-agg-5", children: formatCurrency(row.total) }),
6151
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6152
- "div",
6153
- {
6154
- "aria-hidden": "true",
6155
- className: cn("h-2 rounded-agg-full", barClassName),
6156
- style: {
6157
- width: `${Math.max(20, Math.round(row.barScale * 100))}%`
6158
- }
6159
- }
6160
- ) })
6161
- ] }),
6162
- index < rows.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null
6163
- ] }, row.id))
6130
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6131
+ "div",
6132
+ {
6133
+ className: "overflow-y-auto pr-1 flex flex-col gap-2",
6134
+ style: { maxHeight: `${orderBookVisibleHeightPx}px` },
6135
+ role: "region",
6136
+ "aria-label": `${title} order book levels`,
6137
+ children: rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex flex-col gap-2", children: [
6138
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "grid grid-cols-[52px_1fr_1fr_52px] items-center gap-2 md:grid-cols-[88px_1fr_1fr_minmax(120px,220px)] md:gap-6", children: [
6139
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center gap-1 md:gap-3", children: [
6140
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(VenueLogo, { venue: row.venue, size: "small" }),
6141
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6142
+ "span",
6143
+ {
6144
+ className: cn(
6145
+ "text-agg-xs font-agg-bold leading-agg-4 md:text-agg-sm md:leading-agg-5",
6146
+ priceClassName
6147
+ ),
6148
+ children: formatProbabilityCents(row.price)
6149
+ }
6150
+ )
6151
+ ] }),
6152
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "truncate text-agg-xs leading-agg-4 text-center text-agg-foreground md:text-agg-sm md:leading-agg-5", children: formatNumber(row.size) }),
6153
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "truncate text-agg-xs leading-agg-4 text-center text-agg-foreground md:text-agg-sm md:leading-agg-5", children: formatCurrency(row.total) }),
6154
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6155
+ "div",
6156
+ {
6157
+ "aria-hidden": "true",
6158
+ className: cn("h-2 rounded-agg-full", barClassName),
6159
+ style: {
6160
+ width: `${Math.max(20, Math.round(row.barScale * 100))}%`
6161
+ }
6162
+ }
6163
+ ) })
6164
+ ] }),
6165
+ index < rows.length - 1 ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "h-px w-full bg-agg-separator" }) : null
6166
+ ] }, row.id))
6167
+ }
6168
+ )
6164
6169
  ] });
6165
6170
  };
6166
6171
  var getOutcomeButtonClassName = ({
@@ -6278,9 +6283,10 @@ var MarketDetailsContent = ({
6278
6283
  });
6279
6284
  return [...uniqueOutcomesByVenueAndId.values()];
6280
6285
  }, [outcomesByLabel]);
6286
+ const canonicalMarketIdForHistory = model == null ? void 0 : model.market.id;
6281
6287
  const priceHistoryGroups = (0, import_react10.useMemo)(() => {
6282
- return buildPriceHistoryGroups(graphOutcomes);
6283
- }, [graphOutcomes]);
6288
+ return buildPriceHistoryGroups(graphOutcomes, canonicalMarketIdForHistory);
6289
+ }, [canonicalMarketIdForHistory, graphOutcomes]);
6284
6290
  const { data: priceHistoryData, isLoading: isPriceHistoryLoading } = (0, import_hooks23.usePriceHistory)(__spreadProps(__spreadValues({
6285
6291
  groups: priceHistoryGroups
6286
6292
  }, timeWindow), {
@@ -6300,17 +6306,15 @@ var MarketDetailsContent = ({
6300
6306
  const askRows = (0, import_react10.useMemo)(() => {
6301
6307
  return resolveOrderBookRows({
6302
6308
  data: orderBookData,
6303
- side: "asks",
6304
- depth: orderBookDepth
6309
+ side: "asks"
6305
6310
  });
6306
- }, [orderBookData, orderBookDepth]);
6311
+ }, [orderBookData]);
6307
6312
  const bidRows = (0, import_react10.useMemo)(() => {
6308
6313
  return resolveOrderBookRows({
6309
6314
  data: orderBookData,
6310
- side: "bids",
6311
- depth: orderBookDepth
6315
+ side: "bids"
6312
6316
  });
6313
- }, [orderBookData, orderBookDepth]);
6317
+ }, [orderBookData]);
6314
6318
  const priceHistoryByVenue = (0, import_react10.useMemo)(() => {
6315
6319
  const historyByVenue = /* @__PURE__ */ new Map();
6316
6320
  if (!(priceHistoryData == null ? void 0 : priceHistoryData.length)) {
@@ -6330,11 +6334,14 @@ var MarketDetailsContent = ({
6330
6334
  const graphSeriesByOutcomeLabel = (0, import_react10.useMemo)(() => {
6331
6335
  const seriesByOutcomeLabel = /* @__PURE__ */ new Map();
6332
6336
  const resolveOutcomeCandidateIds2 = (outcomeByVenue) => {
6333
- var _a;
6337
+ var _a, _b;
6338
+ const marketWithCanonicalId = outcomeByVenue.market;
6334
6339
  return [
6335
6340
  outcomeByVenue.outcome.id,
6336
6341
  (_a = outcomeByVenue.outcome.externalIdentifier) != null ? _a : void 0,
6337
- outcomeByVenue.market.externalIdentifier
6342
+ outcomeByVenue.market.externalIdentifier,
6343
+ (_b = marketWithCanonicalId.marketId) != null ? _b : void 0,
6344
+ canonicalMarketIdForHistory
6338
6345
  ].filter((value) => typeof value === "string" && value.trim().length > 0);
6339
6346
  };
6340
6347
  headerOutcomeItems.forEach((headerOutcomeItem) => {
@@ -6366,7 +6373,7 @@ var MarketDetailsContent = ({
6366
6373
  seriesByOutcomeLabel.set(headerOutcomeItem.label, graphSeries2);
6367
6374
  });
6368
6375
  return seriesByOutcomeLabel;
6369
- }, [headerOutcomeItems, outcomesByLabel, priceHistoryByVenue]);
6376
+ }, [canonicalMarketIdForHistory, headerOutcomeItems, outcomesByLabel, priceHistoryByVenue]);
6370
6377
  const graphSeries = (0, import_react10.useMemo)(() => {
6371
6378
  var _a;
6372
6379
  if (!selectedOutcomeLabel)
@@ -6430,28 +6437,29 @@ var MarketDetailsContent = ({
6430
6437
  Card,
6431
6438
  {
6432
6439
  className: cn(
6433
- "w-full cursor-pointer rounded-agg-2xl text-left outline-none",
6440
+ "w-full rounded-agg-2xl text-left outline-none",
6434
6441
  marketDetailsBaseCardClassName,
6435
6442
  classNames == null ? void 0 : classNames.root
6436
6443
  ),
6437
- "aria-expanded": isOpened,
6438
- "aria-controls": detailsContentId,
6439
- role: "button",
6440
- tabIndex: 0,
6441
- "aria-label": isOpened ? labels.marketDetails.toggleCloseDetailsAria(model.title) : labels.marketDetails.toggleOpenDetailsAria(model.title),
6442
- onClick: handleToggleExpanded,
6443
- onKeyDown: handleToggleExpanded,
6444
6444
  children: [
6445
6445
  /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
6446
6446
  "div",
6447
6447
  {
6448
6448
  className: cn(
6449
- "flex flex-row items-center justify-between gap-3 px-5 py-4",
6449
+ "cursor-pointer disabled:cursor-default",
6450
+ "flex flex-wrap flex-row items-center justify-between gap-3 px-5 py-4",
6450
6451
  isOpened && "pb-3",
6451
6452
  classNames == null ? void 0 : classNames.header
6452
6453
  ),
6454
+ "aria-expanded": isOpened,
6455
+ "aria-controls": detailsContentId,
6456
+ role: "button",
6457
+ tabIndex: 0,
6458
+ "aria-label": isOpened ? labels.marketDetails.toggleCloseDetailsAria(model.title) : labels.marketDetails.toggleOpenDetailsAria(model.title),
6459
+ onClick: handleToggleExpanded,
6460
+ onKeyDown: handleToggleExpanded,
6453
6461
  children: [
6454
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex min-w-0 items-center gap-3 md:gap-4", children: [
6462
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex min-w-52 items-center gap-3 md:gap-4", children: [
6455
6463
  model.image ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6456
6464
  "img",
6457
6465
  {
@@ -6530,10 +6538,7 @@ var MarketDetailsContent = ({
6530
6538
  id: detailsContentId,
6531
6539
  className: cn(
6532
6540
  "grid overflow-hidden",
6533
- getMotionClassName(
6534
- config.enableAnimations,
6535
- "transition-all duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]"
6536
- ),
6541
+ getMotionClassName(config.enableAnimations, "transition-all duration-500 ease-in-out"),
6537
6542
  isOpened ? "grid-rows-[1fr] opacity-100" : "pointer-events-none grid-rows-[0fr] opacity-0"
6538
6543
  ),
6539
6544
  "aria-hidden": !isOpened,
@@ -6545,7 +6550,7 @@ var MarketDetailsContent = ({
6545
6550
  className: cn(
6546
6551
  getMotionClassName(
6547
6552
  config.enableAnimations,
6548
- "transition-all duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]"
6553
+ "transition-all duration-500 ease-in-out"
6549
6554
  ),
6550
6555
  isOpened ? cn(
6551
6556
  "translate-y-0 opacity-100",
@@ -6566,26 +6571,15 @@ var MarketDetailsContent = ({
6566
6571
  ) }),
6567
6572
  /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
6568
6573
  /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: cn("p-5", classNames == null ? void 0 : classNames.content), children: [
6569
- selectedTab === "order-book" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.orderBook), children: isOrderBookLoading ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
6570
- "div",
6571
- {
6572
- className: "flex flex-col gap-2 min-h-40 items-center justify-center",
6573
- role: "status",
6574
- "aria-label": labels.marketDetails.loadingOrderbookAria,
6575
- "aria-busy": true,
6576
- children: [
6577
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(LoadingIcon, {}),
6578
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Typography, { variant: "label", className: "text-agg-muted-foreground", children: labels.marketDetails.loadingOrderbookLabel })
6579
- ]
6580
- }
6581
- ) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
6574
+ selectedTab === "order-book" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: cn("flex flex-col gap-5", classNames == null ? void 0 : classNames.orderBook), children: isOrderBookLoading ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(MarketDetailsOderbookSkeleton, {}) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
6582
6575
  /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6583
6576
  OrderBookRows,
6584
6577
  {
6585
6578
  rows: askRows,
6586
6579
  title: labels.marketDetails.asks,
6587
6580
  formatNumber: config.formatNumber,
6588
- formatCurrency: config.formatCurrency
6581
+ formatCurrency: config.formatCurrency,
6582
+ visibleRows: orderBookDepth
6589
6583
  }
6590
6584
  ),
6591
6585
  /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
@@ -6594,7 +6588,8 @@ var MarketDetailsContent = ({
6594
6588
  rows: bidRows,
6595
6589
  title: labels.marketDetails.bids,
6596
6590
  formatNumber: config.formatNumber,
6597
- formatCurrency: config.formatCurrency
6591
+ formatCurrency: config.formatCurrency,
6592
+ visibleRows: orderBookDepth
6598
6593
  }
6599
6594
  )
6600
6595
  ] }) }) : null,
@@ -6812,22 +6807,10 @@ var getDefaultEventListTabs = (labels) => {
6812
6807
 
6813
6808
  // src/events/list/event-list.utils.ts
6814
6809
  var mapEventToEventListItemEvent = (event) => {
6815
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
6816
- const fallbackVenueEvent = event.venueEvents[0];
6817
- if (!fallbackVenueEvent)
6818
- return null;
6819
6810
  const mergedVenueMarkets = event.markets.flatMap((m) => m.venueMarkets);
6820
- if ((mergedVenueMarkets == null ? void 0 : mergedVenueMarkets.length) === 0)
6811
+ if (mergedVenueMarkets.length === 0)
6821
6812
  return null;
6822
- return __spreadProps(__spreadValues({}, event), {
6823
- id: event.id,
6824
- title: event.title || fallbackVenueEvent.title,
6825
- description: (_b = (_a = event.description) != null ? _a : fallbackVenueEvent.description) != null ? _b : null,
6826
- volume: (_d = (_c = event.volume) != null ? _c : fallbackVenueEvent.volume) != null ? _d : null,
6827
- startDate: (_f = (_e = event.startDate) != null ? _e : fallbackVenueEvent.startDate) != null ? _f : null,
6828
- endDate: (_h = (_g = event.endDate) != null ? _g : fallbackVenueEvent.endDate) != null ? _h : null,
6829
- creationDate: (_j = (_i = event.creationDate) != null ? _i : fallbackVenueEvent.creationDate) != null ? _j : null
6830
- });
6813
+ return event;
6831
6814
  };
6832
6815
  var filterEventsByTabValue = (events, _tabValue) => {
6833
6816
  return events;
@@ -6903,7 +6886,7 @@ var EventList = ({
6903
6886
  const [activeTabValue, setActiveTabValue] = (0, import_react11.useState)(
6904
6887
  (_b = (_a = defaultEventListTabs[0]) == null ? void 0 : _a.value) != null ? _b : "matched"
6905
6888
  );
6906
- const [shouldUseSelectOverflow, setShouldUseSelectOverflow] = (0, import_react11.useState)(false);
6889
+ const [_shouldUseSelectOverflow, setShouldUseSelectOverflow] = (0, import_react11.useState)(false);
6907
6890
  const activeTab = (0, import_react11.useMemo)(() => {
6908
6891
  return defaultEventListTabs.find((tab) => tab.value === activeTabValue);
6909
6892
  }, [activeTabValue]);
@@ -8658,15 +8641,7 @@ ProfileSetupStep.displayName = "ProfileSetupStep";
8658
8641
  var import_hooks28 = require("@agg-market/hooks");
8659
8642
  var import_jsx_runtime89 = require("react/jsx-runtime");
8660
8643
  var OnchainVenueLogos = () => {
8661
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "flex gap-1 sm:gap-0 sm:-space-x-5", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
8662
- "div",
8663
- {
8664
- className: "overflow-hidden rounded sm:rounded-agg-md",
8665
- style: { zIndex: ONCHAIN_VENUES.length - index },
8666
- children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(VenueLogo, { venue, size: "medium", className: "sm:h-8 sm:w-8" })
8667
- },
8668
- venue
8669
- )) });
8644
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "flex gap-1 sm:gap-0 sm:-space-x-5", children: ONCHAIN_VENUES.map((venue, index) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { style: { zIndex: ONCHAIN_VENUES.length - index }, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(VenueLogo, { venue, variant: "logo", size: "medium", className: "sm:h-8 sm:w-8" }) }, venue)) });
8670
8645
  };
8671
8646
  var VenueCard = ({
8672
8647
  logos,
@@ -8760,12 +8735,13 @@ var ConnectAccountsStep = ({
8760
8735
  /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
8761
8736
  VenueCard,
8762
8737
  {
8763
- logos: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "overflow-hidden rounded sm:rounded-agg-md", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
8738
+ logos: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "sm:flex sm:w-14 sm:items-center sm:justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
8764
8739
  VenueLogo,
8765
8740
  {
8766
8741
  venue: "kalshi",
8742
+ variant: "logo",
8767
8743
  size: "large",
8768
- className: "h-6 w-6 sm:h-8 sm:w-8"
8744
+ className: "h-6 w-6 sm:h-9 sm:w-9"
8769
8745
  }
8770
8746
  ) }),
8771
8747
  title: labels.onboarding.connectAccounts.kalshiTitle,
@@ -8873,7 +8849,15 @@ var ConnectKalshiModal = ({
8873
8849
  }
8874
8850
  ),
8875
8851
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Modal.Body, { classNames: { root: "!px-5 !pt-0 !pb-[60px] sm:!px-8" }, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex flex-col gap-8 items-center", children: [
8876
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "overflow-hidden rounded-agg-lg", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(VenueLogo, { venue: "kalshi", size: "large" }) }),
8852
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
8853
+ VenueLogo,
8854
+ {
8855
+ venue: "kalshi",
8856
+ variant: "logo",
8857
+ size: "large",
8858
+ className: "h-[60px] w-[60px]"
8859
+ }
8860
+ ),
8877
8861
  /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex flex-col gap-4 items-center text-center", children: [
8878
8862
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("h2", { className: "text-agg-2xl font-agg-bold text-agg-foreground", children: labels.onboarding.connectKalshiModal.title }),
8879
8863
  /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("p", { className: "text-agg-base leading-agg-6 text-agg-foreground", children: labels.onboarding.connectKalshiModal.description })