@gearbox-protocol/permissionless-ui 1.26.1 → 1.26.3
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/formatters.cjs +1 -1
- package/dist/cjs/components/graph/graph-tooltip.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/stat-badge/stat-badge.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/formatters.js +147 -105
- package/dist/esm/components/graph/graph-tooltip.js +8 -8
- package/dist/esm/components/graph/graph.js +341 -302
- package/dist/esm/components/graph/index.js +16 -15
- package/dist/esm/components/index.js +440 -439
- package/dist/esm/components/stat-badge/stat-badge.js +115 -65
- package/dist/esm/components/trading-view/trading-view.js +147 -143
- package/dist/esm/index.js +589 -588
- package/dist/types/components/graph/formatters.d.ts +10 -1
- package/dist/types/components/graph/index.d.ts +1 -1
- package/dist/types/components/graph/plugins/vertical-line.d.ts +2 -2
- package/dist/types/components/stat-badge/stat-badge.d.ts +8 -0
- package/dist/types/components/trading-view/trading-view.d.ts +2 -0
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Time } from 'lightweight-charts';
|
|
1
|
+
import { Time, TickMarkType } from 'lightweight-charts';
|
|
2
2
|
export interface Point {
|
|
3
3
|
time: Time | number;
|
|
4
4
|
value: number;
|
|
@@ -30,10 +30,19 @@ export interface AdaptiveYAxisFormatterOptions {
|
|
|
30
30
|
*/
|
|
31
31
|
export declare function createAdaptiveYAxisFormatter(initialValues: number[], _unit: YMeasureUnits, options?: AdaptiveYAxisFormatterOptions): {
|
|
32
32
|
formatter: (price: number) => string;
|
|
33
|
+
tickmarksFormatter: (prices: number[]) => string[];
|
|
33
34
|
updateVisibleRange: (visibleValues: number[]) => void;
|
|
34
35
|
updateLastValues: (lastValues: number[]) => void;
|
|
35
36
|
};
|
|
36
37
|
export type XMeasureUnits = "time" | "%";
|
|
37
38
|
type XFormatter = (time: Time, symbol: XMeasureUnits | undefined) => string;
|
|
39
|
+
export interface XFormatters {
|
|
40
|
+
/** Used for crosshair tooltip / localization.timeFormatter */
|
|
41
|
+
timeFormatter: XFormatter;
|
|
42
|
+
/** Used for timeScale.tickMarkFormatter — receives TickMarkType */
|
|
43
|
+
tickMarkFormatter: (time: Time, tickMarkType: TickMarkType, locale: string) => string;
|
|
44
|
+
}
|
|
45
|
+
export declare const getXFormatters: (unit: XMeasureUnits, points?: Point[]) => XFormatters;
|
|
46
|
+
/** @deprecated Use getXFormatters instead */
|
|
38
47
|
export declare const getXFormatter: (unit: XMeasureUnits, points?: Point[]) => XFormatter;
|
|
39
48
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './default-config';
|
|
2
|
-
export { getXFormatter, getYFormatter, type Point as GraphPoint, type XMeasureUnits, type YMeasureUnits, } from './formatters';
|
|
2
|
+
export { getXFormatter, getXFormatters, getYFormatter, type Point as GraphPoint, type XFormatters, type XMeasureUnits, type YMeasureUnits, } from './formatters';
|
|
3
3
|
export { DEFAULT_SERIES_COLORS, Graph, type GraphProps, getSeriesColorPalette, getVerticalLineTooltipContent, type SeriesColorPalette, type SeriesConfig, type VerticalLineOptions, } from './graph';
|
|
4
4
|
export * from './graph-current-value';
|
|
5
5
|
export * from './graph-tooltip';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IChartApi, ISeriesApi, ISeriesPrimitive, ISeriesPrimitiveAxisView,
|
|
1
|
+
import { IChartApi, ISeriesApi, ISeriesPrimitive, ISeriesPrimitiveAxisView, IPrimitivePaneView, SeriesType, Time } from 'lightweight-charts';
|
|
2
2
|
export interface VertLineOptions {
|
|
3
3
|
color: string;
|
|
4
4
|
labelText: string;
|
|
@@ -19,5 +19,5 @@ export declare class VertLine implements ISeriesPrimitive<Time> {
|
|
|
19
19
|
);
|
|
20
20
|
updateAllViews(): void;
|
|
21
21
|
timeAxisViews(): readonly ISeriesPrimitiveAxisView[];
|
|
22
|
-
paneViews(): readonly
|
|
22
|
+
paneViews(): readonly IPrimitivePaneView[];
|
|
23
23
|
}
|
|
@@ -136,6 +136,10 @@ export interface StatBadgeProps extends Omit<React.HTMLAttributes<HTMLDivElement
|
|
|
136
136
|
export declare const StatBadge: React.ForwardRefExoticComponent<StatBadgeProps & React.RefAttributes<HTMLDivElement>>;
|
|
137
137
|
declare const statBadgeGridVariants: (props?: ({
|
|
138
138
|
cols?: 2 | 1 | 3 | 4 | 5 | 6 | null | undefined;
|
|
139
|
+
colsSm?: 2 | 1 | 3 | 4 | 5 | 6 | null | undefined;
|
|
140
|
+
colsMd?: 2 | 1 | 3 | 4 | 5 | 6 | null | undefined;
|
|
141
|
+
colsLg?: 2 | 1 | 3 | 4 | 5 | 6 | null | undefined;
|
|
142
|
+
colsXl?: 2 | 1 | 3 | 4 | 5 | 6 | null | undefined;
|
|
139
143
|
gap?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
140
144
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
141
145
|
export interface StatBadgeGridProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof statBadgeGridVariants> {
|
|
@@ -143,6 +147,10 @@ export interface StatBadgeGridProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
143
147
|
* Number of columns in the grid (responsive breakpoints applied automatically)
|
|
144
148
|
*/
|
|
145
149
|
cols?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
150
|
+
colsSm?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
151
|
+
colsMd?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
152
|
+
colsLg?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
153
|
+
colsXl?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
146
154
|
/**
|
|
147
155
|
* Gap size between grid items
|
|
148
156
|
*/
|
|
@@ -14,6 +14,8 @@ export interface GraphDataPoint {
|
|
|
14
14
|
* Graph data structure with title and data points
|
|
15
15
|
*/
|
|
16
16
|
export interface GraphData {
|
|
17
|
+
/** Stable identifier used for color mapping. Should match `GraphDropdownItem.value`. */
|
|
18
|
+
id?: string;
|
|
17
19
|
title?: string;
|
|
18
20
|
data: GraphDataPoint[];
|
|
19
21
|
/** Line color (area stroke). If omitted, palette by series index is used. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/permissionless-ui",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.3",
|
|
4
4
|
"description": "Internal UI components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -56,6 +56,10 @@
|
|
|
56
56
|
"build-storybook": "storybook build"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
+
"@fortawesome/fontawesome-svg-core": "^7.1.0",
|
|
60
|
+
"@fortawesome/free-solid-svg-icons": "^7.1.0",
|
|
61
|
+
"@fortawesome/react-fontawesome": "^3.1.1",
|
|
62
|
+
"@gearbox-protocol/static": "^1.117.2",
|
|
59
63
|
"@radix-ui/react-accordion": "^1.2.2",
|
|
60
64
|
"@radix-ui/react-alert-dialog": "^1.1.4",
|
|
61
65
|
"@radix-ui/react-avatar": "^1.1.2",
|
|
@@ -75,11 +79,7 @@
|
|
|
75
79
|
"@radix-ui/react-tooltip": "^1.1.6",
|
|
76
80
|
"class-variance-authority": "^0.7.1",
|
|
77
81
|
"clsx": "^2.1.1",
|
|
78
|
-
"
|
|
79
|
-
"@fortawesome/free-solid-svg-icons": "^7.1.0",
|
|
80
|
-
"@fortawesome/react-fontawesome": "^3.1.1",
|
|
81
|
-
"@gearbox-protocol/static": "^1.117.2",
|
|
82
|
-
"lightweight-charts": "^4.1.3",
|
|
82
|
+
"lightweight-charts": "^5.1.0",
|
|
83
83
|
"luxon": "^3.5.0",
|
|
84
84
|
"react-infinite-scroll-component": "^6.1.0",
|
|
85
85
|
"react-markdown": "^10.1.0",
|