@pezkuwi/vue-identicon 3.16.7 → 3.17.0
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/Identicon.d.ts +2 -2
- package/build/Identicon.js +13 -7
- package/build/bundle-pezkuwi-vue-identicon.js +16 -14
- package/build/cjs/Identicon.d.ts +2 -2
- package/build/cjs/Identicon.js +12 -6
- package/{build-tsc/icons/Polkadot.d.ts → build/cjs/icons/Pezkuwi.d.ts} +3 -3
- package/build/cjs/icons/{Polkadot.js → Pezkuwi.js} +5 -5
- package/build/cjs/icons/index.d.ts +1 -1
- package/build/cjs/icons/index.js +1 -1
- package/build/cjs/packageInfo.js +1 -1
- package/build/{cjs/icons/Polkadot.d.ts → icons/Pezkuwi.d.ts} +3 -3
- package/build/icons/{Polkadot.js → Pezkuwi.js} +5 -5
- package/build/icons/index.d.ts +1 -1
- package/build/icons/index.js +1 -1
- package/build/package.json +8 -8
- package/build/packageInfo.js +1 -1
- package/build-tsc/Identicon.d.ts +2 -2
- package/{build/icons/Polkadot.d.ts → build-tsc/icons/Pezkuwi.d.ts} +3 -3
- package/build-tsc/icons/index.d.ts +1 -1
- package/build-tsc-cjs/Identicon.js +12 -6
- package/build-tsc-cjs/icons/{Polkadot.js → Pezkuwi.js} +5 -5
- package/build-tsc-cjs/icons/index.js +1 -1
- package/build-tsc-cjs/packageInfo.js +1 -1
- package/build-tsc-esm/Identicon.js +13 -7
- package/build-tsc-esm/icons/{Polkadot.js → Pezkuwi.js} +5 -5
- package/build-tsc-esm/icons/index.js +1 -1
- package/build-tsc-esm/packageInfo.js +1 -1
- package/package.json +1 -1
- package/src/Identicon.ts +16 -8
- package/src/icons/{Polkadot.ts → Pezkuwi.ts} +5 -5
- package/src/icons/index.ts +2 -2
- package/src/packageInfo.ts +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
package/build/Identicon.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ interface Data {
|
|
|
8
8
|
iconSize: number;
|
|
9
9
|
isAlternativeIcon: boolean;
|
|
10
10
|
publicKey: string;
|
|
11
|
-
type: 'beachball' | 'empty' | 'jdenticon' | '
|
|
11
|
+
type: 'beachball' | 'empty' | 'jdenticon' | 'pezkuwi' | 'bizinikiwi';
|
|
12
12
|
}
|
|
13
13
|
export declare function encodeAccount(value: string | Uint8Array, prefix?: Prefix): Account;
|
|
14
14
|
/**
|
|
@@ -16,7 +16,7 @@ export declare function encodeAccount(value: string | Uint8Array, prefix?: Prefi
|
|
|
16
16
|
* @description The main Identicon component, taking a number of properties
|
|
17
17
|
* @example
|
|
18
18
|
* ```html
|
|
19
|
-
* <Identicon :size="128" :theme="
|
|
19
|
+
* <Identicon :size="128" :theme="pezkuwi" :value="..." />
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
22
|
export declare const Identicon: import("vue").DefineComponent<string[], {}, Data, {}, {
|
package/build/Identicon.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, h } from 'vue';
|
|
2
2
|
import { isHex, isU8a, u8aToHex } from '@pezkuwi/util';
|
|
3
3
|
import { decodeAddress, encodeAddress, isEthereumAddress } from '@pezkuwi/util-crypto';
|
|
4
|
-
import { Beachball, Empty, Jdenticon,
|
|
4
|
+
import { Beachball, Empty, Jdenticon, Pezkuwi } from './icons/index.js';
|
|
5
5
|
import { adaptVNodeAttrs } from './util.js';
|
|
6
6
|
const DEFAULT_SIZE = 64;
|
|
7
7
|
function resolvePublicKey(value, prefix) {
|
|
@@ -27,7 +27,7 @@ export function encodeAccount(value, prefix) {
|
|
|
27
27
|
* @description The main Identicon component, taking a number of properties
|
|
28
28
|
* @example
|
|
29
29
|
* ```html
|
|
30
|
-
* <Identicon :size="128" :theme="
|
|
30
|
+
* <Identicon :size="128" :theme="pezkuwi" :value="..." />
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
33
|
export const Identicon = defineComponent({
|
|
@@ -35,7 +35,7 @@ export const Identicon = defineComponent({
|
|
|
35
35
|
Beachball,
|
|
36
36
|
Empty,
|
|
37
37
|
Jdenticon,
|
|
38
|
-
|
|
38
|
+
Pezkuwi
|
|
39
39
|
},
|
|
40
40
|
created: function () {
|
|
41
41
|
this.createData();
|
|
@@ -82,14 +82,20 @@ export const Identicon = defineComponent({
|
|
|
82
82
|
})
|
|
83
83
|
}, []);
|
|
84
84
|
}
|
|
85
|
-
else if (type === '
|
|
86
|
-
|
|
85
|
+
else if (type === 'bizinikiwi') {
|
|
86
|
+
return h(Jdenticon, {
|
|
87
|
+
...adaptVNodeAttrs({
|
|
88
|
+
key: address,
|
|
89
|
+
publicKey,
|
|
90
|
+
size: iconSize
|
|
91
|
+
})
|
|
92
|
+
}, []);
|
|
87
93
|
}
|
|
88
94
|
const cmp = type.charAt(0).toUpperCase() + type.slice(1);
|
|
89
|
-
if (['Beachball', '
|
|
95
|
+
if (['Beachball', 'Pezkuwi'].includes(cmp)) {
|
|
90
96
|
const component = cmp === 'Beachball'
|
|
91
97
|
? Beachball
|
|
92
|
-
:
|
|
98
|
+
: Pezkuwi;
|
|
93
99
|
return h(component, {
|
|
94
100
|
...adaptVNodeAttrs({
|
|
95
101
|
address,
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
});
|
|
209
209
|
return scheme.colors.map((_, i) => palette[scheme.colors[i < 18 ? (i + rot) % 18 : 18]]);
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function pezkuwiIcon(address, { isAlternative }) {
|
|
212
212
|
const xy = getCircleXY(isAlternative);
|
|
213
213
|
let colors;
|
|
214
214
|
try {
|
|
@@ -228,7 +228,6 @@
|
|
|
228
228
|
const { address, isAlternative, size } = this.$props;
|
|
229
229
|
return vue.h({
|
|
230
230
|
template: beachballIcon(address, {
|
|
231
|
-
isAlternative,
|
|
232
231
|
size
|
|
233
232
|
}).outerHTML
|
|
234
233
|
});
|
|
@@ -713,10 +712,7 @@
|
|
|
713
712
|
}
|
|
714
713
|
}
|
|
715
714
|
const SVG_CONSTANTS = {
|
|
716
|
-
P: "http://www.w3.org/2000/svg"
|
|
717
|
-
R: "width",
|
|
718
|
-
S: "height",
|
|
719
|
-
};
|
|
715
|
+
P: "http://www.w3.org/2000/svg"};
|
|
720
716
|
class SvgWriter {
|
|
721
717
|
constructor(iconSize) {
|
|
722
718
|
this.k = iconSize;
|
|
@@ -765,11 +761,11 @@
|
|
|
765
761
|
: { attrs: data };
|
|
766
762
|
}
|
|
767
763
|
|
|
768
|
-
const
|
|
764
|
+
const Pezkuwi = vue.defineComponent({
|
|
769
765
|
props: ['address', 'isAlternative', 'size'],
|
|
770
766
|
render() {
|
|
771
767
|
const { address, isAlternative, size } = this.$props;
|
|
772
|
-
const circles =
|
|
768
|
+
const circles = pezkuwiIcon(address, { isAlternative }).map(({ cx, cy, fill, r }) => vue.h('circle', { ...adaptVNodeAttrs({ cx, cy, fill, r }) }, []));
|
|
773
769
|
return vue.h('svg', {
|
|
774
770
|
...adaptVNodeAttrs({
|
|
775
771
|
height: size,
|
|
@@ -804,7 +800,7 @@
|
|
|
804
800
|
Beachball,
|
|
805
801
|
Empty,
|
|
806
802
|
Jdenticon,
|
|
807
|
-
|
|
803
|
+
Pezkuwi
|
|
808
804
|
},
|
|
809
805
|
created: function () {
|
|
810
806
|
this.createData();
|
|
@@ -851,14 +847,20 @@
|
|
|
851
847
|
})
|
|
852
848
|
}, []);
|
|
853
849
|
}
|
|
854
|
-
else if (type === '
|
|
855
|
-
|
|
850
|
+
else if (type === 'bizinikiwi') {
|
|
851
|
+
return vue.h(Jdenticon, {
|
|
852
|
+
...adaptVNodeAttrs({
|
|
853
|
+
key: address,
|
|
854
|
+
publicKey,
|
|
855
|
+
size: iconSize
|
|
856
|
+
})
|
|
857
|
+
}, []);
|
|
856
858
|
}
|
|
857
859
|
const cmp = type.charAt(0).toUpperCase() + type.slice(1);
|
|
858
|
-
if (['Beachball', '
|
|
860
|
+
if (['Beachball', 'Pezkuwi'].includes(cmp)) {
|
|
859
861
|
const component = cmp === 'Beachball'
|
|
860
862
|
? Beachball
|
|
861
|
-
:
|
|
863
|
+
: Pezkuwi;
|
|
862
864
|
return vue.h(component, {
|
|
863
865
|
...adaptVNodeAttrs({
|
|
864
866
|
address,
|
|
@@ -879,7 +881,7 @@
|
|
|
879
881
|
}
|
|
880
882
|
});
|
|
881
883
|
|
|
882
|
-
const packageInfo = { name: '@pezkuwi/vue-identicon', path: (({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-pezkuwi-vue-identicon.js', document.baseURI).href)) }) && (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-pezkuwi-vue-identicon.js', document.baseURI).href))) ? new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-pezkuwi-vue-identicon.js', document.baseURI).href))).pathname.substring(0, new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-pezkuwi-vue-identicon.js', document.baseURI).href))).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '3.
|
|
884
|
+
const packageInfo = { name: '@pezkuwi/vue-identicon', path: (({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('bundle-pezkuwi-vue-identicon.js', document.baseURI).href)) }) && (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('bundle-pezkuwi-vue-identicon.js', document.baseURI).href))) ? new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('bundle-pezkuwi-vue-identicon.js', document.baseURI).href))).pathname.substring(0, new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('bundle-pezkuwi-vue-identicon.js', document.baseURI).href))).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '3.17.0' };
|
|
883
885
|
|
|
884
886
|
exports.Identicon = Identicon;
|
|
885
887
|
exports.packageInfo = packageInfo;
|
package/build/cjs/Identicon.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ interface Data {
|
|
|
8
8
|
iconSize: number;
|
|
9
9
|
isAlternativeIcon: boolean;
|
|
10
10
|
publicKey: string;
|
|
11
|
-
type: 'beachball' | 'empty' | 'jdenticon' | '
|
|
11
|
+
type: 'beachball' | 'empty' | 'jdenticon' | 'pezkuwi' | 'bizinikiwi';
|
|
12
12
|
}
|
|
13
13
|
export declare function encodeAccount(value: string | Uint8Array, prefix?: Prefix): Account;
|
|
14
14
|
/**
|
|
@@ -16,7 +16,7 @@ export declare function encodeAccount(value: string | Uint8Array, prefix?: Prefi
|
|
|
16
16
|
* @description The main Identicon component, taking a number of properties
|
|
17
17
|
* @example
|
|
18
18
|
* ```html
|
|
19
|
-
* <Identicon :size="128" :theme="
|
|
19
|
+
* <Identicon :size="128" :theme="pezkuwi" :value="..." />
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
22
|
export declare const Identicon: import("vue").DefineComponent<string[], {}, Data, {}, {
|
package/build/cjs/Identicon.js
CHANGED
|
@@ -31,7 +31,7 @@ function encodeAccount(value, prefix) {
|
|
|
31
31
|
* @description The main Identicon component, taking a number of properties
|
|
32
32
|
* @example
|
|
33
33
|
* ```html
|
|
34
|
-
* <Identicon :size="128" :theme="
|
|
34
|
+
* <Identicon :size="128" :theme="pezkuwi" :value="..." />
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
37
|
exports.Identicon = (0, vue_1.defineComponent)({
|
|
@@ -39,7 +39,7 @@ exports.Identicon = (0, vue_1.defineComponent)({
|
|
|
39
39
|
Beachball: index_js_1.Beachball,
|
|
40
40
|
Empty: index_js_1.Empty,
|
|
41
41
|
Jdenticon: index_js_1.Jdenticon,
|
|
42
|
-
|
|
42
|
+
Pezkuwi: index_js_1.Pezkuwi
|
|
43
43
|
},
|
|
44
44
|
created: function () {
|
|
45
45
|
this.createData();
|
|
@@ -86,14 +86,20 @@ exports.Identicon = (0, vue_1.defineComponent)({
|
|
|
86
86
|
})
|
|
87
87
|
}, []);
|
|
88
88
|
}
|
|
89
|
-
else if (type === '
|
|
90
|
-
|
|
89
|
+
else if (type === 'bizinikiwi') {
|
|
90
|
+
return (0, vue_1.h)(index_js_1.Jdenticon, {
|
|
91
|
+
...(0, util_js_1.adaptVNodeAttrs)({
|
|
92
|
+
key: address,
|
|
93
|
+
publicKey,
|
|
94
|
+
size: iconSize
|
|
95
|
+
})
|
|
96
|
+
}, []);
|
|
91
97
|
}
|
|
92
98
|
const cmp = type.charAt(0).toUpperCase() + type.slice(1);
|
|
93
|
-
if (['Beachball', '
|
|
99
|
+
if (['Beachball', 'Pezkuwi'].includes(cmp)) {
|
|
94
100
|
const component = cmp === 'Beachball'
|
|
95
101
|
? index_js_1.Beachball
|
|
96
|
-
: index_js_1.
|
|
102
|
+
: index_js_1.Pezkuwi;
|
|
97
103
|
return (0, vue_1.h)(component, {
|
|
98
104
|
...(0, util_js_1.adaptVNodeAttrs)({
|
|
99
105
|
address,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @name
|
|
3
|
-
* @description The
|
|
2
|
+
* @name Pezkuwi
|
|
3
|
+
* @description The Pezkuwi default identicon
|
|
4
4
|
*/
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const Pezkuwi: import("vue").DefineComponent<Readonly<{
|
|
6
6
|
address?: any;
|
|
7
7
|
size?: any;
|
|
8
8
|
isAlternative?: any;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Pezkuwi = void 0;
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
const ui_shared_1 = require("@pezkuwi/ui-shared");
|
|
6
6
|
const util_js_1 = require("../util.js");
|
|
7
7
|
/**
|
|
8
|
-
* @name
|
|
9
|
-
* @description The
|
|
8
|
+
* @name Pezkuwi
|
|
9
|
+
* @description The Pezkuwi default identicon
|
|
10
10
|
*/
|
|
11
|
-
exports.
|
|
11
|
+
exports.Pezkuwi = (0, vue_1.defineComponent)({
|
|
12
12
|
props: ['address', 'isAlternative', 'size'],
|
|
13
13
|
render() {
|
|
14
14
|
const { address, isAlternative, size } = this.$props;
|
|
15
|
-
const circles = (0, ui_shared_1.
|
|
15
|
+
const circles = (0, ui_shared_1.pezkuwiIcon)(address, { isAlternative }).map(({ cx, cy, fill, r }) => (0, vue_1.h)('circle', { ...(0, util_js_1.adaptVNodeAttrs)({ cx, cy, fill, r }) }, []));
|
|
16
16
|
return (0, vue_1.h)('svg', {
|
|
17
17
|
...(0, util_js_1.adaptVNodeAttrs)({
|
|
18
18
|
height: size,
|
package/build/cjs/icons/index.js
CHANGED
|
@@ -4,4 +4,4 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
tslib_1.__exportStar(require("./Beachball.js"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./Empty.js"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./Jdenticon.js"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./
|
|
7
|
+
tslib_1.__exportStar(require("./Pezkuwi.js"), exports);
|
package/build/cjs/packageInfo.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.packageInfo = void 0;
|
|
4
|
-
exports.packageInfo = { name: '@pezkuwi/vue-identicon', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '3.
|
|
4
|
+
exports.packageInfo = { name: '@pezkuwi/vue-identicon', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '3.17.0' };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @name
|
|
3
|
-
* @description The
|
|
2
|
+
* @name Pezkuwi
|
|
3
|
+
* @description The Pezkuwi default identicon
|
|
4
4
|
*/
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const Pezkuwi: import("vue").DefineComponent<Readonly<{
|
|
6
6
|
address?: any;
|
|
7
7
|
size?: any;
|
|
8
8
|
isAlternative?: any;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent, h } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { pezkuwiIcon } from '@pezkuwi/ui-shared';
|
|
3
3
|
import { adaptVNodeAttrs } from '../util.js';
|
|
4
4
|
/**
|
|
5
|
-
* @name
|
|
6
|
-
* @description The
|
|
5
|
+
* @name Pezkuwi
|
|
6
|
+
* @description The Pezkuwi default identicon
|
|
7
7
|
*/
|
|
8
|
-
export const
|
|
8
|
+
export const Pezkuwi = defineComponent({
|
|
9
9
|
props: ['address', 'isAlternative', 'size'],
|
|
10
10
|
render() {
|
|
11
11
|
const { address, isAlternative, size } = this.$props;
|
|
12
|
-
const circles =
|
|
12
|
+
const circles = pezkuwiIcon(address, { isAlternative }).map(({ cx, cy, fill, r }) => h('circle', { ...adaptVNodeAttrs({ cx, cy, fill, r }) }, []));
|
|
13
13
|
return h('svg', {
|
|
14
14
|
...adaptVNodeAttrs({
|
|
15
15
|
height: size,
|
package/build/icons/index.d.ts
CHANGED
package/build/icons/index.js
CHANGED
package/build/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"./cjs/packageDetect.js"
|
|
19
19
|
],
|
|
20
20
|
"type": "module",
|
|
21
|
-
"version": "3.
|
|
21
|
+
"version": "3.17.0",
|
|
22
22
|
"main": "./cjs/index.js",
|
|
23
23
|
"module": "./index.js",
|
|
24
24
|
"types": "./index.d.ts",
|
|
@@ -109,18 +109,18 @@
|
|
|
109
109
|
"default": "./icons/Jdenticon.js"
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
|
-
"./icons/
|
|
112
|
+
"./icons/Pezkuwi": {
|
|
113
113
|
"module": {
|
|
114
|
-
"types": "./icons/
|
|
115
|
-
"default": "./icons/
|
|
114
|
+
"types": "./icons/Pezkuwi.d.ts",
|
|
115
|
+
"default": "./icons/Pezkuwi.js"
|
|
116
116
|
},
|
|
117
117
|
"require": {
|
|
118
|
-
"types": "./cjs/icons/
|
|
119
|
-
"default": "./cjs/icons/
|
|
118
|
+
"types": "./cjs/icons/Pezkuwi.d.ts",
|
|
119
|
+
"default": "./cjs/icons/Pezkuwi.js"
|
|
120
120
|
},
|
|
121
121
|
"default": {
|
|
122
|
-
"types": "./icons/
|
|
123
|
-
"default": "./icons/
|
|
122
|
+
"types": "./icons/Pezkuwi.d.ts",
|
|
123
|
+
"default": "./icons/Pezkuwi.js"
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
"./Identicon": {
|
package/build/packageInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageInfo = { name: '@pezkuwi/vue-identicon', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '3.
|
|
1
|
+
export const packageInfo = { name: '@pezkuwi/vue-identicon', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '3.17.0' };
|
package/build-tsc/Identicon.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ interface Data {
|
|
|
8
8
|
iconSize: number;
|
|
9
9
|
isAlternativeIcon: boolean;
|
|
10
10
|
publicKey: string;
|
|
11
|
-
type: 'beachball' | 'empty' | 'jdenticon' | '
|
|
11
|
+
type: 'beachball' | 'empty' | 'jdenticon' | 'pezkuwi' | 'bizinikiwi';
|
|
12
12
|
}
|
|
13
13
|
export declare function encodeAccount(value: string | Uint8Array, prefix?: Prefix): Account;
|
|
14
14
|
/**
|
|
@@ -16,7 +16,7 @@ export declare function encodeAccount(value: string | Uint8Array, prefix?: Prefi
|
|
|
16
16
|
* @description The main Identicon component, taking a number of properties
|
|
17
17
|
* @example
|
|
18
18
|
* ```html
|
|
19
|
-
* <Identicon :size="128" :theme="
|
|
19
|
+
* <Identicon :size="128" :theme="pezkuwi" :value="..." />
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
22
|
export declare const Identicon: import("vue").DefineComponent<string[], {}, Data, {}, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @name
|
|
3
|
-
* @description The
|
|
2
|
+
* @name Pezkuwi
|
|
3
|
+
* @description The Pezkuwi default identicon
|
|
4
4
|
*/
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const Pezkuwi: import("vue").DefineComponent<Readonly<{
|
|
6
6
|
address?: any;
|
|
7
7
|
size?: any;
|
|
8
8
|
isAlternative?: any;
|
|
@@ -31,7 +31,7 @@ function encodeAccount(value, prefix) {
|
|
|
31
31
|
* @description The main Identicon component, taking a number of properties
|
|
32
32
|
* @example
|
|
33
33
|
* ```html
|
|
34
|
-
* <Identicon :size="128" :theme="
|
|
34
|
+
* <Identicon :size="128" :theme="pezkuwi" :value="..." />
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
37
|
exports.Identicon = (0, vue_1.defineComponent)({
|
|
@@ -39,7 +39,7 @@ exports.Identicon = (0, vue_1.defineComponent)({
|
|
|
39
39
|
Beachball: index_js_1.Beachball,
|
|
40
40
|
Empty: index_js_1.Empty,
|
|
41
41
|
Jdenticon: index_js_1.Jdenticon,
|
|
42
|
-
|
|
42
|
+
Pezkuwi: index_js_1.Pezkuwi
|
|
43
43
|
},
|
|
44
44
|
created: function () {
|
|
45
45
|
this.createData();
|
|
@@ -86,14 +86,20 @@ exports.Identicon = (0, vue_1.defineComponent)({
|
|
|
86
86
|
})
|
|
87
87
|
}, []);
|
|
88
88
|
}
|
|
89
|
-
else if (type === '
|
|
90
|
-
|
|
89
|
+
else if (type === 'bizinikiwi') {
|
|
90
|
+
return (0, vue_1.h)(index_js_1.Jdenticon, {
|
|
91
|
+
...(0, util_js_1.adaptVNodeAttrs)({
|
|
92
|
+
key: address,
|
|
93
|
+
publicKey,
|
|
94
|
+
size: iconSize
|
|
95
|
+
})
|
|
96
|
+
}, []);
|
|
91
97
|
}
|
|
92
98
|
const cmp = type.charAt(0).toUpperCase() + type.slice(1);
|
|
93
|
-
if (['Beachball', '
|
|
99
|
+
if (['Beachball', 'Pezkuwi'].includes(cmp)) {
|
|
94
100
|
const component = cmp === 'Beachball'
|
|
95
101
|
? index_js_1.Beachball
|
|
96
|
-
: index_js_1.
|
|
102
|
+
: index_js_1.Pezkuwi;
|
|
97
103
|
return (0, vue_1.h)(component, {
|
|
98
104
|
...(0, util_js_1.adaptVNodeAttrs)({
|
|
99
105
|
address,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Pezkuwi = void 0;
|
|
4
4
|
const vue_1 = require("vue");
|
|
5
5
|
const ui_shared_1 = require("@pezkuwi/ui-shared");
|
|
6
6
|
const util_js_1 = require("../util.js");
|
|
7
7
|
/**
|
|
8
|
-
* @name
|
|
9
|
-
* @description The
|
|
8
|
+
* @name Pezkuwi
|
|
9
|
+
* @description The Pezkuwi default identicon
|
|
10
10
|
*/
|
|
11
|
-
exports.
|
|
11
|
+
exports.Pezkuwi = (0, vue_1.defineComponent)({
|
|
12
12
|
props: ['address', 'isAlternative', 'size'],
|
|
13
13
|
render() {
|
|
14
14
|
const { address, isAlternative, size } = this.$props;
|
|
15
|
-
const circles = (0, ui_shared_1.
|
|
15
|
+
const circles = (0, ui_shared_1.pezkuwiIcon)(address, { isAlternative }).map(({ cx, cy, fill, r }) => (0, vue_1.h)('circle', { ...(0, util_js_1.adaptVNodeAttrs)({ cx, cy, fill, r }) }, []));
|
|
16
16
|
return (0, vue_1.h)('svg', {
|
|
17
17
|
...(0, util_js_1.adaptVNodeAttrs)({
|
|
18
18
|
height: size,
|
|
@@ -4,4 +4,4 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
tslib_1.__exportStar(require("./Beachball.js"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./Empty.js"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./Jdenticon.js"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./
|
|
7
|
+
tslib_1.__exportStar(require("./Pezkuwi.js"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.packageInfo = void 0;
|
|
4
|
-
exports.packageInfo = { name: '@pezkuwi/vue-identicon', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '3.
|
|
4
|
+
exports.packageInfo = { name: '@pezkuwi/vue-identicon', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '3.17.0' };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, h } from 'vue';
|
|
2
2
|
import { isHex, isU8a, u8aToHex } from '@pezkuwi/util';
|
|
3
3
|
import { decodeAddress, encodeAddress, isEthereumAddress } from '@pezkuwi/util-crypto';
|
|
4
|
-
import { Beachball, Empty, Jdenticon,
|
|
4
|
+
import { Beachball, Empty, Jdenticon, Pezkuwi } from './icons/index.js';
|
|
5
5
|
import { adaptVNodeAttrs } from './util.js';
|
|
6
6
|
const DEFAULT_SIZE = 64;
|
|
7
7
|
function resolvePublicKey(value, prefix) {
|
|
@@ -27,7 +27,7 @@ export function encodeAccount(value, prefix) {
|
|
|
27
27
|
* @description The main Identicon component, taking a number of properties
|
|
28
28
|
* @example
|
|
29
29
|
* ```html
|
|
30
|
-
* <Identicon :size="128" :theme="
|
|
30
|
+
* <Identicon :size="128" :theme="pezkuwi" :value="..." />
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
33
|
export const Identicon = defineComponent({
|
|
@@ -35,7 +35,7 @@ export const Identicon = defineComponent({
|
|
|
35
35
|
Beachball,
|
|
36
36
|
Empty,
|
|
37
37
|
Jdenticon,
|
|
38
|
-
|
|
38
|
+
Pezkuwi
|
|
39
39
|
},
|
|
40
40
|
created: function () {
|
|
41
41
|
this.createData();
|
|
@@ -82,14 +82,20 @@ export const Identicon = defineComponent({
|
|
|
82
82
|
})
|
|
83
83
|
}, []);
|
|
84
84
|
}
|
|
85
|
-
else if (type === '
|
|
86
|
-
|
|
85
|
+
else if (type === 'bizinikiwi') {
|
|
86
|
+
return h(Jdenticon, {
|
|
87
|
+
...adaptVNodeAttrs({
|
|
88
|
+
key: address,
|
|
89
|
+
publicKey,
|
|
90
|
+
size: iconSize
|
|
91
|
+
})
|
|
92
|
+
}, []);
|
|
87
93
|
}
|
|
88
94
|
const cmp = type.charAt(0).toUpperCase() + type.slice(1);
|
|
89
|
-
if (['Beachball', '
|
|
95
|
+
if (['Beachball', 'Pezkuwi'].includes(cmp)) {
|
|
90
96
|
const component = cmp === 'Beachball'
|
|
91
97
|
? Beachball
|
|
92
|
-
:
|
|
98
|
+
: Pezkuwi;
|
|
93
99
|
return h(component, {
|
|
94
100
|
...adaptVNodeAttrs({
|
|
95
101
|
address,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { defineComponent, h } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { pezkuwiIcon } from '@pezkuwi/ui-shared';
|
|
3
3
|
import { adaptVNodeAttrs } from '../util.js';
|
|
4
4
|
/**
|
|
5
|
-
* @name
|
|
6
|
-
* @description The
|
|
5
|
+
* @name Pezkuwi
|
|
6
|
+
* @description The Pezkuwi default identicon
|
|
7
7
|
*/
|
|
8
|
-
export const
|
|
8
|
+
export const Pezkuwi = defineComponent({
|
|
9
9
|
props: ['address', 'isAlternative', 'size'],
|
|
10
10
|
render() {
|
|
11
11
|
const { address, isAlternative, size } = this.$props;
|
|
12
|
-
const circles =
|
|
12
|
+
const circles = pezkuwiIcon(address, { isAlternative }).map(({ cx, cy, fill, r }) => h('circle', { ...adaptVNodeAttrs({ cx, cy, fill, r }) }, []));
|
|
13
13
|
return h('svg', {
|
|
14
14
|
...adaptVNodeAttrs({
|
|
15
15
|
height: size,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageInfo = { name: '@pezkuwi/vue-identicon', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '3.
|
|
1
|
+
export const packageInfo = { name: '@pezkuwi/vue-identicon', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '3.17.0' };
|