@agg-build/ui 4.7.4 → 4.9.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.
- package/dist/{chunk-2347CDTT.mjs → chunk-GG57TRNE.mjs} +393 -155
- package/dist/{chunk-CB3DDQBP.mjs → chunk-GKYBQEBC.mjs} +462 -171
- package/dist/{chunk-3X5ICUUC.mjs → chunk-GVIS3YXU.mjs} +2 -2
- package/dist/{chunk-XR6C3MZX.mjs → chunk-H7L4HDXS.mjs} +266 -162
- package/dist/{chunk-UQ7XJIAZ.mjs → chunk-NYL6A6AD.mjs} +953 -785
- package/dist/{chunk-MAQ52KM5.mjs → chunk-TNNLRRHC.mjs} +1 -1
- package/dist/{chunk-VQTOMYOA.mjs → chunk-XQLLZTEW.mjs} +296 -166
- package/dist/events.js +1195 -1041
- package/dist/events.mjs +3 -3
- package/dist/index.js +4726 -3772
- package/dist/index.mjs +58 -19
- package/dist/modals.js +1886 -1181
- package/dist/modals.mjs +12 -4
- package/dist/pages.js +3551 -2872
- package/dist/pages.mjs +6 -6
- package/dist/primitives.js +953 -785
- package/dist/primitives.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +2255 -1710
- package/dist/trading.mjs +10 -6
- package/dist/types/index.d.mts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/kyc/index.d.mts +3 -0
- package/dist/types/kyc/index.d.ts +3 -0
- package/dist/types/kyc/shared-kyc-modal.d.mts +12 -0
- package/dist/types/kyc/shared-kyc-modal.d.ts +12 -0
- package/dist/types/kyc/shared-kyc.d.mts +31 -0
- package/dist/types/kyc/shared-kyc.d.ts +31 -0
- package/dist/types/kyc/use-shared-kyc-flow.d.mts +19 -0
- package/dist/types/kyc/use-shared-kyc-flow.d.ts +19 -0
- package/dist/types/modals/index.d.mts +2 -0
- package/dist/types/modals/index.d.ts +2 -0
- package/dist/types/pages/event-market/event-market.shared.d.mts +2 -1
- package/dist/types/pages/event-market/event-market.shared.d.ts +2 -1
- package/dist/types/pages/event-market/event-market.types.d.mts +2 -0
- package/dist/types/pages/event-market/event-market.types.d.ts +2 -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/user-profile/components/positions-value-card.d.mts +17 -1
- package/dist/types/pages/user-profile/components/positions-value-card.d.ts +17 -1
- package/dist/types/pages/user-profile/components/user-info-card.d.mts +11 -1
- package/dist/types/pages/user-profile/components/user-info-card.d.ts +11 -1
- package/dist/types/paper-trading/index.d.mts +6 -0
- package/dist/types/paper-trading/index.d.ts +6 -0
- package/dist/types/paper-trading/paper-onboarding-modal.d.mts +15 -0
- package/dist/types/paper-trading/paper-onboarding-modal.d.ts +15 -0
- package/dist/types/paper-trading/paper-onboarding-modal.types.d.mts +33 -0
- package/dist/types/paper-trading/paper-onboarding-modal.types.d.ts +33 -0
- package/dist/types/paper-trading/paper-trading-badge.d.mts +50 -0
- package/dist/types/paper-trading/paper-trading-badge.d.ts +50 -0
- package/dist/types/paper-trading/paper-trading-onboarding.d.mts +16 -0
- package/dist/types/paper-trading/paper-trading-onboarding.d.ts +16 -0
- package/dist/types/primitives/header/header.types.d.mts +16 -0
- package/dist/types/primitives/header/header.types.d.ts +16 -0
- package/dist/types/primitives/header/index.d.mts +1 -1
- package/dist/types/primitives/header/index.d.ts +1 -1
- package/dist/types/primitives/icon/registry.d.mts +20 -0
- package/dist/types/primitives/icon/registry.d.ts +20 -0
- package/dist/types/primitives/icon/svg/paper-buying-power.d.mts +11 -0
- package/dist/types/primitives/icon/svg/paper-buying-power.d.ts +11 -0
- package/dist/types/primitives/icon/svg/paper-earnings.d.mts +11 -0
- package/dist/types/primitives/icon/svg/paper-earnings.d.ts +11 -0
- package/dist/types/primitives/icon/svg/paper-onboarding-funds.d.mts +12 -0
- package/dist/types/primitives/icon/svg/paper-onboarding-funds.d.ts +12 -0
- package/dist/types/primitives/icon/svg/paper-onboarding-markets.d.mts +12 -0
- package/dist/types/primitives/icon/svg/paper-onboarding-markets.d.ts +12 -0
- package/dist/types/primitives/icon/svg/paper-onboarding-performance.d.mts +12 -0
- package/dist/types/primitives/icon/svg/paper-onboarding-performance.d.ts +12 -0
- package/dist/types/primitives/modal/modal.types.d.mts +6 -0
- package/dist/types/primitives/modal/modal.types.d.ts +6 -0
- package/dist/types/trading/index.d.mts +1 -0
- package/dist/types/trading/index.d.ts +1 -0
- package/dist/types/trading/place-order/index.d.mts +1 -1
- package/dist/types/trading/place-order/index.d.ts +1 -1
- package/dist/types/trading/place-order/index.place-order.types.d.mts +8 -0
- package/dist/types/trading/place-order/index.place-order.types.d.ts +8 -0
- package/dist/types/trading/types.d.mts +2 -0
- package/dist/types/trading/types.d.ts +2 -0
- package/package.json +3 -3
package/dist/trading.mjs
CHANGED
|
@@ -8,11 +8,13 @@ import {
|
|
|
8
8
|
PlaceOrderFailureView,
|
|
9
9
|
PlaceOrderSuccessView,
|
|
10
10
|
SettlementDetails,
|
|
11
|
+
createAggClientSharedKycInitiator,
|
|
11
12
|
parseAmount,
|
|
12
13
|
parseVenue,
|
|
13
14
|
useClaimWinnings,
|
|
14
|
-
useResolvedMarketClaim
|
|
15
|
-
|
|
15
|
+
useResolvedMarketClaim,
|
|
16
|
+
venueRequiresSharedKyc
|
|
17
|
+
} from "./chunk-GKYBQEBC.mjs";
|
|
16
18
|
import {
|
|
17
19
|
SETTLEMENT_SECTION_ID,
|
|
18
20
|
Settlement,
|
|
@@ -30,9 +32,9 @@ import {
|
|
|
30
32
|
prepareSettlementDifferences,
|
|
31
33
|
resolveDifferenceIconClassName,
|
|
32
34
|
useEventTradingContext
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
35
|
+
} from "./chunk-TNNLRRHC.mjs";
|
|
36
|
+
import "./chunk-H7L4HDXS.mjs";
|
|
37
|
+
import "./chunk-NYL6A6AD.mjs";
|
|
36
38
|
export {
|
|
37
39
|
FundKalshiModal,
|
|
38
40
|
PlaceOrder,
|
|
@@ -44,6 +46,7 @@ export {
|
|
|
44
46
|
SETTLEMENT_SECTION_ID,
|
|
45
47
|
Settlement,
|
|
46
48
|
SettlementDetails,
|
|
49
|
+
createAggClientSharedKycInitiator,
|
|
47
50
|
defaultSettlementSectionLabel,
|
|
48
51
|
defaultTradingDisclaimer,
|
|
49
52
|
getSettlementDifferenceId,
|
|
@@ -61,5 +64,6 @@ export {
|
|
|
61
64
|
resolveDifferenceIconClassName,
|
|
62
65
|
useClaimWinnings,
|
|
63
66
|
useEventTradingContext,
|
|
64
|
-
useResolvedMarketClaim
|
|
67
|
+
useResolvedMarketClaim,
|
|
68
|
+
venueRequiresSharedKyc
|
|
65
69
|
};
|
package/dist/types/index.d.mts
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./pages";
|
|
|
7
7
|
export * from "./modals";
|
|
8
8
|
export * from "./trading";
|
|
9
9
|
export * from "./constants";
|
|
10
|
+
export * from "./kyc";
|
|
10
11
|
export * from "./shared/utils";
|
|
11
12
|
export { DEPOSIT_MODAL_OPEN_EVENT, WITHDRAW_MODAL_OPEN_EVENT, requestAggDepositModalOpen, requestAggWithdrawModalOpen, } from "./shared/deposit-modal-events";
|
|
12
13
|
export type { AvailableSizes } from "./shared/types";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./pages";
|
|
|
7
7
|
export * from "./modals";
|
|
8
8
|
export * from "./trading";
|
|
9
9
|
export * from "./constants";
|
|
10
|
+
export * from "./kyc";
|
|
10
11
|
export * from "./shared/utils";
|
|
11
12
|
export { DEPOSIT_MODAL_OPEN_EVENT, WITHDRAW_MODAL_OPEN_EVENT, requestAggDepositModalOpen, requestAggWithdrawModalOpen, } from "./shared/deposit-modal-events";
|
|
12
13
|
export type { AvailableSizes } from "./shared/types";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type SharedKycModalState = "initial" | "initiating" | "pending" | "error" | "success";
|
|
2
|
+
export interface SharedKycModalProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
state?: SharedKycModalState;
|
|
5
|
+
errorMessage?: string;
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
7
|
+
onStartVerification: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const SharedKycModal: {
|
|
10
|
+
({ open, state, errorMessage, onOpenChange, onStartVerification, }: SharedKycModalProps): JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type SharedKycModalState = "initial" | "initiating" | "pending" | "error" | "success";
|
|
2
|
+
export interface SharedKycModalProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
state?: SharedKycModalState;
|
|
5
|
+
errorMessage?: string;
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
7
|
+
onStartVerification: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const SharedKycModal: {
|
|
10
|
+
({ open, state, errorMessage, onOpenChange, onStartVerification, }: SharedKycModalProps): JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Venue, type AggClient } from "@agg-build/sdk";
|
|
2
|
+
export type SharedKycStatus = "loading" | "unverified" | "verified";
|
|
3
|
+
export interface SharedKycInitiationRequest {
|
|
4
|
+
venue: Venue;
|
|
5
|
+
redirectUri: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SharedKycInitiationResult {
|
|
8
|
+
kycUrl?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SharedKycIntegration {
|
|
11
|
+
/** Backend-authoritative shared status for the current app-scoped user. */
|
|
12
|
+
status: SharedKycStatus;
|
|
13
|
+
/** Starts external verification for the venue that triggered the shared requirement. */
|
|
14
|
+
initiateVerification: (request: SharedKycInitiationRequest) => Promise<SharedKycInitiationResult>;
|
|
15
|
+
/** Refetches backend-authoritative status after an external redirect returns. */
|
|
16
|
+
refreshStatus: () => Promise<SharedKycStatus>;
|
|
17
|
+
/** Optional navigation override. Defaults to a same-tab location assignment. */
|
|
18
|
+
navigate?: (url: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface SharedKycVenueCapability {
|
|
21
|
+
venue: string | null | undefined;
|
|
22
|
+
/** Prefer backend capability metadata whenever it is available. */
|
|
23
|
+
requiresKyc?: boolean | null;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Frontend fallback until venue capability metadata is returned by the API.
|
|
27
|
+
* Keep the temporary venue list private so components never encode venue names.
|
|
28
|
+
*/
|
|
29
|
+
export declare const venueRequiresSharedKyc: ({ venue, requiresKyc, }: SharedKycVenueCapability) => boolean;
|
|
30
|
+
/** Adapts the existing SDK initiation method to the shared frontend boundary. */
|
|
31
|
+
export declare const createAggClientSharedKycInitiator: (client: Pick<AggClient, "initiateKyc">) => SharedKycIntegration["initiateVerification"];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Venue, type AggClient } from "@agg-build/sdk";
|
|
2
|
+
export type SharedKycStatus = "loading" | "unverified" | "verified";
|
|
3
|
+
export interface SharedKycInitiationRequest {
|
|
4
|
+
venue: Venue;
|
|
5
|
+
redirectUri: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SharedKycInitiationResult {
|
|
8
|
+
kycUrl?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SharedKycIntegration {
|
|
11
|
+
/** Backend-authoritative shared status for the current app-scoped user. */
|
|
12
|
+
status: SharedKycStatus;
|
|
13
|
+
/** Starts external verification for the venue that triggered the shared requirement. */
|
|
14
|
+
initiateVerification: (request: SharedKycInitiationRequest) => Promise<SharedKycInitiationResult>;
|
|
15
|
+
/** Refetches backend-authoritative status after an external redirect returns. */
|
|
16
|
+
refreshStatus: () => Promise<SharedKycStatus>;
|
|
17
|
+
/** Optional navigation override. Defaults to a same-tab location assignment. */
|
|
18
|
+
navigate?: (url: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface SharedKycVenueCapability {
|
|
21
|
+
venue: string | null | undefined;
|
|
22
|
+
/** Prefer backend capability metadata whenever it is available. */
|
|
23
|
+
requiresKyc?: boolean | null;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Frontend fallback until venue capability metadata is returned by the API.
|
|
27
|
+
* Keep the temporary venue list private so components never encode venue names.
|
|
28
|
+
*/
|
|
29
|
+
export declare const venueRequiresSharedKyc: ({ venue, requiresKyc, }: SharedKycVenueCapability) => boolean;
|
|
30
|
+
/** Adapts the existing SDK initiation method to the shared frontend boundary. */
|
|
31
|
+
export declare const createAggClientSharedKycInitiator: (client: Pick<AggClient, "initiateKyc">) => SharedKycIntegration["initiateVerification"];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SharedKycModalState } from "./shared-kyc-modal";
|
|
2
|
+
import type { SharedKycIntegration, SharedKycInitiationRequest } from "./shared-kyc";
|
|
3
|
+
type KycVenue = SharedKycInitiationRequest["venue"];
|
|
4
|
+
interface UseSharedKycFlowOptions {
|
|
5
|
+
integration?: SharedKycIntegration;
|
|
6
|
+
userId?: string | null;
|
|
7
|
+
fallbackErrorMessage: string;
|
|
8
|
+
}
|
|
9
|
+
export interface UseSharedKycFlowResult {
|
|
10
|
+
activeVenue: KycVenue | null;
|
|
11
|
+
errorMessage?: string;
|
|
12
|
+
isModalOpen: boolean;
|
|
13
|
+
modalState: SharedKycModalState;
|
|
14
|
+
closeModal: () => void;
|
|
15
|
+
openForVenue: (venue: KycVenue) => void;
|
|
16
|
+
startVerification: () => Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export declare const useSharedKycFlow: ({ integration, userId, fallbackErrorMessage, }: UseSharedKycFlowOptions) => UseSharedKycFlowResult;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SharedKycModalState } from "./shared-kyc-modal";
|
|
2
|
+
import type { SharedKycIntegration, SharedKycInitiationRequest } from "./shared-kyc";
|
|
3
|
+
type KycVenue = SharedKycInitiationRequest["venue"];
|
|
4
|
+
interface UseSharedKycFlowOptions {
|
|
5
|
+
integration?: SharedKycIntegration;
|
|
6
|
+
userId?: string | null;
|
|
7
|
+
fallbackErrorMessage: string;
|
|
8
|
+
}
|
|
9
|
+
export interface UseSharedKycFlowResult {
|
|
10
|
+
activeVenue: KycVenue | null;
|
|
11
|
+
errorMessage?: string;
|
|
12
|
+
isModalOpen: boolean;
|
|
13
|
+
modalState: SharedKycModalState;
|
|
14
|
+
closeModal: () => void;
|
|
15
|
+
openForVenue: (venue: KycVenue) => void;
|
|
16
|
+
startVerification: () => Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
export declare const useSharedKycFlow: ({ integration, userId, fallbackErrorMessage, }: UseSharedKycFlowOptions) => UseSharedKycFlowResult;
|
|
19
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from "../deposit";
|
|
2
2
|
export * from "../withdraw";
|
|
3
3
|
export * from "../onboarding";
|
|
4
|
+
export * from "../paper-trading";
|
|
4
5
|
export * from "../profile";
|
|
5
6
|
export * from "../geo-block-modal";
|
|
6
7
|
export * from "../geo-block-banner";
|
|
8
|
+
export * from "../kyc/shared-kyc-modal";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from "../deposit";
|
|
2
2
|
export * from "../withdraw";
|
|
3
3
|
export * from "../onboarding";
|
|
4
|
+
export * from "../paper-trading";
|
|
4
5
|
export * from "../profile";
|
|
5
6
|
export * from "../geo-block-modal";
|
|
6
7
|
export * from "../geo-block-banner";
|
|
8
|
+
export * from "../kyc/shared-kyc-modal";
|
|
@@ -22,8 +22,9 @@ type EventMarketPageMobileTradeProps = {
|
|
|
22
22
|
onOpenChange: (nextOpen: boolean) => void;
|
|
23
23
|
midpointsResult?: UseMidpointsResult;
|
|
24
24
|
onBeforePrimaryAction?: EventMarketPageProps["onBeforePrimaryAction"];
|
|
25
|
+
sharedKyc?: EventMarketPageProps["sharedKyc"];
|
|
25
26
|
};
|
|
26
|
-
export declare const EventMarketPageMobileTrade: ({ classNames, eventTradingState, executionMode, showPlaceOrder, isOpen, onOpenChange, midpointsResult, onBeforePrimaryAction, }: EventMarketPageMobileTradeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export declare const EventMarketPageMobileTrade: ({ classNames, eventTradingState, executionMode, showPlaceOrder, isOpen, onOpenChange, midpointsResult, onBeforePrimaryAction, sharedKyc, }: EventMarketPageMobileTradeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
28
|
export declare const EventMarketPageUnavailableState: ({ ariaLabel: _ariaLabel, }: Pick<EventMarketPageProps, "ariaLabel">) => JSX.Element;
|
|
28
29
|
export declare const EventMarketPageNotFoundState: ({ ariaLabel: _ariaLabel, }: Pick<EventMarketPageProps, "ariaLabel">) => JSX.Element;
|
|
29
30
|
export declare const EventMarketPageLoadingState: ({ classNames, stickyOrderPanel, }: Pick<EventMarketPageProps, "classNames" | "stickyOrderPanel">) => JSX.Element;
|
|
@@ -22,8 +22,9 @@ type EventMarketPageMobileTradeProps = {
|
|
|
22
22
|
onOpenChange: (nextOpen: boolean) => void;
|
|
23
23
|
midpointsResult?: UseMidpointsResult;
|
|
24
24
|
onBeforePrimaryAction?: EventMarketPageProps["onBeforePrimaryAction"];
|
|
25
|
+
sharedKyc?: EventMarketPageProps["sharedKyc"];
|
|
25
26
|
};
|
|
26
|
-
export declare const EventMarketPageMobileTrade: ({ classNames, eventTradingState, executionMode, showPlaceOrder, isOpen, onOpenChange, midpointsResult, onBeforePrimaryAction, }: EventMarketPageMobileTradeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export declare const EventMarketPageMobileTrade: ({ classNames, eventTradingState, executionMode, showPlaceOrder, isOpen, onOpenChange, midpointsResult, onBeforePrimaryAction, sharedKyc, }: EventMarketPageMobileTradeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
28
|
export declare const EventMarketPageUnavailableState: ({ ariaLabel: _ariaLabel, }: Pick<EventMarketPageProps, "ariaLabel">) => JSX.Element;
|
|
28
29
|
export declare const EventMarketPageNotFoundState: ({ ariaLabel: _ariaLabel, }: Pick<EventMarketPageProps, "ariaLabel">) => JSX.Element;
|
|
29
30
|
export declare const EventMarketPageLoadingState: ({ classNames, stickyOrderPanel, }: Pick<EventMarketPageProps, "classNames" | "stickyOrderPanel">) => JSX.Element;
|
|
@@ -51,6 +51,8 @@ export type EventMarketPageBaseProps = {
|
|
|
51
51
|
* `false` to cancel or throw to abort. See `PlaceOrderProps.onBeforePrimaryAction`.
|
|
52
52
|
*/
|
|
53
53
|
onBeforePrimaryAction?: PlaceOrderProps["onBeforePrimaryAction"];
|
|
54
|
+
/** Optional backend-authoritative shared KYC integration for the Place Order surface. */
|
|
55
|
+
sharedKyc?: PlaceOrderProps["sharedKyc"];
|
|
54
56
|
executionMode?: "live" | "paper";
|
|
55
57
|
/** Optional resolved-event claim summary shown inside the read-only order panel. */
|
|
56
58
|
resolvedClaim?: PlaceOrderResolvedClaimSummary;
|
|
@@ -51,6 +51,8 @@ export type EventMarketPageBaseProps = {
|
|
|
51
51
|
* `false` to cancel or throw to abort. See `PlaceOrderProps.onBeforePrimaryAction`.
|
|
52
52
|
*/
|
|
53
53
|
onBeforePrimaryAction?: PlaceOrderProps["onBeforePrimaryAction"];
|
|
54
|
+
/** Optional backend-authoritative shared KYC integration for the Place Order surface. */
|
|
55
|
+
sharedKyc?: PlaceOrderProps["sharedKyc"];
|
|
54
56
|
executionMode?: "live" | "paper";
|
|
55
57
|
/** Optional resolved-event claim summary shown inside the read-only order panel. */
|
|
56
58
|
resolvedClaim?: PlaceOrderResolvedClaimSummary;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { VenueEventWithMarkets } from "../../events/item/event-list-item.types";
|
|
2
2
|
import type { EventMarketPageProps } from "./event-market.types";
|
|
3
3
|
export declare const SportsEventMarketPage: {
|
|
4
|
-
({ event, defaultMarketId, defaultOutcomeId, classNames, ariaLabel, showPlaceOrder, executionMode, stickyOrderPanel, resolvedClaim, onBeforePrimaryAction, }: Extract<EventMarketPageProps, {
|
|
4
|
+
({ event, defaultMarketId, defaultOutcomeId, classNames, ariaLabel, showPlaceOrder, executionMode, stickyOrderPanel, resolvedClaim, onBeforePrimaryAction, sharedKyc, }: Extract<EventMarketPageProps, {
|
|
5
5
|
event: VenueEventWithMarkets;
|
|
6
6
|
}>): JSX.Element;
|
|
7
7
|
displayName: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { VenueEventWithMarkets } from "../../events/item/event-list-item.types";
|
|
2
2
|
import type { EventMarketPageProps } from "./event-market.types";
|
|
3
3
|
export declare const SportsEventMarketPage: {
|
|
4
|
-
({ event, defaultMarketId, defaultOutcomeId, classNames, ariaLabel, showPlaceOrder, executionMode, stickyOrderPanel, resolvedClaim, onBeforePrimaryAction, }: Extract<EventMarketPageProps, {
|
|
4
|
+
({ event, defaultMarketId, defaultOutcomeId, classNames, ariaLabel, showPlaceOrder, executionMode, stickyOrderPanel, resolvedClaim, onBeforePrimaryAction, sharedKyc, }: Extract<EventMarketPageProps, {
|
|
5
5
|
event: VenueEventWithMarkets;
|
|
6
6
|
}>): JSX.Element;
|
|
7
7
|
displayName: string;
|
|
@@ -5,9 +5,25 @@ type PositionsValueCardProps = {
|
|
|
5
5
|
isLoading?: boolean;
|
|
6
6
|
className?: string;
|
|
7
7
|
icon?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Small uppercase note sitting to the right of the value, baseline-aligned
|
|
10
|
+
* with it (Figma node 4772:31141). Optional — most cards have none.
|
|
11
|
+
*/
|
|
12
|
+
caption?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Tighter mobile padding and a single-line label, per the paper profile
|
|
15
|
+
* frames (Figma 4772:33662 / 4772:31126).
|
|
16
|
+
*
|
|
17
|
+
* Opt-in rather than the default: these cards also render on the live
|
|
18
|
+
* profile, where the wider column means labels have room to wrap and the
|
|
19
|
+
* 20px padding is what every partner already sees. Turning it on globally
|
|
20
|
+
* would resize live cards and make a long or localized label overflow
|
|
21
|
+
* instead of wrapping.
|
|
22
|
+
*/
|
|
23
|
+
compact?: boolean;
|
|
8
24
|
};
|
|
9
25
|
export declare const PositionsValueCard: {
|
|
10
|
-
({ label, valueLabel, isLoading, className, icon, }: PositionsValueCardProps): JSX.Element;
|
|
26
|
+
({ label, valueLabel, isLoading, className, icon, caption, compact, }: PositionsValueCardProps): JSX.Element;
|
|
11
27
|
displayName: string;
|
|
12
28
|
};
|
|
13
29
|
export {};
|
|
@@ -5,9 +5,25 @@ type PositionsValueCardProps = {
|
|
|
5
5
|
isLoading?: boolean;
|
|
6
6
|
className?: string;
|
|
7
7
|
icon?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Small uppercase note sitting to the right of the value, baseline-aligned
|
|
10
|
+
* with it (Figma node 4772:31141). Optional — most cards have none.
|
|
11
|
+
*/
|
|
12
|
+
caption?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Tighter mobile padding and a single-line label, per the paper profile
|
|
15
|
+
* frames (Figma 4772:33662 / 4772:31126).
|
|
16
|
+
*
|
|
17
|
+
* Opt-in rather than the default: these cards also render on the live
|
|
18
|
+
* profile, where the wider column means labels have room to wrap and the
|
|
19
|
+
* 20px padding is what every partner already sees. Turning it on globally
|
|
20
|
+
* would resize live cards and make a long or localized label overflow
|
|
21
|
+
* instead of wrapping.
|
|
22
|
+
*/
|
|
23
|
+
compact?: boolean;
|
|
8
24
|
};
|
|
9
25
|
export declare const PositionsValueCard: {
|
|
10
|
-
({ label, valueLabel, isLoading, className, icon, }: PositionsValueCardProps): JSX.Element;
|
|
26
|
+
({ label, valueLabel, isLoading, className, icon, caption, compact, }: PositionsValueCardProps): JSX.Element;
|
|
11
27
|
displayName: string;
|
|
12
28
|
};
|
|
13
29
|
export {};
|
|
@@ -6,10 +6,20 @@ type UserInfoCardProps = {
|
|
|
6
6
|
onWithdraw?: () => void;
|
|
7
7
|
/** Whether deposits are blocked for the user's geo location. */
|
|
8
8
|
isDepositBlocked?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Keep the actions row when there are no money actions, so it still holds
|
|
11
|
+
* the mobile Edit button. Set by a paper profile, which supplies no
|
|
12
|
+
* deposit/withdraw handler and would otherwise lose the only way to edit a
|
|
13
|
+
* profile on mobile.
|
|
14
|
+
*
|
|
15
|
+
* Opt-in so a live partner that wires `onEditProfile` but no money handlers
|
|
16
|
+
* keeps rendering no row at all, exactly as it does today.
|
|
17
|
+
*/
|
|
18
|
+
showEditOnlyActions?: boolean;
|
|
9
19
|
className?: string;
|
|
10
20
|
};
|
|
11
21
|
export declare const UserInfoCard: {
|
|
12
|
-
({ user, onEditProfile, onDeposit, onWithdraw, isDepositBlocked, className, }: UserInfoCardProps): JSX.Element;
|
|
22
|
+
({ user, onEditProfile, onDeposit, onWithdraw, isDepositBlocked, showEditOnlyActions, className, }: UserInfoCardProps): JSX.Element;
|
|
13
23
|
displayName: string;
|
|
14
24
|
};
|
|
15
25
|
export {};
|
|
@@ -6,10 +6,20 @@ type UserInfoCardProps = {
|
|
|
6
6
|
onWithdraw?: () => void;
|
|
7
7
|
/** Whether deposits are blocked for the user's geo location. */
|
|
8
8
|
isDepositBlocked?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Keep the actions row when there are no money actions, so it still holds
|
|
11
|
+
* the mobile Edit button. Set by a paper profile, which supplies no
|
|
12
|
+
* deposit/withdraw handler and would otherwise lose the only way to edit a
|
|
13
|
+
* profile on mobile.
|
|
14
|
+
*
|
|
15
|
+
* Opt-in so a live partner that wires `onEditProfile` but no money handlers
|
|
16
|
+
* keeps rendering no row at all, exactly as it does today.
|
|
17
|
+
*/
|
|
18
|
+
showEditOnlyActions?: boolean;
|
|
9
19
|
className?: string;
|
|
10
20
|
};
|
|
11
21
|
export declare const UserInfoCard: {
|
|
12
|
-
({ user, onEditProfile, onDeposit, onWithdraw, isDepositBlocked, className, }: UserInfoCardProps): JSX.Element;
|
|
22
|
+
({ user, onEditProfile, onDeposit, onWithdraw, isDepositBlocked, showEditOnlyActions, className, }: UserInfoCardProps): JSX.Element;
|
|
13
23
|
displayName: string;
|
|
14
24
|
};
|
|
15
25
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { PaperTradingBadge } from "./paper-trading-badge";
|
|
2
|
+
export type { PaperTradingBadgeClassNames, PaperTradingBadgeProps } from "./paper-trading-badge";
|
|
3
|
+
export { PaperTradingOnboarding } from "./paper-trading-onboarding";
|
|
4
|
+
export type { PaperTradingOnboardingProps } from "./paper-trading-onboarding";
|
|
5
|
+
export { PaperOnboardingModal } from "./paper-onboarding-modal";
|
|
6
|
+
export type { PaperOnboardingModalClassNames, PaperOnboardingModalProps, PaperOnboardingStep, PaperOnboardingStepKey, } from "./paper-onboarding-modal.types";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { PaperTradingBadge } from "./paper-trading-badge";
|
|
2
|
+
export type { PaperTradingBadgeClassNames, PaperTradingBadgeProps } from "./paper-trading-badge";
|
|
3
|
+
export { PaperTradingOnboarding } from "./paper-trading-onboarding";
|
|
4
|
+
export type { PaperTradingOnboardingProps } from "./paper-trading-onboarding";
|
|
5
|
+
export { PaperOnboardingModal } from "./paper-onboarding-modal";
|
|
6
|
+
export type { PaperOnboardingModalClassNames, PaperOnboardingModalProps, PaperOnboardingStep, PaperOnboardingStepKey, } from "./paper-onboarding-modal.types";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PaperOnboardingModalProps } from "./paper-onboarding-modal.types";
|
|
2
|
+
/**
|
|
3
|
+
* Three-step intro shown once, on a user's first sign-in to a paper app.
|
|
4
|
+
*
|
|
5
|
+
* Figma node 4772:31182 lays the three states out side by side; this is one
|
|
6
|
+
* modal that advances through them, not three modals.
|
|
7
|
+
*
|
|
8
|
+
* All copy resolves through `labels.paperTrading.onboarding` — the design's
|
|
9
|
+
* strings were written against an earlier daily-allowance model and are still
|
|
10
|
+
* being revised, so nothing here renders a literal.
|
|
11
|
+
*/
|
|
12
|
+
export declare const PaperOnboardingModal: {
|
|
13
|
+
({ open, onDismiss, startingBalanceLabel, classNames, }: PaperOnboardingModalProps): JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PaperOnboardingModalProps } from "./paper-onboarding-modal.types";
|
|
2
|
+
/**
|
|
3
|
+
* Three-step intro shown once, on a user's first sign-in to a paper app.
|
|
4
|
+
*
|
|
5
|
+
* Figma node 4772:31182 lays the three states out side by side; this is one
|
|
6
|
+
* modal that advances through them, not three modals.
|
|
7
|
+
*
|
|
8
|
+
* All copy resolves through `labels.paperTrading.onboarding` — the design's
|
|
9
|
+
* strings were written against an earlier daily-allowance model and are still
|
|
10
|
+
* being revised, so nothing here renders a literal.
|
|
11
|
+
*/
|
|
12
|
+
export declare const PaperOnboardingModal: {
|
|
13
|
+
({ open, onDismiss, startingBalanceLabel, classNames, }: PaperOnboardingModalProps): JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { IconName } from "../primitives/icon";
|
|
2
|
+
export type PaperOnboardingStepKey = "realMarkets" | "zeroRisk" | "readyToTrade";
|
|
3
|
+
export type PaperOnboardingStep = {
|
|
4
|
+
key: PaperOnboardingStepKey;
|
|
5
|
+
icon: IconName;
|
|
6
|
+
title: string;
|
|
7
|
+
body: string;
|
|
8
|
+
};
|
|
9
|
+
export type PaperOnboardingModalClassNames = {
|
|
10
|
+
overlay?: string;
|
|
11
|
+
card?: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
eyebrow?: string;
|
|
14
|
+
title?: string;
|
|
15
|
+
body?: string;
|
|
16
|
+
dots?: string;
|
|
17
|
+
footer?: string;
|
|
18
|
+
};
|
|
19
|
+
export type PaperOnboardingModalProps = {
|
|
20
|
+
/** Controls visibility. Drive this from `usePaperOnboarding().isOpen`. */
|
|
21
|
+
open: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Called when the user finishes, skips, or closes the intro. Wire it to
|
|
24
|
+
* `usePaperOnboarding().dismiss` so the intro does not return next session.
|
|
25
|
+
*/
|
|
26
|
+
onDismiss: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* One-time paper grant, pre-formatted (e.g. "$10,000"). Interpolated into
|
|
29
|
+
* the step 2 body so the figure is never hardcoded in copy.
|
|
30
|
+
*/
|
|
31
|
+
startingBalanceLabel: string;
|
|
32
|
+
classNames?: PaperOnboardingModalClassNames;
|
|
33
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { IconName } from "../primitives/icon";
|
|
2
|
+
export type PaperOnboardingStepKey = "realMarkets" | "zeroRisk" | "readyToTrade";
|
|
3
|
+
export type PaperOnboardingStep = {
|
|
4
|
+
key: PaperOnboardingStepKey;
|
|
5
|
+
icon: IconName;
|
|
6
|
+
title: string;
|
|
7
|
+
body: string;
|
|
8
|
+
};
|
|
9
|
+
export type PaperOnboardingModalClassNames = {
|
|
10
|
+
overlay?: string;
|
|
11
|
+
card?: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
eyebrow?: string;
|
|
14
|
+
title?: string;
|
|
15
|
+
body?: string;
|
|
16
|
+
dots?: string;
|
|
17
|
+
footer?: string;
|
|
18
|
+
};
|
|
19
|
+
export type PaperOnboardingModalProps = {
|
|
20
|
+
/** Controls visibility. Drive this from `usePaperOnboarding().isOpen`. */
|
|
21
|
+
open: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Called when the user finishes, skips, or closes the intro. Wire it to
|
|
24
|
+
* `usePaperOnboarding().dismiss` so the intro does not return next session.
|
|
25
|
+
*/
|
|
26
|
+
onDismiss: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* One-time paper grant, pre-formatted (e.g. "$10,000"). Interpolated into
|
|
29
|
+
* the step 2 body so the figure is never hardcoded in copy.
|
|
30
|
+
*/
|
|
31
|
+
startingBalanceLabel: string;
|
|
32
|
+
classNames?: PaperOnboardingModalClassNames;
|
|
33
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export type PaperTradingBadgeClassNames = {
|
|
2
|
+
root?: string;
|
|
3
|
+
pill?: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Where this instance is mounted. Three exist, each hiding itself wherever
|
|
8
|
+
* another is the right host, so exactly one is ever on screen:
|
|
9
|
+
*
|
|
10
|
+
* - `brand` — beside the logo. Mobile only, at any auth state (Figma
|
|
11
|
+
* 4772:34179).
|
|
12
|
+
* - `chip` — inside the connect button's balance chip, which itself only
|
|
13
|
+
* renders from `md` up and only once signed in (Figma 4772:31076).
|
|
14
|
+
* - `signedOut` — beside the sign-in control on desktop, where there is no
|
|
15
|
+
* chip yet. Desktop only; mobile is already covered by `brand`.
|
|
16
|
+
*/
|
|
17
|
+
export type PaperTradingBadgePlacement = "brand" | "chip" | "signedOut";
|
|
18
|
+
export type PaperTradingBadgeProps = {
|
|
19
|
+
placement?: PaperTradingBadgePlacement;
|
|
20
|
+
/**
|
|
21
|
+
* Whether a user is signed in. Passed down rather than read from a hook so
|
|
22
|
+
* this stays a pure presentational component that renders outside the
|
|
23
|
+
* provider stack — the same contract `AuthConnectButtonView` follows.
|
|
24
|
+
* Only the `brand` placement uses it; see the note in the component.
|
|
25
|
+
*/
|
|
26
|
+
isAuthenticated?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Render even when the app is not in paper mode. Off by default so the
|
|
29
|
+
* pill can be mounted unconditionally in a partner's header — it simply
|
|
30
|
+
* disappears in a live app. Used by Storybook.
|
|
31
|
+
*/
|
|
32
|
+
forceVisible?: boolean;
|
|
33
|
+
classNames?: PaperTradingBadgeClassNames;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Header pill marking the whole app as simulated, with an explanatory tooltip.
|
|
37
|
+
*
|
|
38
|
+
* Figma node 4772:31077 — 10px bold uppercase in the app's primary colour on a
|
|
39
|
+
* 10%-alpha primary fill, 12/4 padding, fully rounded. Rendered directly
|
|
40
|
+
* rather than through the `Badge` primitive because Badge imposes its own
|
|
41
|
+
* type scale and padding, which do not match this spec.
|
|
42
|
+
*
|
|
43
|
+
* Renders nothing until the app mode has resolved from `/app/config` —
|
|
44
|
+
* flashing "PAPER TRADING" over a real-money app, even briefly, is the one
|
|
45
|
+
* mistake here that would genuinely mislead someone about their funds.
|
|
46
|
+
*/
|
|
47
|
+
export declare const PaperTradingBadge: {
|
|
48
|
+
({ placement, isAuthenticated, forceVisible, classNames, }: PaperTradingBadgeProps): JSX.Element | null;
|
|
49
|
+
displayName: string;
|
|
50
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export type PaperTradingBadgeClassNames = {
|
|
2
|
+
root?: string;
|
|
3
|
+
pill?: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Where this instance is mounted. Three exist, each hiding itself wherever
|
|
8
|
+
* another is the right host, so exactly one is ever on screen:
|
|
9
|
+
*
|
|
10
|
+
* - `brand` — beside the logo. Mobile only, at any auth state (Figma
|
|
11
|
+
* 4772:34179).
|
|
12
|
+
* - `chip` — inside the connect button's balance chip, which itself only
|
|
13
|
+
* renders from `md` up and only once signed in (Figma 4772:31076).
|
|
14
|
+
* - `signedOut` — beside the sign-in control on desktop, where there is no
|
|
15
|
+
* chip yet. Desktop only; mobile is already covered by `brand`.
|
|
16
|
+
*/
|
|
17
|
+
export type PaperTradingBadgePlacement = "brand" | "chip" | "signedOut";
|
|
18
|
+
export type PaperTradingBadgeProps = {
|
|
19
|
+
placement?: PaperTradingBadgePlacement;
|
|
20
|
+
/**
|
|
21
|
+
* Whether a user is signed in. Passed down rather than read from a hook so
|
|
22
|
+
* this stays a pure presentational component that renders outside the
|
|
23
|
+
* provider stack — the same contract `AuthConnectButtonView` follows.
|
|
24
|
+
* Only the `brand` placement uses it; see the note in the component.
|
|
25
|
+
*/
|
|
26
|
+
isAuthenticated?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Render even when the app is not in paper mode. Off by default so the
|
|
29
|
+
* pill can be mounted unconditionally in a partner's header — it simply
|
|
30
|
+
* disappears in a live app. Used by Storybook.
|
|
31
|
+
*/
|
|
32
|
+
forceVisible?: boolean;
|
|
33
|
+
classNames?: PaperTradingBadgeClassNames;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Header pill marking the whole app as simulated, with an explanatory tooltip.
|
|
37
|
+
*
|
|
38
|
+
* Figma node 4772:31077 — 10px bold uppercase in the app's primary colour on a
|
|
39
|
+
* 10%-alpha primary fill, 12/4 padding, fully rounded. Rendered directly
|
|
40
|
+
* rather than through the `Badge` primitive because Badge imposes its own
|
|
41
|
+
* type scale and padding, which do not match this spec.
|
|
42
|
+
*
|
|
43
|
+
* Renders nothing until the app mode has resolved from `/app/config` —
|
|
44
|
+
* flashing "PAPER TRADING" over a real-money app, even briefly, is the one
|
|
45
|
+
* mistake here that would genuinely mislead someone about their funds.
|
|
46
|
+
*/
|
|
47
|
+
export declare const PaperTradingBadge: {
|
|
48
|
+
({ placement, isAuthenticated, forceVisible, classNames, }: PaperTradingBadgeProps): JSX.Element | null;
|
|
49
|
+
displayName: string;
|
|
50
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PaperOnboardingModalClassNames } from "./paper-onboarding-modal.types";
|
|
2
|
+
export type PaperTradingOnboardingProps = {
|
|
3
|
+
classNames?: PaperOnboardingModalClassNames;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Drop-in paper-trading intro. Renders nothing in a live app, and nothing for
|
|
7
|
+
* a user who has already seen it — mount it once, high in the tree, and forget
|
|
8
|
+
* about it.
|
|
9
|
+
*
|
|
10
|
+
* Pairs `usePaperOnboarding` (when to show) with `PaperOnboardingModal` (what
|
|
11
|
+
* to show). Use the modal directly if you need to drive visibility yourself.
|
|
12
|
+
*/
|
|
13
|
+
export declare const PaperTradingOnboarding: {
|
|
14
|
+
({ classNames, }: PaperTradingOnboardingProps): JSX.Element | null;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|