@agg-build/ui 1.2.10 → 1.2.12

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 (140) hide show
  1. package/dist/{chunk-K23CJ5UP.mjs → chunk-3JXBOU24.mjs} +580 -307
  2. package/dist/{chunk-5MTIBPDY.mjs → chunk-4WBQTUPW.mjs} +1091 -441
  3. package/dist/{chunk-5PSAIGOT.mjs → chunk-IBOE7DRY.mjs} +137 -61
  4. package/dist/{chunk-XKADJNAJ.mjs → chunk-J6WELNCX.mjs} +601 -326
  5. package/dist/{chunk-7JKGAWU5.mjs → chunk-U55T5BPE.mjs} +1802 -1564
  6. package/dist/{chunk-QFW5NDJ6.mjs → chunk-X3KCFWXN.mjs} +1312 -1040
  7. package/dist/{chunk-5MDFM2MX.mjs → chunk-YSW4ULL5.mjs} +1 -1
  8. package/dist/events.js +2892 -1746
  9. package/dist/events.mjs +3 -3
  10. package/dist/index.js +7085 -4956
  11. package/dist/index.mjs +520 -139
  12. package/dist/modals.js +3434 -2315
  13. package/dist/modals.mjs +3 -3
  14. package/dist/pages.js +4175 -2764
  15. package/dist/pages.mjs +6 -6
  16. package/dist/primitives.js +1295 -942
  17. package/dist/primitives.mjs +5 -1
  18. package/dist/styles.css +1 -1
  19. package/dist/tailwind.css +1 -1
  20. package/dist/trading.js +1677 -1249
  21. package/dist/trading.mjs +4 -4
  22. package/dist/types/agg-provider.d.mts +27 -0
  23. package/dist/types/agg-provider.d.ts +27 -0
  24. package/dist/types/deposit/deposit-modal.types.d.mts +10 -1
  25. package/dist/types/deposit/deposit-modal.types.d.ts +10 -1
  26. package/dist/types/deposit/index.d.mts +1 -1
  27. package/dist/types/deposit/index.d.ts +1 -1
  28. package/dist/types/deposit/steps/crypto-transfer.d.mts +1 -2
  29. package/dist/types/deposit/steps/crypto-transfer.d.ts +1 -2
  30. package/dist/types/deposit/steps/deposit-method.d.mts +2 -1
  31. package/dist/types/deposit/steps/deposit-method.d.ts +2 -1
  32. package/dist/types/events/item/event-list-item.types.d.mts +3 -1
  33. package/dist/types/events/item/event-list-item.types.d.ts +3 -1
  34. package/dist/types/events/item/event-list-item.utils.d.mts +26 -2
  35. package/dist/types/events/item/event-list-item.utils.d.ts +26 -2
  36. package/dist/types/events/item-details/event-list-item-details.types.d.mts +30 -1
  37. package/dist/types/events/item-details/event-list-item-details.types.d.ts +30 -1
  38. package/dist/types/events/list/event-list-tabs.d.mts +6 -1
  39. package/dist/types/events/list/event-list-tabs.d.ts +6 -1
  40. package/dist/types/events/market-details/index.d.mts +1 -1
  41. package/dist/types/events/market-details/index.d.ts +1 -1
  42. package/dist/types/events/market-details/market-details.types.d.mts +27 -2
  43. package/dist/types/events/market-details/market-details.types.d.ts +27 -2
  44. package/dist/types/events/market-details/market-details.utils.d.mts +18 -4
  45. package/dist/types/events/market-details/market-details.utils.d.ts +18 -4
  46. package/dist/types/events/market-details/orderbook-aggregation.d.mts +30 -10
  47. package/dist/types/events/market-details/orderbook-aggregation.d.ts +30 -10
  48. package/dist/types/events/shared/chart-auto-fallback.d.mts +43 -0
  49. package/dist/types/events/shared/chart-auto-fallback.d.ts +43 -0
  50. package/dist/types/events/shared/display-outcome-price.d.mts +14 -0
  51. package/dist/types/events/shared/display-outcome-price.d.ts +14 -0
  52. package/dist/types/events/shared/display-outcome-venue.d.mts +30 -0
  53. package/dist/types/events/shared/display-outcome-venue.d.ts +30 -0
  54. package/dist/types/events/shared/display-reference-price.d.mts +4 -0
  55. package/dist/types/events/shared/display-reference-price.d.ts +4 -0
  56. package/dist/types/events/shared/select-outcome-price.d.mts +21 -0
  57. package/dist/types/events/shared/select-outcome-price.d.ts +21 -0
  58. package/dist/types/index.d.mts +2 -0
  59. package/dist/types/index.d.ts +2 -0
  60. package/dist/types/notifications/agg-notification-events-provider.d.mts +35 -0
  61. package/dist/types/notifications/agg-notification-events-provider.d.ts +35 -0
  62. package/dist/types/notifications/agg-toast-provider.d.mts +27 -0
  63. package/dist/types/notifications/agg-toast-provider.d.ts +27 -0
  64. package/dist/types/notifications/deposit-notification-events.d.mts +10 -0
  65. package/dist/types/notifications/deposit-notification-events.d.ts +10 -0
  66. package/dist/types/notifications/index.d.mts +2 -0
  67. package/dist/types/notifications/index.d.ts +2 -0
  68. package/dist/types/pages/user-profile/components/available-balance-card.d.mts +2 -1
  69. package/dist/types/pages/user-profile/components/available-balance-card.d.ts +2 -1
  70. package/dist/types/pages/user-profile/components/positions-value-card.d.mts +2 -1
  71. package/dist/types/pages/user-profile/components/positions-value-card.d.ts +2 -1
  72. package/dist/types/pages/user-profile/index.d.mts +2 -2
  73. package/dist/types/pages/user-profile/index.d.ts +2 -2
  74. package/dist/types/pages/user-profile/user-profile.types.d.mts +54 -1
  75. package/dist/types/pages/user-profile/user-profile.types.d.ts +54 -1
  76. package/dist/types/primitives/button/button.types.d.mts +4 -0
  77. package/dist/types/primitives/button/button.types.d.ts +4 -0
  78. package/dist/types/primitives/button/index.d.mts +1 -1
  79. package/dist/types/primitives/button/index.d.ts +1 -1
  80. package/dist/types/primitives/chart/chart.utils.d.mts +9 -10
  81. package/dist/types/primitives/chart/chart.utils.d.ts +9 -10
  82. package/dist/types/primitives/icon/index.d.mts +2 -1
  83. package/dist/types/primitives/icon/index.d.ts +2 -1
  84. package/dist/types/primitives/icon/registry.d.mts +24 -0
  85. package/dist/types/primitives/icon/registry.d.ts +24 -0
  86. package/dist/types/primitives/icon/svg/circle-xmark.d.mts +5 -0
  87. package/dist/types/primitives/icon/svg/circle-xmark.d.ts +5 -0
  88. package/dist/types/primitives/icon/svg/sort-end-date.d.mts +5 -0
  89. package/dist/types/primitives/icon/svg/sort-end-date.d.ts +5 -0
  90. package/dist/types/primitives/icon/svg/sort-top-arbitrage.d.mts +5 -0
  91. package/dist/types/primitives/icon/svg/sort-top-arbitrage.d.ts +5 -0
  92. package/dist/types/primitives/icon/svg/sort-volume-24hr.d.mts +5 -0
  93. package/dist/types/primitives/icon/svg/sort-volume-24hr.d.ts +5 -0
  94. package/dist/types/primitives/icon/svg/sort-volume.d.mts +5 -0
  95. package/dist/types/primitives/icon/svg/sort-volume.d.ts +5 -0
  96. package/dist/types/primitives/icon/svg/spinner.d.mts +5 -0
  97. package/dist/types/primitives/icon/svg/spinner.d.ts +5 -0
  98. package/dist/types/primitives/select/index.d.mts +1 -1
  99. package/dist/types/primitives/select/index.d.ts +1 -1
  100. package/dist/types/primitives/select/select.types.d.mts +9 -0
  101. package/dist/types/primitives/select/select.types.d.ts +9 -0
  102. package/dist/types/primitives/toast/index.d.mts +2 -0
  103. package/dist/types/primitives/toast/index.d.ts +2 -0
  104. package/dist/types/primitives/toast/toast.types.d.mts +3 -0
  105. package/dist/types/primitives/toast/toast.types.d.ts +3 -0
  106. package/dist/types/primitives/tooltip/tooltip.types.d.mts +1 -0
  107. package/dist/types/primitives/tooltip/tooltip.types.d.ts +1 -0
  108. package/dist/types/primitives/typography/index.d.mts +1 -1
  109. package/dist/types/primitives/typography/index.d.ts +1 -1
  110. package/dist/types/primitives/typography/typography.types.d.mts +2 -0
  111. package/dist/types/primitives/typography/typography.types.d.ts +2 -0
  112. package/dist/types/profile/index.d.mts +1 -1
  113. package/dist/types/profile/index.d.ts +1 -1
  114. package/dist/types/profile/profile-modal.constants.d.mts +2 -2
  115. package/dist/types/profile/profile-modal.constants.d.ts +2 -2
  116. package/dist/types/profile/tabs/accounts-wallets-tab.d.mts +2 -17
  117. package/dist/types/profile/tabs/accounts-wallets-tab.d.ts +2 -17
  118. package/dist/types/profile/tabs/trading-access-tab.d.mts +15 -0
  119. package/dist/types/profile/tabs/trading-access-tab.d.ts +15 -0
  120. package/dist/types/shared/transfer-fee-summary.d.mts +10 -0
  121. package/dist/types/shared/transfer-fee-summary.d.ts +10 -0
  122. package/dist/types/shared/utils.d.mts +3 -0
  123. package/dist/types/shared/utils.d.ts +3 -0
  124. package/dist/types/trading/place-order/index.d.mts +1 -1
  125. package/dist/types/trading/place-order/index.d.ts +1 -1
  126. package/dist/types/trading/place-order/index.place-order.execution-steps.d.mts +9 -0
  127. package/dist/types/trading/place-order/index.place-order.execution-steps.d.ts +9 -0
  128. package/dist/types/trading/place-order/index.place-order.types.d.mts +15 -2
  129. package/dist/types/trading/place-order/index.place-order.types.d.ts +15 -2
  130. package/dist/types/trading/place-order/index.place-order.utils.d.mts +49 -6
  131. package/dist/types/trading/place-order/index.place-order.utils.d.ts +49 -6
  132. package/dist/types/withdraw/index.d.mts +1 -1
  133. package/dist/types/withdraw/index.d.ts +1 -1
  134. package/dist/types/withdraw/steps/withdraw-success.d.mts +13 -7
  135. package/dist/types/withdraw/steps/withdraw-success.d.ts +13 -7
  136. package/dist/types/withdraw/steps/withdraw-success.utils.d.mts +2 -0
  137. package/dist/types/withdraw/steps/withdraw-success.utils.d.ts +2 -0
  138. package/dist/types/withdraw/withdraw-modal.types.d.mts +5 -0
  139. package/dist/types/withdraw/withdraw-modal.types.d.ts +5 -0
  140. package/package.json +3 -3
