Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update logos to version 1.0.0 #151

Merged
merged 10 commits into from
Jan 8, 2024
6 changes: 6 additions & 0 deletions .changeset/quick-timers-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"logos": major
---

Package name has been changed to `logos`
`api-integrations` package is updated
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
- Returned string is a base64 encoded SVG image.

```js
import { ChainLogo, SymbolLogo, ApiProviderLogo } from "beta-logos";
import { ChainLogo, SymbolLogo, ApiProviderLogo } from "logos";

<div>
<img src={ChainLogo("43114")} width={50} height={50} alt="43114" />
Expand Down Expand Up @@ -122,10 +122,10 @@

### Patch Changes

- a835657: - JSDoc annotations added to `beta-logos` package.
- a835657: - JSDoc annotations added to `logos` package.

- `beta-logos` package now exports `Logo` as svg string.
- `beta-logos` package now exports `Logo` as React component.
- `logos` package now exports `Logo` as svg string.
- `logos` package now exports `Logo` as React component.
- Package size reduced.

- Method names changed.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
## Installation

```bash
yarn add beta-logos
yarn add logos
```

## Usage

### React

```js
import { ChainLogo, SymbolLogo, ApiProviderLogo } from 'beta-logos';
import { ChainLogo, SymbolLogo, ApiProviderLogo } from 'logos';

<div>
<img src={ChainLogo('43114')} width={50} height={50} alt="43114" />
Expand All @@ -33,7 +33,7 @@ import { ChainLogo, SymbolLogo, ApiProviderLogo } from 'beta-logos';
</template>

<script>
import { ChainLogo, SymbolLogo, ApiProviderLogo } from 'beta-logos';
import { ChainLogo, SymbolLogo, ApiProviderLogo } from 'logos';

