@agg-build/ui 1.2.9 → 1.2.11

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 (100) hide show
  1. package/dist/{chunk-PFOSEY46.mjs → chunk-3ZSNHGAB.mjs} +835 -401
  2. package/dist/{chunk-5PSAIGOT.mjs → chunk-54PCEK6G.mjs} +137 -61
  3. package/dist/{chunk-7JKGAWU5.mjs → chunk-ENAGASVU.mjs} +1538 -1369
  4. package/dist/{chunk-K23CJ5UP.mjs → chunk-J7K2U44E.mjs} +481 -258
  5. package/dist/{chunk-5MDFM2MX.mjs → chunk-NWJHFGBZ.mjs} +1 -1
  6. package/dist/{chunk-QFW5NDJ6.mjs → chunk-SJLHOAKK.mjs} +1001 -1015
  7. package/dist/{chunk-PYKD4W4T.mjs → chunk-YP75TIY6.mjs} +601 -326
  8. package/dist/events.js +2038 -1559
  9. package/dist/events.mjs +3 -3
  10. package/dist/index.js +5417 -4261
  11. package/dist/index.mjs +56 -50
  12. package/dist/modals.js +3262 -2384
  13. package/dist/modals.mjs +3 -3
  14. package/dist/pages.js +3677 -2709
  15. package/dist/pages.mjs +6 -6
  16. package/dist/primitives.js +992 -918
  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 +1360 -1129
  21. package/dist/trading.mjs +4 -4
  22. package/dist/types/deposit/deposit-modal.types.d.mts +10 -1
  23. package/dist/types/deposit/deposit-modal.types.d.ts +10 -1
  24. package/dist/types/deposit/index.d.mts +1 -1
  25. package/dist/types/deposit/index.d.ts +1 -1
  26. package/dist/types/deposit/steps/crypto-transfer.d.mts +1 -2
  27. package/dist/types/deposit/steps/crypto-transfer.d.ts +1 -2
  28. package/dist/types/deposit/steps/deposit-method.d.mts +2 -1
  29. package/dist/types/deposit/steps/deposit-method.d.ts +2 -1
  30. package/dist/types/events/item/event-list-item.types.d.mts +3 -1
  31. package/dist/types/events/item/event-list-item.types.d.ts +3 -1
  32. package/dist/types/events/item/event-list-item.utils.d.mts +26 -2
  33. package/dist/types/events/item/event-list-item.utils.d.ts +26 -2
  34. package/dist/types/events/item-details/event-list-item-details.types.d.mts +30 -1
  35. package/dist/types/events/item-details/event-list-item-details.types.d.ts +30 -1
  36. package/dist/types/events/market-details/index.d.mts +1 -1
  37. package/dist/types/events/market-details/index.d.ts +1 -1
  38. package/dist/types/events/market-details/market-details.types.d.mts +27 -2
  39. package/dist/types/events/market-details/market-details.types.d.ts +27 -2
  40. package/dist/types/events/market-details/market-details.utils.d.mts +18 -4
  41. package/dist/types/events/market-details/market-details.utils.d.ts +18 -4
  42. package/dist/types/events/market-details/orderbook-aggregation.d.mts +38 -2
  43. package/dist/types/events/market-details/orderbook-aggregation.d.ts +38 -2
  44. package/dist/types/events/shared/chart-auto-fallback.d.mts +43 -0
  45. package/dist/types/events/shared/chart-auto-fallback.d.ts +43 -0
  46. package/dist/types/events/shared/display-outcome-price.d.mts +14 -0
  47. package/dist/types/events/shared/display-outcome-price.d.ts +14 -0
  48. package/dist/types/events/shared/display-outcome-venue.d.mts +30 -0
  49. package/dist/types/events/shared/display-outcome-venue.d.ts +30 -0
  50. package/dist/types/events/shared/display-reference-price.d.mts +4 -0
  51. package/dist/types/events/shared/display-reference-price.d.ts +4 -0
  52. package/dist/types/events/shared/select-outcome-price.d.mts +21 -0
  53. package/dist/types/events/shared/select-outcome-price.d.ts +21 -0
  54. package/dist/types/pages/user-profile/components/available-balance-card.d.mts +2 -1
  55. package/dist/types/pages/user-profile/components/available-balance-card.d.ts +2 -1
  56. package/dist/types/pages/user-profile/components/positions-value-card.d.mts +2 -1
  57. package/dist/types/pages/user-profile/components/positions-value-card.d.ts +2 -1
  58. package/dist/types/pages/user-profile/index.d.mts +2 -2
  59. package/dist/types/pages/user-profile/index.d.ts +2 -2
  60. package/dist/types/pages/user-profile/user-profile.types.d.mts +54 -1
  61. package/dist/types/pages/user-profile/user-profile.types.d.ts +54 -1
  62. package/dist/types/primitives/chart/chart.utils.d.mts +9 -10
  63. package/dist/types/primitives/chart/chart.utils.d.ts +9 -10
  64. package/dist/types/primitives/icon/index.d.mts +2 -1
  65. package/dist/types/primitives/icon/index.d.ts +2 -1
  66. package/dist/types/primitives/icon/registry.d.mts +8 -0
  67. package/dist/types/primitives/icon/registry.d.ts +8 -0
  68. package/dist/types/primitives/icon/svg/circle-xmark.d.mts +5 -0
  69. package/dist/types/primitives/icon/svg/circle-xmark.d.ts +5 -0
  70. package/dist/types/primitives/icon/svg/spinner.d.mts +5 -0
  71. package/dist/types/primitives/icon/svg/spinner.d.ts +5 -0
  72. package/dist/types/primitives/toast/index.d.mts +2 -0
  73. package/dist/types/primitives/toast/index.d.ts +2 -0
  74. package/dist/types/primitives/tooltip/tooltip.types.d.mts +1 -0
  75. package/dist/types/primitives/tooltip/tooltip.types.d.ts +1 -0
  76. package/dist/types/primitives/typography/index.d.mts +1 -1
  77. package/dist/types/primitives/typography/index.d.ts +1 -1
  78. package/dist/types/primitives/typography/typography.types.d.mts +2 -0
  79. package/dist/types/primitives/typography/typography.types.d.ts +2 -0
  80. package/dist/types/shared/transfer-fee-summary.d.mts +10 -0
  81. package/dist/types/shared/transfer-fee-summary.d.ts +10 -0
  82. package/dist/types/shared/utils.d.mts +3 -0
  83. package/dist/types/shared/utils.d.ts +3 -0
  84. package/dist/types/trading/place-order/index.d.mts +1 -1
  85. package/dist/types/trading/place-order/index.d.ts +1 -1
  86. package/dist/types/trading/place-order/index.place-order.execution-steps.d.mts +9 -0
  87. package/dist/types/trading/place-order/index.place-order.execution-steps.d.ts +9 -0
  88. package/dist/types/trading/place-order/index.place-order.types.d.mts +15 -2
  89. package/dist/types/trading/place-order/index.place-order.types.d.ts +15 -2
  90. package/dist/types/trading/place-order/index.place-order.utils.d.mts +49 -6
  91. package/dist/types/trading/place-order/index.place-order.utils.d.ts +49 -6
  92. package/dist/types/withdraw/index.d.mts +1 -1
  93. package/dist/types/withdraw/index.d.ts +1 -1
  94. package/dist/types/withdraw/steps/withdraw-success.d.mts +13 -7
  95. package/dist/types/withdraw/steps/withdraw-success.d.ts +13 -7
  96. package/dist/types/withdraw/steps/withdraw-success.utils.d.mts +2 -0
  97. package/dist/types/withdraw/steps/withdraw-success.utils.d.ts +2 -0
  98. package/dist/types/withdraw/withdraw-modal.types.d.mts +5 -0
  99. package/dist/types/withdraw/withdraw-modal.types.d.ts +5 -0
  100. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  USER_PROFILE_TAB_POSITIONS,
