@agg-build/ui 4.17.3 → 4.18.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.
- package/dist/{chunk-7E4UXCEX.mjs → chunk-2OBJ7DYT.mjs} +1227 -534
- package/dist/{chunk-RZLM3M5R.mjs → chunk-2UPO6G3S.mjs} +1251 -2578
- package/dist/{chunk-DSQSQ4RG.mjs → chunk-FTWJRLJQ.mjs} +726 -3825
- package/dist/chunk-HFL3CEWG.mjs +3482 -0
- package/dist/{chunk-TK62UB5F.mjs → chunk-JJ3VVCEP.mjs} +6 -13
- package/dist/{chunk-B5ALKYD5.mjs → chunk-NRPS2D3Q.mjs} +176 -17
- package/dist/{chunk-BBDFSTIA.mjs → chunk-WIGSRHUG.mjs} +1532 -741
- package/dist/chunk-WSZYDOZN.mjs +2040 -0
- package/dist/{chunk-JI5KV4QI.mjs → chunk-ZNOAKSPT.mjs} +8 -10
- package/dist/event-market-GX24AP2H.mjs +21 -0
- package/dist/events.js +2960 -1523
- package/dist/events.mjs +6 -4
- package/dist/index.js +36141 -30748
- package/dist/index.mjs +34 -22
- package/dist/modals.js +1763 -1456
- package/dist/modals.mjs +5 -3
- package/dist/pages.js +34107 -28284
- package/dist/pages.mjs +17 -8
- package/dist/primitives.js +1552 -786
- package/dist/primitives.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +2559 -1499
- package/dist/trading.mjs +4 -4
- package/dist/types/events/item-details/event-chart-window.d.mts +9 -0
- package/dist/types/events/item-details/event-chart-window.d.ts +9 -0
- package/dist/types/events/item-details/event-list-item-details.types.d.mts +7 -0
- package/dist/types/events/item-details/event-list-item-details.types.d.ts +7 -0
- package/dist/types/events/item-details/event-markets-chart.d.mts +12 -0
- package/dist/types/events/item-details/event-markets-chart.d.ts +12 -0
- package/dist/types/events/item-details/event-markets-chart.utils.d.mts +23 -0
- package/dist/types/events/item-details/event-markets-chart.utils.d.ts +23 -0
- package/dist/types/events/list/event-list.constants.d.mts +2 -0
- package/dist/types/events/list/event-list.constants.d.ts +2 -0
- package/dist/types/events/market-details/use-visible-market-streams.d.mts +7 -0
- package/dist/types/events/market-details/use-visible-market-streams.d.ts +7 -0
- package/dist/types/events/shared/chart-source-caption.d.mts +4 -0
- package/dist/types/events/shared/chart-source-caption.d.ts +4 -0
- package/dist/types/events/shared/chart-venue-selection.d.mts +11 -0
- package/dist/types/events/shared/chart-venue-selection.d.ts +11 -0
- package/dist/types/events/shared/use-chart-orderbook.d.mts +23 -0
- package/dist/types/events/shared/use-chart-orderbook.d.ts +23 -0
- package/dist/types/onboarding/index.d.mts +1 -0
- package/dist/types/onboarding/index.d.ts +1 -0
- package/dist/types/onboarding/steps/connect-prophetx-modal.d.mts +12 -0
- package/dist/types/onboarding/steps/connect-prophetx-modal.d.ts +12 -0
- package/dist/types/pages/event-market/event-market.types.d.mts +5 -0
- package/dist/types/pages/event-market/event-market.types.d.ts +5 -0
- package/dist/types/pages/event-market/event-open-orders.d.mts +50 -0
- package/dist/types/pages/event-market/event-open-orders.d.ts +50 -0
- package/dist/types/pages/event-market/index.d.mts +3 -0
- package/dist/types/pages/event-market/index.d.ts +3 -0
- package/dist/types/pages/event-market/sports-event-market-page.d.mts +1 -1
- package/dist/types/pages/event-market/sports-event-market-page.d.ts +1 -1
- package/dist/types/pages/event-market/use-event-open-orders.d.mts +27 -0
- package/dist/types/pages/event-market/use-event-open-orders.d.ts +27 -0
- package/dist/types/pages/user-profile/components/available-balance-card.d.mts +2 -0
- package/dist/types/pages/user-profile/components/available-balance-card.d.ts +2 -0
- package/dist/types/pages/user-profile/components/betdex-account-activity.d.mts +4 -0
- package/dist/types/pages/user-profile/components/betdex-account-activity.d.ts +4 -0
- package/dist/types/pages/user-profile/components/betdex-account-card.d.mts +2 -0
- package/dist/types/pages/user-profile/components/betdex-account-card.d.ts +2 -0
- package/dist/types/pages/user-profile/components/betdex-account-transfers.d.mts +7 -0
- package/dist/types/pages/user-profile/components/betdex-account-transfers.d.ts +7 -0
- package/dist/types/pages/user-profile/components/open-order-row.d.mts +8 -1
- package/dist/types/pages/user-profile/components/open-order-row.d.ts +8 -1
- package/dist/types/pages/user-profile/user-profile.types.d.mts +5 -0
- package/dist/types/pages/user-profile/user-profile.types.d.ts +5 -0
- package/dist/types/primitives/chart/chart.constants.d.mts +7 -0
- package/dist/types/primitives/chart/chart.constants.d.ts +7 -0
- package/dist/types/primitives/chart/chart.types.d.mts +24 -2
- package/dist/types/primitives/chart/chart.types.d.ts +24 -2
- package/dist/types/primitives/chart/index.d.mts +2 -2
- package/dist/types/primitives/chart/index.d.ts +2 -2
- package/dist/types/primitives/chart/probability-chart.d.mts +22 -0
- package/dist/types/primitives/chart/probability-chart.d.ts +22 -0
- package/dist/types/primitives/chart/probability-chart.utils.d.mts +12 -0
- package/dist/types/primitives/chart/probability-chart.utils.d.ts +12 -0
- package/dist/types/primitives/chart/probability-live-tail.d.mts +16 -0
- package/dist/types/primitives/chart/probability-live-tail.d.ts +16 -0
- package/dist/types/primitives/remote-image/index.d.mts +1 -1
- package/dist/types/primitives/remote-image/index.d.ts +1 -1
- package/dist/types/primitives/remote-image/remote-image.types.d.mts +6 -0
- package/dist/types/primitives/remote-image/remote-image.types.d.ts +6 -0
- package/dist/types/primitives/skeleton/views/event-list-item-skeleton-view.d.mts +6 -0
- package/dist/types/primitives/skeleton/views/event-list-item-skeleton-view.d.ts +6 -0
- package/dist/types/primitives/venue-logo/svg/logo-betdex.d.mts +12 -0
- package/dist/types/primitives/venue-logo/svg/logo-betdex.d.ts +12 -0
- package/dist/types/primitives/venue-logo/svg/logo-tiprun.d.mts +7 -0
- package/dist/types/primitives/venue-logo/svg/logo-tiprun.d.ts +7 -0
- package/dist/types/shared/open-orders.d.mts +63 -0
- package/dist/types/shared/open-orders.d.ts +63 -0
- package/dist/types/shared/use-open-order-cancellation.d.mts +18 -0
- package/dist/types/shared/use-open-order-cancellation.d.ts +18 -0
- package/dist/types/trading/manage-betdex-account-modal.d.mts +5 -0
- package/dist/types/trading/manage-betdex-account-modal.d.ts +5 -0
- package/dist/types/trading/place-order/index.place-order.execution-steps.d.mts +2 -0
- package/dist/types/trading/place-order/index.place-order.execution-steps.d.ts +2 -0
- package/dist/types/trading/place-order/index.place-order.types.d.mts +5 -0
- package/dist/types/trading/place-order/index.place-order.types.d.ts +5 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +6 -1
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +6 -1
- package/package.json +3 -3
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function hostedWithdrawalRaw(value: string): string | null;
|
|
2
|
+
export declare function BetdexAccountTransfers({ accountId, environment, availableRaw, canDeposit, }: {
|
|
3
|
+
accountId: string;
|
|
4
|
+
environment: "production" | "sandbox";
|
|
5
|
+
availableRaw?: string;
|
|
6
|
+
canDeposit: boolean;
|
|
7
|
+
}): JSX.Element | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function hostedWithdrawalRaw(value: string): string | null;
|
|
2
|
+
export declare function BetdexAccountTransfers({ accountId, environment, availableRaw, canDeposit, }: {
|
|
3
|
+
accountId: string;
|
|
4
|
+
environment: "production" | "sandbox";
|
|
5
|
+
availableRaw?: string;
|
|
6
|
+
canDeposit: boolean;
|
|
7
|
+
}): JSX.Element | null;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { UserProfileOpenOrder } from "../user-profile.types";
|
|
2
2
|
type OpenOrderRowProps = {
|
|
3
3
|
order: UserProfileOpenOrder;
|
|
4
|
+
/**
|
|
5
|
+
* "profile" is the portfolio table row (market thumbnail, stat labels inline).
|
|
6
|
+
* "event" is the event page card row: every order belongs to the event on
|
|
7
|
+
* screen, so the thumbnail gives way to the order size in shares, and the
|
|
8
|
+
* mobile stats stack their label under the value.
|
|
9
|
+
*/
|
|
10
|
+
variant?: "profile" | "event";
|
|
4
11
|
href?: string;
|
|
5
12
|
onClick?: (order: UserProfileOpenOrder) => void;
|
|
6
13
|
onCancel?: (order: UserProfileOpenOrder) => void;
|
|
@@ -17,7 +24,7 @@ type OpenOrderRowProps = {
|
|
|
17
24
|
export declare const canCancelOpenOrder: (order: UserProfileOpenOrder) => boolean;
|
|
18
25
|
export declare const isPendingOpenOrder: (order: UserProfileOpenOrder) => boolean;
|
|
19
26
|
export declare const OpenOrderRow: {
|
|
20
|
-
({ order, href, onClick, onCancel, isCancelling, cancelLabel, cancelAriaLabel, limitPriceHeader, filledHeader, totalHeader, expirationHeader, }: OpenOrderRowProps): JSX.Element;
|
|
27
|
+
({ order, variant, href, onClick, onCancel, isCancelling, cancelLabel, cancelAriaLabel, limitPriceHeader, filledHeader, totalHeader, expirationHeader, }: OpenOrderRowProps): JSX.Element;
|
|
21
28
|
displayName: string;
|
|
22
29
|
};
|
|
23
30
|
export {};
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { UserProfileOpenOrder } from "../user-profile.types";
|
|
2
2
|
type OpenOrderRowProps = {
|
|
3
3
|
order: UserProfileOpenOrder;
|
|
4
|
+
/**
|
|
5
|
+
* "profile" is the portfolio table row (market thumbnail, stat labels inline).
|
|
6
|
+
* "event" is the event page card row: every order belongs to the event on
|
|
7
|
+
* screen, so the thumbnail gives way to the order size in shares, and the
|
|
8
|
+
* mobile stats stack their label under the value.
|
|
9
|
+
*/
|
|
10
|
+
variant?: "profile" | "event";
|
|
4
11
|
href?: string;
|
|
5
12
|
onClick?: (order: UserProfileOpenOrder) => void;
|
|
6
13
|
onCancel?: (order: UserProfileOpenOrder) => void;
|
|
@@ -17,7 +24,7 @@ type OpenOrderRowProps = {
|
|
|
17
24
|
export declare const canCancelOpenOrder: (order: UserProfileOpenOrder) => boolean;
|
|
18
25
|
export declare const isPendingOpenOrder: (order: UserProfileOpenOrder) => boolean;
|
|
19
26
|
export declare const OpenOrderRow: {
|
|
20
|
-
({ order, href, onClick, onCancel, isCancelling, cancelLabel, cancelAriaLabel, limitPriceHeader, filledHeader, totalHeader, expirationHeader, }: OpenOrderRowProps): JSX.Element;
|
|
27
|
+
({ order, variant, href, onClick, onCancel, isCancelling, cancelLabel, cancelAriaLabel, limitPriceHeader, filledHeader, totalHeader, expirationHeader, }: OpenOrderRowProps): JSX.Element;
|
|
21
28
|
displayName: string;
|
|
22
29
|
};
|
|
23
30
|
export {};
|
|
@@ -263,6 +263,11 @@ export interface UserProfileOpenOrder {
|
|
|
263
263
|
currentPriceLabel?: string;
|
|
264
264
|
/** Filled-out-of-total label, e.g. "0/150" */
|
|
265
265
|
filledLabel: string;
|
|
266
|
+
/**
|
|
267
|
+
* Order size in shares. Rendered as a "100 shares" line beside the venue logo
|
|
268
|
+
* on the event page; the profile row leaves it out.
|
|
269
|
+
*/
|
|
270
|
+
sizeShares?: number;
|
|
266
271
|
/** Total notional label, e.g. "$25.86" */
|
|
267
272
|
valueLabel: string;
|
|
268
273
|
/** Order expiration label, e.g. "55m" or "Good 'til canceled" */
|
|
@@ -263,6 +263,11 @@ export interface UserProfileOpenOrder {
|
|
|
263
263
|
currentPriceLabel?: string;
|
|
264
264
|
/** Filled-out-of-total label, e.g. "0/150" */
|
|
265
265
|
filledLabel: string;
|
|
266
|
+
/**
|
|
267
|
+
* Order size in shares. Rendered as a "100 shares" line beside the venue logo
|
|
268
|
+
* on the event page; the profile row leaves it out.
|
|
269
|
+
*/
|
|
270
|
+
sizeShares?: number;
|
|
266
271
|
/** Total notional label, e.g. "$25.86" */
|
|
267
272
|
valueLabel: string;
|
|
268
273
|
/** Order expiration label, e.g. "55m" or "Good 'til canceled" */
|
|
@@ -3,3 +3,10 @@ export declare const LINE_CHART_DEFAULT_HEIGHT = 280;
|
|
|
3
3
|
export declare const LINE_CHART_DEFAULT_TYPE: LineChartType;
|
|
4
4
|
export declare const LINE_CHART_DEFAULT_SHOW_SERIES_CONTROLS = true;
|
|
5
5
|
export declare const LINE_CHART_DEFAULT_WINDOW_THRESHOLD = 1.05;
|
|
6
|
+
/** Inset of the plot inside the chart canvas: y-axis labels sit in the right gutter, x-axis labels in the bottom one. Skeletons mirror it. */
|
|
7
|
+
export declare const LINE_CHART_PLOT_PADDING: {
|
|
8
|
+
readonly top: 12;
|
|
9
|
+
readonly right: 28;
|
|
10
|
+
readonly bottom: 28;
|
|
11
|
+
readonly left: 12;
|
|
12
|
+
};
|
|
@@ -3,3 +3,10 @@ export declare const LINE_CHART_DEFAULT_HEIGHT = 280;
|
|
|
3
3
|
export declare const LINE_CHART_DEFAULT_TYPE: LineChartType;
|
|
4
4
|
export declare const LINE_CHART_DEFAULT_SHOW_SERIES_CONTROLS = true;
|
|
5
5
|
export declare const LINE_CHART_DEFAULT_WINDOW_THRESHOLD = 1.05;
|
|
6
|
+
/** Inset of the plot inside the chart canvas: y-axis labels sit in the right gutter, x-axis labels in the bottom one. Skeletons mirror it. */
|
|
7
|
+
export declare const LINE_CHART_PLOT_PADDING: {
|
|
8
|
+
readonly top: 12;
|
|
9
|
+
readonly right: 28;
|
|
10
|
+
readonly bottom: 28;
|
|
11
|
+
readonly left: 12;
|
|
12
|
+
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import type { CandlePoint, LivelinePoint } from "liveline";
|
|
2
|
+
import type { CandlePoint, LivelinePoint, OrderbookData } from "liveline";
|
|
3
|
+
/** Bid/ask tuples consumed by Liveline's decorative liquidity stream. */
|
|
4
|
+
export type LineChartOrderbook = OrderbookData;
|
|
3
5
|
export type LineChartPoint = {
|
|
4
6
|
time: number;
|
|
5
7
|
value: number;
|
|
@@ -11,6 +13,7 @@ export type LineChartPoint = {
|
|
|
11
13
|
export type LineChartType = "line" | "candlestick";
|
|
12
14
|
export type LineChartSeries = {
|
|
13
15
|
id: string;
|
|
16
|
+
label?: string;
|
|
14
17
|
color: string;
|
|
15
18
|
points: LineChartPoint[];
|
|
16
19
|
lineWidth?: number;
|
|
@@ -25,6 +28,17 @@ export type LineChartSeriesControlsRenderProps = {
|
|
|
25
28
|
handleSeriesChange: (seriesId: string) => void;
|
|
26
29
|
};
|
|
27
30
|
export type LineChartProps = {
|
|
31
|
+
/** Probability layout: fixed 0–100% scale, period steps and readable liquidity labels. */
|
|
32
|
+
presentation?: "streaming" | "probability";
|
|
33
|
+
/** Visible timestamp range in seconds; does not add observations to the data. */
|
|
34
|
+
timeDomain?: {
|
|
35
|
+
from: number;
|
|
36
|
+
to: number;
|
|
37
|
+
};
|
|
38
|
+
/** Advance the live edge with wall-clock time inside timeDomain, holding the latest quote until it changes. */
|
|
39
|
+
followTime?: boolean;
|
|
40
|
+
/** Optional axis and hover formatter for a market-specific timezone. */
|
|
41
|
+
formatTime?: (timestamp: number) => string;
|
|
28
42
|
/** Series to display on the chart */
|
|
29
43
|
series: LineChartSeries[];
|
|
30
44
|
/** Height of the chart */
|
|
@@ -47,7 +61,15 @@ export type LineChartProps = {
|
|
|
47
61
|
lineData?: LivelinePoint[];
|
|
48
62
|
/** Live line overlay current value. */
|
|
49
63
|
lineValue?: number;
|
|
50
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Optional floating bid/ask liquidity labels for a single-series line chart.
|
|
66
|
+
* These visualize resting liquidity, not individual trades or price-positioned markers.
|
|
67
|
+
* Tuples are [price, size]; Liveline formats size as USD, so convert share
|
|
68
|
+
* quantities to dollar notional (probability * shares) before passing them.
|
|
69
|
+
* Disabled while loading, when live/animations are off, or for reduced motion.
|
|
70
|
+
*/
|
|
71
|
+
orderbook?: LineChartOrderbook;
|
|
72
|
+
/** Whether live effects (momentum, pulse, orderbook stream) should be active. Defaults to global enableLiveUpdates. */
|
|
51
73
|
live?: boolean;
|
|
52
74
|
};
|
|
53
75
|
export type LineChartClassNames = {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import type { CandlePoint, LivelinePoint } from "liveline";
|
|
2
|
+
import type { CandlePoint, LivelinePoint, OrderbookData } from "liveline";
|
|
3
|
+
/** Bid/ask tuples consumed by Liveline's decorative liquidity stream. */
|
|
4
|
+
export type LineChartOrderbook = OrderbookData;
|
|
3
5
|
export type LineChartPoint = {
|
|
4
6
|
time: number;
|
|
5
7
|
value: number;
|
|
@@ -11,6 +13,7 @@ export type LineChartPoint = {
|
|
|
11
13
|
export type LineChartType = "line" | "candlestick";
|
|
12
14
|
export type LineChartSeries = {
|
|
13
15
|
id: string;
|
|
16
|
+
label?: string;
|
|
14
17
|
color: string;
|
|
15
18
|
points: LineChartPoint[];
|
|
16
19
|
lineWidth?: number;
|
|
@@ -25,6 +28,17 @@ export type LineChartSeriesControlsRenderProps = {
|
|
|
25
28
|
handleSeriesChange: (seriesId: string) => void;
|
|
26
29
|
};
|
|
27
30
|
export type LineChartProps = {
|
|
31
|
+
/** Probability layout: fixed 0–100% scale, period steps and readable liquidity labels. */
|
|
32
|
+
presentation?: "streaming" | "probability";
|
|
33
|
+
/** Visible timestamp range in seconds; does not add observations to the data. */
|
|
34
|
+
timeDomain?: {
|
|
35
|
+
from: number;
|
|
36
|
+
to: number;
|
|
37
|
+
};
|
|
38
|
+
/** Advance the live edge with wall-clock time inside timeDomain, holding the latest quote until it changes. */
|
|
39
|
+
followTime?: boolean;
|
|
40
|
+
/** Optional axis and hover formatter for a market-specific timezone. */
|
|
41
|
+
formatTime?: (timestamp: number) => string;
|
|
28
42
|
/** Series to display on the chart */
|
|
29
43
|
series: LineChartSeries[];
|
|
30
44
|
/** Height of the chart */
|
|
@@ -47,7 +61,15 @@ export type LineChartProps = {
|
|
|
47
61
|
lineData?: LivelinePoint[];
|
|
48
62
|
/** Live line overlay current value. */
|
|
49
63
|
lineValue?: number;
|
|
50
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Optional floating bid/ask liquidity labels for a single-series line chart.
|
|
66
|
+
* These visualize resting liquidity, not individual trades or price-positioned markers.
|
|
67
|
+
* Tuples are [price, size]; Liveline formats size as USD, so convert share
|
|
68
|
+
* quantities to dollar notional (probability * shares) before passing them.
|
|
69
|
+
* Disabled while loading, when live/animations are off, or for reduced motion.
|
|
70
|
+
*/
|
|
71
|
+
orderbook?: LineChartOrderbook;
|
|
72
|
+
/** Whether live effects (momentum, pulse, orderbook stream) should be active. Defaults to global enableLiveUpdates. */
|
|
51
73
|
live?: boolean;
|
|
52
74
|
};
|
|
53
75
|
export type LineChartClassNames = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LineChartProps } from "./chart.types";
|
|
2
|
-
export type { LineChartClassNames, LineChartPoint, LineChartProps, LineChartSeries, LineChartSeriesControlsRenderProps, LineChartType, } from "./chart.types";
|
|
2
|
+
export type { LineChartClassNames, LineChartOrderbook, LineChartPoint, LineChartProps, LineChartSeries, LineChartSeriesControlsRenderProps, LineChartType, } from "./chart.types";
|
|
3
3
|
/** Renders line/candlestick chart data with optional series switching and live updates. */
|
|
4
4
|
export declare const LineChart: {
|
|
5
|
-
({ series, height, width, classNames, isLoading, chartType, showSeriesControls, renderSeriesControls, liveCandle: liveForming, lineData, lineValue, live, }: LineChartProps): JSX.Element;
|
|
5
|
+
({ series, height, width, classNames, isLoading, chartType, showSeriesControls, renderSeriesControls, liveCandle: liveForming, lineData, lineValue, orderbook, live, presentation, timeDomain, followTime, formatTime, }: LineChartProps): JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LineChartProps } from "./chart.types";
|
|
2
|
-
export type { LineChartClassNames, LineChartPoint, LineChartProps, LineChartSeries, LineChartSeriesControlsRenderProps, LineChartType, } from "./chart.types";
|
|
2
|
+
export type { LineChartClassNames, LineChartOrderbook, LineChartPoint, LineChartProps, LineChartSeries, LineChartSeriesControlsRenderProps, LineChartType, } from "./chart.types";
|
|
3
3
|
/** Renders line/candlestick chart data with optional series switching and live updates. */
|
|
4
4
|
export declare const LineChart: {
|
|
5
|
-
({ series, height, width, classNames, isLoading, chartType, showSeriesControls, renderSeriesControls, liveCandle: liveForming, lineData, lineValue, live, }: LineChartProps): JSX.Element;
|
|
5
|
+
({ series, height, width, classNames, isLoading, chartType, showSeriesControls, renderSeriesControls, liveCandle: liveForming, lineData, lineValue, orderbook, live, presentation, timeDomain, followTime, formatTime, }: LineChartProps): JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { LineChartOrderbook, LineChartSeries } from "./chart.types";
|
|
2
|
+
/** A deliberately labelled view of resting depth; never presented as a trade tape. */
|
|
3
|
+
export declare const LiquidityStream: ({ orderbook, height, price, }: {
|
|
4
|
+
orderbook: LineChartOrderbook;
|
|
5
|
+
height: number;
|
|
6
|
+
price?: number;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const ProbabilityChart: ({ series, height, domain, orderbook, live, loading, liveValue, followTime, animate, formatTime: customFormatTime, }: {
|
|
9
|
+
series: LineChartSeries[];
|
|
10
|
+
height: number;
|
|
11
|
+
domain?: {
|
|
12
|
+
from: number;
|
|
13
|
+
to: number;
|
|
14
|
+
};
|
|
15
|
+
orderbook?: LineChartOrderbook;
|
|
16
|
+
live: boolean;
|
|
17
|
+
loading: boolean;
|
|
18
|
+
liveValue?: number;
|
|
19
|
+
followTime?: boolean;
|
|
20
|
+
animate?: boolean;
|
|
21
|
+
formatTime?: (timestamp: number) => string;
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { LineChartOrderbook, LineChartSeries } from "./chart.types";
|
|
2
|
+
/** A deliberately labelled view of resting depth; never presented as a trade tape. */
|
|
3
|
+
export declare const LiquidityStream: ({ orderbook, height, price, }: {
|
|
4
|
+
orderbook: LineChartOrderbook;
|
|
5
|
+
height: number;
|
|
6
|
+
price?: number;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const ProbabilityChart: ({ series, height, domain, orderbook, live, loading, liveValue, followTime, animate, formatTime: customFormatTime, }: {
|
|
9
|
+
series: LineChartSeries[];
|
|
10
|
+
height: number;
|
|
11
|
+
domain?: {
|
|
12
|
+
from: number;
|
|
13
|
+
to: number;
|
|
14
|
+
};
|
|
15
|
+
orderbook?: LineChartOrderbook;
|
|
16
|
+
live: boolean;
|
|
17
|
+
loading: boolean;
|
|
18
|
+
liveValue?: number;
|
|
19
|
+
followTime?: boolean;
|
|
20
|
+
animate?: boolean;
|
|
21
|
+
formatTime?: (timestamp: number) => string;
|
|
22
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LineChartPoint } from "./chart.types";
|
|
2
|
+
export declare const CHART_PADDING: {
|
|
3
|
+
top: number;
|
|
4
|
+
right: number;
|
|
5
|
+
bottom: number;
|
|
6
|
+
left: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const probabilityY: (value: number, height: number) => number;
|
|
9
|
+
export declare const probabilityX: (time: number, from: number, to: number, width: number) => number;
|
|
10
|
+
/** Hold each period's observation until the next, with a small rounded transition. */
|
|
11
|
+
export declare const probabilityPath: (points: LineChartPoint[], from: number, to: number, width: number, height: number) => string;
|
|
12
|
+
export declare const nearestChartPoint: (points: LineChartPoint[], time: number) => LineChartPoint | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LineChartPoint } from "./chart.types";
|
|
2
|
+
export declare const CHART_PADDING: {
|
|
3
|
+
top: number;
|
|
4
|
+
right: number;
|
|
5
|
+
bottom: number;
|
|
6
|
+
left: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const probabilityY: (value: number, height: number) => number;
|
|
9
|
+
export declare const probabilityX: (time: number, from: number, to: number, width: number) => number;
|
|
10
|
+
/** Hold each period's observation until the next, with a small rounded transition. */
|
|
11
|
+
export declare const probabilityPath: (points: LineChartPoint[], from: number, to: number, width: number, height: number) => string;
|
|
12
|
+
export declare const nearestChartPoint: (points: LineChartPoint[], time: number) => LineChartPoint | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { LineChartPoint, LineChartSeries } from "./chart.types";
|
|
2
|
+
/** Advance display time without writing fabricated observations into the history/cache. */
|
|
3
|
+
export declare const ProbabilityLiveTail: ({ item, historyPath, previous, point, value, from, to, width, height, clipId, live, animate, }: {
|
|
4
|
+
item: LineChartSeries;
|
|
5
|
+
historyPath: string;
|
|
6
|
+
previous?: LineChartPoint;
|
|
7
|
+
point: LineChartPoint;
|
|
8
|
+
value: number;
|
|
9
|
+
from: number;
|
|
10
|
+
to: number;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
clipId: string;
|
|
14
|
+
live: boolean;
|
|
15
|
+
animate: boolean;
|
|
16
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { LineChartPoint, LineChartSeries } from "./chart.types";
|
|
2
|
+
/** Advance display time without writing fabricated observations into the history/cache. */
|
|
3
|
+
export declare const ProbabilityLiveTail: ({ item, historyPath, previous, point, value, from, to, width, height, clipId, live, animate, }: {
|
|
4
|
+
item: LineChartSeries;
|
|
5
|
+
historyPath: string;
|
|
6
|
+
previous?: LineChartPoint;
|
|
7
|
+
point: LineChartPoint;
|
|
8
|
+
value: number;
|
|
9
|
+
from: number;
|
|
10
|
+
to: number;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
clipId: string;
|
|
14
|
+
live: boolean;
|
|
15
|
+
animate: boolean;
|
|
16
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,6 @@ import type { RemoteImageProps, RemoteImageStatus } from "./remote-image.types";
|
|
|
2
2
|
export type { RemoteImageProps, RemoteImageStatus };
|
|
3
3
|
/** Renders a remote image with loading skeleton and error placeholder fallbacks. */
|
|
4
4
|
export declare const RemoteImage: {
|
|
5
|
-
({ src, alt, title, className, classNames, width, height, onClick, ariaLabel, }: RemoteImageProps): JSX.Element;
|
|
5
|
+
({ src, retinaSrc, alt, title, className, classNames, width, height, onClick, ariaLabel, }: RemoteImageProps): JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
@@ -2,6 +2,6 @@ import type { RemoteImageProps, RemoteImageStatus } from "./remote-image.types";
|
|
|
2
2
|
export type { RemoteImageProps, RemoteImageStatus };
|
|
3
3
|
/** Renders a remote image with loading skeleton and error placeholder fallbacks. */
|
|
4
4
|
export declare const RemoteImage: {
|
|
5
|
-
({ src, alt, title, className, classNames, width, height, onClick, ariaLabel, }: RemoteImageProps): JSX.Element;
|
|
5
|
+
({ src, retinaSrc, alt, title, className, classNames, width, height, onClick, ariaLabel, }: RemoteImageProps): JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
@@ -2,6 +2,12 @@ export type RemoteImageStatus = "loading" | "loaded" | "error";
|
|
|
2
2
|
export type RemoteImageProps = {
|
|
3
3
|
/** Remote image URL to load. */
|
|
4
4
|
src: string | undefined | null;
|
|
5
|
+
/**
|
|
6
|
+
* Optional sharper source offered to 2x displays. When it fails to load
|
|
7
|
+
* (e.g. an asset without retina variants), the image retries with `src`
|
|
8
|
+
* alone before falling back to the error placeholder.
|
|
9
|
+
*/
|
|
10
|
+
retinaSrc?: string | null;
|
|
5
11
|
/** Accessible alternative text for the image. */
|
|
6
12
|
alt: string;
|
|
7
13
|
/** Optional title attribute applied to the image wrapper. */
|
|
@@ -2,6 +2,12 @@ export type RemoteImageStatus = "loading" | "loaded" | "error";
|
|
|
2
2
|
export type RemoteImageProps = {
|
|
3
3
|
/** Remote image URL to load. */
|
|
4
4
|
src: string | undefined | null;
|
|
5
|
+
/**
|
|
6
|
+
* Optional sharper source offered to 2x displays. When it fails to load
|
|
7
|
+
* (e.g. an asset without retina variants), the image retries with `src`
|
|
8
|
+
* alone before falling back to the error placeholder.
|
|
9
|
+
*/
|
|
10
|
+
retinaSrc?: string | null;
|
|
5
11
|
/** Accessible alternative text for the image. */
|
|
6
12
|
alt: string;
|
|
7
13
|
/** Optional title attribute applied to the image wrapper. */
|
|
@@ -2,6 +2,12 @@ import type { SkeletonViewProps } from "../skeleton.types";
|
|
|
2
2
|
type EventListItemSkeletonViewProps = SkeletonViewProps & {
|
|
3
3
|
isStandalone?: boolean;
|
|
4
4
|
};
|
|
5
|
+
/**
|
|
6
|
+
* Mirrors `EventListItem` box for box: 40px image beside a 48px title block,
|
|
7
|
+
* outcome rows at the 30px they shrink to inside the 76px window, a price strip of
|
|
8
|
+
* collapsed venue chips plus the best-price pill, and the markets / matches /
|
|
9
|
+
* venues / volume footer.
|
|
10
|
+
*/
|
|
5
11
|
export declare const EventListItemSkeletonView: {
|
|
6
12
|
({ className, ariaLabel, isStandalone, }: EventListItemSkeletonViewProps): JSX.Element;
|
|
7
13
|
displayName: string;
|
|
@@ -2,6 +2,12 @@ import type { SkeletonViewProps } from "../skeleton.types";
|
|
|
2
2
|
type EventListItemSkeletonViewProps = SkeletonViewProps & {
|
|
3
3
|
isStandalone?: boolean;
|
|
4
4
|
};
|
|
5
|
+
/**
|
|
6
|
+
* Mirrors `EventListItem` box for box: 40px image beside a 48px title block,
|
|
7
|
+
* outcome rows at the 30px they shrink to inside the 76px window, a price strip of
|
|
8
|
+
* collapsed venue chips plus the best-price pill, and the markets / matches /
|
|
9
|
+
* venues / volume footer.
|
|
10
|
+
*/
|
|
5
11
|
export declare const EventListItemSkeletonView: {
|
|
6
12
|
({ className, ariaLabel, isStandalone, }: EventListItemSkeletonViewProps): JSX.Element;
|
|
7
13
|
displayName: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type LogoIconProps } from "../logo-props";
|
|
2
|
+
export declare const BETDEX_LOGO_COLORS: {
|
|
3
|
+
readonly primary: "#32C5FF";
|
|
4
|
+
readonly middle: "#B620E0";
|
|
5
|
+
readonly end: "#F7B500";
|
|
6
|
+
readonly center: "#1C0631";
|
|
7
|
+
};
|
|
8
|
+
/** Square mark from developers.betdex.com's official BETDEX logo SVG. */
|
|
9
|
+
export declare function LogoBetdexIcon({ title, className, isColor, color, ...props }: LogoIconProps): JSX.Element;
|
|
10
|
+
export declare namespace LogoBetdexIcon {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type LogoIconProps } from "../logo-props";
|
|
2
|
+
export declare const BETDEX_LOGO_COLORS: {
|
|
3
|
+
readonly primary: "#32C5FF";
|
|
4
|
+
readonly middle: "#B620E0";
|
|
5
|
+
readonly end: "#F7B500";
|
|
6
|
+
readonly center: "#1C0631";
|
|
7
|
+
};
|
|
8
|
+
/** Square mark from developers.betdex.com's official BETDEX logo SVG. */
|
|
9
|
+
export declare function LogoBetdexIcon({ title, className, isColor, color, ...props }: LogoIconProps): JSX.Element;
|
|
10
|
+
export declare namespace LogoBetdexIcon {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LogoIconProps } from "../logo-props";
|
|
2
|
+
export declare const TIPRUN_LOGO_COLOR = "#FF6B1A";
|
|
3
|
+
/** Official four-path artwork from https://app.tiprun.fun/favicon.svg. */
|
|
4
|
+
export declare const LogoTiprunIcon: {
|
|
5
|
+
({ title, className, isColor, color, ...props }: LogoIconProps): JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LogoIconProps } from "../logo-props";
|
|
2
|
+
export declare const TIPRUN_LOGO_COLOR = "#FF6B1A";
|
|
3
|
+
/** Official four-path artwork from https://app.tiprun.fun/favicon.svg. */
|
|
4
|
+
export declare const LogoTiprunIcon: {
|
|
5
|
+
({ title, className, isColor, color, ...props }: LogoIconProps): JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { useExecutionOrders } from "@agg-build/hooks";
|
|
2
|
+
import type { UserProfileOpenOrder } from "../pages/user-profile/user-profile.types";
|
|
3
|
+
/**
|
|
4
|
+
* Shared open-limit-order plumbing. The profile page and the event page render
|
|
5
|
+
* the same resting orders from the same `GET /orders` rows, so selection,
|
|
6
|
+
* pricing and the row mapping live here rather than in either page.
|
|
7
|
+
*/
|
|
8
|
+
export type OpenOrderExecutionRow = ReturnType<typeof useExecutionOrders>["orders"][number];
|
|
9
|
+
/** Structural shape of the `useVenueMarketMidpoints` rows this module reads. */
|
|
10
|
+
export interface OpenOrderMidpointRow {
|
|
11
|
+
venueMarketId: string;
|
|
12
|
+
outcomes?: ReadonlyArray<{
|
|
13
|
+
label: string;
|
|
14
|
+
midpoint: number | null;
|
|
15
|
+
}> | null;
|
|
16
|
+
}
|
|
17
|
+
export declare const parseRawMicroValue: (value: string | null | undefined) => number | null;
|
|
18
|
+
export declare const formatScaledNumberTwoDecimals: (value: string | null | undefined) => string;
|
|
19
|
+
export declare const formatFilledUsdTwoDecimals: (filledAmountRaw: string | null | undefined) => string;
|
|
20
|
+
/** `0.216` → `"21.6¢"`. Shared by the limit price and the live mark beneath it
|
|
21
|
+
* so the two lines never disagree on rounding. */
|
|
22
|
+
export declare const formatPriceCentsLabel: (value: number) => string;
|
|
23
|
+
export declare const formatLimitPriceLabel: (value: string | null | undefined) => string | undefined;
|
|
24
|
+
export declare const formatOpenOrderExpirationLabel: ({ timeInForce, expiresAt, goodTilCanceledLabel, expiredLabel, }: {
|
|
25
|
+
timeInForce: string | null | undefined;
|
|
26
|
+
expiresAt: string | Date | null | undefined;
|
|
27
|
+
goodTilCanceledLabel: string;
|
|
28
|
+
expiredLabel: string;
|
|
29
|
+
}) => string | undefined;
|
|
30
|
+
/** `GET /orders` takes one status per call, so an open-orders view fans out. */
|
|
31
|
+
export declare const OPEN_ORDER_QUERY_STATUSES: ("open" | "pending_bridge" | "submitting" | "submitted" | "pending" | "partially_filled_open" | "cancel_pending" | "signing")[];
|
|
32
|
+
export declare const isOpenOrderStatus: (status: string) => boolean;
|
|
33
|
+
export declare const isExecutionLimitOrder: (order: OpenOrderExecutionRow) => boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Flattens the per-status query results into the open limit orders to render:
|
|
36
|
+
* deduped by id (a status refetch can return the same order twice), filtered to
|
|
37
|
+
* resting limit orders, optionally narrowed to a set of markets, newest first.
|
|
38
|
+
*
|
|
39
|
+
* Narrow with `venueMarketIds`, not `venueEventId`, whenever the surface shows a
|
|
40
|
+
* matched cross-venue cluster: one screen's markets span several `VenueEvent`
|
|
41
|
+
* rows (each venue has its own), so an order placed against a sibling venue
|
|
42
|
+
* carries a different `venueEventId` and would be filtered out of the very page
|
|
43
|
+
* it was placed from. `venueEventId` stays for callers that really do mean one
|
|
44
|
+
* venue's event.
|
|
45
|
+
*/
|
|
46
|
+
export declare const selectOpenLimitOrders: (orderLists: ReadonlyArray<ReadonlyArray<OpenOrderExecutionRow>>, options?: {
|
|
47
|
+
venueEventId?: string;
|
|
48
|
+
venueMarketIds?: ReadonlyArray<string>;
|
|
49
|
+
}) => OpenOrderExecutionRow[];
|
|
50
|
+
/**
|
|
51
|
+
* orderId → current price label. Matched at the outcome level: a market-level
|
|
52
|
+
* midpoint is the wrong number for anything but the primary side, so an order
|
|
53
|
+
* whose outcome we cannot match is left without a price rather than shown a
|
|
54
|
+
* misleading one.
|
|
55
|
+
*/
|
|
56
|
+
export declare const buildOpenOrderCurrentPriceLabels: (orders: ReadonlyArray<OpenOrderExecutionRow>, midpointRows: ReadonlyArray<OpenOrderMidpointRow>) => Map<string, string>;
|
|
57
|
+
export declare const OPEN_ORDER_FALLBACK_THUMBNAIL_SRC = "data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"60\" height=\"60\"><rect width=\"100%\" height=\"100%\" fill=\"%23f4f4f7\"/></svg>";
|
|
58
|
+
export declare const mapExecutionOrderToOpenOrder: (order: OpenOrderExecutionRow, { goodTilCanceledLabel, expiredLabel, currentPriceLabel, fallbackThumbnailSrc, }: {
|
|
59
|
+
goodTilCanceledLabel: string;
|
|
60
|
+
expiredLabel: string;
|
|
61
|
+
currentPriceLabel?: string;
|
|
62
|
+
fallbackThumbnailSrc?: string;
|
|
63
|
+
}) => UserProfileOpenOrder;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { useExecutionOrders } from "@agg-build/hooks";
|
|
2
|
+
import type { UserProfileOpenOrder } from "../pages/user-profile/user-profile.types";
|
|
3
|
+
/**
|
|
4
|
+
* Shared open-limit-order plumbing. The profile page and the event page render
|
|
5
|
+
* the same resting orders from the same `GET /orders` rows, so selection,
|
|
6
|
+
* pricing and the row mapping live here rather than in either page.
|
|
7
|
+
*/
|
|
8
|
+
export type OpenOrderExecutionRow = ReturnType<typeof useExecutionOrders>["orders"][number];
|
|
9
|
+
/** Structural shape of the `useVenueMarketMidpoints` rows this module reads. */
|
|
10
|
+
export interface OpenOrderMidpointRow {
|
|
11
|
+
venueMarketId: string;
|
|
12
|
+
outcomes?: ReadonlyArray<{
|
|
13
|
+
label: string;
|
|
14
|
+
midpoint: number | null;
|
|
15
|
+
}> | null;
|
|
16
|
+
}
|
|
17
|
+
export declare const parseRawMicroValue: (value: string | null | undefined) => number | null;
|
|
18
|
+
export declare const formatScaledNumberTwoDecimals: (value: string | null | undefined) => string;
|
|
19
|
+
export declare const formatFilledUsdTwoDecimals: (filledAmountRaw: string | null | undefined) => string;
|
|
20
|
+
/** `0.216` → `"21.6¢"`. Shared by the limit price and the live mark beneath it
|
|
21
|
+
* so the two lines never disagree on rounding. */
|
|
22
|
+
export declare const formatPriceCentsLabel: (value: number) => string;
|
|
23
|
+
export declare const formatLimitPriceLabel: (value: string | null | undefined) => string | undefined;
|
|
24
|
+
export declare const formatOpenOrderExpirationLabel: ({ timeInForce, expiresAt, goodTilCanceledLabel, expiredLabel, }: {
|
|
25
|
+
timeInForce: string | null | undefined;
|
|
26
|
+
expiresAt: string | Date | null | undefined;
|
|
27
|
+
goodTilCanceledLabel: string;
|
|
28
|
+
expiredLabel: string;
|
|
29
|
+
}) => string | undefined;
|
|
30
|
+
/** `GET /orders` takes one status per call, so an open-orders view fans out. */
|
|
31
|
+
export declare const OPEN_ORDER_QUERY_STATUSES: ("open" | "pending_bridge" | "submitting" | "submitted" | "pending" | "partially_filled_open" | "cancel_pending" | "signing")[];
|
|
32
|
+
export declare const isOpenOrderStatus: (status: string) => boolean;
|
|
33
|
+
export declare const isExecutionLimitOrder: (order: OpenOrderExecutionRow) => boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Flattens the per-status query results into the open limit orders to render:
|
|
36
|
+
* deduped by id (a status refetch can return the same order twice), filtered to
|
|
37
|
+
* resting limit orders, optionally narrowed to a set of markets, newest first.
|
|
38
|
+
*
|
|
39
|
+
* Narrow with `venueMarketIds`, not `venueEventId`, whenever the surface shows a
|
|
40
|
+
* matched cross-venue cluster: one screen's markets span several `VenueEvent`
|
|
41
|
+
* rows (each venue has its own), so an order placed against a sibling venue
|
|
42
|
+
* carries a different `venueEventId` and would be filtered out of the very page
|
|
43
|
+
* it was placed from. `venueEventId` stays for callers that really do mean one
|
|
44
|
+
* venue's event.
|
|
45
|
+
*/
|
|
46
|
+
export declare const selectOpenLimitOrders: (orderLists: ReadonlyArray<ReadonlyArray<OpenOrderExecutionRow>>, options?: {
|
|
47
|
+
venueEventId?: string;
|
|
48
|
+
venueMarketIds?: ReadonlyArray<string>;
|
|
49
|
+
}) => OpenOrderExecutionRow[];
|
|
50
|
+
/**
|
|
51
|
+
* orderId → current price label. Matched at the outcome level: a market-level
|
|
52
|
+
* midpoint is the wrong number for anything but the primary side, so an order
|
|
53
|
+
* whose outcome we cannot match is left without a price rather than shown a
|
|
54
|
+
* misleading one.
|
|
55
|
+
*/
|
|
56
|
+
export declare const buildOpenOrderCurrentPriceLabels: (orders: ReadonlyArray<OpenOrderExecutionRow>, midpointRows: ReadonlyArray<OpenOrderMidpointRow>) => Map<string, string>;
|
|
57
|
+
export declare const OPEN_ORDER_FALLBACK_THUMBNAIL_SRC = "data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"60\" height=\"60\"><rect width=\"100%\" height=\"100%\" fill=\"%23f4f4f7\"/></svg>";
|
|
58
|
+
export declare const mapExecutionOrderToOpenOrder: (order: OpenOrderExecutionRow, { goodTilCanceledLabel, expiredLabel, currentPriceLabel, fallbackThumbnailSrc, }: {
|
|
59
|
+
goodTilCanceledLabel: string;
|
|
60
|
+
expiredLabel: string;
|
|
61
|
+
currentPriceLabel?: string;
|
|
62
|
+
fallbackThumbnailSrc?: string;
|
|
63
|
+
}) => UserProfileOpenOrder;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { UserProfileOpenOrder } from "../pages/user-profile/user-profile.types";
|
|
2
|
+
export interface UseOpenOrderCancellationOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Consumer-owned cancel flow. When supplied it fully replaces the built-in
|
|
5
|
+
* mutation — the caller is then responsible for its own pending state.
|
|
6
|
+
*/
|
|
7
|
+
onCancelOrder?: (order: UserProfileOpenOrder) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface UseOpenOrderCancellationResult {
|
|
10
|
+
/** Order ids with a cancel in flight. */
|
|
11
|
+
cancellingOrderIds: Record<string, boolean>;
|
|
12
|
+
cancelOrder: (order: UserProfileOpenOrder) => Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Cancels a resting limit order and reports the outcome as a toast. Shared by
|
|
16
|
+
* the profile table and the event page card so both surfaces behave the same.
|
|
17
|
+
*/
|
|
18
|
+
export declare const useOpenOrderCancellation: ({ onCancelOrder, }?: UseOpenOrderCancellationOptions) => UseOpenOrderCancellationResult;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { UserProfileOpenOrder } from "../pages/user-profile/user-profile.types";
|
|
2
|
+
export interface UseOpenOrderCancellationOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Consumer-owned cancel flow. When supplied it fully replaces the built-in
|
|
5
|
+
* mutation — the caller is then responsible for its own pending state.
|
|
6
|
+
*/
|
|
7
|
+
onCancelOrder?: (order: UserProfileOpenOrder) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface UseOpenOrderCancellationResult {
|
|
10
|
+
/** Order ids with a cancel in flight. */
|
|
11
|
+
cancellingOrderIds: Record<string, boolean>;
|
|
12
|
+
cancelOrder: (order: UserProfileOpenOrder) => Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Cancels a resting limit order and reports the outcome as a toast. Shared by
|
|
16
|
+
* the profile table and the event page card so both surfaces behave the same.
|
|
17
|
+
*/
|
|
18
|
+
export declare const useOpenOrderCancellation: ({ onCancelOrder, }?: UseOpenOrderCancellationOptions) => UseOpenOrderCancellationResult;
|