@agg-build/hooks 4.5.0 → 4.7.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.
package/README.md CHANGED
@@ -358,7 +358,8 @@ Import from `@agg-build/hooks/deposit` to keep wallet-heavy hooks out of your ma
358
358
 
359
359
  - `enableLogs` / `enableWebsocketsLogs` — turn on debug logging
360
360
  - `general` — `locale`, `theme` (`"light" | "dark"`), `rootClassName`, `labels`
361
- - `features` — `showVenueLogo`, `enableAnimations`, `enableLiveUpdates`, `showFeesBreakdown`, `enableGradients`
361
+ - `features` — UI behavior flags including `enableAnimations`, `enableLiveUpdates`,
362
+ `enableVenueEventDiscoveryFilters`, and `enableEventDiscoveryUrlPersistence`
362
363
  - `market` — `arbitrageThreshold`, `maxMidpointIdsPerRequest` for proxy/CDN-safe midpoint batching
363
364
  - `chart` — `defaultChartTimeRange`, `selectedChartTimeRange`
364
365
  - `search` — provider-owned search state + callbacks for host-app routing/analytics
@@ -1400,6 +1400,7 @@ var defaultAggUiConfig = {
1400
1400
  showFeesBreakdown: false,
1401
1401
  enableGradients: false,
1402
1402
  enableVenueEventDiscoveryFilters: false,
1403
+ enableEventDiscoveryUrlPersistence: false,
1403
1404
  enableNotifications: true,
1404
1405
  showLimitOrders: false,
1405
1406
  showSportsMarkets: false
@@ -1433,7 +1434,7 @@ var mergeAggUiSearchConfig = (config) => {
1433
1434
  };
1434
1435
  };
