@agg-build/ui 2.2.2 → 2.2.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.
- package/dist/{chunk-QM3WWPCV.mjs → chunk-3R2CQTNM.mjs} +71 -37
- package/dist/{chunk-ZRYHWHTD.mjs → chunk-44GSDH2Y.mjs} +2 -2
- package/dist/{chunk-UTXQUOU3.mjs → chunk-6Z5GQ3KL.mjs} +60 -14
- package/dist/{chunk-4QGZ3FWI.mjs → chunk-7OVSGWI7.mjs} +1 -1
- package/dist/{chunk-JOZPXDNZ.mjs → chunk-MXM5PM4A.mjs} +3 -3
- package/dist/{chunk-LPIAEKSZ.mjs → chunk-SG573ODC.mjs} +1 -1
- package/dist/{chunk-JGBEQ4IV.mjs → chunk-XJTNK3DS.mjs} +131 -18
- package/dist/events.js +125 -45
- package/dist/events.mjs +3 -3
- package/dist/index.js +254 -61
- package/dist/index.mjs +7 -7
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +254 -61
- package/dist/pages.mjs +6 -6
- package/dist/primitives.js +59 -13
- package/dist/primitives.mjs +1 -1
- package/dist/trading.mjs +4 -4
- package/dist/types/events/shared/format-event-title.d.mts +21 -6
- package/dist/types/events/shared/format-event-title.d.ts +21 -6
- package/dist/types/pages/event-market/sports-event-market.utils.d.mts +19 -1
- package/dist/types/pages/event-market/sports-event-market.utils.d.ts +19 -1
- package/package.json +1 -1
|
@@ -7,18 +7,33 @@ type EventCategoryLike = {
|
|
|
7
7
|
parentId?: string | null;
|
|
8
8
|
} | null;
|
|
9
9
|
};
|
|
10
|
-
type
|
|
10
|
+
type ResolveEventHeadingParams = {
|
|
11
11
|
title: string;
|
|
12
12
|
categories?: readonly EventCategoryLike[] | null;
|
|
13
13
|
structureType?: string | null;
|
|
14
14
|
/**
|
|
15
|
-
* Scheduled kickoff of the underlying game.
|
|
16
|
-
*
|
|
17
|
-
* can sit well after the game (e.g. Kalshi World Cup markets expire weeks
|
|
18
|
-
* later — a June 22 game would otherwise read "- July 6").
|
|
15
|
+
* Scheduled kickoff/start of the underlying game. This is the only event
|
|
16
|
+
* date we currently trust as user-meaningful on list/tile surfaces.
|
|
19
17
|
*/
|
|
20
18
|
gameStartTime?: string | null;
|
|
21
19
|
endDate?: string | null;
|
|
20
|
+
venueMarkets?: readonly EventMarketLike[] | null;
|
|
22
21
|
};
|
|
23
|
-
|
|
22
|
+
type EventHeading = {
|
|
23
|
+
title: string;
|
|
24
|
+
timestampLabel: string | null;
|
|
25
|
+
};
|
|
26
|
+
type EventMarketLike = {
|
|
27
|
+
sportsMarketType?: string | null;
|
|
28
|
+
marketCategory?: string | null;
|
|
29
|
+
marketGroup?: string | null;
|
|
30
|
+
marketSubtype?: string | null;
|
|
31
|
+
period?: string | null;
|
|
32
|
+
lineValue?: number | null;
|
|
33
|
+
};
|
|
34
|
+
export declare const isSportEvent: (categories: readonly EventCategoryLike[] | null | undefined, structureType: string | null | undefined) => boolean;
|
|
35
|
+
export declare const shouldDisplaySportsEventTimestamp: ({ categories, structureType, venueMarkets, }: Pick<ResolveEventHeadingParams, "categories" | "structureType" | "venueMarkets">) => boolean;
|
|
36
|
+
export declare const resolveSportsEventTimestamp: ({ gameStartTime, endDate, }: Pick<ResolveEventHeadingParams, "gameStartTime" | "endDate">) => string | null;
|
|
37
|
+
export declare const resolveEventTimestampLabel: ({ categories, structureType, gameStartTime, endDate, venueMarkets, }: ResolveEventHeadingParams) => string | null;
|
|
38
|
+
export declare const resolveEventHeading: ({ title, categories, structureType, gameStartTime, endDate, venueMarkets, }: ResolveEventHeadingParams) => EventHeading;
|
|
24
39
|
export {};
|
|
@@ -50,7 +50,7 @@ export declare const SPORTS_SECTION_TAB_DEFINITIONS: readonly [{
|
|
|
50
50
|
readonly marketCategory: "shots";
|
|
51
51
|
}, {
|
|
52
52
|
readonly key: "other";
|
|
53
|
-
readonly marketGroup: readonly ["other", "team_props", "
|
|
53
|
+
readonly marketGroup: readonly ["other", "team_props", "specials", "completion"];
|
|
54
54
|
}];
|
|
55
55
|
export type SportsMarketCardVariant = "outcome" | "line" | "yes_no";
|
|
56
56
|
export type SportsMarketDisplayGroup = {
|
|
@@ -114,6 +114,24 @@ export declare const resolveSportsSectionMarkets: ({ tabKey, eventMarkets, secti
|
|
|
114
114
|
}) => VenueMarket[];
|
|
115
115
|
export declare const resolveSportsMarketCardVariant: (market: VenueMarket) => SportsMarketCardVariant;
|
|
116
116
|
export declare const isBinarySportsMoneylineMarket: (market: VenueMarket) => boolean;
|
|
117
|
+
export declare const isSpreadTeamTitle: (title: string | null | undefined) => boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Resolve favored/dog team display names for a spread market's two outcomes,
|
|
120
|
+
* consistent across whichever venue anchors the ladder stop.
|
|
121
|
+
*
|
|
122
|
+
* A kalshi/limitless anchor stores `Yes`/`No` labels with no clean team title,
|
|
123
|
+
* so the pill would read "Yes +1.5". But the same signed line has cross-venue
|
|
124
|
+
* twins (identical `_sp_{fav}_{line}` aggKey) from poly/predict that DO carry the
|
|
125
|
+
* team name as the outcome title. Outcome index 0 is the favored side (covers
|
|
126
|
+
* the spread) on every venue keyed `_sp_{fav}`. So borrow the fullest clean
|
|
127
|
+
* title at each index. Returns `null` for a side when no twin has a team title
|
|
128
|
+
* (→ caller falls back to the raw `Yes`/`No` label). Null-aggKey spreads can't
|
|
129
|
+
* be matched to twins, so only the market's own titles are considered.
|
|
130
|
+
*/
|
|
131
|
+
export declare const resolveSpreadOutcomeTeamNames: (activeMarket: VenueMarket, groupMarkets: VenueMarket[]) => {
|
|
132
|
+
favored: string | null;
|
|
133
|
+
dog: string | null;
|
|
134
|
+
};
|
|
117
135
|
export declare const buildSportsMarketDisplayGroups: (markets: VenueMarket[]) => SportsMarketDisplayGroup[];
|
|
118
136
|
export declare const groupSportsMarketsByPeriod: (markets: VenueMarket[]) => SportsPeriodGroup[];
|
|
119
137
|
export type SportsGameLineSlideKind = "moneyline" | "spread" | "total" | "other";
|
|
@@ -50,7 +50,7 @@ export declare const SPORTS_SECTION_TAB_DEFINITIONS: readonly [{
|
|
|
50
50
|
readonly marketCategory: "shots";
|
|
51
51
|
}, {
|
|
52
52
|
readonly key: "other";
|
|
53
|
-
readonly marketGroup: readonly ["other", "team_props", "
|
|
53
|
+
readonly marketGroup: readonly ["other", "team_props", "specials", "completion"];
|
|
54
54
|
}];
|
|
55
55
|
export type SportsMarketCardVariant = "outcome" | "line" | "yes_no";
|
|
56
56
|
export type SportsMarketDisplayGroup = {
|
|
@@ -114,6 +114,24 @@ export declare const resolveSportsSectionMarkets: ({ tabKey, eventMarkets, secti
|
|
|
114
114
|
}) => VenueMarket[];
|
|
115
115
|
export declare const resolveSportsMarketCardVariant: (market: VenueMarket) => SportsMarketCardVariant;
|
|
116
116
|
export declare const isBinarySportsMoneylineMarket: (market: VenueMarket) => boolean;
|
|
117
|
+
export declare const isSpreadTeamTitle: (title: string | null | undefined) => boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Resolve favored/dog team display names for a spread market's two outcomes,
|
|
120
|
+
* consistent across whichever venue anchors the ladder stop.
|
|
121
|
+
*
|
|
122
|
+
* A kalshi/limitless anchor stores `Yes`/`No` labels with no clean team title,
|
|
123
|
+
* so the pill would read "Yes +1.5". But the same signed line has cross-venue
|
|
124
|
+
* twins (identical `_sp_{fav}_{line}` aggKey) from poly/predict that DO carry the
|
|
125
|
+
* team name as the outcome title. Outcome index 0 is the favored side (covers
|
|
126
|
+
* the spread) on every venue keyed `_sp_{fav}`. So borrow the fullest clean
|
|
127
|
+
* title at each index. Returns `null` for a side when no twin has a team title
|
|
128
|
+
* (→ caller falls back to the raw `Yes`/`No` label). Null-aggKey spreads can't
|
|
129
|
+
* be matched to twins, so only the market's own titles are considered.
|
|
130
|
+
*/
|
|
131
|
+
export declare const resolveSpreadOutcomeTeamNames: (activeMarket: VenueMarket, groupMarkets: VenueMarket[]) => {
|
|
132
|
+
favored: string | null;
|
|
133
|
+
dog: string | null;
|
|
134
|
+
};
|
|
117
135
|
export declare const buildSportsMarketDisplayGroups: (markets: VenueMarket[]) => SportsMarketDisplayGroup[];
|
|
118
136
|
export declare const groupSportsMarketsByPeriod: (markets: VenueMarket[]) => SportsPeriodGroup[];
|
|
119
137
|
export type SportsGameLineSlideKind = "moneyline" | "spread" | "total" | "other";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agg-build/ui",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"description": "Pre-built React component library for the AGG prediction market aggregator. Tailwind-based, themeable, with primitives, event surfaces, trading flows, full pages, and modals.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "MIT",
|