@agg-build/ui 4.10.0 → 4.11.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.
package/dist/pages.mjs CHANGED
@@ -11,14 +11,14 @@ import {
11
11
  formatRecurringCountdown,
12
12
  formatShareAmount,
13
13
  useHomePageModals
14
- } from "./chunk-SMQRUNMZ.mjs";
15
- import "./chunk-H5LCCV2J.mjs";
14
+ } from "./chunk-VMG6BUHI.mjs";
15
+ import "./chunk-EYJS45RP.mjs";
16
16
  import {
17
17
  DEPOSIT_MODAL_OPEN_EVENT,
18
18
  WITHDRAW_MODAL_OPEN_EVENT,
19
19
  requestAggDepositModalOpen,
20
20
  requestAggWithdrawModalOpen
21
- } from "./chunk-4HTE5IEZ.mjs";
21
+ } from "./chunk-WWIVSROM.mjs";
22
22
  import "./chunk-6EHT5OFU.mjs";
23
23
  import "./chunk-TXQJUVRW.mjs";
24
24
  import "./chunk-W7HQVQ22.mjs";
package/dist/trading.js CHANGED
@@ -9214,8 +9214,14 @@ var extractGeoBlockedVenues = (warnings) => {
9214
9214
  );
9215
9215
  };
9216
9216
  var getSmartRouteTotalFees = (feeBreakdown) => {
9217
+ var _a, _b;
9217
9218
  if (!feeBreakdown) return null;
9218
- const feeParts = [feeBreakdown.venueFees, feeBreakdown.bridgeFees, feeBreakdown.executionGas];
9219
+ const feeParts = [
9220
+ feeBreakdown.venueFees + ((_a = feeBreakdown.builderFee) != null ? _a : 0),
9221
+ feeBreakdown.bridgeFees,
9222
+ feeBreakdown.executionGas,
9223
+ (_b = feeBreakdown.appFee) != null ? _b : 0
9224
+ ];
9219
9225
  if (!feeParts.every(Number.isFinite)) return null;
9220
9226
  return feeParts.reduce((total, fee) => total + Math.round(fee * 100) / 100, 0);
9221
9227
  };
