@gearbox-protocol/permissionless-ui 1.22.0-next.13 → 1.22.0-next.15
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/checkbox/checkbox-labeled.cjs +1 -1
- package/dist/cjs/components/client-adapters/styled-rounded-image/styled-rounded-image.cjs +1 -1
- package/dist/cjs/components/short-string/short-string.cjs +1 -1
- package/dist/cjs/components/token-icon/token-icon.cjs +1 -1
- package/dist/cjs/components/token-symbol/token-symbol.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/utils/index.cjs +1 -1
- package/dist/cjs/utils/network-icons.cjs +1 -1
- package/dist/cjs/utils/shorten-string.cjs +1 -1
- package/dist/cjs/utils/z-index.cjs +1 -0
- package/dist/esm/components/buttons/button/button.js +2 -0
- package/dist/esm/components/checkbox/checkbox-labeled.js +1 -0
- package/dist/esm/components/client-adapters/styled-rounded-image/styled-rounded-image.js +1 -0
- package/dist/esm/components/short-string/short-string.js +19 -23
- package/dist/esm/components/token-icon/token-icon.js +23 -22
- package/dist/esm/components/token-symbol/token-symbol.js +98 -40
- package/dist/esm/index.js +208 -208
- package/dist/esm/utils/index.js +68 -68
- package/dist/esm/utils/network-icons.js +4 -53
- package/dist/esm/utils/shorten-string.js +7 -3
- package/dist/esm/utils/z-index.js +7 -0
- package/dist/globals.css +1 -1
- package/dist/types/components/short-string/short-string.d.ts +4 -4
- package/dist/types/components/token-icon/token-icon.d.ts +1 -1
- package/dist/types/components/token-symbol/token-symbol.d.ts +9 -4
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/network-icons.d.ts +3 -32
- package/dist/types/utils/shorten-string.d.ts +2 -1
- package/dist/types/utils/z-index.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
* Network icon paths mapping
|
|
3
|
-
*/
|
|
4
|
-
export type NetworkType = "Mainnet" | "Arbitrum" | "Optimism" | "Sonic" | "Monad" | "AllNetworks" | string;
|
|
1
|
+
import { NetworkType } from '@gearbox-protocol/sdk';
|
|
5
2
|
/**
|
|
6
3
|
* Alias for backward compatibility
|
|
7
4
|
*/
|
|
8
|
-
export type NetworkIcons = NetworkType;
|
|
9
|
-
/**
|
|
10
|
-
* Network configuration
|
|
11
|
-
*/
|
|
12
|
-
export interface NetworkConfig {
|
|
13
|
-
name: string;
|
|
14
|
-
icon: string;
|
|
15
|
-
chainId: number;
|
|
16
|
-
}
|
|
5
|
+
export type NetworkIcons = NetworkType | "AllNetworks";
|
|
17
6
|
/**
|
|
18
7
|
* Get network icon path by network name
|
|
19
8
|
*
|
|
@@ -26,22 +15,4 @@ export interface NetworkConfig {
|
|
|
26
15
|
* getNetworkIcon("Unknown") // ""
|
|
27
16
|
* ```
|
|
28
17
|
*/
|
|
29
|
-
export declare function getNetworkIcon(network:
|
|
30
|
-
/**
|
|
31
|
-
* Get network name by chain ID
|
|
32
|
-
*
|
|
33
|
-
* @param chainId - Chain ID
|
|
34
|
-
* @returns Network name or undefined if not found
|
|
35
|
-
*/
|
|
36
|
-
export declare function getNetworkByChainId(chainId: number): string | undefined;
|
|
37
|
-
/**
|
|
38
|
-
* Get network config by name
|
|
39
|
-
*
|
|
40
|
-
* @param network - Network name
|
|
41
|
-
* @returns Network config or undefined if not found
|
|
42
|
-
*/
|
|
43
|
-
export declare function getNetworkConfig(network: NetworkType): NetworkConfig | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* Get all available networks
|
|
46
|
-
*/
|
|
47
|
-
export declare function getAllNetworks(): NetworkConfig[];
|
|
18
|
+
export declare function getNetworkIcon(network: NetworkIcons): string;
|
|
@@ -12,4 +12,5 @@
|
|
|
12
12
|
* shortenString("A very long string", 10) // "A very lon..."
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
export declare function shortenString(str: string, maxLength
|
|
15
|
+
export declare function shortenString(str: string, maxLength: number): string;
|
|
16
|
+
export declare function isLongString(str: string, maxLength: number): boolean;
|