@agg-build/ui 4.21.0 → 4.22.2

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.
@@ -1,21 +1,13 @@
1
1
  import { type VenueMarket } from "@agg-build/hooks";
2
- export declare const EVENT_CHART_SERIES_LIMIT = 8;
3
- /** Preserve the selected semantic side when the comparison uses a matched venue. */
4
- export declare function resolveEventChartSelectedOutcome(markets: VenueMarket[], venue: string, selectedOutcomeId?: string | null): string | null;
5
- /** Pagination bounds history queries, passive observers and live ownership together. */
6
- export declare function resolveEventChartPage<T extends {
7
- id: string;
8
- }>(outcomes: T[], selectedOutcomeId: string | null, requestedPage: number): {
9
- page: number;
10
- pageCount: number;
11
- pinnedId: string | null;
12
- outcomes: T[];
13
- };
2
+ export declare const EVENT_CHART_MARKET_LIMIT = 3;
3
+ /** Rank distinct markets before expanding outcomes so Yes/No stay together. */
4
+ export declare const resolveTopEventChartMarkets: (markets: VenueMarket[], venue: string) => VenueMarket[];
14
5
  export declare const resolveEventChartOutcomes: (markets: VenueMarket[], venue: string, eventEndDate?: string | null) => {
15
6
  id: string;
16
7
  marketId: string;
17
8
  venue: import("@agg-build/hooks").Venue;
18
9
  side: string;
10
+ outcomeLabel: string;
19
11
  live: boolean;
20
12
  finalValue: number | undefined;
21
13
  settledAt: number | undefined;
@@ -1,21 +1,13 @@
1
1
  import { type VenueMarket } from "@agg-build/hooks";
2
- export declare const EVENT_CHART_SERIES_LIMIT = 8;
3
- /** Preserve the selected semantic side when the comparison uses a matched venue. */
4
- export declare function resolveEventChartSelectedOutcome(markets: VenueMarket[], venue: string, selectedOutcomeId?: string | null): string | null;
5
- /** Pagination bounds history queries, passive observers and live ownership together. */
6
- export declare function resolveEventChartPage<T extends {
7
- id: string;
8
- }>(outcomes: T[], selectedOutcomeId: string | null, requestedPage: number): {
9
- page: number;
10
- pageCount: number;
11
- pinnedId: string | null;
12
- outcomes: T[];
13
- };
2
+ export declare const EVENT_CHART_MARKET_LIMIT = 3;
3
+ /** Rank distinct markets before expanding outcomes so Yes/No stay together. */
4
+ export declare const resolveTopEventChartMarkets: (markets: VenueMarket[], venue: string) => VenueMarket[];
14
5
  export declare const resolveEventChartOutcomes: (markets: VenueMarket[], venue: string, eventEndDate?: string | null) => {
15
6
  id: string;
16
7
  marketId: string;
17
8
  venue: import("@agg-build/hooks").Venue;
18
9
  side: string;
10
+ outcomeLabel: string;
19
11
  live: boolean;
20
12
  finalValue: number | undefined;
21
13
  settledAt: number | undefined;
@@ -211,7 +211,12 @@ export declare const resolveSportsCombinedLegs: (group: Pick<SportsMarketDisplay
211
211
  * returned untouched.
212
212
  */
213
213
  export declare const resolveSportsLadderTitle: (group: SportsMarketDisplayGroup, selectedLineDisplay: string) => string;
214
- export declare const buildSportsSlideFromGroup: (group: SportsMarketDisplayGroup) => SportsGameLineSlide;
214
+ /**
215
+ * `prices` (outcomeId → midpoint) breaks volume ties toward the line priced
216
+ * closest to 50/50 — the main line, where the books are deepest. Most line
217
+ * markets carry zero volume, so without it the default was the lowest rung.
218
+ */
219
+ export declare const buildSportsSlideFromGroup: (group: SportsMarketDisplayGroup, prices?: ReadonlyMap<string, number>) => SportsGameLineSlide;
215
220
  /**
216
221
  * Derive the Moneyline / Spreads / Total game-line slides (in that order) from a
217
222
  * flat list of venue markets. Reuses {@link buildSportsMarketDisplayGroups} so
@@ -211,7 +211,12 @@ export declare const resolveSportsCombinedLegs: (group: Pick<SportsMarketDisplay
211
211
  * returned untouched.
212
212
  */
213
213
  export declare const resolveSportsLadderTitle: (group: SportsMarketDisplayGroup, selectedLineDisplay: string) => string;
214
- export declare const buildSportsSlideFromGroup: (group: SportsMarketDisplayGroup) => SportsGameLineSlide;
214
+ /**
215
+ * `prices` (outcomeId → midpoint) breaks volume ties toward the line priced
216
+ * closest to 50/50 — the main line, where the books are deepest. Most line
217
+ * markets carry zero volume, so without it the default was the lowest rung.
218
+ */
219
+ export declare const buildSportsSlideFromGroup: (group: SportsMarketDisplayGroup, prices?: ReadonlyMap<string, number>) => SportsGameLineSlide;
215
220
  /**
216
221
  * Derive the Moneyline / Spreads / Total game-line slides (in that order) from a
217
222
  * flat list of venue markets. Reuses {@link buildSportsMarketDisplayGroups} so
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agg-build/ui",
3
- "version": "4.21.0",
3
+ "version": "4.22.2",
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",
@@ -100,8 +100,8 @@
100
100
  "liveline": "^0.0.7",
101
101
  "react": "^18.0.0 || ^19.0.0",
102
102
  "react-dom": "^18.0.0 || ^19.0.0",
103
- "@agg-build/hooks": "^4.21.0",
104
- "@agg-build/sdk": "^4.21.0"
103
+ "@agg-build/hooks": "^4.21.1",
104
+ "@agg-build/sdk": "^4.22.1"
105
105
  },
106
106
  "dependencies": {
107
107
  "@number-flow/react": "^0.6.0",