Compare commits

...
18 Commits
Author SHA1 Message Date
github-actions[bot] 2259e05088 [CI Skip] release/stable 3.0.1
skip-checks: true
2023-03-05 09:04:53 +00:00
Jaco 581a360226 3.0.1 (#725) 2023-03-05 11:02:25 +02:00
github-actions[bot] a3b5206107 [CI Skip] bump/beta 2.12.2-5-x
skip-checks: true
2023-03-03 09:24:35 +00:00
Jaco dcef4deb2a Bump dev & update gh workflows (#724) 2023-03-03 11:21:34 +02:00
github-actions[bot] 6629fc6a11 [CI Skip] bump/beta 2.12.2-4-x
skip-checks: true
2023-03-01 12:08:54 +00:00
Jaco 0173205f4b Add wf continue-on-error: true (#723) 2023-03-01 14:06:14 +02:00
github-actions[bot] 001793c937 [CI Skip] bump/beta 2.12.2-3-x
skip-checks: true
2023-02-27 11:23:03 +00:00
Jaco 583f3416a6 Remove @polkadot/ui-assets package (#722) 2023-02-27 13:20:27 +02:00
github-actions[bot] 7913cfda05 [CI Skip] bump/beta 2.12.2-2-x
skip-checks: true
2023-02-25 10:12:23 +00:00
Jaco 9b7f4bf62f Adjust tests for node:test env (#721) 2023-02-25 12:09:05 +02:00
github-actions[bot] 9b3785b8f6 [CI Skip] bump/beta 2.12.2-1-x
skip-checks: true
2023-02-22 07:40:37 +00:00
Jaco 83c21fc185 Bump deps (#720) 2023-02-22 09:37:37 +02:00
github-actions[bot] 4baccadf26 [CI Skip] bump/beta 2.12.2-0-x
skip-checks: true
2023-02-20 10:45:10 +00:00
Jaco e83da1449d Swap Jest test runner (#719) 2023-02-20 12:42:11 +02:00
github-actions[bot] c488094732 [CI Skip] release/stable 2.12.1
skip-checks: true
2023-02-20 08:48:11 +00:00
Jaco c25fefa16f 2.12.1 (#718) 2023-02-20 10:45:38 +02:00
github-actions[bot] 6ff0fd7e9b [CI Skip] release/stable 2.11.3
skip-checks: true
2023-02-19 13:40:37 +00:00
Jaco 864efca1e6 2.11.3 (#717)
* 2.11.3

* Fix lint

* Update polkadot-dev-run-test

* Adjust jest setupEnv
2023-02-19 15:38:09 +02:00
87 changed files with 748 additions and 3584 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
steps:
- uses: jacogr/action-merge@d2d64b4545acd93b0a9575177d3d215ae3f92029
with:
checks: build,lint,test
checks: pr (build),pr (lint),pr (test)
labels: -auto
strategy: squash
token: ${{ secrets.GH_PAT_BOT }}
+1 -1
View File
@@ -3,10 +3,10 @@ on: [pull_request]
jobs:
pr:
continue-on-error: true
strategy:
matrix:
step: ['lint', 'test', 'build']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
-1
View File
@@ -10,7 +10,6 @@ jobs:
strategy:
matrix:
step: ['build:release']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
env:
YARN_ENABLE_SCRIPTS: false
+24
View File
@@ -1,5 +1,29 @@
# CHANGELOG
## 3.0.1 Mar 5, 2023
Changes:
- Remove `@polkadot/ui-assets` package
- Swap TS -> JS compiler to use tsc (from babel)
- Adjust all tests to use `node:test` runner (ESM variants)
- Bump to `@polkadot/util` 11.0.1
## 2.12.1 Feb 20, 2023
Changes:
- Adjust `styled-components` usage to cater for server-based environments
## 2.11.3 Feb 19, 2023
Changes:
- Bump to `@polkadot/util` 10.4.2
## 2.11.2 Feb 15, 2023
Changes:
+1 -1
View File
@@ -1,4 +1,4 @@
672 Jaco 2.11.2 (#716)
681 Jaco 3.0.1 (#725)
7 YJ fix #224: decrease frame size to 1024, set multipart bool (#225)
4 Antoine Estienne Refactor logic to better use prefix (#491)
4 kwingram25 fix ff api url issue (#289)
-8
View File
@@ -13,14 +13,6 @@ The following UI components are currently available -
Additionally some shared libraries, that are not dependent on any framework -
- [ui-assets](packages/ui-assets/) Static assets, images and others, shared across projects
- [ui-keyring](packages/ui-keyring/) A browser-specific wrapper around the base [@polkadot/util-keyring](https://github.com/polkadot-js/util/) library
- [ui-settings](packages/ui-settings/) A browser local storage wrapper for app settings & configuration
- [ui-shared](packages/ui-shared) Shared logic that is used across UI components, e.g. for icon generation
## examples
In addition to the above packages, there are examples available for integration of `ui-keyring`, `ui-settings` & the relevant `*-identicon` package. These are
- [example-react](packages/example-react) - start with `yarn example:react` and view on `http://localhost:8080`
- [example-vue](packages/example-vue) - start with `yarn example:vue` and view on `http://localhost:8080`
-16
View File
@@ -1,16 +0,0 @@
// Copyright 2017-2023 @polkadot/ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
const base = require('@polkadot/dev/config/babel-config-cjs.cjs');
module.exports = Object.keys(base).reduce((config, key) => {
config[key] = base[key];
if (key === 'plugins') {
config[key] = config[key].concat([
'transform-vue-template'
]);
}
return config;
}, {});
-17
View File
@@ -1,17 +0,0 @@
// Copyright 2017-2023 @polkadot/ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
const config = require('@polkadot/dev/config/jest.cjs');
module.exports = {
...config,
moduleNameMapper: {
'@polkadot/react-(identicon|qr)(.*)$': '<rootDir>/packages/react-$1/src/$2',
'@polkadot/reactnative-(identicon)(.*)$': '<rootDir>/packages/reactnative-$1/src/$2',
'@polkadot/ui-(assets|keyring|settings|shared)(.*)$': '<rootDir>/packages/ui-$1/src/$2',
'\\.(css|less)$': 'empty/object',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': 'empty/object'
},
setupFilesAfterEnv: ['<rootDir>/jest/setupEnv.js'],
testEnvironment: 'jsdom'
};
-10
View File
@@ -1,10 +0,0 @@
// Copyright 2017-2023 @polkadot/ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
const nodeCrypto = require('crypto');
window.crypto = {
getRandomValues: function (buffer) {
return nodeCrypto.randomFillSync(buffer);
}
};
+9 -19
View File
@@ -11,10 +11,10 @@
},
"sideEffects": false,
"type": "module",
"version": "2.11.2",
"version": "3.0.1",
"versions": {
"git": "2.11.2",
"npm": "2.11.2"
"git": "3.0.1",
"npm": "3.0.1"
},
"workspaces": [
"packages/*"
@@ -24,29 +24,19 @@
"build:release": "polkadot-ci-ghact-build",
"build:rollup": "polkadot-exec-rollup --config",
"clean": "polkadot-dev-clean-build",
"example:react": "yarn build && cd packages/example-react && yarn polkadot-exec-webpack --config webpack.config.cjs",
"example:vue": "yarn build && cd packages/example-vue && yarn polkadot-exec-webpack --config webpack.config.cjs",
"lint": "polkadot-dev-run-lint",
"postinstall": "polkadot-dev-yarn-only",
"test": "polkadot-dev-run-test --coverage --runInBand",
"test:one": "polkadot-dev-run-test"
"test": "polkadot-dev-run-test --env browser",
"test:one": "polkadot-dev-run-test --env browser"
},
"devDependencies": {
"@babel/core": "^7.20.12",
"@babel/runtime": "^7.20.13",
"@polkadot/dev": "^0.68.28",
"@polkadot/x-bundle": "^10.4.1",
"@types/jest": "^29.4.0",
"babel-loader": "^8.3.0",
"babel-plugin-transform-vue-template": "^0.4.2",
"empty": "^0.10.1",
"process": "^0.11.10",
"@polkadot/dev": "^0.69.27",
"@polkadot/x-bundle": "^11.0.1",
"@types/node": "^18.14.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"react-native": "^0.71.3",
"stream-browserify": "^3.0.0",
"vue-template-compiler": "^2.7.14"
"react-native": "^0.71.3"
},
"resolutions": {
"typescript": "^4.9.5"
View File
View File
-3
View File
@@ -1,3 +0,0 @@
# @polkadot/example-react
A versy basic React example with `@polkadot/ui-keyring`, `@polkadot/ui-settings` & `@polkadot/react-identicon`
-37
View File
@@ -1,37 +0,0 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css" />
<style>
#example {
padding: 0.5em;
}
button {
cursor: pointer;
padding: 0.5rem 0.75rem;
}
label {
display: block;
margin: 0.25rem 0;
opacity: 0.5;
}
section {
padding: 0.5rem 1rem;
}
textarea {
resize: none;
}
.icon {
margin-right: 0.75rem;
}
</style>
</head>
<body>
<div id="example"></div>
<script src="./build/main.js"></script>
</body>
</html>
-22
View File
@@ -1,22 +0,0 @@
{
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/ui/issues",
"contributors": [],
"description": "A very basic example with ui-* & react-* packages",
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/example-react#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/example-react",
"private": true,
"repository": {
"directory": "packages/example-react",
"type": "git",
"url": "https://github.com/polkadot-js/ui.git"
},
"sideEffects": false,
"version": "2.11.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13"
}
}
@@ -1,6 +0,0 @@
// Copyright 2017-2023 @polkadot/example-react authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Empty template, auto-generated by @polkadot/dev
export default [];
@@ -1,11 +0,0 @@
// Copyright 2017-2023 @polkadot/example-react authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, null, others);
-121
View File
@@ -1,121 +0,0 @@
// Copyright 2017-2023 @polkadot/example-react authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React, { useCallback, useEffect, useState } from 'react';
import ReactDOM from 'react-dom';
import { Identicon } from '@polkadot/react-identicon';
import { keyring } from '@polkadot/ui-keyring';
import { settings } from '@polkadot/ui-settings';
import { cryptoWaitReady, mnemonicGenerate } from '@polkadot/util-crypto';
interface Props {
className?: string;
}
const rootElement = document.getElementById('example');
if (!rootElement) {
throw new Error('Unable to find element with id \'example\'');
}
function App ({ className }: Props): React.ReactElement<Props> | null {
const [address, setAddress] = useState<string | null>(null);
const [phrase, setPhrase] = useState<string | null>(null);
const [ss58Format, setSS58Format] = useState(42);
const _onClickNew = useCallback(
(): void => {
const phrase = mnemonicGenerate(12);
const { address } = keyring.createFromUri(phrase);
setAddress(keyring.encodeAddress(address, ss58Format));
setPhrase(phrase);
},
[ss58Format]
);
const _onChangeSS58Format = useCallback(
({ currentTarget: { value } }: React.SyntheticEvent<HTMLSelectElement>): void => {
setSS58Format(parseInt(value, 10));
},
[]
);
useEffect((): void => {
_onClickNew();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
useEffect((): void => {
address && setAddress(keyring.encodeAddress(address, ss58Format));
}, [address, ss58Format]);
if (!address || !phrase) {
return null;
}
return (
<div className={className}>
<section>
<button onClick={_onClickNew}>another random address</button>
</section>
<section>
<label>phrase</label>
<textarea
cols={40}
readOnly
rows={4}
value={phrase}
/>
</section>
<section>
<label>icons</label>
<Identicon
className='icon'
value={address}
/>
<Identicon
className='icon'
theme='polkadot'
value={address}
/>
<Identicon
className='icon'
theme='beachball'
value={address}
/>
</section>
<section>
<label>address</label>
{address}
</section>
<section>
<label>ss58 format</label>
<select
onChange={_onChangeSS58Format}
value={ss58Format}
>
{settings.availablePrefixes
.filter((_, index): boolean => index !== 0)
.map(({ text, value }): React.ReactNode => (
<option
key={value}
value={value}
>
{text}
</option>
))
}
</select>
</section>
</div>
);
}
cryptoWaitReady()
.then((): void => {
keyring.loadAll({ ss58Format: 42, type: 'sr25519' });
ReactDOM.render(<App />, rootElement);
})
.catch(console.error);
@@ -1,6 +0,0 @@
// Copyright 2017-2023 @polkadot/example-react authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/example-react', path: 'auto', type: 'auto', version: '2.11.2' };
@@ -1,12 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../react-identicon/tsconfig.build.json" },
{ "path": "../ui-keyring/tsconfig.build.json" }
]
}
-53
View File
@@ -1,53 +0,0 @@
// Copyright 2017-2023 @polkadot/example-react authors & contributors
// SPDX-License-Identifier: Apache-2.0
const path = require('path');
const { WebpackPluginServe } = require('webpack-plugin-serve');
module.exports = {
context: __dirname,
devtool: 'eval-cheap-source-map',
entry: './src/index.tsx',
mode: 'development',
module: {
rules: [
{
exclude: /(node_modules)/,
test: /\.(ts|tsx)$/,
use: [
{
loader: 'babel-loader',
options: require('../../babel.config.cjs')
}
]
}
]
},
output: {
chunkFilename: '[name].[chunkhash:8].js',
filename: '[name].js',
globalObject: '(typeof self !== \'undefined\' ? self : this)',
path: path.join(__dirname, 'build')
},
plugins: [
new WebpackPluginServe({
hmr: false, // switch off, Chrome WASM memory leak
liveReload: false, // explict off, overrides hmr
port: 8080,
progress: false, // since we have hmr off, disable
static: __dirname
})
],
resolve: {
alias: {
'@polkadot/react-identicon': path.resolve(__dirname, '../react-identicon/build'),
'@polkadot/ui-keyring': path.resolve(__dirname, '../ui-keyring/build'),
'@polkadot/ui-settings': path.resolve(__dirname, '../ui-settings/build'),
'@polkadot/ui-shared': path.resolve(__dirname, '../ui-shared/build')
},
extensions: ['.js', '.ts', '.tsx'],
fallback: {}
},
target: 'web',
watch: true
};
View File
View File
-3
View File
@@ -1,3 +0,0 @@
# @polkadot/example-vue
A versy basic Vue.js example with `@polkadot/ui-keyring`, `@polkadot/ui-settings` & `@polkadot/vue-identicon`
-38
View File
@@ -1,38 +0,0 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css" />
<style>
#example {
padding: 0.5em;
}
button {
cursor: pointer;
padding: 0.5rem 0.75rem;
}
label {
display: block;
margin: 0.25rem 0;
opacity: 0.5;
}
section {
padding: 0.5rem 1rem;
}
textarea {
resize: none;
}
.icon {
display: inline-block;
margin-right: 0.75rem;
}
</style>
</head>
<body>
<div id="example"></div>
<script src="./build/main.js"></script>
</body>
</html>
-22
View File
@@ -1,22 +0,0 @@
{
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/ui/issues",
"contributors": [],
"description": "A very basic example with ui-* & vue-* packages",
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/example-vue#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/example-vue",
"private": true,
"repository": {
"directory": "packages/example-vue",
"type": "git",
"url": "https://github.com/polkadot-js/ui.git"
},
"sideEffects": false,
"version": "2.11.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13"
}
}
-6
View File
@@ -1,6 +0,0 @@
// Copyright 2017-2023 @polkadot/example-vue authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Empty template, auto-generated by @polkadot/dev
export default [];
-11
View File
@@ -1,11 +0,0 @@
// Copyright 2017-2023 @polkadot/example-vue authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, null, others);
-99
View File
@@ -1,99 +0,0 @@
// Copyright 2017-2023 @polkadot/example-vue authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { Prefix } from '@polkadot/util-crypto/address/types';
import Vue, { VNode } from 'vue';
import { keyring } from '@polkadot/ui-keyring';
import { settings } from '@polkadot/ui-settings';
import { cryptoWaitReady, mnemonicGenerate } from '@polkadot/util-crypto';
import Identicon from '@polkadot/vue-identicon';
interface Account {
address: string;
phrase: string;
}
interface Data extends Account {
ss58Format: Prefix;
ss58Options: { text: string; value: string | number }[];
}
const ss58Options = settings.availablePrefixes.filter((_, index): boolean => index !== 0);
function generateAccount (ss58Format: Prefix = 42): Account {
const phrase = mnemonicGenerate(12);
const { address } = keyring.createFromUri(phrase);
return {
address: keyring.encodeAddress(address, ss58Format),
phrase
};
}
const Example = Vue.extend({
components: {
Identicon
},
data: function (): Data {
return {
...generateAccount(),
ss58Format: 42,
ss58Options
};
},
methods: {
onClickNew: function (): void {
const { address, phrase } = generateAccount(this.ss58Format);
this.address = address;
this.phrase = phrase;
}
},
name: 'Example',
template: `
<div id="example">
<section>
<button v-on:click="onClickNew">another random address</button>
</section>
<section>
<label>phrase</label>
<textarea :cols="40" :rows="4" readonly v-model="phrase" />
</section>
<section>
<label>icons</label>
<Identicon class='icon' :value="address" />
<Identicon class='icon' :value="address" :theme="'polkadot'" />
<Identicon class='icon' :value="address" :theme="'beachball'" />
</section>
<section>
<label>address</label>
{{ address }}
</section>
<section>
<label>ss58 format</label>
<select v-model="ss58Format">
<option v-for="option in ss58Options" v-bind:value="option.value">
{{ option.text }}
</option>
</select>
</section>
</div>
`,
watch: {
ss58Format: function (): void {
this.address = keyring.encodeAddress(this.address, this.ss58Format);
}
}
});
cryptoWaitReady()
.then((): void => {
keyring.loadAll({ ss58Format: 42, type: 'sr25519' });
new Vue({
render: (h): VNode => h(Example)
}).$mount('#example');
})
.catch(console.error);
-6
View File
@@ -1,6 +0,0 @@
// Copyright 2017-2023 @polkadot/example-vue authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/example-vue', path: 'auto', type: 'auto', version: '2.11.2' };
-12
View File
@@ -1,12 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": [
{ "path": "../ui-keyring/tsconfig.build.json" },
{ "path": "../vue-identicon/tsconfig.build.json" }
]
}
-52
View File
@@ -1,52 +0,0 @@
// Copyright 2017-2023 @polkadot/example-vue authors & contributors
// SPDX-License-Identifier: Apache-2.0
const path = require('path');
const { WebpackPluginServe } = require('webpack-plugin-serve');
module.exports = {
context: __dirname,
devtool: 'eval-cheap-source-map',
entry: './src/index.ts',
mode: 'development',
module: {
rules: [
{
exclude: /(node_modules)/,
test: /\.(ts|tsx)$/,
use: [
{
loader: 'babel-loader',
options: require('../../babel.config.cjs')
}
]
}
]
},
output: {
chunkFilename: '[name].[chunkhash:8].js',
filename: '[name].js',
globalObject: '(typeof self !== \'undefined\' ? self : this)',
path: path.join(__dirname, 'build')
},
plugins: [
new WebpackPluginServe({
hmr: false, // switch off, Chrome WASM memory leak
liveReload: false, // explict off, overrides hmr
port: 8080,
progress: false, // since we have hmr off, disable
static: __dirname
})
],
resolve: {
alias: {
'@polkadot/ui-keyring': path.resolve(__dirname, '../ui-keyring/build'),
'@polkadot/ui-settings': path.resolve(__dirname, '../ui-settings/build'),
'@polkadot/ui-shared': path.resolve(__dirname, '../ui-shared/build'),
'@polkadot/vue-identicon': path.resolve(__dirname, '../vue-identicon/build')
},
extensions: ['.js', '.ts', '.tsx']
},
target: 'web',
watch: true
};
+9 -9
View File
@@ -17,26 +17,26 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "2.11.2",
"version": "3.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/keyring": "^10.4.1",
"@polkadot/ui-settings": "2.11.2",
"@polkadot/ui-shared": "2.11.2",
"@polkadot/util": "^10.4.1",
"@polkadot/util-crypto": "^10.4.1",
"@polkadot/keyring": "^11.0.1",
"@polkadot/ui-settings": "3.0.1",
"@polkadot/ui-shared": "3.0.1",
"@polkadot/util": "^11.0.1",
"@polkadot/util-crypto": "^11.0.1",
"color": "^3.2.1",
"ethereum-blockies-base64": "^1.0.2",
"jdenticon": "3.2.0",
"react-copy-to-clipboard": "^5.1.0",
"styled-components": "^5.3.6"
"styled-components": "^5.3.8",
"tslib": "^2.5.0"
},
"devDependencies": {
"@types/react-copy-to-clipboard": "^5.0.4",
"@types/react-dom": "^18.0.11",
"@types/styled-components": "^5.1.26",
"styled-components": "^5.3.6",
"styled-components": "^5.3.8",
"xmlserializer": "^0.6.1"
},
"peerDependencies": {
+11 -1
View File
@@ -6,7 +6,7 @@ import type { IdentityProps as Props, Props as ComponentProps } from './types';
import React from 'react';
import CopyToClipboard from 'react-copy-to-clipboard';
import styled from 'styled-components';
import styledComponents from 'styled-components';
import { ICON_DEFAULT_HOST, settings } from '@polkadot/ui-settings';
import { isHex, isU8a, u8aToHex } from '@polkadot/util';
@@ -14,6 +14,16 @@ import { decodeAddress, encodeAddress, ethereumEncode } from '@polkadot/util-cry
import { Beachball, Empty, Ethereum, Jdenticon, Polkadot } from './icons';
// In styled-components v6, there is a named export which can be used
// directly, i.e. "import { styled } from ..." with no more magic. Until
// such time the cjs vs esm import here is problematic, so we hack around
// the various shapes below
const styled = (
(styledComponents as unknown as { styled: typeof styledComponents }).styled ||
(styledComponents as unknown as { default: typeof styledComponents }).default ||
styledComponents
);
const Fallback = Beachball;
interface State {
@@ -5,7 +5,17 @@ import type { Props } from '../types';
import makeBlockie from 'ethereum-blockies-base64';
import React, { useMemo } from 'react';
import styled from 'styled-components';
import styledComponents from 'styled-components';
// In styled-components v6, there is a named export which can be used
// directly, i.e. "import { styled } from ..." with no more magic. Until
// such time the cjs vs esm import here is problematic, so we hack around
// the various shapes below
const styled = (
(styledComponents as unknown as { styled: typeof styledComponents }).styled ||
(styledComponents as unknown as { default: typeof styledComponents }).default ||
styledComponents
);
interface ImgProps {
size: number;
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/react-identicon', path: 'auto', type: 'auto', version: '2.11.2' };
export const packageInfo = { name: '@polkadot/react-identicon', path: 'auto', type: 'auto', version: '3.0.1' };
+6 -6
View File
@@ -17,16 +17,16 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "2.11.2",
"version": "3.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/ui-settings": "2.11.2",
"@polkadot/util": "^10.4.1",
"@polkadot/util-crypto": "^10.4.1",
"@polkadot/ui-settings": "3.0.1",
"@polkadot/util": "^11.0.1",
"@polkadot/util-crypto": "^11.0.1",
"qrcode-generator": "^1.4.4",
"react-qr-reader": "^2.2.1",
"styled-components": "^5.3.6"
"styled-components": "^5.3.8",
"tslib": "^2.5.0"
},
"devDependencies": {
"@types/react-qr-reader": "^2.1.4",
+13 -3
View File
@@ -2,7 +2,7 @@
// SPDX-License-Identifier: Apache-2.0
import React, { useEffect, useMemo, useRef, useState } from 'react';
import styled from 'styled-components';
import styledComponents from 'styled-components';
import { objectSpread } from '@polkadot/util';
import { xxhashAsHex } from '@polkadot/util-crypto';
@@ -10,6 +10,16 @@ import { xxhashAsHex } from '@polkadot/util-crypto';
import { qrcode } from './qrcode';
import { createFrames, createImgSize } from './util';
// In styled-components v6, there is a named export which can be used
// directly, i.e. "import { styled } from ..." with no more magic. Until
// such time the cjs vs esm import here is problematic, so we hack around
// the various shapes below
const styled = (
(styledComponents as unknown as { styled: typeof styledComponents }).styled ||
(styledComponents as unknown as { default: typeof styledComponents }).default ||
styledComponents
);
interface Props {
className?: string;
size?: string | number;
@@ -28,7 +38,7 @@ interface FrameState {
interface TimerState {
timerDelay: number;
timerId: number | null;
timerId: ReturnType<typeof setTimeout> | null;
}
const DEFAULT_FRAME_DELAY = 2750;
@@ -84,7 +94,7 @@ function Display ({ className, size, skipEncoding, style, timerDelay = DEFAULT_F
return newState;
});
timerRef.current.timerId = window.setTimeout(nextFrame, timerRef.current.timerDelay);
timerRef.current.timerId = setTimeout(nextFrame, timerRef.current.timerDelay);
return (): void => {
// eslint-disable-next-line react-hooks/exhaustive-deps
+11 -1
View File
@@ -3,10 +3,20 @@
import React, { useCallback, useMemo } from 'react';
import Reader from 'react-qr-reader';
import styled from 'styled-components';
import styledComponents from 'styled-components';
import { createImgSize } from './util';
// In styled-components v6, there is a named export which can be used
// directly, i.e. "import { styled } from ..." with no more magic. Until
// such time the cjs vs esm import here is problematic, so we hack around
// the various shapes below
const styled = (
(styledComponents as unknown as { styled: typeof styledComponents }).styled ||
(styledComponents as unknown as { default: typeof styledComponents }).default ||
styledComponents
);
interface Props {
className?: string;
delay?: number;
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/react-qr', path: 'auto', type: 'auto', version: '2.11.2' };
export const packageInfo = { name: '@polkadot/react-qr', path: 'auto', type: 'auto', version: '3.0.1' };
+3
View File
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/react-qr authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import { u8aConcat, u8aToHex, u8aToString } from '@polkadot/util';
import { randomAsU8a } from '@polkadot/util-crypto';
+6 -6
View File
@@ -17,14 +17,14 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "2.11.2",
"version": "3.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/ui-shared": "2.11.2",
"@polkadot/util": "^10.4.1",
"@polkadot/util-crypto": "^10.4.1",
"react-native-svg": "^12.5.1"
"@polkadot/ui-shared": "3.0.1",
"@polkadot/util": "^11.0.1",
"@polkadot/util-crypto": "^11.0.1",
"react-native-svg": "^12.5.1",
"tslib": "^2.5.0"
},
"devDependencies": {
"@types/react-native": "^0.71.3"
@@ -63,7 +63,7 @@ export default class IdentityIcon extends React.PureComponent<Props, State> {
}
public override render (): React.ReactNode {
const { theme = DEFAULT_THEME, size = DEFAULT_SIZE } = this.props;
const { size = DEFAULT_SIZE, theme = DEFAULT_THEME } = this.props;
const { address, publicKey } = this.state;
const Component = !address
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/reactnative-identicon', path: 'auto', type: 'auto', version: '2.11.2' };
export const packageInfo = { name: '@polkadot/reactnative-identicon', path: 'auto', type: 'auto', version: '3.0.1' };
View File
-3
View File
@@ -1,3 +0,0 @@
# @polkadot/ui-assets
Static assets including images shared across projects
-22
View File
@@ -1,22 +0,0 @@
{
"author": "Jaco Greeff <jacogr@gmail.com>",
"bugs": "https://github.com/polkadot-js/ui/issues",
"contributors": [],
"description": "Static assets shared accross projects",
"homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-assets#readme",
"license": "Apache-2.0",
"maintainers": [],
"name": "@polkadot/ui-assets",
"repository": {
"directory": "packages/ui-assets",
"type": "git",
"url": "https://github.com/polkadot-js/ui.git"
},
"sideEffects": false,
"version": "2.11.2",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/util": "^10.4.1"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 B

-6
View File
@@ -1,6 +0,0 @@
// Copyright 2017-2023 @polkadot/ui-assets authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Empty template, auto-generated by @polkadot/dev
export default [];
-11
View File
@@ -1,11 +0,0 @@
// Copyright 2017-2023 @polkadot/ui-assets authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
import { detectPackage } from '@polkadot/util';
import others from './detectOther';
import { packageInfo } from './packageInfo';
detectPackage(packageInfo, null, others);
@@ -1 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512px" height="512px" viewBox="0 0 512 512" version="1.1" style="zoom: 1;"><!-- Generator: Sketch 57.1 (83088) - https://sketch.com --><title>logo-white-with-bg</title><desc>Created with Sketch.</desc><g id="logo-white-with-bg" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><rect fill="#111111" x="0" y="0" width="512" height="512" visibility="hidden"></rect><circle stroke="#000000" id="circle1" stroke-width="3px" cy="256px" fill="#111111" r="250px" cx="256px" transform=""></circle><path d="M160.5,199.5 L160.5,319.5" id="Line" stroke="#FFFFFF" stroke-width="22" stroke-linecap="square"></path><path d="M160.5,199.5 L160.5,319.5" id="Line" stroke="#FFFFFF" stroke-width="22" stroke-linecap="square" transform="translate(160.500000, 259.500000) rotate(60.000000) translate(-160.500000, -259.500000)"></path><path d="M160.5,199.5 L160.5,319.5" id="Line" stroke="#FFFFFF" stroke-width="22" stroke-linecap="square" transform="translate(160.500000, 259.500000) rotate(-60.000000) translate(-160.500000, -259.500000)"></path><path d="M348.5,206.5 L348.5,256.5" id="Line" stroke="#FFFFFF" stroke-width="22" stroke-linecap="square" transform="translate(348.500000, 231.500000) scale(1, -1) translate(-348.500000, -231.500000)"></path><path d="M385.739092,271 L385.739092,321" id="Line" stroke="#FFFFFF" stroke-width="22" stroke-linecap="square" transform="translate(385.739092, 296.000000) scale(-1, 1) rotate(60.000000) translate(-385.739092, -296.000000)"></path><path d="M311.260908,271 L311.260908,321" id="Line" stroke="#FFFFFF" stroke-width="22" stroke-linecap="square" transform="translate(311.260908, 296.000000) scale(-1, 1) rotate(-60.000000) translate(-311.260908, -296.000000)"></path></g></svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

-1
View File
@@ -1 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512px" height="512px" viewBox="0 0 512 512" version="1.1" style="zoom: 1;"><!-- Generator: Sketch 57.1 (83088) - https://sketch.com --><title>logo-white-with-bg</title><desc>Created with Sketch.</desc><g id="logo-white-with-bg" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><rect fill="#111111" x="0" y="0" width="512" height="512"></rect><path d="M160.5,199.5 L160.5,319.5" id="Line" stroke="#FFFFFF" stroke-width="22" stroke-linecap="square"></path><path d="M160.5,199.5 L160.5,319.5" id="Line" stroke="#FFFFFF" stroke-width="22" stroke-linecap="square" transform="translate(160.500000, 259.500000) rotate(60.000000) translate(-160.500000, -259.500000)"></path><path d="M160.5,199.5 L160.5,319.5" id="Line" stroke="#FFFFFF" stroke-width="22" stroke-linecap="square" transform="translate(160.500000, 259.500000) rotate(-60.000000) translate(-160.500000, -259.500000)"></path><path d="M348.5,206.5 L348.5,256.5" id="Line" stroke="#FFFFFF" stroke-width="22" stroke-linecap="square" transform="translate(348.500000, 231.500000) scale(1, -1) translate(-348.500000, -231.500000)"></path><path d="M385.739092,271 L385.739092,321" id="Line" stroke="#FFFFFF" stroke-width="22" stroke-linecap="square" transform="translate(385.739092, 296.000000) scale(-1, 1) rotate(60.000000) translate(-385.739092, -296.000000)"></path><path d="M311.260908,271 L311.260908,321" id="Line" stroke="#FFFFFF" stroke-width="22" stroke-linecap="square" transform="translate(311.260908, 296.000000) scale(-1, 1) rotate(-60.000000) translate(-311.260908, -296.000000)"></path></g></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

-7
View File
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="15 15 140 140" style="enable-background:new 0 0 170 170;" xml:space="preserve">
<style type="text/css">
.bg0{fill:#888;}
</style>
<g><circle class="bg0" cx="85" cy="85" r="70"/></g>
</svg>

Before

Width:  |  Height:  |  Size: 364 B

-4
View File
@@ -1,4 +0,0 @@
// Copyright 2017-2023 @polkadot/ui-assets authors & contributors
// SPDX-License-Identifier: Apache-2.0
export {};
-6
View File
@@ -1,6 +0,0 @@
// Copyright 2017-2023 @polkadot/ui-assets authors & contributors
// SPDX-License-Identifier: Apache-2.0
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/ui-assets', path: 'auto', type: 'auto', version: '2.11.2' };
@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="15 15 140 140" style="enable-background:new 0 0 170 170;" xml:space="preserve">
<style type="text/css">
.bg0{fill:#fff;}
.st0{fill:#E6007A;}
</style>
<g>
<circle class="bg0" cx="85" cy="85" r="70"/>
<g>
<path d="M85,34.7c-20.8,0-37.8,16.9-37.8,37.8c0,4.2,0.7,8.3,2,12.3c0.9,2.7,3.9,4.2,6.7,3.3c2.7-0.9,4.2-3.9,3.3-6.7 c-1.1-3.1-1.6-6.4-1.5-9.7C58.1,57.6,69.5,46,83.6,45.3c15.7-0.8,28.7,11.7,28.7,27.2c0,14.5-11.4,26.4-25.7,27.2 c0,0-5.3,0.3-7.9,0.7c-1.3,0.2-2.3,0.4-3,0.5c-0.3,0.1-0.6-0.2-0.5-0.5l0.9-4.4L81,73.4c0.6-2.8-1.2-5.6-4-6.2 c-2.8-0.6-5.6,1.2-6.2,4c0,0-11.8,55-11.9,55.6c-0.6,2.8,1.2,5.6,4,6.2c2.8,0.6,5.6-1.2,6.2-4c0.1-0.6,1.7-7.9,1.7-7.9 c1.2-5.6,5.8-9.7,11.2-10.4c1.2-0.2,5.9-0.5,5.9-0.5c19.5-1.5,34.9-17.8,34.9-37.7C122.8,51.6,105.8,34.7,85,34.7z"/>
</g>
</g>
<path class="st0" d="M87.7,121.7c-3.4-0.7-6.8,1.4-7.5,4.9c-0.7,3.4,1.4,6.8,4.9,7.5c3.4,0.7,6.8-1.4,7.5-4.9 C93.3,125.7,91.2,122.4,87.7,121.7z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

-1
View File
@@ -1 +0,0 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 436.22 436.22"><defs><style>.cls-1{fill:none;}.cls-2{clip-path:url(#clip-path);}.cls-3{fill:#f2f2f2;}.cls-4{fill:#4d4d4d;}.cls-5{fill:#d64ca8;}</style><clipPath id="clip-path" transform="translate(-782.01 -781.74)"><circle class="cls-1" cx="1001.02" cy="1001.98" r="215.98"/></clipPath></defs><title>Polkadot dot logo</title><g class="cls-2"><rect class="cls-3" x="782.01" y="781.74" width="436.22" height="436.22" transform="translate(-781.74 1218.23) rotate(-90)"/><circle class="cls-4" cx="84.89" cy="298" r="22.44"/><circle class="cls-4" cx="84.89" cy="222.44" r="22.44"/><circle class="cls-4" cx="84.89" cy="146.89" r="22.44"/><circle class="cls-4" cx="153.81" cy="334.98" r="22.44"/><circle class="cls-4" cx="153.81" cy="259.43" r="22.44"/><circle class="cls-4" cx="153.81" cy="183.88" r="22.44"/><circle class="cls-4" cx="153.81" cy="108.33" r="22.44"/><circle class="cls-4" cx="220.2" cy="373.55" r="22.44"/><circle class="cls-4" cx="220.2" cy="298" r="22.44"/><circle class="cls-5" cx="220.2" cy="222.44" r="22.44"/><circle class="cls-4" cx="220.2" cy="146.89" r="22.44"/><circle class="cls-4" cx="220.2" cy="71.34" r="22.44"/><circle class="cls-4" cx="289.12" cy="334.98" r="22.44"/><circle class="cls-4" cx="289.12" cy="259.43" r="22.44"/><circle class="cls-4" cx="289.12" cy="183.88" r="22.44"/><circle class="cls-4" cx="289.12" cy="108.33" r="22.44"/><circle class="cls-4" cx="355.5" cy="298" r="22.44"/><circle class="cls-4" cx="355.5" cy="222.44" r="22.44"/><circle class="cls-4" cx="355.5" cy="146.89" r="22.44"/></g></svg>

Before

Width:  |  Height:  |  Size: 1.6 KiB

-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="15 15 140 140" style="enable-background:new 0 0 170 170;zoom: 1;" xml:space="preserve">
<style type="text/css">
.bg0{fill:#FF8C00}
.st0{fill:#FFFFFF;}
</style>
<g>
<circle class="bg0" cx="85" cy="85" r="70"/>
<g>
<path class="st0" d="M85,34.7c-20.8,0-37.8,16.9-37.8,37.8c0,4.2,0.7,8.3,2,12.3c0.9,2.7,3.9,4.2,6.7,3.3c2.7-0.9,4.2-3.9,3.3-6.7 c-1.1-3.1-1.6-6.4-1.5-9.7C58.1,57.6,69.5,46,83.6,45.3c15.7-0.8,28.7,11.7,28.7,27.2c0,14.5-11.4,26.4-25.7,27.2 c0,0-5.3,0.3-7.9,0.7c-1.3,0.2-2.3,0.4-3,0.5c-0.3,0.1-0.6-0.2-0.5-0.5l0.9-4.4L81,73.4c0.6-2.8-1.2-5.6-4-6.2 c-2.8-0.6-5.6,1.2-6.2,4c0,0-11.8,55-11.9,55.6c-0.6,2.8,1.2,5.6,4,6.2c2.8,0.6,5.6-1.2,6.2-4c0.1-0.6,1.7-7.9,1.7-7.9 c1.2-5.6,5.8-9.7,11.2-10.4c1.2-0.2,5.9-0.5,5.9-0.5c19.5-1.5,34.9-17.8,34.9-37.7C122.8,51.6,105.8,34.7,85,34.7z M87.7,121.7 c-3.4-0.7-6.8,1.4-7.5,4.9c-0.7,3.4,1.4,6.8,4.9,7.5c3.4,0.7,6.8-1.4,7.5-4.9C93.3,125.7,91.2,122.4,87.7,121.7z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="15 15 140 140" style="enable-background:new 0 0 170 170;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
.st1{fill:#E6007A;}
</style>
<g>
<g>
<path class="st0" d="M85,34.7c-20.8,0-37.8,16.9-37.8,37.8c0,4.2,0.7,8.3,2,12.3c0.9,2.7,3.9,4.2,6.7,3.3c2.7-0.9,4.2-3.9,3.3-6.7 c-1.1-3.1-1.6-6.4-1.5-9.7C58.1,57.6,69.5,46,83.6,45.3c15.7-0.8,28.7,11.7,28.7,27.2c0,14.5-11.4,26.4-25.7,27.2 c0,0-5.3,0.3-7.9,0.7c-1.3,0.2-2.3,0.4-3,0.5c-0.3,0.1-0.6-0.2-0.5-0.5l0.9-4.4L81,73.4c0.6-2.8-1.2-5.6-4-6.2s-5.6,1.2-6.2,4 c0,0-11.8,55-11.9,55.6c-0.6,2.8,1.2,5.6,4,6.2c2.8,0.6,5.6-1.2,6.2-4c0.1-0.6,1.7-7.9,1.7-7.9c1.2-5.6,5.8-9.7,11.2-10.4 c1.2-0.2,5.9-0.5,5.9-0.5c19.5-1.5,34.9-17.8,34.9-37.7C122.8,51.6,105.8,34.7,85,34.7z"/>
</g>
</g>
<path class="st1" d="M87.7,121.7c-3.4-0.7-6.8,1.4-7.5,4.9c-0.7,3.4,1.4,6.8,4.9,7.5c3.4,0.7,6.8-1.4,7.5-4.9 C93.3,125.7,91.2,122.4,87.7,121.7z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 2000 2000" style="enable-background:new 0 0 2000 2000;" xml:space="preserve">
<style type="text/css">
.bg0{fill:#fff;}
.st0{fill:#231F20;}
</style>
<g>
<circle class="bg0" cx="1000" cy="1000" r="1000"/>
<polygon class="st0" points="1000.5,1959.6 974.6,1974.5 979.3,1977.2 1000.5,1965 1000.5,1989 1862.2,1491.5 1862.2,1437.7 1000.5,1935.2"/>
<polygon class="st0" points="1000.5,1796.1 833.1,1892.8 841.2,1897.5 1000.5,1805.6 1000.5,1825.8 1862.2,1328.2 1862.2,1278.3 1000.5,1775.8"/>
<polygon class="st0" points="1000.5,1632.7 691.5,1811.1 703.2,1817.8 1000.5,1646.2 1000.5,1662.3 1862.2,1164.8 1862.2,1118.9 1000.5,1616.4"/>
<path class="st0" d="M1862.2,495.9l-12.7-7.3l-690 398.4l-89.6-51.7l209.7-121.1v-30.3l454.1-262.2l-22.2-12.8l-431.9,249.3v-26 L998.9,794.3l-96.8-55.9l690-398.4l-18.7-10.8l-690,398.4l-94.2-54.4l153-88.3l-28.6-16.5l537.1-310.1l-15.2-8.8L898.4,559.6 l-27.2-15.7l-153.4,88.3v31.7l-143.8,83l-10.5-6L137.9,986.5v41.8l461.8-266.6l-10.6-6.1l128.6-74.2V714l94.6,54.6l-100.2,57.8 l-7-4L137.9,1150v37.8L738,841.3l-7.1-4.1l100.1-57.8l96.8,55.9L717.8,956.6v22l-579.9,334.8v33.7l579.9-334.8v25.8l90,51.9 l-669.8,386.7v14.6l13.1,7.6l682.5-394l93.1,53.7l-208.8,119.4v27.4l-450.9,260.4l22.2,12.8l428.7-247.5v31.6l281.1-162.3l84.9,49 l-83.3,48.1v8.1l-592.1,341.8l18.7,10.8l573.4-331v8.1l116.1-67l92.1,53.2l-150.3,86.8l13.2,7.6l-71.1,41v12.2L550,1729.3l15.2,8.8 l435.3-251.3v12.1l107.3-62l21.6,12.5l150.3-86.6v-25.1l582.6-336.3v-41.8l-582.6,336.3v-15.3l-92.1-53.2l674.6-389.5v-37.8 l-707.4,408.4l-84.9-49l209.7-121.1v-27.6l582.6-336.3v-33.7l-582.6,336.3v-20.7l-94.4-54.5l677-390.9V495.9z M789.2,997.4 l209.7-121.1l89.5,51.7l-99.9,57.7l0,0l-109.8,63.4L789.2,997.4z M1208.6,997.4L998,1117.9l-93.4-53.9l96.4-55.7v0l113.3-65.4 L1208.6,997.4z"/>
<polygon class="st0" points="447.4,674.1 1309.1,176.6 1297.4,169.8 435.7,667.3 421.7,659.3 137.9,823.1 137.9,869 461.5,682.2"/>
<polygon class="st0" points="305.7,592.5 1167.6,94.9 1159.4,90.1 297.5,587.8 279.9,577.7 137.9,659.7 137.9,709.6 323.3,602.6"/>
<polygon class="st0" points="163.9,510.9 1026,13.1 1021.3,10.4 159.2,508.2 138.2,496.1 137.9,496.2 137.9,550.2 185,523"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

@@ -1 +0,0 @@
<svg viewBox="0 0 1976.45 2282.21" xmlns="http://www.w3.org/2000/svg"><path d="m1976.45 1711.65v-1141.1l-988.23-570.55-988.22 570.55v1141.1l988.22 570.56z"/><g fill="#fff"><path d="m988.62 2101-25.9 14.9 4.7 2.7 21.2-12.2v24l861.7-497.5v-53.8l-861.7 497.5z"/><path d="m988.62 1937.5-167.4 96.7 8.1 4.7 159.3-91.9v20.2l861.7-497.6v-49.9l-861.7 497.5z"/><path d="m988.62 1774.1-309 178.4 11.7 6.7 297.3-171.6v16.1l861.7-497.5v-45.9l-861.7 497.5z"/><path d="m1859.56 499.46-12.7-7.3-690 398.4-89.6-51.7 209.74-121.1v-30.3l454.1-262.2-22.2-12.8-431.9 249.3v-26l-280.7 162.1-96.84-55.86 690-398.4-18.7-10.8-690 398.4-94.2-54.4 153-88.3-28.56-16.5 537.1-310.1-15.2-8.8-537.1 310.1-27.2-15.7-153.4 88.3v31.7l-143.8 83-10.5-6-425.6 245.6v41.8l461.8-266.6-10.6-6.1 128.56-74.2v32.6l94.6 54.6-100.2 57.8-7-4-567.2 327.6v37.8l600.1-346.5-7.1-4.1 100.1-57.8 96.8 55.9-210 121.3v22l-579.9 334.8v33.7l579.9-334.8v25.8l90 51.9-669.8 386.7v14.6l13.1 7.6 682.5-394 93.1 53.7-208.8 119.4v27.4l-450.9 260.4 22.2 12.8 428.7-247.5v31.6l281.1-162.3 84.9 49-83.3 48.1v8.1l-592.1 341.8 18.7 10.8 573.4-331v8.1l116.1-67 92.1 53.2-150.3 86.8 13.2 7.6-71.1 41v12.2l-450.6 260.2 15.2 8.8 435.3-251.3v12.1l107.3-62 21.6 12.5 150.3-86.6v-25.1l582.6-336.3v-41.8l-582.6 336.3v-15.3l-92.06-53.2 674.6-389.5v-37.8l-707.4 408.4-84.9-49 209.7-121.1v-27.6l582.6-336.3v-33.7l-582.6 336.26v-20.66l-94.4-54.5 677-390.9zm-1073 501.54 209.7-121.1 89.5 51.7-99.9 57.7-109.8 63.4zm419.4 0-210.6 120.5-93.4-53.9 96.4-55.7 113.3-65.4z" transform="translate(-9.23 137.85)"/><path d="m435.52 815.5 861.7-497.5-11.7-6.8-861.7 497.5-14-8-283.8 163.8v45.9l323.6-186.8z"/><path d="m293.82 733.9 861.9-497.6-8.2-4.8-861.9 497.7-17.6-10.1-142 82v49.9l185.4-107z"/><path d="m152.02 652.3 862.1-497.8-4.7-2.7-862.1 497.8-21-12.1-.3.1v54l47.1-27.2z"/></g></svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 2000 2000" style="enable-background:new 0 0 2000 2000;" xml:space="preserve">
<style type="text/css">
.st0{fill:#eee;}
</style>
<g>
<polygon class="st0" points="1000.5,1959.6 974.6,1974.5 979.3,1977.2 1000.5,1965 1000.5,1989 1862.2,1491.5 1862.2,1437.7 1000.5,1935.2"/>
<polygon class="st0" points="1000.5,1796.1 833.1,1892.8 841.2,1897.5 1000.5,1805.6 1000.5,1825.8 1862.2,1328.2 1862.2,1278.3 1000.5,1775.8"/>
<polygon class="st0" points="1000.5,1632.7 691.5,1811.1 703.2,1817.8 1000.5,1646.2 1000.5,1662.3 1862.2,1164.8 1862.2,1118.9 1000.5,1616.4"/>
<path class="st0" d="M1862.2,495.9l-12.7-7.3l-690,398.4l-89.6-51.7l209.7-121.1v-30.3l454.1-262.2l-22.2-12.8l-431.9,249.3v-26 L998.9,794.3l-96.8-55.9l690-398.4l-18.7-10.8l-690,398.4l-94.2-54.4l153-88.3l-28.6-16.5l537.1-310.1l-15.2-8.8L898.4,559.6 l-27.2-15.7l-153.4,88.3v31.7l-143.8,83l-10.5-6L137.9,986.5v41.8l461.8-266.6l-10.6-6.1l128.6-74.2V714l94.6,54.6l-100.2,57.8 l-7-4L137.9,1150v37.8L738,841.3l-7.1-4.1l100.1-57.8l96.8,55.9L717.8,956.6v22l-579.9,334.8v33.7l579.9-334.8v25.8l90,51.9 l-669.8,386.7v14.6l13.1,7.6l682.5-394l93.1,53.7l-208.8,119.4v27.4l-450.9,260.4l22.2,12.8l428.7-247.5v31.6l281.1-162.3l84.9,49 l-83.3,48.1v8.1l-592.1,341.8l18.7,10.8l573.4-331v8.1l116.1-67l92.1,53.2l-150.3,86.8l13.2,7.6l-71.1,41v12.2L550,1729.3l15.2,8.8 l435.3-251.3v12.1l107.3-62l21.6,12.5l150.3-86.6v-25.1l582.6-336.3v-41.8l-582.6,336.3v-15.3l-92.1-53.2l674.6-389.5v-37.8 l-707.4,408.4l-84.9-49l209.7-121.1v-27.6l582.6-336.3v-33.7l-582.6,336.3v-20.7l-94.4-54.5l677-390.9V495.9z M789.2,997.4 l209.7-121.1l89.5,51.7l-99.9,57.7l0,0l-109.8,63.4L789.2,997.4z M1208.6,997.4L998,1117.9l-93.4-53.9l96.4-55.7v0l113.3-65.4 L1208.6,997.4z"/>
<polygon class="st0" points="447.4,674.1 1309.1,176.6 1297.4,169.8 435.7,667.3 421.7,659.3 137.9,823.1 137.9,869 461.5,682.2"/>
<polygon class="st0" points="305.7,592.5 1167.6,94.9 1159.4,90.1 297.5,587.8 279.9,577.7 137.9,659.7 137.9,709.6 323.3,602.6"/>
<polygon class="st0" points="163.9,510.9 1026,13.1 1021.3,10.4 159.2,508.2 138.2,496.1 137.9,496.2 137.9,550.2 185,523"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

-8
View File
@@ -1,8 +0,0 @@
// Copyright 2017-2023 @polkadot/ui-assets authors & contributors
// SPDX-License-Identifier: Apache-2.0
declare module '*.svg' {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const content: any;
export default content;
}
-9
View File
@@ -1,9 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"baseUrl": "..",
"outDir": "./build",
"rootDir": "./src"
},
"references": []
}
+8 -8
View File
@@ -16,17 +16,17 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "2.11.2",
"version": "3.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/keyring": "^10.4.1",
"@polkadot/ui-settings": "2.11.2",
"@polkadot/util": "^10.4.1",
"@polkadot/util-crypto": "^10.4.1",
"mkdirp": "^2.1.3",
"@polkadot/keyring": "^11.0.1",
"@polkadot/ui-settings": "3.0.1",
"@polkadot/util": "^11.0.1",
"@polkadot/util-crypto": "^11.0.1",
"mkdirp": "^2.1.5",
"rxjs": "^7.8.0",
"store": "^2.0.12"
"store": "^2.0.12",
"tslib": "^2.5.0"
},
"devDependencies": {
"@types/mkdirp": "^1.0.2",
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/ui-keyring authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import type { KeyringStruct } from '../types';
import { KeyringOption } from '.';
@@ -15,8 +18,8 @@ describe('KeyringOption', (): void => {
keyringOption.init(state as KeyringStruct);
// second call
expect((): void => {
keyringOption.init(state as KeyringStruct);
}).toThrowError('Unable to initialise options more than once');
expect(
() => keyringOption.init(state as KeyringStruct)
).toThrow('Unable to initialise options more than once');
});
});
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/ui-keyring', path: 'auto', type: 'auto', version: '2.11.2' };
export const packageInfo = { name: '@polkadot/ui-keyring', path: 'auto', type: 'auto', version: '3.0.1' };
+5 -5
View File
@@ -17,14 +17,14 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "2.11.2",
"version": "3.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/networks": "^10.4.1",
"@polkadot/util": "^10.4.1",
"@polkadot/networks": "^11.0.1",
"@polkadot/util": "^11.0.1",
"eventemitter3": "^4.0.7",
"store": "^2.0.12"
"store": "^2.0.12",
"tslib": "^2.5.0"
},
"devDependencies": {
"@types/store": "^2.0.2"
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/ui-settings', path: 'auto', type: 'auto', version: '2.11.2' };
export const packageInfo = { name: '@polkadot/ui-settings', path: 'auto', type: 'auto', version: '3.0.1' };
+5 -5
View File
@@ -17,15 +17,15 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "2.11.2",
"version": "3.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"color": "^3.2.1"
"color": "^3.2.1",
"tslib": "^2.5.0"
},
"devDependencies": {
"@polkadot/util": "^10.4.1",
"@polkadot/util-crypto": "^10.4.1",
"@polkadot/util": "^11.0.1",
"@polkadot/util-crypto": "^11.0.1",
"@types/color": "^3.0.3",
"@types/xmlserializer": "^0.6.3",
"xmlserializer": "^0.6.1"
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/ui-shared authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import type { ColorGen } from './types';
import { colors as newColors } from './colors';
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/ui-shared authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import { container } from './container';
describe('container', (): void => {
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/ui-shared authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import xmlserializer from 'xmlserializer';
import { beachballIcon } from '.';
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/ui-shared authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import type { Seeder } from './types';
import { seeder as newSeeder } from './seeder';
@@ -1,6 +1,9 @@
// Copyright 2017-2023 @polkadot/ui-shared authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import xmlserializer from 'xmlserializer';
import { seeder } from '../seeder';
@@ -1,14 +1,17 @@
// Copyright 2017-2023 @polkadot/ui-shared authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { serializeToString } from 'xmlserializer';
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import xs from 'xmlserializer';
import { circle } from './circle';
describe('circle', (): void => {
it('creates a basic SVG circle element', (): void => {
expect(
serializeToString(
xs.serializeToString(
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-explicit-any
circle(123, 12, 34) as any
)
@@ -1,14 +1,17 @@
// Copyright 2017-2023 @polkadot/ui-shared authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { serializeToString } from 'xmlserializer';
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import xs from 'xmlserializer';
import { element } from './element';
describe('element', (): void => {
it('creates a basic SVG element', (): void => {
expect(
serializeToString(
xs.serializeToString(
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-explicit-any
element(123) as any
)
@@ -1,14 +1,17 @@
// Copyright 2017-2023 @polkadot/ui-shared authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { serializeToString } from 'xmlserializer';
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import xs from 'xmlserializer';
import { rect } from './rect';
describe('rect', (): void => {
it('creates a basic SVG rect element', (): void => {
expect(
serializeToString(
xs.serializeToString(
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-explicit-any
rect(123) as any
)
@@ -1,14 +1,17 @@
// Copyright 2017-2023 @polkadot/ui-shared authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { serializeToString } from 'xmlserializer';
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import xs from 'xmlserializer';
import { svg } from './svg';
describe('svg', (): void => {
it('creates a basic SVG element', (): void => {
expect(
serializeToString(
xs.serializeToString(
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-explicit-any
svg('rect') as any
)
@@ -1,6 +1,9 @@
// Copyright 2018-2023 @polkadot/ui-shared authors & contributors
// SPDX-License-Identifier: Apache-2.0
// eslint-disable-next-line spaced-comment
/// <reference types="@polkadot/dev/node/test/node" />
import { polkadotIcon } from './polkadot';
describe('polkadotIcon', (): void => {
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/ui-shared', path: 'auto', type: 'auto', version: '2.11.2' };
export const packageInfo = { name: '@polkadot/ui-shared', path: 'auto', type: 'auto', version: '3.0.1' };
+6 -6
View File
@@ -17,14 +17,14 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "2.11.2",
"version": "3.0.1",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/ui-shared": "2.11.2",
"@polkadot/util": "^10.4.1",
"@polkadot/util-crypto": "^10.4.1",
"jdenticon": "3.2.0"
"@polkadot/ui-shared": "3.0.1",
"@polkadot/util": "^11.0.1",
"@polkadot/util-crypto": "^11.0.1",
"jdenticon": "3.2.0",
"tslib": "^2.5.0"
},
"devDependencies": {
"vue": "^2.7.14"
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/vue-identicon', path: 'auto', type: 'auto', version: '2.11.2' };
export const packageInfo = { name: '@polkadot/vue-identicon', path: 'auto', type: 'auto', version: '3.0.1' };
-2
View File
@@ -9,8 +9,6 @@
"@polkadot/react-qr/*": ["react-qr/src/*"],
"@polkadot/reactnative-identicon": ["reactnative-identicon/src"],
"@polkadot/reactnative-identicon/*": ["reactnative-identicon/src/*"],
"@polkadot/ui-assets": ["ui-assets/src"],
"@polkadot/ui-assets/*": ["ui-assets/src/*"],
"@polkadot/ui-keyring": ["ui-keyring/src"],
"@polkadot/ui-keyring/*": ["ui-keyring/src/*"],
"@polkadot/ui-settings": ["ui-settings/src"],
-3
View File
@@ -4,12 +4,9 @@
},
"files": [],
"references": [
{ "path": "./packages/example-react/tsconfig.build.json" },
{ "path": "./packages/example-vue/tsconfig.build.json" },
{ "path": "./packages/react-identicon/tsconfig.build.json" },
{ "path": "./packages/react-qr/tsconfig.build.json" },
{ "path": "./packages/reactnative-identicon/tsconfig.build.json" },
{ "path": "./packages/ui-assets/tsconfig.build.json" },
{ "path": "./packages/ui-keyring/tsconfig.build.json" },
{ "path": "./packages/ui-settings/tsconfig.build.json" },
{ "path": "./packages/ui-shared/tsconfig.build.json" },
+566 -2763
View File
File diff suppressed because it is too large Load Diff