@agg-build/ui 4.17.3 → 4.18.1

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 (103) hide show
  1. package/dist/{chunk-7E4UXCEX.mjs → chunk-2OBJ7DYT.mjs} +1227 -534
  2. package/dist/{chunk-RZLM3M5R.mjs → chunk-2UPO6G3S.mjs} +1251 -2578
  3. package/dist/chunk-HFL3CEWG.mjs +3482 -0
  4. package/dist/{chunk-TK62UB5F.mjs → chunk-JJ3VVCEP.mjs} +6 -13
  5. package/dist/{chunk-B5ALKYD5.mjs → chunk-NRPS2D3Q.mjs} +176 -17
  6. package/dist/chunk-VUZ72Q7H.mjs +2052 -0
  7. package/dist/{chunk-BBDFSTIA.mjs → chunk-WIGSRHUG.mjs} +1532 -741
  8. package/dist/{chunk-DSQSQ4RG.mjs → chunk-YXMDEUHP.mjs} +726 -3825
  9. package/dist/{chunk-JI5KV4QI.mjs → chunk-ZNOAKSPT.mjs} +8 -10
  10. package/dist/event-market-GX24AP2H.mjs +21 -0
  11. package/dist/events.js +2972 -1523
  12. package/dist/events.mjs +6 -4
  13. package/dist/index.js +36152 -30747
  14. package/dist/index.mjs +34 -22
  15. package/dist/modals.js +1763 -1456
  16. package/dist/modals.mjs +5 -3
  17. package/dist/pages.js +34139 -28304
  18. package/dist/pages.mjs +17 -8
  19. package/dist/primitives.js +1552 -786
  20. package/dist/primitives.mjs +1 -1
  21. package/dist/styles.css +1 -1
  22. package/dist/tailwind.css +1 -1
  23. package/dist/trading.js +2559 -1499
  24. package/dist/trading.mjs +4 -4
  25. package/dist/types/events/item-details/event-chart-window.d.mts +9 -0
  26. package/dist/types/events/item-details/event-chart-window.d.ts +9 -0
  27. package/dist/types/events/item-details/event-list-item-details.types.d.mts +7 -0
  28. package/dist/types/events/item-details/event-list-item-details.types.d.ts +7 -0
  29. package/dist/types/events/item-details/event-markets-chart.d.mts +12 -0
  30. package/dist/types/events/item-details/event-markets-chart.d.ts +12 -0
  31. package/dist/types/events/item-details/event-markets-chart.utils.d.mts +23 -0
  32. package/dist/types/events/item-details/event-markets-chart.utils.d.ts +23 -0
  33. package/dist/types/events/list/event-list.constants.d.mts +2 -0
  34. package/dist/types/events/list/event-list.constants.d.ts +2 -0
  35. package/dist/types/events/market-details/use-visible-market-streams.d.mts +7 -0
  36. package/dist/types/events/market-details/use-visible-market-streams.d.ts +7 -0
  37. package/dist/types/events/shared/chart-source-caption.d.mts +4 -0
  38. package/dist/types/events/shared/chart-source-caption.d.ts +4 -0
  39. package/dist/types/events/shared/chart-venue-selection.d.mts +11 -0
  40. package/dist/types/events/shared/chart-venue-selection.d.ts +11 -0
  41. package/dist/types/events/shared/use-chart-orderbook.d.mts +23 -0
  42. package/dist/types/events/shared/use-chart-orderbook.d.ts +23 -0
  43. package/dist/types/onboarding/index.d.mts +1 -0
  44. package/dist/types/onboarding/index.d.ts +1 -0
  45. package/dist/types/onboarding/steps/connect-prophetx-modal.d.mts +12 -0
  46. package/dist/types/onboarding/steps/connect-prophetx-modal.d.ts +12 -0
  47. package/dist/types/pages/event-market/event-market.types.d.mts +5 -0
  48. package/dist/types/pages/event-market/event-market.types.d.ts +5 -0
  49. package/dist/types/pages/event-market/event-open-orders.d.mts +50 -0
  50. package/dist/types/pages/event-market/event-open-orders.d.ts +50 -0
  51. package/dist/types/pages/event-market/index.d.mts +3 -0
  52. package/dist/types/pages/event-market/index.d.ts +3 -0
  53. package/dist/types/pages/event-market/sports-event-market-page.d.mts +1 -1
  54. package/dist/types/pages/event-market/sports-event-market-page.d.ts +1 -1
  55. package/dist/types/pages/event-market/use-event-open-orders.d.mts +27 -0
  56. package/dist/types/pages/event-market/use-event-open-orders.d.ts +27 -0
  57. package/dist/types/pages/user-profile/components/available-balance-card.d.mts +2 -0
  58. package/dist/types/pages/user-profile/components/available-balance-card.d.ts +2 -0
  59. package/dist/types/pages/user-profile/components/betdex-account-activity.d.mts +4 -0
  60. package/dist/types/pages/user-profile/components/betdex-account-activity.d.ts +4 -0
  61. package/dist/types/pages/user-profile/components/betdex-account-card.d.mts +2 -0
  62. package/dist/types/pages/user-profile/components/betdex-account-card.d.ts +2 -0
  63. package/dist/types/pages/user-profile/components/betdex-account-transfers.d.mts +7 -0
  64. package/dist/types/pages/user-profile/components/betdex-account-transfers.d.ts +7 -0
  65. package/dist/types/pages/user-profile/components/open-order-row.d.mts +8 -1
  66. package/dist/types/pages/user-profile/components/open-order-row.d.ts +8 -1
  67. package/dist/types/pages/user-profile/user-profile.types.d.mts +5 -0
  68. package/dist/types/pages/user-profile/user-profile.types.d.ts +5 -0
  69. package/dist/types/primitives/chart/chart.constants.d.mts +7 -0
  70. package/dist/types/primitives/chart/chart.constants.d.ts +7 -0
  71. package/dist/types/primitives/chart/chart.types.d.mts +24 -2
  72. package/dist/types/primitives/chart/chart.types.d.ts +24 -2
  73. package/dist/types/primitives/chart/index.d.mts +2 -2
  74. package/dist/types/primitives/chart/index.d.ts +2 -2
  75. package/dist/types/primitives/chart/probability-chart.d.mts +22 -0
  76. package/dist/types/primitives/chart/probability-chart.d.ts +22 -0
  77. package/dist/types/primitives/chart/probability-chart.utils.d.mts +12 -0
  78. package/dist/types/primitives/chart/probability-chart.utils.d.ts +12 -0
  79. package/dist/types/primitives/chart/probability-live-tail.d.mts +16 -0
  80. package/dist/types/primitives/chart/probability-live-tail.d.ts +16 -0
  81. package/dist/types/primitives/remote-image/index.d.mts +1 -1
  82. package/dist/types/primitives/remote-image/index.d.ts +1 -1
  83. package/dist/types/primitives/remote-image/remote-image.types.d.mts +6 -0
  84. package/dist/types/primitives/remote-image/remote-image.types.d.ts +6 -0
  85. package/dist/types/primitives/skeleton/views/event-list-item-skeleton-view.d.mts +6 -0
  86. package/dist/types/primitives/skeleton/views/event-list-item-skeleton-view.d.ts +6 -0
  87. package/dist/types/primitives/venue-logo/svg/logo-betdex.d.mts +12 -0
  88. package/dist/types/primitives/venue-logo/svg/logo-betdex.d.ts +12 -0
  89. package/dist/types/primitives/venue-logo/svg/logo-tiprun.d.mts +7 -0
  90. package/dist/types/primitives/venue-logo/svg/logo-tiprun.d.ts +7 -0
  91. package/dist/types/shared/open-orders.d.mts +63 -0
  92. package/dist/types/shared/open-orders.d.ts +63 -0
  93. package/dist/types/shared/use-open-order-cancellation.d.mts +18 -0
  94. package/dist/types/shared/use-open-order-cancellation.d.ts +18 -0
  95. package/dist/types/trading/manage-betdex-account-modal.d.mts +5 -0
  96. package/dist/types/trading/manage-betdex-account-modal.d.ts +5 -0
  97. package/dist/types/trading/place-order/index.place-order.execution-steps.d.mts +2 -0
  98. package/dist/types/trading/place-order/index.place-order.execution-steps.d.ts +2 -0
  99. package/dist/types/trading/place-order/index.place-order.types.d.mts +5 -0
  100. package/dist/types/trading/place-order/index.place-order.types.d.ts +5 -0
  101. package/dist/types/trading/place-order/index.place-order.utils.d.mts +6 -1
  102. package/dist/types/trading/place-order/index.place-order.utils.d.ts +6 -1
  103. package/package.json +3 -3
