@web3icons/common 0.11.26 → 0.11.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.
package/dist/index.d.ts CHANGED
@@ -1 +1,24 @@
1
- export { f as IExchangeMetadata, j as IExchangeRaw, I as IMetadata, d as INetworkMetadata, g as INetworkRaw, c as ITokenMetadata, h as ITokenRaw, e as IWalletMetadata, i as IWalletRaw, k as IconMap, b as TExchangeType, l as TMetadata, m as TRaw, a as TType, T as TVariant, exchanges, networks, tokens, wallets } from './metadata/index.js';
1
+ export {
2
+ f as IExchangeMetadata,
3
+ j as IExchangeRaw,
4
+ I as IMetadata,
5
+ d as INetworkMetadata,
6
+ g as INetworkRaw,
7
+ c as ITokenMetadata,
8
+ h as ITokenRaw,
9
+ e as IWalletMetadata,
10
+ i as IWalletRaw,
11
+ k as IconMap,
12
+ o as IconNode,
13
+ n as IconNodeElement,
14
+ b as TExchangeType,
15
+ p as TIconVariants,
16
+ l as TMetadata,
17
+ m as TRaw,
18
+ a as TType,
19
+ T as TVariant,
20
+ exchanges,
21
+ networks,
22
+ tokens,
23
+ wallets,
24
+ } from './metadata/index.js'
package/dist/index.js CHANGED
@@ -1,13 +1,3 @@
1
- import {
2
- exchanges,
3
- networks,
4
- tokens,
5
- wallets
6
- } from "./chunk-PVKGAKQD.js";
7
- export {
8
- exchanges,
9
- networks,
10
- tokens,
11
- wallets
12
- };
13
- //# sourceMappingURL=index.js.map
1
+ import { exchanges, networks, tokens, wallets } from './chunk-4EU7S6HL.js'
2
+ export { exchanges, networks, tokens, wallets }
3
+ //# sourceMappingURL=index.js.map
@@ -1,60 +1,106 @@
1
- type TVariant = 'branded' | 'mono' | 'background';
2
- type TType = 'network' | 'token' | 'wallet' | 'exchange';
3
- type TExchangeType = 'cex' | 'dex';
1
+ type TVariant = 'branded' | 'mono' | 'background'
2
+ type TType = 'network' | 'token' | 'wallet' | 'exchange'
3
+ type TExchangeType = 'cex' | 'dex'
4
4
  interface IMetadata {
5
- id: string;
6
- filePath: string;
7
- name: string;
8
- variants: TVariant[];
5
+ id: string
6
+ filePath: string
7
+ name: string
8
+ variants: TVariant[]
9
9
  }
10
10
  interface ITokenMetadata extends IMetadata {
11
- symbol: string;
12
- marketCapRank: number | null;
13
- addresses: {
14
- [key: string]: string | undefined;
15
- };
11
+ symbol: string
12
+ marketCapRank: number | null
13
+ addresses: {
14
+ [key: string]: string | undefined
15
+ }
16
16
  }
17
17
  interface INetworkMetadata extends IMetadata {
18
- shortName?: string;
19
- nativeCoinId?: string;
20
- chainId?: number | string;
21
- caip2id?: string;
22
- }
23
- interface IWalletMetadata extends IMetadata {
18
+ shortName?: string
19
+ nativeCoinId?: string
20
+ chainId?: number | string
21
+ caip2id?: string
24
22
  }
23
+ interface IWalletMetadata extends IMetadata {}
25
24
  interface IExchangeMetadata extends IMetadata {
26
- type: TExchangeType;
25
+ type: TExchangeType
27
26
  }
28
27
  interface IRaw {
29
- id: string;
30
- name: string;
28
+ id: string
29
+ name: string
31
30
  }
32
31
  interface INetworkRaw extends IRaw {
33
- shortname?: string;
34
- native_coin_id?: string;
35
- chain_identifier?: number;
32
+ shortname?: string
33
+ native_coin_id?: string
34
+ chain_identifier?: number
36
35
  }
37
36
  interface ITokenRaw extends IRaw {
38
- symbol: string;
39
- market_cap_rank?: number | null;
40
- }
41
- interface IWalletRaw extends IRaw {
37
+ symbol: string
38
+ market_cap_rank?: number | null
42
39
  }
40
+ interface IWalletRaw extends IRaw {}
43
41
  interface IExchangeRaw extends IRaw {
44
- type: TExchangeType;
42
+ type: TExchangeType
45
43
  }