@@ -1,14 +1,20 @@
1
+ import type { WithdrawalLifecycleState } from "@agg-build/hooks/withdraw";
1
2
  import type { WithdrawSummary } from "../withdraw-modal.types";
3
+ export type WithdrawResultStatus = "success" | "partial_success" | "failed";
4
+ interface WithdrawLoadingStepProps {
5
+ lifecycleState: WithdrawalLifecycleState;
6
+ onClose: () => void;
7
+ }
2
8
  export interface WithdrawSuccessStepProps {
3
9
  summary: WithdrawSummary;
4
10
  tokenSymbol: string;
5
- /**
6
- * The submitted withdrawal id. When non-null the success step subscribes to
7
- * `withdrawal_lifecycle` WS events and renders live progress; when null it
8
- * falls back to the static "submitted" copy.
9
- */
10
- withdrawalId: string | null;
11
+ requestedWithdrawal: string;
12
+ resultStatus: WithdrawResultStatus;
13
+ errorMessage?: string | null;
11
14
  onDone: () => void;
15
+ onRetry: () => void;
12
16
  onClose: () => void;
13
17
  }
14
- export declare const WithdrawSuccessStep: ({ summary, tokenSymbol, withdrawalId, onDone, onClose, }: WithdrawSuccessStepProps) => JSX.Element;
18
+ export declare const WithdrawLoadingStep: ({ lifecycleState, onClose, }: WithdrawLoadingStepProps) => JSX.Element;
19
+ export declare const WithdrawSuccessStep: ({ summary, tokenSymbol, requestedWithdrawal, resultStatus, errorMessage, onDone, onRetry, onClose, }: WithdrawSuccessStepProps) => JSX.Element;
20
+ export {};
@@ -1,14 +1,20 @@
1
+ import type { WithdrawalLifecycleState } from "@agg-build/hooks/withdraw";
1
2
  import type { WithdrawSummary } from "../withdraw-modal.types";
