@pezkuwi/react-identicon 3.16.6 → 3.16.8

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/package.json +209 -8
  2. package/build/Identicon.js +0 -104
  3. package/build/README.md +0 -34
  4. package/build/bundle.js +0 -3
  5. package/build/cjs/Identicon.d.ts +0 -5
  6. package/build/cjs/Identicon.js +0 -108
  7. package/build/cjs/bundle.d.ts +0 -3
  8. package/build/cjs/bundle.js +0 -9
  9. package/build/cjs/icons/Beachball.js +0 -17
  10. package/build/cjs/icons/Empty.js +0 -10
  11. package/build/cjs/icons/Ethereum.js +0 -18
  12. package/build/cjs/icons/Jdenticon.js +0 -12
  13. package/build/cjs/icons/Polkadot.js +0 -15
  14. package/build/cjs/icons/index.js +0 -13
  15. package/build/cjs/index.js +0 -7
  16. package/build/cjs/packageInfo.js +0 -4
  17. package/build/cjs/styled.js +0 -5
  18. package/build/cjs/types.js +0 -2
  19. package/build/icons/Beachball.d.ts +0 -5
  20. package/build/icons/Beachball.js +0 -13
  21. package/build/icons/Empty.d.ts +0 -5
  22. package/build/icons/Empty.js +0 -6
  23. package/build/icons/Ethereum.d.ts +0 -5
  24. package/build/icons/Ethereum.js +0 -14
  25. package/build/icons/Jdenticon.d.ts +0 -5
  26. package/build/icons/Jdenticon.js +0 -8
  27. package/build/icons/Polkadot.d.ts +0 -5
  28. package/build/icons/Polkadot.js +0 -11
  29. package/build/icons/index.d.ts +0 -5
  30. package/build/icons/index.js +0 -5
  31. package/build/index.d.ts +0 -4
  32. package/build/index.js +0 -4
  33. package/build/package.json +0 -249
  34. package/build/packageDetect.d.ts +0 -1
  35. package/build/packageDetect.js +0 -5
  36. package/build/packageInfo.d.ts +0 -6
  37. package/build/packageInfo.js +0 -1
  38. package/build/styled.d.ts +0 -1
  39. package/build/styled.js +0 -1
  40. package/build/types.d.ts +0 -23
  41. package/build/types.js +0 -1
  42. package/build-tsc-cjs/packageDetect.js +0 -7
  43. package/demo.png +0 -0
  44. package/index.html +0 -17
  45. package/src/Identicon.tsx +0 -154
  46. package/src/bundle.ts +0 -6
  47. package/src/icons/Beachball.tsx +0 -32
  48. package/src/icons/Empty.tsx +0 -20
  49. package/src/icons/Ethereum.tsx +0 -37
  50. package/src/icons/Jdenticon.tsx +0 -24
  51. package/src/icons/Polkadot.tsx +0 -59
  52. package/src/icons/index.ts +0 -8
  53. package/src/index.ts +0 -10
  54. package/src/packageDetect.ts +0 -13
  55. package/src/packageInfo.ts +0 -6
  56. package/src/styled.ts +0 -4
  57. package/src/types.ts +0 -30
  58. package/tsconfig.build.json +0 -12
  59. package/tsconfig.build.tsbuildinfo +0 -1
  60. /package/{build-tsc/Identicon.d.ts → Identicon.d.ts} +0 -0
  61. /package/{build-tsc-esm/Identicon.js → Identicon.js} +0 -0
  62. /package/{build/LICENSE → LICENSE} +0 -0
  63. /package/{build/bundle-pezkuwi-react-identicon.js → bundle-pezkuwi-react-identicon.js} +0 -0
  64. /package/{build-tsc/bundle.d.ts → bundle.d.ts} +0 -0
  65. /package/{build-tsc-esm/bundle.js → bundle.js} +0 -0
  66. /package/{build → cjs}/Identicon.d.ts +0 -0
  67. /package/{build-tsc-cjs → cjs}/Identicon.js +0 -0
  68. /package/{build → cjs}/bundle.d.ts +0 -0
  69. /package/{build-tsc-cjs → cjs}/bundle.js +0 -0
  70. /package/{build-tsc → cjs}/icons/Beachball.d.ts +0 -0
  71. /package/{build-tsc-cjs → cjs}/icons/Beachball.js +0 -0
  72. /package/{build-tsc → cjs}/icons/Empty.d.ts +0 -0
  73. /package/{build-tsc-cjs → cjs}/icons/Empty.js +0 -0
  74. /package/{build-tsc → cjs}/icons/Ethereum.d.ts +0 -0
  75. /package/{build-tsc-cjs → cjs}/icons/Ethereum.js +0 -0
  76. /package/{build-tsc → cjs}/icons/Jdenticon.d.ts +0 -0
  77. /package/{build-tsc-cjs → cjs}/icons/Jdenticon.js +0 -0
  78. /package/{build-tsc → cjs}/icons/Polkadot.d.ts +0 -0
  79. /package/{build-tsc-cjs → cjs}/icons/Polkadot.js +0 -0
  80. /package/{build-tsc → cjs}/icons/index.d.ts +0 -0
  81. /package/{build-tsc-cjs → cjs}/icons/index.js +0 -0
  82. /package/{build-tsc → cjs}/index.d.ts +0 -0
  83. /package/{build-tsc-cjs → cjs}/index.js +0 -0
  84. /package/{build/cjs → cjs}/package.json +0 -0
  85. /package/{build-tsc → cjs}/packageDetect.d.ts +0 -0
  86. /package/{build/cjs → cjs}/packageDetect.js +0 -0
  87. /package/{build-tsc → cjs}/packageInfo.d.ts +0 -0
  88. /package/{build-tsc-cjs → cjs}/packageInfo.js +0 -0
  89. /package/{build-tsc → cjs}/styled.d.ts +0 -0
  90. /package/{build-tsc-cjs → cjs}/styled.js +0 -0
  91. /package/{build-tsc → cjs}/types.d.ts +0 -0
  92. /package/{build-tsc-cjs → cjs}/types.js +0 -0
  93. /package/{build/cjs/icons → icons}/Beachball.d.ts +0 -0
  94. /package/{build-tsc-esm/icons → icons}/Beachball.js +0 -0
  95. /package/{build/cjs/icons → icons}/Empty.d.ts +0 -0
  96. /package/{build-tsc-esm/icons → icons}/Empty.js +0 -0
  97. /package/{build/cjs/icons → icons}/Ethereum.d.ts +0 -0
  98. /package/{build-tsc-esm/icons → icons}/Ethereum.js +0 -0
  99. /package/{build/cjs/icons → icons}/Jdenticon.d.ts +0 -0
  100. /package/{build-tsc-esm/icons → icons}/Jdenticon.js +0 -0
  101. /package/{build/cjs/icons → icons}/Polkadot.d.ts +0 -0
  102. /package/{build-tsc-esm/icons → icons}/Polkadot.js +0 -0
  103. /package/{build/cjs/icons → icons}/index.d.ts +0 -0
  104. /package/{build-tsc-esm/icons → icons}/index.js +0 -0
  105. /package/{build/cjs/index.d.ts → index.d.ts} +0 -0
  106. /package/{build-tsc-esm/index.js → index.js} +0 -0
  107. /package/{build/cjs/packageDetect.d.ts → packageDetect.d.ts} +0 -0
  108. /package/{build-tsc-esm/packageDetect.js → packageDetect.js} +0 -0
  109. /package/{build/cjs/packageInfo.d.ts → packageInfo.d.ts} +0 -0
  110. /package/{build-tsc-esm/packageInfo.js → packageInfo.js} +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,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,59 +0,0 @@