11
11
  UserProfilePage,
12
12
  useHomePageModals
13
- } from "./chunk-PYKD4W4T.mjs";
13
+ } from "./chunk-YP75TIY6.mjs";
14
14
  import {
15
15
  EventList,
16
16
  EventListItem,
@@ -25,7 +25,7 @@ import {
25
25
  mergeVenueOutcomeOrderbooks,
26
26
  orderbookRowLimitDefault,
27
27
  useCenterOrderbookSpread
28
- } from "./chunk-PFOSEY46.mjs";
28
+ } from "./chunk-3ZSNHGAB.mjs";
29
29
  import {
30
30
  CARD_NETWORK_OPTIONS,
31
31
  ConnectAccountsStep,
@@ -40,7 +40,7 @@ import {
40
40
  WithdrawModal,
41
41
  clearPendingCardSession,
42
42
  getPendingCardSession
43
- } from "./chunk-7JKGAWU5.mjs";
43
+ } from "./chunk-ENAGASVU.mjs";
44
44
  import {
45
45
  DEPOSIT_MODAL_OPEN_EVENT,
46
46
  PlaceOrder,
@@ -52,7 +52,7 @@ import {
52
52
  parseVenue,
53
53
  requestAggDepositModalOpen,
54
54
  requestAggWithdrawModalOpen
55
- } from "./chunk-K23CJ5UP.mjs";
55
+ } from "./chunk-J7K2U44E.mjs";
56
56
  import {
57
57
  SETTLEMENT_SECTION_ID,
58
58
  Settlement,
@@ -70,10 +70,10 @@ import {
70
70
  resolveOrderBookRows,
71
71
  resolveUnifiedOrderBookEntries,
72
72
  useEventTradingContext
73
- } from "./chunk-5PSAIGOT.mjs";
73
+ } from "./chunk-54PCEK6G.mjs";
74
74
  import {
75
75
  GeoBlockBanner
76
- } from "./chunk-5MDFM2MX.mjs";
76
+ } from "./chunk-NWJHFGBZ.mjs";
77
77
  import {
78
78
  AGG_DEFAULT_URL,
79
79
  AGG_DOCS_URL,
@@ -107,6 +107,7 @@ import {
107
107
  ChevronRightIcon,
108
108
  ChevronUpIcon,
109
109
  CircleOverlapIcon,
110
+ CircleXmarkIcon,
110
111
  CloseIcon,
111
112
  CopyButton,
112
113
  CopyIcon,
@@ -175,6 +176,7 @@ import {
175
176
  cn,
176
177
  formatAmountDisplay,
177
178
  formatCompactUsd,
179
+ formatTokenAmount,
178
180
  formatUsd,
179
181
  getMotionClassName,
180
182
  getScrollBehavior,
@@ -185,9 +187,10 @@ import {
185
187
  skeletonViews,
186
188
  toDate,
187
189
  typographyVariants,
190
+ useOptionalToast,
188
191
  useToast,
189
192
  venueLogoNames
190
- } from "./chunk-QFW5NDJ6.mjs";
193
+ } from "./chunk-SJLHOAKK.mjs";
191
194
 
192
195
  // src/auth/connect-button-view/index.tsx
193
196
  import { optimizedImageUrl, useAggAuthContext, useLabels, useSdkUiConfig } from "@agg-build/hooks";
@@ -624,54 +627,54 @@ var AuthConnectButtonView = ({
624
627
  )
625
628
  }
626
629
  ) }),
