@agg-build/ui 1.2.8 → 1.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/modals.mjs CHANGED
@@ -13,11 +13,11 @@ import {
13
13
  WithdrawModal,
14
14
  clearPendingCardSession,
15
15
  getPendingCardSession
16
- } from "./chunk-IIEE4FVO.mjs";
16
+ } from "./chunk-7JKGAWU5.mjs";
17
17
  import {
18
18
  GeoBlockBanner
19
- } from "./chunk-BW4DQYWM.mjs";
20
- import "./chunk-HQRT3B3L.mjs";
19
+ } from "./chunk-5MDFM2MX.mjs";
20
+ import "./chunk-QFW5NDJ6.mjs";
21
21
  export {
22
22
  CARD_NETWORK_OPTIONS,
23
23
  ConnectAccountsStep,
package/dist/pages.js CHANGED
@@ -1403,7 +1403,7 @@ var HourglassStartIcon = (_a) => {
1403
1403
  __spreadProps(__spreadValues(__spreadValues({
1404
1404
  width: "16",
1405
1405
  height: "16",
1406
- viewBox: "0 0 16 16",
1406
+ viewBox: "0 0 10 10",
1407
1407
  fill: "none",
1408
1408
  xmlns: "http://www.w3.org/2000/svg",
1409
1409
  className
@@ -1413,14 +1413,10 @@ var HourglassStartIcon = (_a) => {
1413
1413
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1414
1414
  "path",
1415
1415
  {
1416
- d: "M4.25 1.5H11.75M4.25 14.5H11.75M5 1.5V4.6C5 5.2 5.27 5.76 5.73 6.14L8 8L5.73 9.86C5.27 10.24 5 10.8 5 11.4V14.5M11 1.5V4.6C11 5.2 10.73 5.76 10.27 6.14L8 8L10.27 9.86C10.73 10.24 11 10.8 11 11.4V14.5",
1417
- stroke: "currentColor",
1418
- strokeWidth: "1.4",
1419
- strokeLinecap: "round",
1420
- strokeLinejoin: "round"
1416
+ d: "M8.7324 1.90708C8.80282 1.43542 8.66324 0.95625 8.3499 0.5925C8.03115 0.2225 7.56907 0.0108337 7.08157 0.0108337H2.91907C2.43157 0.0108337 1.96949 0.223334 1.65115 0.593334C1.3374 0.9575 1.19824 1.43667 1.26907 1.90875C1.43824 3.03333 2.05449 4.07458 3.10282 5.01042C2.05407 5.94625 1.43782 6.9875 1.26907 8.11208C1.19824 8.58417 1.33782 9.06333 1.65115 9.4275C1.96949 9.79792 2.43199 10.0096 2.91907 10.0096H7.08157C7.56907 10.0096 8.03115 9.79792 8.3499 9.42792C8.66324 9.06417 8.80282 8.585 8.7324 8.11375C8.56449 6.99292 7.9474 5.95083 6.89657 5.01C7.9474 4.06917 8.56449 3.0275 8.7324 1.90708ZM7.46949 1.83333C7.05949 2.84667 6.19824 3.67583 5.54907 4.1925L5.26157 4.42208C5.10949 4.54292 4.8949 4.54292 4.74282 4.42292L4.44949 4.19C3.80074 3.67708 2.94157 2.85167 2.53074 1.83333C2.47865 1.70458 2.49449 1.55917 2.57157 1.44417C2.64907 1.32958 2.77865 1.26083 2.91699 1.26083H7.08365C7.2224 1.26083 7.35199 1.32917 7.42907 1.44417C7.50657 1.55875 7.52157 1.705 7.46949 1.83333ZM5.0299 3.54083L5.00074 3.56417L4.96657 3.53708C4.53032 3.19208 3.9874 2.69167 3.60365 2.09458H6.39615C6.01115 2.69 5.4674 3.19292 5.03032 3.54125L5.0299 3.54083Z",
1417
+ fill: "currentColor"
1421
1418
  }
1422
- ),
1423
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { d: "M6.75 4.25H9.25L8 5.25L6.75 4.25Z", fill: "currentColor" })
1419
+ )
1424
1420
  ]
1425
1421
  })
1426
1422
  );