3
+ export type WithdrawResultStatus = "success" | "partial_success" | "failed";
4
+ interface WithdrawLoadingStepProps {
5
+ lifecycleState: WithdrawalLifecycleState;
6
+ onClose: () => void;
7
+ }
2
8
  export interface WithdrawSuccessStepProps {
3
9
  summary: WithdrawSummary;
4
10
  tokenSymbol: string;
5
- /**
6
- * The submitted withdrawal id. When non-null the success step subscribes to
7
- * `withdrawal_lifecycle` WS events and renders live progress; when null it
8
- * falls back to the static "submitted" copy.
9
- */
10
- withdrawalId: string | null;
11
+ requestedWithdrawal: string;
12
+ resultStatus: WithdrawResultStatus;
13
+ errorMessage?: string | null;
11
14
  onDone: () => void;
15
+ onRetry: () => void;
12
16
  onClose: () => void;
13
17
  }
14
- export declare const WithdrawSuccessStep: ({ summary, tokenSymbol, withdrawalId, onDone, onClose, }: WithdrawSuccessStepProps) => JSX.Element;
18
+ export declare const WithdrawLoadingStep: ({ lifecycleState, onClose, }: WithdrawLoadingStepProps) => JSX.Element;
19
+ export declare const WithdrawSuccessStep: ({ summary, tokenSymbol, requestedWithdrawal, resultStatus, errorMessage, onDone, onRetry, onClose, }: WithdrawSuccessStepProps) => JSX.Element;
20
+ export {};
@@ -9,6 +9,8 @@ export interface WithdrawalLifecycleStep {
9
9
  id: string;
10
10
  label: string;
11
11
  status: WithdrawalLifecycleStepStatus;
12
+ /** Failure reason propagated from `leg.errorMessage`. Only set when `status === "error"`. */
13
+ errorMessage?: string | null;
12
14
  }
