@dicebear/open-peeps 5.0.0-alpha.3 → 5.0.0-alpha.32

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.
Files changed (52) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/lib/components/accessories.d.ts +2 -0
  4. package/lib/components/accessories.js +10 -0
  5. package/lib/components/face.d.ts +2 -0
  6. package/lib/components/face.js +32 -0
  7. package/lib/components/facialHair.d.ts +2 -0
  8. package/lib/components/facialHair.js +19 -0
  9. package/lib/components/head.d.ts +2 -0
  10. package/lib/components/head.js +51 -0
  11. package/lib/components/index.d.ts +5 -0
  12. package/lib/components/index.js +5 -0
  13. package/lib/components/mask.d.ts +2 -0
  14. package/lib/components/mask.js +4 -0
  15. package/{dist → lib}/core.d.ts +3 -3
  16. package/lib/core.js +34 -0
  17. package/{dist → lib}/hooks/onPostCreate.d.ts +10 -12
  18. package/lib/hooks/onPostCreate.js +3 -0
  19. package/lib/hooks/onPreCreate.d.ts +8 -0
  20. package/lib/hooks/onPreCreate.js +3 -0
  21. package/lib/index.d.ts +3 -0
  22. package/lib/index.js +13 -0
  23. package/lib/schema.d.ts +2 -0
  24. package/lib/schema.js +431 -0
  25. package/lib/types.d.ts +25 -0
  26. package/lib/types.js +1 -0
  27. package/{dist → lib}/utils/getColors.d.ts +8 -9
  28. package/lib/utils/getColors.js +8 -0
  29. package/{dist → lib}/utils/getComponents.d.ts +8 -9
  30. package/lib/utils/getComponents.js +39 -0
  31. package/{dist → lib}/utils/pickComponent.d.ts +9 -9
  32. package/lib/utils/pickComponent.js +11 -0
  33. package/package.json +19 -23
  34. package/dist/colors/clothing.d.ts +0 -2
  35. package/dist/colors/hair.d.ts +0 -2
  36. package/dist/colors/index.d.ts +0 -3
  37. package/dist/colors/skin.d.ts +0 -2
  38. package/dist/components/accessories.d.ts +0 -2
  39. package/dist/components/face.d.ts +0 -2
  40. package/dist/components/facialHair.d.ts +0 -2
  41. package/dist/components/head.d.ts +0 -2
  42. package/dist/components/index.d.ts +0 -5
  43. package/dist/components/mask.d.ts +0 -2
  44. package/dist/hooks/onPreCreate.d.ts +0 -9
  45. package/dist/index.d.ts +0 -13
  46. package/dist/index.es.js +0 -780
  47. package/dist/index.js +0 -787
  48. package/dist/index.umd.js +0 -12
  49. package/dist/meta/components.d.ts +0 -4
  50. package/dist/options.d.ts +0 -18
  51. package/dist/static-types.d.ts +0 -16
  52. package/dist/utils/pickColor.d.ts +0 -9
