@agg-market/ui 0.0.3 → 0.0.4

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 (140) hide show
  1. package/dist/badge.d.mts +2 -2
  2. package/dist/badge.d.ts +2 -2
  3. package/dist/badge.mjs +2 -2
  4. package/dist/button.d.mts +2 -2
  5. package/dist/button.d.ts +2 -2
  6. package/dist/button.js +1 -0
  7. package/dist/button.mjs +3 -3
  8. package/dist/card.mjs +2 -2
  9. package/dist/chart.mjs +3 -3
  10. package/dist/{chunk-YUIZZ6XE.mjs → chunk-3O4U3E5I.mjs} +1 -1
  11. package/dist/{chunk-JLLMIPIX.mjs → chunk-4VUDTWH7.mjs} +1 -1
  12. package/dist/{chunk-MG243DSX.mjs → chunk-AEMAY3MR.mjs} +1 -1
  13. package/dist/{chunk-FYV3MDIL.mjs → chunk-BJNHDIDW.mjs} +4 -4
  14. package/dist/{chunk-LY6474C4.mjs → chunk-BLSHXIAH.mjs} +36 -71
  15. package/dist/{chunk-DQ6XFBYJ.mjs → chunk-DYEWXEEY.mjs} +1 -1
  16. package/dist/{chunk-OUOIDPGX.mjs → chunk-EXF4SESB.mjs} +1 -1
  17. package/dist/chunk-F236MLT6.mjs +1337 -0
  18. package/dist/{chunk-PAQ542ER.mjs → chunk-GHB3GOCW.mjs} +4 -2
  19. package/dist/{chunk-GC3QIIH7.mjs → chunk-GJ4U5NCE.mjs} +23 -1
  20. package/dist/chunk-HM3CGN32.mjs +669 -0
  21. package/dist/chunk-I4YUYVJJ.mjs +472 -0
  22. package/dist/{chunk-NFYS557L.mjs → chunk-JH5VMNDL.mjs} +3 -3
  23. package/dist/{chunk-TTOR7JCT.mjs → chunk-JRS2M5GY.mjs} +1 -1
  24. package/dist/{chunk-QXFDXXDB.mjs → chunk-LWTQD345.mjs} +3 -3
  25. package/dist/{chunk-QE46DVJG.mjs → chunk-MNSHWA6M.mjs} +3 -3
  26. package/dist/{chunk-JQ4FUHXE.mjs → chunk-MXBPDNMC.mjs} +7 -7
  27. package/dist/{chunk-VYNVBJK6.mjs → chunk-NDG43KGL.mjs} +1 -1
  28. package/dist/chunk-O2XH4A3G.mjs +654 -0
  29. package/dist/{chunk-KDBYDMYV.mjs → chunk-OBCHURW5.mjs} +1 -1
  30. package/dist/{chunk-FZTAHWOS.mjs → chunk-OGI343OV.mjs} +2 -2
  31. package/dist/{chunk-XDAEEJYR.mjs → chunk-P23GR7NX.mjs} +2 -2
  32. package/dist/{chunk-J6L5BLKX.mjs → chunk-PGSPYQOW.mjs} +2 -2
  33. package/dist/{chunk-J7OETCZ7.mjs → chunk-QFQHD2V6.mjs} +19 -20
  34. package/dist/chunk-RGZQHSNJ.mjs +845 -0
  35. package/dist/{chunk-7XRKA6XF.mjs → chunk-RXACBTON.mjs} +5 -5
  36. package/dist/{chunk-A4QJAOZW.mjs → chunk-USLTNDJA.mjs} +7 -7
  37. package/dist/{chunk-FACIYUNK.mjs → chunk-VC7LTPQD.mjs} +2 -2
  38. package/dist/{chunk-CKTAVEW2.mjs → chunk-VIP7HSOU.mjs} +2 -2
  39. package/dist/{chunk-5MN6ZNFA.mjs → chunk-VUDJ3PYM.mjs} +9 -9
  40. package/dist/{chunk-2NCBX6XI.mjs → chunk-W2DMBW4E.mjs} +8 -8
  41. package/dist/{chunk-764YUN2J.mjs → chunk-XELWY7SO.mjs} +150 -49
  42. package/dist/chunk-ZDF7QP4G.mjs +160 -0
  43. package/dist/{chunk-4NK2FNAG.mjs → chunk-ZHKMDK5M.mjs} +244 -112
  44. package/dist/{chunk-C4OI72SM.mjs → chunk-ZVBVGWSP.mjs} +1 -0
  45. package/dist/chunk-ZYREURXK.mjs +470 -0
  46. package/dist/connect-button.js +767 -292
  47. package/dist/connect-button.mjs +8 -8
  48. package/dist/deposit-modal.d.mts +34 -0
  49. package/dist/deposit-modal.d.ts +34 -0
  50. package/dist/deposit-modal.js +2787 -0
  51. package/dist/deposit-modal.mjs +15 -0
  52. package/dist/event-list-item-details.js +271 -173
  53. package/dist/event-list-item-details.mjs +13 -13
  54. package/dist/event-list-item.js +903 -426
  55. package/dist/event-list-item.mjs +11 -11
  56. package/dist/event-list.js +1104 -517
  57. package/dist/event-list.mjs +14 -14
  58. package/dist/event-market-page.d.mts +1 -1
  59. package/dist/event-market-page.d.ts +1 -1
  60. package/dist/event-market-page.js +1505 -681
  61. package/dist/event-market-page.mjs +23 -23
  62. package/dist/hello-world.mjs +3 -3
  63. package/dist/home-page.d.mts +1 -1
  64. package/dist/home-page.d.ts +1 -1
  65. package/dist/home-page.js +1120 -533
  66. package/dist/home-page.mjs +15 -15
  67. package/dist/icon.d.mts +74 -4
  68. package/dist/icon.d.ts +74 -4
  69. package/dist/icon.js +668 -123
  70. package/dist/icon.mjs +32 -4
  71. package/dist/index.d.mts +15 -7
  72. package/dist/index.d.ts +15 -7
  73. package/dist/index.js +5301 -2147
  74. package/dist/index.mjs +80 -32
  75. package/dist/loading-icon.d.mts +1 -1
  76. package/dist/loading-icon.d.ts +1 -1
  77. package/dist/loading-icon.js +1 -0
  78. package/dist/loading-icon.mjs +3 -3
  79. package/dist/market-details.d.mts +2 -2
  80. package/dist/market-details.d.ts +2 -2
  81. package/dist/market-details.js +1097 -411
  82. package/dist/market-details.mjs +16 -16
  83. package/dist/modal.mjs +3 -3
  84. package/dist/number-value.mjs +2 -2
  85. package/dist/onboarding-modal.js +1249 -672
  86. package/dist/onboarding-modal.mjs +8 -8
  87. package/dist/place-order.d.mts +1 -1
  88. package/dist/place-order.d.ts +1 -1
  89. package/dist/place-order.js +1091 -506
  90. package/dist/place-order.mjs +12 -12
  91. package/dist/profile-modal.d.mts +66 -0
  92. package/dist/profile-modal.d.ts +66 -0
  93. package/dist/profile-modal.js +2429 -0
  94. package/dist/profile-modal.mjs +14 -0
  95. package/dist/{registry-CVn79H3I.d.mts → registry-DfSCFAdC.d.mts} +72 -0
  96. package/dist/{registry-CVn79H3I.d.ts → registry-DfSCFAdC.d.ts} +72 -0
  97. package/dist/search.d.mts +2 -2
  98. package/dist/search.d.ts +2 -2
  99. package/dist/search.js +740 -265
  100. package/dist/search.mjs +6 -6
  101. package/dist/select.d.mts +2 -0
  102. package/dist/select.d.ts +2 -0
  103. package/dist/select.js +814 -187
  104. package/dist/select.mjs +5 -5
  105. package/dist/settlement.d.mts +1 -1
  106. package/dist/settlement.d.ts +1 -1
  107. package/dist/settlement.js +891 -417
  108. package/dist/settlement.mjs +9 -9
  109. package/dist/skeleton.js +1 -1
  110. package/dist/skeleton.mjs +3 -3
  111. package/dist/styles.css +1 -1
  112. package/dist/switch-button.mjs +2 -2
  113. package/dist/tabs.js +854 -227
  114. package/dist/tabs.mjs +6 -6
  115. package/dist/tailwind.css +1 -1
  116. package/dist/types-Bed6Q0EK.d.mts +3 -0
  117. package/dist/types-Bed6Q0EK.d.ts +3 -0
  118. package/dist/typography.mjs +2 -2
  119. package/dist/user-profile-page.d.mts +133 -0
  120. package/dist/user-profile-page.d.ts +133 -0
  121. package/dist/user-profile-page.js +3335 -0
  122. package/dist/user-profile-page.mjs +15 -0
  123. package/dist/venue-logo.d.mts +2 -2
  124. package/dist/venue-logo.d.ts +2 -2
  125. package/dist/venue-logo.js +28 -70
  126. package/dist/venue-logo.mjs +2 -2
  127. package/dist/{venue-logo.types-Bg8eXtGp.d.ts → venue-logo.types-BSAuY84j.d.ts} +1 -1
  128. package/dist/{venue-logo.types-B1iPJgiD.d.mts → venue-logo.types-DACqcTvY.d.mts} +1 -1
  129. package/dist/withdraw-modal.d.mts +36 -0
  130. package/dist/withdraw-modal.d.ts +36 -0
  131. package/dist/withdraw-modal.js +2442 -0
  132. package/dist/withdraw-modal.mjs +14 -0
  133. package/package.json +43 -3
  134. package/dist/chunk-DA6KZWSK.mjs +0 -807
  135. package/dist/chunk-IY2AA3OL.mjs +0 -50
  136. package/dist/chunk-R3DRVI4J.mjs +0 -741
  137. package/dist/types-CayJ8tWA.d.mts +0 -3
  138. package/dist/types-CayJ8tWA.d.ts +0 -3
  139. package/dist/{types-C5JigCSX.d.mts → types-DkGlbmXq.d.mts} +2 -2
  140. package/dist/{types-C5JigCSX.d.ts → types-DkGlbmXq.d.ts} +2 -2
