@agg-build/ui 4.9.2 → 4.11.0

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 (38) hide show
  1. package/dist/{chunk-TNNLRRHC.mjs → chunk-6EHT5OFU.mjs} +1 -1
  2. package/dist/{chunk-MVAOWNG3.mjs → chunk-CHM6SCOY.mjs} +19 -10
  3. package/dist/{chunk-GVIS3YXU.mjs → chunk-EYJS45RP.mjs} +35 -12
  4. package/dist/{chunk-GG57TRNE.mjs → chunk-I72YHWOI.mjs} +2 -2
  5. package/dist/{chunk-K6F2ZYNM.mjs → chunk-NCWBKC5C.mjs} +52 -21
  6. package/dist/{chunk-H7L4HDXS.mjs → chunk-TXQJUVRW.mjs} +3 -2
  7. package/dist/{chunk-NYL6A6AD.mjs → chunk-W7HQVQ22.mjs} +257 -195
  8. package/dist/events.js +766 -681
  9. package/dist/events.mjs +3 -3
  10. package/dist/index.js +2725 -2599
  11. package/dist/index.mjs +7 -7
  12. package/dist/modals.js +1352 -1289
  13. package/dist/modals.mjs +3 -3
  14. package/dist/pages.js +2085 -1959
  15. package/dist/pages.mjs +6 -6
  16. package/dist/primitives.js +288 -226
  17. package/dist/primitives.mjs +1 -1
  18. package/dist/trading.js +854 -760
  19. package/dist/trading.mjs +4 -4
  20. package/dist/types/events/item-details/event-list-item-details.types.d.mts +2 -0
  21. package/dist/types/events/item-details/event-list-item-details.types.d.ts +2 -0
  22. package/dist/types/events/list/event-list.constants.d.mts +1 -1
  23. package/dist/types/events/list/event-list.constants.d.ts +1 -1
  24. package/dist/types/pages/event-market/event-market.types.d.mts +2 -0
  25. package/dist/types/pages/event-market/event-market.types.d.ts +2 -0
  26. package/dist/types/pages/event-market/sports-event-market-page.d.mts +1 -1
  27. package/dist/types/pages/event-market/sports-event-market-page.d.ts +1 -1
  28. package/dist/types/pages/user-profile/user-profile.types.d.mts +2 -0
  29. package/dist/types/pages/user-profile/user-profile.types.d.ts +2 -0
  30. package/dist/types/primitives/venue-logo/svg/logo-pred.d.mts +10 -0
  31. package/dist/types/primitives/venue-logo/svg/logo-pred.d.ts +10 -0
  32. package/dist/types/trading/place-order/index.place-order.execution-view.d.mts +2 -1
  33. package/dist/types/trading/place-order/index.place-order.execution-view.d.ts +2 -1
  34. package/dist/types/trading/place-order/index.place-order.types.d.mts +8 -0
  35. package/dist/types/trading/place-order/index.place-order.types.d.ts +8 -0
  36. package/dist/types/trading/place-order/index.place-order.utils.d.mts +1 -1
  37. package/dist/types/trading/place-order/index.place-order.utils.d.ts +1 -1
  38. package/package.json +3 -3
package/dist/trading.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  useClaimWinnings,
15
15
  useResolvedMarketClaim,
16
16
  venueRequiresSharedKyc