@@ -0,0 +1,5 @@
1
+ /** Reuse the account controls without treating hosted cash as wallet cash. */
2
+ export declare function ManageBetdexAccountModal({ open, onOpenChange, }: {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ }): JSX.Element;
@@ -0,0 +1,5 @@
1
+ /** Reuse the account controls without treating hosted cash as wallet cash. */
2
+ export declare function ManageBetdexAccountModal({ open, onOpenChange, }: {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ }): JSX.Element;
@@ -15,6 +15,8 @@ export type ExecutionOrderGroup = {
15
15
  id: string;
16
16
  venue?: TradingVenue;
17
17
  venueLabel: string;
18
+ /** Replaces the default "<venue> order" heading. */
19
+ title?: string;
18
20
  priceLabel: string;
19
21
  amountLabel: string;
20
22
  steps: ExecutionStep[];
@@ -15,6 +15,8 @@ export type ExecutionOrderGroup = {
15
15
  id: string;
16
16
  venue?: TradingVenue;
17
17
  venueLabel: string;
18
+ /** Replaces the default "<venue> order" heading. */
19
+ title?: string;
18
20
  priceLabel: string;
19
21
  amountLabel: string;
20
22
  steps: ExecutionStep[];
@@ -264,6 +264,9 @@ export type PlaceOrderQuoteStatus = PlaceOrderStatus | undefined;
264
264
  export type PlaceOrderSubmissionProgressPhase = "finding-route" | "submitting" | "executing" | "success" | "failed";
265
265
  export type PlaceOrderExecutionSummary = {
266
266
  resultState?: "success" | "partial";
267
+ /** A limit order rests on the book, so success shows the order amount at its limit price instead of a fill. */
268
+ orderType?: "market" | "limit";
269
+ limitPriceLabel?: string;
267
270
  tradeSide?: PlaceOrderTab;
268
271
  shares: string;
269
272
  avgPrice: string;
@@ -292,4 +295,6 @@ export type PlaceOrderSubmissionProgressState = {
292
295
  phase: PlaceOrderSubmissionProgressPhase;
293
296
  summary?: PlaceOrderExecutionSummary;
294
297
  dagProgress?: DagStepProgress | null;
298
+ /** The single venue row shown while a limit order submits, and kept on failure. */
299
+ limitOrderGroup?: ExecutionOrderGroup;
295
300
  };
@@ -264,6 +264,9 @@ export type PlaceOrderQuoteStatus = PlaceOrderStatus | undefined;
264
264
  export type PlaceOrderSubmissionProgressPhase = "finding-route" | "submitting" | "executing" | "success" | "failed";
265
265
  export type PlaceOrderExecutionSummary = {
266
266
  resultState?: "success" | "partial";
267
+ /** A limit order rests on the book, so success shows the order amount at its limit price instead of a fill. */
268
+ orderType?: "market" | "limit";
269
+ limitPriceLabel?: string;
267
270
  tradeSide?: PlaceOrderTab;
268
271
  shares: string;
269
272
  avgPrice: string;
@@ -292,4 +295,6 @@ export type PlaceOrderSubmissionProgressState = {
292
295
  phase: PlaceOrderSubmissionProgressPhase;
293
296
  summary?: PlaceOrderExecutionSummary;
294
297
  dagProgress?: DagStepProgress | null;
298
+ /** The single venue row shown while a limit order submits, and kept on failure. */
299
+ limitOrderGroup?: ExecutionOrderGroup;
295
300
  };
@@ -1,7 +1,11 @@
1
1
  import type { VenueMarket, VenueSellQuoteRequest } from "@agg-build/hooks";
2
- import type { SmartRouteResponse, WsOrderSubmitted } from "@agg-build/sdk";
2
+ import type { AggClient, SmartRouteResponse, WsOrderSubmitted } from "@agg-build/sdk";
3
3
  import { type PlaceOrderOutcome, type PlaceOrderRoutingRow, type PlaceOrderTab, type TradingVenue } from "../types";
4
4
  import type { BuildLiveRouteCardsParams, PlaceOrderOutcomeClassNameParams, PlaceOrderExecutionStepGroup, PlaceOrderFailureStep, PlaceOrderFailureSummary, PlaceOrderOutcomeLabelValue, PlaceOrderLimitVenueOption, PlaceOrderQuoteResult, PlaceOrderQuoteStatus, PlaceOrderResultTone, PlaceOrderRouteCard, PlaceOrderTerminalOrderEvent, PlaceOrderTradingLabels, PlaceOrderVenueOutcome, ResolvePlaceOrderQuoteResultParams, ResolvePlaceOrderQuoteStatusParams, ResolvePlaceOrderTabKeyParams } from "./index.place-order.types";
5
+ /** Quote identity follows spendable funds and reservations, not the clock of an
6
+ * unchanged five-second balance poll. Keep full source identity and raw strings;
7
+ * stale availability changes still invalidate, and server admission remains fresh. */
8
+ export declare const getPlaceOrderBalanceCacheKey: (balances: Awaited<ReturnType<AggClient["getManagedBalances"]>>) => string;
5
9
  export declare const getPlaceOrderAverageExecutionPrice: (quoteData: SmartRouteResponse | null | undefined) => number | null;
6
10
  export declare const isPlaceOrderAveragePriceWorse: ({ averageExecutionPrice, displayedMarketPrice, tradeSide, }: {
7
11
  averageExecutionPrice: number | null | undefined;
@@ -20,6 +24,7 @@ export interface SellablePositionGroup {
20
24
  venue: string;
21
25
  venueMarketId: string;
22
26
  size: number;
27
+ executionBackend?: "clearinghouse" | "direct";
23
28
  }[];
24
29
  }[];
25
30
  };
@@ -1,7 +1,11 @@
1
1
  import type { VenueMarket, VenueSellQuoteRequest } from "@agg-build/hooks";
2
- import type { SmartRouteResponse, WsOrderSubmitted } from "@agg-build/sdk";
2
+ import type { AggClient, SmartRouteResponse, WsOrderSubmitted } from "@agg-build/sdk";
3
3
  import { type PlaceOrderOutcome, type PlaceOrderRoutingRow, type PlaceOrderTab, type TradingVenue } from "../types";
4
4
  import type { BuildLiveRouteCardsParams, PlaceOrderOutcomeClassNameParams, PlaceOrderExecutionStepGroup, PlaceOrderFailureStep, PlaceOrderFailureSummary, PlaceOrderOutcomeLabelValue, PlaceOrderLimitVenueOption, PlaceOrderQuoteResult, PlaceOrderQuoteStatus, PlaceOrderResultTone, PlaceOrderRouteCard, PlaceOrderTerminalOrderEvent, PlaceOrderTradingLabels, PlaceOrderVenueOutcome, ResolvePlaceOrderQuoteResultParams, ResolvePlaceOrderQuoteStatusParams, ResolvePlaceOrderTabKeyParams } from "./index.place-order.types";
5
+ /** Quote identity follows spendable funds and reservations, not the clock of an
6
+ * unchanged five-second balance poll. Keep full source identity and raw strings;
7
+ * stale availability changes still invalidate, and server admission remains fresh. */
8
+ export declare const getPlaceOrderBalanceCacheKey: (balances: Awaited<ReturnType<AggClient["getManagedBalances"]>>) => string;
5
9
  export declare const getPlaceOrderAverageExecutionPrice: (quoteData: SmartRouteResponse | null | undefined) => number | null;
6
10
  export declare const isPlaceOrderAveragePriceWorse: ({ averageExecutionPrice, displayedMarketPrice, tradeSide, }: {
7
11
  averageExecutionPrice: number | null | undefined;
@@ -20,6 +24,7 @@ export interface SellablePositionGroup {
20
24
  venue: string;
21
25
  venueMarketId: string;
22
26
  size: number;
27
+ executionBackend?: "clearinghouse" | "direct";
23
28
  }[];
24
29
  }[];
25
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agg-build/ui",
3
- "version": "4.17.3",
3
+ "version": "4.18.1",
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.17.2",
104
- "@agg-build/sdk": "^4.17.1"
103
+ "@agg-build/hooks": "^4.18.0",
104
+ "@agg-build/sdk": "^4.18.0"
105
105
  },
106
106
  "dependencies": {
107
107
  "@number-flow/react": "^0.6.0",