@agg-build/ui 2.4.3 → 2.4.5
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-GLVLCXIM.mjs → chunk-CXSIXL7M.mjs} +29 -35
- package/dist/{chunk-PHAEFHBM.mjs → chunk-GWRFSQQK.mjs} +70 -17
- package/dist/{chunk-PHRYWSNV.mjs → chunk-I4X5UNCT.mjs} +307 -240
- package/dist/{chunk-3PSIO77N.mjs → chunk-JVRTJQPZ.mjs} +1 -1
- package/dist/{chunk-QDNG5UKJ.mjs → chunk-P5CVJQPW.mjs} +288 -291
- package/dist/{chunk-WZ55ERDO.mjs → chunk-PTNFXXOV.mjs} +50 -11
- package/dist/{chunk-STL4ZHLP.mjs → chunk-UH3DUTMG.mjs} +140 -115
- package/dist/events.js +440 -305
- package/dist/events.mjs +3 -3
- package/dist/index.js +840 -666
- package/dist/index.mjs +7 -7
- package/dist/modals.js +333 -297
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +558 -381
- package/dist/pages.mjs +6 -6
- package/dist/primitives.js +50 -11
- package/dist/primitives.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +2597 -2384
- package/dist/trading.mjs +4 -4
- package/dist/types/events/item-details/event-list-item-details.constants.d.mts +1 -1
- package/dist/types/events/item-details/event-list-item-details.constants.d.ts +1 -1
- package/dist/types/events/item-details/settlement-summary.d.mts +1 -1
- package/dist/types/events/item-details/settlement-summary.d.ts +1 -1
- package/dist/types/onboarding/index.d.mts +1 -1
- package/dist/types/onboarding/index.d.ts +1 -1
- package/dist/types/onboarding/steps/connect-accounts.d.mts +1 -1
- package/dist/types/onboarding/steps/connect-accounts.d.ts +1 -1
- package/dist/types/primitives/icon/icon.constants.d.mts +1 -0
- package/dist/types/primitives/icon/icon.constants.d.ts +1 -0
- package/dist/types/shared/use-horizontal-scroll-state.d.mts +3 -0
- package/dist/types/shared/use-horizontal-scroll-state.d.ts +3 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +1 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +1 -0
- package/dist/types/trading/settlement/index.d.mts +1 -1
- package/dist/types/trading/settlement/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/trading.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
parseVenue,
|
|
9
9
|
useClaimWinnings,
|
|
10
10
|
useResolvedMarketClaim
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GWRFSQQK.mjs";
|
|
12
12
|
import {
|
|
13
13
|
SETTLEMENT_SECTION_ID,
|
|
14
14
|
Settlement,
|
|
@@ -26,9 +26,9 @@ import {
|
|
|
26
26
|
prepareSettlementDifferences,
|
|
27
27
|
resolveDifferenceIconClassName,
|
|
28
28
|
useEventTradingContext
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-UH3DUTMG.mjs";
|
|
30
|
+
import "./chunk-JVRTJQPZ.mjs";
|
|
31
|
+
import "./chunk-PTNFXXOV.mjs";
|
|
32
32
|
export {
|
|
33
33
|
PlaceOrder,
|
|
34
34
|
PlaceOrderFailureView,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ProbabilityMode } from "./event-list-item-details.types";
|
|
2
|
-
export declare const detailsBaseCardClassName = "w-full gap-6 p-5 md:gap-8";
|
|
2
|
+
export declare const detailsBaseCardClassName = "w-full gap-6 p-4 md:p-5 md:gap-8";
|
|
3
3
|
export declare const probabilityModeOrder: ProbabilityMode[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ProbabilityMode } from "./event-list-item-details.types";
|
|
2
|
-
export declare const detailsBaseCardClassName = "w-full gap-6 p-5 md:gap-8";
|
|
2
|
+
export declare const detailsBaseCardClassName = "w-full gap-6 p-4 md:p-5 md:gap-8";
|
|
3
3
|
export declare const probabilityModeOrder: ProbabilityMode[];
|
|
@@ -10,6 +10,6 @@ export type SettlementSummaryProps = {
|
|
|
10
10
|
className?: string;
|
|
11
11
|
};
|
|
12
12
|
export declare const SettlementSummary: {
|
|
13
|
-
({
|
|
13
|
+
({ settlementDiff, settlementSectionId, className, }: SettlementSummaryProps): JSX.Element | null;
|
|
14
14
|
displayName: string;
|
|
15
15
|
};
|
|
@@ -10,6 +10,6 @@ export type SettlementSummaryProps = {
|
|
|
10
10
|
className?: string;
|
|
11
11
|
};
|
|
12
12
|
export declare const SettlementSummary: {
|
|
13
|
-
({
|
|
13
|
+
({ settlementDiff, settlementSectionId, className, }: SettlementSummaryProps): JSX.Element | null;
|
|
14
14
|
displayName: string;
|
|
15
15
|
};
|
|
@@ -6,6 +6,6 @@ export { ConnectAccountsStep } from "./steps/connect-accounts";
|
|
|
6
6
|
export { ConnectKalshiModal } from "./steps/connect-kalshi-modal";
|
|
7
7
|
export { ConnectOnchainModal } from "./steps/connect-onchain-modal";
|
|
8
8
|
export declare const OnboardingModal: {
|
|
9
|
-
({ open, onOpenChange, onProfileSubmit, onConnectOnchain,
|
|
9
|
+
({ open, onOpenChange, onProfileSubmit, onConnectOnchain, onComplete, howItWorksIcons, connectedOnchain, }: OnboardingModalProps): JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
@@ -6,6 +6,6 @@ export { ConnectAccountsStep } from "./steps/connect-accounts";
|
|
|
6
6
|
export { ConnectKalshiModal } from "./steps/connect-kalshi-modal";
|
|
7
7
|
export { ConnectOnchainModal } from "./steps/connect-onchain-modal";
|
|
8
8
|
export declare const OnboardingModal: {
|
|
9
|
-
({ open, onOpenChange, onProfileSubmit, onConnectOnchain,
|
|
9
|
+
({ open, onOpenChange, onProfileSubmit, onConnectOnchain, onComplete, howItWorksIcons, connectedOnchain, }: OnboardingModalProps): JSX.Element;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ConnectAccountsStepProps } from "../onboarding-modal.types";
|
|
2
2
|
export declare const ConnectAccountsStep: {
|
|
3
|
-
({ onConnectOnchain,
|
|
3
|
+
({ onConnectOnchain, onContinue, connectedOnchain, }: ConnectAccountsStepProps): JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ConnectAccountsStepProps } from "../onboarding-modal.types";
|
|
2
2
|
export declare const ConnectAccountsStep: {
|
|
3
|
-
({ onConnectOnchain,
|
|
3
|
+
({ onConnectOnchain, onContinue, connectedOnchain, }: ConnectAccountsStepProps): JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type MutableRefObject } from "react";
|
|
2
2
|
export type UseHorizontalScrollStateResult<T extends HTMLElement = HTMLElement> = {
|
|
3
3
|
containerRef: MutableRefObject<T | null>;
|
|
4
|
+
hasOverflow: boolean;
|
|
5
|
+
isAtStart: boolean;
|
|
6
|
+
isAtEnd: boolean;
|
|
4
7
|
canScrollLeft: boolean;
|
|
5
8
|
canScrollRight: boolean;
|
|
6
9
|
/** Call after content changes that alter overflow without triggering scroll/resize. */
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type MutableRefObject } from "react";
|
|
2
2
|
export type UseHorizontalScrollStateResult<T extends HTMLElement = HTMLElement> = {
|
|
3
3
|
containerRef: MutableRefObject<T | null>;
|
|
4
|
+
hasOverflow: boolean;
|
|
5
|
+
isAtStart: boolean;
|
|
6
|
+
isAtEnd: boolean;
|
|
4
7
|
canScrollLeft: boolean;
|
|
5
8
|
canScrollRight: boolean;
|
|
6
9
|
/** Call after content changes that alter overflow without triggering scroll/resize. */
|
|
@@ -2,6 +2,7 @@ import type { SmartRouteResponse, WsOrderSubmitted } from "@agg-build/sdk";
|
|
|
2
2
|
import { type PlaceOrderOutcome, type PlaceOrderRoutingRow, type PlaceOrderTab, type TradingVenue } from "../types";
|
|
3
3
|
import type { BuildLiveRouteCardsParams, PlaceOrderOutcomeClassNameParams, PlaceOrderExecutionStepGroup, PlaceOrderFailureStep, PlaceOrderFailureSummary, PlaceOrderOutcomeLabelValue, PlaceOrderQuoteResult, PlaceOrderQuoteStatus, PlaceOrderResultTone, PlaceOrderRouteCard, PlaceOrderTerminalOrderEvent, PlaceOrderTradingLabels, PlaceOrderVenueOutcome, ResolvePlaceOrderQuoteResultParams, ResolvePlaceOrderQuoteStatusParams, ResolvePlaceOrderTabKeyParams } from "./index.place-order.types";
|
|
4
4
|
export declare const extractGeoBlockedVenues: (warnings: SmartRouteResponse["warnings"]) => Set<string>;
|
|
5
|
+
export declare const hasLowLiquidityWarning: (warnings: SmartRouteResponse["warnings"]) => boolean;
|
|
5
6
|
/** Pure helpers for PlaceOrder view-model shaping, formatting, and keyboard logic. */
|
|
6
7
|
export declare const getPlaceOrderContainerClassName: () => string;
|
|
7
8
|
export declare const getResultValueClassName: (tone: PlaceOrderResultTone) => string;
|
|
@@ -2,6 +2,7 @@ import type { SmartRouteResponse, WsOrderSubmitted } from "@agg-build/sdk";
|
|
|
2
2
|
import { type PlaceOrderOutcome, type PlaceOrderRoutingRow, type PlaceOrderTab, type TradingVenue } from "../types";
|
|
3
3
|
import type { BuildLiveRouteCardsParams, PlaceOrderOutcomeClassNameParams, PlaceOrderExecutionStepGroup, PlaceOrderFailureStep, PlaceOrderFailureSummary, PlaceOrderOutcomeLabelValue, PlaceOrderQuoteResult, PlaceOrderQuoteStatus, PlaceOrderResultTone, PlaceOrderRouteCard, PlaceOrderTerminalOrderEvent, PlaceOrderTradingLabels, PlaceOrderVenueOutcome, ResolvePlaceOrderQuoteResultParams, ResolvePlaceOrderQuoteStatusParams, ResolvePlaceOrderTabKeyParams } from "./index.place-order.types";
|
|
4
4
|
export declare const extractGeoBlockedVenues: (warnings: SmartRouteResponse["warnings"]) => Set<string>;
|
|
5
|
+
export declare const hasLowLiquidityWarning: (warnings: SmartRouteResponse["warnings"]) => boolean;
|
|
5
6
|
/** Pure helpers for PlaceOrder view-model shaping, formatting, and keyboard logic. */
|
|
6
7
|
export declare const getPlaceOrderContainerClassName: () => string;
|
|
7
8
|
export declare const getResultValueClassName: (tone: PlaceOrderResultTone) => string;
|
|
@@ -27,7 +27,7 @@ export type DisplaySettlementDifference = SettlementDifference & {
|
|
|
27
27
|
export declare const prepareSettlementDifferences: (differences: SettlementDifference[] | undefined) => DisplaySettlementDifference[];
|
|
28
28
|
export declare const resolveDifferenceIconClassName: (canonicalKey: string) => string;
|
|
29
29
|
export declare const Settlement: {
|
|
30
|
-
({ className, id, sectionLabel, question, eventDescription, marketDescription, primaryRules, settlementDiff, settlementVenues, settlementVenueRules, isLoading, }: SettlementProps): JSX.Element;
|
|
30
|
+
({ className, id, sectionLabel, question, eventDescription, marketDescription, primaryRules, settlementDiff, settlementVenues, settlementVenueRules, isLoading, }: SettlementProps): JSX.Element | null;
|
|
31
31
|
displayName: string;
|
|
32
32
|
};
|
|
33
33
|
export {};
|
|
@@ -27,7 +27,7 @@ export type DisplaySettlementDifference = SettlementDifference & {
|
|
|
27
27
|
export declare const prepareSettlementDifferences: (differences: SettlementDifference[] | undefined) => DisplaySettlementDifference[];
|
|
28
28
|
export declare const resolveDifferenceIconClassName: (canonicalKey: string) => string;
|
|
29
29
|
export declare const Settlement: {
|
|
30
|
-
({ className, id, sectionLabel, question, eventDescription, marketDescription, primaryRules, settlementDiff, settlementVenues, settlementVenueRules, isLoading, }: SettlementProps): JSX.Element;
|
|
30
|
+
({ className, id, sectionLabel, question, eventDescription, marketDescription, primaryRules, settlementDiff, settlementVenues, settlementVenueRules, isLoading, }: SettlementProps): JSX.Element | null;
|
|
31
31
|
displayName: string;
|
|
32
32
|
};
|
|
33
33
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agg-build/ui",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.5",
|
|
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.4.4",
|
|
104
104
|
"@agg-build/sdk": "^2.3.0"
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|