@gearbox-protocol/ui-kit 3.14.0-next.39 → 3.14.0-next.40
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.
|
@@ -89,14 +89,19 @@ export declare function getVerticalLineTooltipContent(opts: VerticalLineOptions,
|
|
|
89
89
|
labelText: string;
|
|
90
90
|
valueStr: string;
|
|
91
91
|
};
|
|
92
|
-
/**
|
|
93
|
-
export declare const VERTICAL_LINE_LABEL_EDGE_PADDING =
|
|
92
|
+
/** Gap (px) kept between a vertical-line badge and the chart edge. */
|
|
93
|
+
export declare const VERTICAL_LINE_LABEL_EDGE_PADDING = 4;
|
|
94
94
|
/**
|
|
95
|
-
* Positions a vertical-line badge so it stays
|
|
96
|
-
*
|
|
97
|
-
*
|
|
95
|
+
* Positions a vertical-line badge so it stays centered on its line while never
|
|
96
|
+
* overflowing the chart. When the badge would clip an edge it is nudged inward
|
|
97
|
+
* just enough to fit — it keeps `translateX(-50%)` so it stays visually anchored
|
|
98
|
+
* to the line instead of flipping fully to one side (which looks detached and
|
|
99
|
+
* crowds neighboring badges).
|
|
100
|
+
*
|
|
101
|
+
* `labelWidth` is the measured badge width; until it is known the badge is
|
|
102
|
+
* simply centered on the line.
|
|
98
103
|
*/
|
|
99
|
-
export declare function getVerticalLineLabelStyle(x: number, containerWidth: number): Pick<React.CSSProperties, "left" | "transform">;
|
|
104
|
+
export declare function getVerticalLineLabelStyle(x: number, containerWidth: number, labelWidth?: number): Pick<React.CSSProperties, "left" | "transform">;
|
|
100
105
|
/**
|
|
101
106
|
* Step-forward interpolation: find the last data point with
|
|
102
107
|
* `time <= crosshairTime` and return its value.
|