@agg-build/ui 2.1.0 → 2.1.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.
Files changed (34) hide show
  1. package/dist/{chunk-Y6PVXAUQ.mjs → chunk-IQT4I5B4.mjs} +387 -250
  2. package/dist/{chunk-R6FBYAY5.mjs → chunk-NK57KMYN.mjs} +2 -2
  3. package/dist/{chunk-YMVD6Q2A.mjs → chunk-RPXRTXCY.mjs} +1 -1
  4. package/dist/{chunk-C5M2OOM3.mjs → chunk-TERG43WW.mjs} +1 -1
  5. package/dist/{chunk-3OI2ZLLT.mjs → chunk-WU2C3C6K.mjs} +1 -1
  6. package/dist/{chunk-YAEA6EDG.mjs → chunk-XHDGSRG7.mjs} +8 -6
  7. package/dist/{chunk-DXF2LMNN.mjs → chunk-YJO6LMRT.mjs} +781 -753
  8. package/dist/events.js +941 -914
  9. package/dist/events.mjs +3 -3
  10. package/dist/index.js +2788 -2621
  11. package/dist/index.mjs +11 -7
  12. package/dist/modals.js +851 -824
  13. package/dist/modals.mjs +3 -3
  14. package/dist/pages.js +1968 -1803
  15. package/dist/pages.mjs +8 -6
  16. package/dist/primitives.js +782 -753
  17. package/dist/primitives.mjs +3 -1
  18. package/dist/styles.css +1 -1
  19. package/dist/tailwind.css +1 -1
  20. package/dist/trading.js +532 -501
  21. package/dist/trading.mjs +4 -4
  22. package/dist/types/pages/user-profile/index.d.mts +1 -0
  23. package/dist/types/pages/user-profile/index.d.ts +1 -0
  24. package/dist/types/pages/user-profile/transaction-explorer.d.mts +1 -0
  25. package/dist/types/pages/user-profile/transaction-explorer.d.ts +1 -0
  26. package/dist/types/pages/user-profile/user-profile.types.d.mts +8 -2
  27. package/dist/types/pages/user-profile/user-profile.types.d.ts +8 -2
  28. package/dist/types/primitives/icon/index.d.mts +2 -1
  29. package/dist/types/primitives/icon/index.d.ts +2 -1
  30. package/dist/types/primitives/icon/registry.d.mts +4 -0
  31. package/dist/types/primitives/icon/registry.d.ts +4 -0
  32. package/dist/types/primitives/icon/svg/paper-mode.d.mts +5 -0
  33. package/dist/types/primitives/icon/svg/paper-mode.d.ts +5 -0
  34. package/package.json +2 -2
package/dist/trading.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  SettlementDetails,
7
7
  parseAmount,
8
8
  parseVenue
