@api3/logos 0.3.9 → 0.4.0
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/ChainLogo.js +3 -0
- package/dist/cjs/DappLogo.d.ts +29 -0
- package/dist/cjs/DappLogo.js +14 -0
- package/dist/cjs/DappLogoMissing.json +1 -0
- package/dist/cjs/index.d.ts +4 -2
- package/dist/cjs/index.js +4 -2
- package/dist/esm/ChainLogo.js +3 -0
- package/dist/esm/DappLogo.d.ts +29 -0
- package/dist/esm/DappLogo.js +14 -0
- package/dist/esm/DappLogoMissing.json +1 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/logos/chain/Chain10143.svg +3 -0
- package/dist/logos/dapp/Placeholder.svg +17 -0
- package/package.json +11 -10
package/dist/cjs/ChainLogo.js
CHANGED
|
@@ -80,6 +80,7 @@ const Chain1088 = require('../logos/chain/Chain1088.svg');
|
|
|
80
80
|
const Chain59902 = require('../logos/chain/Chain59902.svg');
|
|
81
81
|
const Chain34443 = require('../logos/chain/Chain34443.svg');
|
|
82
82
|
const Chain919 = require('../logos/chain/Chain919.svg');
|
|
83
|
+
const Chain10143 = require('../logos/chain/Chain10143.svg');
|
|
83
84
|
const Chain1284 = require('../logos/chain/Chain1284.svg');
|
|
84
85
|
const Chain1287 = require('../logos/chain/Chain1287.svg');
|
|
85
86
|
const Chain1285 = require('../logos/chain/Chain1285.svg');
|
|
@@ -288,6 +289,8 @@ function ChainLogo(id, light = false) {
|
|
|
288
289
|
return Chain34443;
|
|
289
290
|
case "919":
|
|
290
291
|
return Chain919;
|
|
292
|
+
case "10143":
|
|
293
|
+
return Chain10143;
|
|
291
294
|
case "1284":
|
|
292
295
|
return Chain1284;
|
|
293
296
|
case "1287":
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param {string} id - Unique ID for the logo element.
|
|
5
|
+
* @param {boolean} [light=false] - Light version.
|
|
6
|
+
* @returns
|
|
7
|
+
* DappLogo component
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```
|
|
11
|
+
* import { DappLogoSvg } from '@api3/logos';
|
|
12
|
+
*
|
|
13
|
+
* const App = () => {
|
|
14
|
+
* return <img src={DappLogoSvg("eth")} alt="Logo" />;
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```
|
|
20
|
+
* import { DappLogoSvg } from '@api3/logos';
|
|
21
|
+
*
|
|
22
|
+
* const App = () => {
|
|
23
|
+
* return <img src={DappLogoSvg("eth")} alt="Logo" width="64" height="64" />;
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
declare function DappLogo(id: string, light?: boolean): string;
|
|
29
|
+
export default DappLogo;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const DappPlaceholder = require('../logos/dapp/Placeholder.svg');
|
|
2
|
+
function sanitizeName(id) {
|
|
3
|
+
return id.replace(/\s+|-/g, '').replace(/ExchangeRate/g, '');
|
|
4
|
+
}
|
|
5
|
+
function DappLogo(id, light = false) {
|
|
6
|
+
if (!id) {
|
|
7
|
+
return DappPlaceholder;
|
|
8
|
+
}
|
|
9
|
+
switch (sanitizeName(`${id}${light ? "light" : ""}`).toLowerCase()) {
|
|
10
|
+
default:
|
|
11
|
+
return light ? DappLogo(id) : DappPlaceholder;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
module.exports = DappLogo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
["aave","abracadabra","aeroscraper","aurelius","aurum-finance","avalon","benqi","beraborrow","burrbear","compound-finance","correlate","curvance","dahlia","dolomite","dtrinity","eggs","elara","enclabs","fisclend","fluid","granary","hana","init","ionic","juice","lendle","macaron","mach-finance","minterest","moonwell","nitro","omega","orbit","origami","pac","paddle","positions","roots","sake","scallop","silo","spark","stacking-salmon","stout","sumer","takara","takotako","taofi","untitled-bank","ursa","venus","vestation","vicuna-finance","yei","yield-hive","yieldfi","zeno","zerolend","zeru"]
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export { default as ApiProviderLogo } from './ApiProviderLogo.js';
|
|
2
|
-
export { default as ApiProviderLogoMissing } from './ApiProviderLogoMissing.json';
|
|
3
1
|
export { default as ChainLogo } from './ChainLogo.js';
|
|
4
2
|
export { default as ChainLogoMissing } from './ChainLogoMissing.json';
|
|
5
3
|
export { default as SymbolLogo } from './SymbolLogo.js';
|
|
6
4
|
export { default as SymbolLogoMissing } from './SymbolLogoMissing.json';
|
|
5
|
+
export { default as ApiProviderLogo } from './ApiProviderLogo.js';
|
|
6
|
+
export { default as ApiProviderLogoMissing } from './ApiProviderLogoMissing.json';
|
|
7
|
+
export { default as DappLogo } from './DappLogo.js';
|
|
8
|
+
export { default as DappLogoMissing } from './DappLogoMissing.json';
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
module.exports.ApiProviderLogo = require('./ApiProviderLogo.js');
|
|
2
|
-
module.exports.ApiProviderLogoMissing = require('./ApiProviderLogoMissing.json');
|
|
3
1
|
module.exports.ChainLogo = require('./ChainLogo.js');
|
|
4
2
|
module.exports.ChainLogoMissing = require('./ChainLogoMissing.json');
|
|
5
3
|
module.exports.SymbolLogo = require('./SymbolLogo.js');
|
|
6
4
|
module.exports.SymbolLogoMissing = require('./SymbolLogoMissing.json');
|
|
5
|
+
module.exports.ApiProviderLogo = require('./ApiProviderLogo.js');
|
|
6
|
+
module.exports.ApiProviderLogoMissing = require('./ApiProviderLogoMissing.json');
|
|
7
|
+
module.exports.DappLogo = require('./DappLogo.js');
|
|
8
|
+
module.exports.DappLogoMissing = require('./DappLogoMissing.json');
|
package/dist/esm/ChainLogo.js
CHANGED
|
@@ -80,6 +80,7 @@ import Chain1088 from '../logos/chain/Chain1088.svg';
|
|
|
80
80
|
import Chain59902 from '../logos/chain/Chain59902.svg';
|
|
81
81
|
import Chain34443 from '../logos/chain/Chain34443.svg';
|
|
82
82
|
import Chain919 from '../logos/chain/Chain919.svg';
|
|
83
|
+
import Chain10143 from '../logos/chain/Chain10143.svg';
|
|
83
84
|
import Chain1284 from '../logos/chain/Chain1284.svg';
|
|
84
85
|
import Chain1287 from '../logos/chain/Chain1287.svg';
|
|
85
86
|
import Chain1285 from '../logos/chain/Chain1285.svg';
|
|
@@ -288,6 +289,8 @@ function ChainLogo(id, light = false) {
|
|
|
288
289
|
return Chain34443;
|
|
289
290
|
case "919":
|
|
290
291
|
return Chain919;
|
|
292
|
+
case "10143":
|
|
293
|
+
return Chain10143;
|
|
291
294
|
case "1284":
|
|
292
295
|
return Chain1284;
|
|
293
296
|
case "1287":
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param {string} id - Unique ID for the logo element.
|
|
5
|
+
* @param {boolean} [light=false] - Light version.
|
|
6
|
+
* @returns
|
|
7
|
+
* DappLogo component
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```
|
|
11
|
+
* import { DappLogoSvg } from '@api3/logos';
|
|
12
|
+
*
|
|
13
|
+
* const App = () => {
|
|
14
|
+
* return <img src={DappLogoSvg("eth")} alt="Logo" />;
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```
|
|
20
|
+
* import { DappLogoSvg } from '@api3/logos';
|
|
21
|
+
*
|
|
22
|
+
* const App = () => {
|
|
23
|
+
* return <img src={DappLogoSvg("eth")} alt="Logo" width="64" height="64" />;
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
declare function DappLogo(id: string, light?: boolean): string;
|
|
29
|
+
export default DappLogo;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import DappPlaceholder from '../logos/dapp/Placeholder.svg';
|
|
2
|
+
function sanitizeName(id) {
|
|
3
|
+
return id.replace(/\s+|-/g, '').replace(/ExchangeRate/g, '');
|
|
4
|
+
}
|
|
5
|
+
function DappLogo(id, light = false) {
|
|
6
|
+
if (!id) {
|
|
7
|
+
return DappPlaceholder;
|
|
8
|
+
}
|
|
9
|
+
switch (sanitizeName(`${id}${light ? "light" : ""}`).toLowerCase()) {
|
|
10
|
+
default:
|
|
11
|
+
return light ? DappLogo(id) : DappPlaceholder;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export default DappLogo;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
["aave","abracadabra","aeroscraper","aurelius","aurum-finance","avalon","benqi","beraborrow","burrbear","compound-finance","correlate","curvance","dahlia","dolomite","dtrinity","eggs","elara","enclabs","fisclend","fluid","granary","hana","init","ionic","juice","lendle","macaron","mach-finance","minterest","moonwell","nitro","omega","orbit","origami","pac","paddle","positions","roots","sake","scallop","silo","spark","stacking-salmon","stout","sumer","takara","takotako","taofi","untitled-bank","ursa","venus","vestation","vicuna-finance","yei","yield-hive","yieldfi","zeno","zerolend","zeru"]
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { default as ApiProviderLogo } from './ApiProviderLogo.js';
|
|
2
2
|
export { default as ApiProviderLogoMissing } from './ApiProviderLogoMissing.json';
|
|
3
|
+
export { default as DappLogo } from './DappLogo.js';
|
|
4
|
+
export { default as DappLogoMissing } from './DappLogoMissing.json';
|
|
3
5
|
export { default as SymbolLogo } from './SymbolLogo.js';
|
|
4
6
|
export { default as SymbolLogoMissing } from './SymbolLogoMissing.json';
|
|
5
7
|
export { default as ChainLogo } from './ChainLogo.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { default as ApiProviderLogo } from './ApiProviderLogo.js';
|
|
2
2
|
export { default as ApiProviderLogoMissing } from './ApiProviderLogoMissing.json';
|
|
3
|
+
export { default as DappLogo } from './DappLogo.js';
|
|
4
|
+
export { default as DappLogoMissing } from './DappLogoMissing.json';
|
|
3
5
|
export { default as SymbolLogo } from './SymbolLogo.js';
|
|
4
6
|
export { default as SymbolLogoMissing } from './SymbolLogoMissing.json';
|
|
5
7
|
export { default as ChainLogo } from './ChainLogo.js';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
2
|
+
<path fill="#8E9BB2" d="M12 1.91992C9.08912 1.91992 1.92004 9.08876 1.92004 11.9997C1.92004 14.9107 9.08912 22.0797 12 22.0797C14.9109 22.0797 22.08 14.9106 22.08 11.9997C22.08 9.08888 14.911 1.91992 12 1.91992ZM10.4292 17.7637C9.20172 17.4293 5.90152 11.6564 6.23606 10.429C6.57061 9.20143 12.3434 5.90134 13.5708 6.23588C14.7984 6.57036 18.0986 12.3431 17.764 13.5706C17.4295 14.7981 11.6567 18.0983 10.4292 17.7637Z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 32 36">
|
|
2
|
+
<path fill="#F3F3F3" stroke="#C3C4C3" stroke-width="2.11764" d="M1.17601 9.61697L15.9995 1.217L30.8229 9.61697V26.3829L15.9995 34.7828L1.17601 26.3829V9.61697Z"/>
|
|
3
|
+
<path stroke="#C3C4C3" stroke-width="2.11764" d="M1.17601 9.61697L15.9995 1.217L30.8229 9.61697V26.3829L15.9995 34.7828L1.17601 26.3829V9.61697Z"/>
|
|
4
|
+
<mask id="Placeholder_svg__mask0_53_108895" width="32" height="36" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha">
|
|
5
|
+
<path stroke="#EFEFEF" stroke-width="2.11764" d="M1.17601 9.61697L15.9995 1.217L30.8229 9.61697V26.3829L15.9995 34.7828L1.17601 26.3829V9.61697Z"/>
|
|
6
|
+
</mask>
|
|
7
|
+
<g mask="url(#Placeholder_svg__mask0_53_108895)">
|
|
8
|
+
<path fill="#DDDDDD" d="M41.1085 -18.5947L66.2151 -6.04144V19.0651L41.1085 31.6184L16.002 19.0651V-6.04144L41.1085 -18.5947Z"/>
|
|
9
|
+
</g>
|
|
10
|
+
<mask id="Placeholder_svg__mask1_53_108895" width="32" height="36" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha">
|
|
11
|
+
<path stroke="#EFEFEF" stroke-width="2" d="M30.8809 26.4173L15.9986 34.8506L1.11628 26.4173L1.11628 9.58284L15.9986 1.14955L30.8809 9.58284L30.8809 26.4173Z"/>
|
|
12
|
+
</mask>
|
|
13
|
+
<g mask="url(#Placeholder_svg__mask1_53_108895)">
|
|
14
|
+
<path fill="#DDDDDD" d="M-9.10461 54.5947L-34.2112 42.0414L-34.2112 16.9349L-9.10462 4.38159L16.0019 16.9349L16.002 42.0414L-9.10461 54.5947Z"/>
|
|
15
|
+
</g>
|
|
16
|
+
<path fill="#DDDDDD" d="M15.9972 9.66211L23.219 13.8316V22.1706L15.9972 26.3401L8.77541 22.1706V13.8316L15.9972 9.66211Z"/>
|
|
17
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@api3/logos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"repository": {
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
],
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"eslint": "^8.57.1",
|
|
22
|
-
"@babel/core": "^7.26.
|
|
22
|
+
"@babel/core": "^7.26.9",
|
|
23
23
|
"@babel/preset-react": "^7.26.3",
|
|
24
|
-
"@changesets/changelog-github": "^0.5.
|
|
25
|
-
"@changesets/cli": "^2.
|
|
26
|
-
"@api3/dapi-management": "3.
|
|
24
|
+
"@changesets/changelog-github": "^0.5.1",
|
|
25
|
+
"@changesets/cli": "^2.28.1",
|
|
26
|
+
"@api3/dapi-management": "3.2.0",
|
|
27
27
|
"dropbox": "^10.34.0",
|
|
28
28
|
"node-fetch": "^2.7.0",
|
|
29
29
|
"dotenv": "^16.4.7",
|
|
30
|
-
"prettier": "^3.
|
|
30
|
+
"prettier": "^3.5.2",
|
|
31
31
|
"rimraf": "^6.0.1",
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
33
|
-
"@typescript-eslint/parser": "^8.
|
|
34
|
-
"eslint-config-prettier": "^
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^8.25.0",
|
|
33
|
+
"@typescript-eslint/parser": "^8.25.0",
|
|
34
|
+
"eslint-config-prettier": "^10.0.1",
|
|
35
35
|
"svgo": "^3.3.0"
|
|
36
36
|
},
|
|
37
37
|
"main": "./dist/cjs/index.js",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
"optimize-chain-logos": "rimraf ./optimized/chain & svgo -q -p 8 -f ./raw/chains -o ./optimized/chain",
|
|
44
44
|
"optimize-symbol-logos": "rimraf ./optimized/symbol & svgo -q -p 8 -f ./raw/symbols -o ./optimized/symbol",
|
|
45
45
|
"optimize-api-provider-logos": "rimraf ./optimized/api-provider & svgo -q -p 8 -f ./raw/api-providers -o ./optimized/api-provider",
|
|
46
|
-
"
|
|
46
|
+
"optimize-dapp-logos": "rimraf ./optimized/dapp & svgo -q -p 8 -f ./raw/dapps -o ./optimized/dapp",
|
|
47
|
+
"build": "pnpm run optimize-chain-logos && pnpm run optimize-symbol-logos && pnpm run optimize-api-provider-logos && pnpm run optimize-dapp-logos && node scripts/build-svg.js",
|
|
47
48
|
"fetch": "node scripts/fetch-missing.js",
|
|
48
49
|
"version-check": "node scripts/version-check.js",
|
|
49
50
|
"package": "pnpm run build",
|