627
- /* @__PURE__ */ jsx(
628
- ConditionalWrapper,
629
- {
630
- condition: claimReadyCount > 0,
631
- wrapper: (children) => /* @__PURE__ */ jsx(
632
- Tooltip,
633
- {
634
- size: "medium",
635
- content: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
636
- /* @__PURE__ */ jsx("p", { children: resolveClaimTooltipLabel(claimReadyCount) }),
637
- onClaimWinningsClick ? /* @__PURE__ */ jsxs(
638
- "button",
639
- {
640
- type: "button",
641
- className: "inline-flex cursor-pointer items-center gap-1.5 font-agg-bold text-agg-primary hover:text-agg-primary-hover",
642
- onClick: onClaimWinningsClick,
643
- children: [
644
- claimWinningsLabel,
645
- /* @__PURE__ */ jsx(
646
- Icon,
647
- {
648
- name: "arrow-right",
649
- size: "small",
650
- className: "h-3.5 w-3.5 text-agg-primary",
651
- "aria-hidden": true
652
- }
653
- )
654
- ]
655
- }
656
- ) : null
657
- ] }),
658
- children
659
- }
660
- ),
661
- children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
662
- /* @__PURE__ */ jsx("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx(Icon, { name: "activity-chart", size: "small", className: "text-agg-muted-foreground" }) }),
663
- /* @__PURE__ */ jsx("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.positionsText), children: isBalanceLoading ? /* @__PURE__ */ jsx(LoadingIcon, { size: "small" }) : formatUsd(positionsBalance) }),
664
- claimReadyCount > 0 ? /* @__PURE__ */ jsx(
630
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
631
+ /* @__PURE__ */ jsx("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx(Icon, { name: "activity-chart", size: "small", className: "text-agg-muted-foreground" }) }),
632
+ /* @__PURE__ */ jsx("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.positionsText), children: isBalanceLoading ? /* @__PURE__ */ jsx(LoadingIcon, { size: "small" }) : formatUsd(positionsBalance) }),
633
+ claimReadyCount > 0 ? /* @__PURE__ */ jsx(
634
+ Tooltip,
635
+ {
636
+ size: "medium",
637
+ classNames: { content: "px-5 py-4" },
638
+ content: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
639
+ /* @__PURE__ */ jsx("p", { children: resolveClaimTooltipLabel(claimReadyCount) }),
640
+ onClaimWinningsClick ? /* @__PURE__ */ jsxs(
641
+ "button",
642
+ {
643
+ type: "button",
644
+ className: "inline-flex cursor-pointer items-center gap-1.5 font-agg-bold text-agg-primary hover:text-agg-primary-hover",
645
+ onClick: onClaimWinningsClick,
646
+ children: [
647
+ claimWinningsLabel,
648
+ /* @__PURE__ */ jsx(
649
+ Icon,
650
+ {
651
+ name: "arrow-right",
652
+ size: "small",
653
+ className: "h-3.5 w-3.5 text-agg-primary",
654
+ "aria-hidden": true
655
+ }
656
+ )
657
+ ]
658
+ }
659
+ ) : null
660
+ ] }),
661
+ children: /* @__PURE__ */ jsx(
665
662
  "span",
666
663
  {
667
- className: "inline-flex size-4 shrink-0 items-center justify-center rounded-full bg-linear-to-r from-agg-primary to-agg-primary-hover text-2.5 leading-3.5 font-agg-bold text-agg-foreground uppercase",
664
+ className: cn(
665
+ "agg-claim-badge agg-type-overline",
666
+ "inline-flex items-center justify-center rounded-full leading-none",
667
+ "bg-linear-to-r from-agg-primary to-agg-primary-hover",
668
+ "shrink-0 px-0.5 min-w-4 h-4 text-agg-on-primary text-center",
669
+ "cursor-pointer"
670
+ ),
668
671
  "aria-label": resolveClaimBadgeAriaLabel(claimReadyCount),
669
672
  children: claimReadyCount
670
673
  }
671
- ) : null
672
- ] })
673
- }
674
- ),
674
+ )
675
+ }
676
+ ) : null
677
+ ] }),
675
678
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
676
679
  /* @__PURE__ */ jsx("span", { className: "h-3.5 w-3.5 shrink-0 [&_svg]:h-full [&_svg]:w-full", children: /* @__PURE__ */ jsx(Icon, { name: "wallet-filled", size: "small", className: "text-agg-muted-foreground" }) }),
