Skip to content

Commit

Permalink
Merge branch 'main' into 526-add-new-category-to-support-dapps
Browse files Browse the repository at this point in the history
  • Loading branch information
hiletmis committed Feb 26, 2025
2 parents b29c5fc + e8fe16b commit 710ec73
Show file tree
Hide file tree
Showing 28 changed files with 5,157 additions and 2,126 deletions.
120 changes: 120 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,125 @@
# @api3/logos

## 0.3.9

### Patch Changes

- 56725d9: Following logos has been updated:

| Logo | Name | Category |
| ---------------------------------------------------- | ---- | -------- |
| <img src="./raw/symbols/usdm.svg" width="36" alt=""> | usdm | symbol |

## 0.3.8

### Patch Changes

- fc6be85: Remove camelcase dependency

## 0.3.7

### Patch Changes

- 3f68f22: Add missing logos for frxUSD and sfrxUSD

## 0.3.6

### Patch Changes

- b482ea4: Some changes have been made to the `logos`.

| Logo | Name | Category |
| ------------------------------------------------------------ | ------ | ------------ |
| <img src="./raw/api-providers/infura.svg" width="36" alt=""> | infura | api-provider |

## 0.3.5

### Patch Changes

- 51e1120: Following logos has been updated:

| Logo | Name | Category |
| -------------------------------------------------------- | ---- | -------- |
| <img src="./raw/chains/Chain2020.svg" width="36" alt=""> | 2020 | chain |

## 0.3.4

### Patch Changes

- eac703d: Some changes have been made to the `logos`.

| Logo | Name | Category |
| -------------------------------------------------------- | ---- | -------- |
| <img src="./raw/chains/Chain2021.svg" width="36" alt=""> | 2021 | chain |

## 0.3.3

### Patch Changes

- bcf5127: Following logos has been updated:

| Logo | Name | Category |
| ---------------------------------------------------- | ---- | -------- |
| <img src="./raw/symbols/bera.svg" width="36" alt=""> | bera | symbol |

- 420b243: Add unichain logo

## 0.3.2

### Patch Changes

- 5239f93: Add missing logos for USDS sUSDS

## 0.3.1

### Patch Changes

- 2f445e1: Following logos has been updated:

| Logo | Name | Category |
| --------------------------------------------------------- | ----- | -------- |
| <img src="./raw/chains/Chain80094.svg" width="36" alt=""> | 80094 | chain |

- 7b21b4c: Remove overrides

## 0.3.0

### Minor Changes

- c1b7182: Override Berachain and BERA logos

## 0.2.31

### Patch Changes

- d707dec: Some changes have been made to the `logos`.

| Logo | Name | Category |
| --------------------------------------------------- | ---- | -------- |
| <img src="./raw/symbols/mtl.svg" width="36" alt=""> | mtl | symbol |

## 0.2.30

### Patch Changes

- b4c5faa: Some changes have been made to the `logos`.

| Logo | Name | Category |
| -------------------------------------------------------------- | ---------- | -------- |
| <img src="./raw/chains/Chain1868.svg" width="36" alt=""> | 1868 | chain |
| <img src="./raw/chains/Chain1868-light.svg" width="36" alt=""> | 1868-light | chain |

## 0.2.29

### Patch Changes

- feecef6: Following logos has been updated:

| Logo | Name | Category |
| ------------------------------------------------------ | ------ | -------- |
| <img src="./raw/symbols/crv.svg" width="36" alt=""> | crv | symbol |
| <img src="./raw/symbols/crvusd.svg" width="36" alt=""> | crvusd | symbol |

## 0.2.28

### Patch Changes
Expand Down
23 changes: 14 additions & 9 deletions helpers/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const fs = require('fs/promises');
const camelcase = require('camelcase');
const { rename } = require('fs');
const { getChains, dapis } = require('@api3/dapi-management');

Expand All @@ -16,7 +15,8 @@ module.exports = {
getSupportedChains,
getApiProviders,
getSupportedFeeds,
getDapps
getDapps,
toPascalCase
};

function getDapps() {
Expand Down Expand Up @@ -71,13 +71,20 @@ function getManualLogos(mode) {
}

function getPlaceholderImage(mode) {
return camelcase(mode, { pascalCase: true }) + 'Placeholder';
return toPascalCase(mode) + 'Placeholder';
}

function toPascalCase(string) {
return string
.replace(/([a-z])([A-Z])/g, '$1 $2')
.replace(/[-_]+|[^\p{L}\p{N}]/gu, ' ')
.toLowerCase()
.replace(/(?:^|\s)(\p{L})/gu, (_, letter) => letter.toUpperCase())
.replace(/\s+/g, '');
}

function sanitizeName(name, suffix = '', prefix = '') {
const componentName = `${camelcase(name.replace(/.svg/, ''), {
pascalCase: true
})}`;
const componentName = `${toPascalCase(name.replace(/.svg/, ''))}`;
return prefix + componentName + suffix;
}

Expand Down Expand Up @@ -130,9 +137,7 @@ async function renameFiles(dir) {
function generateFunction(batchName, switchCase, mode) {
return `
function sanitizeName(id) {
return camelcase(id, {
pascalCase: true
}).replace(/ExchangeRate/g, '');
return id.replace(/\\s+|-/g, '').replace(/ExchangeRate/g, '');
}
function ${batchName}(id, light = false) {
Expand Down
23 changes: 10 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@api3/logos",
"version": "0.2.28",
"version": "0.3.9",
"license": "MIT",
"sideEffects": false,
"repository": {
"type": "git",
"url": "https://github.com/api3dao/logos"
},
"packageManager": "pnpm@9.15.3",
"packageManager": "pnpm@10.5.0",
"keywords": [
"api3",
"logos",
Expand Down Expand Up @@ -35,24 +35,21 @@
"release": "pnpm changeset publish",
"auto-release": "node scripts/release.js"
},
"dependencies": {
"camelcase": "^6.3.0"
},
"devDependencies": {
"eslint": "^8.57.1",
"@babel/core": "^7.26.0",
"@babel/core": "^7.26.9",
"@babel/preset-react": "^7.26.3",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.11",
"@api3/dapi-management": "2.8.0",
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.28.1",
"@api3/dapi-management": "3.1.1",
"dropbox": "^10.34.0",
"node-fetch": "^2.7.0",
"dotenv": "^16.4.7",
"prettier": "^3.4.2",
"prettier": "^3.5.2",
"rimraf": "^6.0.1",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.19.1",
"eslint-config-prettier": "^9.1.0",
"@typescript-eslint/eslint-plugin": "^8.25.0",
"@typescript-eslint/parser": "^8.25.0",
"eslint-config-prettier": "^10.0.1",
"svgo": "^3.3.0"
},
"main": "./dist/cjs/index.js",
Expand Down
Loading

0 comments on commit 710ec73

Please sign in to comment.