17
- } from "./chunk-K6F2ZYNM.mjs";
17
+ } from "./chunk-NCWBKC5C.mjs";
18
18
  import {
19
19
  SETTLEMENT_SECTION_ID,
20
20
  Settlement,
@@ -32,9 +32,9 @@ import {
32
32
  prepareSettlementDifferences,
33
33
  resolveDifferenceIconClassName,
34
34
  useEventTradingContext
35
- } from "./chunk-TNNLRRHC.mjs";
36
- import "./chunk-H7L4HDXS.mjs";
37
- import "./chunk-NYL6A6AD.mjs";
35
+ } from "./chunk-6EHT5OFU.mjs";
36
+ import "./chunk-TXQJUVRW.mjs";
37
+ import "./chunk-W7HQVQ22.mjs";
38
38
  export {
39
39
  FundKalshiModal,
40
40
  PlaceOrder,
@@ -51,6 +51,8 @@ export type EventListItemDetailsBaseProps = {
51
51
  defaultMarketId?: string;
52
52
  /** Outcome ID to preselect alongside defaultMarketId. */
53
53
  defaultOutcomeId?: string;
54
+ /** Trade side to preselect after market/outcome defaults apply. */
55
+ defaultTradeSide?: "buy" | "sell";
54
56
  /** Venue metadata used to enrich venue labels in the details card. */
55
57
  venueInfo?: EventListItemVenueInfoMap;
56
58
  /** Optional stat pills shown in the details summary area. */
@@ -51,6 +51,8 @@ export type EventListItemDetailsBaseProps = {
51
51
  defaultMarketId?: string;
52
52
  /** Outcome ID to preselect alongside defaultMarketId. */
53
53
  defaultOutcomeId?: string;
54
+ /** Trade side to preselect after market/outcome defaults apply. */
55
+ defaultTradeSide?: "buy" | "sell";
54
56
  /** Venue metadata used to enrich venue labels in the details card. */
55
57
  venueInfo?: EventListItemVenueInfoMap;
56
58
  /** Optional stat pills shown in the details summary area. */
@@ -1,4 +1,4 @@
1
- import type { AggUiLabels } from "@agg-build/hooks";
1
+ import { type AggUiLabels } from "@agg-build/hooks";
2
2
  import type { EventListSortValue, EventListTab } from "./event-list.types";
3
3
  export declare const DEFAULT_EVENTS_LIMIT = 50;
4
4
  export declare const DEFAULT_EVENT_LIST_SORT: EventListSortValue;
@@ -1,4 +1,4 @@
1
- import type { AggUiLabels } from "@agg-build/hooks";
1
+ import { type AggUiLabels } from "@agg-build/hooks";
2
2
  import type { EventListSortValue, EventListTab } from "./event-list.types";
3
3
  export declare const DEFAULT_EVENTS_LIMIT = 50;
4
4
  export declare const DEFAULT_EVENT_LIST_SORT: EventListSortValue;
@@ -43,6 +43,8 @@ export type EventMarketPageBaseProps = {
43
43
  defaultMarketId?: string;
44
44
  /** Outcome ID to preselect alongside defaultMarketId. */
45
45
  defaultOutcomeId?: string;
46
+ /** Trade side to preselect (e.g. sell when opening from a held position). */
47
+ defaultTradeSide?: "buy" | "sell";
46
48
  /** Whether to render the place-order panel. */
47
49
  showPlaceOrder?: boolean;
48
50
  /**
@@ -43,6 +43,8 @@ export type EventMarketPageBaseProps = {
43
43
  defaultMarketId?: string;
44
44
  /** Outcome ID to preselect alongside defaultMarketId. */
45
45
  defaultOutcomeId?: string;
46
+ /** Trade side to preselect (e.g. sell when opening from a held position). */
47
+ defaultTradeSide?: "buy" | "sell";
46
48
  /** Whether to render the place-order panel. */
47
49
  showPlaceOrder?: boolean;
48
50
  /**
@@ -1,7 +1,7 @@
1
1
  import type { VenueEventWithMarkets } from "../../events/item/event-list-item.types";
2
2
  import type { EventMarketPageProps } from "./event-market.types";
3
3
  export declare const SportsEventMarketPage: {
4
- ({ event, defaultMarketId, defaultOutcomeId, classNames, ariaLabel, showPlaceOrder, executionMode, stickyOrderPanel, resolvedClaim, onBeforePrimaryAction, sharedKyc, }: Extract<EventMarketPageProps, {
4
+ ({ event, defaultMarketId, defaultOutcomeId, defaultTradeSide, classNames, ariaLabel, showPlaceOrder, executionMode, stickyOrderPanel, resolvedClaim, onBeforePrimaryAction, sharedKyc, }: Extract<EventMarketPageProps, {
5
5
  event: VenueEventWithMarkets;
6
6
  }>): JSX.Element;
7
7
  displayName: string;
@@ -1,7 +1,7 @@
1
1
  import type { VenueEventWithMarkets } from "../../events/item/event-list-item.types";
2
2
  import type { EventMarketPageProps } from "./event-market.types";
3
3
  export declare const SportsEventMarketPage: {
4
- ({ event, defaultMarketId, defaultOutcomeId, classNames, ariaLabel, showPlaceOrder, executionMode, stickyOrderPanel, resolvedClaim, onBeforePrimaryAction, sharedKyc, }: Extract<EventMarketPageProps, {
4
+ ({ event, defaultMarketId, defaultOutcomeId, defaultTradeSide, classNames, ariaLabel, showPlaceOrder, executionMode, stickyOrderPanel, resolvedClaim, onBeforePrimaryAction, sharedKyc, }: Extract<EventMarketPageProps, {
5
5
  event: VenueEventWithMarkets;
6
6
  }>): JSX.Element;
7
7
  displayName: string;
@@ -59,6 +59,8 @@ export interface UserProfilePosition {
59
59
  eventId?: string;
60
60
  /** Market ID used to preselect a market on the event details page. */
61
61
  marketId?: string;
62
+ /** Outcome ID used to open sell on the held outcome, not the market default. */
63
+ outcomeId?: string;
62
64
  /** Market thumbnail image URL */
63
65
  thumbnailSrc: string;
64
66
  /** Market title */
@@ -59,6 +59,8 @@ export interface UserProfilePosition {
59
59
  eventId?: string;
60
60
  /** Market ID used to preselect a market on the event details page. */
61
61
  marketId?: string;
62
+ /** Outcome ID used to open sell on the held outcome, not the market default. */
63
+ outcomeId?: string;
62
64
  /** Market thumbnail image URL */
63
65
  thumbnailSrc: string;
64
66
  /** Market title */
@@ -0,0 +1,10 @@
1
+ import type { LogoIconProps } from "../logo-props";
2
+ export declare const PRED_LOGO_COLORS: {
3
+ readonly light: "#120C06";
4
+ readonly dark: "#F4FB37";
5
+ };
6
+ /** PRED's official opposing-arrow mark, traced from its production favicon. */
7
+ export declare const LogoPredIcon: {
8
+ ({ title, className, isColor, color, ...props }: LogoIconProps): JSX.Element;
9
+ displayName: string;
10
+ };
@@ -0,0 +1,10 @@
1
+ import type { LogoIconProps } from "../logo-props";
2
+ export declare const PRED_LOGO_COLORS: {
3
+ readonly light: "#120C06";
4
+ readonly dark: "#F4FB37";
5
+ };
6
+ /** PRED's official opposing-arrow mark, traced from its production favicon. */
7
+ export declare const LogoPredIcon: {
8
+ ({ title, className, isColor, color, ...props }: LogoIconProps): JSX.Element;
9
+ displayName: string;
10
+ };
@@ -19,8 +19,9 @@ export type PlaceOrderExecutionViewProps = PlaceOrderExecutionHeaderProps & {
19
19
  groups: ExecutionOrderGroup[];
20
20
  labels: PlaceOrderTradingLabels;
21
21
  progress: number;
22
+ settlementHint?: string;
22
23
  };
23
24
  export declare const PlaceOrderExecutionView: {
24
- ({ className, classNames, enableAnimations, eventDateLabel, eventImage, eventTitle, groups, labels, progress, }: PlaceOrderExecutionViewProps): JSX.Element;
25
+ ({ className, classNames, enableAnimations, eventDateLabel, eventImage, eventTitle, groups, labels, progress, settlementHint, }: PlaceOrderExecutionViewProps): JSX.Element;
25
26
  displayName: string;
26
27
  };
@@ -19,8 +19,9 @@ export type PlaceOrderExecutionViewProps = PlaceOrderExecutionHeaderProps & {
19
19
  groups: ExecutionOrderGroup[];
20
20
  labels: PlaceOrderTradingLabels;
21
21
  progress: number;
22
+ settlementHint?: string;
22
23
  };
23
24
  export declare const PlaceOrderExecutionView: {
24
- ({ className, classNames, enableAnimations, eventDateLabel, eventImage, eventTitle, groups, labels, progress, }: PlaceOrderExecutionViewProps): JSX.Element;
25
+ ({ className, classNames, enableAnimations, eventDateLabel, eventImage, eventTitle, groups, labels, progress, settlementHint, }: PlaceOrderExecutionViewProps): JSX.Element;
25
26
  displayName: string;
26
27
  };
@@ -144,6 +144,13 @@ export type PlaceOrderRouteCard = {
144
144
  requiresSharedKyc?: boolean;
145
145
  /** Whether the venue is unavailable in the user's region (geo-blocked). */
146
146
  isUnavailable?: boolean;
147
+ /**
148
+ * The solo's bound outcome. `venue` alone is NOT unique — one venue can list
149
+ * the same matched outcome twice (two Hyperliquid deployers, two Kalshi
150
+ * books, a duplicate Polymarket listing), so the venue string cannot key a
151
+ * card. Set on solo/unavailable cards, absent on the primary and on splits.
152
+ */
153
+ venueMarketOutcomeId?: string;
147
154
  };
148
155
  export type PlaceOrderOutcomeClassNameParams = {
149
156
  enableAnimations: boolean;
@@ -247,6 +254,7 @@ export type ResolvePlaceOrderQuoteStatusParams = {
247
254
  labels: PlaceOrderTradingLabels;
248
255
  quoteData: SmartRouteResponse | null;
249
256
  selectedMarket: VenueMarket | null;
257
+ tradeSide?: PlaceOrderTab;
250
258
  };
251
259
  export type ResolvePlaceOrderTabKeyParams = {
252
260
  currentTab: PlaceOrderTab;
@@ -144,6 +144,13 @@ export type PlaceOrderRouteCard = {
144
144
  requiresSharedKyc?: boolean;
145
145
  /** Whether the venue is unavailable in the user's region (geo-blocked). */
146
146
  isUnavailable?: boolean;
147
+ /**
148
+ * The solo's bound outcome. `venue` alone is NOT unique — one venue can list
149
+ * the same matched outcome twice (two Hyperliquid deployers, two Kalshi
150
+ * books, a duplicate Polymarket listing), so the venue string cannot key a
151
+ * card. Set on solo/unavailable cards, absent on the primary and on splits.
152
+ */
153
+ venueMarketOutcomeId?: string;
147
154
  };
148
155
  export type PlaceOrderOutcomeClassNameParams = {
149
156
  enableAnimations: boolean;
@@ -247,6 +254,7 @@ export type ResolvePlaceOrderQuoteStatusParams = {
247
254
  labels: PlaceOrderTradingLabels;
248
255
  quoteData: SmartRouteResponse | null;
249
256
  selectedMarket: VenueMarket | null;
257
+ tradeSide?: PlaceOrderTab;
250
258
  };
251
259
  export type ResolvePlaceOrderTabKeyParams = {
252
260
  currentTab: PlaceOrderTab;
@@ -77,7 +77,7 @@ export declare const resolvePlaceOrderQuoteResult: ({ labels, quoteData, tradeSi
77
77
  export declare const sanitizePlaceOrderAmount: (value: number) => number;
78
78
  export declare const getTradingRoutePriceLabel: (value: number) => string;
79
79
  export declare const isQuoteBelowVenueMinimum: (quoteData: SmartRouteResponse | null | undefined) => boolean;
80
- export declare const resolvePlaceOrderQuoteStatus: ({ amount, labels, quoteData, selectedMarket, }: ResolvePlaceOrderQuoteStatusParams) => PlaceOrderQuoteStatus;
80
+ export declare const resolvePlaceOrderQuoteStatus: ({ amount, labels, quoteData, selectedMarket, tradeSide, }: ResolvePlaceOrderQuoteStatusParams) => PlaceOrderQuoteStatus;
81
81
  export declare const buildLiveRouteCards: ({ labels, quoteData, tradeSide, eventVenues, geoBlockedVenues: inheritedGeoBlockedVenues, }: BuildLiveRouteCardsParams) => PlaceOrderRouteCard[];
82
82
  /**
83
83
  * Default route-card pick when the user hasn't selected one (or their selection
@@ -77,7 +77,7 @@ export declare const resolvePlaceOrderQuoteResult: ({ labels, quoteData, tradeSi
77
77
  export declare const sanitizePlaceOrderAmount: (value: number) => number;
78
78
  export declare const getTradingRoutePriceLabel: (value: number) => string;
79
79
  export declare const isQuoteBelowVenueMinimum: (quoteData: SmartRouteResponse | null | undefined) => boolean;
80
- export declare const resolvePlaceOrderQuoteStatus: ({ amount, labels, quoteData, selectedMarket, }: ResolvePlaceOrderQuoteStatusParams) => PlaceOrderQuoteStatus;
80
+ export declare const resolvePlaceOrderQuoteStatus: ({ amount, labels, quoteData, selectedMarket, tradeSide, }: ResolvePlaceOrderQuoteStatusParams) => PlaceOrderQuoteStatus;
81
81
  export declare const buildLiveRouteCards: ({ labels, quoteData, tradeSide, eventVenues, geoBlockedVenues: inheritedGeoBlockedVenues, }: BuildLiveRouteCardsParams) => PlaceOrderRouteCard[];
82
82
  /**
83
83
  * Default route-card pick when the user hasn't selected one (or their selection
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agg-build/ui",
3
- "version": "4.9.2",
3
+ "version": "4.11.0",
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.9.0",
104
- "@agg-build/sdk": "^4.9.2"
103
+ "@agg-build/hooks": "^4.11.0",
104
+ "@agg-build/sdk": "^4.11.0"
105
105
  },
106
106
  "dependencies": {
107
107
  "@number-flow/react": "^0.6.0",