@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
package/dist/trading.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  useClaimWinnings,
15
15
  useResolvedMarketClaim,
16
16
  venueRequiresSharedKyc
17
- } from "./chunk-7E4UXCEX.mjs";
17
+ } from "./chunk-2OBJ7DYT.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-TK62UB5F.mjs";
36
- import "./chunk-B5ALKYD5.mjs";
37
- import "./chunk-BBDFSTIA.mjs";
35
+ } from "./chunk-JJ3VVCEP.mjs";
36
+ import "./chunk-NRPS2D3Q.mjs";
37
+ import "./chunk-WIGSRHUG.mjs";
38
38
  export {
39
39
  FundKalshiModal,
40
40
  PlaceOrder,
@@ -0,0 +1,9 @@
1
+ import { type VenueEventWithMarkets } from "@agg-build/hooks";
2
+ export type EventChartWindow = {
3
+ from: number;
4
+ to: number;
5
+ };
6
+ /** Short contracts use their actual schedule, not their listing date or a week-long domain. */
7
+ export declare const resolveEventChartWindow: (event: VenueEventWithMarkets) => EventChartWindow | undefined;
8
+ /** Match the ET timestamps already shown in the recurring-market header. */
9
+ export declare const formatContractChartTime: (timestamp: number) => string;
@@ -0,0 +1,9 @@
1
+ import { type VenueEventWithMarkets } from "@agg-build/hooks";
2
+ export type EventChartWindow = {
3
+ from: number;
4
+ to: number;
5
+ };
6
+ /** Short contracts use their actual schedule, not their listing date or a week-long domain. */
7
+ export declare const resolveEventChartWindow: (event: VenueEventWithMarkets) => EventChartWindow | undefined;
8
+ /** Match the ET timestamps already shown in the recurring-market header. */
9
+ export declare const formatContractChartTime: (timestamp: number) => string;
@@ -2,6 +2,7 @@ import type { ChartTimeRange, EventTradingState, SportsLiveState, UseMidpointsRe
2
2
  import type { RecurringCryptoDuration } from "@agg-build/sdk";
3
3
  import type { LineChartPoint, LineChartType } from "../../primitives/chart";
4
4
  import type { EventListItemVenueInfoMap, VenueEventWithMarkets } from "../item/event-list-item.types";
5
+ import type { EventChartWindow } from "./event-chart-window";
5
6
  import type { OutcomeByVenue } from "./event-list-item-details.utils";
6
7
  export type EventListItemDetailsEvent = VenueEventWithMarkets;
7
8
  /** @deprecated Use `ChartTimeRange` from `@agg-build/hooks` instead. */
@@ -47,6 +48,8 @@ export type EventListItemDetailsClassNames = Partial<{
47
48
  export type EventListItemDetailsBaseProps = {
48
49
  /** Class name overrides for the details card slots. */
49
50
  classNames?: EventListItemDetailsClassNames;
51
+ /** Start with all event markets overlaid or the selected market's venue chart. */
52
+ defaultChartView?: "selected" | "all";
50
53
  /** Market ID to preselect after event sync is initialized. */
51
54
  defaultMarketId?: string;
52
55
  /** Outcome ID to preselect alongside defaultMarketId. */
@@ -128,6 +131,10 @@ export type VenueChartSeries = {
128
131
  lineStyle?: "solid" | "dotted" | "dashed";
129
132
  };
130
133
  export type EventListItemDetailsGraphSectionProps = {
134
+ /** Exact time bounds for a short recurring contract, in seconds. */
135
+ contractWindow?: EventChartWindow;
136
+ /** Explicit user range selections must never be replaced by the automatic fallback. */
137
+ allowAutoFallback?: boolean;
131
138
  /** Class name overrides shared with the parent details component. */
132
139
  classNames?: EventListItemDetailsClassNames;
133
140
  /** Chart type currently selected for the graph section. */
@@ -2,6 +2,7 @@ import type { ChartTimeRange, EventTradingState, SportsLiveState, UseMidpointsRe
2
2
  import type { RecurringCryptoDuration } from "@agg-build/sdk";
3
3
  import type { LineChartPoint, LineChartType } from "../../primitives/chart";
4
4
  import type { EventListItemVenueInfoMap, VenueEventWithMarkets } from "../item/event-list-item.types";
5
+ import type { EventChartWindow } from "./event-chart-window";
5
6
  import type { OutcomeByVenue } from "./event-list-item-details.utils";
6
7
  export type EventListItemDetailsEvent = VenueEventWithMarkets;
7
8
  /** @deprecated Use `ChartTimeRange` from `@agg-build/hooks` instead. */
@@ -47,6 +48,8 @@ export type EventListItemDetailsClassNames = Partial<{
47
48
  export type EventListItemDetailsBaseProps = {
48
49
  /** Class name overrides for the details card slots. */
49
50
  classNames?: EventListItemDetailsClassNames;
51
+ /** Start with all event markets overlaid or the selected market's venue chart. */
52
+ defaultChartView?: "selected" | "all";
50
53
  /** Market ID to preselect after event sync is initialized. */
51
54
  defaultMarketId?: string;
52
55
  /** Outcome ID to preselect alongside defaultMarketId. */
@@ -128,6 +131,10 @@ export type VenueChartSeries = {
128
131
  lineStyle?: "solid" | "dotted" | "dashed";
129
132
  };
130
133
  export type EventListItemDetailsGraphSectionProps = {
134
+ /** Exact time bounds for a short recurring contract, in seconds. */
135
+ contractWindow?: EventChartWindow;
136
+ /** Explicit user range selections must never be replaced by the automatic fallback. */
137
+ allowAutoFallback?: boolean;
131
138
  /** Class name overrides shared with the parent details component. */
132
139
  classNames?: EventListItemDetailsClassNames;
133
140
  /** Chart type currently selected for the graph section. */
@@ -0,0 +1,12 @@
1
+ import { type ChartTimeRange, type VenueMarket } from "@agg-build/hooks";
2
+ import { type EventChartWindow } from "./event-chart-window";
3
+ /** Each outcome keeps its own history/cache entry even when all belong to one venue. */
4
+ export declare const EventMarketsChart: ({ markets, defaultVenue, eventEndDate, contractWindow, range, live, selectedOutcomeId, }: {
5
+ markets: VenueMarket[];
6
+ defaultVenue: string;
7
+ eventEndDate?: string | null;
8
+ contractWindow?: EventChartWindow;
9
+ range: ChartTimeRange;
10
+ live: boolean;
11
+ selectedOutcomeId?: string | null;
12
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { type ChartTimeRange, type VenueMarket } from "@agg-build/hooks";
2
+ import { type EventChartWindow } from "./event-chart-window";
3
+ /** Each outcome keeps its own history/cache entry even when all belong to one venue. */
4
+ export declare const EventMarketsChart: ({ markets, defaultVenue, eventEndDate, contractWindow, range, live, selectedOutcomeId, }: {
5
+ markets: VenueMarket[];
6
+ defaultVenue: string;
7
+ eventEndDate?: string | null;
8
+ contractWindow?: EventChartWindow;
9
+ range: ChartTimeRange;
10
+ live: boolean;
11
+ selectedOutcomeId?: string | null;
12
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
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
+ };
14
+ export declare const resolveEventChartOutcomes: (markets: VenueMarket[], venue: string, eventEndDate?: string | null) => {
15
+ id: string;
16
+ marketId: string;
17
+ venue: import("@agg-build/hooks").Venue;
18
+ side: string;
19
+ live: boolean;
20
+ finalValue: number | undefined;
21
+ settledAt: number | undefined;
22
+ label: string;
23
+ }[];
@@ -0,0 +1,23 @@
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
+ };
14
+ export declare const resolveEventChartOutcomes: (markets: VenueMarket[], venue: string, eventEndDate?: string | null) => {
15
+ id: string;
16
+ marketId: string;
17
+ venue: import("@agg-build/hooks").Venue;
18
+ side: string;
19
+ live: boolean;
20
+ finalValue: number | undefined;
21
+ settledAt: number | undefined;
22
+ label: string;
23
+ }[];
@@ -2,5 +2,7 @@ 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;
5
+ /** Minimum skeleton tiles shown while a filter switch refetches placeholder data. */
6
+ export declare const PLACEHOLDER_SKELETON_MIN_ITEMS = 6;
5
7
  export declare const EVENT_LIST_SORT_VALUES: readonly ["volume24hr", "topArbitrage", "volume", "endDate"];
6
8
  export declare const getDefaultEventListTabs: (labels: AggUiLabels) => EventListTab[];
@@ -2,5 +2,7 @@ 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;
5
+ /** Minimum skeleton tiles shown while a filter switch refetches placeholder data. */
6
+ export declare const PLACEHOLDER_SKELETON_MIN_ITEMS = 6;
5
7
  export declare const EVENT_LIST_SORT_VALUES: readonly ["volume24hr", "topArbitrage", "volume", "endDate"];
6
8
  export declare const getDefaultEventListTabs: (labels: AggUiLabels) => EventListTab[];
@@ -0,0 +1,7 @@
1
+ /** Visible cards share this budget; selected/expanded cards are retained separately. */
2
+ export declare const VISIBLE_MARKET_STREAM_LIMIT = 16;
3
+ /** One observer per list. No streams are started for unobserved rows on mount. */
4
+ export declare function useVisibleMarketStreams(marketIds: readonly string[], retainedIds: readonly (string | null)[], enabled: boolean): {
5
+ rootRef: import("react").RefObject<HTMLDivElement>;
6
+ liveIds: Set<string>;
7
+ };
@@ -0,0 +1,7 @@
1
+ /** Visible cards share this budget; selected/expanded cards are retained separately. */
2
+ export declare const VISIBLE_MARKET_STREAM_LIMIT = 16;
3
+ /** One observer per list. No streams are started for unobserved rows on mount. */
4
+ export declare function useVisibleMarketStreams(marketIds: readonly string[], retainedIds: readonly (string | null)[], enabled: boolean): {
5
+ rootRef: import("react").RefObject<HTMLDivElement>;
6
+ liveIds: Set<string>;
7
+ };
@@ -0,0 +1,4 @@
1
+ export declare const ChartSourceCaption: ({ historyVenue, liquidityVenue, }: {
2
+ historyVenue: string | null;
3
+ liquidityVenue: string | null;
4
+ }) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ export declare const ChartSourceCaption: ({ historyVenue, liquidityVenue, }: {
2
+ historyVenue: string | null;
3
+ liquidityVenue: string | null;
4
+ }) => import("react/jsx-runtime").JSX.Element | null;
@@ -10,6 +10,17 @@ type ChartVenueOutcomeLike = {
10
10
  type LivePriceLookup = {
11
11
  get: (outcomeId: string) => number | undefined;
12
12
  };
13
+ /** A single stable history source prevents mixed sampling intervals from inventing swings. */
14
+ export declare const resolveChartHistoryVenue: ({ venueOutcomes, selectedVenue, }: {
15
+ venueOutcomes: ReadonlyArray<{
16
+ venue: string;
17
+ market: {
18
+ id: string;
19
+ volume?: number | null;
20
+ };
21
+ }>;
22
+ selectedVenue: string | null;
23
+ }) => string | null;
13
24
  export declare const resolveChartVenueOutcomes: <TOutcome extends ChartVenueOutcomeLike>({ eligibleVenueOutcomes, livePrices, }: {
14
25
  eligibleVenueOutcomes: TOutcome[];
15
26
  livePrices: LivePriceLookup;
@@ -10,6 +10,17 @@ type ChartVenueOutcomeLike = {
10
10
  type LivePriceLookup = {
11
11
  get: (outcomeId: string) => number | undefined;
12
12
  };
13
+ /** A single stable history source prevents mixed sampling intervals from inventing swings. */
14
+ export declare const resolveChartHistoryVenue: ({ venueOutcomes, selectedVenue, }: {
15
+ venueOutcomes: ReadonlyArray<{
16
+ venue: string;
17
+ market: {
18
+ id: string;
19
+ volume?: number | null;
20
+ };
21
+ }>;
22
+ selectedVenue: string | null;
23
+ }) => string | null;
13
24
  export declare const resolveChartVenueOutcomes: <TOutcome extends ChartVenueOutcomeLike>({ eligibleVenueOutcomes, livePrices, }: {
14
25
  eligibleVenueOutcomes: TOutcome[];
15
26
  livePrices: LivePriceLookup;
@@ -0,0 +1,23 @@
1
+ import { type MarketOrderbookData } from "@agg-build/hooks";
2
+ import { type EligibleVenueOutcome } from "../market-details/orderbook-aggregation";
3
+ /** Uses the same matched-outcome aggregation as the CLOB table. SDK timestamps are seconds. */
4
+ export declare const resolveChartLiquidity: (eligibleOutcomes: EligibleVenueOutcome[], books: Record<string, MarketOrderbookData>, nowSec: number) => {
5
+ orderbook: {
6
+ bids: [number, number][];
7
+ asks: [number, number][];
8
+ };
9
+ includedOutcomeIds: string[];
10
+ midpoint: number | null;
11
+ };
12
+ /** Read actual WS snapshots/deltas, scoped to the chart's outcome and optional venue. */
13
+ export declare const useChartOrderbook: ({ eligibleOutcomes, selectedVenue, enabled, nowSec, }: {
14
+ eligibleOutcomes: EligibleVenueOutcome[];
15
+ selectedVenue: string | null;
16
+ enabled: boolean;
17
+ nowSec: number;
18
+ }) => {
19
+ orderbook: import("liveline").OrderbookData;
20
+ isLive: boolean;
21
+ includedOutcomeIds: string[];
22
+ midpoint: number | null;
23
+ };
@@ -0,0 +1,23 @@
1
+ import { type MarketOrderbookData } from "@agg-build/hooks";
2
+ import { type EligibleVenueOutcome } from "../market-details/orderbook-aggregation";
3
+ /** Uses the same matched-outcome aggregation as the CLOB table. SDK timestamps are seconds. */
4
+ export declare const resolveChartLiquidity: (eligibleOutcomes: EligibleVenueOutcome[], books: Record<string, MarketOrderbookData>, nowSec: number) => {
5
+ orderbook: {
6
+ bids: [number, number][];
7
+ asks: [number, number][];
8
+ };
9
+ includedOutcomeIds: string[];
10
+ midpoint: number | null;
11
+ };
12
+ /** Read actual WS snapshots/deltas, scoped to the chart's outcome and optional venue. */
13
+ export declare const useChartOrderbook: ({ eligibleOutcomes, selectedVenue, enabled, nowSec, }: {
14
+ eligibleOutcomes: EligibleVenueOutcome[];
15
+ selectedVenue: string | null;
16
+ enabled: boolean;
17
+ nowSec: number;
18
+ }) => {
19
+ orderbook: import("liveline").OrderbookData;
20
+ isLive: boolean;
21
+ includedOutcomeIds: string[];
22
+ midpoint: number | null;
23
+ };
@@ -9,3 +9,4 @@ export declare const OnboardingModal: {
9
9
  ({ open, onOpenChange, onProfileSubmit, onConnectOnchain, onComplete, howItWorksIcons, connectedOnchain, }: OnboardingModalProps): JSX.Element;
10
10
  displayName: string;
11
11
  };
12
+ export { ConnectProphetxModal, type ConnectProphetxModalProps, } from "./steps/connect-prophetx-modal";
@@ -9,3 +9,4 @@ export declare const OnboardingModal: {
9
9
  ({ open, onOpenChange, onProfileSubmit, onConnectOnchain, onComplete, howItWorksIcons, connectedOnchain, }: OnboardingModalProps): JSX.Element;
10
10
  displayName: string;
11
11
  };
12
+ export { ConnectProphetxModal, type ConnectProphetxModalProps, } from "./steps/connect-prophetx-modal";
@@ -0,0 +1,12 @@
1
+ export interface ConnectProphetxModalProps {
2
+ open: boolean;
3
+ /** Allows managing a previously linked account after the org changes modes. */
4
+ allowExistingConnection?: boolean;
5
+ onOpenChange: (open: boolean) => void;
6
+ onDisconnect?: () => Promise<void>;
7
+ onVerify: (credentials: {
8
+ accessKey: string;
9
+ secretKey: string;
10
+ }) => Promise<void>;
11
+ }
12
+ export declare function ConnectProphetxModal({ open, onOpenChange, onVerify, onDisconnect, allowExistingConnection, }: ConnectProphetxModalProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,12 @@
1
+ export interface ConnectProphetxModalProps {
2
+ open: boolean;
3
+ /** Allows managing a previously linked account after the org changes modes. */
4
+ allowExistingConnection?: boolean;
5
+ onOpenChange: (open: boolean) => void;
6
+ onDisconnect?: () => Promise<void>;
7
+ onVerify: (credentials: {
8
+ accessKey: string;
9
+ secretKey: string;
10
+ }) => Promise<void>;
11
+ }
12
+ export declare function ConnectProphetxModal({ open, onOpenChange, onVerify, onDisconnect, allowExistingConnection, }: ConnectProphetxModalProps): import("react/jsx-runtime").JSX.Element | null;
@@ -7,6 +7,7 @@ export type EventMarketPageClassNames = Partial<{
7
7
  main: string;
8
8
  sidebar: string;
9
9
  hero: string;
10
+ openOrders: string;
10
11
  markets: string;
11
12
  settlement: string;
12
13
  trade: string;
@@ -37,8 +38,12 @@ export type EventMarketPageStickyOrderPanelConfig = {
37
38
  spacing?: number | string;
38
39
  };
39
40
  export type EventMarketPageBaseProps = {
41
+ /** Load additional markets on demand. Defaults to legacy eager pagination. */
42
+ progressiveMarkets?: boolean;
40
43
  /** Called when the expanded market accordion item changes. */
41
44
  onExpandedMarketChange?: (marketId: string | null) => void;
45
+ /** Start with all event markets overlaid or the selected market's venue chart. */
46
+ defaultChartView?: "selected" | "all";
42
47
  /** Market ID to preselect in the event details hero. */
43
48
  defaultMarketId?: string;
44
49
  /** Outcome ID to preselect alongside defaultMarketId. */
@@ -7,6 +7,7 @@ export type EventMarketPageClassNames = Partial<{
7
7
  main: string;
8
8
  sidebar: string;
9
9
  hero: string;
10
+ openOrders: string;
10
11
  markets: string;
11
12
  settlement: string;
12
13
  trade: string;
@@ -37,8 +38,12 @@ export type EventMarketPageStickyOrderPanelConfig = {
37
38
  spacing?: number | string;
38
39
  };
39
40
  export type EventMarketPageBaseProps = {
41
+ /** Load additional markets on demand. Defaults to legacy eager pagination. */
42
+ progressiveMarkets?: boolean;
40
43
  /** Called when the expanded market accordion item changes. */
41
44
  onExpandedMarketChange?: (marketId: string | null) => void;
45
+ /** Start with all event markets overlaid or the selected market's venue chart. */
46
+ defaultChartView?: "selected" | "all";
42
47
  /** Market ID to preselect in the event details hero. */
43
48
  defaultMarketId?: string;
44
49
  /** Outcome ID to preselect alongside defaultMarketId. */
@@ -0,0 +1,50 @@
1
+ import type { UserProfileOpenOrder } from "../user-profile/user-profile.types";
2
+ export interface EventOpenOrdersCardProps {
3
+ /** Open limit orders resting on the event currently on screen. */
4
+ orders: UserProfileOpenOrder[];
5
+ /**
6
+ * The order query failed. Rendered instead of the silent empty card so a
7
+ * broken fetch never reads as "you have nothing resting here".
8
+ */
9
+ hasError?: boolean;
10
+ onCancelOrder?: (order: UserProfileOpenOrder) => void;
11
+ /** Order ids with a cancel in flight, keyed for O(1) lookup per row. */
12
+ cancellingOrderIds?: Record<string, boolean>;
13
+ className?: string;
14
+ }
15
+ /**
16
+ * The event page's open-orders card. Presentational on purpose: the page-level
17
+ * container owns fetching and cancelling, so stories and tests can render every
18
+ * state from plain data.
19
+ *
20
+ * Renders nothing without orders — the design has no empty state here, and a
21
+ * signed-out or order-less user should not see an empty shell. A failed query is
22
+ * the one exception: it says so rather than passing for empty.
23
+ */
24
+ export declare const EventOpenOrdersCard: {
25
+ ({ orders, hasError, onCancelOrder, cancellingOrderIds, className, }: EventOpenOrdersCardProps): JSX.Element | null;
26
+ displayName: string;
27
+ };
28
+ export interface EventOpenOrdersProps {
29
+ /**
30
+ * Every venue market on the page — the matched cross-venue cluster, since the
31
+ * limit-order venue selector can rest an order on any of them.
32
+ */
33
+ venueMarketIds: ReadonlyArray<string>;
34
+ executionMode?: "live" | "paper";
35
+ className?: string;
36
+ }
37
+ /**
38
+ * Event page container: fetches the signed-in user's open limit orders for the
39
+ * markets on screen and cancels them. Signed-out users never query and never
40
+ * see the card.
41
+ *
42
+ * Gated on the same `showLimitOrders` flag and paper-mode check that hide the
43
+ * limit path in `PlaceOrder` and the profile's open-orders tab — a partner with
44
+ * the feature off must not get a live Cancel button here, nor the
45
+ * `GET /execution/orders` requests behind it.
46
+ */
47
+ export declare const EventOpenOrders: {
48
+ ({ venueMarketIds, executionMode, className, }: EventOpenOrdersProps): JSX.Element | null;
49
+ displayName: string;
50
+ };
@@ -0,0 +1,50 @@
1
+ import type { UserProfileOpenOrder } from "../user-profile/user-profile.types";
2
+ export interface EventOpenOrdersCardProps {
3
+ /** Open limit orders resting on the event currently on screen. */
4
+ orders: UserProfileOpenOrder[];
5
+ /**
6
+ * The order query failed. Rendered instead of the silent empty card so a
7
+ * broken fetch never reads as "you have nothing resting here".
8
+ */
9
+ hasError?: boolean;
10
+ onCancelOrder?: (order: UserProfileOpenOrder) => void;
11
+ /** Order ids with a cancel in flight, keyed for O(1) lookup per row. */
12
+ cancellingOrderIds?: Record<string, boolean>;
13
+ className?: string;
14
+ }
15
+ /**
16
+ * The event page's open-orders card. Presentational on purpose: the page-level
17
+ * container owns fetching and cancelling, so stories and tests can render every
18
+ * state from plain data.
19
+ *
20
+ * Renders nothing without orders — the design has no empty state here, and a
21
+ * signed-out or order-less user should not see an empty shell. A failed query is
22
+ * the one exception: it says so rather than passing for empty.
23
+ */
24
+ export declare const EventOpenOrdersCard: {
25
+ ({ orders, hasError, onCancelOrder, cancellingOrderIds, className, }: EventOpenOrdersCardProps): JSX.Element | null;
26
+ displayName: string;
27
+ };
28
+ export interface EventOpenOrdersProps {
29
+ /**
30
+ * Every venue market on the page — the matched cross-venue cluster, since the
31
+ * limit-order venue selector can rest an order on any of them.
32
+ */
33
+ venueMarketIds: ReadonlyArray<string>;
34
+ executionMode?: "live" | "paper";
35
+ className?: string;
36
+ }
37
+ /**
38
+ * Event page container: fetches the signed-in user's open limit orders for the
39
+ * markets on screen and cancels them. Signed-out users never query and never
40
+ * see the card.
41
+ *
42
+ * Gated on the same `showLimitOrders` flag and paper-mode check that hide the
43
+ * limit path in `PlaceOrder` and the profile's open-orders tab — a partner with
44
+ * the feature off must not get a live Cancel button here, nor the
45
+ * `GET /execution/orders` requests behind it.
46
+ */
47
+ export declare const EventOpenOrders: {
48
+ ({ venueMarketIds, executionMode, className, }: EventOpenOrdersProps): JSX.Element | null;
49
+ displayName: string;
50
+ };
@@ -1,5 +1,8 @@
1
1
  import type { EventMarketPageProps } from "./event-market.types";
2
2
  export type { EventMarketPageClassNames, EventMarketPageProps } from "./event-market.types";
3
+ export { EventOpenOrders, EventOpenOrdersCard } from "./event-open-orders";
4
+ export type { EventOpenOrdersCardProps, EventOpenOrdersProps } from "./event-open-orders";
5
+ export { useEventOpenOrders } from "./use-event-open-orders";
3
6
  export declare const formatRecurringCountdown: (remainingMs: number) => string | null;
4
7
  export declare const EventMarketPage: {
5
8
  (props: EventMarketPageProps & {
@@ -1,5 +1,8 @@
1
1
  import type { EventMarketPageProps } from "./event-market.types";
2
2
  export type { EventMarketPageClassNames, EventMarketPageProps } from "./event-market.types";
3
+ export { EventOpenOrders, EventOpenOrdersCard } from "./event-open-orders";
4
+ export type { EventOpenOrdersCardProps, EventOpenOrdersProps } from "./event-open-orders";
5
+ export { useEventOpenOrders } from "./use-event-open-orders";
3
6
  export declare const formatRecurringCountdown: (remainingMs: number) => string | null;
4
7
  export declare const EventMarketPage: {
5
8
  (props: EventMarketPageProps & {
@@ -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, defaultTradeSide, classNames, ariaLabel, showPlaceOrder, executionMode, stickyOrderPanel, resolvedClaim, onBeforePrimaryAction, sharedKyc, }: Extract<EventMarketPageProps, {
4
+ ({ event, defaultMarketId, defaultOutcomeId, defaultTradeSide, defaultChartView, 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, defaultTradeSide, classNames, ariaLabel, showPlaceOrder, executionMode, stickyOrderPanel, resolvedClaim, onBeforePrimaryAction, sharedKyc, }: Extract<EventMarketPageProps, {
4
+ ({ event, defaultMarketId, defaultOutcomeId, defaultTradeSide, defaultChartView, classNames, ariaLabel, showPlaceOrder, executionMode, stickyOrderPanel, resolvedClaim, onBeforePrimaryAction, sharedKyc, }: Extract<EventMarketPageProps, {
5
5
  event: VenueEventWithMarkets;
6
6
  }>): JSX.Element;
7
7
  displayName: string;
@@ -0,0 +1,27 @@
1
+ import type { UserProfileOpenOrder } from "../user-profile/user-profile.types";
2
+ export interface UseEventOpenOrdersOptions {
3
+ /**
4
+ * Every venue market shown on the page — the whole matched cluster, not one
5
+ * venue's slice. An order placed from this page against a sibling venue lives
6
+ * under that venue's own `VenueEvent`, so narrowing by event id would hide it.
7
+ */
8
+ venueMarketIds: ReadonlyArray<string>;
9
+ enabled?: boolean;
10
+ executionMode?: "live" | "paper";
11
+ }
12
+ export interface UseEventOpenOrdersResult {
13
+ orders: UserProfileOpenOrder[];
14
+ isLoading: boolean;
15
+ /** An order query failed. Distinguishes "broken" from "empty". */
16
+ hasError: boolean;
17
+ }
18
+ /**
19
+ * The open limit orders resting on the markets currently on screen, shaped for
20
+ * `OpenOrderRow`.
21
+ *
22
+ * `GET /execution/orders` is scoped server-side by `venueMarketIds` — one
23
+ * request per 75 markets, so nearly every page is a single request. The API has
24
+ * no "open" status group, so every limit order on these markets comes back and
25
+ * the open ones are picked here.
26
+ */
27
+ export declare const useEventOpenOrders: ({ venueMarketIds: pageVenueMarketIds, enabled, executionMode, }: UseEventOpenOrdersOptions) => UseEventOpenOrdersResult;
@@ -0,0 +1,27 @@
1
+ import type { UserProfileOpenOrder } from "../user-profile/user-profile.types";
2
+ export interface UseEventOpenOrdersOptions {
3
+ /**
4
+ * Every venue market shown on the page — the whole matched cluster, not one
5
+ * venue's slice. An order placed from this page against a sibling venue lives
6
+ * under that venue's own `VenueEvent`, so narrowing by event id would hide it.
7
+ */
8
+ venueMarketIds: ReadonlyArray<string>;
9
+ enabled?: boolean;
10
+ executionMode?: "live" | "paper";
11
+ }
12
+ export interface UseEventOpenOrdersResult {
13
+ orders: UserProfileOpenOrder[];
14
+ isLoading: boolean;
15
+ /** An order query failed. Distinguishes "broken" from "empty". */
16
+ hasError: boolean;
17
+ }
18
+ /**
19
+ * The open limit orders resting on the markets currently on screen, shaped for
20
+ * `OpenOrderRow`.
21
+ *
22
+ * `GET /execution/orders` is scoped server-side by `venueMarketIds` — one
23
+ * request per 75 markets, so nearly every page is a single request. The API has
24
+ * no "open" status group, so every limit order on these markets comes back and
25
+ * the open ones are picked here.
26
+ */
27
+ export declare const useEventOpenOrders: ({ venueMarketIds: pageVenueMarketIds, enabled, executionMode, }: UseEventOpenOrdersOptions) => UseEventOpenOrdersResult;
@@ -5,6 +5,8 @@ type ChainRow = {
5
5
  label: string;
6
6
  balance: number;
7
7
  accountCount: number;
8
+ venue?: VenueLogoName;
9
+ isFresh?: boolean;
8
10
  };
9
11
  type AvailableBalanceCardProps = {
10
12
  label?: string;
@@ -5,6 +5,8 @@ type ChainRow = {
5
5
  label: string;
6
6
  balance: number;
7
7
  accountCount: number;
8
+ venue?: VenueLogoName;
9
+ isFresh?: boolean;
8
10
  };
9
11
  type AvailableBalanceCardProps = {
10
12
  label?: string;
@@ -0,0 +1,4 @@
1
+ export declare function BetdexAccountActivity({ accountId, environment, }: {
2
+ accountId: string;
3
+ environment: "sandbox" | "production";
4
+ }): JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ export declare function BetdexAccountActivity({ accountId, environment, }: {
2
+ accountId: string;
3
+ environment: "sandbox" | "production";
4
+ }): JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ /** Hosted venue cash must never be presented as a signing-wallet chain balance. */
2
+ export declare function BetdexAccountCard(): JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ /** Hosted venue cash must never be presented as a signing-wallet chain balance. */
2
+ export declare function BetdexAccountCard(): JSX.Element | null;