@gearbox-protocol/permissionless-ui 1.22.0-next.26 → 1.22.0-next.28

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.
@@ -1,16 +1,14 @@
1
- /**
2
- * Parses a string input to BigInt with decimal support
3
- *
4
- * @param input - The input string to parse (e.g., "123.45")
5
- * @param decimals - Number of decimal places for the token
6
- * @param allowNegative - Whether to allow negative values
7
- * @returns Tuple of [bigint value, cleaned input string] or [null, null] on error
8
- *
9
- * @example
10
- * ```ts
11
- * parseInputToBN("123.45", 18) // [123450000000000000000n, "123.45"]
12
- * parseInputToBN("", 18) // [0n, ""]
13
- * parseInputToBN("invalid", 18) // [null, null]
14
- * ```
15
- */
16
- export declare function parseInputToBN(input: string | undefined | null, decimals: number, allowNegative?: boolean): [bigint | null, string | null];
1
+ export declare function isPositiveFloat(val: string): boolean;
2
+ export type ParseOutput = [bigint | null, string | null];
3
+ export declare const parseInputToBN: (input: string, decimals: number, allowNegative?: boolean) => ParseOutput;
4
+ export interface SmallNumberParseResult {
5
+ integer: string;
6
+ repeat: number;
7
+ decimal: string | undefined;
8
+ }
9
+ export type ParseSmallNumberResult = SmallNumberParseResult | {
10
+ originalValue: string;
11
+ };
12
+ export declare function parseSmallNumber(numStr: string): ParseSmallNumberResult;
13
+ export declare function bnToPrettyView(number: bigint | undefined | string | number, decimals: number, precision?: number, allowNegative?: boolean): ParseSmallNumberResult;
14
+ export declare function bnToLiquidationPriceView(number: bigint, precision?: number): ParseSmallNumberResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/permissionless-ui",
3
- "version": "1.22.0-next.26",
3
+ "version": "1.22.0-next.28",
4
4
  "description": "Internal UI components",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/index.js",