1435
1436
  var mergeAggUiConfig = (persisted, config) => {
1436
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa;
1437
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca;
1437
1438
  const locale = (_d = (_c = (_a = config == null ? void 0 : config.general) == null ? void 0 : _a.locale) != null ? _c : (_b = persisted.general) == null ? void 0 : _b.locale) != null ? _d : DEFAULT_LOCALE;
1438
1439
  const theme = (_h = (_g = (_e = config == null ? void 0 : config.general) == null ? void 0 : _e.theme) != null ? _g : (_f = persisted.general) == null ? void 0 : _f.theme) != null ? _h : defaultAggUiConfig.general.theme;
1439
1440
  const formatters = createFormatters(locale);
@@ -1455,32 +1456,33 @@ var mergeAggUiConfig = (persisted, config) => {
1455
1456
  showFeesBreakdown: (_v = (_u = config == null ? void 0 : config.features) == null ? void 0 : _u.showFeesBreakdown) != null ? _v : defaultAggUiConfig.features.showFeesBreakdown,
1456
1457
  enableGradients: (_x = (_w = config == null ? void 0 : config.features) == null ? void 0 : _w.enableGradients) != null ? _x : defaultAggUiConfig.features.enableGradients,
1457
1458
  enableVenueEventDiscoveryFilters: (_z = (_y = config == null ? void 0 : config.features) == null ? void 0 : _y.enableVenueEventDiscoveryFilters) != null ? _z : defaultAggUiConfig.features.enableVenueEventDiscoveryFilters,
1458
- enableNotifications: (_B = (_A = config == null ? void 0 : config.features) == null ? void 0 : _A.enableNotifications) != null ? _B : defaultAggUiConfig.features.enableNotifications,
1459
- showLimitOrders: (_D = (_C = config == null ? void 0 : config.features) == null ? void 0 : _C.showLimitOrders) != null ? _D : defaultAggUiConfig.features.showLimitOrders,
1460
- showSportsMarkets: (_F = (_E = config == null ? void 0 : config.features) == null ? void 0 : _E.showSportsMarkets) != null ? _F : defaultAggUiConfig.features.showSportsMarkets
1459
+ enableEventDiscoveryUrlPersistence: (_B = (_A = config == null ? void 0 : config.features) == null ? void 0 : _A.enableEventDiscoveryUrlPersistence) != null ? _B : defaultAggUiConfig.features.enableEventDiscoveryUrlPersistence,
1460
+ enableNotifications: (_D = (_C = config == null ? void 0 : config.features) == null ? void 0 : _C.enableNotifications) != null ? _D : defaultAggUiConfig.features.enableNotifications,
1461
+ showLimitOrders: (_F = (_E = config == null ? void 0 : config.features) == null ? void 0 : _E.showLimitOrders) != null ? _F : defaultAggUiConfig.features.showLimitOrders,
1462
+ showSportsMarkets: (_H = (_G = config == null ? void 0 : config.features) == null ? void 0 : _G.showSportsMarkets) != null ? _H : defaultAggUiConfig.features.showSportsMarkets
1461
1463
  },
1462
1464
  market: {
1463
- arbitrageThreshold: (_H = (_G = config == null ? void 0 : config.market) == null ? void 0 : _G.arbitrageThreshold) != null ? _H : defaultAggUiConfig.market.arbitrageThreshold,
1464
- maxMidpointIdsPerRequest: (_J = (_I = config == null ? void 0 : config.market) == null ? void 0 : _I.maxMidpointIdsPerRequest) != null ? _J : defaultAggUiConfig.market.maxMidpointIdsPerRequest
1465
+ arbitrageThreshold: (_J = (_I = config == null ? void 0 : config.market) == null ? void 0 : _I.arbitrageThreshold) != null ? _J : defaultAggUiConfig.market.arbitrageThreshold,
1466
+ maxMidpointIdsPerRequest: (_L = (_K = config == null ? void 0 : config.market) == null ? void 0 : _K.maxMidpointIdsPerRequest) != null ? _L : defaultAggUiConfig.market.maxMidpointIdsPerRequest
1465
1467
  },
1466
1468
  chart: {
1467
- defaultChartTimeRange: (_L = (_K = config == null ? void 0 : config.chart) == null ? void 0 : _K.defaultChartTimeRange) != null ? _L : defaultAggUiConfig.chart.defaultChartTimeRange,
1468
- selectedChartTimeRange: (_P = (_O = (_M = persisted.chart) == null ? void 0 : _M.selectedChartTimeRange) != null ? _O : (_N = config == null ? void 0 : config.chart) == null ? void 0 : _N.defaultChartTimeRange) != null ? _P : defaultAggUiConfig.chart.defaultChartTimeRange,
1469
+ defaultChartTimeRange: (_N = (_M = config == null ? void 0 : config.chart) == null ? void 0 : _M.defaultChartTimeRange) != null ? _N : defaultAggUiConfig.chart.defaultChartTimeRange,
1470
+ selectedChartTimeRange: (_R = (_Q = (_O = persisted.chart) == null ? void 0 : _O.selectedChartTimeRange) != null ? _Q : (_P = config == null ? void 0 : config.chart) == null ? void 0 : _P.defaultChartTimeRange) != null ? _R : defaultAggUiConfig.chart.defaultChartTimeRange,
1469
1471
  setSelectedChartTimeRange: defaultAggUiConfig.chart.setSelectedChartTimeRange
1470
1472
  },
1471
1473
  formatting: {
1472
- formatNumber: (_R = (_Q = config == null ? void 0 : config.formatting) == null ? void 0 : _Q.formatNumber) != null ? _R : formatters.formatNumber,
1473
- formatPercent: (_T = (_S = config == null ? void 0 : config.formatting) == null ? void 0 : _S.formatPercent) != null ? _T : formatters.formatPercent,
1474
+ formatNumber: (_T = (_S = config == null ? void 0 : config.formatting) == null ? void 0 : _S.formatNumber) != null ? _T : formatters.formatNumber,
1475
+ formatPercent: (_V = (_U = config == null ? void 0 : config.formatting) == null ? void 0 : _U.formatPercent) != null ? _V : formatters.formatPercent,
1474
1476
  // ponytail: no default here — each cents surface keeps its own rendering
1475
1477
  // when unset, so adding this knob changes nothing for existing partners.
1476
- formatPrice: (_U = config == null ? void 0 : config.formatting) == null ? void 0 : _U.formatPrice,
1477
- formatCurrency: (_W = (_V = config == null ? void 0 : config.formatting) == null ? void 0 : _V.formatCurrency) != null ? _W : formatters.formatCurrency,
1478
- formatCompactCurrency: (_Y = (_X = config == null ? void 0 : config.formatting) == null ? void 0 : _X.formatCompactCurrency) != null ? _Y : formatters.formatCompactCurrency,
1479
- formatDate: (__ = (_Z = config == null ? void 0 : config.formatting) == null ? void 0 : _Z.formatDate) != null ? __ : formatters.formatDate
1478
+ formatPrice: (_W = config == null ? void 0 : config.formatting) == null ? void 0 : _W.formatPrice,
1479
+ formatCurrency: (_Y = (_X = config == null ? void 0 : config.formatting) == null ? void 0 : _X.formatCurrency) != null ? _Y : formatters.formatCurrency,
1480
+ formatCompactCurrency: (__ = (_Z = config == null ? void 0 : config.formatting) == null ? void 0 : _Z.formatCompactCurrency) != null ? __ : formatters.formatCompactCurrency,
1481
+ formatDate: (_aa = (_$ = config == null ? void 0 : config.formatting) == null ? void 0 : _$.formatDate) != null ? _aa : formatters.formatDate
1480
1482
  },
1481
1483
  search: mergeAggUiSearchConfig(config == null ? void 0 : config.search),
1482
1484
  trading: {
1483
- executionMode: (_aa = (_$ = config == null ? void 0 : config.trading) == null ? void 0 : _$.executionMode) != null ? _aa : defaultAggUiConfig.trading.executionMode
1485
+ executionMode: (_ca = (_ba = config == null ? void 0 : config.trading) == null ? void 0 : _ba.executionMode) != null ? _ca : defaultAggUiConfig.trading.executionMode
1484
1486
  },
1485
1487
  walletActions: config == null ? void 0 : config.walletActions,
1486
1488
  solanaRpcUrl: config == null ? void 0 : config.solanaRpcUrl
@@ -11,7 +11,7 @@ import {
11
11
  useOnWithdrawalLifecycle,
12
12
  useSyncBalances,
13
13
  useWithdrawManaged
14
- } from "./chunk-LVOL27OZ.mjs";
14
+ } from "./chunk-TVLLWCK7.mjs";
15
15
 