@@ -0,0 +1,15 @@
1
+ import {
2
+ DepositModal
3
+ } from "./chunk-HM3CGN32.mjs";
4
+ import "./chunk-VIP7HSOU.mjs";
5
+ import "./chunk-ZDF7QP4G.mjs";
6
+ import "./chunk-BLSHXIAH.mjs";
7
+ import "./chunk-F236MLT6.mjs";
8
+ import "./chunk-NDG43KGL.mjs";
9
+ import "./chunk-BNDFQPHF.mjs";
10
+ import "./chunk-PGSPYQOW.mjs";
11
+ import "./chunk-ZVBVGWSP.mjs";
12
+ import "./chunk-GJ4U5NCE.mjs";
13
+ export {
14
+ DepositModal
15
+ };
@@ -126,6 +126,7 @@ var iconSizeClasses = {
126
126
  xxs: "h-2 w-2",
127
127
  xs: "h-3 w-3",
128
128
  s: "h-4 w-4",
129
+ ms: "h-5 w-5",
129
130
  m: "h-6 w-6",
130
131
  l: "h-8 w-8",
131
132
  xl: "h-10 w-10",
@@ -996,7 +997,7 @@ var SettlementSkeletonView = ({
996
997
  Card,
997
998
  {
998
999
  className: cn(
999
- "gap-5 rounded-agg-xl border border-agg-separator bg-agg-secondary p-5 shadow-none hover:shadow-none",
1000
+ "flex flex-col w-full gap-5 rounded-agg-xl border border-agg-separator bg-agg-secondary p-5 shadow-none hover:shadow-none",
1000
1001
  className
1001
1002
  ),
1002
1003
  role: "status",
@@ -1160,8 +1161,13 @@ var LogoKalshiIcon = (_a) => {
1160
1161
  }, getIconA11yProps(title)), props), {
1161
1162
  children: [
1162
1163
  title ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("title", { children: title }) : null,
1163
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M20 10H36V90H20V10Z", fill: primaryColor }),
1164
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M44 50L74 10H92L62 50L92 90H74L44 50Z", fill: primaryColor })
1164
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1165
+ "path",
1166
+ {
1167
+ d: "M54.9798 47.579L79.4249 85.9995H58.2273L38.2531 52.9344V85.9995H20.4189V13.9995H38.2531V45.4356L59.6547 13.9995H78.7119L54.9798 47.579Z",
1168
+ fill: primaryColor
1169
+ }
1170
+ )
1165
1171
  ]
1166
1172
  })