package/lib/index.js ADDED
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Open Peeps (@dicebear/open-peeps)
3
+ *
4
+ * Code licensed under MIT License.
5
+ * Copyright (c) 2022 Florian Körner
6
+ *
7
+ * Design "Open Peeps" by Pablo Stanley licensed under CC0 1.0.
8
+ * Source: https://www.openpeeps.com/
9
+ * Homepage: https://twitter.com/pablostanley
10
+ * License: https://creativecommons.org/publicdomain/zero/1.0/
11
+ */ import { style } from './core.js';
12
+ const { create, meta, schema } = style;
13
+ export { create, meta, schema };
@@ -0,0 +1,2 @@
1
+ import type { StyleSchema } from '@dicebear/core';
2
+ export declare const schema: StyleSchema;
package/lib/schema.js ADDED
@@ -0,0 +1,431 @@
1
+ export const schema = {
2
+ title: 'Options',
3
+ $schema: 'http://json-schema.org/draft-07/schema#',
4
+ properties: {
5
+ accessories: {
6
+ type: 'array',
7
+ items: {
8
+ type: 'string',
9
+ enum: [
10
+ 'eyepatch',
11
+ 'glasses',
12
+ 'glasses2',
13
+ 'glasses3',
14
+ 'glasses4',
15
+ 'glasses5',
16
+ 'sunglasses',
17
+ 'sunglasses2',
18
+ ],
19
+ },
20
+ default: [
21
+ 'eyepatch',
22
+ 'glasses',
23
+ 'glasses2',
24
+ 'glasses3',
25
+ 'glasses4',
26
+ 'glasses5',
27
+ 'sunglasses',
28
+ 'sunglasses2',
29
+ ],
30
+ examples: [
31
+ ['eyepatch'],
32
+ ['glasses'],
33
+ ['glasses2'],
34
+ ['glasses3'],
35
+ ['glasses4'],
36
+ ['glasses5'],
37
+ ['sunglasses'],
38
+ ['sunglasses2'],
39
+ ],
40
+ },
41
+ accessoriesProbability: {
42
+ type: 'integer',
43
+ minimum: 0,
44
+ maximum: 100,
45
+ default: 20,
46
+ examples: [0, 100],
47
+ },
48
+ clothingColor: {
49
+ type: 'array',
50
+ items: {
51
+ type: 'string',
52
+ pattern: '^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$',
53
+ },
54
+ default: [
55
+ 'e78276',
56
+ 'ffcf77',
57
+ 'fdea6b',
58
+ '78e185',
59
+ '9ddadb',
60
+ '8fa7df',
61
+ 'e279c7',
62
+ ],
63
+ },
64
+ face: {
65
+ type: 'array',
66
+ items: {
67
+ type: 'string',
68
+ enum: [
69
+ 'angryWithFang',
70
+ 'awe',
71
+ 'blank',
72
+ 'calm',
73
+ 'cheeky',
74
+ 'concerned',
75
+ 'concernedFear',
76
+ 'contempt',
77
+ 'cute',
78
+ 'cyclops',
79
+ 'driven',
80
+ 'eatingHappy',
81
+ 'explaining',
82
+ 'eyesClosed',
83
+ 'fear',
84
+ 'hectic',
85
+ 'lovingGrin1',
86
+ 'lovingGrin2',
87
+ 'monster',
88
+ 'old',
89
+ 'rage',
90
+ 'serious',
91
+ 'smile',
92
+ 'smileBig',
93
+ 'smileLOL',
94
+ 'smileTeethGap',
95
+ 'solemn',
96
+ 'suspicious',
97
+ 'tired',
98
+ 'veryAngry',
99
+ ],
100
+ },
101
+ default: [
102
+ 'angryWithFang',
103
+ 'awe',
104
+ 'blank',
105
+ 'calm',
106
+ 'cheeky',
107
+ 'concerned',
108
+ 'concernedFear',
109
+ 'contempt',
110
+ 'cute',
111
+ 'cyclops',
112
+ 'driven',
113
+ 'eatingHappy',
114
+ 'explaining',
115
+ 'eyesClosed',
116
+ 'fear',
117
+ 'hectic',
118
+ 'lovingGrin1',
119
+ 'lovingGrin2',
120
+ 'monster',
121
+ 'old',
122
+ 'rage',
123
+ 'serious',
124
+ 'smile',
125
+ 'smileBig',
126
+ 'smileLOL',
127
+ 'smileTeethGap',
128
+ 'solemn',
129
+ 'suspicious',
130
+ 'tired',
131
+ 'veryAngry',
132
+ ],
133
+ examples: [
134
+ ['angryWithFang'],
135
+ ['awe'],
136
+ ['blank'],
137
+ ['calm'],
138
+ ['cheeky'],
139
+ ['concerned'],
140
+ ['concernedFear'],
141
+ ['contempt'],
142
+ ['cute'],
143
+ ['cyclops'],
144
+ ['driven'],
145
+ ['eatingHappy'],
146
+ ['explaining'],
147
+ ['eyesClosed'],
148
+ ['fear'],
149
+ ['hectic'],
150
+ ['lovingGrin1'],
151
+ ['lovingGrin2'],
152
+ ['monster'],
153
+ ['old'],
154
+ ['rage'],
155
+ ['serious'],
156
+ ['smile'],
157
+ ['smileBig'],
158
+ ['smileLOL'],
159
+ ['smileTeethGap'],
160
+ ['solemn'],
161
+ ['suspicious'],
162
+ ['tired'],
163
+ ['veryAngry'],
164
+ ],
165
+ },
166
+ facialHair: {
167
+ type: 'array',
168
+ items: {
169
+ type: 'string',
170
+ enum: [
171
+ 'chin',
172
+ 'full',
173
+ 'full2',
174
+ 'full3',
175
+ 'full4',
176
+ 'goatee1',
177
+ 'goatee2',
178
+ 'moustache1',
179
+ 'moustache2',
180
+ 'moustache3',
181
+ 'moustache4',
182
+ 'moustache5',
183
+ 'moustache6',
184
+ 'moustache7',
185
+ 'moustache8',
186
+ 'moustache9',
187
+ ],
188
+ },
189
+ default: [
190
+ 'chin',
191
+ 'full',
192
+ 'full2',
193
+ 'full3',
194
+ 'full4',
195
+ 'goatee1',
196
+ 'goatee2',
197
+ 'moustache1',
198
+ 'moustache2',
199
+ 'moustache3',
200
+ 'moustache4',
201
+ 'moustache5',
202
+ 'moustache6',
203
+ 'moustache7',
204
+ 'moustache8',
205
+ 'moustache9',
206
+ ],
207
+ examples: [
208
+ ['chin'],
209
+ ['full'],
210
+ ['full2'],
211
+ ['full3'],
212
+ ['full4'],
213
+ ['goatee1'],
214
+ ['goatee2'],
215
+ ['moustache1'],
216
+ ['moustache2'],
217
+ ['moustache3'],
218
+ ['moustache4'],
219
+ ['moustache5'],
220
+ ['moustache6'],
221
+ ['moustache7'],
222
+ ['moustache8'],
223
+ ['moustache9'],
224
+ ],
225
+ },
226
+ facialHairProbability: {
227
+ type: 'integer',
228
+ minimum: 0,
229
+ maximum: 100,
230
+ default: 10,
231
+ examples: [0, 100],
232
+ },
233
+ hairColor: {
234
+ type: 'array',
235
+ items: {
236
+ type: 'string',
237
+ pattern: '^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$',
238
+ },
239
+ default: [
240
+ '2c1b18',
241
+ 'e8e1e1',
242
+ 'ecdcbf',
243
+ 'd6b370',
244
+ 'f59797',
245
+ 'b58143',
246
+ 'a55728',
247
+ '724133',
248
+ '4a312c',
249
+ 'c93305',
250
+ ],
251
+ },
252
+ head: {
253
+ type: 'array',
254
+ items: {
255
+ type: 'string',
256
+ enum: [
257
+ 'afro',
258
+ 'bangs',
259
+ 'bangs2',
260
+ 'bantuKnots',
261
+ 'bear',
262
+ 'bun',
263
+ 'bun2',
264
+ 'buns',
265
+ 'cornrows',
266
+ 'cornrows2',
267
+ 'dreads1',
268
+ 'dreads2',
269
+ 'flatTop',
270
+ 'flatTopLong',
271
+ 'grayBun',
272
+ 'grayMedium',
273
+ 'grayShort',
274
+ 'hatBeanie',
275
+ 'hatHip',
276
+ 'hijab',
277
+ 'long',
278
+ 'longAfro',
279
+ 'longBangs',
280
+ 'longCurly',
281
+ 'medium1',
282
+ 'medium2',
283
+ 'medium3',
284
+ 'mediumBangs',
285
+ 'mediumBangs2',
286
+ 'mediumBangs3',
287
+ 'mediumStraight',
288
+ 'mohawk',
289
+ 'mohawk2',
290
+ 'noHair1',
291
+ 'noHair2',
292
+ 'noHair3',
293
+ 'pomp',
294
+ 'shaved1',
295
+ 'shaved2',
296
+ 'shaved3',
297
+ 'short1',
298
+ 'short2',
299
+ 'short3',
300
+ 'short4',
301
+ 'short5',
302
+ 'turban',
303
+ 'twists',
304
+ 'twists2',
305
+ ],
306
+ },
307
+ default: [
308
+ 'afro',
309
+ 'bangs',
310
+ 'bangs2',
311
+ 'bantuKnots',
312
+ 'bear',
313
+ 'bun',
314
+ 'bun2',
315
+ 'buns',
316
+ 'cornrows',
317
+ 'cornrows2',
318
+ 'dreads1',
319
+ 'dreads2',
320
+ 'flatTop',
321
+ 'flatTopLong',
322
+ 'grayBun',
323
+ 'grayMedium',
324
+ 'grayShort',
325
+ 'hatBeanie',
326
+ 'hatHip',
327
+ 'hijab',
328
+ 'long',
329
+ 'longAfro',
330
+ 'longBangs',
331
+ 'longCurly',
332
+ 'medium1',
333
+ 'medium2',
334
+ 'medium3',
335
+ 'mediumBangs',
336
+ 'mediumBangs2',
337
+ 'mediumBangs3',
338
+ 'mediumStraight',
339
+ 'mohawk',
340
+ 'mohawk2',
341
+ 'noHair1',
342
+ 'noHair2',
343
+ 'noHair3',
344
+ 'pomp',
345
+ 'shaved1',
346
+ 'shaved2',
347
+ 'shaved3',
348
+ 'short1',
349
+ 'short2',
350
+ 'short3',
351
+ 'short4',
352
+ 'short5',
353
+ 'turban',
354
+ 'twists',
355
+ 'twists2',
356
+ ],
357
+ examples: [
358
+ ['afro'],
359
+ ['bangs'],
360
+ ['bangs2'],
361
+ ['bantuKnots'],
362
+ ['bear'],
363
+ ['bun'],
364
+ ['bun2'],
365
+ ['buns'],
366
+ ['cornrows'],
367
+ ['cornrows2'],
368
+ ['dreads1'],
369
+ ['dreads2'],
370
+ ['flatTop'],
371
+ ['flatTopLong'],
372
+ ['grayBun'],
373
+ ['grayMedium'],
374
+ ['grayShort'],
375
+ ['hatBeanie'],
376
+ ['hatHip'],
377
+ ['hijab'],
378
+ ['long'],
379
+ ['longAfro'],
380
+ ['longBangs'],
381
+ ['longCurly'],
382
+ ['medium1'],
383
+ ['medium2'],
384
+ ['medium3'],
385
+ ['mediumBangs'],
386
+ ['mediumBangs2'],
387
+ ['mediumBangs3'],
388
+ ['mediumStraight'],
389
+ ['mohawk'],
390
+ ['mohawk2'],
391
+ ['noHair1'],
392
+ ['noHair2'],
393
+ ['noHair3'],
394
+ ['pomp'],
395
+ ['shaved1'],
396
+ ['shaved2'],
397
+ ['shaved3'],
398
+ ['short1'],
399
+ ['short2'],
400
+ ['short3'],
401
+ ['short4'],
402
+ ['short5'],
403
+ ['turban'],
404
+ ['twists'],
405
+ ['twists2'],
406
+ ],
407
+ },
408
+ mask: {
409
+ type: 'array',
410
+ items: { type: 'string', enum: ['medicalMask', 'respirator'] },
411
+ default: ['medicalMask', 'respirator'],
412
+ examples: [['medicalMask'], ['respirator']],
413
+ },
414
+ maskProbability: {
415
+ type: 'integer',
416
+ minimum: 0,
417
+ maximum: 100,
418
+ default: 5,
419
+ examples: [0, 100],
420
+ },
421
+ skinColor: {
422
+ type: 'array',
423
+ items: {
424
+ type: 'string',
425
+ pattern: '^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$',
426
+ },
427
+ default: ['ffdbb4', 'edb98a', 'd08b5b', 'ae5d29', '694d3d'],
428
+ },
429
+ },
430
+ additionalProperties: false,
431
+ };
package/lib/types.d.ts ADDED
@@ -0,0 +1,25 @@
1
+ export interface Options {
2
+ head?: ('afro' | 'bangs' | 'bangs2' | 'bantuKnots' | 'bear' | 'bun' | 'bun2' | 'buns' | 'cornrows' | 'cornrows2' | 'dreads1' | 'dreads2' | 'flatTop' | 'flatTopLong' | 'grayBun' | 'grayMedium' | 'grayShort' | 'hatBeanie' | 'hatHip' | 'hijab' | 'long' | 'longAfro' | 'longBangs' | 'longCurly' | 'medium1' | 'medium2' | 'medium3' | 'mediumBangs' | 'mediumBangs2' | 'mediumBangs3' | 'mediumStraight' | 'mohawk' | 'mohawk2' | 'noHair1' | 'noHair2' | 'noHair3' | 'pomp' | 'shaved1' | 'shaved2' | 'shaved3' | 'short1' | 'short2' | 'short3' | 'short4' | 'short5' | 'turban' | 'twists' | 'twists2')[];
3
+ face?: ('angryWithFang' | 'awe' | 'blank' | 'calm' | 'cheeky' | 'concerned' | 'concernedFear' | 'contempt' | 'cute' | 'cyclops' | 'driven' | 'eatingHappy' | 'explaining' | 'eyesClosed' | 'fear' | 'hectic' | 'lovingGrin1' | 'lovingGrin2' | 'monster' | 'old' | 'rage' | 'serious' | 'smile' | 'smileBig' | 'smileLOL' | 'smileTeethGap' | 'solemn' | 'suspicious' | 'tired' | 'veryAngry')[];
4
+ facialHair?: ('chin' | 'full' | 'full2' | 'full3' | 'full4' | 'goatee1' | 'goatee2' | 'moustache1' | 'moustache2' | 'moustache3' | 'moustache4' | 'moustache5' | 'moustache6' | 'moustache7' | 'moustache8' | 'moustache9')[];
5
+ facialHairProbability?: number;
6
+ mask?: ('medicalMask' | 'respirator')[];
7
+ maskProbability?: number;
8
+ accessories?: ('eyepatch' | 'glasses' | 'glasses2' | 'glasses3' | 'glasses4' | 'glasses5' | 'sunglasses' | 'sunglasses2')[];
9
+ accessoriesProbability?: number;
10
+ skinColor?: string[];
11
+ clothingColor?: string[];
12
+ hairColor?: string[];
13
+ }
14
+ export declare type ColorGroup = Record<string, ColorGroupItem>;
15
+ export declare type ColorGroupCollection = Record<string, ColorGroup>;
16
+ export declare type ColorGroupItem = string;
17
+ export declare type ColorPickCollection = Record<string, string>;
18
+ export declare type ComponentGroup = Record<string, ComponentGroupItem>;
19
+ export declare type ComponentGroupCollection = Record<string, ComponentGroup>;
20
+ export declare type ComponentGroupItem = (components: ComponentPickCollection, colors: ColorPickCollection) => string;
21
+ export declare type ComponentPickCollection = Record<string, ComponentPick>;
22
+ export declare type ComponentPick = {
23
+ name: string;
24
+ value: ComponentGroupItem;
25
+ } | undefined;
package/lib/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -1,9 +1,8 @@
1
- import type { Prng } from '@dicebear/core';
2
- import type { Options } from '../options';
3
- import type { ColorPickCollection } from '../static-types';
4
- declare type Props = {
5
- prng: Prng;
6
- options: Options;
7
- };
8
- export declare function getColors({ prng, options }: Props): ColorPickCollection;
9
- export {};
1
+ import type { Prng } from '@dicebear/core';
2
+ import type { Options, ColorPickCollection } from '../types.js';
3
+ declare type Props = {
4
+ prng: Prng;
5
+ options: Options;
6
+ };
7
+ export declare function getColors({ prng, options }: Props): ColorPickCollection;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ export function getColors({ prng, options }) {
2
+ var _a, _b, _c, _d, _e, _f;
3
+ return {
4
+ skin: (_b = prng.pick((_a = options.skinColor) !== null && _a !== void 0 ? _a : [])) !== null && _b !== void 0 ? _b : 'transparent',
5
+ clothing: (_d = prng.pick((_c = options.clothingColor) !== null && _c !== void 0 ? _c : [])) !== null && _d !== void 0 ? _d : 'transparent',
6
+ hair: (_f = prng.pick((_e = options.hairColor) !== null && _e !== void 0 ? _e : [])) !== null && _f !== void 0 ? _f : 'transparent',
7
+ };
8
+ }
@@ -1,9 +1,8 @@
1
- import type { Prng } from '@dicebear/core';
2
- import type { Options } from '../options';
3
- import type { ComponentPickCollection } from '../static-types';
4
- declare type Props = {
5
- prng: Prng;
6
- options: Options;
7
- };
8
- export declare function getComponents({ prng, options, }: Props): ComponentPickCollection;
9
- export {};
1
+ import type { Prng } from '@dicebear/core';
2
+ import type { Options, ComponentPickCollection } from '../types.js';
3
+ declare type Props = {
4
+ prng: Prng;
5
+ options: Options;
6
+ };
7
+ export declare function getComponents({ prng, options, }: Props): ComponentPickCollection;
8
+ export {};
@@ -0,0 +1,39 @@
1
+ import { pickComponent } from './pickComponent.js';
2
+ export function getComponents({ prng, options, }) {
3
+ const headComponent = pickComponent({
4
+ prng,
5
+ group: 'head',
6
+ values: options.head,
7
+ });
8
+ const faceComponent = pickComponent({
9
+ prng,
10
+ group: 'face',
11
+ values: options.face,
12
+ });
13
+ const facialHairComponent = pickComponent({
14
+ prng,
15
+ group: 'facialHair',
16
+ values: options.facialHair,
17
+ });
18
+ const maskComponent = pickComponent({
19
+ prng,
20
+ group: 'mask',
21
+ values: options.mask,
22
+ });
23
+ const accessoriesComponent = pickComponent({
24
+ prng,
25
+ group: 'accessories',
26
+ values: options.accessories,
27
+ });
28
+ return {
29
+ head: headComponent,
30
+ face: faceComponent,
31
+ facialHair: prng.bool(options.facialHairProbability)
32
+ ? facialHairComponent
33
+ : undefined,
34
+ mask: prng.bool(options.maskProbability) ? maskComponent : undefined,
35
+ accessories: prng.bool(options.accessoriesProbability)
36
+ ? accessoriesComponent
37
+ : undefined,
38
+ };
39
+ }
@@ -1,9 +1,9 @@
1
- import type { Prng } from '@dicebear/core';
2
- import type { ComponentPick } from '../static-types';
3
- declare type Props = {
4
- prng: Prng;
5
- group: string;
6
- values?: string[];
7
- };
8
- export declare function pickComponent({ prng, group, values, }: Props): ComponentPick;
9
- export {};
1
+ import type { Prng } from '@dicebear/core';
2
+ import type { ComponentPick } from '../types.js';
3
+ declare type Props = {
4
+ prng: Prng;
5
+ group: string;
6
+ values?: string[];
7
+ };
8
+ export declare function pickComponent({ prng, group, values, }: Props): ComponentPick;
9
+ export {};
@@ -0,0 +1,11 @@
1
+ import * as components from '../components/index.js';
2
+ export function pickComponent({ prng, group, values = [], }) {
3
+ const componentCollection = components;
4
+ const key = prng.pick(values);
5
+ if (key && componentCollection[group][key]) {
6
+ return { name: key, value: componentCollection[group][key] };
7
+ }
8
+ else {
9
+ return undefined;
10
+ }
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dicebear/open-peeps",
3
- "version": "5.0.0-alpha.3",
3
+ "version": "5.0.0-alpha.32",
4
4
  "description": "Avatar style for DiceBear",
5
5
  "keywords": [
6
6
  "dicebear"
@@ -13,39 +13,35 @@
13
13
  "url": "git+https://github.com/dicebear/dicebear.git"
14
14
  },
15
15
  "license": "MIT",
16
- "source": "src/index.ts",
17
- "main": "dist/index.js",
18
- "module": "dist/index.es.js",
19
- "browser": "dist/index.umd.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
- "README.md",
24
- "dist"
21
+ "lib",
22
+ "README.md"
25
23
  ],
