@gearbox-protocol/permissionless-ui 1.17.6 → 1.17.7

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.
@@ -10,6 +10,22 @@ type Flavor<T, FlavorT> = T & Flavoring<FlavorT>;
10
10
  export type YMeasureUnits = "$" | "%" | "none" | Flavor<string, "token">;
11
11
  type YFormatter = (v: number, symbol: YMeasureUnits | undefined, format?: "full" | "short") => string;
12
12
  export declare const getYFormatter: (unit: YMeasureUnits) => YFormatter;
13
+ /**
14
+ * Format a number with full precision, only removing trailing zeros
15
+ * Used for displaying exact current values on graphs
16
+ */
17
+ export declare function formatExactValue(value: number, symbol?: string, maxDecimals?: number): string;
18
+ /**
19
+ * Creates an adaptive Y-axis formatter that determines precision dynamically
20
+ * based on visible range to ensure unique labels on the axis.
21
+ * Data point values (like current price label) are shown with full precision.
22
+ * Returns both the formatter and update functions.
23
+ */
24
+ export declare function createAdaptiveYAxisFormatter(initialValues: number[], _unit: YMeasureUnits): {
25
+ formatter: (price: number) => string;
26
+ updateVisibleRange: (visibleValues: number[]) => void;
27
+ updateLastValues: (lastValues: number[]) => void;
28
+ };
13
29
  export type XMeasureUnits = "time" | "%";
14
30
  type XFormatter = (time: Time, symbol: XMeasureUnits | undefined) => string;
15
31
  export declare const getXFormatter: (unit: XMeasureUnits, points?: Point[]) => XFormatter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/permissionless-ui",
3
- "version": "1.17.6",
3
+ "version": "1.17.7",
4
4
  "description": "Internal UI components",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/index.js",