@agg-build/ui 4.22.5 → 4.23.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-JGLBF5WY.mjs → chunk-5ET2M3XX.mjs} +2 -2
- package/dist/{chunk-CKHECAKV.mjs → chunk-7ORC3TUJ.mjs} +398 -239
- package/dist/{chunk-LIB6TLLV.mjs → chunk-H54RU7NF.mjs} +1 -1
- package/dist/{chunk-NV6WT3TN.mjs → chunk-HZXHDH6G.mjs} +153 -45
- package/dist/{chunk-EPP5DTCF.mjs → chunk-J75RLLP2.mjs} +63 -66
- package/dist/{chunk-LTFRGJPL.mjs → chunk-JR2XAAK6.mjs} +3 -2
- package/dist/{chunk-UXLC3FFY.mjs → chunk-W2LCFCW3.mjs} +1 -1
- package/dist/{event-market-Q3XA3WIH.mjs → event-market-IYPFVSSX.mjs} +4 -4
- package/dist/events.js +3 -2
- package/dist/events.mjs +2 -2
- package/dist/index.js +2673 -2396
- package/dist/index.mjs +9 -7
- package/dist/modals.js +512 -352
- package/dist/modals.mjs +4 -2
- package/dist/pages.js +2213 -1938
- package/dist/pages.mjs +6 -6
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +1139 -874
- package/dist/trading.mjs +2 -2
- package/dist/types/onboarding/index.d.mts +1 -0
- package/dist/types/onboarding/index.d.ts +1 -0
- package/dist/types/onboarding/steps/connect-novig-modal.d.mts +12 -0
- package/dist/types/onboarding/steps/connect-novig-modal.d.ts +12 -0
- package/dist/types/pages/user-profile/components/available-balance-card.d.mts +1 -2
- package/dist/types/pages/user-profile/components/available-balance-card.d.ts +1 -2
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +7 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +7 -0
- package/package.json +3 -3
package/dist/trading.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
useClaimWinnings,
|
|
15
15
|
useResolvedMarketClaim,
|
|
16
16
|
venueRequiresSharedKyc
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HZXHDH6G.mjs";
|
|
18
18
|
import {
|
|
19
19
|
SETTLEMENT_SECTION_ID,
|
|
20
20
|
Settlement,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
resolveDifferenceIconClassName,
|
|
34
34
|
useEventTradingContext
|
|
35
35
|
} from "./chunk-WOCZ4TVT.mjs";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-7ORC3TUJ.mjs";
|
|
37
37
|
import "./chunk-XZVGHKMW.mjs";
|
|
38
38
|
export {
|
|
39
39
|
FundKalshiModal,
|
|
@@ -10,3 +10,4 @@ export declare const OnboardingModal: {
|
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
export { ConnectProphetxModal, type ConnectProphetxModalProps, } from "./steps/connect-prophetx-modal";
|
|
13
|
+
export { ConnectNovigModal, type ConnectNovigModalProps } from "./steps/connect-novig-modal";
|
|
@@ -10,3 +10,4 @@ export declare const OnboardingModal: {
|
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
export { ConnectProphetxModal, type ConnectProphetxModalProps, } from "./steps/connect-prophetx-modal";
|
|
13
|
+
export { ConnectNovigModal, type ConnectNovigModalProps } from "./steps/connect-novig-modal";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ConnectNovigModalProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
/** Allows managing a previously linked account after the org changes modes. */
|
|
4
|
+
allowExistingConnection?: boolean;
|
|
5
|
+
onOpenChange: (open: boolean) => void;
|
|
6
|
+
onDisconnect?: () => Promise<void>;
|
|
7
|
+
onVerify: (credentials: {
|
|
8
|
+
keyId: string;
|
|
9
|
+
privateKey: string;
|
|
10
|
+
}) => Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare function ConnectNovigModal({ open, onOpenChange, onVerify, onDisconnect, allowExistingConnection, }: ConnectNovigModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ConnectNovigModalProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
/** Allows managing a previously linked account after the org changes modes. */
|
|
4
|
+
allowExistingConnection?: boolean;
|
|
5
|
+
onOpenChange: (open: boolean) => void;
|
|
6
|
+
onDisconnect?: () => Promise<void>;
|
|
7
|
+
onVerify: (credentials: {
|
|
8
|
+
keyId: string;
|
|
9
|
+
privateKey: string;
|
|
10
|
+
}) => Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare function ConnectNovigModal({ open, onOpenChange, onVerify, onDisconnect, allowExistingConnection, }: ConnectNovigModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -14,7 +14,6 @@ type AvailableBalanceCardProps = {
|
|
|
14
14
|
reservedValueLabel?: string;
|
|
15
15
|
/** Kalshi cash balance. Kalshi holds funds off-chain, so it gets its own row. */
|
|
16
16
|
kalshiValueLabel?: string;
|
|
17
|
-
betdexValueLabel?: string;
|
|
18
17
|
chains: ChainRow[];
|
|
19
18
|
isLoading?: boolean;
|
|
20
19
|
className?: string;
|
|
@@ -27,7 +26,7 @@ export declare const venueLogosForChain: (chainId: string | number) => VenueLogo
|
|
|
27
26
|
export declare const isVenueBalanceChain: (chainId: string | number) => boolean;
|
|
28
27
|
export declare const chainIconUrl: (label: string, key?: string) => string | undefined;
|
|
29
28
|
export declare const AvailableBalanceCard: {
|
|
30
|
-
({ label, valueLabel, reservedValueLabel, kalshiValueLabel,
|
|
29
|
+
({ label, valueLabel, reservedValueLabel, kalshiValueLabel, chains, isLoading, className, onManage, manageButtonRef, }: AvailableBalanceCardProps): JSX.Element;
|
|
31
30
|
displayName: string;
|
|
32
31
|
};
|
|
33
32
|
export {};
|
|
@@ -14,7 +14,6 @@ type AvailableBalanceCardProps = {
|
|
|
14
14
|
reservedValueLabel?: string;
|
|
15
15
|
/** Kalshi cash balance. Kalshi holds funds off-chain, so it gets its own row. */
|
|
16
16
|
kalshiValueLabel?: string;
|
|
17
|
-
betdexValueLabel?: string;
|
|
18
17
|
chains: ChainRow[];
|
|
19
18
|
isLoading?: boolean;
|
|
20
19
|
className?: string;
|
|
@@ -27,7 +26,7 @@ export declare const venueLogosForChain: (chainId: string | number) => VenueLogo
|
|
|
27
26
|
export declare const isVenueBalanceChain: (chainId: string | number) => boolean;
|
|
28
27
|
export declare const chainIconUrl: (label: string, key?: string) => string | undefined;
|
|
29
28
|
export declare const AvailableBalanceCard: {
|
|
30
|
-
({ label, valueLabel, reservedValueLabel, kalshiValueLabel,
|
|
29
|
+
({ label, valueLabel, reservedValueLabel, kalshiValueLabel, chains, isLoading, className, onManage, manageButtonRef, }: AvailableBalanceCardProps): JSX.Element;
|
|
31
30
|
displayName: string;
|
|
32
31
|
};
|
|
33
32
|
export {};
|
|
@@ -23,6 +23,7 @@ export interface SellablePositionGroup {
|
|
|
23
23
|
venueBreakdown?: {
|
|
24
24
|
venue: string;
|
|
25
25
|
venueMarketId: string;
|
|
26
|
+
venueMarketOutcomeId?: string;
|
|
26
27
|
size: number;
|
|
27
28
|
executionBackend?: "clearinghouse" | "direct";
|
|
28
29
|
}[];
|
|
@@ -35,6 +36,12 @@ export interface SellablePositionGroup {
|
|
|
35
36
|
* Positions sit on ONE venue market of a matched cluster, so the accepted id
|
|
36
37
|
* set spans `matchedVenueMarkets` as well — scoping it to the selected market
|
|
37
38
|
* alone reads a cluster position held on another venue as zero.
|
|
39
|
+
*
|
|
40
|
+
* A held outcome id the selected outcome references (`matchedVenueMarketOutcomes`)
|
|
41
|
+
* counts whatever its label: BETDEX runners are labelled by native id, so a BETDEX
|
|
42
|
+
* Draw held under a "Yes" anchor never matches by label. On those mapped markets a
|
|
43
|
+
* different held id never counts; labels only cover rows without an outcome id
|
|
44
|
+
* or on markets the selected outcome does not map.
|
|
38
45
|
*/
|
|
39
46
|
export declare const resolveSellableSharesByVenue: ({ positions, market, selectedOutcome, }: {
|
|
40
47
|
positions: readonly SellablePositionGroup[];
|
|
@@ -23,6 +23,7 @@ export interface SellablePositionGroup {
|
|
|
23
23
|
venueBreakdown?: {
|
|
24
24
|
venue: string;
|
|
25
25
|
venueMarketId: string;
|
|
26
|
+
venueMarketOutcomeId?: string;
|
|
26
27
|
size: number;
|
|
27
28
|
executionBackend?: "clearinghouse" | "direct";
|
|
28
29
|
}[];
|
|
@@ -35,6 +36,12 @@ export interface SellablePositionGroup {
|
|
|
35
36
|
* Positions sit on ONE venue market of a matched cluster, so the accepted id
|
|
36
37
|
* set spans `matchedVenueMarkets` as well — scoping it to the selected market
|
|
37
38
|
* alone reads a cluster position held on another venue as zero.
|
|
39
|
+
*
|
|
40
|
+
* A held outcome id the selected outcome references (`matchedVenueMarketOutcomes`)
|
|
41
|
+
* counts whatever its label: BETDEX runners are labelled by native id, so a BETDEX
|
|
42
|
+
* Draw held under a "Yes" anchor never matches by label. On those mapped markets a
|
|
43
|
+
* different held id never counts; labels only cover rows without an outcome id
|
|
44
|
+
* or on markets the selected outcome does not map.
|
|
38
45
|
*/
|
|
39
46
|
export declare const resolveSellableSharesByVenue: ({ positions, market, selectedOutcome, }: {
|
|
40
47
|
positions: readonly SellablePositionGroup[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agg-build/ui",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.23.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,8 +100,8 @@
|
|
|
100
100
|
"liveline": "^0.0.7",
|
|
101
101
|
"react": "^18.0.0 || ^19.0.0",
|
|
102
102
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
103
|
-
"@agg-build/hooks": "^4.
|
|
104
|
-
"@agg-build/sdk": "^4.
|
|
103
|
+
"@agg-build/hooks": "^4.23.0",
|
|
104
|
+
"@agg-build/sdk": "^4.23.0"
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
107
|
"@number-flow/react": "^0.6.0",
|