13
15
  export type WithdrawalLifecycleStepGroup = WithdrawalLifecycleStep[];
14
16
  export declare const resolveChainLabel: (chainId: number) => string;
@@ -9,6 +9,8 @@ export interface WithdrawalLifecycleStep {
9
9
  id: string;
10
10
  label: string;
11
11
  status: WithdrawalLifecycleStepStatus;
12
+ /** Failure reason propagated from `leg.errorMessage`. Only set when `status === "error"`. */
13
+ errorMessage?: string | null;
12
14
  }
13
15
  export type WithdrawalLifecycleStepGroup = WithdrawalLifecycleStep[];
14
16
  export declare const resolveChainLabel: (chainId: number) => string;
@@ -23,6 +23,11 @@ export interface WithdrawSummary {
23
23
  toWallet: string;
24
24
  fees: string;
25
25
  }
26
+ export interface WithdrawFeeEstimate {
27
+ estimatedFees: string;
28
+ networkReserve: string;
29
+ youReceive: string;
30
+ }
26
31
  export interface WithdrawFlowData {
27
32
  /** Top-level balance shown in the entry step (numeric, e.g. 179.9). */
28
33
  balance: number;
@@ -23,6 +23,11 @@ export interface WithdrawSummary {
23
23
  toWallet: string;
24
24
  fees: string;
25
25
  }
26
+ export interface WithdrawFeeEstimate {
27
+ estimatedFees: string;
28
+ networkReserve: string;
29
+ youReceive: string;
30
+ }
26
31
  export interface WithdrawFlowData {
27
32
  /** Top-level balance shown in the entry step (numeric, e.g. 179.9). */
28
33
  balance: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agg-build/ui",
3
- "version": "1.2.10",
3
+ "version": "1.2.12",
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": "^1.2.0",
104
- "@agg-build/sdk": "^1.2.0"
103
+ "@agg-build/hooks": "^1.2.12",
104
+ "@agg-build/sdk": "^1.2.11"
105
105
  },
106
106
  "dependencies": {
107
107
  "@number-flow/react": "^0.6.0",