refactor: rename polkadotIcon to pezkuwiIcon and update identicon themes

- Rename polkadot.ts to pezkuwi.ts in ui-shared
- Rename polkadotIcon function to pezkuwiIcon
- Rename Polkadot.tsx to Pezkuwi.tsx in all identicon packages
- Update Components mapping to use pezkuwi theme
- Add bizinikiwi theme as substrate replacement
- Update IconTheme type definitions
- Update Ledger app text to Pezkuwi
This commit is contained in:
2026-01-09 00:15:30 +03:00
parent ca1f34c46c
commit 03e7cc4736
16 changed files with 92 additions and 99 deletions
+16 -8
View File
@@ -9,7 +9,7 @@ import { defineComponent, h } from 'vue';
import { isHex, isU8a, u8aToHex } from '@pezkuwi/util';
import { decodeAddress, encodeAddress, isEthereumAddress } from '@pezkuwi/util-crypto';
import { Beachball, Empty, Jdenticon, Polkadot } from './icons/index.js';
import { Beachball, Empty, Jdenticon, Pezkuwi } from './icons/index.js';
import { adaptVNodeAttrs } from './util.js';
interface Account {
@@ -22,7 +22,7 @@ interface Data {
iconSize: number;
isAlternativeIcon: boolean;
publicKey: string;
type: 'beachball' | 'empty' | 'jdenticon' | 'polkadot' | 'substrate';
type: 'beachball' | 'empty' | 'jdenticon' | 'pezkuwi' | 'bizinikiwi';
}
const DEFAULT_SIZE = 64;
@@ -53,7 +53,7 @@ export function encodeAccount (value: string | Uint8Array, prefix?: Prefix): Acc
* @description The main Identicon component, taking a number of properties
* @example
* ```html
* <Identicon :size="128" :theme="polkadot" :value="..." />
* <Identicon :size="128" :theme="pezkuwi" :value="..." />
* ```
*/
export const Identicon = defineComponent({
@@ -61,7 +61,7 @@ export const Identicon = defineComponent({
Beachball,
Empty,
Jdenticon,
Polkadot
Pezkuwi
},
created: function (): void {
this.createData();
@@ -110,16 +110,24 @@ export const Identicon = defineComponent({
}
)
}, []);
} else if (type === 'substrate') {
throw new Error('substrate type is not supported');
} else if (type === 'bizinikiwi') {
return h(Jdenticon, {
...adaptVNodeAttrs(
{
key: address,
publicKey,
size: iconSize
}
)
}, []);
}
const cmp = type.charAt(0).toUpperCase() + type.slice(1);
if (['Beachball', 'Polkadot'].includes(cmp)) {
if (['Beachball', 'Pezkuwi'].includes(cmp)) {
const component = cmp === 'Beachball'
? Beachball
: Polkadot;
: Pezkuwi;
return h(component, {
...adaptVNodeAttrs({
@@ -5,7 +5,7 @@ import type { VNode } from 'vue';
import { defineComponent, h } from 'vue';
import { polkadotIcon } from '@pezkuwi/ui-shared';
import { pezkuwiIcon } from '@pezkuwi/ui-shared';
import { adaptVNodeAttrs } from '../util.js';
@@ -16,14 +16,14 @@ interface propsType {
}
/**
* @name Polkadot
* @description The Polkadot default identicon
* @name Pezkuwi
* @description The Pezkuwi default identicon
*/
export const Polkadot = defineComponent({
export const Pezkuwi = defineComponent({
props: ['address', 'isAlternative', 'size'],
render (): VNode {
const { address, isAlternative, size } = this.$props as propsType;
const circles = polkadotIcon(address, { isAlternative }).map(({ cx, cy, fill, r }) =>
const circles = pezkuwiIcon(address, { isAlternative }).map(({ cx, cy, fill, r }) =>
h('circle', { ...adaptVNodeAttrs({ cx, cy, fill, r }) }, [])
);
+2 -2
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2025 @pezkuwi/reactnative-identicon authors & contributors
// Copyright 2017-2025 @pezkuwi/vue-identicon authors & contributors
// SPDX-License-Identifier: Apache-2.0
export * from './Beachball.js';
export * from './Empty.js';
export * from './Jdenticon.js';
export * from './Polkadot.js';
export * from './Pezkuwi.js';