1167
1173
  );
@@ -1171,7 +1177,6 @@ LogoKalshiIcon.displayName = "LogoKalshiIcon";
1171
1177
  // src/primitives/venue-logo/svg/logo-opinion.tsx
1172
1178
  var import_jsx_runtime16 = require("react/jsx-runtime");
1173
1179
  var OPINION_BLACK = "#000000";
1174
- var OPINION_WHITE = "#FFFFFF";
1175
1180
  var LogoOpinionIcon = (_a) => {
1176
1181
  var _b = _a, {
1177
1182
  title,
@@ -1189,7 +1194,6 @@ var LogoOpinionIcon = (_a) => {
1189
1194
  isColor,
1190
1195
  color
1191
1196
  });
1192
- const accentColor = (color == null ? void 0 : color.trim()) ? primaryColor : OPINION_WHITE;
1193
1197
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1194
1198
  "svg",
1195
1199
  __spreadProps(__spreadValues(__spreadValues({
@@ -1199,56 +1203,13 @@ var LogoOpinionIcon = (_a) => {
1199
1203
  }, getIconA11yProps(title)), props), {
1200
1204
  children: [
1201
1205
  title ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("title", { children: title }) : null,
1202
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("circle", { cx: "50", cy: "50", r: "40", fill: primaryColor }),
1203
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1204
- "rect",
1205
- {
1206
- x: "21",
1207
- y: "18",
1208
- width: "8",
1209
- height: "64",
1210
- rx: "4",
1211
- transform: "rotate(-7 21 18)",
1212
- fill: accentColor
1213
- }
1214
- ),
1215
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1216
- "rect",
1217
- {
1218
- x: "37",
1219
- y: "12",
1220
- width: "8",
1221
- height: "76",
1222
- rx: "4",
1223
- transform: "rotate(-4 37 12)",
1224
- fill: accentColor
1225
- }
1226
- ),
1227
1206
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1228
- "rect",
1229
- {
1230
- x: "53",
1231
- y: "12",
1232
- width: "8",
1233
- height: "76",
1234
- rx: "4",
1235
- transform: "rotate(-4 53 12)",
1236
- fill: accentColor
1237
- }
1238
- ),
1239
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1240
- "rect",
1207
+ "path",
1241
1208
  {
1242
- x: "69",
1243
- y: "18",
1244
- width: "8",
1245
- height: "64",
1246
- rx: "4",
1247
- transform: "rotate(-7 69 18)",
1248
- fill: accentColor
1209
+ d: "M51.8239 68.4603L56.9659 68.0094L58.8049 89.0576C61.1459 88.5314 63.4349 87.7952 65.6437 86.8578V68.1879H71.9955V83.4385C74.6496 81.6828 77.0863 79.619 79.2548 77.2898L80.0716 67.958L85.516 68.433C88.6185 62.4381 90.156 55.7558 89.9858 49.0072C89.8154 42.2584 87.9429 35.6623 84.542 29.8316L84.3394 32.1494L77.9876 31.5927L78.8042 22.2668C76.7468 20.1288 74.4594 18.225 71.9835 16.5902V31.9164H65.6317V13.1739C62.9224 12.0205 60.0929 11.173 57.1957 10.6473L59.0317 31.6441L53.8897 32.0949L51.9599 10.0482C51.3128 10.0179 50.6593 9.99976 50.006 9.99976C47.4581 9.99976 44.9161 10.2419 42.414 10.723L46.0438 31.3899L42.1297 32.0798L38.5304 11.6701C35.1755 12.6725 31.9677 14.1143 28.9905 15.9578L33.0435 31.0873L29.9705 31.9134L26.2018 17.8369C23.2938 19.9923 20.6902 22.5308 18.4615 25.3835L20.4246 30.7787L18.1833 31.5956L16.7707 27.7134C14.5111 31.0771 12.7772 34.7657 11.6287 38.652L12.2639 38.4221L20.4306 60.8471L18.1893 61.6641L10.8877 41.5963C9.21542 49.4012 9.91256 57.528 12.8896 64.9338C15.8667 72.3395 20.9879 78.6865 27.5961 83.1601L23.8031 68.9989L26.8762 68.1728L31.5162 85.4991C34.6952 87.1593 38.0844 88.3808 41.5914 89.1303L38.0132 68.7296L41.9301 68.0397L45.7684 89.8262C47.1811 89.9757 48.6007 90.0505 50.0212 90.0502C51.2583 90.0502 52.4863 89.9926 53.6963 89.8807L51.8239 68.4603ZM80.1017 37.8985L86.4385 38.4524L84.3605 62.2299L78.0087 61.6761L80.1017 37.8985ZM65.6528 38.1315H72.0046V61.9969H65.6528V38.1315ZM56.975 37.9501L59.053 61.7277L53.911 62.1785L51.8299 38.4009L56.975 37.9501ZM29.9976 62.003L23.8243 38.9486L26.8974 38.1255L33.0707 61.1649L29.9976 62.003ZM42.157 62.1603L38.0132 38.658L41.9301 37.9683L46.0709 61.4674L42.157 62.1603Z",
1210
+ fill: primaryColor
1249
1211
  }
1250
- ),
1251
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { x: "12", y: "44", width: "76", height: "12", fill: primaryColor })
1212
+ )
1252
1213
  ]
