@dicebear/big-ears 9.2.2 → 9.2.3
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/lib/components/cheek.js +6 -6
- package/lib/components/ear.js +8 -8
- package/lib/components/eyes.js +32 -32
- package/lib/components/face.js +10 -10
- package/lib/components/frontHair.js +12 -12
- package/lib/components/hair.js +40 -40
- package/lib/components/mouth.js +38 -38
- package/lib/components/nose.js +12 -12
- package/lib/components/sideburn.js +7 -7
- package/lib/index.js +1 -1
- package/lib/schema.js +434 -440
- package/lib/utils/getColors.js +2 -3
- package/lib/utils/getComponents.d.ts +1 -1
- package/lib/utils/getComponents.js +10 -11
- package/lib/utils/pickComponent.d.ts +1 -1
- package/lib/utils/pickComponent.js +1 -1
- package/package.json +6 -6
package/lib/utils/getColors.js
CHANGED
|
@@ -8,8 +8,7 @@ import { convertColor } from './convertColor.js';
|
|
|
8
8
|
export function getColors({ prng, options }) {
|
|
9
9
|
var _a, _b;
|
|
10
10
|
return {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
hair: convertColor(prng.pick((_a = options.hairColor) !== null && _a !== void 0 ? _a : [], 'transparent')),
|
|
12
|
+
skin: convertColor(prng.pick((_b = options.skinColor) !== null && _b !== void 0 ? _b : [], 'transparent')),
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* File: https://www.figma.com/file/KhTfMFWWniVgZmGVFL0KK6
|
|
6
6
|
*/
|
|
7
7
|
import { pickComponent } from './pickComponent.js';
|
|
8
|
-
export function getComponents({ prng, options }) {
|
|
8
|
+
export function getComponents({ prng, options, }) {
|
|
9
9
|
const hairComponent = pickComponent({
|
|
10
10
|
prng,
|
|
11
11
|
group: 'hair',
|
|
@@ -52,15 +52,14 @@ export function getComponents({ prng, options }) {
|
|
|
52
52
|
values: options.frontHair,
|
|
53
53
|
});
|
|
54
54
|
return {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
hair: hairComponent,
|
|
56
|
+
face: faceComponent,
|
|
57
|
+
mouth: mouthComponent,
|
|
58
|
+
ear: earComponent,
|
|
59
|
+
eyes: eyesComponent,
|
|
60
|
+
cheek: prng.bool(options.cheekProbability) ? cheekComponent : undefined,
|
|
61
|
+
nose: noseComponent,
|
|
62
|
+
sideburn: sideburnComponent,
|
|
63
|
+
frontHair: frontHairComponent,
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* File: https://www.figma.com/file/KhTfMFWWniVgZmGVFL0KK6
|
|
6
6
|
*/
|
|
7
7
|
import * as components from '../components/index.js';
|
|
8
|
-
export function pickComponent({ prng, group, values = [] }) {
|
|
8
|
+
export function pickComponent({ prng, group, values = [], }) {
|
|
9
9
|
const componentCollection = components;
|
|
10
10
|
const key = prng.pick(values);
|
|
11
11
|
if (key && componentCollection[group][key]) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dicebear/big-ears",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.3",
|
|
4
4
|
"description": "Avatar style for DiceBear",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dicebear"
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"test": "uvu tests"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@dicebear/core": "9.2.
|
|
33
|
-
"@tsconfig/recommended": "^1.0.
|
|
34
|
-
"del-cli": "^
|
|
35
|
-
"typescript": "^5.
|
|
32
|
+
"@dicebear/core": "9.2.3",
|
|
33
|
+
"@tsconfig/recommended": "^1.0.10",
|
|
34
|
+
"del-cli": "^6.0.0",
|
|
35
|
+
"typescript": "^5.8.3",
|
|
36
36
|
"uvu": "^0.5.6"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "8cfdc4d029c9de6a82fef4e27ed67b5e2cd14a30"
|
|
48
48
|
}
|