@gearbox-protocol/ui-kit 3.6.0-next.2 → 3.6.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 (49) hide show
  1. package/dist/cjs/components/composites/pool-table/columns.cjs +1 -1
  2. package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
  3. package/dist/cjs/components/graph/graph-view.cjs +1 -1
  4. package/dist/cjs/components/index.cjs +1 -1
  5. package/dist/cjs/components/pool-apy-tooltip/pool-apy-tooltip.cjs +1 -1
  6. package/dist/cjs/index.cjs +1 -1
  7. package/dist/cjs/locale/en.json.cjs +1 -1
  8. package/dist/esm/components/composites/pool-table/columns.js +175 -128
  9. package/dist/esm/components/compound-apy/compound-apy.js +1 -1
  10. package/dist/esm/components/graph/graph-view.js +38 -38
  11. package/dist/esm/components/index.js +378 -386
  12. package/dist/esm/components/pool-apy-tooltip/pool-apy-tooltip.js +75 -69
  13. package/dist/esm/index.js +481 -489
  14. package/dist/esm/locale/en.json.js +25 -10
  15. package/dist/globals.css +1 -1
  16. package/dist/types/components/composites/pool-table/columns.d.ts +18 -18
  17. package/dist/types/components/composites/pool-table/pool-table-backend-contract.types.d.ts +168 -17
  18. package/dist/types/components/index.d.ts +0 -2
  19. package/dist/types/components/pool-apy-tooltip/pool-apy-tooltip.d.ts +2 -1
  20. package/dist/types/index.d.ts +0 -2
  21. package/dist/types/locale/en.json.d.ts +23 -9
  22. package/package.json +2 -2
  23. package/dist/cjs/components/PoolCreditManagersTable/PoolCreditManagersLine.cjs +0 -1
  24. package/dist/cjs/components/PoolCreditManagersTable/TableHead.cjs +0 -1
  25. package/dist/cjs/components/PoolCreditManagersTable/constants.cjs +0 -1
  26. package/dist/cjs/components/PoolCreditManagersTable/index.cjs +0 -1
  27. package/dist/cjs/components/PoolCreditManagersTable/types.cjs +0 -1
  28. package/dist/cjs/components/PoolsAssetsTable/PoolAssetsLine.cjs +0 -1
  29. package/dist/cjs/components/PoolsAssetsTable/TableHead.cjs +0 -1
  30. package/dist/cjs/components/PoolsAssetsTable/index.cjs +0 -1
  31. package/dist/cjs/components/PoolsAssetsTable/types.cjs +0 -1
  32. package/dist/esm/components/PoolCreditManagersTable/PoolCreditManagersLine.js +0 -71
  33. package/dist/esm/components/PoolCreditManagersTable/TableHead.js +0 -52
  34. package/dist/esm/components/PoolCreditManagersTable/constants.js +0 -7
  35. package/dist/esm/components/PoolCreditManagersTable/index.js +0 -45
  36. package/dist/esm/components/PoolCreditManagersTable/types.js +0 -1
  37. package/dist/esm/components/PoolsAssetsTable/PoolAssetsLine.js +0 -107
  38. package/dist/esm/components/PoolsAssetsTable/TableHead.js +0 -52
  39. package/dist/esm/components/PoolsAssetsTable/index.js +0 -43
  40. package/dist/esm/components/PoolsAssetsTable/types.js +0 -1
  41. package/dist/types/components/PoolCreditManagersTable/PoolCreditManagersLine.d.ts +0 -11
  42. package/dist/types/components/PoolCreditManagersTable/TableHead.d.ts +0 -7
  43. package/dist/types/components/PoolCreditManagersTable/constants.d.ts +0 -4
  44. package/dist/types/components/PoolCreditManagersTable/index.d.ts +0 -14
  45. package/dist/types/components/PoolCreditManagersTable/types.d.ts +0 -22
  46. package/dist/types/components/PoolsAssetsTable/PoolAssetsLine.d.ts +0 -12
  47. package/dist/types/components/PoolsAssetsTable/TableHead.d.ts +0 -7
  48. package/dist/types/components/PoolsAssetsTable/index.d.ts +0 -13
  49. package/dist/types/components/PoolsAssetsTable/types.d.ts +0 -17