9
- } from "./chunk-YAEA6EDG.mjs";
9
+ } from "./chunk-XHDGSRG7.mjs";
10
10
  import {
11
11
  SETTLEMENT_SECTION_ID,
12
12
  Settlement,
@@ -21,9 +21,9 @@ import {
21
21
  getTradingValueLabel,
22
22
  getTradingVenueLabel,
23
23
  useEventTradingContext
24
- } from "./chunk-C5M2OOM3.mjs";
25
- import "./chunk-YMVD6Q2A.mjs";
26
- import "./chunk-DXF2LMNN.mjs";
24
+ } from "./chunk-TERG43WW.mjs";
25
+ import "./chunk-RPXRTXCY.mjs";
26
+ import "./chunk-YJO6LMRT.mjs";
27
27
  export {
28
28
  PlaceOrder,
29
29
  PlaceOrderFailureView,
@@ -2,6 +2,7 @@ import type { UserProfilePageProps } from "./user-profile.types";
2
2
  export type { UserProfileActivity, UserProfileActivityStatus, UserProfileBalance, UserProfileConnectedExchange, UserProfileConnectedWallet, UserProfileInfo, UserProfilePageClassNames, UserProfilePageProps, UserProfilePosition, UserProfilePositionFilter, UserProfilePositionVenueShare, UserProfileSocialLink, UserProfileTransferStatus, UserProfileVenueBalance, } from "./user-profile.types";
3
3
  export { USER_PROFILE_TAB_ACTIVITY, USER_PROFILE_TAB_OPEN_ORDERS, USER_PROFILE_TAB_POSITIONS, } from "./user-profile.constants";
4
4
  export type { UserProfileTabValue } from "./user-profile.constants";
5
+ export { buildAggTxExplorerHref } from "./transaction-explorer";
5
6
  export declare const UserProfilePage: {
6
7
  ({ user, balanceChainsOverride, venueBalances: _venueBalances, balance, activePositions, closedPositions, activities, executionMode, onEditProfile, onDeposit, onWithdraw, openOrders, initialPositionFilter, tab, onTabChange, onPositionClick, getPositionHref, onClaim, claimingPositionKeys, onClaimResult, onClaimSubmitError, onActivityClick, getActivityHref, onOpenOrderClick, onCancelOrder, cancellingOrderIds, isLoadingPositions, isLoadingActivities, isLoadingOpenOrders, positionsError, activitiesError, openOrdersError, hasMoreActivePositions, isLoadingMoreActivePositions, onLoadMoreActivePositions, hasMoreClosedPositions, isLoadingMoreClosedPositions, onLoadMoreClosedPositions, onPositionFilterChange: onPositionFilterChangeProp, hasMoreActivities, isLoadingMoreActivities, onLoadMoreActivities, hasMoreOpenOrders, isLoadingMoreOpenOrders, onLoadMoreOpenOrders, classNames, onError, }: UserProfilePageProps & {
7
8
  onError?: (error: Error) => void;
@@ -2,6 +2,7 @@ import type { UserProfilePageProps } from "./user-profile.types";
2
2
  export type { UserProfileActivity, UserProfileActivityStatus, UserProfileBalance, UserProfileConnectedExchange, UserProfileConnectedWallet, UserProfileInfo, UserProfilePageClassNames, UserProfilePageProps, UserProfilePosition, UserProfilePositionFilter, UserProfilePositionVenueShare, UserProfileSocialLink, UserProfileTransferStatus, UserProfileVenueBalance, } from "./user-profile.types";
3
3
  export { USER_PROFILE_TAB_ACTIVITY, USER_PROFILE_TAB_OPEN_ORDERS, USER_PROFILE_TAB_POSITIONS, } from "./user-profile.constants";
4
4
  export type { UserProfileTabValue } from "./user-profile.constants";
5
+ export { buildAggTxExplorerHref } from "./transaction-explorer";
5
6
  export declare const UserProfilePage: {
6
7
  ({ user, balanceChainsOverride, venueBalances: _venueBalances, balance, activePositions, closedPositions, activities, executionMode, onEditProfile, onDeposit, onWithdraw, openOrders, initialPositionFilter, tab, onTabChange, onPositionClick, getPositionHref, onClaim, claimingPositionKeys, onClaimResult, onClaimSubmitError, onActivityClick, getActivityHref, onOpenOrderClick, onCancelOrder, cancellingOrderIds, isLoadingPositions, isLoadingActivities, isLoadingOpenOrders, positionsError, activitiesError, openOrdersError, hasMoreActivePositions, isLoadingMoreActivePositions, onLoadMoreActivePositions, hasMoreClosedPositions, isLoadingMoreClosedPositions, onLoadMoreClosedPositions, onPositionFilterChange: onPositionFilterChangeProp, hasMoreActivities, isLoadingMoreActivities, onLoadMoreActivities, hasMoreOpenOrders, isLoadingMoreOpenOrders, onLoadMoreOpenOrders, classNames, onError, }: UserProfilePageProps & {
7
8
  onError?: (error: Error) => void;
@@ -0,0 +1 @@
1
+ export declare const buildAggTxExplorerHref: (chainId: string | number | null | undefined, txHash: string | null | undefined) => string | undefined;
@@ -0,0 +1 @@
1
+ export declare const buildAggTxExplorerHref: (chainId: string | number | null | undefined, txHash: string | null | undefined) => string | undefined;
@@ -156,6 +156,10 @@ export interface UserProfileTradeActivity {
156
156
  export interface UserProfileRedeemActivity {
157
157
  kind: "redeem";
158
158
  id: string;
159
+ /** Chain ID used to build an explorer link for the redeem transaction. */
160
+ chainId?: string;
161
+ /** Transaction hash used to build an explorer link for the redeem transaction. */
162
+ txHash?: string;
159
163
  /** Whether the activity failed and should render in a degraded state. */
160
164
  isFailed?: boolean;
161
165
  /** Whether the row should use error-colored text because the activity has an error. */
@@ -191,6 +195,10 @@ export type UserProfileTransferStatus = UserProfileActivityStatus;
191
195
  export interface UserProfileTransferActivity {
192
196
  kind: "withdrawal" | "deposit" | "bridge" | "user_op" | "unknown";
193
197
  id: string;
198
+ /** Chain ID used to build an explorer link for the activity transaction. */
199
+ chainId?: string;
200
+ /** Transaction hash used to build an explorer link for the activity transaction. */
201
+ txHash?: string;
194
202
  /** Whether the activity failed and should render in a degraded state. */
195
203
  isFailed?: boolean;
196
204
  /** Whether the row should use error-colored text because the activity has an error. */
@@ -211,8 +219,6 @@ export interface UserProfileTransferActivity {
211
219
  timeLabel: string;
212
220
  /** Deposit source — determines the icon in the thumbnail square. Only set when kind is "deposit". */
213
221
  depositSource?: "wallet" | "crypto" | "card";
214
- /** Chain ID for chain-aware deposit icons. */
215
- chainId?: string | number;
216
222
  }
217
223
  export type UserProfileActivity = UserProfileTradeActivity | UserProfileRedeemActivity | UserProfileTransferActivity;
218
224
  export interface UserProfileOpenOrder {
@@ -156,6 +156,10 @@ export interface UserProfileTradeActivity {
156
156
  export interface UserProfileRedeemActivity {
157
157
  kind: "redeem";
158
158
  id: string;
159
+ /** Chain ID used to build an explorer link for the redeem transaction. */
160
+ chainId?: string;
161
+ /** Transaction hash used to build an explorer link for the redeem transaction. */
162
+ txHash?: string;
159
163
  /** Whether the activity failed and should render in a degraded state. */
160
164
  isFailed?: boolean;
161
165
  /** Whether the row should use error-colored text because the activity has an error. */
@@ -191,6 +195,10 @@ export type UserProfileTransferStatus = UserProfileActivityStatus;
191
195
  export interface UserProfileTransferActivity {
192
196
  kind: "withdrawal" | "deposit" | "bridge" | "user_op" | "unknown";
193
197
  id: string;
198
+ /** Chain ID used to build an explorer link for the activity transaction. */
199
+ chainId?: string;
200
+ /** Transaction hash used to build an explorer link for the activity transaction. */
201
+ txHash?: string;
194
202
  /** Whether the activity failed and should render in a degraded state. */
195
203
  isFailed?: boolean;
196
204
  /** Whether the row should use error-colored text because the activity has an error. */
@@ -211,8 +219,6 @@ export interface UserProfileTransferActivity {
211
219
  timeLabel: string;
212
220
  /** Deposit source — determines the icon in the thumbnail square. Only set when kind is "deposit". */
213
221
  depositSource?: "wallet" | "crypto" | "card";
214
- /** Chain ID for chain-aware deposit icons. */
215
- chainId?: string | number;
216
222
  }
217
223
  export type UserProfileActivity = UserProfileTradeActivity | UserProfileRedeemActivity | UserProfileTransferActivity;
218
224
  export interface UserProfileOpenOrder {
@@ -38,6 +38,7 @@ import { InfoIcon } from "./svg/info";
38
38
  import { iconNames } from "./registry";
39
39
  import { LinkAccountsIcon } from "./svg/link-accounts";
40
40
  import { LockIcon } from "./svg/lock";
41
+ import { PaperModeIcon } from "./svg/paper-mode";
41
42
  import { PencilIcon } from "./svg/pencil";
42
43
  import { PlaySquareIcon } from "./svg/play-square";
43
44
  import { PolygonIcon } from "./svg/polygon";
@@ -71,4 +72,4 @@ export declare const Icon: {
71
72
  ({ name, color, size, className, style, ...props }: IconProps): JSX.Element | null;
72
73
  displayName: string;
73
74
  };
74
- export { ActivityChartIcon, AppleIcon, AppsIcon, BadgeCheckThinIcon, ArbitrumIcon, ArrowRightIcon, ArrowTrendUpIcon, ArrowsToDotIcon, BankIcon, BaseIcon, BestPricesIcon, BnbIcon, BoltIcon, CheckCircleIcon, ChartCandlestickIcon, ChartLineIcon, CircleOverlapIcon, CircleXmarkIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, CreateAccountIcon, CreditCardIcon, DisconnectIcon, DotsHorizontalIcon, DocumentIcon, DownloadIcon, ErrorFilledIcon, EthereumIcon, ExternalLinkIcon, GiftBonusIcon, GoogleIcon, HourglassStartIcon, iconNames, ImageIcon, InfoIcon, LinkAccountsIcon, LockIcon, PencilIcon, PlaySquareIcon, PolygonIcon, ProfileIcon, RevenueAltIcon, SearchIcon, ShieldTrustIcon, SolanaIcon, SparklesFilledIcon, StayInControlIcon, SuccessCheckIcon, TriangleDownIcon, TriangleUpFilledIcon, TriangleUpIcon, UploadIcon, UserTrustIcon, UsdcIcon, PaperPlaneIcon, WalletAvatarIcon, WalletFilledIcon, WalletIcon, WarningFilledIcon, WarningIcon, };
75
+ export { ActivityChartIcon, AppleIcon, AppsIcon, BadgeCheckThinIcon, ArbitrumIcon, ArrowRightIcon, ArrowTrendUpIcon, ArrowsToDotIcon, BankIcon, BaseIcon, BestPricesIcon, BnbIcon, BoltIcon, CheckCircleIcon, ChartCandlestickIcon, ChartLineIcon, CircleOverlapIcon, CircleXmarkIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, CreateAccountIcon, CreditCardIcon, DisconnectIcon, DotsHorizontalIcon, DocumentIcon, DownloadIcon, ErrorFilledIcon, EthereumIcon, ExternalLinkIcon, GiftBonusIcon, GoogleIcon, HourglassStartIcon, iconNames, ImageIcon, InfoIcon, LinkAccountsIcon, LockIcon, PaperModeIcon, PencilIcon, PlaySquareIcon, PolygonIcon, ProfileIcon, RevenueAltIcon, SearchIcon, ShieldTrustIcon, SolanaIcon, SparklesFilledIcon, StayInControlIcon, SuccessCheckIcon, TriangleDownIcon, TriangleUpFilledIcon, TriangleUpIcon, UploadIcon, UserTrustIcon, UsdcIcon, PaperPlaneIcon, WalletAvatarIcon, WalletFilledIcon, WalletIcon, WarningFilledIcon, WarningIcon, };
@@ -38,6 +38,7 @@ import { InfoIcon } from "./svg/info";
38
38
  import { iconNames } from "./registry";
39
39
  import { LinkAccountsIcon } from "./svg/link-accounts";
40
40
  import { LockIcon } from "./svg/lock";
41
+ import { PaperModeIcon } from "./svg/paper-mode";
41
42
  import { PencilIcon } from "./svg/pencil";
42
43
  import { PlaySquareIcon } from "./svg/play-square";
43
44
  import { PolygonIcon } from "./svg/polygon";
@@ -71,4 +72,4 @@ export declare const Icon: {
71
72
  ({ name, color, size, className, style, ...props }: IconProps): JSX.Element | null;
72
73
  displayName: string;
73
74
  };
74
- export { ActivityChartIcon, AppleIcon, AppsIcon, BadgeCheckThinIcon, ArbitrumIcon, ArrowRightIcon, ArrowTrendUpIcon, ArrowsToDotIcon, BankIcon, BaseIcon, BestPricesIcon, BnbIcon, BoltIcon, CheckCircleIcon, ChartCandlestickIcon, ChartLineIcon, CircleOverlapIcon, CircleXmarkIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, CreateAccountIcon, CreditCardIcon, DisconnectIcon, DotsHorizontalIcon, DocumentIcon, DownloadIcon, ErrorFilledIcon, EthereumIcon, ExternalLinkIcon, GiftBonusIcon, GoogleIcon, HourglassStartIcon, iconNames, ImageIcon, InfoIcon, LinkAccountsIcon, LockIcon, PencilIcon, PlaySquareIcon, PolygonIcon, ProfileIcon, RevenueAltIcon, SearchIcon, ShieldTrustIcon, SolanaIcon, SparklesFilledIcon, StayInControlIcon, SuccessCheckIcon, TriangleDownIcon, TriangleUpFilledIcon, TriangleUpIcon, UploadIcon, UserTrustIcon, UsdcIcon, PaperPlaneIcon, WalletAvatarIcon, WalletFilledIcon, WalletIcon, WarningFilledIcon, WarningIcon, };
75
+ export { ActivityChartIcon, AppleIcon, AppsIcon, BadgeCheckThinIcon, ArbitrumIcon, ArrowRightIcon, ArrowTrendUpIcon, ArrowsToDotIcon, BankIcon, BaseIcon, BestPricesIcon, BnbIcon, BoltIcon, CheckCircleIcon, ChartCandlestickIcon, ChartLineIcon, CircleOverlapIcon, CircleXmarkIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, CreateAccountIcon, CreditCardIcon, DisconnectIcon, DotsHorizontalIcon, DocumentIcon, DownloadIcon, ErrorFilledIcon, EthereumIcon, ExternalLinkIcon, GiftBonusIcon, GoogleIcon, HourglassStartIcon, iconNames, ImageIcon, InfoIcon, LinkAccountsIcon, LockIcon, PaperModeIcon, PencilIcon, PlaySquareIcon, PolygonIcon, ProfileIcon, RevenueAltIcon, SearchIcon, ShieldTrustIcon, SolanaIcon, SparklesFilledIcon, StayInControlIcon, SuccessCheckIcon, TriangleDownIcon, TriangleUpFilledIcon, TriangleUpIcon, UploadIcon, UserTrustIcon, UsdcIcon, PaperPlaneIcon, WalletAvatarIcon, WalletFilledIcon, WalletIcon, WarningFilledIcon, WarningIcon, };
@@ -188,6 +188,10 @@ export declare const iconRegistry: {
188
188
  ({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
189
189
  displayName: string;
190
190
  };
191
+ readonly "paper-mode": {
192
+ ({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
193
+ displayName: string;
194
+ };
191
195
  readonly pencil: {
192
196
  ({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
193
197
  displayName: string;
@@ -188,6 +188,10 @@ export declare const iconRegistry: {
188
188
  ({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
189
189
  displayName: string;
190
190
  };
191
+ readonly "paper-mode": {
192
+ ({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
193
+ displayName: string;
194
+ };
191
195
  readonly pencil: {
192
196
  ({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
193
197
  displayName: string;
@@ -0,0 +1,5 @@
1
+ import type { IconSvgProps } from "../types";
2
+ export declare const PaperModeIcon: {
3
+ ({ title, className, ...props }: IconSvgProps): JSX.Element;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,5 @@
1
+ import type { IconSvgProps } from "../types";
2
+ export declare const PaperModeIcon: {
3
+ ({ title, className, ...props }: IconSvgProps): JSX.Element;
4
+ displayName: string;
5
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agg-build/ui",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
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.1.0",
103
+ "@agg-build/hooks": "^2.1.1",
104
104
  "@agg-build/sdk": "^2.1.0"
105
105
  },
106
106
  "dependencies": {