@gearbox-protocol/ui-kit 4.0.0-next.20 → 4.0.0-next.22
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/position-assets/position-assets.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/constants.cjs +1 -1
- package/dist/cjs/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.cjs +1 -1
- package/dist/cjs/components/base/values/scalars.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table-row.cjs +1 -1
- package/dist/cjs/components/composites/pool-assets-table/pool-assets-table.cjs +1 -1
- package/dist/cjs/components/compound-apy/compound-apy.cjs +1 -1
- package/dist/cjs/components/yield-breakdown-tooltip/yield-breakdown-tooltip.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/esm/components/base/position-assets/position-assets.js +62 -39
- package/dist/esm/components/base/strategy-apy-breakdown-card/constants.js +7 -3
- package/dist/esm/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.js +140 -166
- package/dist/esm/components/base/values/scalars.js +40 -35
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table-row.js +60 -61
- package/dist/esm/components/composites/pool-assets-table/pool-assets-table.js +22 -24
- package/dist/esm/components/compound-apy/compound-apy.js +24 -23
- package/dist/esm/components/yield-breakdown-tooltip/yield-breakdown-tooltip.js +15 -15
- package/dist/esm/index.js +88 -91
- package/dist/esm/locale/en.json.js +3 -7
- package/dist/esm/utils/index.js +48 -51
- package/dist/globals.css +1 -1
- package/dist/types/components/base/position-assets/position-assets.d.ts +19 -13
- package/dist/types/components/base/strategy-apy-breakdown-card/constants.d.ts +5 -1
- package/dist/types/components/base/strategy-apy-breakdown-card/strategy-apy-breakdown-card.d.ts +39 -14
- package/dist/types/components/base/values/scalars.d.ts +17 -2
- package/dist/types/components/composites/pool-assets-table/pool-assets-table-row.d.ts +1 -2
- package/dist/types/components/composites/pool-assets-table/pool-assets-table.d.ts +1 -2
- package/dist/types/components/compound-apy/compound-apy.d.ts +11 -1
- package/dist/types/locale/en.json.d.ts +1 -6
- package/dist/types/utils/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/cjs/utils/strategy-apy.cjs +0 -1
- package/dist/esm/utils/strategy-apy.js +0 -51
- package/dist/types/utils/strategy-apy.d.ts +0 -40
package/dist/esm/utils/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { generateId as r, useFormFieldIds as t } from "./a11y.js";
|
|
2
|
-
import { pointProgramsOf as m, positiveTokenRewardsOf as n, tokenRewardsOf as
|
|
3
|
-
import { bnToInputView as
|
|
2
|
+
import { pointProgramsOf as m, positiveTokenRewardsOf as n, tokenRewardsOf as i, totalApyOf as p } from "./apy-breakdown.js";
|
|
3
|
+
import { bnToInputView as l } from "./bn-to-input-view.js";
|
|
4
4
|
import { bnToPrettyView as x } from "./bn-to-pretty-view.js";
|
|
5
|
-
import { bpsToPercent as
|
|
5
|
+
import { bpsToPercent as c } from "./bps.js";
|
|
6
6
|
import { cn as S, cn as d } from "./cn.js";
|
|
7
|
-
import { generateColorsFromBase as h, getCSSVariable as
|
|
7
|
+
import { generateColorsFromBase as h, getCSSVariable as v, hexToRgba as P, hslToHex as b, resolveCSSColor as A } from "./colors.js";
|
|
8
8
|
import { copyToClipboard as N } from "./copy.js";
|
|
9
|
-
import { convertPercent as
|
|
9
|
+
import { convertPercent as L, formatBytecodeSize as y, formatBytecodeVersion as C, formatTimestamp as w, shortenHash as F, significantTrunc as D } from "./format.js";
|
|
10
10
|
import { formatAssetAmount as V } from "./format-asset-amount.js";
|
|
11
11
|
import { formatLeverage as M } from "./format-leverage.js";
|
|
12
12
|
import { formatCompactPercent as _, formatMoney as E, formatMoneyAmount as H, formatPercentAmount as W, percentTemplate as Z, percentageTemplate as z } from "./format-money.js";
|
|
@@ -14,42 +14,41 @@ import { FORMAT_CONSTANTS as X, formatNumberWithSuffix as q, formatPrice as j, g
|
|
|
14
14
|
import { slippageTemplate as $ } from "./format-slippage.js";
|
|
15
15
|
import { formatChipLeverage as oe, leveragePresets as re } from "./leverage-presets.js";
|
|
16
16
|
import { allLoaded as ae, loadingProgress as me, round5 as ne } from "./loading.js";
|
|
17
|
-
import { decimalsToStep as
|
|
18
|
-
import { getNetworkIcon as
|
|
19
|
-
import { bnToLiquidationPriceView as de, isPositiveFloat as ue, parseInputToBN as he, parseSmallNumber as
|
|
20
|
-
import { pluralize as
|
|
17
|
+
import { decimalsToStep as pe, findClosestPoint as fe, formatWithDecimals as le, formatWithoutDecimals as se, splitInterval as xe, validateMinMax as Te } from "./math.js";
|
|
18
|
+
import { getNetworkIcon as ge } from "./network-icons.js";
|
|
19
|
+
import { bnToLiquidationPriceView as de, isPositiveFloat as ue, parseInputToBN as he, parseSmallNumber as ve } from "./parse-input-to-bn.js";
|
|
20
|
+
import { pluralize as be, selectPluralString as Ae } from "./plural.js";
|
|
21
21
|
import { getAvailableRanges as Ne } from "./ranges.js";
|
|
22
|
-
import { extractTextFromLabel as
|
|
22
|
+
import { extractTextFromLabel as Le, serializeValue as ye } from "./react.js";
|
|
23
23
|
import { searchInString as we } from "./search.js";
|
|
24
24
|
import { createTokenSearchFilter as De, searchInToken as Oe } from "./search-in-token.js";
|
|
25
25
|
import { shortSHA as Be } from "./short-sha.js";
|
|
26
26
|
import { isLongString as Re, shortenString as _e } from "./shorten-string.js";
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import { Z_INDEX as mo, Z_INDEX_VALUES as no } from "./z-index.js";
|
|
27
|
+
import { negativeTokenTemplate as He, tokenTemplate as We, tokenTemplateNumber as Ze, tokenTemplateString as ze } from "./templates.js";
|
|
28
|
+
import { getTokenIcon as Xe, parseShareTokenUnderlying as qe } from "./token-icon-source.js";
|
|
29
|
+
import { TTL_CONSTANTS as Ge, getTTLZones as Je, ttlFromTimestamp as Ke, ttlLeft as Qe, ttlLeftHuman as Ye } from "./ttl.js";
|
|
30
|
+
import { openInNewWindow as eo } from "./window.js";
|
|
31
|
+
import { Z_INDEX as ro, Z_INDEX_VALUES as to } from "./z-index.js";
|
|
33
32
|
export {
|
|
34
33
|
X as FORMAT_CONSTANTS,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
Ge as TTL_CONSTANTS,
|
|
35
|
+
ro as Z_INDEX,
|
|
36
|
+
to as Z_INDEX_VALUES,
|
|
38
37
|
ae as allLoaded,
|
|
39
|
-
|
|
38
|
+
l as bnToInputView,
|
|
40
39
|
de as bnToLiquidationPriceView,
|
|
41
40
|
x as bnToPrettyView,
|
|
42
|
-
|
|
41
|
+
c as bpsToPercent,
|
|
43
42
|
S as cn,
|
|
44
|
-
|
|
43
|
+
L as convertPercent,
|
|
45
44
|
N as copyToClipboard,
|
|
46
45
|
De as createTokenSearchFilter,
|
|
47
|
-
|
|
46
|
+
pe as decimalsToStep,
|
|
48
47
|
d as default,
|
|
49
|
-
|
|
48
|
+
Le as extractTextFromLabel,
|
|
50
49
|
fe as findClosestPoint,
|
|
51
50
|
V as formatAssetAmount,
|
|
52
|
-
|
|
51
|
+
y as formatBytecodeSize,
|
|
53
52
|
C as formatBytecodeVersion,
|
|
54
53
|
oe as formatChipLeverage,
|
|
55
54
|
_ as formatCompactPercent,
|
|
@@ -60,57 +59,55 @@ export {
|
|
|
60
59
|
W as formatPercentAmount,
|
|
61
60
|
j as formatPrice,
|
|
62
61
|
w as formatTimestamp,
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
le as formatWithDecimals,
|
|
63
|
+
se as formatWithoutDecimals,
|
|
65
64
|
h as generateColorsFromBase,
|
|
66
65
|
r as generateId,
|
|
67
66
|
G as getAdaptiveDecimals,
|
|
68
67
|
Ne as getAvailableRanges,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
v as getCSSVariable,
|
|
69
|
+
ge as getNetworkIcon,
|
|
70
|
+
Je as getTTLZones,
|
|
71
|
+
Xe as getTokenIcon,
|
|
72
|
+
P as hexToRgba,
|
|
73
|
+
b as hslToHex,
|
|
75
74
|
J as isBelowDisplayThreshold,
|
|
76
75
|
K as isEffectivelyZero,
|
|
77
76
|
Re as isLongString,
|
|
78
77
|
ue as isPositiveFloat,
|
|
79
78
|
re as leveragePresets,
|
|
80
79
|
me as loadingProgress,
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
He as negativeTokenTemplate,
|
|
81
|
+
eo as openInNewWindow,
|
|
83
82
|
he as parseInputToBN,
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
qe as parseShareTokenUnderlying,
|
|
84
|
+
ve as parseSmallNumber,
|
|
86
85
|
Z as percentTemplate,
|
|
87
86
|
z as percentageTemplate,
|
|
88
|
-
|
|
87
|
+
be as pluralize,
|
|
89
88
|
m as pointProgramsOf,
|
|
90
89
|
n as positiveTokenRewardsOf,
|
|
91
|
-
|
|
90
|
+
A as resolveCSSColor,
|
|
92
91
|
ne as round5,
|
|
93
92
|
we as searchInString,
|
|
94
93
|
Oe as searchInToken,
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
Ae as selectPluralString,
|
|
95
|
+
ye as serializeValue,
|
|
97
96
|
Be as shortSHA,
|
|
98
97
|
F as shortenHash,
|
|
99
98
|
_e as shortenString,
|
|
100
99
|
D as significantTrunc,
|
|
101
100
|
$ as slippageTemplate,
|
|
102
101
|
xe as splitInterval,
|
|
103
|
-
He as strategyApyPartsAtLeverage,
|
|
104
|
-
We as strategyNetApyAtLeverage,
|
|
105
102
|
Q as toSignificantDigits,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
103
|
+
i as tokenRewardsOf,
|
|
104
|
+
We as tokenTemplate,
|
|
105
|
+
Ze as tokenTemplateNumber,
|
|
106
|
+
ze as tokenTemplateString,
|
|
107
|
+
p as totalApyOf,
|
|
108
|
+
Ke as ttlFromTimestamp,
|
|
109
|
+
Qe as ttlLeft,
|
|
110
|
+
Ye as ttlLeftHuman,
|
|
114
111
|
t as useFormFieldIds,
|
|
115
112
|
Te as validateMinMax
|
|
116
113
|
};
|