@@ -1 +1 @@
1
- "use strict";const e={"errors.networkError":"Network error. Can't fetch data","errors.incorrectAddressError":"Incorrect address. Please, check url","errors.noOpenedAccountsError":"You have no opened Credit Accounts. Perhaps, you have recently been liquidated? Check notification centre to see more.","errors.notFound":"Not found","errors.tooManyRequests":"Too many requests","errors.incorrectAddress":"Incorrect address","components.errorMessage.oops":"Oops...","components.alertModal.ok":"Ok","components.footer.privacy":"Privacy Notice","components.footer.terms":"Terms of Service","components.footer.disclosure":"Risk Disclosure Statement","components.footer.legalNotice":"Legal Notice","components.footer.legal":"Legal Info","components.footer.gearbox":"Copyright © Gearbox Foundation 2023-2026.","components.footer.built":"Built at ETHGlobal MarketMake hackathon.","components.footer.version":"Version {value}","components.liquidationPrice.check":"Check Area","components.loading.loading":"Loading","components.loading.loadingPercent":"Loading {percent}%","components.loading.wait":"Please wait...","components.smartNumberInput.balance":"Balance","components.smartNumberInput.inputTitle":"Token Amount","components.smartNumberInput.confirm.input":"Input","components.tipWindow.title":"Tip","components.healthFactor.low":"Extremely low! This HF may not cover possible oracle deviations.","components.headCell":"Sort by {value}","components.graphView.noData":"Can't get data for this graph","components.filterBlock.reset":"Reset All","components.filterModal.searchPlaceholder":"Search options...","components.filterModal.noOptionsAvailable":"No options available","components.filterModal.noOptionsMatchSearch":"No options match your search","components.filterModal.reset":"Reset","components.filterModal.apply":"Apply","components.APY.tip":"These APYs are derived from the underlying protocols’ APIs and may differ in reality. Check respective protocols for their methodology.","components.creditSessionDetailedLiquidation.graph.noData":"No data","components.creditSessionDetailedLiquidation.graph.legend.point":"Current price","components.creditSessionDetailedLiquidation.graph.legend.area":"Liquidation Area","components.creditSessionDetailedLiquidation.graph.tip.hf":"Health Factor","components.creditSessionDetailedLiquidation.graph.tip.price":"Price","components.creditSessionDetailedLiquidation.table.noData":"No data","components.creditSessionDetailedLiquidation.table.seeGraph":"See graph","components.creditSessionDetailedLiquidation.table.asset":"Asset","components.creditSessionDetailedLiquidation.table.currentPrice":"Current price","components.creditSessionDetailedLiquidation.table.modelPrice":"Model price","components.apyParts.features.points":"Points","components.apyParts.features.incent":"Incent.","components.apyParts.supplyAPY":"Organic APY","components.apyParts.title":"APY type","components.apyParts.supplyAPY.tip":"Yield from lending funds","components.apyParts.tokenYield":"Intrinsic APY","components.apyParts.tokenYield.tip":"Yield from holding wstETH","components.apyParts.extraAPY":"{symbol} Incentive","components.apyParts.extraAPY.tip":"Calculated at the current rate","components.apyParts.totalAPY":"Overall APY","components.apyParts.points":"{symbol} Incentive","components.apyParts.points.condition.crossDeposit":"For cross-chain deposits made via Omni","components.openCopyButtons.copy":"Copy to clipboard","components.poolAssetsTable.asset":"Asset","components.poolAssetsTable.rate":"Effective rate","components.poolAssetsTable.limits":"Limits Usage","components.poolAssetsTable.usage":"{amount} of {total}","components.poolAssetsTable.head.name":"Credit Manager","components.poolAssetsTable.head.currentDebt":"Current Debt","components.poolAssetsTable.head.assets":"Asset LT","components.poolCreditManagersTable.assets":"{amount} assets"};module.exports=e;
1
+ "use strict";const o={"errors.networkError":"Network error. Can't fetch data","errors.incorrectAddressError":"Incorrect address. Please, check url","errors.noOpenedAccountsError":"You have no opened Credit Accounts. Perhaps, you have recently been liquidated? Check notification centre to see more.","errors.notFound":"Not found","errors.tooManyRequests":"Too many requests","errors.incorrectAddress":"Incorrect address","components.errorMessage.oops":"Oops...","components.alertModal.ok":"Ok","components.footer.privacy":"Privacy Notice","components.footer.terms":"Terms of Service","components.footer.disclosure":"Risk Disclosure Statement","components.footer.legalNotice":"Legal Notice","components.footer.legal":"Legal Info","components.footer.gearbox":"Copyright © Gearbox Foundation 2023-2026.","components.footer.built":"Built at ETHGlobal MarketMake hackathon.","components.footer.version":"Version {value}","components.liquidationPrice.check":"Check Area","components.loading.loading":"Loading","components.loading.loadingPercent":"Loading {percent}%","components.loading.wait":"Please wait...","components.smartNumberInput.balance":"Balance","components.smartNumberInput.inputTitle":"Token Amount","components.smartNumberInput.confirm.input":"Input","components.tipWindow.title":"Tip","components.healthFactor.low":"Extremely low! This HF may not cover possible oracle deviations.","components.headCell":"Sort by {value}","components.graphView.noData":"Can't get data for this graph","components.filterBlock.reset":"Reset All","components.filterModal.searchPlaceholder":"Search options...","components.filterModal.noOptionsAvailable":"No options available","components.filterModal.noOptionsMatchSearch":"No options match your search","components.filterModal.reset":"Reset","components.filterModal.apply":"Apply","components.APY.tip":"These APYs are derived from the underlying protocols’ APIs and may differ in reality. Check respective protocols for their methodology.","components.creditSessionDetailedLiquidation.graph.noData":"No data","components.creditSessionDetailedLiquidation.graph.legend.point":"Current price","components.creditSessionDetailedLiquidation.graph.legend.area":"Liquidation Area","components.creditSessionDetailedLiquidation.graph.tip.hf":"Health Factor","components.creditSessionDetailedLiquidation.graph.tip.price":"Price","components.creditSessionDetailedLiquidation.table.noData":"No data","components.creditSessionDetailedLiquidation.table.seeGraph":"See graph","components.creditSessionDetailedLiquidation.table.asset":"Asset","components.creditSessionDetailedLiquidation.table.currentPrice":"Current price","components.creditSessionDetailedLiquidation.table.modelPrice":"Model price","components.apyParts.features.points":"Points","components.apyParts.features.incent":"Incent.","components.apyParts.supplyAPY":"Organic APY","components.apyParts.title":"APY type","components.apyParts.supplyAPY.tip":"Yield from lending funds","components.apyParts.tokenYield":"Intrinsic APY","components.apyParts.tokenYield.tip":"Yield from holding wstETH","components.apyParts.extraAPY":"{symbol} Incentive","components.apyParts.extraAPY.tip":"Calculated at the current rate","components.apyParts.totalAPY":"Overall APY","components.apyParts.points":"{symbol} Incentive","components.apyParts.points.condition.crossDeposit":"For cross-chain deposits made via Omni","components.openCopyButtons.copy":"Copy to clipboard","components.poolTable.pool":"Pool","components.poolTable.market":"Market","components.poolTable.description.universal":"Universal","components.poolTable.supply":"Supply","components.poolTable.borrowed":"Borrowed","components.poolTable.supplyApy":"Supply APY","components.poolTable.supplyApy.tip":"Annual percentage yield that you earn for supplying capital. This number constantly changes as the utilization of the Markets goes up and down","components.poolTable.depositApy":"Deposit APY","components.poolTable.depositApy.tip":"Deposit APY breakdown: base rate, extra rewards, and points","components.poolTable.borrowApy":"Borrow APY","components.poolTable.utilizationApy":"Utilization APY","components.poolTable.borrowApy.tip":"On top of the utilization borrow APY, there is a borrow quota APY for different assets","components.poolTable.utilization":"Utilization","components.poolTable.collateral":"Collateral","components.poolTable.collateral.showAll":"Show All","components.poolTable.balance":"Your Balance","components.poolTable.balance.tip":`You don't earn token rewards, only organic yield. Please migrate liquidity by using "Migrate" flow above.`,"components.poolTable.emptyList":"No Pools found","components.poolTable.notFound.dashboard":"You currently have no open Market positions.","components.poolTable.notFound.list":"No Markets found","components.poolTable.notFound.description.dashboard":"Choose earn above.","components.poolTable.notFound.description.list":"Choose another chain or toggle Show All Markets","components.poolTable.externalApy.tooltipShort":"{value} APY boost when depositing via {name}"};module.exports=o;
@@ -1,51 +1,66 @@
1
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
- import { AssetsListCell as w } from "../../assets-list-cell/assets-list-cell.js";
3
- import { CompoundAPY as y } from "../../compound-apy/compound-apy.js";
4
- import { Description as s } from "../../description/description.js";
5
- import { NetworkIcon as P } from "../../network-icon/network-icon.js";
6
- import { PercentIndicator as b } from "../../percent-indicator/percent-indicator.js";
7
- import { PoolAPYTooltip as T } from "../../pool-apy-tooltip/pool-apy-tooltip.js";
8
- import { PoolIndicatorIcon as k } from "../../pool-indicator-icon/pool-indicator-icon.js";
9
- import { PoolPointsIndicator as A } from "../../pool-points-indicator/pool-points-indicator.js";
10
- import { Skeleton as m } from "../../skeleton/skeleton.js";
1
+ import { jsx as i, jsxs as s } from "react/jsx-runtime";
2
+ import { AssetsListCell as A } from "../../assets-list-cell/assets-list-cell.js";
3
+ import { CompoundAPY as P } from "../../compound-apy/compound-apy.js";
4
+ import { Description as m } from "../../description/description.js";
5
+ import { NetworkIcon as C } from "../../network-icon/network-icon.js";
6
+ import { PercentIndicator as x } from "../../percent-indicator/percent-indicator.js";
7
+ import { PoolAPYTooltip as N } from "../../pool-apy-tooltip/pool-apy-tooltip.js";
8
+ import { PoolIndicatorIcon as v } from "../../pool-indicator-icon/pool-indicator-icon.js";
9
+ import { PoolPointsIndicator as D } from "../../pool-points-indicator/pool-points-indicator.js";
10
+ import { Skeleton as u } from "../../skeleton/skeleton.js";
11
11
  import "react";
