@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/{chunk-BW4DQYWM.mjs → chunk-5MDFM2MX.mjs} +1 -1
- package/dist/{chunk-SMGKYWEP.mjs → chunk-5MTIBPDY.mjs} +56 -16
- package/dist/{chunk-RPIYL7EA.mjs → chunk-5PSAIGOT.mjs} +1 -1
- package/dist/{chunk-IIEE4FVO.mjs → chunk-7JKGAWU5.mjs} +1 -1
- package/dist/{chunk-U6YU5OE7.mjs → chunk-K23CJ5UP.mjs} +3 -3
- package/dist/{chunk-HQRT3B3L.mjs → chunk-QFW5NDJ6.mjs} +4 -8
- package/dist/{chunk-2YVW6J5N.mjs → chunk-XKADJNAJ.mjs} +9 -9
- package/dist/events.js +58 -22
- package/dist/events.mjs +3 -3
- package/dist/index.js +65 -29
- package/dist/index.mjs +8 -8
- package/dist/modals.js +4 -8
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +64 -28
- package/dist/pages.mjs +6 -6
- package/dist/primitives.js +4 -8
- package/dist/primitives.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +4 -8
- package/dist/trading.mjs +4 -4
- package/dist/types/events/market-details/orderbook-aggregation.d.mts +16 -0
- package/dist/types/events/market-details/orderbook-aggregation.d.ts +16 -0
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
resolveUnifiedOrderBookEntries,
|
|
22
22
|
sortOutcomeSelectorOutcomes,
|
|
23
23
|
useEventTradingContext
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5PSAIGOT.mjs";
|
|
25
25
|
import {
|
|
26
26
|
AutocompleteSelect,
|
|
27
27
|
Badge,
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
sortMarketsByYesOddsDesc,
|
|
74
74
|
sortOutcomes,
|
|
75
75
|
splitEventsByLifecycle
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-QFW5NDJ6.mjs";
|
|
77
77
|
|
|
78
78
|
// src/events/item/index.tsx
|
|
79
79
|
import {
|
|
@@ -884,26 +884,66 @@ var collectEligibleVenueOutcomes = ({
|
|
|
884
884
|
venueMarkets,
|
|
885
885
|
selectedOutcomeLabel
|
|
886
886
|
}) => {
|
|
887
|
+
var _a;
|
|
887
888
|
if (!selectedOutcomeLabel) return [];
|
|
889
|
+
const semanticLabel = toSemanticOutcomeLabel(selectedOutcomeLabel);
|
|
890
|
+
const seenMarketIds = /* @__PURE__ */ new Set();
|
|
888
891
|
const seenOutcomeIds = /* @__PURE__ */ new Set();
|
|
889
|
-
|
|
890
|
-
|
|
892
|
+
const result = [];
|
|
893
|
+
for (const market of venueMarkets) {
|
|
894
|
+
if (seenMarketIds.has(market.id)) continue;
|
|
895
|
+
const parentOutcome = sortOutcomes(market.venueMarketOutcomes).find(
|
|
891
896
|
(outcome) => matchesSelectedOutcomeLabel(outcome, selectedOutcomeLabel)
|
|
892
897
|
);
|
|
893
|
-
if (!
|
|
894
|
-
|
|
898
|
+
if (!parentOutcome) continue;
|
|
899
|
+
const refs = (_a = parentOutcome.matchedVenueMarketOutcomes) != null ? _a : [];
|
|
900
|
+
if (refs.length === 0) continue;
|
|
901
|
+
seenMarketIds.add(market.id);
|
|
902
|
+
seenOutcomeIds.add(parentOutcome.id);
|
|
903
|
+
result.push({
|
|
904
|
+
venue: market.venue,
|
|
905
|
+
market,
|
|
906
|
+
outcome: parentOutcome,
|
|
907
|
+
outcomeId: parentOutcome.id,
|
|
908
|
+
semanticLabel
|
|
909
|
+
});
|
|
910
|
+
for (const ref of refs) {
|
|
911
|
+
if (seenMarketIds.has(ref.venueMarketId)) continue;
|
|
912
|
+
const sibling = venueMarkets.find((m) => m.id === ref.venueMarketId);
|
|
913
|
+
if (!sibling) continue;
|
|
914
|
+
const siblingOutcome = sibling.venueMarketOutcomes.find(
|
|
915
|
+
(o) => o.id === ref.venueMarketOutcomeId
|
|
916
|
+
);
|
|
917
|
+
if (!siblingOutcome || seenOutcomeIds.has(siblingOutcome.id)) continue;
|
|
918
|
+
seenMarketIds.add(sibling.id);
|
|
919
|
+
seenOutcomeIds.add(siblingOutcome.id);
|
|
920
|
+
result.push({
|
|
921
|
+
venue: sibling.venue,
|
|
922
|
+
market: sibling,
|
|
923
|
+
outcome: siblingOutcome,
|
|
924
|
+
outcomeId: siblingOutcome.id,
|
|
925
|
+
semanticLabel
|
|
926
|
+
});
|
|
895
927
|
}
|
|
928
|
+
break;
|
|
929
|
+
}
|
|
930
|
+
for (const market of venueMarkets) {
|
|
931
|
+
if (seenMarketIds.has(market.id)) continue;
|
|
932
|
+
const matchedOutcome = sortOutcomes(market.venueMarketOutcomes).find(
|
|
933
|
+
(outcome) => matchesSelectedOutcomeLabel(outcome, selectedOutcomeLabel)
|
|
934
|
+
);
|
|
935
|
+
if (!matchedOutcome || seenOutcomeIds.has(matchedOutcome.id)) continue;
|
|
936
|
+
seenMarketIds.add(market.id);
|
|
896
937
|
seenOutcomeIds.add(matchedOutcome.id);
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
});
|
|
938
|
+
result.push({
|
|
939
|
+
venue: market.venue,
|
|
940
|
+
market,
|
|
941
|
+
outcome: matchedOutcome,
|
|
942
|
+
outcomeId: matchedOutcome.id,
|
|
943
|
+
semanticLabel
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
return result;
|
|
907
947
|
};
|
|
908
948
|
var collectEligibleVenueOutcomeIds = ({
|
|
909
949
|
venueMarkets,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
getMotionClassName,
|
|
35
35
|
shortenAddress,
|
|
36
36
|
venueLogoLabels
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-QFW5NDJ6.mjs";
|
|
38
38
|
|
|
39
39
|
// src/deposit/index.tsx
|
|
40
40
|
import { useEffect as useEffect3, useMemo, useRef, useState as useState2 } from "react";
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
getTradingValueLabel,
|
|
8
8
|
getTradingVenueLabel,
|
|
9
9
|
resolveOrderEligibilityMessage
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-5PSAIGOT.mjs";
|
|
11
11
|
import {
|
|
12
12
|
GeoBlockBanner
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5MDFM2MX.mjs";
|
|
14
14
|
import {
|
|
15
15
|
AGG_TERMS_OF_SERVICE_URL,
|
|
16
16
|
Button,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
getMotionClassName,
|
|
38
38
|
normalizeVenueMarketCluster,
|
|
39
39
|
skeletonViews
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-QFW5NDJ6.mjs";
|
|
41
41
|
|
|
42
42
|
// src/trading/types.ts
|
|
43
43
|
import { Venue, enumGuard, isFiniteNonNeg, safeParse } from "@agg-build/sdk";
|
|
@@ -1377,7 +1377,7 @@ var HourglassStartIcon = (_a) => {
|
|
|
1377
1377
|
__spreadProps(__spreadValues(__spreadValues({
|
|
1378
1378
|
width: "16",
|
|
1379
1379
|
height: "16",
|
|
1380
|
-
viewBox: "0 0
|
|
1380
|
+
viewBox: "0 0 10 10",
|
|
1381
1381
|
fill: "none",
|
|
1382
1382
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1383
1383
|
className
|
|
@@ -1387,14 +1387,10 @@ var HourglassStartIcon = (_a) => {
|
|
|
1387
1387
|
/* @__PURE__ */ jsx35(
|
|
1388
1388
|
"path",
|
|
1389
1389
|
{
|
|
1390
|
-
d: "
|
|
1391
|
-
|
|
1392
|
-
strokeWidth: "1.4",
|
|
1393
|
-
strokeLinecap: "round",
|
|
1394
|
-
strokeLinejoin: "round"
|
|
1390
|
+
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",
|
|
1391
|
+
fill: "currentColor"
|
|
1395
1392
|
}
|
|
1396
|
-
)
|
|
1397
|
-
/* @__PURE__ */ jsx35("path", { d: "M6.75 4.25H9.25L8 5.25L6.75 4.25Z", fill: "currentColor" })
|
|
1393
|
+
)
|
|
1398
1394
|
]
|
|
1399
1395
|
})
|
|
1400
1396
|
);
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
isErrorWithStatus,
|
|
10
10
|
useEventListTabs,
|
|
11
11
|
useEventListTabsHeaderOverflow
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5MTIBPDY.mjs";
|
|
13
13
|
import {
|
|
14
14
|
DEPOSIT_MODAL_OPEN_EVENT,
|
|
15
15
|
PlaceOrder,
|
|
16
16
|
SettlementDetails,
|
|
17
17
|
WITHDRAW_MODAL_OPEN_EVENT
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-K23CJ5UP.mjs";
|
|
19
19
|
import {
|
|
20
20
|
AggErrorBoundary,
|
|
21
21
|
Button,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
filterOpenEvents,
|
|
45
45
|
resolveTabVenus,
|
|
46
46
|
shortenAddress
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-QFW5NDJ6.mjs";
|
|
48
48
|
|
|
49
49
|
// src/pages/home/index.tsx
|
|
50
50
|
import {
|
|
@@ -1853,7 +1853,7 @@ var StatusBadge = ({
|
|
|
1853
1853
|
isWon ? "border-agg-success/50 bg-agg-success/10 text-agg-success" : "border-agg-muted-foreground/30 bg-agg-secondary-hover text-agg-foreground"
|
|
1854
1854
|
),
|
|
1855
1855
|
children: [
|
|
1856
|
-
/* @__PURE__ */ jsx6(Icon, { name: isWon ? "check-circle" : "hourglass-start", size: "small", className: "size-2.5" }),
|
|
1856
|
+
/* @__PURE__ */ jsx6(Icon, { name: isWon ? "check-circle" : "hourglass-start", size: "small", className: "size-2.5!" }),
|
|
1857
1857
|
isWon ? labels.won : labels.open
|
|
1858
1858
|
]
|
|
1859
1859
|
}
|
|
@@ -1893,7 +1893,7 @@ var TotalTradedCell = ({
|
|
|
1893
1893
|
className
|
|
1894
1894
|
}) => /* @__PURE__ */ jsxs6("div", { className: cn("flex flex-col gap-[2px] whitespace-nowrap", className), children: [
|
|
1895
1895
|
/* @__PURE__ */ jsx6("p", { className: "font-agg-sans text-agg-base leading-agg-6 font-agg-bold text-agg-foreground", children: model.totalTraded.primaryLabel }),
|
|
1896
|
-
/* @__PURE__ */ jsx6("p", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-
|
|
1896
|
+
/* @__PURE__ */ jsx6("p", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground", children: model.totalTraded.averageLabel })
|
|
1897
1897
|
] });
|
|
1898
1898
|
var PositionValueCell = ({
|
|
1899
1899
|
value,
|
|
@@ -2029,12 +2029,12 @@ var PositionRow = ({
|
|
|
2029
2029
|
"button",
|
|
2030
2030
|
{
|
|
2031
2031
|
type: "button",
|
|
2032
|
-
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-
|
|
2032
|
+
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",
|
|
2033
2033
|
onClick: handleClaim,
|
|
2034
2034
|
disabled: isClaiming,
|
|
2035
2035
|
"aria-busy": isClaiming || void 0,
|
|
2036
2036
|
children: [
|
|
2037
|
-
isClaiming ? /* @__PURE__ */ jsx6(LoadingIcon, { size: "small", className: "text-agg-
|
|
2037
|
+
isClaiming ? /* @__PURE__ */ jsx6(LoadingIcon, { size: "small", className: "text-agg-primary" }) : null,
|
|
2038
2038
|
labels.claim
|
|
2039
2039
|
]
|
|
2040
2040
|
}
|
|
@@ -2062,13 +2062,13 @@ var PositionRow = ({
|
|
|
2062
2062
|
className: "hidden w-[160px] shrink-0 md:flex"
|
|
2063
2063
|
}
|
|
2064
2064
|
),
|
|
2065
|
-
/* @__PURE__ */ jsxs6("div", { className: "hidden w-[100px] shrink-0 items-center gap-
|
|
2065
|
+
/* @__PURE__ */ jsxs6("div", { className: "hidden w-[100px] shrink-0 items-center gap-3 md:flex", children: [
|
|
2066
2066
|
/* @__PURE__ */ jsx6(StatusBadge, { status: model.positionStatus, labels }),
|
|
2067
2067
|
model.canClaim ? /* @__PURE__ */ jsxs6(
|
|
2068
2068
|
"button",
|
|
2069
2069
|
{
|
|
2070
2070
|
type: "button",
|
|
2071
|
-
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",
|
|
2071
|
+
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",
|
|
2072
2072
|
onClick: handleClaim,
|
|
2073
2073
|
disabled: isClaiming,
|
|
2074
2074
|
"aria-busy": isClaiming || void 0,
|
package/dist/events.js
CHANGED
|
@@ -1127,7 +1127,7 @@ var HourglassStartIcon = (_a) => {
|
|
|
1127
1127
|
__spreadProps(__spreadValues(__spreadValues({
|
|
1128
1128
|
width: "16",
|
|
1129
1129
|
height: "16",
|
|
1130
|
-
viewBox: "0 0
|
|
1130
|
+
viewBox: "0 0 10 10",
|
|
1131
1131
|
fill: "none",
|
|
1132
1132
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1133
1133
|
className
|
|
@@ -1137,14 +1137,10 @@ var HourglassStartIcon = (_a) => {
|
|
|
1137
1137
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
1138
1138
|
"path",
|
|
1139
1139
|
{
|
|
1140
|
-
d: "
|
|
1141
|
-
|
|
1142
|
-
strokeWidth: "1.4",
|
|
1143
|
-
strokeLinecap: "round",
|
|
1144
|
-
strokeLinejoin: "round"
|
|
1140
|
+
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",
|
|
1141
|
+
fill: "currentColor"
|
|
1145
1142
|
}
|
|
1146
|
-
)
|
|
1147
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("path", { d: "M6.75 4.25H9.25L8 5.25L6.75 4.25Z", fill: "currentColor" })
|
|
1143
|
+
)
|
|
1148
1144
|
]
|
|
1149
1145
|
})
|
|
1150
1146
|
);
|
|
@@ -8071,26 +8067,66 @@ var collectEligibleVenueOutcomes = ({
|
|
|
8071
8067
|
venueMarkets,
|
|
8072
8068
|
selectedOutcomeLabel
|
|
8073
8069
|
}) => {
|
|
8070
|
+
var _a;
|
|
8074
8071
|
if (!selectedOutcomeLabel) return [];
|
|
8072
|
+
const semanticLabel = toSemanticOutcomeLabel(selectedOutcomeLabel);
|
|
8073
|
+
const seenMarketIds = /* @__PURE__ */ new Set();
|
|
8075
8074
|
const seenOutcomeIds = /* @__PURE__ */ new Set();
|
|
8076
|
-
|
|
8077
|
-
|
|
8075
|
+
const result = [];
|
|
8076
|
+
for (const market of venueMarkets) {
|
|
8077
|
+
if (seenMarketIds.has(market.id)) continue;
|
|
8078
|
+
const parentOutcome = sortOutcomes(market.venueMarketOutcomes).find(
|
|
8078
8079
|
(outcome) => matchesSelectedOutcomeLabel(outcome, selectedOutcomeLabel)
|
|
8079
8080
|
);
|
|
8080
|
-
if (!
|
|
8081
|
-
|
|
8081
|
+
if (!parentOutcome) continue;
|
|
8082
|
+
const refs = (_a = parentOutcome.matchedVenueMarketOutcomes) != null ? _a : [];
|
|
8083
|
+
if (refs.length === 0) continue;
|
|
8084
|
+
seenMarketIds.add(market.id);
|
|
8085
|
+
seenOutcomeIds.add(parentOutcome.id);
|
|
8086
|
+
result.push({
|
|
8087
|
+
venue: market.venue,
|
|
8088
|
+
market,
|
|
8089
|
+
outcome: parentOutcome,
|
|
8090
|
+
outcomeId: parentOutcome.id,
|
|
8091
|
+
semanticLabel
|
|
8092
|
+
});
|
|
8093
|
+
for (const ref of refs) {
|
|
8094
|
+
if (seenMarketIds.has(ref.venueMarketId)) continue;
|
|
8095
|
+
const sibling = venueMarkets.find((m) => m.id === ref.venueMarketId);
|
|
8096
|
+
if (!sibling) continue;
|
|
8097
|
+
const siblingOutcome = sibling.venueMarketOutcomes.find(
|
|
8098
|
+
(o) => o.id === ref.venueMarketOutcomeId
|
|
8099
|
+
);
|
|
8100
|
+
if (!siblingOutcome || seenOutcomeIds.has(siblingOutcome.id)) continue;
|
|
8101
|
+
seenMarketIds.add(sibling.id);
|
|
8102
|
+
seenOutcomeIds.add(siblingOutcome.id);
|
|
8103
|
+
result.push({
|
|
8104
|
+
venue: sibling.venue,
|
|
8105
|
+
market: sibling,
|
|
8106
|
+
outcome: siblingOutcome,
|
|
8107
|
+
outcomeId: siblingOutcome.id,
|
|
8108
|
+
semanticLabel
|
|
8109
|
+
});
|
|
8082
8110
|
}
|
|
8111
|
+
break;
|
|
8112
|
+
}
|
|
8113
|
+
for (const market of venueMarkets) {
|
|
8114
|
+
if (seenMarketIds.has(market.id)) continue;
|
|
8115
|
+
const matchedOutcome = sortOutcomes(market.venueMarketOutcomes).find(
|
|
8116
|
+
(outcome) => matchesSelectedOutcomeLabel(outcome, selectedOutcomeLabel)
|
|
8117
|
+
);
|
|
8118
|
+
if (!matchedOutcome || seenOutcomeIds.has(matchedOutcome.id)) continue;
|
|
8119
|
+
seenMarketIds.add(market.id);
|
|
8083
8120
|
seenOutcomeIds.add(matchedOutcome.id);
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
});
|
|
8121
|
+
result.push({
|
|
8122
|
+
venue: market.venue,
|
|
8123
|
+
market,
|
|
8124
|
+
outcome: matchedOutcome,
|
|
8125
|
+
outcomeId: matchedOutcome.id,
|
|
8126
|
+
semanticLabel
|
|
8127
|
+
});
|
|
8128
|
+
}
|
|
8129
|
+
return result;
|
|
8094
8130
|
};
|
|
8095
8131
|
var collectEligibleVenueOutcomeIds = ({
|
|
8096
8132
|
venueMarkets,
|
package/dist/events.mjs
CHANGED
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
mergeVenueOutcomeOrderbooks,
|
|
15
15
|
orderbookRowLimitDefault,
|
|
16
16
|
useCenterOrderbookSpread
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-5MTIBPDY.mjs";
|
|
18
18
|
import {
|
|
19
19
|
formatProbabilityCents,
|
|
20
20
|
resolveOrderBookRows,
|
|
21
21
|
resolveUnifiedOrderBookEntries
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-5PSAIGOT.mjs";
|
|
23
|
+
import "./chunk-QFW5NDJ6.mjs";
|
|
24
24
|
export {
|
|
25
25
|
EventList,
|
|
26
26
|
EventListItem,
|
package/dist/index.js
CHANGED
|
@@ -1581,7 +1581,7 @@ var HourglassStartIcon = (_a) => {
|
|
|
1581
1581
|
__spreadProps(__spreadValues(__spreadValues({
|
|
1582
1582
|
width: "16",
|
|
1583
1583
|
height: "16",
|
|
1584
|
-
viewBox: "0 0
|
|
1584
|
+
viewBox: "0 0 10 10",
|
|
1585
1585
|
fill: "none",
|
|
1586
1586
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1587
1587
|
className
|
|
@@ -1591,14 +1591,10 @@ var HourglassStartIcon = (_a) => {
|
|
|
1591
1591
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
1592
1592
|
"path",
|
|
1593
1593
|
{
|
|
1594
|
-
d: "
|
|
1595
|
-
|
|
1596
|
-
strokeWidth: "1.4",
|
|
1597
|
-
strokeLinecap: "round",
|
|
1598
|
-
strokeLinejoin: "round"
|
|
1594
|
+
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",
|
|
1595
|
+
fill: "currentColor"
|
|
1599
1596
|
}
|
|
1600
|
-
)
|
|
1601
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { d: "M6.75 4.25H9.25L8 5.25L6.75 4.25Z", fill: "currentColor" })
|
|
1597
|
+
)
|
|
1602
1598
|
]
|
|
1603
1599
|
})
|
|
1604
1600
|
);
|
|
@@ -9799,7 +9795,7 @@ var AuthConnectButtonView = ({
|
|
|
9799
9795
|
claimReadyCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
9800
9796
|
"span",
|
|
9801
9797
|
{
|
|
9802
|
-
className: "inline-flex size-4 shrink-0 items-center justify-center rounded-full bg-linear-to-r from-agg-primary to-agg-primary-hover text-
|
|
9798
|
+
className: "inline-flex size-4 shrink-0 items-center justify-center rounded-full bg-linear-to-r from-agg-primary to-agg-primary-hover text-2.5 leading-3.5 font-agg-bold text-agg-foreground uppercase",
|
|
9803
9799
|
"aria-label": resolveClaimBadgeAriaLabel(claimReadyCount),
|
|
9804
9800
|
children: claimReadyCount
|
|
9805
9801
|
}
|
|
@@ -11574,26 +11570,66 @@ var collectEligibleVenueOutcomes = ({
|
|
|
11574
11570
|
venueMarkets,
|
|
11575
11571
|
selectedOutcomeLabel
|
|
11576
11572
|
}) => {
|
|
11573
|
+
var _a;
|
|
11577
11574
|
if (!selectedOutcomeLabel) return [];
|
|
11575
|
+
const semanticLabel = toSemanticOutcomeLabel(selectedOutcomeLabel);
|
|
11576
|
+
const seenMarketIds = /* @__PURE__ */ new Set();
|
|
11578
11577
|
const seenOutcomeIds = /* @__PURE__ */ new Set();
|
|
11579
|
-
|
|
11580
|
-
|
|
11578
|
+
const result = [];
|
|
11579
|
+
for (const market of venueMarkets) {
|
|
11580
|
+
if (seenMarketIds.has(market.id)) continue;
|
|
11581
|
+
const parentOutcome = sortOutcomes(market.venueMarketOutcomes).find(
|
|
11581
11582
|
(outcome) => matchesSelectedOutcomeLabel(outcome, selectedOutcomeLabel)
|
|
11582
11583
|
);
|
|
11583
|
-
if (!
|
|
11584
|
-
|
|
11584
|
+
if (!parentOutcome) continue;
|
|
11585
|
+
const refs = (_a = parentOutcome.matchedVenueMarketOutcomes) != null ? _a : [];
|
|
11586
|
+
if (refs.length === 0) continue;
|
|
11587
|
+
seenMarketIds.add(market.id);
|
|
11588
|
+
seenOutcomeIds.add(parentOutcome.id);
|
|
11589
|
+
result.push({
|
|
11590
|
+
venue: market.venue,
|
|
11591
|
+
market,
|
|
11592
|
+
outcome: parentOutcome,
|
|
11593
|
+
outcomeId: parentOutcome.id,
|
|
11594
|
+
semanticLabel
|
|
11595
|
+
});
|
|
11596
|
+
for (const ref of refs) {
|
|
11597
|
+
if (seenMarketIds.has(ref.venueMarketId)) continue;
|
|
11598
|
+
const sibling = venueMarkets.find((m) => m.id === ref.venueMarketId);
|
|
11599
|
+
if (!sibling) continue;
|
|
11600
|
+
const siblingOutcome = sibling.venueMarketOutcomes.find(
|
|
11601
|
+
(o) => o.id === ref.venueMarketOutcomeId
|
|
11602
|
+
);
|
|
11603
|
+
if (!siblingOutcome || seenOutcomeIds.has(siblingOutcome.id)) continue;
|
|
11604
|
+
seenMarketIds.add(sibling.id);
|
|
11605
|
+
seenOutcomeIds.add(siblingOutcome.id);
|
|
11606
|
+
result.push({
|
|
11607
|
+
venue: sibling.venue,
|
|
11608
|
+
market: sibling,
|
|
11609
|
+
outcome: siblingOutcome,
|
|
11610
|
+
outcomeId: siblingOutcome.id,
|
|
11611
|
+
semanticLabel
|
|
11612
|
+
});
|
|
11585
11613
|
}
|
|
11614
|
+
break;
|
|
11615
|
+
}
|
|
11616
|
+
for (const market of venueMarkets) {
|
|
11617
|
+
if (seenMarketIds.has(market.id)) continue;
|
|
11618
|
+
const matchedOutcome = sortOutcomes(market.venueMarketOutcomes).find(
|
|
11619
|
+
(outcome) => matchesSelectedOutcomeLabel(outcome, selectedOutcomeLabel)
|
|
11620
|
+
);
|
|
11621
|
+
if (!matchedOutcome || seenOutcomeIds.has(matchedOutcome.id)) continue;
|
|
11622
|
+
seenMarketIds.add(market.id);
|
|
11586
11623
|
seenOutcomeIds.add(matchedOutcome.id);
|
|
11587
|
-
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
});
|
|
11624
|
+
result.push({
|
|
11625
|
+
venue: market.venue,
|
|
11626
|
+
market,
|
|
11627
|
+
outcome: matchedOutcome,
|
|
11628
|
+
outcomeId: matchedOutcome.id,
|
|
11629
|
+
semanticLabel
|
|
11630
|
+
});
|
|
11631
|
+
}
|
|
11632
|
+
return result;
|
|
11597
11633
|
};
|
|
11598
11634
|
var collectEligibleVenueOutcomeIds = ({
|
|
11599
11635
|
venueMarkets,
|
|
@@ -21256,7 +21292,7 @@ var StatusBadge = ({
|
|
|
21256
21292
|
isWon ? "border-agg-success/50 bg-agg-success/10 text-agg-success" : "border-agg-muted-foreground/30 bg-agg-secondary-hover text-agg-foreground"
|
|
21257
21293
|
),
|
|
21258
21294
|
children: [
|
|
21259
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(Icon, { name: isWon ? "check-circle" : "hourglass-start", size: "small", className: "size-2.5" }),
|
|
21295
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(Icon, { name: isWon ? "check-circle" : "hourglass-start", size: "small", className: "size-2.5!" }),
|
|
21260
21296
|
isWon ? labels.won : labels.open
|
|
21261
21297
|
]
|
|
21262
21298
|
}
|
|
@@ -21296,7 +21332,7 @@ var TotalTradedCell = ({
|
|
|
21296
21332
|
className
|
|
21297
21333
|
}) => /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: cn("flex flex-col gap-[2px] whitespace-nowrap", className), children: [
|
|
21298
21334
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("p", { className: "font-agg-sans text-agg-base leading-agg-6 font-agg-bold text-agg-foreground", children: model.totalTraded.primaryLabel }),
|
|
21299
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("p", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-
|
|
21335
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)("p", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground", children: model.totalTraded.averageLabel })
|
|
21300
21336
|
] });
|
|
21301
21337
|
var PositionValueCell = ({
|
|
21302
21338
|
value,
|
|
@@ -21432,12 +21468,12 @@ var PositionRow = ({
|
|
|
21432
21468
|
"button",
|
|
21433
21469
|
{
|
|
21434
21470
|
type: "button",
|
|
21435
|
-
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-
|
|
21471
|
+
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",
|
|
21436
21472
|
onClick: handleClaim,
|
|
21437
21473
|
disabled: isClaiming,
|
|
21438
21474
|
"aria-busy": isClaiming || void 0,
|
|
21439
21475
|
children: [
|
|
21440
|
-
isClaiming ? /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(LoadingIcon, { size: "small", className: "text-agg-
|
|
21476
|
+
isClaiming ? /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(LoadingIcon, { size: "small", className: "text-agg-primary" }) : null,
|
|
21441
21477
|
labels.claim
|
|
21442
21478
|
]
|
|
21443
21479
|
}
|
|
@@ -21465,13 +21501,13 @@ var PositionRow = ({
|
|
|
21465
21501
|
className: "hidden w-[160px] shrink-0 md:flex"
|
|
21466
21502
|
}
|
|
21467
21503
|
),
|
|
21468
|
-
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "hidden w-[100px] shrink-0 items-center gap-
|
|
21504
|
+
/* @__PURE__ */ (0, import_jsx_runtime148.jsxs)("div", { className: "hidden w-[100px] shrink-0 items-center gap-3 md:flex", children: [
|
|
21469
21505
|
/* @__PURE__ */ (0, import_jsx_runtime148.jsx)(StatusBadge, { status: model.positionStatus, labels }),
|
|
21470
21506
|
model.canClaim ? /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
|
|
21471
21507
|
"button",
|
|
21472
21508
|
{
|
|
21473
21509
|
type: "button",
|
|
21474
|
-
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",
|
|
21510
|
+
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",
|
|
21475
21511
|
onClick: handleClaim,
|
|
21476
21512
|
disabled: isClaiming,
|
|
21477
21513
|
"aria-busy": isClaiming || void 0,
|
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
USER_PROFILE_TAB_POSITIONS,
|
|
11
11
|
UserProfilePage,
|
|
12
12
|
useHomePageModals
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XKADJNAJ.mjs";
|
|
14
14
|
import {
|
|
15
15
|
EventList,
|
|
16
16
|
EventListItem,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
mergeVenueOutcomeOrderbooks,
|
|
26
26
|
orderbookRowLimitDefault,
|
|
27
27
|
useCenterOrderbookSpread
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-5MTIBPDY.mjs";
|
|
29
29
|
import {
|
|
30
30
|
CARD_NETWORK_OPTIONS,
|
|
31
31
|
ConnectAccountsStep,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
WithdrawModal,
|
|
41
41
|
clearPendingCardSession,
|
|
42
42
|
getPendingCardSession
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-7JKGAWU5.mjs";
|
|
44
44
|
import {
|
|
45
45
|
DEPOSIT_MODAL_OPEN_EVENT,
|
|
46
46
|
PlaceOrder,
|
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
parseVenue,
|
|
53
53
|
requestAggDepositModalOpen,
|
|
54
54
|
requestAggWithdrawModalOpen
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-K23CJ5UP.mjs";
|
|
56
56
|
import {
|
|
57
57
|
SETTLEMENT_SECTION_ID,
|
|
58
58
|
Settlement,
|
|
@@ -70,10 +70,10 @@ import {
|
|
|
70
70
|
resolveOrderBookRows,
|
|
71
71
|
resolveUnifiedOrderBookEntries,
|
|
72
72
|
useEventTradingContext
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-5PSAIGOT.mjs";
|
|
74
74
|
import {
|
|
75
75
|
GeoBlockBanner
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-5MDFM2MX.mjs";
|
|
77
77
|
import {
|
|
78
78
|
AGG_DEFAULT_URL,
|
|
79
79
|
AGG_DOCS_URL,
|
|
@@ -187,7 +187,7 @@ import {
|
|
|
187
187
|
typographyVariants,
|
|
188
188
|
useToast,
|
|
189
189
|
venueLogoNames
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-QFW5NDJ6.mjs";
|
|
191
191
|
|
|
192
192
|
// src/auth/connect-button-view/index.tsx
|
|
193
193
|
import { optimizedImageUrl, useAggAuthContext, useLabels, useSdkUiConfig } from "@agg-build/hooks";
|
|
@@ -664,7 +664,7 @@ var AuthConnectButtonView = ({
|
|
|
664
664
|
claimReadyCount > 0 ? /* @__PURE__ */ jsx(
|
|
665
665
|
"span",
|
|
666
666
|
{
|
|
667
|
-
className: "inline-flex size-4 shrink-0 items-center justify-center rounded-full bg-linear-to-r from-agg-primary to-agg-primary-hover text-
|
|
667
|
+
className: "inline-flex size-4 shrink-0 items-center justify-center rounded-full bg-linear-to-r from-agg-primary to-agg-primary-hover text-2.5 leading-3.5 font-agg-bold text-agg-foreground uppercase",
|
|
668
668
|
"aria-label": resolveClaimBadgeAriaLabel(claimReadyCount),
|
|
669
669
|
children: claimReadyCount
|
|
670
670
|
}
|
package/dist/modals.js
CHANGED
|
@@ -2136,7 +2136,7 @@ var HourglassStartIcon = (_a) => {
|
|
|
2136
2136
|
__spreadProps(__spreadValues(__spreadValues({
|
|
2137
2137
|
width: "16",
|
|
2138
2138
|
height: "16",
|
|
2139
|
-
viewBox: "0 0
|
|
2139
|
+
viewBox: "0 0 10 10",
|
|
2140
2140
|
fill: "none",
|
|
2141
2141
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2142
2142
|
className
|
|
@@ -2146,14 +2146,10 @@ var HourglassStartIcon = (_a) => {
|
|
|
2146
2146
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2147
2147
|
"path",
|
|
2148
2148
|
{
|
|
2149
|
-
d: "
|
|
2150
|
-
|
|
2151
|
-
strokeWidth: "1.4",
|
|
2152
|
-
strokeLinecap: "round",
|
|
2153
|
-
strokeLinejoin: "round"
|
|
2149
|
+
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",
|
|
2150
|
+
fill: "currentColor"
|
|
2154
2151
|
}
|
|
2155
|
-
)
|
|
2156
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { d: "M6.75 4.25H9.25L8 5.25L6.75 4.25Z", fill: "currentColor" })
|
|
2152
|
+
)
|
|
2157
2153
|
]
|
|
2158
2154
|
})
|
|
2159
2155
|
);
|