16
16
  // src/withdraw/use-withdraw-flow.ts
17
17
  import { useCallback, useEffect, useMemo, useState } from "react";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __async,
3
3
  useAggClient
4
- } from "./chunk-LVOL27OZ.mjs";
4
+ } from "./chunk-TVLLWCK7.mjs";
5
5
 
6
6
  // src/use-ramp-quotes.ts
7
7
  import { useMutation } from "@tanstack/react-query";
package/dist/deposit.js CHANGED
@@ -1303,6 +1303,7 @@ var defaultAggUiConfig = {
1303
1303
  showFeesBreakdown: false,
1304
1304
  enableGradients: false,
1305
1305
  enableVenueEventDiscoveryFilters: false,
1306
+ enableEventDiscoveryUrlPersistence: false,
1306
1307
  enableNotifications: true,
1307
1308
  showLimitOrders: false,
1308
1309
  showSportsMarkets: false
package/dist/deposit.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useRampQuotes,
3
3
  useRampSession
4
- } from "./chunk-O4RM4KKO.mjs";
4
+ } from "./chunk-ZHCJYQSA.mjs";
5
5
  import {
6
6
  __async,
7
7
  useAggAuthState,
@@ -11,7 +11,7 @@ import {
11
11
  useDepositAddresses,
12
12
  useOptionalAggClient,
13
13
  useSyncBalances
14
- } from "./chunk-LVOL27OZ.mjs";
14
+ } from "./chunk-TVLLWCK7.mjs";
15
15
 
16
16
  // src/deposit/normalize-wallet-error.ts
