@gearbox-protocol/ui-kit 4.0.0-next.63 → 4.0.0-next.65
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/cjs/components/base/leverage-input/leverage-input.cjs +1 -1
- package/dist/cjs/components/base/leverage-preset-chips/leverage-preset-chips.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/graph/graph.cjs +1 -1
- package/dist/cjs/components/graph/series-config.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/components/trading-view/constants.cjs +1 -0
- package/dist/cjs/components/trading-view/index.cjs +1 -1
- package/dist/cjs/components/trading-view/price-scale-titles.cjs +1 -0
- package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/cjs/utils/format-leverage.cjs +1 -1
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/cjs/utils/leverage-presets.cjs +1 -1
- package/dist/esm/components/base/leverage-input/leverage-input.js +31 -31
- package/dist/esm/components/base/leverage-preset-chips/leverage-preset-chips.js +6 -6
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +30 -30
- package/dist/esm/components/graph/graph.js +257 -266
- package/dist/esm/components/graph/series-config.js +10 -1
- package/dist/esm/components/index.js +70 -68
- package/dist/esm/components/trading-view/constants.js +7 -0
- package/dist/esm/components/trading-view/index.js +4 -2
- package/dist/esm/components/trading-view/price-scale-titles.js +52 -0
- package/dist/esm/components/trading-view/trading-view.js +119 -115
- package/dist/esm/index.js +230 -227
- package/dist/esm/locale/en.json.js +1 -1
- package/dist/esm/utils/format-leverage.js +8 -3
- package/dist/esm/utils/index.js +18 -17
- package/dist/esm/utils/leverage-presets.js +4 -6
- package/dist/globals.css +1 -1
- package/dist/types/components/base/leverage-input/leverage-input.d.ts +2 -2
- package/dist/types/components/graph/graph.d.ts +1 -5
- package/dist/types/components/graph/series-config.d.ts +13 -0
- package/dist/types/components/trading-view/constants.d.ts +4 -0
- package/dist/types/components/trading-view/index.d.ts +1 -0
- package/dist/types/components/trading-view/price-scale-titles.d.ts +16 -0
- package/dist/types/components/trading-view/trading-view.d.ts +1 -1
- package/dist/types/locale/en.json.d.ts +1 -1
- package/dist/types/utils/format-leverage.d.ts +9 -1
- package/dist/types/utils/leverage-presets.d.ts +3 -1
- package/package.json +1 -1
- package/dist/cjs/components/base/leverage-preset-chips/format-chip-leverage.cjs +0 -1
- package/dist/esm/components/base/leverage-preset-chips/format-chip-leverage.js +0 -6
- package/dist/types/components/base/leverage-preset-chips/format-chip-leverage.d.ts +0 -5
|
@@ -21,7 +21,7 @@ const e = {
|
|
|
21
21
|
"components.apyParts.extraAPY": "{symbol} Incentive",
|
|
22
22
|
"components.apyParts.totalAPY": "Overall APY",
|
|
23
23
|
"components.yieldBreakdown.titleNetAtLeverage": "Net APY at {leverage}× Leverage",
|
|
24
|
-
"components.yieldBreakdown.titleNetAtLeverage7d": "Net APY at {leverage}× Leverage
|
|
24
|
+
"components.yieldBreakdown.titleNetAtLeverage7d": "Net APY (7d) at {leverage}× Leverage",
|
|
25
25
|
"components.yieldBreakdown.titleNet": "Net APY",
|
|
26
26
|
"components.yieldBreakdown.titleNet7d": "Net APY (7d)",
|
|
27
27
|
"components.yieldBreakdown.collateralApy": "Collateral APY",
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
function r(
|
|
2
|
-
return (Math.round(
|
|
1
|
+
function r(t) {
|
|
2
|
+
return (Math.round(t * 10) / 10).toFixed(1);
|
|
3
|
+
}
|
|
4
|
+
function n(t) {
|
|
5
|
+
const e = Math.round(t * 100);
|
|
6
|
+
return (e / 100).toFixed(e % 10 === 0 ? 1 : 2);
|
|
3
7
|
}
|
|
4
8
|
export {
|
|
5
|
-
r as formatLeverage
|
|
9
|
+
r as formatLeverage,
|
|
10
|
+
n as formatLeverageExact
|
|
6
11
|
};
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import { cn as o, cn as t } from "./cn.js";
|
|
2
|
-
import { APPROXIMATE_SYMBOL as
|
|
3
|
-
import { formatLeverage as x } from "./format-leverage.js";
|
|
4
|
-
import { formatMoney as
|
|
2
|
+
import { APPROXIMATE_SYMBOL as p, formatTimestamp as a, shortenHash as f } from "./format.js";
|
|
3
|
+
import { formatLeverage as x, formatLeverageExact as i } from "./format-leverage.js";
|
|
4
|
+
import { formatMoney as g, percentageTemplate as T } from "./format-money.js";
|
|
5
5
|
import { formatUsdPrice as l } from "./format-price.js";
|
|
6
|
-
import { slippageTemplate as
|
|
7
|
-
import { leveragePresets as
|
|
8
|
-
import { bnToLiquidationPriceView as u, parseInputToBN as
|
|
9
|
-
import { shortenString as
|
|
10
|
-
import { tokenTemplateString as
|
|
6
|
+
import { slippageTemplate as d } from "./format-slippage.js";
|
|
7
|
+
import { leveragePresets as L } from "./leverage-presets.js";
|
|
8
|
+
import { bnToLiquidationPriceView as u, parseInputToBN as v } from "./parse-input-to-bn.js";
|
|
9
|
+
import { shortenString as E } from "./shorten-string.js";
|
|
10
|
+
import { tokenTemplateString as N } from "./templates.js";
|
|
11
11
|
import { openInNewWindow as A } from "./window.js";
|
|
12
|
-
import { Z_INDEX as
|
|
12
|
+
import { Z_INDEX as O } from "./z-index.js";
|
|
13
13
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
p as APPROXIMATE_SYMBOL,
|
|
15
|
+
O as Z_INDEX,
|
|
16
16
|
u as bnToLiquidationPriceView,
|
|
17
17
|
o as cn,
|
|
18
18
|
t as default,
|
|
19
19
|
x as formatLeverage,
|
|
20
|
-
|
|
20
|
+
i as formatLeverageExact,
|
|
21
|
+
g as formatMoney,
|
|
21
22
|
a as formatTimestamp,
|
|
22
23
|
l as formatUsdPrice,
|
|
23
|
-
|
|
24
|
+
L as leveragePresets,
|
|
24
25
|
A as openInNewWindow,
|
|
25
|
-
|
|
26
|
+
v as parseInputToBN,
|
|
26
27
|
T as percentageTemplate,
|
|
27
28
|
f as shortenHash,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
E as shortenString,
|
|
30
|
+
d as slippageTemplate,
|
|
31
|
+
N as tokenTemplateString
|
|
31
32
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
function
|
|
2
|
-
const
|
|
3
|
-
return [
|
|
4
|
-
.../* @__PURE__ */ new Set([n(1 + 0.3 * (e - 1)), n(1 + 0.7 * (e - 1)), e])
|
|
5
|
-
];
|
|
1
|
+
function r(e) {
|
|
2
|
+
const t = (n) => Math.min(Math.round((1 + n * (e - 1)) * 2) / 2, e);
|
|
3
|
+
return [.../* @__PURE__ */ new Set([t(0.3), t(0.7), e])];
|
|
6
4
|
}
|
|
7
5
|
export {
|
|
8
|
-
|
|
6
|
+
r as leveragePresets
|
|
9
7
|
};
|