12
12
  import "@gearbox-protocol/sdk";
13
13
  import "clsx";
14
14
  import "tailwind-merge";
15
15
  import "sonner";
16
- import { percentageTemplate as C, formatMoney as u } from "../../../utils/format-money.js";
17
- import { tokenTemplate as h } from "../../../utils/templates.js";
16
+ import { percentageTemplate as I, formatMoney as p } from "../../../utils/format-money.js";
17
+ import { tokenTemplate as f } from "../../../utils/templates.js";
18
18
  import "luxon";
19
19
  import "../../../utils/z-index.js";
20
- import { TokenSymbol as x } from "../../token-symbol/token-symbol.js";
21
- function N({ ctx: e }) {
22
- const { pool: l, underlyingToken: r, points: t, apy: o, isMobile: n } = e, d = n ? 20 : 24, c = /* @__PURE__ */ i(x, { token: r, size: d });
23
- return t && t.length > 0 && o ? /* @__PURE__ */ i(
24
- T,
20
+ import { TokenSymbol as Y } from "../../token-symbol/token-symbol.js";
21
+ import { FormattedMessageTyped as h } from "../../typed-intl/index.js";
22
+ function a(e, l, o) {
23
+ const t = e?.header ?? /* @__PURE__ */ i(
24
+ h,
25
25
  {
26
- totalAPY: o.totalAPY,
27
- baseAPY: o.baseAPY,
28
- extraAPY: o.extraAPY,
26
+ messageId: e?.headerMessageId ?? l
27
+ }
28
+ );
29
+ let r;
30
+ if (e?.headerTip !== null) {
31
+ const n = e?.headerTipMessageId ?? o;
32
+ r = e?.headerTip ?? (n && /* @__PURE__ */ i(h, { messageId: n }));
33
+ }
34
+ return { header: t, headerTip: r, mobileTitle: e?.mobileTitle ?? t };
35
+ }
36
+ function z({ ctx: e }) {
37
+ const { pool: l, underlyingToken: o, points: t, apy: r, isMobile: n } = e, d = n ? 20 : 24, c = /* @__PURE__ */ i(Y, { token: o, size: d });
38
+ return t && t.length > 0 && r ? /* @__PURE__ */ i(
39
+ N,
40
+ {
41
+ totalAPY: r.totalAPY,
42
+ baseAPY: r.baseAPY,
43
+ extraAPY: r.extraAPY,
29
44
  points: t,
30
45
  tokensList: e.tokensList,
31
- children: /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(k, { size: d, children: c }) })
46
+ children: /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(v, { size: d, children: c }) })
32
47
  }