677
680
  /* @__PURE__ */ jsx("p", { className: cn("agg-type-label text-agg-foreground", classNames == null ? void 0 : classNames.balanceText), children: isBalanceLoading ? /* @__PURE__ */ jsx(LoadingIcon, { size: "small" }) : formatUsd(totalBalance) })
@@ -925,6 +928,7 @@ export {
925
928
  ChevronRightIcon,
926
929
  ChevronUpIcon,
927
930
  CircleOverlapIcon,
931
+ CircleXmarkIcon,
928
932
  CloseIcon,
929
933
  ConnectAccountsStep,
930
934
  ConnectKalshiModal,
@@ -1031,6 +1035,7 @@ export {
1031
1035
  formatAmountDisplay,
1032
1036
  formatCompactUsd,
1033
1037
  formatProbabilityCents,
1038
+ formatTokenAmount,
1034
1039
  formatUsd,
1035
1040
  getMotionClassName,
1036
1041
  getPendingCardSession,
@@ -1061,6 +1066,7 @@ export {
1061
1066
  useCenterOrderbookSpread,
1062
1067
  useEventTradingContext,
1063
1068
  useHomePageModals,
1069
+ useOptionalToast,
1064
1070
  useToast,
1065
1071
  venueLogoNames
1066
1072
  };