@pezkuwi/react-identicon 3.17.0 → 3.17.1
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/{build/bundle-pezkuwi-react-identicon.js → bundle-pezkuwi-react-identicon.js} +1 -1
- package/{build/cjs → cjs}/packageInfo.js +1 -1
- package/package.json +209 -8
- package/{build-tsc-esm/packageInfo.js → packageInfo.js} +1 -1
- package/build/Identicon.js +0 -104
- package/build/README.md +0 -34
- package/build/bundle.js +0 -3
- package/build/cjs/Identicon.d.ts +0 -5
- package/build/cjs/Identicon.js +0 -108
- package/build/cjs/bundle.d.ts +0 -3
- package/build/cjs/bundle.js +0 -9
- package/build/cjs/icons/Beachball.js +0 -17
- package/build/cjs/icons/Empty.js +0 -10
- package/build/cjs/icons/Ethereum.js +0 -18
- package/build/cjs/icons/Jdenticon.js +0 -12
- package/build/cjs/icons/Pezkuwi.js +0 -15
- package/build/cjs/icons/index.js +0 -13
- package/build/cjs/index.js +0 -7
- package/build/cjs/styled.js +0 -5
- package/build/cjs/types.js +0 -2
- package/build/icons/Beachball.d.ts +0 -5
- package/build/icons/Beachball.js +0 -13
- package/build/icons/Empty.d.ts +0 -5
- package/build/icons/Empty.js +0 -6
- package/build/icons/Ethereum.d.ts +0 -5
- package/build/icons/Ethereum.js +0 -14
- package/build/icons/Jdenticon.d.ts +0 -5
- package/build/icons/Jdenticon.js +0 -8
- package/build/icons/Pezkuwi.d.ts +0 -5
- package/build/icons/Pezkuwi.js +0 -11
- package/build/icons/index.d.ts +0 -5
- package/build/icons/index.js +0 -5
- package/build/index.d.ts +0 -4
- package/build/index.js +0 -4
- package/build/package.json +0 -249
- package/build/packageDetect.d.ts +0 -1
- package/build/packageDetect.js +0 -5
- package/build/packageInfo.d.ts +0 -6
- package/build/packageInfo.js +0 -1
- package/build/styled.d.ts +0 -1
- package/build/styled.js +0 -1
- package/build/types.d.ts +0 -23
- package/build/types.js +0 -1
- package/build-tsc-cjs/packageDetect.js +0 -7
- package/build-tsc-cjs/packageInfo.js +0 -4
- package/demo.png +0 -0
- package/index.html +0 -17
- package/src/Identicon.tsx +0 -154
- package/src/bundle.ts +0 -6
- package/src/icons/Beachball.tsx +0 -32
- package/src/icons/Empty.tsx +0 -20
- package/src/icons/Ethereum.tsx +0 -37
- package/src/icons/Jdenticon.tsx +0 -24
- package/src/icons/Pezkuwi.tsx +0 -47
- package/src/icons/index.ts +0 -8
- package/src/index.ts +0 -10
- package/src/packageDetect.ts +0 -13
- package/src/packageInfo.ts +0 -6
- package/src/styled.ts +0 -4
- package/src/types.ts +0 -30
- package/tsconfig.build.json +0 -12
- package/tsconfig.build.tsbuildinfo +0 -1
- /package/{build-tsc/Identicon.d.ts → Identicon.d.ts} +0 -0
- /package/{build-tsc-esm/Identicon.js → Identicon.js} +0 -0
- /package/{build/LICENSE → LICENSE} +0 -0
- /package/{build-tsc/bundle.d.ts → bundle.d.ts} +0 -0
- /package/{build-tsc-esm/bundle.js → bundle.js} +0 -0
- /package/{build → cjs}/Identicon.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/Identicon.js +0 -0
- /package/{build → cjs}/bundle.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/bundle.js +0 -0
- /package/{build-tsc → cjs}/icons/Beachball.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/icons/Beachball.js +0 -0
- /package/{build-tsc → cjs}/icons/Empty.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/icons/Empty.js +0 -0
- /package/{build-tsc → cjs}/icons/Ethereum.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/icons/Ethereum.js +0 -0
- /package/{build-tsc → cjs}/icons/Jdenticon.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/icons/Jdenticon.js +0 -0
- /package/{build-tsc → cjs}/icons/Pezkuwi.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/icons/Pezkuwi.js +0 -0
- /package/{build-tsc → cjs}/icons/index.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/icons/index.js +0 -0
- /package/{build-tsc → cjs}/index.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/index.js +0 -0
- /package/{build/cjs → cjs}/package.json +0 -0
- /package/{build-tsc → cjs}/packageDetect.d.ts +0 -0
- /package/{build/cjs → cjs}/packageDetect.js +0 -0
- /package/{build-tsc → cjs}/packageInfo.d.ts +0 -0
- /package/{build-tsc → cjs}/styled.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/styled.js +0 -0
- /package/{build-tsc → cjs}/types.d.ts +0 -0
- /package/{build-tsc-cjs → cjs}/types.js +0 -0
- /package/{build/cjs/icons → icons}/Beachball.d.ts +0 -0
- /package/{build-tsc-esm/icons → icons}/Beachball.js +0 -0
- /package/{build/cjs/icons → icons}/Empty.d.ts +0 -0
- /package/{build-tsc-esm/icons → icons}/Empty.js +0 -0
- /package/{build/cjs/icons → icons}/Ethereum.d.ts +0 -0
- /package/{build-tsc-esm/icons → icons}/Ethereum.js +0 -0
- /package/{build/cjs/icons → icons}/Jdenticon.d.ts +0 -0
- /package/{build-tsc-esm/icons → icons}/Jdenticon.js +0 -0
- /package/{build/cjs/icons → icons}/Pezkuwi.d.ts +0 -0
- /package/{build-tsc-esm/icons → icons}/Pezkuwi.js +0 -0
- /package/{build/cjs/icons → icons}/index.d.ts +0 -0
- /package/{build-tsc-esm/icons → icons}/index.js +0 -0
- /package/{build/cjs/index.d.ts → index.d.ts} +0 -0
- /package/{build-tsc-esm/index.js → index.js} +0 -0
- /package/{build/cjs/packageDetect.d.ts → packageDetect.d.ts} +0 -0
- /package/{build-tsc-esm/packageDetect.js → packageDetect.js} +0 -0
- /package/{build/cjs/packageInfo.d.ts → packageInfo.d.ts} +0 -0
- /package/{build/cjs/styled.d.ts → styled.d.ts} +0 -0
- /package/{build-tsc-esm/styled.js → styled.js} +0 -0
- /package/{build/cjs/types.d.ts → types.d.ts} +0 -0
- /package/{build-tsc-esm/types.js → types.js} +0 -0
package/src/icons/Ethereum.tsx
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// Copyright 2017-2025 @pezkuwi/react-identicon authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import type { Props } from '../types.js';
|
|
5
|
-
|
|
6
|
-
import makeBlockie from 'ethereum-blockies-base64';
|
|
7
|
-
import React, { useMemo } from 'react';
|
|
8
|
-
|
|
9
|
-
import { styled } from '../styled.js';
|
|
10
|
-
|
|
11
|
-
interface ImgProps {
|
|
12
|
-
size: number;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function Identicon ({ address, className = '', size, style = {} }: Props): React.ReactElement<Props> {
|
|
16
|
-
const imgSrc = useMemo(
|
|
17
|
-
() => makeBlockie(address),
|
|
18
|
-
[address]
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<StyledImg
|
|
23
|
-
className={className}
|
|
24
|
-
size={size}
|
|
25
|
-
src={imgSrc}
|
|
26
|
-
style={style}
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const StyledImg = styled.img<ImgProps>(({ size }) => `
|
|
32
|
-
display: block;
|
|
33
|
-
height: ${size}px;
|
|
34
|
-
width: ${size}px;
|
|
35
|
-
`);
|
|
36
|
-
|
|
37
|
-
export const Ethereum = React.memo(Identicon);
|
package/src/icons/Jdenticon.tsx
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// Copyright 2017-2025 @pezkuwi/react-identicon authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import type { Props } from '../types.js';
|
|
5
|
-
|
|
6
|
-
import * as jdenticon from 'jdenticon';
|
|
7
|
-
import React, { useMemo } from 'react';
|
|
8
|
-
|
|
9
|
-
function Identicon ({ className = '', publicKey, size, style = {} }: Props): React.ReactElement<Props> {
|
|
10
|
-
const html = useMemo(
|
|
11
|
-
() => ({ __html: jdenticon.toSvg(publicKey.substring(2), size) }),
|
|
12
|
-
[publicKey, size]
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<div
|
|
17
|
-
className={className}
|
|
18
|
-
dangerouslySetInnerHTML={html}
|
|
19
|
-
style={style}
|
|
20
|
-
/>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const Jdenticon = React.memo(Identicon);
|
package/src/icons/Pezkuwi.tsx
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2025 @pezkuwi/react-identicon authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
// Originally from: https://github.com/paritytech/oo7/tree/master/packages/polkadot-identicon
|
|
5
|
-
// Copyright 2018 Paritytech - Adapted for PezkuwiChain ecosystem
|
|
6
|
-
|
|
7
|
-
import type { Circle } from '@pezkuwi/ui-shared/icons/types';
|
|
8
|
-
import type { Props } from '../types.js';
|
|
9
|
-
|
|
10
|
-
import React, { useMemo } from 'react';
|
|
11
|
-
|
|
12
|
-
import { pezkuwiIcon } from '@pezkuwi/ui-shared';
|
|
13
|
-
|
|
14
|
-
function renderCircle ({ cx, cy, fill, r }: Circle, key: number): React.ReactNode {
|
|
15
|
-
return (
|
|
16
|
-
<circle
|
|
17
|
-
cx={cx}
|
|
18
|
-
cy={cy}
|
|
19
|
-
fill={fill}
|
|
20
|
-
key={key}
|
|
21
|
-
r={r}
|
|
22
|
-
/>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function Identicon ({ address, className = '', isAlternative = false, size, style = {} }: Props): React.ReactElement<Props> {
|
|
27
|
-
const circles = useMemo(
|
|
28
|
-
() => pezkuwiIcon(address, { isAlternative }),
|
|
29
|
-
[address, isAlternative]
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<svg
|
|
34
|
-
className={className}
|
|
35
|
-
height={size}
|
|
36
|
-
id={address}
|
|
37
|
-
name={address}
|
|
38
|
-
style={style}
|
|
39
|
-
viewBox='0 0 64 64'
|
|
40
|
-
width={size}
|
|
41
|
-
>
|
|
42
|
-
{circles.map(renderCircle)}
|
|
43
|
-
</svg>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export const Pezkuwi = React.memo(Identicon);
|
package/src/icons/index.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// Copyright 2017-2025 @pezkuwi/react-identicon authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
export { Beachball } from './Beachball.js';
|
|
5
|
-
export { Empty } from './Empty.js';
|
|
6
|
-
export { Ethereum } from './Ethereum.js';
|
|
7
|
-
export { Jdenticon } from './Jdenticon.js';
|
|
8
|
-
export { Pezkuwi } from './Pezkuwi.js';
|
package/src/index.ts
DELETED
package/src/packageDetect.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Copyright 2017-2026 @pezkuwi/react-identicon authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
// Do not edit, auto-generated by @pezkuwi/dev
|
|
5
|
-
// (packageInfo imports will be kept as-is, user-editable)
|
|
6
|
-
|
|
7
|
-
import { packageInfo as settingsInfo } from '@pezkuwi/ui-settings/packageInfo';
|
|
8
|
-
import { packageInfo as sharedInfo } from '@pezkuwi/ui-shared/packageInfo';
|
|
9
|
-
import { detectPackage } from '@pezkuwi/util';
|
|
10
|
-
|
|
11
|
-
import { packageInfo } from './packageInfo.js';
|
|
12
|
-
|
|
13
|
-
detectPackage(packageInfo, null, [settingsInfo, sharedInfo]);
|
package/src/packageInfo.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// Copyright 2017-2026 @pezkuwi/react-identicon authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
// Do not edit, auto-generated by @pezkuwi/dev
|
|
5
|
-
|
|
6
|
-
export const packageInfo = { name: '@pezkuwi/react-identicon', path: 'auto', type: 'auto', version: '3.17.0' };
|
package/src/styled.ts
DELETED
package/src/types.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// Copyright 2018-2025 @pezkuwi/react-identicon authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import type React from 'react';
|
|
5
|
-
import type { Prefix } from '@pezkuwi/util-crypto/address/types';
|
|
6
|
-
|
|
7
|
-
export interface BaseProps {
|
|
8
|
-
className?: string;
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface Props extends BaseProps {
|
|
13
|
-
address: string;
|
|
14
|
-
isAlternative?: boolean | undefined;
|
|
15
|
-
publicKey: string;
|
|
16
|
-
size: number;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface IdentityProps extends BaseProps {
|
|
20
|
-
Custom?: React.ComponentType<Props>;
|
|
21
|
-
isAlternative?: boolean;
|
|
22
|
-
isHighlight?: boolean;
|
|
23
|
-
onCopy?: (value: string) => void;
|
|
24
|
-
prefix?: Prefix;
|
|
25
|
-
size?: number;
|
|
26
|
-
theme?: IconTheme;
|
|
27
|
-
value?: string | Uint8Array | null;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export type IconTheme = 'beachball' | 'bizinikiwi' | 'empty' | 'ethereum' | 'jdenticon' | 'pezkuwi';
|
package/tsconfig.build.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"baseUrl": "..",
|
|
5
|
-
"outDir": "./build",
|
|
6
|
-
"rootDir": "./src"
|
|
7
|
-
},
|
|
8
|
-
"references": [
|
|
9
|
-
{ "path": "../ui-shared/tsconfig.build.json" },
|
|
10
|
-
{ "path": "../ui-settings/tsconfig.build.json" }
|
|
11
|
-
]
|
|
12
|
-
}
|