@agg-build/ui 4.0.0 → 4.2.0

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 (38) hide show
  1. package/dist/{chunk-JTSLZARU.mjs → chunk-6X6Y4INU.mjs} +2 -2
  2. package/dist/{chunk-XIDQ2A6W.mjs → chunk-DNPDXL2D.mjs} +1357 -858
  3. package/dist/{chunk-KX3TQ7WC.mjs → chunk-FTL25XKE.mjs} +1 -1
  4. package/dist/{chunk-MKU5Q6PN.mjs → chunk-GNEFI4SO.mjs} +25 -8
  5. package/dist/{chunk-KO6VTRV6.mjs → chunk-QW7VFURU.mjs} +283 -229
  6. package/dist/{chunk-R362GNI2.mjs → chunk-UDBHAZJJ.mjs} +12 -27
  7. package/dist/{chunk-VR5ZRDQT.mjs → chunk-WDCH4RRS.mjs} +1 -1
  8. package/dist/events.js +760 -689
  9. package/dist/events.mjs +3 -3
  10. package/dist/index.js +4032 -3479
  11. package/dist/index.mjs +15 -7
  12. package/dist/modals.js +1312 -1258
  13. package/dist/modals.mjs +3 -3
  14. package/dist/pages.js +3364 -2817
  15. package/dist/pages.mjs +8 -6
  16. package/dist/primitives.js +316 -262
  17. package/dist/primitives.mjs +1 -1
  18. package/dist/styles.css +1 -1
  19. package/dist/tailwind.css +1 -1
  20. package/dist/trading.js +1996 -1445
  21. package/dist/trading.mjs +10 -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/primitives/venue-logo/svg/logo-novig.d.mts +24 -0
  25. package/dist/types/primitives/venue-logo/svg/logo-novig.d.ts +24 -0
  26. package/dist/types/primitives/venue-logo/venue-logo.constants.d.mts +1 -1
  27. package/dist/types/primitives/venue-logo/venue-logo.constants.d.ts +1 -1
  28. package/dist/types/trading/place-order/index.d.mts +3 -0
  29. package/dist/types/trading/place-order/index.d.ts +3 -0
  30. package/dist/types/trading/place-order/index.place-order.execution-steps.d.mts +28 -75
  31. package/dist/types/trading/place-order/index.place-order.execution-steps.d.ts +28 -75
  32. package/dist/types/trading/place-order/index.place-order.execution-view.d.mts +25 -0
  33. package/dist/types/trading/place-order/index.place-order.execution-view.d.ts +25 -0
  34. package/dist/types/trading/place-order/index.place-order.types.d.mts +6 -0
  35. package/dist/types/trading/place-order/index.place-order.types.d.ts +6 -0
  36. package/dist/types/trading/place-order/index.place-order.utils.d.mts +8 -1
  37. package/dist/types/trading/place-order/index.place-order.utils.d.ts +8 -1
  38. package/package.json +3 -3
@@ -10,20 +10,21 @@ import {
10
10
  isErrorWithStatus,
11
11
  useEventListTabs,
12
12
  useEventListTabsHeaderOverflow
13
- } from "./chunk-MKU5Q6PN.mjs";
13
+ } from "./chunk-GNEFI4SO.mjs";
14
14
  import {
15
15
  DEPOSIT_MODAL_OPEN_EVENT,
16
16
  PlaceOrder,
17
17
  SettlementDetails,
18
18
  WITHDRAW_MODAL_OPEN_EVENT,
19
+ formatChainIdLabel,
19
20
  useClaimWinnings,
20
21
  useResolvedMarketClaim
21
- } from "./chunk-XIDQ2A6W.mjs";
22
+ } from "./chunk-DNPDXL2D.mjs";
22
23
  import {
23
24
  getDisplayOutcomePrice,
24
25
  resolveHeaderOutcomeItems,
25
26
  resolveMarketFromVenueMarkets
26
- } from "./chunk-VR5ZRDQT.mjs";
27
+ } from "./chunk-WDCH4RRS.mjs";
27
28
  import {
28
29
  AggErrorBoundary,
29
30
  Button,
@@ -57,7 +58,7 @@ import {
57
58
  skeletonViews,
58
59
  sortCategoriesForNavigation,
59
60
  useOptionalToast
60
- } from "./chunk-KO6VTRV6.mjs";
61
+ } from "./chunk-QW7VFURU.mjs";
61
62
 
62
63
  // src/pages/home/index.tsx
