@dicebear/personas 5.0.0-alpha.8 → 5.0.0-beta.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/LICENSE +1 -1
- package/README.md +3 -3
- package/lib/components/body.d.ts +8 -0
- package/lib/components/body.js +13 -0
- package/lib/components/eyes.d.ts +8 -0
- package/lib/components/eyes.js +14 -0
- package/lib/components/facialHair.d.ts +8 -0
- package/lib/components/facialHair.js +15 -0
- package/lib/components/hair.d.ts +8 -0
- package/lib/components/hair.js +29 -0
- package/lib/components/index.d.ts +12 -0
- package/lib/components/index.js +12 -0
- package/lib/components/mouth.d.ts +8 -0
- package/lib/components/mouth.js +15 -0
- package/lib/components/nose.d.ts +8 -0
- package/lib/components/nose.js +11 -0
- package/lib/core.d.ts +9 -0
- package/lib/core.js +40 -0
- package/lib/hooks/onPostCreate.d.ts +16 -0
- package/lib/hooks/onPostCreate.js +9 -0
- package/lib/hooks/onPreCreate.d.ts +14 -0
- package/lib/hooks/onPreCreate.js +9 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +20 -0
- package/lib/schema.d.ts +8 -0
- package/lib/schema.js +218 -0
- package/lib/types.d.ts +27 -0
- package/lib/types.js +7 -0
- package/lib/utils/getColors.d.ts +14 -0
- package/lib/utils/getColors.js +15 -0
- package/lib/utils/getComponents.d.ts +14 -0
- package/lib/utils/getComponents.js +48 -0
- package/lib/utils/pickComponent.d.ts +15 -0
- package/lib/utils/pickComponent.js +20 -0
- package/package.json +19 -28
- package/dist/index.d.ts +0 -20
- package/dist/index.d.ts.map +0 -1
- package/dist/index.es.js +0 -392
- package/dist/index.es.js.map +0 -1
- package/dist/index.js +0 -396
- package/dist/index.js.map +0 -1
package/lib/schema.js
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
3
|
+
*
|
|
4
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc/%40dicebear%2Fpersonas?node-id=1%3A169
|
|
6
|
+
*/
|
|
7
|
+
export const schema = {
|
|
8
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
9
|
+
"properties": {
|
|
10
|
+
"body": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": [
|
|
15
|
+
"squared",
|
|
16
|
+
"rounded",
|
|
17
|
+
"small",
|
|
18
|
+
"checkered"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"default": [
|
|
22
|
+
"squared",
|
|
23
|
+
"rounded",
|
|
24
|
+
"small",
|
|
25
|
+
"checkered"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"clothingColor": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^[a-fA-F0-9]{6}$"
|
|
33
|
+
},
|
|
34
|
+
"default": [
|
|
35
|
+
"456dff",
|
|
36
|
+
"54d7c7",
|
|
37
|
+
"7555ca",
|
|
38
|
+
"6dbb58",
|
|
39
|
+
"e24553",
|
|
40
|
+
"f3b63a",
|
|
41
|
+
"f55d81"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"eyes": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"enum": [
|
|
49
|
+
"open",
|
|
50
|
+
"sleep",
|
|
51
|
+
"wink",
|
|
52
|
+
"glasses",
|
|
53
|
+
"happy",
|
|
54
|
+
"sunglasses"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"default": [
|
|
58
|
+
"open",
|
|
59
|
+
"sleep",
|
|
60
|
+
"wink",
|
|
61
|
+
"glasses",
|
|
62
|
+
"happy",
|
|
63
|
+
"sunglasses"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"facialHair": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"items": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": [
|
|
71
|
+
"beardMustache",
|
|
72
|
+
"pyramid",
|
|
73
|
+
"walrus",
|
|
74
|
+
"goatee",
|
|
75
|
+
"shadow",
|
|
76
|
+
"soulPatch"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"default": [
|
|
80
|
+
"beardMustache",
|
|
81
|
+
"pyramid",
|
|
82
|
+
"walrus",
|
|
83
|
+
"goatee",
|
|
84
|
+
"shadow",
|
|
85
|
+
"soulPatch"
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
"facialHairProbability": {
|
|
89
|
+
"type": "integer",
|
|
90
|
+
"minimum": 0,
|
|
91
|
+
"maximum": 100,
|
|
92
|
+
"default": 10
|
|
93
|
+
},
|
|
94
|
+
"hair": {
|
|
95
|
+
"type": "array",
|
|
96
|
+
"items": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"enum": [
|
|
99
|
+
"long",
|
|
100
|
+
"sideShave",
|
|
101
|
+
"shortCombover",
|
|
102
|
+
"curlyHighTop",
|
|
103
|
+
"bobCut",
|
|
104
|
+
"curly",
|
|
105
|
+
"pigtails",
|
|
106
|
+
"curlyBun",
|
|
107
|
+
"buzzcut",
|
|
108
|
+
"bobBangs",
|
|
109
|
+
"bald",
|
|
110
|
+
"balding",
|
|
111
|
+
"cap",
|
|
112
|
+
"bunUndercut",
|
|
113
|
+
"fade",
|
|
114
|
+
"beanie",
|
|
115
|
+
"straightBun",
|
|
116
|
+
"extraLong",
|
|
117
|
+
"shortComboverChops",
|
|
118
|
+
"mohawk"
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
"default": [
|
|
122
|
+
"long",
|
|
123
|
+
"sideShave",
|
|
124
|
+
"shortCombover",
|
|
125
|
+
"curlyHighTop",
|
|
126
|
+
"bobCut",
|
|
127
|
+
"curly",
|
|
128
|
+
"pigtails",
|
|
129
|
+
"curlyBun",
|
|
130
|
+
"buzzcut",
|
|
131
|
+
"bobBangs",
|
|
132
|
+
"bald",
|
|
133
|
+
"balding",
|
|
134
|
+
"cap",
|
|
135
|
+
"bunUndercut",
|
|
136
|
+
"fade",
|
|
137
|
+
"beanie",
|
|
138
|
+
"straightBun",
|
|
139
|
+
"extraLong",
|
|
140
|
+
"shortComboverChops",
|
|
141
|
+
"mohawk"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"hairColor": {
|
|
145
|
+
"type": "array",
|
|
146
|
+
"items": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"pattern": "^[a-fA-F0-9]{6}$"
|
|
149
|
+
},
|
|
150
|
+
"default": [
|
|
151
|
+
"362c47",
|
|
152
|
+
"6c4545",
|
|
153
|
+
"e15c66",
|
|
154
|
+
"e16381",
|
|
155
|
+
"f27d65",
|
|
156
|
+
"f29c65",
|
|
157
|
+
"dee1f5"
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"mouth": {
|
|
161
|
+
"type": "array",
|
|
162
|
+
"items": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"enum": [
|
|
165
|
+
"smile",
|
|
166
|
+
"frown",
|
|
167
|
+
"surprise",
|
|
168
|
+
"pacifier",
|
|
169
|
+
"bigSmile",
|
|
170
|
+
"smirk",
|
|
171
|
+
"lips"
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"default": [
|
|
175
|
+
"smile",
|
|
176
|
+
"frown",
|
|
177
|
+
"surprise",
|
|
178
|
+
"pacifier",
|
|
179
|
+
"bigSmile",
|
|
180
|
+
"smirk",
|
|
181
|
+
"lips"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"nose": {
|
|
185
|
+
"type": "array",
|
|
186
|
+
"items": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"enum": [
|
|
189
|
+
"mediumRound",
|
|
190
|
+
"smallRound",
|
|
191
|
+
"wrinkles"
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"default": [
|
|
195
|
+
"mediumRound",
|
|
196
|
+
"smallRound",
|
|
197
|
+
"wrinkles"
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
"skinColor": {
|
|
201
|
+
"type": "array",
|
|
202
|
+
"items": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"pattern": "^[a-fA-F0-9]{6}$"
|
|
205
|
+
},
|
|
206
|
+
"default": [
|
|
207
|
+
"eeb4a4",
|
|
208
|
+
"e7a391",
|
|
209
|
+
"e5a07e",
|
|
210
|
+
"d78774",
|
|
211
|
+
"b16a5b",
|
|
212
|
+
"92594b",
|
|
213
|
+
"623d36",
|
|
214
|
+
"c9e6dc"
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
};
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
3
|
+
*
|
|
4
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc/%40dicebear%2Fpersonas?node-id=1%3A169
|
|
6
|
+
*/
|
|
7
|
+
export interface Options {
|
|
8
|
+
eyes?: ('open' | 'sleep' | 'wink' | 'glasses' | 'happy' | 'sunglasses')[];
|
|
9
|
+
hair?: ('long' | 'sideShave' | 'shortCombover' | 'curlyHighTop' | 'bobCut' | 'curly' | 'pigtails' | 'curlyBun' | 'buzzcut' | 'bobBangs' | 'bald' | 'balding' | 'cap' | 'bunUndercut' | 'fade' | 'beanie' | 'straightBun' | 'extraLong' | 'shortComboverChops' | 'mohawk')[];
|
|
10
|
+
body?: ('squared' | 'rounded' | 'small' | 'checkered')[];
|
|
11
|
+
mouth?: ('smile' | 'frown' | 'surprise' | 'pacifier' | 'bigSmile' | 'smirk' | 'lips')[];
|
|
12
|
+
nose?: ('mediumRound' | 'smallRound' | 'wrinkles')[];
|
|
13
|
+
facialHair?: ('beardMustache' | 'pyramid' | 'walrus' | 'goatee' | 'shadow' | 'soulPatch')[];
|
|
14
|
+
facialHairProbability?: number;
|
|
15
|
+
hairColor?: string[];
|
|
16
|
+
clothingColor?: string[];
|
|
17
|
+
skinColor?: string[];
|
|
18
|
+
}
|
|
19
|
+
export declare type ColorPickCollection = Record<string, string>;
|
|
20
|
+
export declare type ComponentGroup = Record<string, ComponentGroupItem>;
|
|
21
|
+
export declare type ComponentGroupCollection = Record<string, ComponentGroup>;
|
|
22
|
+
export declare type ComponentGroupItem = (components: ComponentPickCollection, colors: ColorPickCollection) => string;
|
|
23
|
+
export declare type ComponentPickCollection = Record<string, ComponentPick>;
|
|
24
|
+
export declare type ComponentPick = {
|
|
25
|
+
name: string;
|
|
26
|
+
value: ComponentGroupItem;
|
|
27
|
+
} | undefined;
|
package/lib/types.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
3
|
+
*
|
|
4
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc/%40dicebear%2Fpersonas?node-id=1%3A169
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
3
|
+
*
|
|
4
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc/%40dicebear%2Fpersonas?node-id=1%3A169
|
|
6
|
+
*/
|
|
7
|
+
import type { Prng } from '@dicebear/core';
|
|
8
|
+
import type { Options, ColorPickCollection } from '../types.js';
|
|
9
|
+
declare type Props = {
|
|
10
|
+
prng: Prng;
|
|
11
|
+
options: Options;
|
|
12
|
+
};
|
|
13
|
+
export declare function getColors({ prng, options }: Props): ColorPickCollection;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
3
|
+
*
|
|
4
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc/%40dicebear%2Fpersonas?node-id=1%3A169
|
|
6
|
+
*/
|
|
7
|
+
export function getColors({ prng, options }) {
|
|
8
|
+
var _a, _b, _c, _d, _e, _f;
|
|
9
|
+
return {
|
|
10
|
+
'hair': (_b = prng.pick((_a = options.hairColor) !== null && _a !== void 0 ? _a : [])) !== null && _b !== void 0 ? _b : 'transparent',
|
|
11
|
+
'clothing': (_d = prng.pick((_c = options.clothingColor) !== null && _c !== void 0 ? _c : [])) !== null && _d !== void 0 ? _d : 'transparent',
|
|
12
|
+
'skin': (_f = prng.pick((_e = options.skinColor) !== null && _e !== void 0 ? _e : [])) !== null && _f !== void 0 ? _f : 'transparent',
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
3
|
+
*
|
|
4
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc/%40dicebear%2Fpersonas?node-id=1%3A169
|
|
6
|
+
*/
|
|
7
|
+
import type { Prng } from '@dicebear/core';
|
|
8
|
+
import type { Options, ComponentPickCollection } from '../types.js';
|
|
9
|
+
declare type Props = {
|
|
10
|
+
prng: Prng;
|
|
11
|
+
options: Options;
|
|
12
|
+
};
|
|
13
|
+
export declare function getComponents({ prng, options }: Props): ComponentPickCollection;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
3
|
+
*
|
|
4
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc/%40dicebear%2Fpersonas?node-id=1%3A169
|
|
6
|
+
*/
|
|
7
|
+
import { pickComponent } from './pickComponent.js';
|
|
8
|
+
export function getComponents({ prng, options }) {
|
|
9
|
+
const eyesComponent = pickComponent({
|
|
10
|
+
prng,
|
|
11
|
+
group: 'eyes',
|
|
12
|
+
values: options.eyes
|
|
13
|
+
});
|
|
14
|
+
const hairComponent = pickComponent({
|
|
15
|
+
prng,
|
|
16
|
+
group: 'hair',
|
|
17
|
+
values: options.hair
|
|
18
|
+
});
|
|
19
|
+
const bodyComponent = pickComponent({
|
|
20
|
+
prng,
|
|
21
|
+
group: 'body',
|
|
22
|
+
values: options.body
|
|
23
|
+
});
|
|
24
|
+
const mouthComponent = pickComponent({
|
|
25
|
+
prng,
|
|
26
|
+
group: 'mouth',
|
|
27
|
+
values: options.mouth
|
|
28
|
+
});
|
|
29
|
+
const noseComponent = pickComponent({
|
|
30
|
+
prng,
|
|
31
|
+
group: 'nose',
|
|
32
|
+
values: options.nose
|
|
33
|
+
});
|
|
34
|
+
const facialHairComponent = pickComponent({
|
|
35
|
+
prng,
|
|
36
|
+
group: 'facialHair',
|
|
37
|
+
values: options.facialHair
|
|
38
|
+
});
|
|
39
|
+
return {
|
|
40
|
+
'eyes': eyesComponent,
|
|
41
|
+
'hair': hairComponent,
|
|
42
|
+
'body': bodyComponent,
|
|
43
|
+
'mouth': mouthComponent,
|
|
44
|
+
'nose': noseComponent,
|
|
45
|
+
'facialHair': prng.bool(options.facialHairProbability) ? facialHairComponent : undefined,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
3
|
+
*
|
|
4
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc/%40dicebear%2Fpersonas?node-id=1%3A169
|
|
6
|
+
*/
|
|
7
|
+
import type { Prng } from '@dicebear/core';
|
|
8
|
+
import type { ComponentPick } from '../types.js';
|
|
9
|
+
declare type Props = {
|
|
10
|
+
prng: Prng;
|
|
11
|
+
group: string;
|
|
12
|
+
values?: string[];
|
|
13
|
+
};
|
|
14
|
+
export declare function pickComponent({ prng, group, values }: Props): ComponentPick;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
3
|
+
*
|
|
4
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc/%40dicebear%2Fpersonas?node-id=1%3A169
|
|
6
|
+
*/
|
|
7
|
+
import * as components from '../components/index.js';
|
|
8
|
+
export function pickComponent({ prng, group, values = [] }) {
|
|
9
|
+
const componentCollection = components;
|
|
10
|
+
const key = prng.pick(values);
|
|
11
|
+
if (key && componentCollection[group][key]) {
|
|
12
|
+
return {
|
|
13
|
+
name: key,
|
|
14
|
+
value: componentCollection[group][key],
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dicebear/personas",
|
|
3
|
-
"version": "5.0.0-
|
|
3
|
+
"version": "5.0.0-beta.0",
|
|
4
4
|
"description": "Avatar style for DiceBear",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dicebear"
|
|
@@ -13,44 +13,35 @@
|
|
|
13
13
|
"url": "git+https://github.com/dicebear/dicebear.git"
|
|
14
14
|
},
|
|
15
15
|
"license": "MIT",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"module": "dist/index.es.js",
|
|
20
|
-
"types": "dist/index.d.ts",
|
|
16
|
+
"type": "module",
|
|
17
|
+
"exports": "./lib/index.js",
|
|
18
|
+
"types": "./lib/index.d.ts",
|
|
21
19
|
"files": [
|
|
22
20
|
"LICENSE",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
21
|
+
"lib",
|
|
22
|
+
"README.md"
|
|
25
23
|
],
|
|
26
24
|
"scripts": {
|
|
27
|
-
"
|
|
25
|
+
"prebuild": "del-cli lib",
|
|
26
|
+
"build": "tsc",
|
|
28
27
|
"prepublishOnly": "npm run build",
|
|
29
|
-
"
|
|
30
|
-
"build": "npm-run-all build:*",
|
|
31
|
-
"build:schema": "json2ts src/schema.json src/options.ts",
|
|
32
|
-
"build:parcel": "parcel build"
|
|
28
|
+
"test": "uvu tests"
|
|
33
29
|
},
|
|
34
30
|
"devDependencies": {
|
|
35
|
-
"@dicebear/core": "^5.0.0-
|
|
36
|
-
"@
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"@types/node": "^10.11.6",
|
|
41
|
-
"jest": "^26.6.3",
|
|
42
|
-
"json-schema-to-typescript": "^10.1.5",
|
|
43
|
-
"npm-run-all": "^4.1.5",
|
|
44
|
-
"parcel": "^2.0.1",
|
|
45
|
-
"shx": "^0.3.3",
|
|
46
|
-
"ts-jest": "^26.5.4",
|
|
47
|
-
"typescript": "^4.5.2"
|
|
31
|
+
"@dicebear/core": "^5.0.0-beta.0",
|
|
32
|
+
"@tsconfig/recommended": "^1.0.1",
|
|
33
|
+
"del-cli": "^4.0.1",
|
|
34
|
+
"typescript": "^4.6.3",
|
|
35
|
+
"uvu": "^0.5.3"
|
|
48
36
|
},
|
|
49
37
|
"peerDependencies": {
|
|
50
|
-
"@dicebear/core": "^5.0.0-alpha.
|
|
38
|
+
"@dicebear/core": "^5.0.0-alpha.32"
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": "^14.13.1 || >=16.0.0"
|
|
51
42
|
},
|
|
52
43
|
"publishConfig": {
|
|
53
44
|
"access": "public"
|
|
54
45
|
},
|
|
55
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "f939afabe6ade034e344b1983caa21de49873dda"
|
|
56
47
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was automatically generated by json-schema-to-typescript.
|
|
3
|
-
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
4
|
-
* and run json-schema-to-typescript to regenerate this file.
|
|
5
|
-
*/
|
|
6
|
-
export interface Options {
|
|
7
|
-
body?: ("squared" | "rounded" | "small" | "checkered")[];
|
|
8
|
-
clothingColor?: (string | ("blue" | "turquoise" | "purple" | "green" | "red" | "yellow" | "pink"))[];
|
|
9
|
-
eyes?: ("open" | "sleep" | "wink" | "glasses" | "happy" | "sunglasses")[];
|
|
10
|
-
facialHair?: ("beardMustache" | "pyramid" | "walrus" | "goatee" | "shadow" | "soulPatch")[];
|
|
11
|
-
facialHairProbability?: number;
|
|
12
|
-
hair?: ("long" | "sideShave" | "shortCombover" | "curlyHighTop" | "bobCut" | "curly" | "pigtails" | "curlyBun" | "buzzcut" | "bobBangs" | "bald" | "balding" | "cap" | "bunUndercut" | "fade" | "beanie" | "straightBun" | "extraLong" | "shortComboverChops" | "mohawk")[];
|
|
13
|
-
hairColor?: (string | ("black" | "brunette" | "red" | "pink" | "copper" | "blonde" | "grey"))[];
|
|
14
|
-
mouth?: ("smile" | "frown" | "surprise" | "pacifier" | "bigSmile" | "smirk" | "lips")[];
|
|
15
|
-
nose?: ("mediumRound" | "smallRound" | "wrinkles")[];
|
|
16
|
-
skinColor?: (string | ("tone1" | "tone2" | "tone3" | "tone4" | "tone5" | "tone6" | "tone7" | "tone8"))[];
|
|
17
|
-
}
|
|
18
|
-
export const create: import("@dicebear/core").StyleCreate<import("options").Options>, preview: import("@dicebear/core").StylePreview<import("options").Options> | undefined, meta: import("@dicebear/core").StyleMeta, schema: import("json-schema").JSONSchema7;
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AACA;;;;GAIG;AAEH;IACE,IAAI,CAAC,EAAE,CAAC,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC,EAAE,CAAC;IACzD,aAAa,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC;IACrG,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,CAAC,EAAE,CAAC;IAC1E,UAAU,CAAC,EAAE,CAAC,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC,EAAE,CAAC;IAC5F,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,IAAI,CAAC,EAAE,CACH,MAAM,GACN,WAAW,GACX,eAAe,GACf,cAAc,GACd,QAAQ,GACR,OAAO,GACP,UAAU,GACV,UAAU,GACV,SAAS,GACT,UAAU,GACV,MAAM,GACN,SAAS,GACT,KAAK,GACL,aAAa,GACb,MAAM,GACN,QAAQ,GACR,aAAa,GACb,WAAW,GACX,oBAAoB,GACpB,QAAQ,CACX,EAAE,CAAC;IACJ,SAAS,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,OAAO,GAAG,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC,CAAC,EAAE,CAAC;IAChG,KAAK,CAAC,EAAE,CAAC,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC;IACxF,IAAI,CAAC,EAAE,CAAC,aAAa,GAAG,YAAY,GAAG,UAAU,CAAC,EAAE,CAAC;IACrD,SAAS,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;CAC1G;AqB1BD,OAAA,yPAA+C,CAAC","sources":["packages/@dicebear/personas/src/src/options.ts","packages/@dicebear/personas/src/src/static-types.ts","packages/@dicebear/personas/src/src/components/eyes.ts","packages/@dicebear/personas/src/src/components/hair.ts","packages/@dicebear/personas/src/src/components/body.ts","packages/@dicebear/personas/src/src/components/mouth.ts","packages/@dicebear/personas/src/src/components/nose.ts","packages/@dicebear/personas/src/src/components/facialHair.ts","packages/@dicebear/personas/src/src/components/index.ts","packages/@dicebear/personas/src/src/utils/pickComponent.ts","packages/@dicebear/personas/src/src/utils/getComponents.ts","packages/@dicebear/personas/src/src/colors/hair.ts","packages/@dicebear/personas/src/src/colors/clothing.ts","packages/@dicebear/personas/src/src/colors/skin.ts","packages/@dicebear/personas/src/src/colors/index.ts","packages/@dicebear/personas/src/src/utils/pickColor.ts","packages/@dicebear/personas/src/src/utils/getColors.ts","packages/@dicebear/personas/src/src/hooks/onPreCreate.ts","packages/@dicebear/personas/src/src/hooks/onPostCreate.ts","packages/@dicebear/personas/src/src/meta/components.ts","packages/@dicebear/personas/src/src/core.ts","packages/@dicebear/personas/src/src/index.ts","packages/@dicebear/personas/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"/*!\n * Personas (@dicebear/personas)\n *\n * Code licensed under MIT License.\n * Copyright (c) 2021 Florian Körner\n *\n * Design \"Personas by Draftbit\" by Draftbit - draftbit.com licensed under CC BY 4.0.\n * Source: https://personas.draftbit.com/\n * License: https://creativecommons.org/licenses/by/4.0/\n */\n\nimport { style } from './core';\n\nconst { create, preview, meta, schema } = style;\n\nexport { create, preview, meta, schema };\nexport type { Options } from './options';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
|