@agg-build/ui 2.1.5 → 2.2.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.
Files changed (52) hide show
  1. package/dist/{chunk-T4YZGAYS.mjs → chunk-4QGZ3FWI.mjs} +1 -1
  2. package/dist/{chunk-XUBIJI4R.mjs → chunk-JGBEQ4IV.mjs} +1079 -872
  3. package/dist/{chunk-BW7S2YR3.mjs → chunk-JOZPXDNZ.mjs} +48 -21
  4. package/dist/{chunk-R2YNZJZ3.mjs → chunk-LPIAEKSZ.mjs} +82 -2
  5. package/dist/{chunk-TBZWRUFB.mjs → chunk-QM3WWPCV.mjs} +201 -87
  6. package/dist/{chunk-VP76G6PN.mjs → chunk-UTXQUOU3.mjs} +177 -27
  7. package/dist/{chunk-XHE2VO3S.mjs → chunk-ZRYHWHTD.mjs} +2 -2
  8. package/dist/events.js +369 -82
  9. package/dist/events.mjs +3 -3
  10. package/dist/index.js +2180 -1621
  11. package/dist/index.mjs +9 -7
  12. package/dist/modals.js +2 -2
  13. package/dist/modals.mjs +3 -3
  14. package/dist/pages.js +1552 -995
  15. package/dist/pages.mjs +6 -6
  16. package/dist/primitives.js +74 -26
  17. package/dist/primitives.mjs +1 -1
  18. package/dist/styles.css +1 -1
  19. package/dist/tailwind.css +1 -1
  20. package/dist/trading.js +131 -20
  21. package/dist/trading.mjs +4 -4
  22. package/dist/types/events/item/event-list-item.types.d.mts +6 -2
  23. package/dist/types/events/item/event-list-item.types.d.ts +6 -2
  24. package/dist/types/events/item/event-list-item.utils.d.mts +3 -2
  25. package/dist/types/events/item/event-list-item.utils.d.ts +3 -2
  26. package/dist/types/events/item-details/event-list-item-details.types.d.mts +0 -6
  27. package/dist/types/events/item-details/event-list-item-details.types.d.ts +0 -6
  28. package/dist/types/events/item-details/event-list-item-details.utils.d.mts +9 -0
  29. package/dist/types/events/item-details/event-list-item-details.utils.d.ts +9 -0
  30. package/dist/types/events/market-details/market-details.types.d.mts +1 -0
  31. package/dist/types/events/market-details/market-details.types.d.ts +1 -0
  32. package/dist/types/events/shared/chart-venue-selection.d.mts +2 -1
  33. package/dist/types/events/shared/chart-venue-selection.d.ts +2 -1
  34. package/dist/types/events/shared/event-trading-state.utils.d.mts +4 -2
  35. package/dist/types/events/shared/event-trading-state.utils.d.ts +4 -2
  36. package/dist/types/pages/event-market/sports-event-market.utils.d.mts +1 -1
  37. package/dist/types/pages/event-market/sports-event-market.utils.d.ts +1 -1
  38. package/dist/types/pages/user-profile/components/claim-activity-breakdown-modal.d.mts +8 -0
  39. package/dist/types/pages/user-profile/components/claim-activity-breakdown-modal.d.ts +8 -0
  40. package/dist/types/pages/user-profile/index.d.mts +1 -1
  41. package/dist/types/pages/user-profile/index.d.ts +1 -1
  42. package/dist/types/pages/user-profile/user-profile.types.d.mts +14 -0
  43. package/dist/types/pages/user-profile/user-profile.types.d.ts +14 -0
  44. package/dist/types/primitives/search/search.types.d.mts +1 -0
  45. package/dist/types/primitives/search/search.types.d.ts +1 -0
  46. package/dist/types/primitives/search/search.utils.d.mts +4 -1
  47. package/dist/types/primitives/search/search.utils.d.ts +4 -1
  48. package/dist/types/shared/utils.d.mts +16 -0
  49. package/dist/types/shared/utils.d.ts +16 -0
  50. package/dist/types/trading/types.d.mts +2 -1
  51. package/dist/types/trading/types.d.ts +2 -1
  52. package/package.json +3 -3
@@ -1,6 +1,17 @@
1
1
  export type ClassValue = string | false | null | undefined;
2
2
  export type Falsy = false | 0 | "" | null | undefined;