1253
1214
  })
1254
1215
  );
@@ -1257,7 +1218,7 @@ LogoOpinionIcon.displayName = "LogoOpinionIcon";
1257
1218
 
1258
1219
  // src/primitives/venue-logo/svg/logo-polymarket.tsx
1259
1220
  var import_jsx_runtime17 = require("react/jsx-runtime");
1260
- var POLYMARKET_BLUE = "#3861FB";
1221
+ var POLYMARKET_BLUE = "#2E5CFF";
1261
1222
  var LogoPolymarketIcon = (_a) => {
1262
1223
  var _b = _a, {
1263
1224
  title,
@@ -1287,14 +1248,10 @@ var LogoPolymarketIcon = (_a) => {
1287
1248
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1288
1249
  "path",
1289
1250
  {
1290
- d: "M18 10L78 2V98L18 88V10Z",
1291
- stroke: primaryColor,
1292
- strokeWidth: "8",
1293
- strokeLinejoin: "round"
1251
+ d: "M81.0904 84.2882C81.0904 87.9246 81.0904 89.7428 79.901 90.644C78.7119 91.5456 76.9613 91.0542 73.4603 90.0717L17.1975 74.2838C15.0881 73.6919 14.0332 73.3959 13.4233 72.5913C12.8135 71.7866 12.8135 70.6911 12.8135 68.5002V31.4998C12.8135 29.309 12.8135 28.2134 13.4233 27.4088C14.0332 26.6042 15.0881 26.3081 17.1975 25.7163L73.4603 9.92806C76.9613 8.94572 78.7119 8.45448 79.901 9.35587C81.0904 10.2573 81.0904 12.0755 81.0904 15.7119V84.2882ZM26.8451 69.1363L73.4308 82.2104V56.0637L26.8451 69.1363ZM20.4723 63.0711L67.0487 50L20.4723 36.929V63.0711ZM26.8446 30.8638L73.4308 43.9366V17.7896L26.8446 30.8638Z",
1252
+ fill: primaryColor
1294
1253
  }
1295
- ),
1296
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M18 32L78 44", stroke: primaryColor, strokeWidth: "8", strokeLinecap: "round" }),
1297
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", { d: "M18 58L78 70", stroke: primaryColor, strokeWidth: "8", strokeLinecap: "round" })
1254
+ )
1298
1255
  ]
1299
1256
  })
1300
1257
  );
@@ -1303,7 +1260,7 @@ LogoPolymarketIcon.displayName = "LogoPolymarketIcon";
1303
1260
 
1304
1261
  // src/primitives/venue-logo/svg/logo-probable.tsx
1305
1262
  var import_jsx_runtime18 = require("react/jsx-runtime");
1306
- var PROBABLE_ORANGE = "#F85B22";
1263
+ var PROBABLE_ORANGE = "#F05923";
1307
1264
  var LogoProbableIcon = (_a) => {
1308
1265
  var _b = _a, {
1309
1266
  title,
@@ -1330,20 +1287,21 @@ var LogoProbableIcon = (_a) => {
1330
1287
  }, getIconA11yProps(title)), props), {
1331
1288
  children: [
1332
1289
  title ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("title", { children: title }) : null,
1333
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { x: "20", y: "16", width: "60", height: "12", fill: primaryColor }),
1334
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { x: "18", y: "36", width: "64", height: "46", rx: "23", fill: primaryColor }),
1335
1290
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1336
- "rect",
1291
+ "path",
1337
1292
  {
1338
- x: "32",
1339
- y: "50",
1340
- width: "40",
1341
- height: "18",
1342
- rx: "9",
1343
- fill: isColor && !color ? "white" : primaryColor
1293
+ d: "M75.625 59.3489C75.6247 53.7323 71.0719 49.1792 65.4551 49.179H33.9209C28.3039 49.179 23.7503 53.7321 23.75 59.3489C23.75 64.9659 28.3038 69.5198 33.9209 69.5198H65.4551C71.0719 69.5195 75.625 64.9658 75.625 59.3489ZM90.625 59.3489C90.625 73.2501 79.3562 84.5195 65.4551 84.5198H33.9209C20.0196 84.5198 8.75 73.2502 8.75 59.3489C8.75026 45.4477 20.0198 34.179 33.9209 34.179H65.4551C79.3559 34.1792 90.6247 45.4478 90.625 59.3489Z",
1294
+ fill: primaryColor
1344
1295
  }
1345
1296
  ),
1346
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("circle", { cx: "61", cy: "59", r: "7", fill: primaryColor })
1297
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M90.9329 15.4546V30.4546H8.90234V15.4546H90.9329Z", fill: primaryColor }),
1298
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1299
+ "path",
1300
+ {
1301
+ d: "M64.5742 51.3496C68.9894 51.3496 72.5742 54.9344 72.5742 59.3496C72.5742 63.7648 68.9894 67.3496 64.5742 67.3496C60.159 67.3496 56.5742 63.7648 56.5742 59.3496C56.5742 54.9344 60.159 51.3496 64.5742 51.3496Z",
1302
+ fill: primaryColor
1303
+ }
1304
+ )
1347
1305
  ]
1348
1306
  })
1349
1307
  );
