@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.
@@ -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 opened Credit Accounts. Perhaps, you have recently been liquidated? Check notification centre to see more.",
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 positions.",
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 account 'health'. If your health factor drops below 1 or close to it, you might be liquidated.",
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 account's health factor would reach 1 and become eligible for liquidation.",
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 account can stay open if prices remain constant and no yield is earned—only accounting for borrow interest accrual.",
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 position size in total. You can reduce it in quota management.",
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 Account value or Debt amount.",
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). When set, the X axis never zooms
210
- * in further than this value even if the current series data starts later.
211
- * Useful for keeping the full selected time range (e.g. 1Y) when switching
212
- * between series with different data coverage.
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 opened Credit Accounts. Perhaps, you have recently been liquidated? Check notification centre to see more.",
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 positions.",
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 account 'health'. If your health factor drops below 1 or close to it, you might be liquidated.",
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 account's health factor would reach 1 and become eligible for liquidation.",
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 account can stay open if prices remain constant and no yield is earned—only accounting for borrow interest accrual.",
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 position size in total. You can reduce it in quota management.",
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 Account value or Debt amount.",
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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/ui-kit",
3
- "version": "4.0.0-next.57",
3
+ "version": "4.0.0-next.59",
4
4
  "description": "Internal UI components",
5
5
  "repository": {
6
6
  "type": "git",