This commit is contained in:
Jaco
2023-02-20 10:45:38 +02:00
committed by GitHub
parent 6ff0fd7e9b
commit c25fefa16f
17 changed files with 89 additions and 42 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
"url": "https://github.com/polkadot-js/ui.git"
},
"sideEffects": false,
"version": "2.11.3",
"version": "2.12.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13"
+1 -1
View File
@@ -14,7 +14,7 @@
"url": "https://github.com/polkadot-js/ui.git"
},
"sideEffects": false,
"version": "2.11.3",
"version": "2.12.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13"
+3 -3
View File
@@ -17,13 +17,13 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "2.11.3",
"version": "2.12.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/keyring": "^10.4.2",
"@polkadot/ui-settings": "2.11.3",
"@polkadot/ui-shared": "2.11.3",
"@polkadot/ui-settings": "2.12.0",
"@polkadot/ui-shared": "2.12.0",
"@polkadot/util": "^10.4.2",
"@polkadot/util-crypto": "^10.4.2",
"color": "^3.2.1",
+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;
+2 -2
View File
@@ -17,11 +17,11 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "2.11.3",
"version": "2.12.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/ui-settings": "2.11.3",
"@polkadot/ui-settings": "2.12.0",
"@polkadot/util": "^10.4.2",
"@polkadot/util-crypto": "^10.4.2",
"qrcode-generator": "^1.4.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;
+2 -2
View File
@@ -17,11 +17,11 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "2.11.3",
"version": "2.12.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/ui-shared": "2.11.3",
"@polkadot/ui-shared": "2.12.0",
"@polkadot/util": "^10.4.2",
"@polkadot/util-crypto": "^10.4.2",
"react-native-svg": "^12.5.1"
+1 -1
View File
@@ -13,7 +13,7 @@
"url": "https://github.com/polkadot-js/ui.git"
},
"sideEffects": false,
"version": "2.11.3",
"version": "2.12.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
+2 -2
View File
@@ -16,12 +16,12 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "2.11.3",
"version": "2.12.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/keyring": "^10.4.2",
"@polkadot/ui-settings": "2.11.3",
"@polkadot/ui-settings": "2.12.0",
"@polkadot/util": "^10.4.2",
"@polkadot/util-crypto": "^10.4.2",
"mkdirp": "^2.1.3",
+1 -1
View File
@@ -17,7 +17,7 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "2.11.3",
"version": "2.12.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
+1 -1
View File
@@ -17,7 +17,7 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "2.11.3",
"version": "2.12.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
+2 -2
View File
@@ -17,11 +17,11 @@
"./detectPackage.cjs"
],
"type": "module",
"version": "2.11.3",
"version": "2.12.0",
"main": "index.js",
"dependencies": {
"@babel/runtime": "^7.20.13",
"@polkadot/ui-shared": "2.11.3",
"@polkadot/ui-shared": "2.12.0",
"@polkadot/util": "^10.4.2",
"@polkadot/util-crypto": "^10.4.2",
"jdenticon": "3.2.0"