46
44
  interface IconMap {
47
- [key: string]: string;
45
+ [key: string]: string
46
+ }
47
+ type TMetadata =
48
+ | INetworkMetadata
49
+ | IWalletMetadata
50
+ | ITokenMetadata
51
+ | IExchangeMetadata
52
+ type TRaw = INetworkRaw | ITokenRaw | IWalletRaw | IExchangeRaw
53
+ /**
54
+ * Represents an SVG element as a data structure for the factory pattern.
55
+ * Format: [elementName, attributes] or [elementName, attributes, children]
56
+ */
57
+ type IconNodeElement =
58
+ | [elementName: string, attributes: Record<string, any>]
59
+ | [
60
+ elementName: string,
61
+ attributes: Record<string, any>,
62
+ children: IconNodeElement[],
63
+ ]
64
+ type IconNode = IconNodeElement[]
65
+ /**
66
+ * Icon variants data structure.
67
+ * Each variant contains an array of IconNode elements.
68
+ */
69
+ type TIconVariants = {
70
+ branded?: IconNode
71
+ mono?: IconNode
72
+ background?: IconNode
48
73
  }
49
- type TMetadata = INetworkMetadata | IWalletMetadata | ITokenMetadata | IExchangeMetadata;
50
- type TRaw = INetworkRaw | ITokenRaw | IWalletRaw | IExchangeRaw;
51
74
 
52
- declare const tokens: ITokenMetadata[];
75
+ declare const tokens: ITokenMetadata[]
53
76
 
54
- declare const networks: INetworkMetadata[];
77
+ declare const networks: INetworkMetadata[]
55
78
 
56
- declare const wallets: IWalletMetadata[];
79
+ declare const wallets: IWalletMetadata[]
57
80
 
58
- declare const exchanges: IExchangeMetadata[];
81
+ declare const exchanges: IExchangeMetadata[]
59
82
 
60
- export { type IMetadata as I, type TVariant as T, type TType as a, type TExchangeType as b, type ITokenMetadata as c, type INetworkMetadata as d, type IWalletMetadata as e, exchanges, type IExchangeMetadata as f, type INetworkRaw as g, type ITokenRaw as h, type IWalletRaw as i, type IExchangeRaw as j, type IconMap as k, type TMetadata as l, type TRaw as m, networks, tokens, wallets };
83
+ export {
84
+ type IMetadata as I,
85
+ type TVariant as T,
86
+ type TType as a,
87
+ type TExchangeType as b,
88
+ type ITokenMetadata as c,
89
+ type INetworkMetadata as d,
90
+ type IWalletMetadata as e,
91
+ exchanges,
92
+ type IExchangeMetadata as f,
93
+ type INetworkRaw as g,
94
+ type ITokenRaw as h,
95
+ type IWalletRaw as i,
96
+ type IExchangeRaw as j,
97
+ type IconMap as k,
98
+ type TMetadata as l,
99
+ type TRaw as m,
100
+ type IconNodeElement as n,
101
+ networks,
102
+ type IconNode as o,
103
+ type TIconVariants as p,
104
+ tokens,
105
+ wallets,
106
+ }
@@ -1,13 +1,3 @@
1
- import {
2
- exchanges,
3
- networks,
4
- tokens,
5
- wallets
6
- } from "../chunk-PVKGAKQD.js";
7
- export {
8
- exchanges,
9
- networks,
10
- tokens,
11
- wallets
12
- };
13
- //# sourceMappingURL=index.js.map
1
+ import { exchanges, networks, tokens, wallets } from '../chunk-4EU7S6HL.js'
2
+ export { exchanges, networks, tokens, wallets }
3
+ //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@web3icons/common",
3
- "homepage": "https://tokenicons.io",
3
+ "homepage": "https://web3icons.io",
4
4
  "description": "Web3 icons' shared library, serves metadata and types and some utils.",
5
5
  "keywords": [
6
6
  "crypto icons",
@@ -11,7 +11,7 @@
11
11
  "svg crypto icons",
12
12
  "coin icons"
13
13
  ],
14
- "version": "0.11.26",
14
+ "version": "0.11.28",
15
15
  "private": false,
16
16
  "author": "0xa3k5",
17
17
  "license": "MIT",
@@ -54,7 +54,7 @@
54
54
  "access": "public"
55
55
  },
56
56
  "scripts": {
57
- "build": "bun run clean && bun run pre-build && tsup",
57
+ "build": "bun run clean && bun run pre-build && tsup && bun format",
58
58
  "pre-build": "cd ../../scripts/build-scripts && bun generate-metadata.ts",
59
59
  "lint": "eslint ./src --ext .ts",
60
60
  "format": "prettier --write \"**/*.{ts,js,md,json}\" --log-level error",