@@ -1362,6 +1320,7 @@ var sizeClasses2 = {
1362
1320
  xxs: "h-2 w-2",
1363
1321
  xs: "h-3 w-3",
1364
1322
  s: "h-4 w-4",
1323
+ ms: "h-5 w-5",
1365
1324
  m: "h-6 w-6",
1366
1325
  l: "h-8 w-8",
1367
1326
  xl: "h-10 w-10",
@@ -1405,7 +1364,9 @@ var resolveEventListItemEvent = (fetchedEvent) => {
1405
1364
  const fallbackVenueEvent = fetchedEvent.venueEvents[0];
1406
1365
  if (!fallbackVenueEvent)
1407
1366
  return void 0;
1408
- const mergedVenueMarkets = fetchedEvent.markets.flatMap((venueEvent) => venueEvent.venueMarkets);
1367
+ const mergedVenueMarkets = fetchedEvent.markets.flatMap(
1368
+ (venueEvent) => venueEvent.venueMarkets
1369
+ );
1409
1370
  const venueMarkets = mergedVenueMarkets.length > 0 ? mergedVenueMarkets : [];
1410
1371
  if ((venueMarkets == null ? void 0 : venueMarkets.length) === 0)
1411
1372
  return void 0;
@@ -1488,6 +1449,12 @@ var resolveTileImage = (event, primaryVenueMarket, imageOverride) => {
1488
1449
  }
1489
1450
  return void 0;
1490
1451
  };
1452
+ var resolveVenueLabel = (venue, venueInfo, labels) => {
1453
+ var _a, _b;
1454
+ if (!venue)
1455
+ return labels.eventItem.venueSingular;
1456
+ return (_b = (_a = venueInfo == null ? void 0 : venueInfo[venue]) == null ? void 0 : _a.label) != null ? _b : labels.venues[venue];
1457
+ };
1491
1458
 
1492
1459
  // src/events/item-details/event-list-item-details.utils.ts
1493
1460
  var import_dayjs2 = __toESM(require("dayjs"));
@@ -1644,12 +1611,30 @@ var EventListItemDetailsUnavailableState = ({
1644
1611
  }
1645
1612
  );
1646
1613
  };
