@agg-build/ui 1.2.3 → 1.2.4

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/modals.mjs CHANGED
@@ -13,11 +13,11 @@ import {
13
13
  WithdrawModal,
14
14
  clearPendingCardSession,
15
15
  getPendingCardSession
16
- } from "./chunk-Q2BRDVBU.mjs";
16
+ } from "./chunk-UCH7MMRN.mjs";
17
17
  import {
18
18
  GeoBlockBanner
19
- } from "./chunk-5FXMHTVR.mjs";
20
- import "./chunk-34L7ZKJW.mjs";
19
+ } from "./chunk-OFFJNHAG.mjs";
20
+ import "./chunk-PALIVBG3.mjs";
21
21
  export {
22
22
  CARD_NETWORK_OPTIONS,
23
23
  ConnectAccountsStep,
package/dist/pages.js CHANGED
@@ -4941,8 +4941,7 @@ var getDefaultEventListTabs = (labels) => {
4941
4941
  value: import_sdk2.Venue.hyperliquid,
4942
4942
  label: labels.venues.hyperliquid,
4943
4943
  venueLogo: import_sdk2.Venue.hyperliquid,
4944
- venues: [import_sdk2.Venue.hyperliquid],
4945
- isComingSoon: true
4944
+ venues: [import_sdk2.Venue.hyperliquid]
4946
4945
  }
4947
4946
  ];
4948
4947
  };
