@gearbox-protocol/ui-kit 4.0.0-next.37 → 4.0.0-next.39
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/tab-control/tab-control.cjs +1 -1
- package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
- package/dist/cjs/locale/en.json.cjs +1 -1
- package/dist/esm/components/graph/graph.js +407 -375
- package/dist/esm/components/tab-control/tab-control.js +29 -23
- package/dist/esm/components/trading-view/trading-view.js +87 -85
- package/dist/esm/locale/en.json.js +25 -25
- package/dist/globals.css +1 -1
- package/dist/types/components/graph/graph.d.ts +14 -1
- package/dist/types/components/graph/index.d.ts +1 -1
- package/dist/types/components/trading-view/trading-view.d.ts +8 -1
- package/dist/types/locale/en.json.d.ts +25 -25
- package/package.json +1 -1
|
@@ -233,8 +233,21 @@ export interface GraphProps {
|
|
|
233
233
|
* Supports single or multiple series with different colors and legends
|
|
234
234
|
*/
|
|
235
235
|
export declare function Graph({ series, className, showLegend, onUnselectSeries, xMeasureUnit, yMeasureUnit, optionsOverrides, verticalLineOptions, priceLineOptions, zoneOptions, currentValueDecimals, useSharedPriceScale, dualYAxis, defaultVisiblePriceScaleId, leftPriceScaleTitle, rightPriceScaleTitle: _rightPriceScaleTitle, showCurrentValue, graphTitle, yScaleMin, yScaleMinMultiple, visibleTimeFrom, disableZoom, hideDefaultTooltip, }: GraphProps): React.ReactElement;
|
|
236
|
+
/**
|
|
237
|
+
* A legend entry that is not a data series — a vertical marker line, say.
|
|
238
|
+
* Such a line is drawn by its own layer and never reaches `series`, so
|
|
239
|
+
* without this the chart shows a coloured line nothing on screen names.
|
|
240
|
+
*/
|
|
241
|
+
export interface GraphLegendMarker {
|
|
242
|
+
id: string;
|
|
243
|
+
label: string;
|
|
244
|
+
/** Same value handed to the line itself, so legend and line agree. */
|
|
245
|
+
color: string;
|
|
246
|
+
}
|
|
236
247
|
export interface GraphLegendProps {
|
|
237
248
|
series: Array<SeriesConfig>;
|
|
249
|
+
/** Non-series entries, rendered after the series in the same row. */
|
|
250
|
+
markers?: ReadonlyArray<GraphLegendMarker>;
|
|
238
251
|
onUnselect?: (label: string) => void;
|
|
239
252
|
/**
|
|
240
253
|
* When true, the legend is laid out inline (no absolute positioning) so it
|
|
@@ -243,4 +256,4 @@ export interface GraphLegendProps {
|
|
|
243
256
|
*/
|
|
244
257
|
inline?: boolean;
|
|
245
258
|
}
|
|
246
|
-
export declare function GraphLegend({ series, onUnselect, inline, }: GraphLegendProps): React.ReactElement;
|
|
259
|
+
export declare function GraphLegend({ series, markers, onUnselect, inline, }: GraphLegendProps): React.ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './default-config';
|
|
2
2
|
export { getXFormatter, getXFormatters, getYFormatter, type Point as GraphPoint, type XFormatters, type XMeasureUnits, type YMeasureUnits, } from './formatters';
|
|
3
|
-
export { DEFAULT_SERIES_COLORS, Graph, GraphLegend, type GraphLegendProps, type GraphProps, getSeriesColorPalette, getVerticalLineLabelStyle, getVerticalLineTooltipContent, type PriceLineConfig, type PriceZoneConfig, type SeriesColorPalette, type SeriesConfig, type VerticalLineOptions, } from './graph';
|
|
3
|
+
export { DEFAULT_SERIES_COLORS, Graph, GraphLegend, type GraphLegendMarker, type GraphLegendProps, type GraphProps, getSeriesColorPalette, getVerticalLineLabelStyle, getVerticalLineTooltipContent, type PriceLineConfig, type PriceZoneConfig, type SeriesColorPalette, type SeriesConfig, type VerticalLineOptions, } from './graph';
|
|
4
4
|
export * from './graph-current-value';
|
|
5
5
|
export * from './graph-tooltip';
|
|
6
6
|
export * from './graph-view';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LineStyle } from 'lightweight-charts';
|
|
2
2
|
import { RangeButtonsProps } from '../buttons/range-buttons/range-buttons';
|
|
3
3
|
import { YMeasureUnits } from '../graph/formatters';
|
|
4
|
+
import { GraphLegendMarker } from '../graph/graph';
|
|
4
5
|
import { GraphViewWithDataProps } from '../graph/graph-view';
|
|
5
6
|
import { GraphDropdownItem, GraphDropdownProps } from './graph-dropdown';
|
|
6
7
|
import type * as React from "react";
|
|
@@ -68,6 +69,12 @@ export interface TradingViewProps<T extends string = string, TRange extends stri
|
|
|
68
69
|
isGraphExpanded?: boolean;
|
|
69
70
|
/** Callback when series is unselected from legend */
|
|
70
71
|
onUnselectSeries?: (label: string) => void;
|
|
72
|
+
/**
|
|
73
|
+
* Legend entries for things that are not data series — the vertical marker
|
|
74
|
+
* lines, which are drawn by their own layer and never reach `data`. Without
|
|
75
|
+
* them the plot shows coloured lines the legend does not account for.
|
|
76
|
+
*/
|
|
77
|
+
legendMarkers?: ReadonlyArray<GraphLegendMarker>;
|
|
71
78
|
/** Set of graph values that have no data available */
|
|
72
79
|
graphsWithNoData?: Set<T>;
|
|
73
80
|
/** Set of graph values that are currently loading */
|
|
@@ -182,4 +189,4 @@ export interface TradingViewProps<T extends string = string, TRange extends stri
|
|
|
182
189
|
* />
|
|
183
190
|
* ```
|
|
184
191
|
*/
|
|
185
|
-
export declare function TradingView<T extends string = string, TRange extends string = string>({ data, yMeasureUnit, height, defaultGraph, onGraphSelected, graphs, isMultipleSelect, range, rangeList, setRange, onGraphExpanded, isGraphExpanded, onUnselectSeries, graphsWithNoData, loadingGraphs, isLoading: isLoadingProp, noDataMessage, currentValueDecimals, containerClassName, useSharedPriceScale, showCurrentValue, yScaleMin, yScaleMinMultiple, seriesColorPersistenceKey, title, trailing, ...restProps }: TradingViewProps<T, TRange>): React.ReactElement;
|
|
192
|
+
export declare function TradingView<T extends string = string, TRange extends string = string>({ data, yMeasureUnit, height, defaultGraph, onGraphSelected, graphs, isMultipleSelect, range, rangeList, setRange, onGraphExpanded, isGraphExpanded, onUnselectSeries, legendMarkers, graphsWithNoData, loadingGraphs, isLoading: isLoadingProp, noDataMessage, currentValueDecimals, containerClassName, useSharedPriceScale, showCurrentValue, yScaleMin, yScaleMinMultiple, seriesColorPersistenceKey, title, trailing, ...restProps }: TradingViewProps<T, TRange>): React.ReactElement;
|
|
@@ -63,20 +63,20 @@ declare const _default: {
|
|
|
63
63
|
"components.APY.tip": "These APYs are derived from the underlying protocols’ APIs and may differ in reality. Check respective protocols for their methodology.",
|
|
64
64
|
|
|
65
65
|
"components.creditSessionDetailedLiquidation.graph.noData": "No data",
|
|
66
|
-
"components.creditSessionDetailedLiquidation.graph.legend.point": "Current
|
|
66
|
+
"components.creditSessionDetailedLiquidation.graph.legend.point": "Current Price",
|
|
67
67
|
"components.creditSessionDetailedLiquidation.graph.legend.area": "Liquidation Area",
|
|
68
68
|
"components.creditSessionDetailedLiquidation.graph.tip.hf": "Health Factor",
|
|
69
69
|
"components.creditSessionDetailedLiquidation.graph.tip.price": "Price",
|
|
70
70
|
"components.creditSessionDetailedLiquidation.table.noData": "No data",
|
|
71
71
|
"components.creditSessionDetailedLiquidation.table.seeGraph": "See graph",
|
|
72
72
|
"components.creditSessionDetailedLiquidation.table.asset": "Asset",
|
|
73
|
-
"components.creditSessionDetailedLiquidation.table.currentPrice": "Current
|
|
74
|
-
"components.creditSessionDetailedLiquidation.table.modelPrice": "Model
|
|
73
|
+
"components.creditSessionDetailedLiquidation.table.currentPrice": "Current Price",
|
|
74
|
+
"components.creditSessionDetailedLiquidation.table.modelPrice": "Model Price",
|
|
75
75
|
|
|
76
76
|
"components.apyParts.features.points": "Points",
|
|
77
77
|
"components.apyParts.features.incent": "Incent.",
|
|
78
78
|
"components.apyParts.supplyAPY": "Organic APY",
|
|
79
|
-
"components.apyParts.title": "APY
|
|
79
|
+
"components.apyParts.title": "APY Type",
|
|
80
80
|
"components.apyParts.supplyAPY.tip": "Yield from lending funds",
|
|
81
81
|
"components.apyParts.tokenYield": "Intrinsic APY",
|
|
82
82
|
"components.apyParts.tokenYield.tip": "Yield from holding wstETH",
|
|
@@ -106,10 +106,10 @@ declare const _default: {
|
|
|
106
106
|
"components.openCopyButtons.explorer": "View in explorer",
|
|
107
107
|
|
|
108
108
|
"components.poolAssetsTable.asset": "Name",
|
|
109
|
-
"components.poolAssetsTable.rate": "Effective
|
|
109
|
+
"components.poolAssetsTable.rate": "Effective Rate",
|
|
110
110
|
"components.poolAssetsTable.exposure": "Exposure",
|
|
111
111
|
"components.poolAssetsTable.cap": "Cap",
|
|
112
|
-
"components.poolAssetsTable.capUtilization": "Cap
|
|
112
|
+
"components.poolAssetsTable.capUtilization": "Cap Utilization",
|
|
113
113
|
"components.poolAssetsTable.usage": "{amount} of {total}",
|
|
114
114
|
"components.poolAssetsTable.head.name": "Credit Manager",
|
|
115
115
|
"components.poolAssetsTable.head.currentDebt": "Current Debt",
|
|
@@ -120,13 +120,13 @@ declare const _default: {
|
|
|
120
120
|
"components.creditManagerInfo.title": "Assets and LT’s",
|
|
121
121
|
"components.creditManagerInfo.info.title": "Credit Managers",
|
|
122
122
|
"components.creditManagerInfo.info.copy.tip": "Copy Credit Manager address",
|
|
123
|
-
"components.creditManagerInfo.info.minDebt": "Min
|
|
124
|
-
"components.creditManagerInfo.info.maxDebt": "Max
|
|
125
|
-
"components.creditManagerInfo.info.liquidationFee": "Liquid.
|
|
126
|
-
"components.creditManagerInfo.info.liquidationPremium": "Liquid.
|
|
127
|
-
"components.creditManagerInfo.info.interestFee": "Interest
|
|
128
|
-
"components.creditManagerInfo.info.debtLimit": "Debt
|
|
129
|
-
"components.creditManagerInfo.info.maxEnabledTokens": "Max
|
|
123
|
+
"components.creditManagerInfo.info.minDebt": "Min Debt",
|
|
124
|
+
"components.creditManagerInfo.info.maxDebt": "Max Debt",
|
|
125
|
+
"components.creditManagerInfo.info.liquidationFee": "Liquid. Fee",
|
|
126
|
+
"components.creditManagerInfo.info.liquidationPremium": "Liquid. Premium",
|
|
127
|
+
"components.creditManagerInfo.info.interestFee": "Interest Fee",
|
|
128
|
+
"components.creditManagerInfo.info.debtLimit": "Debt Limit",
|
|
129
|
+
"components.creditManagerInfo.info.maxEnabledTokens": "Max Tokens",
|
|
130
130
|
|
|
131
131
|
"dialogs.oraclesAndLTInfo.filter.hide0Quota": "Hide 0-Quota",
|
|
132
132
|
|
|
@@ -145,9 +145,9 @@ declare const _default: {
|
|
|
145
145
|
"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",
|
|
146
146
|
"components.poolTable.depositApy": "Deposit APY",
|
|
147
147
|
"components.poolTable.depositApy.tip": "Deposit APY breakdown: base rate, extra rewards, and points",
|
|
148
|
-
"components.poolTable.borrowApy": "Borrow
|
|
148
|
+
"components.poolTable.borrowApy": "Borrow Rate",
|
|
149
149
|
"components.poolTable.utilizationApy": "Utilization APY",
|
|
150
|
-
"components.poolTable.borrowApy.tip": "On top of the utilization borrow
|
|
150
|
+
"components.poolTable.borrowApy.tip": "On top of the utilization borrow rate, there is a borrow quota rate for different assets",
|
|
151
151
|
"components.poolTable.utilization": "Utilization",
|
|
152
152
|
"components.poolTable.collateral": "Collateral",
|
|
153
153
|
"components.poolTable.collateral.showAll": "Show All",
|
|
@@ -166,7 +166,7 @@ declare const _default: {
|
|
|
166
166
|
"components.rewardsTooltip.without.extra.tip": "Any deposit through Gearbox",
|
|
167
167
|
"components.rewardsTooltip.with.title": "With {leverage} Leverage",
|
|
168
168
|
"components.rewardsTooltip.with.borrowRate": "{symbol} borrow rate",
|
|
169
|
-
"components.rewardsTooltip.with.quotaRate": "Quota
|
|
169
|
+
"components.rewardsTooltip.with.quotaRate": "Quota Rate",
|
|
170
170
|
"components.rewardsTooltip.with.extra": "+ Extra APR",
|
|
171
171
|
"components.rewardsTooltip.button": "Click to show rewards details",
|
|
172
172
|
|
|
@@ -195,15 +195,15 @@ declare const _default: {
|
|
|
195
195
|
|
|
196
196
|
"components.leverageInput.label": "Leverage",
|
|
197
197
|
"components.leverageInput.reset": "Reset",
|
|
198
|
-
"components.leverageInput.available": "Available
|
|
198
|
+
"components.leverageInput.available": "Available Leverage",
|
|
199
199
|
|
|
200
|
-
"components.healthFactorBlock.label": "Health
|
|
200
|
+
"components.healthFactorBlock.label": "Health Factor",
|
|
201
201
|
"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
202
|
|
|
203
203
|
"components.liquidationPriceBlock.label": "Liquidation Price",
|
|
204
204
|
"components.liquidationPriceBlock.tip": "The asset price at which the account's health factor would reach 1 and become eligible for liquidation.",
|
|
205
205
|
|
|
206
|
-
"components.timeToLiquidationBlock.label": "Time to
|
|
206
|
+
"components.timeToLiquidationBlock.label": "Time to Liquidation",
|
|
207
207
|
"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
208
|
|
|
209
209
|
"components.historyChart.error": "Couldn't load chart data",
|
|
@@ -232,16 +232,16 @@ declare const _default: {
|
|
|
232
232
|
|
|
233
233
|
"components.leveragePresetChips.label": "Leverage:",
|
|
234
234
|
|
|
235
|
-
"components.liquidationParamsTable.lt": "Liquidation
|
|
236
|
-
"components.liquidationParamsTable.penalty": "Liquidation
|
|
237
|
-
"components.liquidationParamsTable.premium": "Liquidation
|
|
238
|
-
"components.liquidationParamsTable.fee": "Liquidation
|
|
235
|
+
"components.liquidationParamsTable.lt": "Liquidation Threshold",
|
|
236
|
+
"components.liquidationParamsTable.penalty": "Liquidation Discount",
|
|
237
|
+
"components.liquidationParamsTable.premium": "Liquidation Premium",
|
|
238
|
+
"components.liquidationParamsTable.fee": "Liquidation Fee",
|
|
239
239
|
|
|
240
|
-
"components.borrowRateBlock.label": "Borrow
|
|
240
|
+
"components.borrowRateBlock.label": "Borrow Rate",
|
|
241
241
|
"components.borrowRateBlock.tip": "Borrow rate is displayed for your entire position size in total. You can reduce it in quota management.",
|
|
242
242
|
"components.borrowRateBlock.description": "Your borrow rate consists of the Base Rate plus the Quota Rates for every asset separately.",
|
|
243
243
|
"components.borrowRateBlock.baseRate": "Base Rate for Debt",
|
|
244
|
-
"components.borrowRateBlock.normalization": "Rates
|
|
244
|
+
"components.borrowRateBlock.normalization": "Rates Normalization",
|
|
245
245
|
"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.",
|
|
246
246
|
|
|
247
247
|
"components.transactionConfirm.previewLoading": "Parsing transaction…",
|