@agg-build/ui 2.7.2 → 2.8.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-7R2SMMAG.mjs → chunk-2QCNDFNC.mjs} +193 -103
- package/dist/{chunk-EDQ64EKO.mjs → chunk-AKLGQ6AB.mjs} +254 -53
- package/dist/{chunk-FMYYPNZZ.mjs → chunk-KO6VTRV6.mjs} +101 -27
- package/dist/{chunk-AHQA3B7D.mjs → chunk-KX3TQ7WC.mjs} +1 -1
- package/dist/{chunk-EKUH3265.mjs → chunk-MKU5Q6PN.mjs} +51 -13
- package/dist/{chunk-O27JUYCF.mjs → chunk-R5S2QOYL.mjs} +495 -289
- package/dist/{chunk-JQKJDSTW.mjs → chunk-VR5ZRDQT.mjs} +3 -2
- package/dist/events.js +198 -91
- package/dist/events.mjs +3 -3
- package/dist/index.js +1350 -751
- package/dist/index.mjs +7 -7
- package/dist/modals.js +941 -418
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +1008 -609
- package/dist/pages.mjs +6 -6
- package/dist/primitives.js +94 -26
- package/dist/primitives.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +1403 -902
- package/dist/trading.mjs +4 -4
- package/dist/types/events/orderbook/orderbook.utils.d.mts +1 -1
- package/dist/types/events/orderbook/orderbook.utils.d.ts +1 -1
- package/dist/types/pages/user-profile/components/open-order-row.d.mts +1 -0
- package/dist/types/pages/user-profile/components/open-order-row.d.ts +1 -0
- package/dist/types/pages/user-profile/position-view-model.d.mts +15 -4
- package/dist/types/pages/user-profile/position-view-model.d.ts +15 -4
- package/dist/types/primitives/select/index.d.mts +1 -1
- package/dist/types/primitives/select/index.d.ts +1 -1
- package/dist/types/primitives/select/select.types.d.mts +8 -0
- package/dist/types/primitives/select/select.types.d.ts +8 -0
- package/dist/types/profile/profile-modal.constants.d.mts +2 -1
- package/dist/types/profile/profile-modal.constants.d.ts +2 -1
- package/dist/types/profile/tabs/balance-management-tab.d.mts +3 -0
- package/dist/types/profile/tabs/balance-management-tab.d.ts +3 -0
- package/dist/types/trading/place-order/index.place-order.constants.d.mts +2 -1
- package/dist/types/trading/place-order/index.place-order.constants.d.ts +2 -1
- package/dist/types/trading/place-order/index.place-order.types.d.mts +6 -0
- package/dist/types/trading/place-order/index.place-order.types.d.ts +6 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +10 -2
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +10 -2
- package/package.json +2 -2
package/dist/trading.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
parseVenue,
|
|
10
10
|
useClaimWinnings,
|
|
11
11
|
useResolvedMarketClaim
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-R5S2QOYL.mjs";
|
|
13
13
|
import {
|
|
14
14
|
SETTLEMENT_SECTION_ID,
|
|
15
15
|
Settlement,
|
|
@@ -27,9 +27,9 @@ import {
|
|
|
27
27
|
prepareSettlementDifferences,
|
|
28
28
|
resolveDifferenceIconClassName,
|
|
29
29
|
useEventTradingContext
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-VR5ZRDQT.mjs";
|
|
31
|
+
import "./chunk-KX3TQ7WC.mjs";
|
|
32
|
+
import "./chunk-KO6VTRV6.mjs";
|
|
33
33
|
export {
|
|
34
34
|
FundKalshiModal,
|
|
35
35
|
PlaceOrder,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { OrderbookResult } from "@agg-build/hooks";
|
|
2
2
|
import type { OrderbookEntry, OrderbookRowData } from "./orderbook.types";
|
|
3
|
-
export declare const formatProbabilityCents: (value: number | null | undefined) => string;
|
|
3
|
+
export declare const formatProbabilityCents: (value: number | null | undefined, formatPrice?: (value: number) => string) => string;
|
|
4
4
|
export declare const resolveOrderBookRows: ({ data, side, }: {
|
|
5
5
|
data: OrderbookResult[] | undefined;
|
|
6
6
|
side: "asks" | "bids";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { OrderbookResult } from "@agg-build/hooks";
|
|
2
2
|
import type { OrderbookEntry, OrderbookRowData } from "./orderbook.types";
|
|
3
|
-
export declare const formatProbabilityCents: (value: number | null | undefined) => string;
|
|
3
|
+
export declare const formatProbabilityCents: (value: number | null | undefined, formatPrice?: (value: number) => string) => string;
|
|
4
4
|
export declare const resolveOrderBookRows: ({ data, side, }: {
|
|
5
5
|
data: OrderbookResult[] | undefined;
|
|
6
6
|
side: "asks" | "bids";
|
|
@@ -14,6 +14,7 @@ type OpenOrderRowProps = {
|
|
|
14
14
|
totalHeader?: string;
|
|
15
15
|
expirationHeader?: string;
|
|
16
16
|
};
|
|
17
|
+
export declare const canCancelOpenOrder: (order: UserProfileOpenOrder) => boolean;
|
|
17
18
|
export declare const OpenOrderRow: {
|
|
18
19
|
({ order, href, onClick, onCancel, isCancelling, cancelLabel, cancelAriaLabel, limitPriceHeader, filledHeader, totalHeader, expirationHeader, }: OpenOrderRowProps): JSX.Element;
|
|
19
20
|
displayName: string;
|
|
@@ -14,6 +14,7 @@ type OpenOrderRowProps = {
|
|
|
14
14
|
totalHeader?: string;
|
|
15
15
|
expirationHeader?: string;
|
|
16
16
|
};
|
|
17
|
+
export declare const canCancelOpenOrder: (order: UserProfileOpenOrder) => boolean;
|
|
17
18
|
export declare const OpenOrderRow: {
|
|
18
19
|
({ order, href, onClick, onCancel, isCancelling, cancelLabel, cancelAriaLabel, limitPriceHeader, filledHeader, totalHeader, expirationHeader, }: OpenOrderRowProps): JSX.Element;
|
|
19
20
|
displayName: string;
|
|
@@ -32,9 +32,20 @@ export type PositionViewModelLabels = {
|
|
|
32
32
|
nowPrefix: string;
|
|
33
33
|
finalPrefix: string;
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Optional formatter overrides sourced from `config.formatting`. Every field is
|
|
37
|
+
* optional and, when omitted, this view model keeps its own default rendering —
|
|
38
|
+
* so partners who never set them see no change.
|
|
39
|
+
*/
|
|
40
|
+
export type PositionViewModelFormatters = {
|
|
41
|
+
/** Receives a `0..1` probability. */
|
|
42
|
+
formatPrice?: (value: number) => string;
|
|
43
|
+
/** Receives a dollar amount. */
|
|
44
|
+
formatCurrency?: (value: number) => string;
|
|
45
|
+
};
|
|
46
|
+
export declare const formatCurrency: (value: number | null | undefined, formatCurrencyOverride?: (value: number) => string) => string;
|
|
47
|
+
export declare const formatSignedCurrency: (value: number | null | undefined, formatCurrencyOverride?: (value: number) => string) => string;
|
|
48
|
+
export declare const formatPriceCents: (value: number | null | undefined, formatPrice?: (value: number) => string) => string;
|
|
38
49
|
export declare const formatSignedPercent: (value: number | null | undefined) => string;
|
|
39
50
|
export declare const resolvePositionStatus: (position: UserProfilePosition) => PositionStatus;
|
|
40
51
|
export declare const resolvePositionBucket: (position: UserProfilePosition) => PositionBucket;
|
|
@@ -51,4 +62,4 @@ export declare const getPnlPercent: (position: UserProfilePosition, pnlValue: nu
|
|
|
51
62
|
export declare const getFinalPnlValue: (position: UserProfilePosition, value: number | null) => number | null;
|
|
52
63
|
export declare const getFinalPnlPercent: (position: UserProfilePosition, pnlValue: number | null) => number | null;
|
|
53
64
|
export declare const getPositionTone: (value: number | null | undefined) => PositionTone;
|
|
54
|
-
export declare const toPositionRowViewModel: (position: UserProfilePosition, labels?: PositionViewModelLabels) => PositionRowViewModel;
|
|
65
|
+
export declare const toPositionRowViewModel: (position: UserProfilePosition, labels?: PositionViewModelLabels, formatters?: PositionViewModelFormatters) => PositionRowViewModel;
|
|
@@ -32,9 +32,20 @@ export type PositionViewModelLabels = {
|
|
|
32
32
|
nowPrefix: string;
|
|
33
33
|
finalPrefix: string;
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Optional formatter overrides sourced from `config.formatting`. Every field is
|
|
37
|
+
* optional and, when omitted, this view model keeps its own default rendering —
|
|
38
|
+
* so partners who never set them see no change.
|
|
39
|
+
*/
|
|
40
|
+
export type PositionViewModelFormatters = {
|
|
41
|
+
/** Receives a `0..1` probability. */
|
|
42
|
+
formatPrice?: (value: number) => string;
|
|
43
|
+
/** Receives a dollar amount. */
|
|
44
|
+
formatCurrency?: (value: number) => string;
|
|
45
|
+
};
|
|
46
|
+
export declare const formatCurrency: (value: number | null | undefined, formatCurrencyOverride?: (value: number) => string) => string;
|
|
47
|
+
export declare const formatSignedCurrency: (value: number | null | undefined, formatCurrencyOverride?: (value: number) => string) => string;
|
|
48
|
+
export declare const formatPriceCents: (value: number | null | undefined, formatPrice?: (value: number) => string) => string;
|
|
38
49
|
export declare const formatSignedPercent: (value: number | null | undefined) => string;
|
|
39
50
|
export declare const resolvePositionStatus: (position: UserProfilePosition) => PositionStatus;
|
|
40
51
|
export declare const resolvePositionBucket: (position: UserProfilePosition) => PositionBucket;
|
|
@@ -51,4 +62,4 @@ export declare const getPnlPercent: (position: UserProfilePosition, pnlValue: nu
|
|
|
51
62
|
export declare const getFinalPnlValue: (position: UserProfilePosition, value: number | null) => number | null;
|
|
52
63
|
export declare const getFinalPnlPercent: (position: UserProfilePosition, pnlValue: number | null) => number | null;
|
|
53
64
|
export declare const getPositionTone: (value: number | null | undefined) => PositionTone;
|
|
54
|
-
export declare const toPositionRowViewModel: (position: UserProfilePosition, labels?: PositionViewModelLabels) => PositionRowViewModel;
|
|
65
|
+
export declare const toPositionRowViewModel: (position: UserProfilePosition, labels?: PositionViewModelLabels, formatters?: PositionViewModelFormatters) => PositionRowViewModel;
|
|
@@ -2,6 +2,6 @@ import type { SelectProps } from "./select.types";
|
|
|
2
2
|
export type { SelectItem, SelectProps } from "./select.types";
|
|
3
3
|
/** Renders a custom select trigger and portaled listbox. */
|
|
4
4
|
export declare const Select: {
|
|
5
|
-
<TValue extends string = string>({ items, value, onChange, ariaLabel, className, triggerClassName, contentClassName, itemClassName, disabled, }: SelectProps<TValue>): JSX.Element;
|
|
5
|
+
<TValue extends string = string>({ items, value, onChange, ariaLabel, className, triggerClassName, contentClassName, itemClassName, disabled, variant, openOnHover, contentAlign, contentSideOffset, }: SelectProps<TValue>): JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
@@ -2,6 +2,6 @@ import type { SelectProps } from "./select.types";
|
|
|
2
2
|
export type { SelectItem, SelectProps } from "./select.types";
|
|
3
3
|
/** Renders a custom select trigger and portaled listbox. */
|
|
4
4
|
export declare const Select: {
|
|
5
|
-
<TValue extends string = string>({ items, value, onChange, ariaLabel, className, triggerClassName, contentClassName, itemClassName, disabled, }: SelectProps<TValue>): JSX.Element;
|
|
5
|
+
<TValue extends string = string>({ items, value, onChange, ariaLabel, className, triggerClassName, contentClassName, itemClassName, disabled, variant, openOnHover, contentAlign, contentSideOffset, }: SelectProps<TValue>): JSX.Element;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
@@ -31,4 +31,12 @@ export type SelectProps<TValue extends string = string> = {
|
|
|
31
31
|
itemClassName?: string;
|
|
32
32
|
/** Whether the select should block user interaction. */
|
|
33
33
|
disabled?: boolean;
|
|
34
|
+
/** Visual treatment for the standard field or a compact inline control. */
|
|
35
|
+
variant?: "default" | "inline";
|
|
36
|
+
/** Opens the listbox on hover while preserving click and touch interaction. */
|
|
37
|
+
openOnHover?: boolean;
|
|
38
|
+
/** Horizontal alignment of the portaled listbox relative to the trigger. */
|
|
39
|
+
contentAlign?: "start" | "end";
|
|
40
|
+
/** Gap between the trigger and the portaled listbox, in pixels. */
|
|
41
|
+
contentSideOffset?: number;
|
|
34
42
|
};
|
|
@@ -31,4 +31,12 @@ export type SelectProps<TValue extends string = string> = {
|
|
|
31
31
|
itemClassName?: string;
|
|
32
32
|
/** Whether the select should block user interaction. */
|
|
33
33
|
disabled?: boolean;
|
|
34
|
+
/** Visual treatment for the standard field or a compact inline control. */
|
|
35
|
+
variant?: "default" | "inline";
|
|
36
|
+
/** Opens the listbox on hover while preserving click and touch interaction. */
|
|
37
|
+
openOnHover?: boolean;
|
|
38
|
+
/** Horizontal alignment of the portaled listbox relative to the trigger. */
|
|
39
|
+
contentAlign?: "start" | "end";
|
|
40
|
+
/** Gap between the trigger and the portaled listbox, in pixels. */
|
|
41
|
+
contentSideOffset?: number;
|
|
34
42
|
};
|
|
@@ -2,6 +2,7 @@ import type { IconName } from "../primitives/icon/registry";
|
|
|
2
2
|
export declare const PROFILE_TAB_KEYS: {
|
|
3
3
|
readonly PROFILE_ACCOUNTS: "profile-accounts";
|
|
4
4
|
readonly TRADING_ACCESS: "trading-access";
|
|
5
|
+
readonly BALANCE_MANAGEMENT: "balance-management";
|
|
5
6
|
};
|
|
6
7
|
export type ProfileTabKey = (typeof PROFILE_TAB_KEYS)[keyof typeof PROFILE_TAB_KEYS];
|
|
7
8
|
export interface ProfileTabItem {
|
|
@@ -9,7 +10,7 @@ export interface ProfileTabItem {
|
|
|
9
10
|
label: string;
|
|
10
11
|
icon: IconName;
|
|
11
12
|
}
|
|
12
|
-
export declare const
|
|
13
|
+
export declare const getProfileTabItems: (balanceManagementLabel: string) => ProfileTabItem[];
|
|
13
14
|
/**
|
|
14
15
|
* Display names for venue slugs.
|
|
15
16
|
* Re-uses the venue-logo labels as the single source of truth.
|
|
@@ -2,6 +2,7 @@ import type { IconName } from "../primitives/icon/registry";
|
|
|
2
2
|
export declare const PROFILE_TAB_KEYS: {
|
|
3
3
|
readonly PROFILE_ACCOUNTS: "profile-accounts";
|
|
4
4
|
readonly TRADING_ACCESS: "trading-access";
|
|
5
|
+
readonly BALANCE_MANAGEMENT: "balance-management";
|
|
5
6
|
};
|
|
6
7
|
export type ProfileTabKey = (typeof PROFILE_TAB_KEYS)[keyof typeof PROFILE_TAB_KEYS];
|
|
7
8
|
export interface ProfileTabItem {
|
|
@@ -9,7 +10,7 @@ export interface ProfileTabItem {
|
|
|
9
10
|
label: string;
|
|
10
11
|
icon: IconName;
|
|
11
12
|
}
|
|
12
|
-
export declare const
|
|
13
|
+
export declare const getProfileTabItems: (balanceManagementLabel: string) => ProfileTabItem[];
|
|
13
14
|
/**
|
|
14
15
|
* Display names for venue slugs.
|
|
15
16
|
* Re-uses the venue-logo labels as the single source of truth.
|
|
@@ -16,11 +16,12 @@ export declare const DEFAULT_SLIPPAGE_VALUE = "0.5";
|
|
|
16
16
|
export declare const DEFAULT_SLIPPAGE_MINIMUM = 0.5;
|
|
17
17
|
export declare const HIGH_SLIPPAGE_THRESHOLD = 10;
|
|
18
18
|
export declare const PLACE_ORDER_ROUTE_COLLAPSED_CARD_COUNT = 3;
|
|
19
|
+
export declare const PLACE_ORDER_NUMERIC_INPUT_CLASS_NAME = "bg-transparent text-right text-agg-3xl font-agg-bold leading-agg-9 tracking-agg-normal text-agg-foreground outline-none";
|
|
19
20
|
export declare const PLACE_ORDER_CONTAINER_CLASS_NAME = "w-full overflow-hidden rounded-agg-xl border border-agg-separator bg-agg-secondary shadow-none hover:shadow-none";
|
|
20
21
|
export declare const PLACE_ORDER_OUTCOME_BUTTON_CLASS_NAMES: {
|
|
21
22
|
readonly activeNegative: "border-agg-error/50 bg-agg-error/15 font-agg-bold text-agg-error";
|
|
22
23
|
readonly activePositive: "border-agg-success/50 bg-agg-success/15 font-agg-bold text-agg-success";
|
|
23
|
-
readonly base: "flex h-
|
|
24
|
+
readonly base: "flex h-11 flex-1 items-center justify-center rounded-agg-full border px-6 text-agg-base leading-agg-6";
|
|
24
25
|
readonly inactive: "border-transparent bg-agg-secondary-hover font-agg-normal text-agg-foreground hover:bg-agg-tertiary";
|
|
25
26
|
};
|
|
26
27
|
export declare const PLACE_ORDER_RESULT_VALUE_CLASS_NAME_BY_TONE: Record<PlaceOrderResultTone, string>;
|
|
@@ -16,11 +16,12 @@ export declare const DEFAULT_SLIPPAGE_VALUE = "0.5";
|
|
|
16
16
|
export declare const DEFAULT_SLIPPAGE_MINIMUM = 0.5;
|
|
17
17
|
export declare const HIGH_SLIPPAGE_THRESHOLD = 10;
|
|
18
18
|
export declare const PLACE_ORDER_ROUTE_COLLAPSED_CARD_COUNT = 3;
|
|
19
|
+
export declare const PLACE_ORDER_NUMERIC_INPUT_CLASS_NAME = "bg-transparent text-right text-agg-3xl font-agg-bold leading-agg-9 tracking-agg-normal text-agg-foreground outline-none";
|
|
19
20
|
export declare const PLACE_ORDER_CONTAINER_CLASS_NAME = "w-full overflow-hidden rounded-agg-xl border border-agg-separator bg-agg-secondary shadow-none hover:shadow-none";
|
|
20
21
|
export declare const PLACE_ORDER_OUTCOME_BUTTON_CLASS_NAMES: {
|
|
21
22
|
readonly activeNegative: "border-agg-error/50 bg-agg-error/15 font-agg-bold text-agg-error";
|
|
22
23
|
readonly activePositive: "border-agg-success/50 bg-agg-success/15 font-agg-bold text-agg-success";
|
|
23
|
-
readonly base: "flex h-
|
|
24
|
+
readonly base: "flex h-11 flex-1 items-center justify-center rounded-agg-full border px-6 text-agg-base leading-agg-6";
|
|
24
25
|
readonly inactive: "border-transparent bg-agg-secondary-hover font-agg-normal text-agg-foreground hover:bg-agg-tertiary";
|
|
25
26
|
};
|
|
26
27
|
export declare const PLACE_ORDER_RESULT_VALUE_CLASS_NAME_BY_TONE: Record<PlaceOrderResultTone, string>;
|
|
@@ -145,6 +145,12 @@ export type PlaceOrderVenueQuote = {
|
|
|
145
145
|
venueMarketId: string;
|
|
146
146
|
venueMarketOutcomeId: string;
|
|
147
147
|
};
|
|
148
|
+
export type PlaceOrderLimitVenueOption = {
|
|
149
|
+
currentPrice?: number;
|
|
150
|
+
venue: TradingVenue;
|
|
151
|
+
venueMarketId: string;
|
|
152
|
+
venueMarketOutcomeId: string;
|
|
153
|
+
};
|
|
148
154
|
export type PlaceOrderResultTone = "default" | "success";
|
|
149
155
|
export type PlaceOrderQuoteResult = {
|
|
150
156
|
hint: string;
|
|
@@ -145,6 +145,12 @@ export type PlaceOrderVenueQuote = {
|
|
|
145
145
|
venueMarketId: string;
|
|
146
146
|
venueMarketOutcomeId: string;
|
|
147
147
|
};
|
|
148
|
+
export type PlaceOrderLimitVenueOption = {
|
|
149
|
+
currentPrice?: number;
|
|
150
|
+
venue: TradingVenue;
|
|
151
|
+
venueMarketId: string;
|
|
152
|
+
venueMarketOutcomeId: string;
|
|
153
|
+
};
|
|
148
154
|
export type PlaceOrderResultTone = "default" | "success";
|
|
149
155
|
export type PlaceOrderQuoteResult = {
|
|
150
156
|
hint: string;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import type { VenueSellQuoteRequest } from "@agg-build/hooks";
|
|
1
|
+
import type { VenueMarket, VenueSellQuoteRequest } from "@agg-build/hooks";
|
|
2
2
|
import type { SmartRouteResponse, WsOrderSubmitted } from "@agg-build/sdk";
|
|
3
3
|
import { type PlaceOrderOutcome, type PlaceOrderRoutingRow, type PlaceOrderTab, type TradingVenue } from "../types";
|
|
4
|
-
import type { BuildLiveRouteCardsParams, PlaceOrderOutcomeClassNameParams, PlaceOrderExecutionStepGroup, PlaceOrderFailureStep, PlaceOrderFailureSummary, PlaceOrderOutcomeLabelValue, PlaceOrderQuoteResult, PlaceOrderQuoteStatus, PlaceOrderResultTone, PlaceOrderRouteCard, PlaceOrderTerminalOrderEvent, PlaceOrderTradingLabels, PlaceOrderVenueOutcome, ResolvePlaceOrderQuoteResultParams, ResolvePlaceOrderQuoteStatusParams, ResolvePlaceOrderTabKeyParams } from "./index.place-order.types";
|
|
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
|
+
export declare const buildLimitOrderVenueOptions: ({ currentPrices, livePrices, market, selectedOutcomeId, }: {
|
|
6
|
+
currentPrices: ReadonlyMap<string, number>;
|
|
7
|
+
livePrices?: ReadonlyMap<string, number>;
|
|
8
|
+
market: VenueMarket | null | undefined;
|
|
9
|
+
selectedOutcomeId: string | null | undefined;
|
|
10
|
+
}) => PlaceOrderLimitVenueOption[];
|
|
11
|
+
export declare const resolveAutomaticLimitOrderVenueOption: (options: PlaceOrderLimitVenueOption[], side: PlaceOrderTab) => PlaceOrderLimitVenueOption | null;
|
|
5
12
|
export declare const extractGeoBlockedVenues: (warnings: SmartRouteResponse["warnings"]) => Set<string>;
|
|
13
|
+
export declare const getSmartRouteTotalFees: (feeBreakdown: SmartRouteResponse["feeBreakdown"]) => number | null;
|
|
6
14
|
export declare const hasLowLiquidityWarning: (warnings: SmartRouteResponse["warnings"]) => boolean;
|
|
7
15
|
/** Pure helpers for PlaceOrder view-model shaping, formatting, and keyboard logic. */
|
|
8
16
|
export declare const getPlaceOrderContainerClassName: () => string;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import type { VenueSellQuoteRequest } from "@agg-build/hooks";
|
|
1
|
+
import type { VenueMarket, VenueSellQuoteRequest } from "@agg-build/hooks";
|
|
2
2
|
import type { SmartRouteResponse, WsOrderSubmitted } from "@agg-build/sdk";
|
|
3
3
|
import { type PlaceOrderOutcome, type PlaceOrderRoutingRow, type PlaceOrderTab, type TradingVenue } from "../types";
|
|
4
|
-
import type { BuildLiveRouteCardsParams, PlaceOrderOutcomeClassNameParams, PlaceOrderExecutionStepGroup, PlaceOrderFailureStep, PlaceOrderFailureSummary, PlaceOrderOutcomeLabelValue, PlaceOrderQuoteResult, PlaceOrderQuoteStatus, PlaceOrderResultTone, PlaceOrderRouteCard, PlaceOrderTerminalOrderEvent, PlaceOrderTradingLabels, PlaceOrderVenueOutcome, ResolvePlaceOrderQuoteResultParams, ResolvePlaceOrderQuoteStatusParams, ResolvePlaceOrderTabKeyParams } from "./index.place-order.types";
|
|
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
|
+
export declare const buildLimitOrderVenueOptions: ({ currentPrices, livePrices, market, selectedOutcomeId, }: {
|
|
6
|
+
currentPrices: ReadonlyMap<string, number>;
|
|
7
|
+
livePrices?: ReadonlyMap<string, number>;
|
|
8
|
+
market: VenueMarket | null | undefined;
|
|
9
|
+
selectedOutcomeId: string | null | undefined;
|
|
10
|
+
}) => PlaceOrderLimitVenueOption[];
|
|
11
|
+
export declare const resolveAutomaticLimitOrderVenueOption: (options: PlaceOrderLimitVenueOption[], side: PlaceOrderTab) => PlaceOrderLimitVenueOption | null;
|
|
5
12
|
export declare const extractGeoBlockedVenues: (warnings: SmartRouteResponse["warnings"]) => Set<string>;
|
|
13
|
+
export declare const getSmartRouteTotalFees: (feeBreakdown: SmartRouteResponse["feeBreakdown"]) => number | null;
|
|
6
14
|
export declare const hasLowLiquidityWarning: (warnings: SmartRouteResponse["warnings"]) => boolean;
|
|
7
15
|
/** Pure helpers for PlaceOrder view-model shaping, formatting, and keyboard logic. */
|
|
8
16
|
export declare const getPlaceOrderContainerClassName: () => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agg-build/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Pre-built React component library for the AGG prediction market aggregator. Tailwind-based, themeable, with primitives, event surfaces, trading flows, full pages, and modals.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"liveline": "^0.0.7",
|
|
101
101
|
"react": "^18.0.0 || ^19.0.0",
|
|
102
102
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
103
|
-
"@agg-build/hooks": "^2.
|
|
103
|
+
"@agg-build/hooks": "^2.8.0",
|
|
104
104
|
"@agg-build/sdk": "^2.5.1"
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|