@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.
Files changed (114) hide show
  1. package/{build/bundle-pezkuwi-react-identicon.js → bundle-pezkuwi-react-identicon.js} +1 -1
  2. package/{build/cjs → cjs}/packageInfo.js +1 -1
  3. package/package.json +209 -8
  4. package/{build-tsc-esm/packageInfo.js → packageInfo.js} +1 -1
  5. package/build/Identicon.js +0 -104
  6. package/build/README.md +0 -34
  7. package/build/bundle.js +0 -3
  8. package/build/cjs/Identicon.d.ts +0 -5
  9. package/build/cjs/Identicon.js +0 -108
  10. package/build/cjs/bundle.d.ts +0 -3
  11. package/build/cjs/bundle.js +0 -9
  12. package/build/cjs/icons/Beachball.js +0 -17
  13. package/build/cjs/icons/Empty.js +0 -10
  14. package/build/cjs/icons/Ethereum.js +0 -18
  15. package/build/cjs/icons/Jdenticon.js +0 -12
  16. package/build/cjs/icons/Pezkuwi.js +0 -15
  17. package/build/cjs/icons/index.js +0 -13
  18. package/build/cjs/index.js +0 -7
  19. package/build/cjs/styled.js +0 -5
  20. package/build/cjs/types.js +0 -2
  21. package/build/icons/Beachball.d.ts +0 -5
  22. package/build/icons/Beachball.js +0 -13
  23. package/build/icons/Empty.d.ts +0 -5
  24. package/build/icons/Empty.js +0 -6
  25. package/build/icons/Ethereum.d.ts +0 -5
  26. package/build/icons/Ethereum.js +0 -14
  27. package/build/icons/Jdenticon.d.ts +0 -5
  28. package/build/icons/Jdenticon.js +0 -8
  29. package/build/icons/Pezkuwi.d.ts +0 -5
  30. package/build/icons/Pezkuwi.js +0 -11
  31. package/build/icons/index.d.ts +0 -5
  32. package/build/icons/index.js +0 -5
  33. package/build/index.d.ts +0 -4
  34. package/build/index.js +0 -4
  35. package/build/package.json +0 -249
  36. package/build/packageDetect.d.ts +0 -1
  37. package/build/packageDetect.js +0 -5
  38. package/build/packageInfo.d.ts +0 -6
  39. package/build/packageInfo.js +0 -1
  40. package/build/styled.d.ts +0 -1
  41. package/build/styled.js +0 -1
  42. package/build/types.d.ts +0 -23
  43. package/build/types.js +0 -1
  44. package/build-tsc-cjs/packageDetect.js +0 -7
  45. package/build-tsc-cjs/packageInfo.js +0 -4
  46. package/demo.png +0 -0
  47. package/index.html +0 -17
  48. package/src/Identicon.tsx +0 -154
  49. package/src/bundle.ts +0 -6
  50. package/src/icons/Beachball.tsx +0 -32
  51. package/src/icons/Empty.tsx +0 -20
  52. package/src/icons/Ethereum.tsx +0 -37
  53. package/src/icons/Jdenticon.tsx +0 -24
  54. package/src/icons/Pezkuwi.tsx +0 -47
  55. package/src/icons/index.ts +0 -8
  56. package/src/index.ts +0 -10
  57. package/src/packageDetect.ts +0 -13
  58. package/src/packageInfo.ts +0 -6
  59. package/src/styled.ts +0 -4
  60. package/src/types.ts +0 -30
  61. package/tsconfig.build.json +0 -12
  62. package/tsconfig.build.tsbuildinfo +0 -1
  63. /package/{build-tsc/Identicon.d.ts → Identicon.d.ts} +0 -0
  64. /package/{build-tsc-esm/Identicon.js → Identicon.js} +0 -0
  65. /package/{build/LICENSE → LICENSE} +0 -0
  66. /package/{build-tsc/bundle.d.ts → bundle.d.ts} +0 -0
  67. /package/{build-tsc-esm/bundle.js → bundle.js} +0 -0
  68. /package/{build → cjs}/Identicon.d.ts +0 -0
  69. /package/{build-tsc-cjs → cjs}/Identicon.js +0 -0
  70. /package/{build → cjs}/bundle.d.ts +0 -0
  71. /package/{build-tsc-cjs → cjs}/bundle.js +0 -0
  72. /package/{build-tsc → cjs}/icons/Beachball.d.ts +0 -0
  73. /package/{build-tsc-cjs → cjs}/icons/Beachball.js +0 -0
  74. /package/{build-tsc → cjs}/icons/Empty.d.ts +0 -0
  75. /package/{build-tsc-cjs → cjs}/icons/Empty.js +0 -0
  76. /package/{build-tsc → cjs}/icons/Ethereum.d.ts +0 -0
  77. /package/{build-tsc-cjs → cjs}/icons/Ethereum.js +0 -0
  78. /package/{build-tsc → cjs}/icons/Jdenticon.d.ts +0 -0
  79. /package/{build-tsc-cjs → cjs}/icons/Jdenticon.js +0 -0
  80. /package/{build-tsc → cjs}/icons/Pezkuwi.d.ts +0 -0
  81. /package/{build-tsc-cjs → cjs}/icons/Pezkuwi.js +0 -0
  82. /package/{build-tsc → cjs}/icons/index.d.ts +0 -0
  83. /package/{build-tsc-cjs → cjs}/icons/index.js +0 -0
  84. /package/{build-tsc → cjs}/index.d.ts +0 -0
  85. /package/{build-tsc-cjs → cjs}/index.js +0 -0
  86. /package/{build/cjs → cjs}/package.json +0 -0
  87. /package/{build-tsc → cjs}/packageDetect.d.ts +0 -0
  88. /package/{build/cjs → cjs}/packageDetect.js +0 -0
  89. /package/{build-tsc → cjs}/packageInfo.d.ts +0 -0
  90. /package/{build-tsc → cjs}/styled.d.ts +0 -0
  91. /package/{build-tsc-cjs → cjs}/styled.js +0 -0
  92. /package/{build-tsc → cjs}/types.d.ts +0 -0
  93. /package/{build-tsc-cjs → cjs}/types.js +0 -0
  94. /package/{build/cjs/icons → icons}/Beachball.d.ts +0 -0
  95. /package/{build-tsc-esm/icons → icons}/Beachball.js +0 -0
  96. /package/{build/cjs/icons → icons}/Empty.d.ts +0 -0
  97. /package/{build-tsc-esm/icons → icons}/Empty.js +0 -0
  98. /package/{build/cjs/icons → icons}/Ethereum.d.ts +0 -0
  99. /package/{build-tsc-esm/icons → icons}/Ethereum.js +0 -0
  100. /package/{build/cjs/icons → icons}/Jdenticon.d.ts +0 -0
  101. /package/{build-tsc-esm/icons → icons}/Jdenticon.js +0 -0
  102. /package/{build/cjs/icons → icons}/Pezkuwi.d.ts +0 -0
  103. /package/{build-tsc-esm/icons → icons}/Pezkuwi.js +0 -0
  104. /package/{build/cjs/icons → icons}/index.d.ts +0 -0
  105. /package/{build-tsc-esm/icons → icons}/index.js +0 -0
  106. /package/{build/cjs/index.d.ts → index.d.ts} +0 -0
  107. /package/{build-tsc-esm/index.js → index.js} +0 -0
  108. /package/{build/cjs/packageDetect.d.ts → packageDetect.d.ts} +0 -0
  109. /package/{build-tsc-esm/packageDetect.js → packageDetect.js} +0 -0
  110. /package/{build/cjs/packageInfo.d.ts → packageInfo.d.ts} +0 -0
  111. /package/{build/cjs/styled.d.ts → styled.d.ts} +0 -0
  112. /package/{build-tsc-esm/styled.js → styled.js} +0 -0
  113. /package/{build/cjs/types.d.ts → types.d.ts} +0 -0
  114. /package/{build-tsc-esm/types.js → types.js} +0 -0
@@ -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);
@@ -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);
@@ -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);
@@ -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
@@ -1,10 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/react-identicon authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import './packageDetect.js';
5
-
6
- import { Identicon } from './bundle.js';
7
-
8
- export * from './bundle.js';
9
-
10
- export default Identicon;
@@ -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]);
@@ -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
@@ -1,4 +0,0 @@
1
- // Copyright 2017-2025 @pezkuwi/react-identicon authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- export { styled } from 'styled-components';
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';
@@ -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
- }