@gearbox-protocol/permissionless-ui 1.24.1 → 1.25.0
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-view.cjs +1 -1
- 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/components/tab-control/tab-control.cjs +1 -1
- package/dist/cjs/components/trading-view/trading-view.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/esm/components/graph/graph-view.js +48 -46
- package/dist/esm/components/graph/graph.js +344 -282
- package/dist/esm/components/graph/index.js +15 -14
- package/dist/esm/components/index.js +447 -446
- package/dist/esm/components/tab-control/tab-control.js +99 -98
- package/dist/esm/components/trading-view/trading-view.js +33 -31
- package/dist/esm/index.js +583 -582
- package/dist/globals.css +1 -1
- package/dist/types/components/graph/graph-view.d.ts +1 -1
- package/dist/types/components/graph/graph.d.ts +16 -3
- package/dist/types/components/graph/plugins/vertical-line.d.ts +2 -0
- package/dist/types/components/tab-control/tab-control.d.ts +2 -1
- package/dist/types/components/trading-view/trading-view.d.ts +6 -1
- package/package.json +2 -2
|
@@ -178,7 +178,7 @@ declare const GraphView: React.ForwardRefExoticComponent<GraphViewProps & React.
|
|
|
178
178
|
* />
|
|
179
179
|
* ```
|
|
180
180
|
*/
|
|
181
|
-
export declare function GraphViewWithData({ series, data, graphId, onUnselectSeries, loading, title, description, toolbar, emptyMessage, error, containerClassName, variant, size, padding, yMeasureUnit, ...restProps }: GraphViewWithDataProps): React.ReactElement;
|
|
181
|
+
export declare function GraphViewWithData({ series, data, graphId, onUnselectSeries, loading, title, description, toolbar, emptyMessage, error, containerClassName, variant, size, padding, yMeasureUnit, showCurrentValue, ...restProps }: GraphViewWithDataProps): React.ReactElement;
|
|
182
182
|
/**
|
|
183
183
|
* Custom hook to manage graph sizing with an aside element
|
|
184
184
|
*
|
|
@@ -10,14 +10,23 @@ export interface SeriesConfig {
|
|
|
10
10
|
bottomColor?: string;
|
|
11
11
|
yMeasureUnit?: YMeasureUnits;
|
|
12
12
|
}
|
|
13
|
-
type VerticalLineOptions = Partial<{
|
|
13
|
+
export type VerticalLineOptions = Partial<{
|
|
14
14
|
color: string;
|
|
15
15
|
labelText: string;
|
|
16
|
+
value?: string | number;
|
|
16
17
|
width: number;
|
|
17
18
|
labelBackgroundColor: string;
|
|
18
19
|
labelTextColor: string;
|
|
19
20
|
showLabel: boolean;
|
|
20
21
|
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Returns formatted label and value strings for a vertical line tooltip.
|
|
24
|
+
* Used by Graph and by tests.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getVerticalLineTooltipContent(opts: VerticalLineOptions, yMeasureUnit: YMeasureUnits, currentValueDecimals: number | undefined): {
|
|
27
|
+
labelText: string;
|
|
28
|
+
valueStr: string;
|
|
29
|
+
};
|
|
21
30
|
/**
|
|
22
31
|
* Palette ordered for maximum contrast; first color is the original teal.
|
|
23
32
|
* Greens/teals are spread out so that when only a subset of series is visible,
|
|
@@ -62,11 +71,15 @@ export interface GraphProps {
|
|
|
62
71
|
* own scale and fills the chart independently.
|
|
63
72
|
*/
|
|
64
73
|
useSharedPriceScale?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* When true (default), shows the current value and date in the top-left corner
|
|
76
|
+
* in single-series mode. Set to false to hide.
|
|
77
|
+
*/
|
|
78
|
+
showCurrentValue?: boolean;
|
|
65
79
|
}
|
|
66
80
|
/**
|
|
67
81
|
* Graph component that renders a chart using lightweight-charts library
|
|
68
82
|
* with support for area series, custom tooltips, and vertical line annotations
|
|
69
83
|
* Supports single or multiple series with different colors and legends
|
|
70
84
|
*/
|
|
71
|
-
export declare function Graph({ series, className, showLegend, onUnselectSeries, xMeasureUnit, yMeasureUnit, optionsOverrides, verticalLineOptions, currentValueDecimals, useSharedPriceScale, }: GraphProps): React.ReactElement;
|
|
72
|
-
export {};
|
|
85
|
+
export declare function Graph({ series, className, showLegend, onUnselectSeries, xMeasureUnit, yMeasureUnit, optionsOverrides, verticalLineOptions, currentValueDecimals, useSharedPriceScale, showCurrentValue, }: GraphProps): React.ReactElement;
|
|
@@ -2,6 +2,8 @@ import { IChartApi, ISeriesApi, ISeriesPrimitive, ISeriesPrimitiveAxisView, ISer
|
|
|
2
2
|
export interface VertLineOptions {
|
|
3
3
|
color: string;
|
|
4
4
|
labelText: string;
|
|
5
|
+
/** Optional value shown in the top tooltip (used by Graph overlay) */
|
|
6
|
+
value?: string | number;
|
|
5
7
|
width: number;
|
|
6
8
|
labelBackgroundColor: string;
|
|
7
9
|
labelTextColor: string;
|
|
@@ -4,13 +4,14 @@ export interface TabControl<T extends string> {
|
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export interface TabControlProps<T extends string> {
|
|
7
|
+
className?: string;
|
|
7
8
|
tabs: Array<TabControl<T>>;
|
|
8
9
|
state: UseTabControlReturnType<T>;
|
|
9
10
|
showBorder?: boolean;
|
|
10
11
|
variant?: "equal" | "auto";
|
|
11
12
|
tabItemWrapPadding?: string;
|
|
12
13
|
}
|
|
13
|
-
export declare function TabControl<T extends string>({ tabs, state: controlState, showBorder, tabItemWrapPadding, variant, }: TabControlProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function TabControl<T extends string>({ className, tabs, state: controlState, showBorder, tabItemWrapPadding, variant, }: TabControlProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
interface TabItemProps {
|
|
15
16
|
icon?: React.ReactNode;
|
|
16
17
|
label: React.ReactNode;
|
|
@@ -63,6 +63,11 @@ export interface TradingViewProps<T extends string = string> extends Omit<GraphV
|
|
|
63
63
|
* actual relative values (e.g. "part" vs "whole" like Ethereum vs All Networks).
|
|
64
64
|
*/
|
|
65
65
|
useSharedPriceScale?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* When true (default), shows the current value and date in the top-left corner
|
|
68
|
+
* in single-series mode. Set to false to hide.
|
|
69
|
+
*/
|
|
70
|
+
showCurrentValue?: boolean;
|
|
66
71
|
}
|
|
67
72
|
/**
|
|
68
73
|
* TradingView — comprehensive charting component with graph selection and time range controls.
|
|
@@ -119,4 +124,4 @@ export interface TradingViewProps<T extends string = string> extends Omit<GraphV
|
|
|
119
124
|
* />
|
|
120
125
|
* ```
|
|
121
126
|
*/
|
|
122
|
-
export declare function TradingView<T extends string = string>({ data, yMeasureUnit, height, defaultGraph, onGraphSelected, graphs, isMultipleSelect, range, rangeList, setRange, onGraphExpanded, isGraphExpanded, onUnselectSeries, graphsWithNoData, loadingGraphs, noDataMessage, currentValueDecimals, containerClassName, useSharedPriceScale, ...restProps }: TradingViewProps<T>): React.ReactElement;
|
|
127
|
+
export declare function TradingView<T extends string = string>({ data, yMeasureUnit, height, defaultGraph, onGraphSelected, graphs, isMultipleSelect, range, rangeList, setRange, onGraphExpanded, isGraphExpanded, onUnselectSeries, graphsWithNoData, loadingGraphs, noDataMessage, currentValueDecimals, containerClassName, useSharedPriceScale, showCurrentValue, ...restProps }: TradingViewProps<T>): React.ReactElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/permissionless-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.25.0",
|
|
4
4
|
"description": "Internal UI components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"lightweight-charts": "^4.1.3",
|
|
83
83
|
"luxon": "^3.5.0",
|
|
84
84
|
"react-infinite-scroll-component": "^6.1.0",
|
|
85
|
-
"react-markdown": "^
|
|
85
|
+
"react-markdown": "^10.1.0",
|
|
86
86
|
"react-markdown-math": "^1.0.2",
|
|
87
87
|
"react-slick": "^0.31.0",
|
|
88
88
|
"remark-gfm": "^4.0.0",
|