1614
+ var probabilityModeOrder = ["yes", "no"];
1615
+ var clampProbability = (value) => {
1616
+ if (value < 0)
1617
+ return 0;
1618
+ if (value > 1)
1619
+ return 1;
1620
+ return value;
1621
+ };
1622
+ var resolveAverageProbability = (values) => {
1623
+ const validValues = values.filter((value) => value != null);
1624
+ if (validValues.length === 0)
1625
+ return void 0;
1626
+ return validValues.reduce((sum, value) => sum + value, 0) / validValues.length;
1627
+ };
1628
+ var resolveOutcomeCandidateIds = (market, outcome) => {
1629
+ var _a;
1630
+ return [outcome.id, (_a = outcome.externalIdentifier) != null ? _a : void 0, market.externalIdentifier].filter(
1631
+ (value) => typeof value === "string" && value.trim().length > 0
1632
+ );
1633
+ };
1647
1634
  var EventListItemDetailsGraphSection = ({
1648
1635
  venueMarkets,
1649
- outcomeLabels,
1650
1636
  selectedOutcomeLabel,
1651
1637
  onSelectedOutcomeLabelChange,
1652
- probabilityByLabel,
1653
1638
  switchLabels,
1654
1639
  isDateOutcomeMarket,
1655
1640
  classNames,
@@ -1659,65 +1644,89 @@ var EventListItemDetailsGraphSection = ({
1659
1644
  selectedTimeRange
1660
1645
  }) => {
1661
1646
  const labels = (0, import_hooks12.useLabels)();
1662
- const isLocalOutcomeSelection = !isDateOutcomeMarket && outcomeLabels.length === 2;
1663
- const [internalSelectedOutcomeLabel, setInternalSelectedOutcomeLabel] = (0, import_react3.useState)(selectedOutcomeLabel);
1664
- const [selectedBinaryOutcome, setSelectedBinaryOutcome] = (0, import_react3.useState)("Yes");
1665
- (0, import_react3.useEffect)(() => {
1666
- setInternalSelectedOutcomeLabel(selectedOutcomeLabel);
1667
- }, [selectedOutcomeLabel]);
1668
- const resolvedSelectedOutcomeLabel = isLocalOutcomeSelection ? internalSelectedOutcomeLabel : selectedOutcomeLabel;
1669
- const selectedOutcomesByVenue = (0, import_react3.useMemo)(() => {
1670
- return resolveOutcomesByVenue(venueMarkets, resolvedSelectedOutcomeLabel);
1671
- }, [resolvedSelectedOutcomeLabel, venueMarkets]);
1672
- const segmentedDisplayItems = (0, import_react3.useMemo)(() => {
1673
- var _a;
1647
+ const [selectedVenue, setSelectedVenue] = (0, import_react3.useState)(null);
1648
+ const [activeProbabilityMode, setActiveProbabilityMode] = (0, import_react3.useState)("yes");
1649
+ const probabilityModeConfigs = (0, import_react3.useMemo)(() => {
1674
1650
  if (isDateOutcomeMarket) {
1675
- const selectedOutcomeAverageProbability = (_a = probabilityByLabel.get(resolvedSelectedOutcomeLabel)) != null ? _a : 0;
1676
- const noProbability = Math.max(0, 1 - selectedOutcomeAverageProbability);
1677
- return [
1678
- {
1679
- label: labels.eventItemDetails.yes,
1680
- display: `${labels.eventItemDetails.yes} ${formatPercent(selectedOutcomeAverageProbability)}`,
1681
- isActive: selectedBinaryOutcome === "Yes",
1682
- onSelect: () => setSelectedBinaryOutcome("Yes")
1683
- },
1684
- {
1685
- label: labels.eventItemDetails.no,
1686
- display: `${labels.eventItemDetails.no} ${formatPercent(noProbability)}`,
1687
- isActive: selectedBinaryOutcome === "No",
1688
- onSelect: () => setSelectedBinaryOutcome("No")
1689
- }
1690
- ];
1691
- }
1692
- return switchLabels.map((label) => {
1693
- const probability = probabilityByLabel.get(label);
1694
- const probabilitySuffix = probability == null ? "" : ` ${formatPercent(probability)}`;
1695
1651
  return {
1696
- label,
1697
- display: `${label}${probabilitySuffix}`,
1698
- isActive: resolvedSelectedOutcomeLabel === label,
1699
- onSelect: () => {
1700
- if (isLocalOutcomeSelection) {
1701
- setInternalSelectedOutcomeLabel(label);
1702
- return;
1703
- }
1704
- onSelectedOutcomeLabelChange(label);
1652
+ yes: {
1653
+ switchLabel: switchLabels[0],
1654
+ sourceOutcomeLabel: selectedOutcomeLabel,
1655
+ transformProbability: (value) => value
1656
+ },
1657
+ no: {
1658
+ switchLabel: switchLabels[1],
1659
+ sourceOutcomeLabel: selectedOutcomeLabel,
1660
+ transformProbability: (value) => 1 - value
1705
1661
  }
1706
1662
  };
1707
- });
1663
+ }
1664
+ return {
1665
+ yes: {
1666
+ switchLabel: switchLabels[0],
1667
+ sourceOutcomeLabel: switchLabels[0],
1668
+ transformProbability: (value) => value
1669
+ },
1670
+ no: {
1671
+ switchLabel: switchLabels[1],
1672
+ sourceOutcomeLabel: switchLabels[1],
1673
+ transformProbability: (value) => value
1674
+ }
1675
+ };
1676
+ }, [isDateOutcomeMarket, selectedOutcomeLabel, switchLabels]);
1677
+ const selectedOutcomesByMode = (0, import_react3.useMemo)(() => {
1678
+ return {
1679
+ yes: resolveOutcomesByVenue(venueMarkets, probabilityModeConfigs.yes.sourceOutcomeLabel),
1680
+ no: resolveOutcomesByVenue(venueMarkets, probabilityModeConfigs.no.sourceOutcomeLabel)
1681
+ };
1708
1682
  }, [
1709
- formatPercent,
1710
- isDateOutcomeMarket,
1711
- isLocalOutcomeSelection,
1712
- onSelectedOutcomeLabelChange,
1713
- probabilityByLabel,
1714
- resolvedSelectedOutcomeLabel,
1715
- selectedBinaryOutcome,
1716
- switchLabels
1683
+ probabilityModeConfigs.no.sourceOutcomeLabel,
1684
+ probabilityModeConfigs.yes.sourceOutcomeLabel,
1685
+ venueMarkets
1717
1686
  ]);
1687
+ (0, import_react3.useEffect)(() => {
1688
+ if (isDateOutcomeMarket) {
1689
+ return;
1690
+ }
1691
+ const nextMode = selectedOutcomeLabel === probabilityModeConfigs.no.sourceOutcomeLabel ? "no" : "yes";
1692
+ setActiveProbabilityMode(nextMode);
1693
+ }, [isDateOutcomeMarket, probabilityModeConfigs.no.sourceOutcomeLabel, selectedOutcomeLabel]);
1694
+ const normalizedVenueDataByMode = (0, import_react3.useMemo)(() => {
1695
+ const buildModeData = (mode) => {
1696
+ const modeConfig = probabilityModeConfigs[mode];
1697
+ return selectedOutcomesByMode[mode].map((outcomeByVenue, index) => {
1698
+ const rawProbability = normalizeProbability(outcomeByVenue.outcome.price);
1699
+ const transformedProbability = rawProbability == null ? void 0 : clampProbability(modeConfig.transformProbability(rawProbability));
1700
+ return {
1701
+ venue: outcomeByVenue.venue,
1702
+ venueLabel: resolveVenueLabel(outcomeByVenue.venue, venueInfo, labels),
1703
+ market: outcomeByVenue.market,
1704
+ outcome: outcomeByVenue.outcome,
1705
+ probability: transformedProbability,
1706
+ color: resolveSeriesColor(outcomeByVenue.venue, index)
1707
+ };
1708
+ });
1709
+ };
1710
+ return {
1711
+ yes: buildModeData("yes"),
1712
+ no: buildModeData("no")
1713
+ };
1714
+ }, [labels, probabilityModeConfigs, selectedOutcomesByMode, venueInfo]);
1715
+ const allOutcomesForHistory = (0, import_react3.useMemo)(() => {
1716
+ const outcomeByModeAndId = /* @__PURE__ */ new Map();
1717
+ probabilityModeOrder.forEach((mode) => {
1718
+ selectedOutcomesByMode[mode].forEach((outcomeByVenue) => {
1719
+ outcomeByModeAndId.set(
1720
+ `${outcomeByVenue.venue}:${outcomeByVenue.outcome.id}`,
1721
+ outcomeByVenue
1722
+ );
1723
+ });
1724
+ });
1725
+ return [...outcomeByModeAndId.values()];
1726
+ }, [selectedOutcomesByMode]);
1718
1727
  const priceHistoryGroups = (0, import_react3.useMemo)(() => {
1719
- return buildPriceHistoryGroups(selectedOutcomesByVenue);
1720
- }, [selectedOutcomesByVenue]);
1728
+ return buildPriceHistoryGroups(allOutcomesForHistory);
1729
+ }, [allOutcomesForHistory]);
1721
1730
  const timeWindow = (0, import_react3.useMemo)(() => {
1722
1731
  return getTimeWindowByRange(selectedTimeRange);
1723
1732
  }, [selectedTimeRange]);
@@ -1726,35 +1735,114 @@ var EventListItemDetailsGraphSection = ({
1726
1735
  }, timeWindow), {
1727
1736
  enabled: priceHistoryGroups.length > 0
1728
1737
  }));
1729
- const chartSeries = (0, import_react3.useMemo)(() => {
1730
- if (!(priceHistoryData == null ? void 0 : priceHistoryData.length))
1731
- return [];
1732
- return priceHistoryData.map((history, index) => {
1733
- var _a, _b;
1734
- const matchingOutcomeByVenue = (_a = selectedOutcomesByVenue.find((item) => {
1735
- return item.outcome.id === history.marketId || item.outcome.externalIdentifier === history.marketId || item.market.externalIdentifier === history.marketId;
1736
- })) != null ? _a : selectedOutcomesByVenue.find((item) => item.venue === history.venue);
1737
- const color = resolveSeriesColor((_b = matchingOutcomeByVenue == null ? void 0 : matchingOutcomeByVenue.venue) != null ? _b : history.venue, index);
1738
+ const priceHistoryByVenue = (0, import_react3.useMemo)(() => {
1739
+ const historyByVenue = /* @__PURE__ */ new Map();
1740
+ if (!(priceHistoryData == null ? void 0 : priceHistoryData.length)) {
1741
+ return historyByVenue;
1742
+ }
1743
+ priceHistoryData.forEach((historyItem) => {
1744
+ const venue = historyItem.venue;
1745
+ const venueHistory = historyByVenue.get(venue);
1746
+ if (venueHistory) {
1747
+ venueHistory.push(historyItem);
1748
+ return;
1749
+ }
1750
+ historyByVenue.set(venue, [historyItem]);
1751
+ });
1752
+ return historyByVenue;
1753
+ }, [priceHistoryData]);
1754
+ const chartSeriesByMode = (0, import_react3.useMemo)(() => {
1755
+ const buildSeries = (mode) => {
1756
+ const modeConfig = probabilityModeConfigs[mode];
1757
+ const chartSeries = [];
1758
+ normalizedVenueDataByMode[mode].forEach((venueData) => {
1759
+ var _a;
1760
+ const venueHistory = priceHistoryByVenue.get(venueData.venue);
1761
+ if (!(venueHistory == null ? void 0 : venueHistory.length))
1762
+ return;
1763
+ const candidateIds = resolveOutcomeCandidateIds(venueData.market, venueData.outcome);
1764
+ const matchingHistory = (_a = venueHistory.find((historyItem) => candidateIds.includes(historyItem.marketId))) != null ? _a : venueHistory.length === 1 ? venueHistory[0] : void 0;
1765
+ if (!matchingHistory)
1766
+ return;
1767
+ const points = matchingHistory.points.map((point) => {
1768
+ const probability = normalizeProbability(point.price);
1769
+ if (probability == null || !Number.isFinite(point.timestamp))
1770
+ return null;
1771
+ return {
1772
+ time: point.timestamp,
1773
+ value: clampProbability(modeConfig.transformProbability(probability)) * 100
1774
+ };
1775
+ }).filter((point) => point != null);
1776
+ if (points.length === 0)
1777
+ return;
1778
+ chartSeries.push({
1779
+ id: `${mode}-${venueData.venue}-${matchingHistory.marketId}`,
1780
+ venue: venueData.venue,
1781
+ color: venueData.color,
1782
+ points,
1783
+ lineWidth: 2,
1784
+ lineStyle: "solid"
1785
+ });
1786
+ });
1787
+ return chartSeries;
1788
+ };
1789
+ return {
1790
+ yes: buildSeries("yes"),
1791
+ no: buildSeries("no")
1792
+ };
1793
+ }, [normalizedVenueDataByMode, priceHistoryByVenue, probabilityModeConfigs]);
1794
+ const visibleChartSeries = (0, import_react3.useMemo)(() => {
1795
+ const modeSeries = chartSeriesByMode[activeProbabilityMode];
1796
+ if (!selectedVenue)
1797
+ return modeSeries;
1798
+ return modeSeries.filter((seriesItem) => seriesItem.venue === selectedVenue);
1799
+ }, [activeProbabilityMode, chartSeriesByMode, selectedVenue]);
1800
+ const segmentedDisplayItems = (0, import_react3.useMemo)(() => {
1801
+ return probabilityModeOrder.map((mode) => {
1802
+ const averageProbability = resolveAverageProbability(
1803
+ normalizedVenueDataByMode[mode].map((venueData) => venueData.probability)
1804
+ );
1805
+ const suffix = averageProbability == null ? "" : ` ${formatPercent(averageProbability)}`;
1806
+ const switchLabel = probabilityModeConfigs[mode].switchLabel;
1738
1807
  return {
1739
- id: `${history.venue}-${history.marketId}-${index}`,
1740
- color,
1741
- points: history.points.map((point) => ({
1742
- time: point.timestamp,
1743
- value: point.price * 100
1744
- }))
1808
+ mode,
1809
+ display: `${switchLabel}${suffix}`
1745
1810
  };
1746
- }).filter((seriesItem) => seriesItem.points.length > 0);
1747
- }, [priceHistoryData, selectedOutcomesByVenue]);
1811
+ });
1812
+ }, [formatPercent, normalizedVenueDataByMode, probabilityModeConfigs]);
1813
+ const activeModeVenueData = normalizedVenueDataByMode[activeProbabilityMode];
1814
+ (0, import_react3.useEffect)(() => {
1815
+ if (!selectedVenue) {
1816
+ return;
1817
+ }
1818
+ if (activeModeVenueData.some((item) => item.venue === selectedVenue)) {
1819
+ return;
1820
+ }
1821
+ setSelectedVenue(null);
1822
+ }, [activeModeVenueData, selectedVenue]);
1823
+ const handleProbabilityModeChange = (nextMode) => {
1824
+ setActiveProbabilityMode(nextMode);
1825
+ if (isDateOutcomeMarket) {
1826
+ return;
1827
+ }
1828
+ onSelectedOutcomeLabelChange(probabilityModeConfigs[nextMode].sourceOutcomeLabel);
1829
+ };
1830
+ const handleVenueToggle = (venue) => {
1831
+ setSelectedVenue((currentSelectedVenue) => {
1832
+ if (currentSelectedVenue === venue)
1833
+ return null;
1834
+ return venue;
1835
+ });
1836
+ };
1748
1837
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1749
1838
  LineChart,
1750
1839
  {
1751
1840
  classNames: { root: classNames == null ? void 0 : classNames.chart },
1752
- series: chartSeries,
1841
+ series: visibleChartSeries,
1753
1842
  height: 300,
1754
1843
  isLoading: isPriceHistoryLoading,
1755
- showSeriesControls: selectedOutcomesByVenue.length > 0 || segmentedDisplayItems.length > 0,
1844
+ showSeriesControls: activeModeVenueData.length > 0 || segmentedDisplayItems.length > 0,
1756
1845
  renderSeriesControls: () => {
1757
- var _a, _b, _c, _d;
1758
1846
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1759
1847
  "div",
1760
1848
  {
@@ -1767,28 +1855,43 @@ var EventListItemDetailsGraphSection = ({
1767
1855
  "flex min-w-0 gap-2 overflow-x-auto pb-1 md:flex-wrap md:overflow-visible md:pb-0",
1768
1856
  classNames == null ? void 0 : classNames.outcomeBadges
1769
1857
  ),
1770
- children: selectedOutcomesByVenue.map((outcomeByVenue) => {
1771
- var _a2;
1772
- const probability = normalizeProbability(outcomeByVenue.outcome.price);
1773
- const text = probability == null ? "-" : formatPercent(probability);
1858
+ children: activeModeVenueData.map((venueData) => {
1859
+ var _a;
1860
+ const text = venueData.probability == null ? "-" : formatPercent(venueData.probability);
1861
+ const isActiveVenue = selectedVenue === venueData.venue;
1774
1862
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1775
- Badge,
1863
+ "button",
1776
1864
  {
1777
- text,
1778
- size: "l",
1779
- prefix: showVenueLogo ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1780
- VenueLogo,
1865
+ type: "button",
1866
+ "aria-label": `${venueData.venueLabel} ${text}`,
1867
+ "aria-pressed": isActiveVenue,
1868
+ className: cn(
1869
+ "rounded-agg-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-agg-primary focus-visible:ring-offset-2 focus-visible:ring-offset-agg-secondary-hover"
1870
+ ),
1871
+ onClick: () => handleVenueToggle(venueData.venue),
1872
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1873
+ Badge,
1781
1874
  {
1782
- venue: outcomeByVenue.venue,
1783
- size: "s",
1784
- title: (_a2 = venueInfo == null ? void 0 : venueInfo[outcomeByVenue.venue]) == null ? void 0 : _a2.label
1875
+ text,
1876
+ size: "l",
1877
+ prefix: showVenueLogo ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1878
+ VenueLogo,
1879
+ {
1880
+ venue: venueData.venue,
1881
+ size: "s",
1882
+ title: (_a = venueInfo == null ? void 0 : venueInfo[venueData.venue]) == null ? void 0 : _a.label
1883
+ }
1884
+ ) : void 0,
1885
+ classNames: {
1886
+ root: cn(
1887
+ "h-9 shrink-0 border-2 px-4 text-agg-base leading-agg-6",
1888
+ isActiveVenue ? "border-agg-primary bg-agg-secondary font-agg-bold" : "border-transparent bg-agg-secondary-hover font-agg-normal"
1889
+ )
1890
+ }
1785
1891
  }
1786
- ) : void 0,
1787
- classNames: {
1788
- root: "h-9 shrink-0 bg-agg-secondary-hover px-4 text-agg-base leading-agg-6"
1789
- }
1892
+ )
1790
1893
  },
1791
- `${outcomeByVenue.market.id}-${outcomeByVenue.outcome.id}`
1894
+ `${activeProbabilityMode}-${venueData.market.id}-${venueData.outcome.id}`
1792
1895
  );
1793
1896
  })
1794
1897
  }
@@ -1798,13 +1901,10 @@ var EventListItemDetailsGraphSection = ({
1798
1901
  {
1799
1902
  ariaLabel: labels.eventItemDetails.outcomeSelectorAria,
1800
1903
  className: cn("w-full md:w-fit", classNames == null ? void 0 : classNames.segmentedControl),
1801
- value: (_d = (_c = (_a = segmentedDisplayItems.find((item) => item.isActive)) == null ? void 0 : _a.label) != null ? _c : (_b = segmentedDisplayItems[0]) == null ? void 0 : _b.label) != null ? _d : "",
1802
- onValueChange: (nextValue) => {
1803
- var _a2;
1804
- (_a2 = segmentedDisplayItems.find((item) => item.label === nextValue)) == null ? void 0 : _a2.onSelect();
1805
- },
1904
+ value: activeProbabilityMode,
1905
+ onValueChange: handleProbabilityModeChange,
1806
1906
  options: segmentedDisplayItems.map((segmentedItem) => ({
1807
- value: segmentedItem.label,
1907
+ value: segmentedItem.mode,
1808
1908
  label: segmentedItem.display,
1809
1909
  ariaLabel: segmentedItem.display
1810
1910
  }))
@@ -1924,7 +2024,7 @@ var EventListItemDetailsContent = ({
1924
2024
  className: cn(detailsBaseCardClassName, classNames == null ? void 0 : classNames.root),
1925
2025
  "aria-label": ariaLabel != null ? ariaLabel : resolvedTitle,
1926
2026
  children: [
1927
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn("flex items-start gap-3 md:gap-4", classNames == null ? void 0 : classNames.header), children: [
2027
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn("flex items-start gap-3 md:gap-4 ", classNames == null ? void 0 : classNames.header), children: [
1928
2028
  resolvedImage ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1929
2029
  "img",
1930
2030
  {
@@ -1939,7 +2039,7 @@ var EventListItemDetailsContent = ({
1939
2039
  {
1940
2040
  variant: "value",
1941
2041
  className: cn(
1942
- "min-w-0 text-agg-base font-agg-bold leading-agg-6 whitespace-normal [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2] md:text-agg-2xl md:leading-agg-8 md:[display:block] md:truncate md:whitespace-nowrap",
2042
+ "min-w-0 text-agg-base font-agg-bold! leading-agg-6 whitespace-normal [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2] md:text-agg-2xl md:leading-agg-8 md:block md:truncate md:whitespace-nowrap",
1943
2043
  classNames == null ? void 0 : classNames.title
1944
2044
  ),
1945
2045
  children: resolvedTitle
@@ -2011,10 +2111,8 @@ var EventListItemDetailsContent = ({
2011
2111
  EventListItemDetailsGraphSection,
2012
2112
  {
2013
2113
  venueMarkets,
2014
- outcomeLabels,
2015
2114
  selectedOutcomeLabel,
2016
2115
  onSelectedOutcomeLabelChange: setSelectedOutcomeLabel,
2017
- probabilityByLabel,
2018
2116
  switchLabels,
2019
2117
  isDateOutcomeMarket,
2020
2118
  classNames,