@@ -12188,7 +12194,7 @@ var PlaceOrder = ({
12188
12194
  showResolvingState = false,
12189
12195
  midpointsResult
12190
12196
  }) => {
12191
- 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;
12197
+ 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, _da;
12192
12198
  const {
12193
12199
  enableDebug: isExecutionDebugEnabled,
12194
12200
  features: { enableAnimations, showFeesBreakdown, showLimitOrders: limitOrdersFeature },
@@ -13609,13 +13615,17 @@ var PlaceOrder = ({
13609
13615
  if (totalFees == null) return null;
13610
13616
  return formatUsd(totalFees, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
13611
13617
  }, [activeFeeBreakdown]);
13618
+ const appFeeValue = (__ = activeFeeBreakdown == null ? void 0 : activeFeeBreakdown.appFee) != null ? __ : 0;
13612
13619
  const feeBreakdownRows = (0, import_react17.useMemo)(() => {
13620
+ var _a2;
13613
13621
  if (!activeFeeBreakdown) return [];
13614
13622
  return [
13615
13623
  {
13624
+ // The builder slice (Hyperliquid only today) is a separate field on the
13625
+ // wire but reads as one cost to the user, so it renders inside "Venue".
13616
13626
  kind: "amount",
13617
13627
  label: tradingLabels.feeBreakdownVenueFees,
13618
- value: formatUsd(activeFeeBreakdown.venueFees, {
13628
+ value: formatUsd(activeFeeBreakdown.venueFees + ((_a2 = activeFeeBreakdown.builderFee) != null ? _a2 : 0), {
13619
13629
  minimumFractionDigits: 2,
13620
13630
  maximumFractionDigits: 2
13621
13631
  })
@@ -13636,23 +13646,33 @@ var PlaceOrder = ({
13636
13646
  maximumFractionDigits: 2
13637
13647
  })
13638
13648
  },
13639
- {
13649
+ // A partner charging a non-zero app fee gets a plain dollar row like every
13650
+ // other cost above it — the "0% fee" badge is only true, and only worth
13651
+ // highlighting, when the fee really is zero.
13652
+ appFeeValue > 0 ? {
13653
+ kind: "amount",
13654
+ label: tradingLabels.feeBreakdownAggMarket,
13655
+ value: formatUsd(appFeeValue, {
13656
+ minimumFractionDigits: 2,
13657
+ maximumFractionDigits: 2
13658
+ })
13659
+ } : {
13640
13660
  kind: "badge",
13641
13661
  label: tradingLabels.feeBreakdownAggMarket,
13642
13662
  badgeLabel: tradingLabels.feeBreakdownPlatformFeeBadge
13643
13663
  }
13644
13664
  ];
13645
- }, [activeFeeBreakdown, tradingLabels]);
13665
+ }, [activeFeeBreakdown, appFeeValue, tradingLabels]);
13646
13666
  const isActionLoading = isPrimaryActionLoading || executeManaged.isPending || placeLimitOrder.isPending || isBeforeActionPending;
13647
13667
  const selectedLimitRouteCardId = selectedLimitVenueOption ? `limit-venue-${selectedLimitVenueOption.venue}-${selectedLimitVenueOption.venueMarketOutcomeId}` : null;
13648
- const selectedLimitRouteCard = selectedLimitRouteCardId ? (__ = limitRouteCards.find((card) => card.id === selectedLimitRouteCardId)) != null ? __ : null : null;
13649
- const selectedRouteGeoBlocked = isLimitOrder ? (_$ = selectedLimitRouteCard == null ? void 0 : selectedLimitRouteCard.isUnavailable) != null ? _$ : false : (_aa = selectedRouteCard == null ? void 0 : selectedRouteCard.isUnavailable) != null ? _aa : false;
13668
+ const selectedLimitRouteCard = selectedLimitRouteCardId ? (_$ = limitRouteCards.find((card) => card.id === selectedLimitRouteCardId)) != null ? _$ : null : null;
13669
+ const selectedRouteGeoBlocked = isLimitOrder ? (_aa = selectedLimitRouteCard == null ? void 0 : selectedLimitRouteCard.isUnavailable) != null ? _aa : false : (_ba = selectedRouteCard == null ? void 0 : selectedRouteCard.isUnavailable) != null ? _ba : false;
13650
13670
  const geoBlockedVenuesFromWarnings = (0, import_react17.useMemo)(
13651
13671
  () => {
13652
13672
  var _a2;
13653
13673
  return extractGeoBlockedVenues((_a2 = smartRoute.data) == null ? void 0 : _a2.warnings);
13654
13674
  },
13655
- [(_ba = smartRoute.data) == null ? void 0 : _ba.warnings]
13675
+ [(_ca = smartRoute.data) == null ? void 0 : _ca.warnings]
13656
13676
  );
13657
13677
  const isPrimaryVenueGeoBlocked = (0, import_react17.useMemo)(() => {
13658
13678
  var _a2, _b2;
@@ -14337,7 +14357,7 @@ var PlaceOrder = ({
14337
14357
  PlaceOrderResolvedView,
14338
14358
  {
14339
14359
  tradingState: resolvedReadOnlyTradingState,
14340
- resolutionTimestamp: (_ca = resolvedEventTradingState.resolvesAt) != null ? _ca : resolvedReadOnlyTradingState.resolvesAt,
14360
+ resolutionTimestamp: (_da = resolvedEventTradingState.resolvesAt) != null ? _da : resolvedReadOnlyTradingState.resolvesAt,
14341
14361
  resolvedClaim,
14342
14362
  classNames,
14343
14363
  className,
@@ -15098,7 +15118,7 @@ var PlaceOrder = ({
15098
15118
  message: internalTab === "buy" ? tradingLabels.lowLiquidityWarning : tradingLabels.lowLiquiditySellWarning
15099
15119
  }
15100
15120
  ) : null,
15101
- !shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-platform-fee mt-1 flex items-center justify-center gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
15121
+ !shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown && appFeeValue === 0 ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-platform-fee mt-1 flex items-center justify-center gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
15102
15122
  /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
15103
15123
  Icon,
15104
15124
  {
package/dist/trading.mjs CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  useClaimWinnings,
15
15
  useResolvedMarketClaim,
16
16
  venueRequiresSharedKyc
17
- } from "./chunk-4HTE5IEZ.mjs";
17
+ } from "./chunk-WWIVSROM.mjs";
18
18
  import {
19
19
  SETTLEMENT_SECTION_ID,
20
20
  Settlement,
@@ -1,4 +1,4 @@
1
- import type { AggUiLabels } from "@agg-build/hooks";
1
+ import { type AggUiLabels } from "@agg-build/hooks";
2
2
  import type { EventListSortValue, EventListTab } from "./event-list.types";
3
3
  export declare const DEFAULT_EVENTS_LIMIT = 50;
4
4
  export declare const DEFAULT_EVENT_LIST_SORT: EventListSortValue;
@@ -1,4 +1,4 @@
1
- import type { AggUiLabels } from "@agg-build/hooks";
1
+ import { type AggUiLabels } from "@agg-build/hooks";
2
2
  import type { EventListSortValue, EventListTab } from "./event-list.types";
3
3
  export declare const DEFAULT_EVENTS_LIMIT = 50;
4
4
  export declare const DEFAULT_EVENT_LIST_SORT: EventListSortValue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agg-build/ui",
3
- "version": "4.10.0",
3
+ "version": "4.11.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,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": "^4.10.0",
104
- "@agg-build/sdk": "^4.10.0"
103
+ "@agg-build/hooks": "^4.11.0",
104
+ "@agg-build/sdk": "^4.11.0"
105
105
  },
106
106
  "dependencies": {
107
107
  "@number-flow/react": "^0.6.0",