33
- ) : l.hasPoints ? /* @__PURE__ */ i(A, { size: d, children: c }) : c;
48
+ ) : l.hasPoints ? /* @__PURE__ */ i(D, { size: d, children: c }) : c;
34
49
  }
35
- function Y(e) {
36
- const l = e.underlyingToken?.title ?? e.underlyingToken?.symbol ?? "", r = e.pool.version;
37
- return r && r >= 300 && r < 310 ? `${l} v${Math.floor(r / 100)}` : l;
50
+ function B(e) {
51
+ const l = e.underlyingToken?.title ?? e.underlyingToken?.symbol ?? "", o = e.pool.version;
52
+ return o && o >= 300 && o < 310 ? `${l} v${Math.floor(o / 100)}` : l;
38
53
  }
39
- function v({
54
+ function M({
40
55
  ctx: e,
41
56
  renderDescription: l,
42
- getPoolName: r
57
+ getPoolName: o
43
58
  }) {
44
- const { pool: t } = e, o = r ? r(e) : Y(e);
45
- return /* @__PURE__ */ a("div", { className: "grid grid-cols-[auto_1fr] gap-x-3", children: [
46
- /* @__PURE__ */ a("div", { className: "flex items-center gap-3 shrink-0 leading-0", children: [
59
+ const { pool: t } = e, r = o ? o(e) : B(e);
60
+ return /* @__PURE__ */ s("div", { className: "grid grid-cols-[auto_1fr] gap-x-3", children: [
61
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-3 shrink-0 leading-0", children: [
47
62
  t.network && /* @__PURE__ */ i(
48
- P,
63
+ C,
49
64
  {
50
65
  network: t.network,
51
66
  isTest: !1,
@@ -53,196 +68,228 @@ function v({
53
68
  showTooltip: !0
54
69
  }
55
70
  ),
56
- /* @__PURE__ */ i(N, { ctx: e })
71
+ /* @__PURE__ */ i(z, { ctx: e })
57
72
  ] }),
58
- /* @__PURE__ */ a("div", { className: "flex md:flex-col min-w-0 overflow-hidden items-center md:items-start gap-2 md:gap-0", children: [
59
- /* @__PURE__ */ i("span", { className: "truncate max-w-full", children: o }),
60
- l && /* @__PURE__ */ i(s, { className: "min-w-0 text-xs", children: l(e) })
73
+ /* @__PURE__ */ s("div", { className: "flex md:flex-col min-w-0 overflow-hidden items-center md:items-start gap-2 md:gap-0", children: [
74
+ /* @__PURE__ */ i("span", { className: "truncate max-w-full", children: r }),
75
+ l && /* @__PURE__ */ i(m, { className: "min-w-0 text-xs", children: l(e) })
61
76
  ] })
62
77
  ] });
63
78
  }
64
- function D({ ctx: e }) {
65
- const { pool: l, underlyingToken: r, loading: t } = e;
66
- return /* @__PURE__ */ a("div", { className: "flex flex-col items-start md:items-end", children: [
67
- /* @__PURE__ */ i(m, { loading: !!t, width: 60, children: u(l.expectedLiquidityInUSD ?? 0) }),
68
- /* @__PURE__ */ i(s, { children: h(
79
+ function S({ ctx: e }) {
80
+ const { pool: l, underlyingToken: o, loading: t } = e;
81
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-start md:items-end", children: [
82
+ /* @__PURE__ */ i(u, { loading: !!t, width: 60, children: p(l.expectedLiquidityInUSD ?? 0) }),
83
+ /* @__PURE__ */ i(m, { children: f(
69
84
  l.expectedLiquidity,
70
- r
85
+ o
71
86
  ) })
72
87
  ] });
73
88
  }
74
- function B({ ctx: e }) {
75
- const { pool: l, underlyingToken: r, loading: t } = e;
76
- return /* @__PURE__ */ a("div", { className: "flex flex-col items-start md:items-end", children: [
77
- /* @__PURE__ */ i(m, { loading: !!t, width: 60, children: u(l.totalBorrowedInUSD ?? 0) }),
78
- /* @__PURE__ */ i(s, { children: h(
89
+ function F({ ctx: e }) {
90
+ const { pool: l, underlyingToken: o, loading: t } = e;
91
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-start md:items-end", children: [
92
+ /* @__PURE__ */ i(u, { loading: !!t, width: 60, children: p(l.totalBorrowedInUSD ?? 0) }),
93
+ /* @__PURE__ */ i(m, { children: f(
79
94
  l.totalBorrowed,
80
- r
95
+ o
81
96
  ) })
82
97
  ] });
83
98
  }
84
- function S({ ctx: e }) {
85
- const { pool: l, loading: r, underlyingToken: t } = e, o = t?.decimals ?? 18, n = l.poolTokenSymbol != null ? {
99
+ function L({ ctx: e }) {
100
+ const { pool: l, loading: o, underlyingToken: t } = e, r = t?.decimals ?? 18, n = l.poolTokenSymbol != null ? {
86
101
  title: l.poolTokenSymbol,
87
- decimals: o
102
+ decimals: r
88
103
  } : t;
89
- return /* @__PURE__ */ a("div", { className: "flex flex-col items-start md:items-end", children: [
90
- /* @__PURE__ */ i(m, { loading: !!r, width: 60, children: u(l.userBalanceInUSD ?? 0) }),
91
- l.userBalance !== void 0 && n && /* @__PURE__ */ i(s, { children: h(l.userBalance, n) })
104
+ return /* @__PURE__ */ s("div", { className: "flex flex-col items-start md:items-end", children: [
105
+ /* @__PURE__ */ i(u, { loading: !!o, width: 60, children: p(l.userBalanceInUSD ?? 0) }),
106
+ l.userBalance !== void 0 && n && /* @__PURE__ */ i(m, { children: f(l.userBalance, n) })
92
107
  ] });
93
108
  }
94
- function z(e, l) {
95
- const r = e.pool.collateralTokens, { tokensList: t, isMobile: o } = e;
96
- return !r?.length || !t ? null : /* @__PURE__ */ i(
97
- w,
109
+ function j(e, l) {
110
+ const o = e.pool.collateralTokens, { tokensList: t, isMobile: r } = e;
111
+ return !o?.length || !t ? null : /* @__PURE__ */ i(
112
+ A,
98
113
  {
99
114
  maxAssets: l,
100
115
  tokensList: t,
101
- balances: r.map((n) => ({ token: n })),
102
- iconSize: o ? 20 : 24,
116
+ balances: o.map((n) => ({ token: n })),
117
+ iconSize: r ? 20 : 24,
103
118
  options: { mode: "cascade" }
104
119
  }
105
120
  );
106
121
  }
107
- function Z(e) {
122
+ function re(e) {
123
+ const { header: l, mobileTitle: o } = a(
124
+ e,
125
+ "components.poolTable.pool"
126
+ );
108
127
  return {
109
128
  id: "pool",
110
- header: e?.header ?? "Pool",
129
+ header: l,
111
130
  width: e?.width ?? "186px",
112
131
  align: "left",
113
132
  className: "pl-4",
114
- cell: (l) => /* @__PURE__ */ i(
115
- v,
133
+ cell: (t) => /* @__PURE__ */ i(
134
+ M,
116
135
  {
117
- ctx: l,
136
+ ctx: t,
118
137
  renderDescription: e?.renderDescription,
119
138
  getPoolName: e?.getPoolName
120
139
  }
121
140
  ),
122
- mobileTitle: e?.header ?? "Pool"
141
+ mobileTitle: o
123
142
  };
124
143
  }
125
- function ee(e) {
144
+ function ne(e) {
145
+ const { header: l, mobileTitle: o } = a(
146
+ e,
147
+ "components.poolTable.supply"
148
+ );
126
149
  return {
127
150
  id: "supply",
128
- header: e?.header ?? "Supply",
151
+ header: l,
129
152
  width: e?.width ?? "1fr",
130
153
  align: "right",
131
154
  hideOnMedium: e?.hideOnMedium,
132
155
  sort: e?.sortField !== void 0 ? { field: e.sortField, defaultDirection: "desc" } : { field: "supply", defaultDirection: "desc" },
133
- cell: (l) => /* @__PURE__ */ i(D, { ctx: l }),
134
- mobileTitle: e?.header ?? "Supply"
156
+ cell: (t) => /* @__PURE__ */ i(S, { ctx: t }),
157
+ mobileTitle: o
135
158
  };
136
159
  }
137
- function le(e) {
160
+ function ae(e) {
161
+ const { header: l, headerTip: o, mobileTitle: t } = a(
162
+ e,
163
+ "components.poolTable.supplyApy",
164
+ "components.poolTable.supplyApy.tip"
165
+ );
138
166
  return {
139
167
  id: "supplyApy",
140
- header: e?.header ?? "Supply APY",
141
- headerTip: e?.headerTip,
168
+ header: l,
169
+ headerTip: o,
142
170
  width: e?.width ?? "1.25fr",
143
171
  align: "right",
144
172
  sort: e?.sortField !== void 0 ? { field: e.sortField, defaultDirection: "desc" } : { field: "apy", defaultDirection: "desc" },
145
- cell: (l) => {
146
- const { apy: r, loading: t, points: o, tokensList: n } = l, {
147
- totalAPY: d = 0,
148
- baseAPY: c = [],
149
- extraAPY: f = [],
150
- externalAPY: p,
151
- apy7DAgo: g
152
- } = r ?? {};
153
- return /* @__PURE__ */ i(m, { width: 60, loading: !!t, children: /* @__PURE__ */ i(
154
- y,
173
+ cell: (r) => {
174
+ const { apy: n, loading: d, points: c, tokensList: g } = r, {
175
+ totalAPY: b = 0,
176
+ baseAPY: T = [],
177
+ extraAPY: w = [],
178
+ externalAPY: y,
179
+ apy7DAgo: k
180
+ } = n ?? {};
181
+ return /* @__PURE__ */ i(u, { width: 60, loading: !!d, children: /* @__PURE__ */ i(
182
+ P,
155
183
  {
156
- totalAPY: d,
157
- totalAPYLoading: !!t,
158
- baseAPY: c,
159
- extraAPY: f,
160
- points: o,
161
- apy7DAgo: g,
162
- tokensList: n,
163
- externalAPY: p
184
+ totalAPY: b,
185
+ totalAPYLoading: !!d,
186
+ baseAPY: T,
187
+ extraAPY: w,
188
+ points: c,
189
+ apy7DAgo: k,
190
+ tokensList: g,
191
+ externalAPY: y
164
192
  }
165
193
  ) });
166
194
  },
167
- mobileTitle: e?.header ?? "Supply APY"
195
+ mobileTitle: t
168
196
  };
169
197
  }
170
- function re(e) {
198
+ function de(e) {
199
+ const { header: l, mobileTitle: o } = a(
200
+ e,
201
+ "components.poolTable.borrowed"
202
+ );
171
203
  return {
172
204
  id: "borrowed",
173
- header: e?.header ?? "Borrowed",
205
+ header: l,
174
206
  width: e?.width ?? "1.15fr",
175
207
  align: "right",
176
- cell: (l) => /* @__PURE__ */ i(B, { ctx: l }),
177
- mobileTitle: e?.header ?? "Borrowed"
208
+ cell: (t) => /* @__PURE__ */ i(F, { ctx: t }),
209
+ mobileTitle: o
178
210
  };
179
211
  }
180
- function ie(e) {
212
+ function se(e) {
213
+ const { header: l, headerTip: o, mobileTitle: t } = a(
214
+ e,
215
+ "components.poolTable.borrowApy"
216
+ );
181
217
  return {
182
218
  id: "borrowApy",
183
- header: e?.header ?? "Borrow APY",
184
- headerTip: e?.headerTip,
219
+ header: l,
220
+ headerTip: o,
185
221
  width: e?.width ?? "150px",
186
222
  align: "right",
187
- cell: (l) => {
188
- const r = l.pool.borrowAPY ?? e?.getBorrowRate?.(l.pool) ?? 0;
189
- return /* @__PURE__ */ i("div", { className: "flex justify-start md:justify-end", children: C(r) });
223
+ cell: (r) => {
224
+ const n = r.pool.borrowAPY ?? e?.getBorrowRate?.(r.pool) ?? 0;
225
+ return /* @__PURE__ */ i("div", { className: "flex justify-start md:justify-end", children: I(n) });
190
226
  },
191
- mobileTitle: e?.header ?? "Borrow APY"
227
+ mobileTitle: t
192
228
  };
193
229
  }
194
- function te(e) {
230
+ function ce(e) {
231
+ const { header: l, mobileTitle: o } = a(
232
+ e,
233
+ "components.poolTable.utilization"
234
+ );
195
235
  return {
196
236
  id: "utilization",
197
- header: e?.header ?? "Utilization",
237
+ header: l,
198
238
  width: e?.width ?? "150px",
199
239
  align: "right",
200
240
  className: "pr-4",
201
241
  sort: e?.sortField !== void 0 ? { field: e.sortField, defaultDirection: "desc" } : { field: "utilization", defaultDirection: "desc" },
202
- cell: (l) => {
203
- const r = l.pool.utilization ?? 0;
204
- return /* @__PURE__ */ i("div", { className: "flex justify-start md:justify-end", children: /* @__PURE__ */ i(b, { percent: r }) });
242
+ cell: (t) => {
243
+ const r = t.pool.utilization ?? 0;
244
+ return /* @__PURE__ */ i("div", { className: "flex justify-start md:justify-end", children: /* @__PURE__ */ i(x, { percent: r }) });
205
245
  },
206
- mobileTitle: e?.header ?? "Utilization"
246
+ mobileTitle: o
207
247
  };
208
248
  }
209
- function oe(e) {
210
- const l = e?.maxAssets ?? 5, r = (t) => z(t, l);
249
+ function me(e) {
250
+ const l = e?.maxAssets ?? 5, o = (n) => j(n, l), { header: t, mobileTitle: r } = a(
251
+ e,
252
+ "components.poolTable.collateral"
253
+ );
211
254
  return {
212
255
  id: "collateral",
213
- header: e?.header ?? "Collateral",
256
+ header: t,
214
257
  width: e?.width ?? "148px",
215
258
  align: e?.align ?? "left",
216
259
  gapBefore: e?.gapBefore ?? "md",
217
- cell: e?.cell ?? r,
218
- mobileCell: e?.mobileCell ?? e?.cell ?? r,
219
- mobileTitle: e?.header ?? "Collateral"
260
+ cell: e?.cell ?? o,
261
+ mobileCell: e?.mobileCell ?? e?.cell ?? o,
262
+ mobileTitle: r
220
263
  };
221
264
  }
222
- function ne(e) {
265
+ function ue(e) {
266
+ const { header: l, mobileTitle: o } = a(
267
+ e,
268
+ "components.poolTable.balance"
269
+ );
223
270
  return {
224
271
  id: "balance",
225
- header: e?.header ?? "Your Balance",
272
+ header: l,
226
273
  width: e?.width ?? "1.15fr",
227
274
  align: "right",
228
275
  className: e?.className ?? "pr-4",
229
276
  headerClassName: e?.headerClassName ?? "pr-4",
230
277
  sort: e?.sortField !== void 0 ? { field: e.sortField, defaultDirection: "desc" } : { field: "balance", defaultDirection: "desc" },
231
- cell: e?.cell ?? ((l) => /* @__PURE__ */ i(S, { ctx: l })),
232
- mobileTitle: e?.header ?? "Your Balance"
278
+ cell: e?.cell ?? ((t) => /* @__PURE__ */ i(L, { ctx: t })),
279
+ mobileTitle: o
233
280
  };
234
281
  }
235
- function ae(e) {
282
+ function pe(e) {
236
283
  return e;
237
284
  }
238
285
  export {
239
- ne as balanceColumn,
240
- ie as borrowApyColumn,
241
- re as borrowedColumn,
242
- oe as collateralColumn,
243
- ae as customColumn,
244
- Z as poolColumn,
245
- le as supplyApyColumn,
246
- ee as supplyColumn,
247
- te as utilizationColumn
286
+ ue as balanceColumn,
287
+ se as borrowApyColumn,
288
+ de as borrowedColumn,
289
+ me as collateralColumn,
290
+ pe as customColumn,
291
+ re as poolColumn,
292
+ ae as supplyApyColumn,
293
+ ne as supplyColumn,
294
+ ce as utilizationColumn
248
295
  };
@@ -132,7 +132,6 @@ import "../navbar/navbar-indicator-context.js";
132
132
  import "../app-bar/app-bar.js";
133
133
  import "../navitem/navitem.js";
134
134
  import "../simple-dropdown/simple-dropdown.js";
135
- import "../vertical-indicator/vertical-indicator.js";
136
135
  import "../progress-bar/progress-bar.js";
137
136
  import "../radio-group/radio-group.js";
138
137
  import "../search-bar/search-bar.js";
@@ -160,6 +159,7 @@ import "../time-to-liquidation/time-to-liquidation.js";
160
159
  import "../tip-card/tip-card.js";
161
160
  import "../toggle/toggle.js";
162
161
  import "../typography/typography.js";
162
+ import "../vertical-indicator/vertical-indicator.js";
163
163
  import "../vertical-list/vertical-list.js";
164
164
  import "../with-filter-button/with-filter-button.js";
165
165
  function G(i, p) {
@@ -2,8 +2,8 @@ import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
2
  import { cva as A } from "class-variance-authority";
3
3
  import * as B from "react";
4
4
  import { useMemo as D, useRef as N, useState as M, useEffect as E } from "react";
5
- import { ArcLoader as I } from "../arc-loader/arc-loader.js";
6
- import { cn as j } from "../../utils/cn.js";
5
+ import { SpinnerLoader as I } from "../spinner-loader/spinner-loader.js";
6
+ import { cn as y } from "../../utils/cn.js";
7
7
  import { Graph as O } from "./graph.js";
8
8
  const q = A(
9
9
  "relative w-full overflow-hidden rounded-lg border-border border bg-card text-card-foreground",
@@ -35,41 +35,41 @@ const q = A(
35
35
  padding: "default"
36
36
  }
37
37
  }
38
- ), y = B.forwardRef(
38
+ ), R = B.forwardRef(
39
39
  ({
40
40
  className: n,
41
41
  variant: t,
42
42
  size: l,
43
43
  padding: m,
44
- title: r,
45
- description: s,
46
- toolbar: a,
44
+ title: a,
45
+ description: r,
46
+ toolbar: s,
47
47
  loading: i = !1,
48
48
  emptyMessage: d,
49
49
  error: c,
50
50
  children: f,
51
51
  ...p
52
52
  }, x) => {
53
- const u = r || s || a;
53
+ const u = a || r || s;
54
54
  return /* @__PURE__ */ o(
55
55
  "div",
56
56
  {
57
57
  ref: x,
58
- className: j(
58
+ className: y(
59
59
  "flex flex-col",
60
60
  q({ variant: t, size: l, padding: m, className: n })
61
61
  ),
62
62
  ...p,
63
63
  children: [
64
64
  u && /* @__PURE__ */ o("div", { className: "mb-4 flex items-start justify-between gap-4 shrink-0", children: [
65
- (r || s) && /* @__PURE__ */ o("div", { className: "flex-1", children: [
66
- r && /* @__PURE__ */ e("h3", { className: "text-base sm:text-lg font-semibold leading-none tracking-tight", children: r }),
67
- s && /* @__PURE__ */ e("p", { className: "mt-1 text-xs sm:text-sm text-muted-foreground", children: s })
65
+ (a || r) && /* @__PURE__ */ o("div", { className: "flex-1", children: [
66
+ a && /* @__PURE__ */ e("h3", { className: "text-base sm:text-lg font-semibold leading-none tracking-tight", children: a }),
67
+ r && /* @__PURE__ */ e("p", { className: "mt-1 text-xs sm:text-sm text-muted-foreground", children: r })
68
68
  ] }),
69
- a && /* @__PURE__ */ e("div", { className: "shrink-0 w-full", children: a })
69
+ s && /* @__PURE__ */ e("div", { className: "shrink-0 w-full", children: s })
70
70
  ] }),
71
71
  /* @__PURE__ */ o("div", { className: "relative flex-1 w-full min-h-0", children: [
72
- i && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-10 flex items-center justify-center opacity-0 animate-delayed-fade-in", children: /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ e(I, { size: 32, strokeWidth: 3 }) }) }),
72
+ i && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-10 flex items-center justify-center opacity-0 animate-delayed-fade-in", children: /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ e(I, { size: 32, width: 3 }) }) }),
73
73
  c && /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ o("div", { className: "flex flex-col items-center gap-2 text-destructive", children: [
74
74
  /* @__PURE__ */ e(
75
75
  "svg",
@@ -117,7 +117,7 @@ const q = A(
117
117
  /* @__PURE__ */ e(
118
118
  "div",
119
119
  {
120
- className: j(
120
+ className: y(
121
121
  "w-full h-full transition-[filter] duration-300 delay-300",
122
122
  i && "blur-sm pointer-events-none"
123
123
  ),
@@ -130,15 +130,15 @@ const q = A(
130
130
  );
131
131
  }
132
132
  );
133
- y.displayName = "GraphView";
133
+ R.displayName = "GraphView";
134
134
  function X({
135
135
  series: n,
136
136
  data: t,
137
137
  lineColor: l,
138
138
  color: m,
139
- topColor: r,
140
- bottomColor: s,
141
- graphId: a,
139
+ topColor: a,
140
+ bottomColor: r,
141
+ graphId: s,
142
142
  onUnselectSeries: i,
143
143
  loading: d,
144
144
  title: c,
@@ -146,8 +146,8 @@ function X({
146
146
  toolbar: p,
147
147
  emptyMessage: x = "No data available",
148
148
  error: u,
149
- containerClassName: R,
150
- variant: V,
149
+ containerClassName: V,
150
+ variant: W,
151
151
  size: z,
152
152
  padding: G,
153
153
  yMeasureUnit: g,
@@ -158,7 +158,7 @@ function X({
158
158
  if (n && n.length > 0)
159
159
  return n;
160
160
  if (t && t.length > 0) {
161
- const W = l ?? m;
161
+ const j = l ?? m;
162
162
  return [
163
163
  {
164
164
  data: t.map((v) => ({
@@ -167,21 +167,21 @@ function X({
167
167
  })),
168
168
  label: "Value",
169
169
  yMeasureUnit: g,
170
- ...W && { lineColor: W },
171
- ...r && { topColor: r },
172
- ...s && { bottomColor: s }
170
+ ...j && { lineColor: j },
171
+ ...a && { topColor: a },
172
+ ...r && { bottomColor: r }
173
173
  }
174
174
  ];
175
175
  }
176
176
  return [];
177
- }, [n, t, g, l, m, r, s]), H = !d && h.length === 0, b = N(h);
177
+ }, [n, t, g, l, m, a, r]), S = !d && h.length === 0, b = N(h);
178
178
  h.length > 0 && (b.current = h);
179
- const k = d && h.length === 0 ? b.current : h, S = k.length > 0;
179
+ const k = d && h.length === 0 ? b.current : h, H = k.length > 0;
180
180
  return /* @__PURE__ */ e(
181
- y,
181
+ R,
182
182
  {
183
- className: R,
184
- variant: V,
183
+ className: V,
184
+ variant: W,
185
185
  size: z,
186
186
  padding: G,
187
187
  title: c,
@@ -189,8 +189,8 @@ function X({
189
189
  toolbar: p,
190
190
  loading: d,
191
191
  error: u,
192
- emptyMessage: H ? x : void 0,
193
- children: S && !u && /* @__PURE__ */ e(
192
+ emptyMessage: S ? x : void 0,
193
+ children: H && !u && /* @__PURE__ */ e(
194
194
  O,
195
195
  {
196
196
  series: k,
@@ -204,21 +204,21 @@ function X({
204
204
  );
205
205
  }
206
206
  function Y(n = 0) {
207
- const t = N(null), l = N(null), [m, r] = M(null);
207
+ const t = N(null), l = N(null), [m, a] = M(null);
208
208
  return E(() => {
209
- const s = () => {
209
+ const r = () => {
210
210
  if (t.current && l.current) {
211
211
  const d = l.current.clientWidth, c = t.current.clientWidth;
212
- r(d - c - n);
212
+ a(d - c - n);
213
213
  }
214
- }, a = l.current, i = a ? new ResizeObserver(s) : null;
215
- return a && i?.observe(a), () => {
216
- a && i?.unobserve(a);
214
+ }, s = l.current, i = s ? new ResizeObserver(r) : null;
215
+ return s && i?.observe(s), () => {
216
+ s && i?.unobserve(s);
217
217
  };
218
218
  }, [n]), { graphWidth: m, parentRef: l, asideRef: t };
219
219
  }
220
220
  export {
221
- y as GraphView,
221
+ R as GraphView,
222
222
  X as GraphViewWithData,
223
223
  q as graphViewVariants,
224
224
  Y as useGraphAside