export default {
...
Expand Down
4 changes: 2 additions & 2 deletions helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function generateDocAnnotationSvg(description, batchName, example) {
*
* @example
* \`\`\`
* import { ${batchName}Svg } from 'beta-logos';
* import { ${batchName}Svg } from 'logos';
*
* const App = () => {
* return <img src={${batchName}Svg("${example}")} alt="Logo" />;
Expand All @@ -102,7 +102,7 @@ function generateDocAnnotationSvg(description, batchName, example) {
*
* @example
* \`\`\`
* import { ${batchName}Svg } from 'beta-logos';
* import { ${batchName}Svg } from 'logos';
*
* const App = () => {
* return <img src={${batchName}Svg("${example}")} alt="Logo" width="64" height="64" />;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "beta-logos",
"name": "logos",
"version": "0.0.18",
"license": "MIT",
"sideEffects": false,
Expand All @@ -17,7 +17,7 @@
"camelcase": "^6.3.0"
},
"devDependencies": {
"@api3/api-integrations": "^0.0.1",
"api-integrations": "^0.1.0",
"@api3/chains": "^4.2.0",
"@babel/core": "^7.23.7",
"@babel/preset-react": "^7.23.3",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const fs = require('fs/promises');
const { rimraf } = require('rimraf')
const babel = require('@babel/core');
const utils = require('../helpers/utils');
const apiIntegrations = require('@api3/api-integrations');
const apiIntegrations = require('api-integrations');
const { nodaryFeeds } = require('@nodary/utilities');
const camelcase = require('camelcase');

Expand Down
6 changes: 3 additions & 3 deletions viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"@testing-library/jest-dom": "^6.2.0",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.2",
"beta-logos": "file:./logos.tgz",
"framer-motion": "^10.17.8",
"logos": "file:./logos.tgz",
"framer-motion": "^10.17.9",
"@nodary/utilities": "^1.2.0",
"gh-pages": "^6.1.1",
"react": "^18.2.0",
Expand All @@ -23,7 +23,7 @@
"react-scripts": "5.0.1",
"react-syntax-highlighter": "^15.5.0",
"web-vitals": "^3.5.1",
"@api3/api-integrations": "^0.0.1"
"api-integrations": "^0.1.0"
},
"scripts": {
"start": "GENERATE_SOURCEMAP=false react-scripts start",
Expand Down
4 changes: 2 additions & 2 deletions viewer/src/Components/ApiProviderView.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Flex, Text, Image } from '@chakra-ui/react';
import { ApiProviderLogo } from 'beta-logos';
import { ApiProviderLogo } from 'logos';
import SearchRow from '../Custom/SearchRow';
import { useState } from 'react';
import InfoView from '../Custom/InfoView';
import { getApiProviderAliases } from '@api3/api-integrations'
import { getApiProviderAliases } from 'api-integrations'

const ApiProvidersView = () => {
const [apiProvider, setApiProvider] = useState('');
Expand Down
2 changes: 1 addition & 1 deletion viewer/src/Components/ChainsView.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Flex, Text, Spacer, Image } from '@chakra-ui/react';
import { ChainLogo } from 'beta-logos';
import { ChainLogo } from 'logos';
import * as Api3Chains from '@api3/chains';
import SearchRow from '../Custom/SearchRow';
import { useState } from 'react';
Expand Down
14 changes: 10 additions & 4 deletions viewer/src/Components/ChangeLog.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import '../md.css';
const DocsView = () => {
const markdown = `# @api3/logos

## 1.0.0

### Major Changes

- Package name has been changed to \`logos\`
- \`api - integrations\` package is updated

## 0.0.18

Expand Down Expand Up @@ -70,7 +76,7 @@ const DocsView = () => {
- Returned string is a base64 encoded SVG image.

\`\`\`js
import { ChainLogo, SymbolLogo, ApiProviderLogo } from 'beta-logos';
import { ChainLogo, SymbolLogo, ApiProviderLogo } from 'logos';

<div>
<img src={ChainLogo('43114')} width={50} height={50} alt='43114' />
Expand Down Expand Up @@ -113,8 +119,8 @@ const DocsView = () => {

### Patch Changes

- a835657: - JSDoc annotations added to \`beta-logos\` package.
- JS Docs are annotations are now available for \`beta-logos\` package.
- a835657: - JSDoc annotations added to \`logos\` package.
- JS Docs are annotations are now available for \`logos\` package.

\`\`\`ts
@param props
Expand All @@ -125,7 +131,7 @@ const DocsView = () => {
@returns — ApiProviderLogo component

@example
import { ApiProviderLogo } from 'beta-logos';
import { ApiProviderLogo } from 'logos';

const App = () => {
return <ApiProviderLogo id="nodary" />;
Expand Down
6 changes: 3 additions & 3 deletions viewer/src/Components/Docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const ChainsView = () => {
</Text>
<SyntaxHighlighter
PreTag="div"
children={String('npm install beta-logos')}
children={String('npm install logos')}
language={'bash'}
style={dracula}
/>
Expand All @@ -35,7 +35,7 @@ const ChainsView = () => {
</Text>
<SyntaxHighlighter
PreTag="div"
children={String(`import { ChainLogo, SymbolLogo, ApiProviderLogo } from 'beta-logos';
children={String(`import { ChainLogo, SymbolLogo, ApiProviderLogo } from 'logos';

<div>
<img src={ ChainLogo('43114') } width={50} height={50} alt='43114' />
Expand All @@ -61,7 +61,7 @@ const ChainsView = () => {

<script>

import { ChainLogo, SymbolLogo, ApiProviderLogo } from 'beta-logos';
import { ChainLogo, SymbolLogo, ApiProviderLogo } from 'logos';
export default {
...
methods: {
Expand Down
2 changes: 1 addition & 1 deletion viewer/src/Components/Header.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Flex, Text, Spacer, Image } from '@chakra-ui/react';
import { SymbolLogo } from 'beta-logos';
import { SymbolLogo } from 'logos';

const Header = () => {
return (
Expand Down
2 changes: 1 addition & 1 deletion viewer/src/Components/MissingLogosView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Flex, Text, Image, VStack } from '@chakra-ui/react';
import * as Api3Chains from '@api3/chains';
import { SymbolLogoMissing, SymbolLogo, ApiProviderLogoMissing, ApiProviderLogo, ChainLogoMissing, ChainLogo } from 'beta-logos';
import { SymbolLogoMissing, SymbolLogo, ApiProviderLogoMissing, ApiProviderLogo, ChainLogoMissing, ChainLogo } from 'logos';
import Title from '../Custom/Title';

const MissingBatchView = ({ header, batch, method }) => {
Expand Down
2 changes: 1 addition & 1 deletion viewer/src/Components/SymbolsView.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Flex, Text, Image } from '@chakra-ui/react';
import { SymbolLogo } from 'beta-logos';
import { SymbolLogo } from 'logos';
import SearchRow from '../Custom/SearchRow';
import { useState } from 'react';
import InfoView from '../Custom/InfoView';
Expand Down
2 changes: 1 addition & 1 deletion viewer/src/Custom/InfoView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import { Flex, Spacer, Text } from '@chakra-ui/react';
import { ApiProviderLogo, SymbolLogo, ChainLogo } from 'beta-logos';
import { ApiProviderLogo, SymbolLogo, ChainLogo } from 'logos';
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
import { xonokai } from 'react-syntax-highlighter/dist/esm/styles/prism';
import { CloseIcon } from '@chakra-ui/icons';
Expand Down
22 changes: 11 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@
ethers "^5.7.2"
lodash "^4.17.21"

"@api3/api-integrations@^0.0.1":
version "0.0.1"
resolved "https://registry.yarnpkg.com/@api3/api-integrations/-/api-integrations-0.0.1.tgz#026ae7eb30c84dcda058a5e6ee4126fc26262856"
integrity sha512-Q/BvP3W38ItmlH5xSdwXYd64bUhSlbOEnnLjPkhXc2w/33Ync099Hba38x5r8bjrVooRDL1J7BYUAbp4h/hDBg==
dependencies:
"@api3/airnode-abi" "^0.12.0"
"@api3/ois" "^2.2.1"
ethers "^5.4.2"
zod "^3.22.4"

"@api3/chains@^4.2.0":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@api3/chains/-/chains-4.2.0.tgz#7f869794c8d29507bb83188cacddb91cd132996c"
Expand All @@ -49,7 +39,7 @@
viem "^1.19.11"
zod "^3.22.4"

"@api3/ois@^2.2.1":
"@api3/ois@^2.3.1":
version "2.3.1"
resolved "https://registry.yarnpkg.com/@api3/ois/-/ois-2.3.1.tgz#de80dc1b404f094be9049d2a8fdc0362cdfd7dce"
integrity sha512-7TmgEiJn3TrqV2BZGh4fKTF4qX7Q/dyGdQh9L6gj4dHBmoKzfK0eDbwjWR+RokYrd9k4E4whGNxEnzdZr3ubSA==
Expand Down Expand Up @@ -1111,6 +1101,16 @@ ansi-styles@^6.1.0:
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5"
integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==

api-integrations@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/api-integrations/-/api-integrations-0.1.0.tgz#65bc3c332e84d4c1902c3aa05bfdd8680699efda"
integrity sha512-TwzW4eQcvKJtR37ZRISEsrWI6hZrowXkdsiXTVMVIzphXBr+vb9mvXiP+WEu99hhr9/FUjX7vg+L9ahzSSUHwQ==
dependencies:
"@api3/airnode-abi" "^0.12.0"
"@api3/ois" "^2.3.1"
ethers "^5.4.2"
zod "^3.22.4"

argparse@^1.0.7:
version "1.0.10"
resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz"
Expand Down