3
3
  export { AGG_ROOT_CLASS_NAME as aggRootClassName } from "../constants";
4
+ type ResolvedOutcomeMarketLike = {
5
+ sportsMarketType?: string | null;
6
+ marketGroup?: string | null;
7
+ lineValue?: number | null;
8
+ question?: string | null;
9
+ shortTitle?: string | null;
10
+ };
11
+ type ResolvedOutcomeLike = {
12
+ label: string;
13
+ title?: string | null;
14
+ };
4
15
  export declare const isTruthy: <T>(x: T | Falsy) => x is T;
5
16
  export declare const cn: (...values: ClassValue[]) => string;
6
17
  export declare const getMotionClassName: (enabled: boolean, ...values: ClassValue[]) => string | undefined;
@@ -22,3 +33,8 @@ export declare const formatTokenAmount: (amount: number, symbol: string, options
22
33
  }) => string;
23
34
  /** Format a raw numeric string for the amount input (adds locale grouping). */
24
35
  export declare const formatAmountDisplay: (value: string) => string;
36
+ export declare const resolveResolvedOutcomeLabel: ({ market, outcome, allowSportsMoneylineMarketFallback, }: {
37
+ market?: ResolvedOutcomeMarketLike | null;
38
+ outcome?: ResolvedOutcomeLike | null;
39
+ allowSportsMoneylineMarketFallback?: boolean;
40
+ }) => string | null;
@@ -1,6 +1,17 @@
1
1
  export type ClassValue = string | false | null | undefined;
2
2
  export type Falsy = false | 0 | "" | null | undefined;
3
3
  export { AGG_ROOT_CLASS_NAME as aggRootClassName } from "../constants";
4
+ type ResolvedOutcomeMarketLike = {
5
+ sportsMarketType?: string | null;
6
+ marketGroup?: string | null;
7
+ lineValue?: number | null;
8
+ question?: string | null;
9
+ shortTitle?: string | null;
10
+ };
11
+ type ResolvedOutcomeLike = {
12
+ label: string;
13
+ title?: string | null;
14
+ };
4
15
  export declare const isTruthy: <T>(x: T | Falsy) => x is T;
5
16
  export declare const cn: (...values: ClassValue[]) => string;
6
17
  export declare const getMotionClassName: (enabled: boolean, ...values: ClassValue[]) => string | undefined;
@@ -22,3 +33,8 @@ export declare const formatTokenAmount: (amount: number, symbol: string, options
22
33
  }) => string;
23
34
  /** Format a raw numeric string for the amount input (adds locale grouping). */
24
35
  export declare const formatAmountDisplay: (value: string) => string;
36
+ export declare const resolveResolvedOutcomeLabel: ({ market, outcome, allowSportsMoneylineMarketFallback, }: {
37
+ market?: ResolvedOutcomeMarketLike | null;
38
+ outcome?: ResolvedOutcomeLike | null;
39
+ allowSportsMoneylineMarketFallback?: boolean;
40
+ }) => string | null;
@@ -18,7 +18,8 @@ export interface PlaceOrderOutcome {
18
18
  * Polymarket "Trump Wins"). Display this when present, fall back to
19
19
  * `label`. */
20
20
  title: string | null;
21
- price: number;
21
+ /** No longer returned by discovery endpoints; live quotes/midpoints supply prices. */
22
+ price?: number | undefined;
22
23
  priceLabel: string;
23
24
  }
24
25
  export interface PlaceOrderMetric {
@@ -18,7 +18,8 @@ export interface PlaceOrderOutcome {
18
18
  * Polymarket "Trump Wins"). Display this when present, fall back to
19
19
  * `label`. */
20
20
  title: string | null;
21
- price: number;
21
+ /** No longer returned by discovery endpoints; live quotes/midpoints supply prices. */
22
+ price?: number | undefined;
22
23
  priceLabel: string;
23
24
  }
24
25
  export interface PlaceOrderMetric {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agg-build/ui",
3
- "version": "2.1.5",
3
+ "version": "2.2.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": "^2.1.3",
104
- "@agg-build/sdk": "^2.1.3"
103
+ "@agg-build/sdk": "^2.2.1",
104
+ "@agg-build/hooks": "^2.2.1"
105
105
  },
106
106
  "dependencies": {
107
107
  "@number-flow/react": "^0.6.0",