@agg-build/ui 2.4.6 → 2.5.2
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-AHQA3B7D.mjs +947 -0
- package/dist/{chunk-CXSIXL7M.mjs → chunk-AJJ73RM4.mjs} +698 -257
- package/dist/{chunk-TEBAR55W.mjs → chunk-EDQ64EKO.mjs} +339 -1084
- package/dist/{chunk-GWRFSQQK.mjs → chunk-FAU2VOL6.mjs} +1594 -700
- package/dist/{chunk-PTNFXXOV.mjs → chunk-FMYYPNZZ.mjs} +904 -788
- package/dist/{chunk-UH3DUTMG.mjs → chunk-JQKJDSTW.mjs} +1 -1
- package/dist/{chunk-I4X5UNCT.mjs → chunk-XAG432PJ.mjs} +12 -6
- package/dist/events.js +1077 -999
- package/dist/events.mjs +3 -3
- package/dist/index.js +16499 -14884
- package/dist/index.mjs +56 -18
- package/dist/modals.js +1292 -1084
- package/dist/modals.mjs +10 -10
- package/dist/pages.js +4954 -2639
- package/dist/pages.mjs +6 -6
- package/dist/primitives.js +905 -788
- package/dist/primitives.mjs +3 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +3383 -1508
- package/dist/trading.mjs +6 -4
- package/dist/types/auth/connect-button-view/connect-button-view.types.d.mts +2 -0
- package/dist/types/auth/connect-button-view/connect-button-view.types.d.ts +2 -0
- package/dist/types/auth/connect-button-view/index.d.mts +1 -1
- package/dist/types/auth/connect-button-view/index.d.ts +1 -1
- package/dist/types/onboarding/steps/connect-kalshi-modal.d.mts +1 -1
- package/dist/types/onboarding/steps/connect-kalshi-modal.d.ts +1 -1
- package/dist/types/pages/user-profile/components/available-balance-card.d.mts +2 -1
- package/dist/types/pages/user-profile/components/available-balance-card.d.ts +2 -1
- package/dist/types/pages/user-profile/components/open-order-row.d.mts +10 -1
- package/dist/types/pages/user-profile/components/open-order-row.d.ts +10 -1
- package/dist/types/pages/user-profile/components/positions-activity.d.mts +4 -1
- package/dist/types/pages/user-profile/components/positions-activity.d.ts +4 -1
- package/dist/types/pages/user-profile/components/positions-value-card.d.mts +4 -2
- package/dist/types/pages/user-profile/components/positions-value-card.d.ts +4 -2
- package/dist/types/pages/user-profile/index.d.mts +2 -2
- package/dist/types/pages/user-profile/index.d.ts +2 -2
- package/dist/types/pages/user-profile/user-profile.types.d.mts +12 -0
- package/dist/types/pages/user-profile/user-profile.types.d.ts +12 -0
- package/dist/types/primitives/calendar/index.d.mts +8 -0
- package/dist/types/primitives/calendar/index.d.ts +8 -0
- package/dist/types/primitives/icon/registry.d.mts +3 -0
- package/dist/types/primitives/icon/registry.d.ts +3 -0
- package/dist/types/primitives/icon/svg/calendar.d.mts +2 -0
- package/dist/types/primitives/icon/svg/calendar.d.ts +2 -0
- package/dist/types/primitives/icon/svg/minus.d.mts +2 -0
- package/dist/types/primitives/icon/svg/minus.d.ts +2 -0
- package/dist/types/primitives/icon/svg/plus.d.mts +2 -0
- package/dist/types/primitives/icon/svg/plus.d.ts +2 -0
- package/dist/types/primitives/index.d.mts +1 -0
- package/dist/types/primitives/index.d.ts +1 -0
- package/dist/types/profile/index.d.mts +1 -1
- package/dist/types/profile/index.d.ts +1 -1
- package/dist/types/profile/profile-modal.types.d.mts +6 -0
- package/dist/types/profile/profile-modal.types.d.ts +6 -0
- package/dist/types/profile/tabs/trading-access-tab.d.mts +3 -1
- package/dist/types/profile/tabs/trading-access-tab.d.ts +3 -1
- package/dist/types/trading/fund-kalshi-modal.d.mts +8 -0
- package/dist/types/trading/fund-kalshi-modal.d.ts +8 -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 +13 -1
- package/dist/types/trading/place-order/index.place-order.types.d.ts +13 -1
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +18 -1
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +18 -1
- package/package.json +7 -4
- package/dist/chunk-JVRTJQPZ.mjs +0 -59
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
UserProfilePage,
|
|
12
12
|
buildAggTxExplorerHref,
|
|
13
13
|
useHomePageModals
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AJJ73RM4.mjs";
|
|
15
15
|
import {
|
|
16
16
|
EventList,
|
|
17
17
|
EventListItem,
|
|
@@ -28,26 +28,21 @@ import {
|
|
|
28
28
|
orderbookRowLimitDefault,
|
|
29
29
|
resolveEventDetailsSyncKey,
|
|
30
30
|
useCenterOrderbookSpread
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-XAG432PJ.mjs";
|
|
32
32
|
import {
|
|
33
33
|
CARD_NETWORK_OPTIONS,
|
|
34
|
-
ConnectAccountsStep,
|
|
35
|
-
ConnectKalshiModal,
|
|
36
|
-
ConnectOnchainModal,
|
|
37
34
|
DepositModal,
|
|
38
35
|
GeoBlockModal,
|
|
39
|
-
HowItWorksStep,
|
|
40
|
-
OnboardingModal,
|
|
41
36
|
ProfileModal,
|
|
42
|
-
ProfileSetupStep,
|
|
43
37
|
WithdrawModal,
|
|
44
38
|
buildTerminalSummary,
|
|
45
39
|
clearPendingCardSession,
|
|
46
40
|
getPendingCardSession
|
|
47
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-EDQ64EKO.mjs";
|
|
48
42
|
import {
|
|
49
43
|
AggNotificationEventsProvider,
|
|
50
44
|
DEPOSIT_MODAL_OPEN_EVENT,
|
|
45
|
+
FundKalshiModal,
|
|
51
46
|
PlaceOrder,
|
|
52
47
|
PlaceOrderFailureView,
|
|
53
48
|
PlaceOrderSuccessView,
|
|
@@ -59,7 +54,7 @@ import {
|
|
|
59
54
|
requestAggWithdrawModalOpen,
|
|
60
55
|
useClaimWinnings,
|
|
61
56
|
useResolvedMarketClaim
|
|
62
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-FAU2VOL6.mjs";
|
|
63
58
|
import {
|
|
64
59
|
SETTLEMENT_SECTION_ID,
|
|
65
60
|
Settlement,
|
|
@@ -80,10 +75,16 @@ import {
|
|
|
80
75
|
resolveOrderBookRows,
|
|
81
76
|
resolveUnifiedOrderBookEntries,
|
|
82
77
|
useEventTradingContext
|
|
83
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-JQKJDSTW.mjs";
|
|
84
79
|
import {
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
ConnectAccountsStep,
|
|
81
|
+
ConnectKalshiModal,
|
|
82
|
+
ConnectOnchainModal,
|
|
83
|
+
GeoBlockBanner,
|
|
84
|
+
HowItWorksStep,
|
|
85
|
+
OnboardingModal,
|
|
86
|
+
ProfileSetupStep
|
|
87
|
+
} from "./chunk-AHQA3B7D.mjs";
|
|
87
88
|
import {
|
|
88
89
|
AGG_DEFAULT_URL,
|
|
89
90
|
AGG_DOCS_URL,
|
|
@@ -108,6 +109,7 @@ import {
|
|
|
108
109
|
BnbIcon,
|
|
109
110
|
BoltIcon,
|
|
110
111
|
Button,
|
|
112
|
+
Calendar,
|
|
111
113
|
Card,
|
|
112
114
|
ChartCandlestickIcon,
|
|
113
115
|
ChartLineIcon,
|
|
@@ -204,7 +206,7 @@ import {
|
|
|
204
206
|
useOptionalToast,
|
|
205
207
|
useToast,
|
|
206
208
|
venueLogoNames
|
|
207
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-FMYYPNZZ.mjs";
|
|
208
210
|
|
|
209
211
|
// src/notifications/agg-toast-provider.tsx
|
|
210
212
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -232,7 +234,15 @@ function AggProvider(_a) {
|
|
|
232
234
|
}
|
|
233
235
|
|
|
234
236
|
// src/auth/connect-button-view/index.tsx
|
|
235
|
-
import {
|
|
237
|
+
import {
|
|
238
|
+
getVenueAvailabilityState,
|
|
239
|
+
optimizedImageUrl,
|
|
240
|
+
useAggAuthContext,
|
|
241
|
+
useAppConfig,
|
|
242
|
+
useLabels,
|
|
243
|
+
useSdkUiConfig
|
|
244
|
+
} from "@agg-build/hooks";
|
|
245
|
+
import { Venue } from "@agg-build/sdk";
|
|
236
246
|
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
|
|
237
247
|
|
|
238
248
|
// src/auth/connect-button-view/connect-button-view.constants.ts
|
|
@@ -585,6 +595,7 @@ var AuthConnectButtonView = ({
|
|
|
585
595
|
profileLabel,
|
|
586
596
|
totalBalance,
|
|
587
597
|
positionsBalance,
|
|
598
|
+
kalshiBalance = null,
|
|
588
599
|
claimReadyCount = 0,
|
|
589
600
|
onClaimWinningsClick,
|
|
590
601
|
walletMethods,
|
|
@@ -592,11 +603,18 @@ var AuthConnectButtonView = ({
|
|
|
592
603
|
}) => {
|
|
593
604
|
var _a;
|
|
594
605
|
const labels = useLabels();
|
|
606
|
+
const { disabledVenues, isLoading: isAppConfigLoading } = useAppConfig();
|
|
607
|
+
const isKalshiAvailable = getVenueAvailabilityState({
|
|
608
|
+
venueId: Venue.kalshi,
|
|
609
|
+
disabledVenues,
|
|
610
|
+
isConfigLoading: isAppConfigLoading
|
|
611
|
+
}) === "available";
|
|
595
612
|
const {
|
|
596
613
|
general: { rootClassName },
|
|
597
614
|
features: { enableAnimations }
|
|
598
615
|
} = useSdkUiConfig();
|
|
599
616
|
const resolvedProfileLabel = profileLabel || labels.auth.myProfile;
|
|
617
|
+
const kalshiBalanceLabel = formatUsd(kalshiBalance != null ? kalshiBalance : 0);
|
|
600
618
|
const authLabelsWithClaim = labels.auth;
|
|
601
619
|
const resolveClaimTooltipLabel = (count) => {
|
|
602
620
|
var _a2, _b;
|
|
@@ -717,7 +735,18 @@ var AuthConnectButtonView = ({
|
|
|
717
735
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
718
736
|
/* @__PURE__ */ jsx3("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx3(Icon, { name: "wallet-filled", size: "small", className: "text-agg-muted-foreground" }) }),
|
|
719
737
|
/* @__PURE__ */ jsx3("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.balanceText), children: isBalanceLoading ? /* @__PURE__ */ jsx3(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
|
|
720
|
-
] })
|
|
738
|
+
] }),
|
|
739
|
+
isKalshiAvailable ? /* @__PURE__ */ jsxs(
|
|
740
|
+
"div",
|
|
741
|
+
{
|
|
742
|
+
className: "flex items-center gap-2",
|
|
743
|
+
"aria-label": `${labels.userProfile.balance.kalshiBalance}: ${kalshiBalanceLabel}`,
|
|
744
|
+
children: [
|
|
745
|
+
/* @__PURE__ */ jsx3(VenueLogo, { venue: Venue.kalshi, size: "small", className: "size-3.5" }),
|
|
746
|
+
/* @__PURE__ */ jsx3("p", { className: "agg-type-label text-agg-foreground", children: kalshiBalanceLabel })
|
|
747
|
+
]
|
|
748
|
+
}
|
|
749
|
+
) : null
|
|
721
750
|
] }),
|
|
722
751
|
/* @__PURE__ */ jsxs(DropdownMenu.Root, { open: isProfileMenuOpen, onOpenChange: onProfileMenuOpenChange, children: [
|
|
723
752
|
/* @__PURE__ */ jsx3(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
@@ -815,7 +844,7 @@ var AuthConnectButtonView = ({
|
|
|
815
844
|
}
|
|
816
845
|
)
|
|
817
846
|
] }),
|
|
818
|
-
/* @__PURE__ */ jsxs("div", { className: "md:hidden
|
|
847
|
+
/* @__PURE__ */ jsxs("div", { className: "md:hidden grid w-full grid-cols-2 items-start gap-5", children: [
|
|
819
848
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
|
|
820
849
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
821
850
|
/* @__PURE__ */ jsx3(
|
|
@@ -843,7 +872,14 @@ var AuthConnectButtonView = ({
|
|
|
843
872
|
/* @__PURE__ */ jsx3("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: "Positions Value" })
|
|
844
873
|
] }),
|
|
845
874
|
/* @__PURE__ */ jsx3("p", { className: "text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground text-left", children: isBalanceLoading ? /* @__PURE__ */ jsx3(LoadingIcon, { size: "small" }) : formatUsd(positionsBalance) })
|
|
846
|
-
] })
|
|
875
|
+
] }),
|
|
876
|
+
isKalshiAvailable ? /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-2", children: [
|
|
877
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
878
|
+
/* @__PURE__ */ jsx3(VenueLogo, { venue: Venue.kalshi, size: "small", className: "size-4" }),
|
|
879
|
+
/* @__PURE__ */ jsx3("span", { className: "truncate text-agg-sm leading-agg-5 text-agg-foreground", children: labels.userProfile.balance.kalshiBalance })
|
|
880
|
+
] }),
|
|
881
|
+
/* @__PURE__ */ jsx3("p", { className: "text-left text-agg-lg font-agg-bold leading-agg-7 text-agg-foreground", children: kalshiBalanceLabel })
|
|
882
|
+
] }) : null
|
|
847
883
|
] })
|
|
848
884
|
]
|
|
849
885
|
}
|
|
@@ -961,6 +997,7 @@ export {
|
|
|
961
997
|
BoltIcon,
|
|
962
998
|
Button,
|
|
963
999
|
CARD_NETWORK_OPTIONS,
|
|
1000
|
+
Calendar,
|
|
964
1001
|
Card,
|
|
965
1002
|
ChartCandlestickIcon,
|
|
966
1003
|
ChartLineIcon,
|
|
@@ -995,6 +1032,7 @@ export {
|
|
|
995
1032
|
EventMarketPage,
|
|
996
1033
|
ExternalLinkIcon,
|
|
997
1034
|
Footer,
|
|
1035
|
+
FundKalshiModal,
|
|
998
1036
|
GeoBlockBanner,
|
|
999
1037
|
GeoBlockModal,
|
|
1000
1038
|
GiftBonusIcon,
|