17
17
  function normalizeWalletError(error, supportedChains) {
package/dist/index.d.mts CHANGED
@@ -1662,6 +1662,8 @@ interface AggUiFeatureFlagsConfig {
1662
1662
  enableGradients: boolean;
1663
1663
  /** Enable venue-events discovery filters UI and query wiring. */
1664
1664
  enableVenueEventDiscoveryFilters: boolean;
1665
+ /** Persist the primary HomePage discovery filters in the browser URL. */
1666
+ enableEventDiscoveryUrlPersistence: boolean;
1665
1667
  /**
1666
1668
  * Enable the global notification bridge that emits toasts for order /
1667
1669
  * deposit / withdrawal lifecycle events. Defaults to `true`. Set to
@@ -5091,6 +5093,12 @@ interface UseVenueEventOptions {
5091
5093
  eventId: string;
5092
5094
  /** Enable/disable the query. Default true. */
5093
5095
  enabled?: boolean;
5096
+ /**
5097
+ * Scope `marketCount` and the rolled-up `volume` to the whole matched cluster
5098
+ * (default) or to this one venue event (`false`). Pair it with the same value
5099
+ * on `useVenueMarkets` so the count matches the market list you render.
5100
+ */
5101
+ cluster?: boolean;
5094
5102
  }
5095
5103
  /**
5096
5104
  * Fetch a single venue event by ID via the API.
@@ -6119,6 +6127,11 @@ interface UseVenueMarketsOptions {
6119
6127
  venue?: Venue;
6120
6128
  /** Filter by parent VenueEvent ID. */
6121
6129
  venueEventId?: string;
6130
+ /**
6131
+ * Scope `venueEventId` to the whole matched cluster (default) or to that one
6132
+ * venue event (`false`). Ignored without `venueEventId`.
6133
+ */
6134
+ cluster?: boolean;
6122
6135
  /** Search by question text. */
6123
6136
  search?: string;
6124
6137
  /** Filter by market status. */
package/dist/index.d.ts CHANGED
@@ -1662,6 +1662,8 @@ interface AggUiFeatureFlagsConfig {
1662
1662
  enableGradients: boolean;
1663
1663
  /** Enable venue-events discovery filters UI and query wiring. */
1664
1664
  enableVenueEventDiscoveryFilters: boolean;
1665
+ /** Persist the primary HomePage discovery filters in the browser URL. */
1666
+ enableEventDiscoveryUrlPersistence: boolean;
1665
1667
  /**
1666
1668
  * Enable the global notification bridge that emits toasts for order /
1667
1669
  * deposit / withdrawal lifecycle events. Defaults to `true`. Set to
@@ -5091,6 +5093,12 @@ interface UseVenueEventOptions {
5091
5093
  eventId: string;
5092
5094
  /** Enable/disable the query. Default true. */
5093
5095
  enabled?: boolean;
5096
+ /**
5097
+ * Scope `marketCount` and the rolled-up `volume` to the whole matched cluster
5098
+ * (default) or to this one venue event (`false`). Pair it with the same value
5099
+ * on `useVenueMarkets` so the count matches the market list you render.
5100
+ */
5101
+ cluster?: boolean;
5094
5102
  }
5095
5103
  /**
5096
5104
  * Fetch a single venue event by ID via the API.
@@ -6119,6 +6127,11 @@ interface UseVenueMarketsOptions {
6119
6127
  venue?: Venue;
6120
6128
  /** Filter by parent VenueEvent ID. */
6121
6129
  venueEventId?: string;
6130
+ /**
6131
+ * Scope `venueEventId` to the whole matched cluster (default) or to that one
6132
+ * venue event (`false`). Ignored without `venueEventId`.
6133
+ */
6134
+ cluster?: boolean;
6122
6135
  /** Search by question text. */
6123
6136
  search?: string;
6124
6137
  /** Filter by market status. */
package/dist/index.js CHANGED
@@ -1751,6 +1751,7 @@ var defaultAggUiConfig = {
1751
1751
  showFeesBreakdown: false,
1752
1752
  enableGradients: false,
1753
1753
  enableVenueEventDiscoveryFilters: false,
1754
+ enableEventDiscoveryUrlPersistence: false,
1754
1755
  enableNotifications: true,
1755
1756
  showLimitOrders: false,
1756
1757
  showSportsMarkets: false
@@ -1784,7 +1785,7 @@ var mergeAggUiSearchConfig = (config) => {
1784
1785
  };
1785
1786
  };
1786
1787
  var mergeAggUiConfig = (persisted, config) => {
1787
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa;
1788
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca;
1788
1789
  const locale = (_d = (_c = (_a = config == null ? void 0 : config.general) == null ? void 0 : _a.locale) != null ? _c : (_b = persisted.general) == null ? void 0 : _b.locale) != null ? _d : DEFAULT_LOCALE;
1789
1790
  const theme = (_h = (_g = (_e = config == null ? void 0 : config.general) == null ? void 0 : _e.theme) != null ? _g : (_f = persisted.general) == null ? void 0 : _f.theme) != null ? _h : defaultAggUiConfig.general.theme;
1790
1791
  const formatters = createFormatters(locale);
@@ -1806,32 +1807,33 @@ var mergeAggUiConfig = (persisted, config) => {
1806
1807
  showFeesBreakdown: (_v = (_u = config == null ? void 0 : config.features) == null ? void 0 : _u.showFeesBreakdown) != null ? _v : defaultAggUiConfig.features.showFeesBreakdown,
1807
1808
  enableGradients: (_x = (_w = config == null ? void 0 : config.features) == null ? void 0 : _w.enableGradients) != null ? _x : defaultAggUiConfig.features.enableGradients,
1808
1809
  enableVenueEventDiscoveryFilters: (_z = (_y = config == null ? void 0 : config.features) == null ? void 0 : _y.enableVenueEventDiscoveryFilters) != null ? _z : defaultAggUiConfig.features.enableVenueEventDiscoveryFilters,
1809
- enableNotifications: (_B = (_A = config == null ? void 0 : config.features) == null ? void 0 : _A.enableNotifications) != null ? _B : defaultAggUiConfig.features.enableNotifications,
1810
- showLimitOrders: (_D = (_C = config == null ? void 0 : config.features) == null ? void 0 : _C.showLimitOrders) != null ? _D : defaultAggUiConfig.features.showLimitOrders,
1811
- showSportsMarkets: (_F = (_E = config == null ? void 0 : config.features) == null ? void 0 : _E.showSportsMarkets) != null ? _F : defaultAggUiConfig.features.showSportsMarkets
1810
+ enableEventDiscoveryUrlPersistence: (_B = (_A = config == null ? void 0 : config.features) == null ? void 0 : _A.enableEventDiscoveryUrlPersistence) != null ? _B : defaultAggUiConfig.features.enableEventDiscoveryUrlPersistence,
1811
+ enableNotifications: (_D = (_C = config == null ? void 0 : config.features) == null ? void 0 : _C.enableNotifications) != null ? _D : defaultAggUiConfig.features.enableNotifications,
1812
+ showLimitOrders: (_F = (_E = config == null ? void 0 : config.features) == null ? void 0 : _E.showLimitOrders) != null ? _F : defaultAggUiConfig.features.showLimitOrders,
1813
+ showSportsMarkets: (_H = (_G = config == null ? void 0 : config.features) == null ? void 0 : _G.showSportsMarkets) != null ? _H : defaultAggUiConfig.features.showSportsMarkets
1812
1814
  },
1813
1815
  market: {
1814
- arbitrageThreshold: (_H = (_G = config == null ? void 0 : config.market) == null ? void 0 : _G.arbitrageThreshold) != null ? _H : defaultAggUiConfig.market.arbitrageThreshold,
1815
- maxMidpointIdsPerRequest: (_J = (_I = config == null ? void 0 : config.market) == null ? void 0 : _I.maxMidpointIdsPerRequest) != null ? _J : defaultAggUiConfig.market.maxMidpointIdsPerRequest
1816
+ arbitrageThreshold: (_J = (_I = config == null ? void 0 : config.market) == null ? void 0 : _I.arbitrageThreshold) != null ? _J : defaultAggUiConfig.market.arbitrageThreshold,
1817
+ maxMidpointIdsPerRequest: (_L = (_K = config == null ? void 0 : config.market) == null ? void 0 : _K.maxMidpointIdsPerRequest) != null ? _L : defaultAggUiConfig.market.maxMidpointIdsPerRequest
1816
1818
  },
1817
1819
  chart: {
1818
- defaultChartTimeRange: (_L = (_K = config == null ? void 0 : config.chart) == null ? void 0 : _K.defaultChartTimeRange) != null ? _L : defaultAggUiConfig.chart.defaultChartTimeRange,
1819
- selectedChartTimeRange: (_P = (_O = (_M = persisted.chart) == null ? void 0 : _M.selectedChartTimeRange) != null ? _O : (_N = config == null ? void 0 : config.chart) == null ? void 0 : _N.defaultChartTimeRange) != null ? _P : defaultAggUiConfig.chart.defaultChartTimeRange,
1820
+ defaultChartTimeRange: (_N = (_M = config == null ? void 0 : config.chart) == null ? void 0 : _M.defaultChartTimeRange) != null ? _N : defaultAggUiConfig.chart.defaultChartTimeRange,
1821
+ selectedChartTimeRange: (_R = (_Q = (_O = persisted.chart) == null ? void 0 : _O.selectedChartTimeRange) != null ? _Q : (_P = config == null ? void 0 : config.chart) == null ? void 0 : _P.defaultChartTimeRange) != null ? _R : defaultAggUiConfig.chart.defaultChartTimeRange,
1820
1822
  setSelectedChartTimeRange: defaultAggUiConfig.chart.setSelectedChartTimeRange
1821
1823
  },
1822
1824
  formatting: {
1823
- formatNumber: (_R = (_Q = config == null ? void 0 : config.formatting) == null ? void 0 : _Q.formatNumber) != null ? _R : formatters.formatNumber,
1824
- formatPercent: (_T = (_S = config == null ? void 0 : config.formatting) == null ? void 0 : _S.formatPercent) != null ? _T : formatters.formatPercent,
1825
+ formatNumber: (_T = (_S = config == null ? void 0 : config.formatting) == null ? void 0 : _S.formatNumber) != null ? _T : formatters.formatNumber,
1826
+ formatPercent: (_V = (_U = config == null ? void 0 : config.formatting) == null ? void 0 : _U.formatPercent) != null ? _V : formatters.formatPercent,
1825
1827
  // ponytail: no default here — each cents surface keeps its own rendering
1826
1828
  // when unset, so adding this knob changes nothing for existing partners.
1827
- formatPrice: (_U = config == null ? void 0 : config.formatting) == null ? void 0 : _U.formatPrice,
1828
- formatCurrency: (_W = (_V = config == null ? void 0 : config.formatting) == null ? void 0 : _V.formatCurrency) != null ? _W : formatters.formatCurrency,
1829
- formatCompactCurrency: (_Y = (_X = config == null ? void 0 : config.formatting) == null ? void 0 : _X.formatCompactCurrency) != null ? _Y : formatters.formatCompactCurrency,
1830
- formatDate: (__ = (_Z = config == null ? void 0 : config.formatting) == null ? void 0 : _Z.formatDate) != null ? __ : formatters.formatDate
1829
+ formatPrice: (_W = config == null ? void 0 : config.formatting) == null ? void 0 : _W.formatPrice,
1830
+ formatCurrency: (_Y = (_X = config == null ? void 0 : config.formatting) == null ? void 0 : _X.formatCurrency) != null ? _Y : formatters.formatCurrency,
1831
+ formatCompactCurrency: (__ = (_Z = config == null ? void 0 : config.formatting) == null ? void 0 : _Z.formatCompactCurrency) != null ? __ : formatters.formatCompactCurrency,
1832
+ formatDate: (_aa = (_$ = config == null ? void 0 : config.formatting) == null ? void 0 : _$.formatDate) != null ? _aa : formatters.formatDate
1831
1833
  },
1832
1834
  search: mergeAggUiSearchConfig(config == null ? void 0 : config.search),
1833
1835
  trading: {
1834
- executionMode: (_aa = (_$ = config == null ? void 0 : config.trading) == null ? void 0 : _$.executionMode) != null ? _aa : defaultAggUiConfig.trading.executionMode
1836
+ executionMode: (_ca = (_ba = config == null ? void 0 : config.trading) == null ? void 0 : _ba.executionMode) != null ? _ca : defaultAggUiConfig.trading.executionMode
1835
1837
  },
1836
1838
  walletActions: config == null ? void 0 : config.walletActions,
1837
1839
  solanaRpcUrl: config == null ? void 0 : config.solanaRpcUrl
@@ -9077,11 +9079,11 @@ function resolutionPollInterval(event) {
9077
9079
  function useVenueEvent(options) {
9078
9080
  var _a;
9079
9081
  const client = useAggClient();
9080
- const { eventId, enabled = true } = options;
9082
+ const { eventId, enabled = true, cluster } = options;
9081
9083
  const query = (0, import_react_query40.useQuery)({
9082
- queryKey: ["venue-event", eventId],
9084
+ queryKey: ["venue-event", eventId, cluster === false ? "no-cluster" : ""],
9083
9085
  queryFn: (_0) => __async(null, [_0], function* ({ signal }) {
9084
- return client.getVenueEventById(eventId, { signal });
9086
+ return client.getVenueEventById(eventId, { signal, cluster });
9085
9087
  }),
9086
9088
  enabled: enabled && !!eventId,
9087
9089
  staleTime: 5 * 6e4,
@@ -9107,6 +9109,7 @@ function useVenueMarkets(options) {
9107
9109
  const [fallbackQueryClient] = (0, import_react33.useState)(() => new import_react_query41.QueryClient());
9108
9110
  const venue = options == null ? void 0 : options.venue;
9109
9111
  const venueEventId = options == null ? void 0 : options.venueEventId;
9112
+ const cluster = options == null ? void 0 : options.cluster;
9110
9113
  const search = options == null ? void 0 : options.search;
9111
9114
  const matchStatus = options == null ? void 0 : options.matchStatus;
9112
9115
  const status = options == null ? void 0 : options.status;
@@ -9137,6 +9140,7 @@ function useVenueMarkets(options) {
9137
9140
  "venue-markets",
9138
9141
  venue != null ? venue : "",
9139
9142
  venueEventId != null ? venueEventId : "",
9143
+ cluster === false ? "no-cluster" : "",
9140
9144
  search != null ? search : "",
9141
9145
  matchStatus != null ? matchStatus : "",
9142
9146
  status != null ? status : "",
@@ -9158,6 +9162,7 @@ function useVenueMarkets(options) {
9158
9162
  const res = yield client.getVenueMarkets({
9159
9163
  venue,
9160
9164
  venueEventId,
9165
+ cluster,
9161
9166
  search,
9162
9167
  matchStatus,
9163
9168
  status,
@@ -9217,6 +9222,7 @@ function useEnrichedVenueEvent(options) {
9217
9222
  const shouldFetchOnlyOpenMarkets = eventEndedAt == null || eventEndedAt >= Date.now();
9218
9223
  const { markets: openMarkets, isLoading: isEnrichingOpenMarkets } = useVenueMarkets({
9219
9224
  venueEventId: options.eventId,
9225
+ cluster: options.cluster,
9220
9226
  enabled: ((_b = options.enabled) != null ? _b : true) && !!event,
9221
9227
  status: shouldFetchOnlyOpenMarkets ? "open" /* open */ : void 0,
9222
9228
  // No explicit sortBy: event-scoped /venue-markets sorts by the event's
@@ -9229,6 +9235,7 @@ function useEnrichedVenueEvent(options) {
9229
9235
  const shouldFetchAllMarketsFallback = ((_c = options.enabled) != null ? _c : true) && !!event && shouldFetchOnlyOpenMarkets && !isEnrichingOpenMarkets && openMarkets.length === 0;
9230
9236
  const { markets: fallbackMarkets, isLoading: isEnrichingFallbackMarkets } = useVenueMarkets({
9231
9237
  venueEventId: options.eventId,
9238
+ cluster: options.cluster,
9232
9239
  enabled: shouldFetchAllMarketsFallback,
9233
9240
  // No status filter on fallback: if an active event temporarily has only
9234
9241
  // closed/resolved markets, still render the event page instead of the
package/dist/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  useRampQuotes,
3
3
  useRampSession
4
- } from "./chunk-O4RM4KKO.mjs";
4
+ } from "./chunk-ZHCJYQSA.mjs";
5
5
  import {
6
6
  useWithdrawEstimate,
7
7
  useWithdrawFlow,
8
8
  useWithdrawPreview,
9
9
  useWithdrawalLifecycle
10
- } from "./chunk-IHMZHA2W.mjs";
10
+ } from "./chunk-XYQDTF7M.mjs";
11
11
  import {
12
12
  AggAuthContext,
13
13
  AggBalanceProvider,
@@ -97,7 +97,7 @@ import {
97
97
  useSyncBalances,
98
98
  useWithdrawManaged,
99
99
  userActivityQueryKeys
100
- } from "./chunk-LVOL27OZ.mjs";
100
+ } from "./chunk-TVLLWCK7.mjs";
101
101
 
102
102
  // src/index.ts
103
103
  import { QueryClient as QueryClient4, QueryClientProvider, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
@@ -3254,11 +3254,11 @@ function resolutionPollInterval(event) {
3254
3254
  function useVenueEvent(options) {
3255
3255
  var _a;
3256
3256
  const client = useAggClient();
3257
- const { eventId, enabled = true } = options;
3257
+ const { eventId, enabled = true, cluster } = options;
3258
3258
  const query = useQuery10({
3259
- queryKey: ["venue-event", eventId],
3259
+ queryKey: ["venue-event", eventId, cluster === false ? "no-cluster" : ""],
3260
3260
  queryFn: (_0) => __async(null, [_0], function* ({ signal }) {
3261
- return client.getVenueEventById(eventId, { signal });
3261
+ return client.getVenueEventById(eventId, { signal, cluster });
3262
3262
  }),
3263
3263
  enabled: enabled && !!eventId,
3264
3264
  staleTime: 5 * 6e4,
@@ -3284,6 +3284,7 @@ function useVenueMarkets(options) {
3284
3284
  const [fallbackQueryClient] = useState8(() => new QueryClient2());
3285
3285
  const venue = options == null ? void 0 : options.venue;
3286
3286
  const venueEventId = options == null ? void 0 : options.venueEventId;
3287
+ const cluster = options == null ? void 0 : options.cluster;
3287
3288
  const search = options == null ? void 0 : options.search;
3288
3289
  const matchStatus = options == null ? void 0 : options.matchStatus;
3289
3290
  const status = options == null ? void 0 : options.status;
@@ -3314,6 +3315,7 @@ function useVenueMarkets(options) {
3314
3315
  "venue-markets",
3315
3316
  venue != null ? venue : "",
3316
3317
  venueEventId != null ? venueEventId : "",
3318
+ cluster === false ? "no-cluster" : "",
3317
3319
  search != null ? search : "",
3318
3320
  matchStatus != null ? matchStatus : "",
3319
3321
  status != null ? status : "",
@@ -3335,6 +3337,7 @@ function useVenueMarkets(options) {
3335
3337
  const res = yield client.getVenueMarkets({
3336
3338
  venue,
3337
3339
  venueEventId,
3340
+ cluster,
3338
3341
  search,
3339
3342
  matchStatus,
3340
3343
  status,
@@ -3394,6 +3397,7 @@ function useEnrichedVenueEvent(options) {
3394
3397
  const shouldFetchOnlyOpenMarkets = eventEndedAt == null || eventEndedAt >= Date.now();
3395
3398
  const { markets: openMarkets, isLoading: isEnrichingOpenMarkets } = useVenueMarkets({
3396
3399
  venueEventId: options.eventId,
3400
+ cluster: options.cluster,
3397
3401
  enabled: ((_b = options.enabled) != null ? _b : true) && !!event,
3398
3402
  status: shouldFetchOnlyOpenMarkets ? "open" /* open */ : void 0,
3399
3403
  // No explicit sortBy: event-scoped /venue-markets sorts by the event's
@@ -3406,6 +3410,7 @@ function useEnrichedVenueEvent(options) {
3406
3410
  const shouldFetchAllMarketsFallback = ((_c = options.enabled) != null ? _c : true) && !!event && shouldFetchOnlyOpenMarkets && !isEnrichingOpenMarkets && openMarkets.length === 0;
3407
3411
  const { markets: fallbackMarkets, isLoading: isEnrichingFallbackMarkets } = useVenueMarkets({
3408
3412
  venueEventId: options.eventId,
3413
+ cluster: options.cluster,
3409
3414
  enabled: shouldFetchAllMarketsFallback,
3410
3415
  // No status filter on fallback: if an active event temporarily has only
3411
3416
  // closed/resolved markets, still render the event page instead of the
package/dist/withdraw.js CHANGED
@@ -1233,6 +1233,7 @@ var defaultAggUiConfig = {
1233
1233
  showFeesBreakdown: false,
1234
1234
  enableGradients: false,
1235
1235
  enableVenueEventDiscoveryFilters: false,
1236
+ enableEventDiscoveryUrlPersistence: false,
1236
1237
  enableNotifications: true,
1237
1238
  showLimitOrders: false,
1238
1239
  showSportsMarkets: false
package/dist/withdraw.mjs CHANGED
@@ -3,12 +3,12 @@ import {
3
3
  useWithdrawFlow,
4
4
  useWithdrawPreview,
5
5
  useWithdrawalLifecycle
6
- } from "./chunk-IHMZHA2W.mjs";
6
+ } from "./chunk-XYQDTF7M.mjs";
7
7
  import {
8
8
  useDepositAddresses,
9
9
  useManagedBalances,
10
10
  useWithdrawManaged
11
- } from "./chunk-LVOL27OZ.mjs";
11
+ } from "./chunk-TVLLWCK7.mjs";
12
12
  export {
13
13
  useDepositAddresses,
14
14
  useManagedBalances,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agg-build/hooks",
3
- "version": "4.5.0",
3
+ "version": "4.7.0",
4
4
  "description": "React hooks and providers for the AGG prediction market aggregator. Wraps @agg-build/sdk with TanStack Query, shared session state, and live WebSocket data.",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",
@@ -83,7 +83,7 @@
83
83
  "react": "^18.0.0 || ^19.0.0",
84
84
  "viem": "^2.0.0",
85
85
  "wagmi": "^3.0.0 || ^2.0.0",
86
- "@agg-build/sdk": "^4.5.0"
86
+ "@agg-build/sdk": "^4.7.0"
87
87
  },
88
88
  "peerDependenciesMeta": {
89
89
  "@solana/wallet-adapter-react": {