@dicebear/adventurer-neutral 5.0.0-alpha.13 → 5.0.0-alpha.16
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/index.d.ts +0 -1
- package/lib/components/index.js +0 -1
- package/lib/core.js +2 -2
- package/lib/meta/components.js +0 -4
- package/lib/schema.js +0 -12
- package/lib/types.d.ts +0 -2
- package/lib/utils/getComponents.js +0 -8
- package/package.json +3 -3
- package/lib/components/features.d.ts +0 -2
- package/lib/components/features.js +0 -5
package/lib/components/index.js
CHANGED
package/lib/core.js
CHANGED
|
@@ -16,7 +16,7 @@ export const style = {
|
|
|
16
16
|
},
|
|
17
17
|
schema: schema,
|
|
18
18
|
create: ({ prng, options }) => {
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
19
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
20
20
|
onPreCreate({ prng, options, preview: false });
|
|
21
21
|
const components = getComponents({ prng, options });
|
|
22
22
|
const colors = getColors({ prng, options });
|
|
@@ -28,7 +28,7 @@ export const style = {
|
|
|
28
28
|
fill: 'none',
|
|
29
29
|
'shape-rendering': 'auto',
|
|
30
30
|
},
|
|
31
|
-
body: `<g transform="translate(-279 -322)">${(_b = (_a = components.eyes) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g><g transform="translate(-279 -322)">${(_d = (_c = components.eyebrows) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}</g><g transform="translate(-279 -322)">${(_f = (_e = components.mouth) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}</g><g transform="translate(-279 -322)">${(_h = (_g = components.
|
|
31
|
+
body: `<g transform="translate(-279 -322)">${(_b = (_a = components.eyes) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g><g transform="translate(-279 -322)">${(_d = (_c = components.eyebrows) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}</g><g transform="translate(-279 -322)">${(_f = (_e = components.mouth) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}</g><g transform="translate(-279 -322)">${(_h = (_g = components.glasses) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ''}</g>`,
|
|
32
32
|
};
|
|
33
33
|
},
|
|
34
34
|
preview: ({ prng, options, property }) => {
|
package/lib/meta/components.js
CHANGED
package/lib/schema.js
CHANGED
|
@@ -164,18 +164,6 @@ export const schema = {
|
|
|
164
164
|
['variant01'],
|
|
165
165
|
],
|
|
166
166
|
},
|
|
167
|
-
features: {
|
|
168
|
-
type: 'array',
|
|
169
|
-
items: { type: 'string', enum: ['blush', 'birthmark', 'freckles'] },
|
|
170
|
-
default: ['blush', 'birthmark', 'freckles'],
|
|
171
|
-
examples: [['blush'], ['birthmark'], ['freckles']],
|
|
172
|
-
},
|
|
173
|
-
featuresProbability: {
|
|
174
|
-
type: 'integer',
|
|
175
|
-
minimum: 0,
|
|
176
|
-
maximum: 100,
|
|
177
|
-
default: 5,
|
|
178
|
-
},
|
|
179
167
|
glasses: {
|
|
180
168
|
type: 'array',
|
|
181
169
|
items: {
|
package/lib/types.d.ts
CHANGED
|
@@ -2,8 +2,6 @@ export interface Options {
|
|
|
2
2
|
eyes?: ('variant26' | 'variant25' | 'variant24' | 'variant23' | 'variant22' | 'variant21' | 'variant20' | 'variant19' | 'variant18' | 'variant17' | 'variant16' | 'variant15' | 'variant14' | 'variant13' | 'variant12' | 'variant11' | 'variant10' | 'variant09' | 'variant08' | 'variant07' | 'variant06' | 'variant05' | 'variant04' | 'variant03' | 'variant02' | 'variant01')[];
|
|
3
3
|
eyebrows?: ('variant10' | 'variant09' | 'variant08' | 'variant07' | 'variant06' | 'variant05' | 'variant04' | 'variant03' | 'variant02' | 'variant01' | 'variant15' | 'variant14' | 'variant13' | 'variant12' | 'variant11')[];
|
|
4
4
|
mouth?: ('variant30' | 'variant29' | 'variant28' | 'variant27' | 'variant26' | 'variant25' | 'variant24' | 'variant23' | 'variant22' | 'variant21' | 'variant20' | 'variant19' | 'variant18' | 'variant17' | 'variant16' | 'variant15' | 'variant14' | 'variant13' | 'variant12' | 'variant11' | 'variant10' | 'variant09' | 'variant08' | 'variant07' | 'variant06' | 'variant05' | 'variant04' | 'variant03' | 'variant02' | 'variant01')[];
|
|
5
|
-
features?: ('blush' | 'birthmark' | 'freckles')[];
|
|
6
|
-
featuresProbability?: number;
|
|
7
5
|
glasses?: ('variant01' | 'variant02' | 'variant03' | 'variant04' | 'variant05')[];
|
|
8
6
|
glassesProbability?: number;
|
|
9
7
|
backgroundColor?: string[];
|
|
@@ -15,11 +15,6 @@ export function getComponents({ prng, options, }) {
|
|
|
15
15
|
group: 'mouth',
|
|
16
16
|
values: options.mouth,
|
|
17
17
|
});
|
|
18
|
-
const featuresComponent = pickComponent({
|
|
19
|
-
prng,
|
|
20
|
-
group: 'features',
|
|
21
|
-
values: options.features,
|
|
22
|
-
});
|
|
23
18
|
const glassesComponent = pickComponent({
|
|
24
19
|
prng,
|
|
25
20
|
group: 'glasses',
|
|
@@ -29,9 +24,6 @@ export function getComponents({ prng, options, }) {
|
|
|
29
24
|
eyes: eyesComponent,
|
|
30
25
|
eyebrows: eyebrowsComponent,
|
|
31
26
|
mouth: mouthComponent,
|
|
32
|
-
features: prng.bool(options.featuresProbability)
|
|
33
|
-
? featuresComponent
|
|
34
|
-
: undefined,
|
|
35
27
|
glasses: prng.bool(options.glassesProbability)
|
|
36
28
|
? glassesComponent
|
|
37
29
|
: undefined,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dicebear/adventurer-neutral",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.16",
|
|
4
4
|
"description": "Avatar style for DiceBear",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dicebear"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"test": "uvu tests"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@dicebear/core": "^5.0.0-alpha.
|
|
31
|
+
"@dicebear/core": "^5.0.0-alpha.16",
|
|
32
32
|
"@tsconfig/recommended": "^1.0.0",
|
|
33
33
|
"@types/jest": "^26.0.22",
|
|
34
34
|
"del-cli": "^4.0.1",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "149a4a22c3a4d48dd5552bd22a49db0f853e0b5e"
|
|
48
48
|
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export const features = {
|
|
2
|
-
blush: (components, colors) => `<path d="M630.35 552.39c16.3-3.73 33.88 3.26 42.95 17.32 10.02 14.9 8.65 35.85-3.36 49.25-12.24 14.36-34.25 18.02-50.57 8.65-13.03-7.21-21.33-21.71-20.78-36.62.27-18.28 13.89-34.76 31.76-38.6ZM373.13 564.86c13.96 8.6 20.73 26.53 15.96 42.21-2.18 7.66-6.83 14.23-12.93 19.29-5.35-5.15-10.7-10.39-15.38-16.16-7.4-8.33-13.6-18.04-19.57-27.43-3.4-5.87-6.82-11.21-8.9-17.61 12.17-7.8 28.64-8.34 40.82-.3Z" fill="#CA8D87"/>`,
|
|
3
|
-
birthmark: (components, colors) => `<path d="M604.38 568.39c4.02-2.4 9.46-.07 11.04 4.17 1.82 4.48-1.82 9.9-6.54 10.3a7.84 7.84 0 0 1-7.93-4.87 7.77 7.77 0 0 1 3.43-9.6Z" fill="#000"/>`,
|
|
4
|
-
freckles: (components, colors) => `<path d="M611.4 569.4c4.47-2.79 10.3 1.44 8.72 6.61-1.2 4.45-7.29 5.28-10.04 1.88a5.9 5.9 0 0 1 1.32-8.5ZM337.13 571.05c2.3-1.37 5.7-.62 7.42 1.38 2.89 3 .97 9.58-3.67 9.25-2.08-1.79-3.5-4.39-4.56-6.89-.66-1.64-.8-2.69.81-3.74ZM650.49 571.6c1.29-.7 3-.54 4.37-.28 3.44.73 5.39 5.09 3.56 8.13a5.7 5.7 0 0 1-8.09 2.2c-3.8-2.11-3.65-8 .16-10.05ZM372.19 574.15c3.97-2.27 9.5 1.12 8.66 5.85-.35 4.68-6.05 6.3-9.42 3.56-3.03-2.48-2.53-7.38.76-9.4ZM632.5 591.63c4.17-1.54 8.85 1.79 8 6.42-.71 4.93-7.11 6.27-10.11 2.55-2.56-3-1.25-7.27 2.11-8.97ZM358.04 593.8c3.69.36 6.33 4.5 4.7 7.95-1.18 2.54-3.22 3.14-5.73 3.85-1.61-2.2-3.7-4.28-4.86-6.75-.82-3.21 3.02-5.68 5.9-5.05Z" fill="#7A624E"/>`,
|
|
5
|
-
};
|