63
64
  import {
@@ -3196,26 +3197,6 @@ import { Venue as Venue3 } from "@agg-build/sdk";
3196
3197
  import dayjs from "dayjs";
3197
3198
  import { useCallback as useCallback6, useEffect as useEffect11, useMemo as useMemo8, useRef as useRef10, useState as useState12 } from "react";
3198
3199
 
3199
- // src/pages/user-profile/chain-display.ts
3200
- var CHAIN_ID_TO_LABEL = {
3201
- "1": "Ethereum",
3202
- "10": "Optimism",
3203
- "56": "BNB Chain",
3204
- "137": "Polygon",
3205
- "324": "zkSync Era",
3206
- "1337": "Hyperliquid",
3207
- "8453": "Base",
3208
- "42161": "Arbitrum",
3209
- "792703809": "Solana"
3210
- };
3211
- var formatChainIdLabel = (chainId) => {
3212
- var _a;
3213
- if (chainId === null || chainId === void 0) return "";
3214
- const key = String(chainId).trim();
3215
- if (!key) return "";
3216
- return (_a = CHAIN_ID_TO_LABEL[key]) != null ? _a : `Chain ${key}`;
3217
- };
3218
-
3219
3200
  // src/pages/user-profile/components/available-balance-card.tsx
3220
3201
  import { useLabels as useLabels5 } from "@agg-build/hooks";
3221
3202
  import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
@@ -3441,7 +3422,8 @@ var CLAIM_VENUE_LABELS = {
3441
3422
  [Venue.predict]: "Predict",
3442
3423
  [Venue.probable]: "Probable",
3443
3424
  [Venue.myriad]: "Myriad",
3444
- [Venue.hyperliquid]: "Hyperliquid"
3425
+ [Venue.hyperliquid]: "Hyperliquid",
3426
+ [Venue.novig]: "Novig"
3445
3427
  };
3446
3428
  var ClaimActivityBreakdownModal = ({
3447
3429
  activity,
@@ -3589,7 +3571,8 @@ var VENUE_LABELS = {
3589
3571
  [Venue2.predict]: "Predict",
3590
3572
  [Venue2.probable]: "Probable",
3591
3573
  [Venue2.myriad]: "Myriad",
3592
- [Venue2.hyperliquid]: "Hyperliquid"
3574
+ [Venue2.hyperliquid]: "Hyperliquid",
3575
+ [Venue2.novig]: "Novig"
3593
3576
  };
3594
3577
  var amountSchema = z.string().min(1).regex(FINAL_AMOUNT_PATTERN);
3595
3578
  var decimalToRaw = (value, decimals = USDC_DECIMALS) => {
@@ -6377,6 +6360,7 @@ var twoDecimalNumberFormatter = new Intl.NumberFormat("en-US", {
6377
6360
  minimumFractionDigits: 2,
6378
6361
  maximumFractionDigits: 2
6379
6362
  });
6363
+ var formatShareAmount = (value) => value > 0 && value < 0.01 ? "<0.01" : twoDecimalNumberFormatter.format(value);
6380
6364
  var twoDecimalUsdFormatter = new Intl.NumberFormat("en-US", {
6381
6365
  style: "currency",
6382
6366
  currency: "USD",
@@ -6803,7 +6787,7 @@ function buildVenueShareBreakdown(outcome) {
6803
6787
  );
6804
6788
  return sorted.map((row) => ({
6805
6789
  venue: toVenueLogoName(row.venue),
6806
- sharesLabel: `${twoDecimalNumberFormatter.format(row.size)} shares`
6790
+ sharesLabel: `${formatShareAmount(row.size)} shares`
6807
6791
  }));
6808
6792
  }
6809
6793
  var UserProfilePage = ({
@@ -7618,5 +7602,6 @@ export {
7618
7602
  USER_PROFILE_TAB_OPEN_ORDERS,
7619
7603
  USER_PROFILE_TAB_ACTIVITY,
7620
7604
  buildAggTxExplorerHref,
7605
+ formatShareAmount,
7621
7606
  UserProfilePage
7622
7607
  };
@@ -19,7 +19,7 @@ import {
19
19
  selectPrimaryVenueMarket,
20
20
  skeletonViews,
21
21
  sortOutcomes
22
- } from "./chunk-KO6VTRV6.mjs";
22
+ } from "./chunk-QW7VFURU.mjs";
23
23
 
24
24
  // src/trading/trading-context/index.tsx
25
25
  import { useEventTradingContext } from "@agg-build/hooks";