@gearbox-protocol/ui-kit 4.0.0-next.57 → 4.0.0-next.59
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/graph/graph.cjs +1 -1
- package/dist/cjs/components/graph/index.cjs +1 -1
- package/dist/cjs/components/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/esm/components/graph/graph.js +488 -478
- package/dist/esm/components/graph/index.js +18 -17
- package/dist/esm/components/index.js +323 -322
- package/dist/esm/index.js +410 -409
- package/dist/esm/locale/en.json.js +7 -7
- package/dist/types/components/graph/graph.d.ts +25 -4
- package/dist/types/locale/en.json.d.ts +7 -7
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const e = {
|
|
2
2
|
"errors.networkError": "Network error. Can't fetch data",
|
|
3
3
|
"errors.incorrectAddressError": "Incorrect address. Please, check url",
|
|
4
|
-
"errors.noOpenedAccountsError": "You have no
|
|
4
|
+
"errors.noOpenedAccountsError": "You have no open Positions. Perhaps, you have recently been liquidated? Check notification centre to see more.",
|
|
5
5
|
"errors.notFound": "Not found",
|
|
6
6
|
"errors.tooManyRequests": "Too many requests",
|
|
7
7
|
"errors.incorrectAddress": "Incorrect address",
|
|
@@ -130,7 +130,7 @@ const e = {
|
|
|
130
130
|
"components.poolTable.balance": "Your Balance",
|
|
131
131
|
"components.poolTable.balance.tip": `You don't earn token rewards, only organic yield. Please migrate liquidity by using "Migrate" flow above.`,
|
|
132
132
|
"components.poolTable.emptyList": "No Pools found",
|
|
133
|
-
"components.poolTable.notFound.dashboard": "You currently have no open Market
|
|
133
|
+
"components.poolTable.notFound.dashboard": "You currently have no open Market Positions.",
|
|
134
134
|
"components.poolTable.notFound.list": "No Markets found",
|
|
135
135
|
"components.poolTable.notFound.description.dashboard": "Choose earn above.",
|
|
136
136
|
"components.poolTable.notFound.description.list": "Choose another chain or toggle Show All Markets",
|
|
@@ -167,11 +167,11 @@ const e = {
|
|
|
167
167
|
"components.leverageInput.reset": "Reset",
|
|
168
168
|
"components.leverageInput.available": "Available Leverage",
|
|
169
169
|
"components.healthFactorBlock.label": "Health Factor",
|
|
170
|
-
"components.healthFactorBlock.tip": "Health Factor is a numeric representation of your
|
|
170
|
+
"components.healthFactorBlock.tip": "Health Factor is a numeric representation of your Position 'health'. If your health factor drops below 1 or close to it, you might be liquidated.",
|
|
171
171
|
"components.liquidationPriceBlock.label": "Liquidation Price",
|
|
172
|
-
"components.liquidationPriceBlock.tip": "The asset price at which the
|
|
172
|
+
"components.liquidationPriceBlock.tip": "The asset price at which the Position's health factor would reach 1 and become eligible for liquidation.",
|
|
173
173
|
"components.timeToLiquidationBlock.label": "Time to Liquidation",
|
|
174
|
-
"components.timeToLiquidationBlock.tip": "Time to liquidation estimates how long the
|
|
174
|
+
"components.timeToLiquidationBlock.tip": "Time to liquidation estimates how long the Position can stay open if prices remain constant and no yield is earned—only accounting for borrow interest accrual.",
|
|
175
175
|
"components.historyChart.error": "Couldn't load chart data",
|
|
176
176
|
"components.historyChart.empty": "No data",
|
|
177
177
|
"components.positionTypeBadge.pool": "LP",
|
|
@@ -198,11 +198,11 @@ const e = {
|
|
|
198
198
|
"components.liquidationParamsTable.premium": "Liquidation Premium",
|
|
199
199
|
"components.liquidationParamsTable.fee": "Liquidation Fee",
|
|
200
200
|
"components.borrowRateBlock.label": "Borrow Rate",
|
|
201
|
-
"components.borrowRateBlock.tip": "Borrow rate is displayed for your entire
|
|
201
|
+
"components.borrowRateBlock.tip": "Borrow rate is displayed for your entire Position size in total. You can reduce it in quota management.",
|
|
202
202
|
"components.borrowRateBlock.description": "Your borrow rate consists of the Base Rate plus the Quota Rates for every asset separately.",
|
|
203
203
|
"components.borrowRateBlock.baseRate": "Base Rate for Debt",
|
|
204
204
|
"components.borrowRateBlock.normalization": "Rates Normalization",
|
|
205
|
-
"components.borrowRateBlock.normalization.tip": "Borrowers pay {quota} and {utilization}, which have a different base. Therefore, the total borrow rate value is normalized by
|
|
205
|
+
"components.borrowRateBlock.normalization.tip": "Borrowers pay {quota} and {utilization}, which have a different base. Therefore, the total borrow rate value is normalized by Position value or Debt amount.",
|
|
206
206
|
"components.transactionConfirm.previewLoading": "Parsing transaction…",
|
|
207
207
|
"components.transactionConfirm.previewErrorTitle": "Preview error"
|
|
208
208
|
};
|
|
@@ -31,6 +31,27 @@ export interface SeriesConfig {
|
|
|
31
31
|
}
|
|
32
32
|
/** Chart-instance key: stable `id` when set, otherwise the display `label`. */
|
|
33
33
|
export declare function seriesIdentity(series: Pick<SeriesConfig, "id" | "label">): string;
|
|
34
|
+
export interface VisibleLogicalRangeInput {
|
|
35
|
+
readonly lastIndex: number;
|
|
36
|
+
readonly width: number;
|
|
37
|
+
readonly padLeft: boolean;
|
|
38
|
+
readonly padRight: boolean;
|
|
39
|
+
readonly paddingPx?: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Logical range that shows every bar, plus optional plot-area air so a
|
|
43
|
+
* centred `dd MMM` date label is not clipped by the frame.
|
|
44
|
+
*
|
|
45
|
+
* Computed from the point count rather than `getVisibleLogicalRange()`:
|
|
46
|
+
* `setVisibleRange` in lightweight-charts is applied on the next animation
|
|
47
|
+
* frame, so reading the scale back immediately returns the previous (or
|
|
48
|
+
* default `barSpacing: 6`) window and a follow-up `setVisibleLogicalRange`
|
|
49
|
+
* would replace the full-period request with a truncated one.
|
|
50
|
+
*/
|
|
51
|
+
export declare function visibleLogicalRangeFor({ lastIndex, width, padLeft, padRight, paddingPx, }: VisibleLogicalRangeInput): {
|
|
52
|
+
from: number;
|
|
53
|
+
to: number;
|
|
54
|
+
} | null;
|
|
34
55
|
export type VerticalLineOptions = Partial<{
|
|
35
56
|
color: string;
|
|
36
57
|
labelText: string;
|
|
@@ -206,10 +227,10 @@ export interface GraphProps {
|
|
|
206
227
|
*/
|
|
207
228
|
yScaleMinMultiple?: number;
|
|
208
229
|
/**
|
|
209
|
-
* Minimum visible time (unix seconds).
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
230
|
+
* Minimum visible time (unix seconds). When set, leading whitespace is
|
|
231
|
+
* injected so a later-starting series still occupies the selected window.
|
|
232
|
+
* It does not change the logical range applied below: `timeToIndex` with
|
|
233
|
+
* `findNearest` already snaps a time before the first point to index 0.
|
|
213
234
|
*/
|
|
214
235
|
visibleTimeFrom?: number;
|
|
215
236
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"errors.networkError": "Network error. Can't fetch data",
|
|
3
3
|
"errors.incorrectAddressError": "Incorrect address. Please, check url",
|
|
4
|
-
"errors.noOpenedAccountsError": "You have no
|
|
4
|
+
"errors.noOpenedAccountsError": "You have no open Positions. Perhaps, you have recently been liquidated? Check notification centre to see more.",
|
|
5
5
|
"errors.notFound": "Not found",
|
|
6
6
|
"errors.tooManyRequests": "Too many requests",
|
|
7
7
|
"errors.incorrectAddress": "Incorrect address",
|
|
@@ -155,7 +155,7 @@ declare const _default: {
|
|
|
155
155
|
"components.poolTable.balance": "Your Balance",
|
|
156
156
|
"components.poolTable.balance.tip": "You don't earn token rewards, only organic yield. Please migrate liquidity by using \"Migrate\" flow above.",
|
|
157
157
|
"components.poolTable.emptyList": "No Pools found",
|
|
158
|
-
"components.poolTable.notFound.dashboard": "You currently have no open Market
|
|
158
|
+
"components.poolTable.notFound.dashboard": "You currently have no open Market Positions.",
|
|
159
159
|
"components.poolTable.notFound.list": "No Markets found",
|
|
160
160
|
"components.poolTable.notFound.description.dashboard": "Choose earn above.",
|
|
161
161
|
"components.poolTable.notFound.description.list": "Choose another chain or toggle Show All Markets",
|
|
@@ -199,13 +199,13 @@ declare const _default: {
|
|
|
199
199
|
"components.leverageInput.available": "Available Leverage",
|
|
200
200
|
|
|
201
201
|
"components.healthFactorBlock.label": "Health Factor",
|
|
202
|
-
"components.healthFactorBlock.tip": "Health Factor is a numeric representation of your
|
|
202
|
+
"components.healthFactorBlock.tip": "Health Factor is a numeric representation of your Position 'health'. If your health factor drops below 1 or close to it, you might be liquidated.",
|
|
203
203
|
|
|
204
204
|
"components.liquidationPriceBlock.label": "Liquidation Price",
|
|
205
|
-
"components.liquidationPriceBlock.tip": "The asset price at which the
|
|
205
|
+
"components.liquidationPriceBlock.tip": "The asset price at which the Position's health factor would reach 1 and become eligible for liquidation.",
|
|
206
206
|
|
|
207
207
|
"components.timeToLiquidationBlock.label": "Time to Liquidation",
|
|
208
|
-
"components.timeToLiquidationBlock.tip": "Time to liquidation estimates how long the
|
|
208
|
+
"components.timeToLiquidationBlock.tip": "Time to liquidation estimates how long the Position can stay open if prices remain constant and no yield is earned—only accounting for borrow interest accrual.",
|
|
209
209
|
|
|
210
210
|
"components.historyChart.error": "Couldn't load chart data",
|
|
211
211
|
"components.historyChart.empty": "No data",
|
|
@@ -241,11 +241,11 @@ declare const _default: {
|
|
|
241
241
|
"components.liquidationParamsTable.fee": "Liquidation Fee",
|
|
242
242
|
|
|
243
243
|
"components.borrowRateBlock.label": "Borrow Rate",
|
|
244
|
-
"components.borrowRateBlock.tip": "Borrow rate is displayed for your entire
|
|
244
|
+
"components.borrowRateBlock.tip": "Borrow rate is displayed for your entire Position size in total. You can reduce it in quota management.",
|
|
245
245
|
"components.borrowRateBlock.description": "Your borrow rate consists of the Base Rate plus the Quota Rates for every asset separately.",
|
|
246
246
|
"components.borrowRateBlock.baseRate": "Base Rate for Debt",
|
|
247
247
|
"components.borrowRateBlock.normalization": "Rates Normalization",
|
|
248
|
-
"components.borrowRateBlock.normalization.tip": "Borrowers pay {quota} and {utilization}, which have a different base. Therefore, the total borrow rate value is normalized by
|
|
248
|
+
"components.borrowRateBlock.normalization.tip": "Borrowers pay {quota} and {utilization}, which have a different base. Therefore, the total borrow rate value is normalized by Position value or Debt amount.",
|
|
249
249
|
|
|
250
250
|
"components.transactionConfirm.previewLoading": "Parsing transaction…",
|
|
251
251
|
"components.transactionConfirm.previewErrorTitle": "Preview error"
|