@@ -10168,26 +10164,66 @@ var collectEligibleVenueOutcomes = ({
10168
10164
  venueMarkets,
10169
10165
  selectedOutcomeLabel
10170
10166
  }) => {
10167
+ var _a;
10171
10168
  if (!selectedOutcomeLabel) return [];
10169
+ const semanticLabel = toSemanticOutcomeLabel(selectedOutcomeLabel);
10170
+ const seenMarketIds = /* @__PURE__ */ new Set();
10172
10171
  const seenOutcomeIds = /* @__PURE__ */ new Set();
10173
- return venueMarkets.flatMap((market) => {
10174
- const matchedOutcome = sortOutcomes(market.venueMarketOutcomes).find(
10172
+ const result = [];
10173
+ for (const market of venueMarkets) {
10174
+ if (seenMarketIds.has(market.id)) continue;
10175
+ const parentOutcome = sortOutcomes(market.venueMarketOutcomes).find(
10175
10176
  (outcome) => matchesSelectedOutcomeLabel(outcome, selectedOutcomeLabel)
10176
10177
  );
10177
- if (!matchedOutcome || seenOutcomeIds.has(matchedOutcome.id)) {
10178
- return [];
10178
+ if (!parentOutcome) continue;
10179
+ const refs = (_a = parentOutcome.matchedVenueMarketOutcomes) != null ? _a : [];
10180
+ if (refs.length === 0) continue;
10181
+ seenMarketIds.add(market.id);
10182
+ seenOutcomeIds.add(parentOutcome.id);
10183
+ result.push({
10184
+ venue: market.venue,
10185
+ market,
10186
+ outcome: parentOutcome,
10187
+ outcomeId: parentOutcome.id,
10188
+ semanticLabel
10189
+ });
10190
+ for (const ref of refs) {
10191
+ if (seenMarketIds.has(ref.venueMarketId)) continue;
10192
+ const sibling = venueMarkets.find((m) => m.id === ref.venueMarketId);
10193
+ if (!sibling) continue;
10194
+ const siblingOutcome = sibling.venueMarketOutcomes.find(
10195
+ (o) => o.id === ref.venueMarketOutcomeId
10196
+ );
10197
+ if (!siblingOutcome || seenOutcomeIds.has(siblingOutcome.id)) continue;
10198
+ seenMarketIds.add(sibling.id);
10199
+ seenOutcomeIds.add(siblingOutcome.id);
10200
+ result.push({
10201
+ venue: sibling.venue,
10202
+ market: sibling,
10203
+ outcome: siblingOutcome,
10204
+ outcomeId: siblingOutcome.id,
10205
+ semanticLabel
10206
+ });
10179
10207
  }
10208
+ break;
10209
+ }
10210
+ for (const market of venueMarkets) {
10211
+ if (seenMarketIds.has(market.id)) continue;
10212
+ const matchedOutcome = sortOutcomes(market.venueMarketOutcomes).find(
10213
+ (outcome) => matchesSelectedOutcomeLabel(outcome, selectedOutcomeLabel)
10214
+ );
10215
+ if (!matchedOutcome || seenOutcomeIds.has(matchedOutcome.id)) continue;
10216
+ seenMarketIds.add(market.id);
10180
10217
  seenOutcomeIds.add(matchedOutcome.id);
10181
- return [
10182
- {
10183
- venue: market.venue,
10184
- market,
10185
- outcome: matchedOutcome,
10186
- outcomeId: matchedOutcome.id,
10187
- semanticLabel: toSemanticOutcomeLabel(selectedOutcomeLabel)
10188
- }
10189
- ];
10190
- });
10218
+ result.push({
10219
+ venue: market.venue,
10220
+ market,
10221
+ outcome: matchedOutcome,
10222
+ outcomeId: matchedOutcome.id,
10223
+ semanticLabel
10224
+ });
10225
+ }
10226
+ return result;
10191
10227
  };
10192
10228
  var mergeVenueOutcomeOrderbooks = ({
10193
10229
  eligibleOutcomes,
@@ -19482,7 +19518,7 @@ var StatusBadge = ({
19482
19518
  isWon ? "border-agg-success/50 bg-agg-success/10 text-agg-success" : "border-agg-muted-foreground/30 bg-agg-secondary-hover text-agg-foreground"
19483
19519
  ),
19484
19520
  children: [
19485
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Icon, { name: isWon ? "check-circle" : "hourglass-start", size: "small", className: "size-2.5" }),
19521
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Icon, { name: isWon ? "check-circle" : "hourglass-start", size: "small", className: "size-2.5!" }),
19486
19522
  isWon ? labels.won : labels.open
19487
19523
  ]
19488
19524
  }
@@ -19522,7 +19558,7 @@ var TotalTradedCell = ({
19522
19558
  className
19523
19559
  }) => /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: cn("flex flex-col gap-[2px] whitespace-nowrap", className), children: [
19524
19560
  /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("p", { className: "font-agg-sans text-agg-base leading-agg-6 font-agg-bold text-agg-foreground", children: model.totalTraded.primaryLabel }),
19525
- /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("p", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-muted-foreground", children: model.totalTraded.averageLabel })
19561
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsx)("p", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground", children: model.totalTraded.averageLabel })
19526
19562
  ] });
19527
19563
  var PositionValueCell = ({
19528
19564
  value,
@@ -19658,12 +19694,12 @@ var PositionRow = ({
19658
19694
  "button",
19659
19695
  {
19660
19696
  type: "button",
19661
- className: "ml-auto inline-flex h-8 items-center justify-center gap-1 rounded-agg-full px-2 font-agg-sans text-agg-sm leading-agg-5 font-agg-bold text-agg-accent disabled:cursor-not-allowed disabled:opacity-60",
19697
+ className: "ml-auto inline-flex h-8 cursor-pointer items-center justify-center gap-1 rounded-agg-full px-2 font-agg-sans text-agg-sm leading-agg-5 font-agg-bold text-agg-primary hover:text-agg-primary-hover disabled:cursor-not-allowed disabled:opacity-60",
19662
19698
  onClick: handleClaim,
19663
19699
  disabled: isClaiming,
19664
19700
  "aria-busy": isClaiming || void 0,
19665
19701
  children: [
19666
- isClaiming ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(LoadingIcon, { size: "small", className: "text-agg-accent" }) : null,
19702
+ isClaiming ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(LoadingIcon, { size: "small", className: "text-agg-primary" }) : null,
19667
19703
  labels.claim
19668
19704
  ]
19669
19705
  }
@@ -19691,13 +19727,13 @@ var PositionRow = ({
19691
19727
  className: "hidden w-[160px] shrink-0 md:flex"
19692
19728
  }
19693
19729
  ),
19694
- /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "hidden w-[100px] shrink-0 items-center gap-2 md:flex", children: [
19730
+ /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)("div", { className: "hidden w-[100px] shrink-0 items-center gap-3 md:flex", children: [
19695
19731
  /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(StatusBadge, { status: model.positionStatus, labels }),
19696
19732
  model.canClaim ? /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
19697
19733
  "button",
19698
19734
  {
19699
19735
  type: "button",
19700
- className: "inline-flex h-6 items-center justify-center gap-1 rounded-agg-full font-agg-sans text-agg-sm leading-agg-5 font-agg-bold text-agg-primary disabled:cursor-not-allowed disabled:opacity-60",
19736
+ className: "inline-flex h-6 cursor-pointer items-center justify-center gap-1 rounded-agg-full font-agg-sans text-agg-sm leading-agg-5 font-agg-bold text-agg-primary hover:text-agg-primary-hover disabled:cursor-not-allowed disabled:opacity-60",
19701
19737
  onClick: handleClaim,
19702
19738
  disabled: isClaiming,
19703
19739
  "aria-busy": isClaiming || void 0,
package/dist/pages.mjs CHANGED
@@ -7,17 +7,17 @@ import {
7
7
  USER_PROFILE_TAB_POSITIONS,
8
8
  UserProfilePage,
9
9
  useHomePageModals
10
- } from "./chunk-2YVW6J5N.mjs";
11
- import "./chunk-SMGKYWEP.mjs";
10
+ } from "./chunk-XKADJNAJ.mjs";
11
+ import "./chunk-5MTIBPDY.mjs";
12
12
  import {
13
13
  DEPOSIT_MODAL_OPEN_EVENT,
14
14
  WITHDRAW_MODAL_OPEN_EVENT,
15
15
  requestAggDepositModalOpen,
16
16
  requestAggWithdrawModalOpen
17
- } from "./chunk-U6YU5OE7.mjs";
18
- import "./chunk-RPIYL7EA.mjs";
19
- import "./chunk-BW4DQYWM.mjs";
20
- import "./chunk-HQRT3B3L.mjs";
17
+ } from "./chunk-K23CJ5UP.mjs";
18
+ import "./chunk-5PSAIGOT.mjs";
19
+ import "./chunk-5MDFM2MX.mjs";
20
+ import "./chunk-QFW5NDJ6.mjs";
21
21
  export {
22
22
  DEPOSIT_MODAL_OPEN_EVENT,
23
23
  EventMarketPage,
@@ -1432,7 +1432,7 @@ var HourglassStartIcon = (_a) => {
1432
1432
  __spreadProps(__spreadValues(__spreadValues({
1433
1433
  width: "16",
1434
1434
  height: "16",
1435
- viewBox: "0 0 16 16",
1435
+ viewBox: "0 0 10 10",
1436
1436
  fill: "none",
1437
1437
  xmlns: "http://www.w3.org/2000/svg",
1438
1438
  className
@@ -1442,14 +1442,10 @@ var HourglassStartIcon = (_a) => {
1442
1442
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1443
1443
  "path",
1444
1444
  {
1445
- d: "M4.25 1.5H11.75M4.25 14.5H11.75M5 1.5V4.6C5 5.2 5.27 5.76 5.73 6.14L8 8L5.73 9.86C5.27 10.24 5 10.8 5 11.4V14.5M11 1.5V4.6C11 5.2 10.73 5.76 10.27 6.14L8 8L10.27 9.86C10.73 10.24 11 10.8 11 11.4V14.5",
1446
- stroke: "currentColor",
1447
- strokeWidth: "1.4",
1448
- strokeLinecap: "round",
1449
- strokeLinejoin: "round"
1445
+ d: "M8.7324 1.90708C8.80282 1.43542 8.66324 0.95625 8.3499 0.5925C8.03115 0.2225 7.56907 0.0108337 7.08157 0.0108337H2.91907C2.43157 0.0108337 1.96949 0.223334 1.65115 0.593334C1.3374 0.9575 1.19824 1.43667 1.26907 1.90875C1.43824 3.03333 2.05449 4.07458 3.10282 5.01042C2.05407 5.94625 1.43782 6.9875 1.26907 8.11208C1.19824 8.58417 1.33782 9.06333 1.65115 9.4275C1.96949 9.79792 2.43199 10.0096 2.91907 10.0096H7.08157C7.56907 10.0096 8.03115 9.79792 8.3499 9.42792C8.66324 9.06417 8.80282 8.585 8.7324 8.11375C8.56449 6.99292 7.9474 5.95083 6.89657 5.01C7.9474 4.06917 8.56449 3.0275 8.7324 1.90708ZM7.46949 1.83333C7.05949 2.84667 6.19824 3.67583 5.54907 4.1925L5.26157 4.42208C5.10949 4.54292 4.8949 4.54292 4.74282 4.42292L4.44949 4.19C3.80074 3.67708 2.94157 2.85167 2.53074 1.83333C2.47865 1.70458 2.49449 1.55917 2.57157 1.44417C2.64907 1.32958 2.77865 1.26083 2.91699 1.26083H7.08365C7.2224 1.26083 7.35199 1.32917 7.42907 1.44417C7.50657 1.55875 7.52157 1.705 7.46949 1.83333ZM5.0299 3.54083L5.00074 3.56417L4.96657 3.53708C4.53032 3.19208 3.9874 2.69167 3.60365 2.09458H6.39615C6.01115 2.69 5.4674 3.19292 5.03032 3.54125L5.0299 3.54083Z",
1446
+ fill: "currentColor"
1450
1447
  }
1451
- ),
1452
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { d: "M6.75 4.25H9.25L8 5.25L6.75 4.25Z", fill: "currentColor" })
1448
+ )
1453
1449
  ]
1454
1450
  })
1455
1451
  );
@@ -95,7 +95,7 @@ import {
95
95
  typographyVariants,
96
96
  useToast,
97
97
  venueLogoNames
98
- } from "./chunk-HQRT3B3L.mjs";
98
+ } from "./chunk-QFW5NDJ6.mjs";
99
99
  export {
100
100
  ActivityChartIcon,
101
101
  AggErrorBoundary,