@@ -18183,18 +18182,20 @@ var formatChainIdLabel = (chainId) => {
18183
18182
 
18184
18183
  // src/pages/user-profile/components/available-balance-card.tsx
18185
18184
  var import_jsx_runtime138 = require("react/jsx-runtime");
18186
- var CHAIN_ID_TO_ICON = {
18187
- "1": "ethereum",
18188
- "10": "ethereum",
18189
- // Optimism (EVM)
18190
- "56": "ethereum",
18191
- // BNB Chain (EVM)
18192
- "137": "polygon",
18193
- "324": "ethereum",
18194
- // zkSync (EVM)
18195
- "8453": "base",
18196
- "42161": "arbitrum",
18197
- "792703809": "solana"
18185
+ var BASE_URL = "https://assets.snagsolutions.io";
18186
+ var CHAIN_ID_TO_ICON_URL = {
18187
+ "1": `${BASE_URL}/public/prediction-markets/logos/ETH.svg`,
18188
+ "10": `${BASE_URL}/public/prediction-markets/logos/ETH.svg`,
18189
+ // Optimism
18190
+ "56": `${BASE_URL}/public/prediction-markets/logos/BNB.svg`,
18191
+ "137": `${BASE_URL}/public/prediction-markets/logos/Polygon.svg`,
18192
+ "324": `${BASE_URL}/public/web/icons/chains/zksync/colored.svg`,
18193
+ // zkSync (no new logo)
18194
+ "747": `${BASE_URL}/public/prediction-markets/logos/Flow.svg`,
18195
+ "8453": `${BASE_URL}/public/prediction-markets/logos/Base.svg`,
18196
+ "42161": `${BASE_URL}/public/prediction-markets/logos/Arbitrum.svg`,
18197
+ "2741": `${BASE_URL}/public/prediction-markets/logos/Abstract.svg`,
18198
+ "792703809": `${BASE_URL}/public/prediction-markets/logos/Solana.svg`
18198
18199
  };
18199
18200
  var CHAIN_VENUE_MAP = {
18200
18201
  "137": ["polymarket"],
@@ -18204,17 +18205,19 @@ var CHAIN_VENUE_MAP = {
18204
18205
  "56": ["limitless", "opinion"]
18205
18206
  // BNB
18206
18207
  };
18207
- var chainIconName = (label2, key) => {
18208
- if (key && CHAIN_ID_TO_ICON[key]) return CHAIN_ID_TO_ICON[key];
18208
+ var chainIconUrl = (label2, key) => {
18209
+ if (key && CHAIN_ID_TO_ICON_URL[key]) return CHAIN_ID_TO_ICON_URL[key];
18209
18210
  const k = label2.trim().toLowerCase();
18210
- if (k.includes("polygon")) return "polygon";
18211
- if (k.includes("solana")) return "solana";
18212
- if (k.includes("base")) return "base";
18213
- if (k.includes("arbitrum")) return "arbitrum";
18214
- if (k.includes("optimism")) return "ethereum";
18215
- if (k.includes("bnb")) return "ethereum";
18216
- if (k.includes("zksync")) return "ethereum";
18217
- if (k.includes("ethereum") || k.includes("eth")) return "ethereum";
18211
+ if (k.includes("polygon")) return CHAIN_ID_TO_ICON_URL["137"];
18212
+ if (k.includes("solana")) return CHAIN_ID_TO_ICON_URL["792703809"];
18213
+ if (k.includes("base")) return CHAIN_ID_TO_ICON_URL["8453"];
18214
+ if (k.includes("arbitrum")) return CHAIN_ID_TO_ICON_URL["42161"];
18215
+ if (k.includes("bnb")) return CHAIN_ID_TO_ICON_URL["56"];
18216
+ if (k.includes("flow")) return CHAIN_ID_TO_ICON_URL["747"];
18217
+ if (k.includes("abstract")) return CHAIN_ID_TO_ICON_URL["2741"];
18218
+ if (k.includes("optimism")) return CHAIN_ID_TO_ICON_URL["10"];
18219
+ if (k.includes("zksync")) return CHAIN_ID_TO_ICON_URL["324"];
18220
+ if (k.includes("ethereum") || k.includes("eth")) return CHAIN_ID_TO_ICON_URL["1"];
18218
18221
  return void 0;
18219
18222
  };
18220
18223
  var AvailableBalanceCard = ({
@@ -18266,7 +18269,7 @@ var AvailableBalanceCard = ({
18266
18269
  /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "font-agg-sans text-agg-base leading-agg-6 font-agg-bold text-agg-foreground", children: "Balance by network" }),
18267
18270
  /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { role: "list", className: "agg-balance-list flex flex-col gap-3 w-full", children: chains.map((row) => {
18268
18271
  var _a;
18269
- const icon = chainIconName(row.label, row.key);
18272
+ const iconUrl = chainIconUrl(row.label, row.key);
18270
18273
  return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
18271
18274
  "div",
18272
18275
  {
@@ -18274,7 +18277,15 @@ var AvailableBalanceCard = ({
18274
18277
  className: "agg-balance-row flex items-center justify-between self-stretch gap-3 w-full",
18275
18278
  children: [
18276
18279
  /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
18277
- icon ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "flex h-4 w-4 items-center justify-center rounded-[4px]", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon, { name: icon, size: "small", className: "text-agg-foreground" }) }) : /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "flex h-4 w-4 items-center justify-center rounded-[4px] border border-agg-separator text-[10px] leading-3 text-agg-muted-foreground", children: row.label.slice(0, 2).toUpperCase() }),
18280
+ iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "overflow-clip flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px]", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
18281
+ "img",
18282
+ {
18283
+ src: iconUrl,
18284
+ alt: "",
18285
+ "aria-hidden": true,
18286
+ className: "size-full object-contain"
18287
+ }
18288
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] border border-agg-separator text-[10px] leading-3 text-agg-muted-foreground", children: row.label.slice(0, 2).toUpperCase() }),
18278
18289
  /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "truncate font-agg-sans text-agg-sm leading-5 font-agg-normal text-agg-foreground", children: row.label })
18279
18290
  ] }),
18280
18291
  /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("span", { className: "w-[100px] shrink-0 whitespace-nowrap text-right tabular-nums font-agg-sans text-agg-sm leading-agg-5 font-agg-bold text-agg-foreground", children: row.balance.toLocaleString("en-US", {
@@ -18307,24 +18318,24 @@ var AvailableBalanceCard = ({
18307
18318
  className: "agg-balance-trigger flex min-h-[20px] min-w-[20px] items-center gap-1 rounded-[6px] border-0 bg-agg-secondary-hover p-1.5",
18308
18319
  children: [
18309
18320
  (chains.slice(0, 4).length > 0 ? chains.slice(0, 4) : [{ key: "placeholder", label: "", balance: 0, accountCount: 0 }]).map((row) => {
18310
- const icon = chainIconName(row.label, row.key);
18311
- return icon ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
18321
+ const iconUrl = chainIconUrl(row.label, row.key);
18322
+ return iconUrl ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
18312
18323
  "span",
18313
18324
  {
18314
- className: "relative z-0 flex h-4 w-4 items-center justify-center rounded-[4px] bg-agg-secondary",
18315
- children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Icon, { name: icon, size: "small", className: "text-agg-foreground" })
18325
+ className: "overflow-clip relative flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] bg-agg-secondary",
18326
+ children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("img", { src: iconUrl, alt: row.label, className: "size-full object-contain" })
18316
18327
  },
18317
18328
  `icon-${row.key}`
18318
18329
  ) : /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
18319
18330
  "span",
18320
18331
  {
18321
- className: "relative z-0 flex h-4 w-4 items-center justify-center rounded-[4px] bg-agg-secondary text-[10px] leading-3 text-agg-muted-foreground",
18332
+ className: "relative flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] bg-agg-secondary text-[10px] leading-3 text-agg-muted-foreground",
18322
18333
  children: row.label ? row.label.slice(0, 2).toUpperCase() : ""
18323
18334
  },
18324
18335
  `icon-${row.key}`
18325
18336
  );
18326
18337
  }),
18327
- chains.length > 4 ? /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("span", { className: "relative z-0 flex h-4 w-4 items-center justify-center rounded-[4px] bg-agg-secondary font-agg-sans text-[10px] leading-3 text-agg-muted-foreground", children: [
18338
+ chains.length > 4 ? /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)("span", { className: "relative flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] bg-agg-secondary font-agg-sans text-[10px] leading-3 text-agg-muted-foreground", children: [
18328
18339
  "+",
18329
18340
  chains.length - 4
18330
18341
  ] }) : null
@@ -20529,7 +20540,7 @@ var UserProfilePage = ({
20529
20540
  const currentPriceCents = typeof displayCurrentPrice === "number" ? Math.round(displayCurrentPrice * 100) : null;
20530
20541
  const pnlPrefix = (displayPnlValue != null ? displayPnlValue : 0) >= 0 ? "+" : "";
20531
20542
  const pnlPercent = displayPnlPercent == null ? null : displayPnlPercent.toFixed(2);
20532
- const winningOutcomeIds = outcome.winner === true ? outcome.venueBreakdown.map((breakdown) => breakdown.venueMarketOutcomeId).filter((id) => !!id) : [];
20543
+ const winningOutcomeIds = outcome.winner === true ? outcome.venueBreakdown.map((breakdown) => breakdown.venueMarketOutcomeId) : [];
20533
20544
  return {
20534
20545
  id: `${group.targetMarketId}-${outcome.label}-${(_a2 = outcome.title) != null ? _a2 : ""}`,
20535
20546
  eventId,
package/dist/pages.mjs CHANGED
@@ -7,17 +7,17 @@ import {
7
7
  USER_PROFILE_TAB_POSITIONS,
8
8
  UserProfilePage,
9
9
  useHomePageModals
10
- } from "./chunk-XUYPM4LM.mjs";
11
- import "./chunk-E45WOOMN.mjs";
10
+ } from "./chunk-VH3DMH77.mjs";
11
+ import "./chunk-P2OOA3U3.mjs";
12
12
  import {
13
13
  DEPOSIT_MODAL_OPEN_EVENT,
14
14
  WITHDRAW_MODAL_OPEN_EVENT,
15
15
  requestAggDepositModalOpen,
16
16
  requestAggWithdrawModalOpen
17
- } from "./chunk-XCECYRTH.mjs";
18
- import "./chunk-TBKDLNOE.mjs";
19
- import "./chunk-5FXMHTVR.mjs";
20
- import "./chunk-34L7ZKJW.mjs";
17
+ } from "./chunk-6FVYER7E.mjs";
18
+ import "./chunk-ISAU6HX5.mjs";
19
+ import "./chunk-OFFJNHAG.mjs";
20
+ import "./chunk-PALIVBG3.mjs";
21
21
  export {
22
22
  DEPOSIT_MODAL_OPEN_EVENT,
23
23
  EventMarketPage,
@@ -95,7 +95,7 @@ import {
95
95
  typographyVariants,
96
96
  useToast,
97
97
  venueLogoNames
98
- } from "./chunk-34L7ZKJW.mjs";
98
+ } from "./chunk-PALIVBG3.mjs";
99
99
  export {
100
100
  ActivityChartIcon,
101
101
  AggErrorBoundary,