1
- // Copyright 2018-2025 @pezkuwi/react-identicon authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- // Copyright 2018 Paritytech via paritytech/oo7/polkadot-identicon
5
-
6
- // This has been converted from the original version that can be found at
7
- //
8
- // https://github.com/paritytech/oo7/blob/251ba2b7c45503b68eab4320c270b5afa9bccb60/packages/polkadot-identicon/src/index.jsx
9
- //
10
- // Here we have done the following to convert the component -
11
- // - Converted the code to TypeScript
12
- // - Removed the oo7 dependencies (since not initialised properly, it makes calls to wrong endpoints)
13
- // - Remove encoding functionality, these are catered for in the base
14
- // - Remove copy functionality (this is catered from in the base components)
15
- // - Split calculations into relevant functions
16
- // - Move constants to file-level
17
- // - Overall it is now just a static component, expecting an address as an input value
18
-
19
- import type { Circle } from '@pezkuwi/ui-shared/icons/types';
20
- import type { Props } from '../types.js';
21
-
22
- import React, { useMemo } from 'react';
23
-
24
- import { polkadotIcon } from '@pezkuwi/ui-shared';
25
-
26
- function renderCircle ({ cx, cy, fill, r }: Circle, key: number): React.ReactNode {
27
- return (
28
- <circle
29
- cx={cx}
30
- cy={cy}
31
- fill={fill}
32
- key={key}
33
- r={r}
34
- />
35
- );
36
- }
37
-
38
- function Identicon ({ address, className = '', isAlternative = false, size, style = {} }: Props): React.ReactElement<Props> {
39
- const circles = useMemo(
40
- () => polkadotIcon(address, { isAlternative }),
41
- [address, isAlternative]
42
- );
43
-
44
- return (
45
- <svg
46
- className={className}
47
- height={size}
48
- id={address}
49
- name={address}
50
- style={style}
51
- viewBox='0 0 64 64'
52
- width={size}
53
- >
54
- {circles.map(renderCircle)}
55
- </svg>
56
- );
57
- }
58
-
59
- export const Polkadot = 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 { Polkadot } from './Polkadot.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.16.6' };
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' | 'empty' | 'ethereum' | 'jdenticon' | 'polkadot' | 'substrate';
@@ -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
- }