26
24
  "scripts": {
27
- "test": "jest",
25
+ "prebuild": "del-cli lib",
26
+ "build": "tsc",
28
27
  "prepublishOnly": "npm run build",
29
- "prebuild": "shx rm -rf dist",
30
- "build": "dicebear-project build DiceBear.OpenPeeps"
28
+ "test": "uvu tests"
31
29
  },
32
30
  "devDependencies": {
33
- "@dicebear/core": "^5.0.0-alpha.3",
34
- "@tsconfig/recommended": "^1.0.0",
35
- "@types/jest": "^26.0.22",
36
- "@types/node": "^10.11.6",
37
- "dicebear-project": "^5.0.0-alpha.3",
38
- "jest": "^26.6.3",
39
- "shx": "^0.3.3",
40
- "ts-jest": "^26.5.4",
41
- "typescript": "^4.2.3",
42
- "utility-types": "^3.10.0"
31
+ "@dicebear/core": "^5.0.0-alpha.32",
32
+ "@tsconfig/recommended": "^1.0.1",
33
+ "del-cli": "^4.0.1",
34
+ "typescript": "^4.6.3",
35
+ "uvu": "^0.5.3"
43
36
  },
44
37
  "peerDependencies": {
45
- "@dicebear/core": "^5.0.0-alpha.3"
38
+ "@dicebear/core": "^5.0.0-alpha.16"
39
+ },
40
+ "engines": {
41
+ "node": "^14.13.1 || >=16.0.0"
46
42
  },
47
43
  "publishConfig": {
48
44
  "access": "public"
49
45
  },
50
- "gitHead": "58ad93754978edcb8f0928e5cd3af2f4d06186da"
46
+ "gitHead": "5a4a06cbb8aca42a5d19da8e704b3a7b3a45d755"
51
47
  }
@@ -1,2 +0,0 @@
1
- import type { ColorGroup } from '../static-types';
2
- export declare const clothing: ColorGroup;
@@ -1,2 +0,0 @@
1
- import type { ColorGroup } from '../static-types';
2
- export declare const hair: ColorGroup;
@@ -1,3 +0,0 @@
1
- export { skin } from './skin';
2
- export { clothing } from './clothing';
3
- export { hair } from './hair';