@dicebear/pixel-art-neutral 5.0.0-alpha.1 → 5.0.0-alpha.13

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 (58) hide show
  1. package/lib/colors/glasses.d.ts +2 -0
  2. package/lib/colors/glasses.js +8 -0
  3. package/lib/colors/hair.d.ts +2 -0
  4. package/lib/colors/hair.js +12 -0
  5. package/lib/colors/index.d.ts +4 -0
  6. package/lib/colors/index.js +4 -0
  7. package/lib/colors/mouth.d.ts +2 -0
  8. package/lib/colors/mouth.js +6 -0
  9. package/lib/colors/skin.d.ts +2 -0
  10. package/lib/colors/skin.js +10 -0
  11. package/lib/components/eyebrows.d.ts +2 -0
  12. package/lib/components/eyebrows.js +15 -0
  13. package/lib/components/eyes.d.ts +2 -0
  14. package/lib/components/eyes.js +15 -0
  15. package/lib/components/glasses.d.ts +2 -0
  16. package/lib/components/glasses.js +9 -0
  17. package/lib/components/index.d.ts +4 -0
  18. package/lib/components/index.js +4 -0
  19. package/lib/components/mouth.d.ts +2 -0
  20. package/lib/components/mouth.js +22 -0
  21. package/{dist → lib}/core.d.ts +3 -3
  22. package/lib/core.js +65 -0
  23. package/{dist → lib}/hooks/onPostCreate.d.ts +11 -12
  24. package/lib/hooks/onPostCreate.js +3 -0
  25. package/{dist → lib}/hooks/onPreCreate.d.ts +9 -9
  26. package/lib/hooks/onPreCreate.js +3 -0
  27. package/{dist → lib}/index.d.ts +13 -13
  28. package/lib/index.js +13 -0
  29. package/{dist → lib}/meta/components.d.ts +4 -4
  30. package/lib/meta/components.js +18 -0
  31. package/lib/schema.d.ts +2 -0
  32. package/lib/schema.js +303 -0
  33. package/lib/types.d.ts +27 -0
  34. package/lib/types.js +1 -0
  35. package/{dist → lib}/utils/getColors.d.ts +8 -9
  36. package/lib/utils/getColors.js +25 -0
  37. package/{dist → lib}/utils/getComponents.d.ts +8 -9
  38. package/lib/utils/getComponents.js +31 -0
  39. package/{dist → lib}/utils/pickColor.d.ts +9 -9
  40. package/lib/utils/pickColor.js +13 -0
  41. package/{dist → lib}/utils/pickComponent.d.ts +9 -9
  42. package/lib/utils/pickComponent.js +14 -0
  43. package/package.json +18 -21
  44. package/dist/colors/glasses.d.ts +0 -2
  45. package/dist/colors/hair.d.ts +0 -2
  46. package/dist/colors/index.d.ts +0 -4
  47. package/dist/colors/mouth.d.ts +0 -2
  48. package/dist/colors/skin.d.ts +0 -2
  49. package/dist/components/eyebrows.d.ts +0 -2
  50. package/dist/components/eyes.d.ts +0 -2
  51. package/dist/components/glasses.d.ts +0 -2
  52. package/dist/components/index.d.ts +0 -4
  53. package/dist/components/mouth.d.ts +0 -2
  54. package/dist/index.es.js +0 -628
  55. package/dist/index.js +0 -635
  56. package/dist/index.umd.js +0 -12
  57. package/dist/options.d.ts +0 -16
  58. package/dist/static-types.d.ts +0 -16
package/dist/index.es.js DELETED
@@ -1,628 +0,0 @@
1
- var title = "Options";
2
- var $schema = "http://json-schema.org/draft-07/schema#";
3
- var properties = {
4
- backgroundColor: {
5
- type: "array",
6
- items: {
7
- anyOf: [
8
- {
9
- type: "string",
10
- pattern: "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$"
11
- },
12
- {
13
- type: "string",
14
- pattern: "^[0-9a-zA-Z]+$"
15
- }
16
- ]
17
- },
18
- "default": [
19
- "variant01",
20
- "variant02",
21
- "variant03",
22
- "variant04",
23
- "variant05",
24
- "variant06",
25
- "variant07",
26
- "variant08"
27
- ]
28
- },
29
- eyebrows: {
30
- type: "array",
31
- items: {
32
- type: "string",
33
- "enum": [
34
- "variant13",
35
- "variant12",
36
- "variant11",
37
- "variant10",
38
- "variant09",
39
- "variant08",
40
- "variant07",
41
- "variant06",
42
- "variant05",
43
- "variant04",
44
- "variant03",
45
- "variant02",
46
- "variant01"
47
- ]
48
- },
49
- "default": [
50
- "variant13",
51
- "variant12",
52
- "variant11",
53
- "variant10",
54
- "variant09",
55
- "variant08",
56
- "variant07",
57
- "variant06",
58
- "variant05",
59
- "variant04",
60
- "variant03",
61
- "variant02",
62
- "variant01"
63
- ]
64
- },
65
- eyes: {
66
- type: "array",
67
- items: {
68
- type: "string",
69
- "enum": [
70
- "variant13",
71
- "variant12",
72
- "variant11",
73
- "variant10",
74
- "variant09",
75
- "variant08",
76
- "variant07",
77
- "variant06",
78
- "variant05",
79
- "variant04",
80
- "variant03",
81
- "variant02",
82
- "variant01"
83
- ]
84
- },
85
- "default": [
86
- "variant13",
87
- "variant12",
88
- "variant11",
89
- "variant10",
90
- "variant09",
91
- "variant08",
92
- "variant07",
93
- "variant06",
94
- "variant05",
95
- "variant04",
96
- "variant03",
97
- "variant02",
98
- "variant01"
99
- ]
100
- },
101
- glasses: {
102
- type: "array",
103
- items: {
104
- type: "string",
105
- "enum": [
106
- "variant07",
107
- "variant06",
108
- "variant05",
109
- "variant04",
110
- "variant03",
111
- "variant02",
112
- "variant01"
113
- ]
114
- },
115
- "default": [
116
- "variant07",
117
- "variant06",
118
- "variant05",
119
- "variant04",
120
- "variant03",
121
- "variant02",
122
- "variant01"
123
- ]
124
- },
125
- glassesColor: {
126
- type: "array",
127
- items: {
128
- anyOf: [
129
- {
130
- type: "string",
131
- pattern: "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$"
132
- },
133
- {
134
- type: "string",
135
- "enum": [
136
- "green01",
137
- "blue01",
138
- "red01",
139
- "black01",
140
- "black02",
141
- "black03"
142
- ]
143
- }
144
- ]
145
- },
146
- "default": [
147
- "green01",
148
- "blue01",
149
- "red01",
150
- "black01",
151
- "black02",
152
- "black03"
153
- ]
154
- },
155
- glassesProbability: {
156
- type: "integer",
157
- minimum: 0,
158
- maximum: 100,
159
- "default": 20
160
- },
161
- hairColor: {
162
- type: "array",
163
- items: {
164
- anyOf: [
165
- {
166
- type: "string",
167
- pattern: "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$"
168
- },
169
- {
170
- type: "string",
171
- "enum": [
172
- "variant01",
173
- "variant02",
174
- "variant03",
175
- "variant04",
176
- "variant05",
177
- "variant06",
178
- "variant07",
179
- "variant08",
180
- "variant09",
181
- "variant10"
182
- ]
183
- }
184
- ]
185
- },
186
- "default": [
187
- "variant01",
188
- "variant02",
189
- "variant03",
190
- "variant04",
191
- "variant05",
192
- "variant06",
193
- "variant07",
194
- "variant08",
195
- "variant09",
196
- "variant10"
197
- ]
198
- },
199
- mouth: {
200
- type: "array",
201
- items: {
202
- type: "string",
203
- "enum": [
204
- "surprised03",
205
- "surprised02",
206
- "happy09",
207
- "happy08",
208
- "happy07",
209
- "happy06",
210
- "happy05",
211
- "happy04",
212
- "happy03",
213
- "happy02",
214
- "happy01",
215
- "sad08",
216
- "sad07",
217
- "sad06",
218
- "sad05",
219
- "sad04",
220
- "sad03",
221
- "sad02",
222
- "sad01",
223
- "surprised01"
224
- ]
225
- },
226
- "default": [
227
- "surprised03",
228
- "surprised02",
229
- "happy09",
230
- "happy08",
231
- "happy07",
232
- "happy06",
233
- "happy05",
234
- "happy04",
235
- "happy03",
236
- "happy02",
237
- "happy01",
238
- "sad08",
239
- "sad07",
240
- "sad06",
241
- "sad05",
242
- "sad04",
243
- "sad03",
244
- "sad02",
245
- "sad01",
246
- "surprised01"
247
- ]
248
- },
249
- mouthColor: {
250
- type: "array",
251
- items: {
252
- anyOf: [
253
- {
254
- type: "string",
255
- pattern: "^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$"
256
- },
257
- {
258
- type: "string",
259
- "enum": [
260
- "variant01",
261
- "variant02",
262
- "variant03",
263
- "variant04"
264
- ]
265
- }
266
- ]
267
- },
268
- "default": [
269
- "variant01",
270
- "variant02",
271
- "variant03",
272
- "variant04"
273
- ]
274
- }
275
- };
276
- var additionalProperties = false;
277
- var schema$1 = {
278
- title: title,
279
- $schema: $schema,
280
- properties: properties,
281
- additionalProperties: additionalProperties
282
- };
283
-
284
- const eyes = {
285
- variant13: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M5 9V7h3v2H5Zm7-2h3v2h-3V7Z\" fill=\"#fff\"/>\n<path d=\"M7 8v1h1V8H7Zm7 0h1v1h-1V8Z\" fill=\"#000\"/>\n</g>\n",
286
- variant12: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M5 7h3v2H5V7Zm7 0h3v2h-3V7Z\" fill=\"#fff\"/>\n<path d=\"M6 8h1v1H6V8Zm7 1V8h1v1h-1Z\" fill=\"#000\"/>\n</g>\n",
287
- variant11: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M5 7h3v2H5V7Zm7 0h3v2h-3V7Z\" fill=\"#fff\"/>\n<path d=\"M7 8h1v1H7V8Zm5 0h1v1h-1V8Z\" fill=\"#000\"/>\n</g>\n",
288
- variant10: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M6 7h1v1h1v1H6V7Zm6 0h1v1h1v1h-2V7Z\" fill=\"#fff\"/>\n<path d=\"M6 8h1v1H6V8Zm6 0h1v1h-1V8Z\" fill=\"#000\"/>\n</g>\n",
289
- variant09: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M5 8h2v1H5V8Zm7 0h2v1h-2V8Z\" fill=\"#fff\"/>\n<path d=\"M7 8h1v1H7V8Zm7 0h1v1h-1V8Z\" fill=\"#000\"/>\n</g>\n",
290
- variant08: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M6 8h1v1H6V8Zm7 0h1v1h-1V8Z\" fill=\"#fff\"/>\n<path d=\"M7 8h1v1H7V8Zm5 0h1v1h-1V8Z\" fill=\"#000\"/>\n</g>\n",
291
- variant07: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M5 7v1h3V7H5Zm7 0h3v1h-3V7Z\" fill=\"#fff\"/>\n<path d=\"M5 9V8h1V7h1v1h1v1H5Zm7 0V8h1V7h1v1h1v1h-3Z\" fill=\"#000\"/>\n<path d=\"M5 9V8h1V7h1v1h1v1H7V8H6v1H5Zm7 0V8h1V7h1v1h1v1h-1V8h-1v1h-1Z\" fill=\"#fff\" fill-opacity=\".5\"/>\n</g>\n",
292
- variant06: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M5 8h3v1H5V8Zm7 0h3v1h-3V8Z\" fill=\"#fff\"/>\n<path d=\"M6 8h1v1H6V8Zm7 0h1v1h-1V8Z\" fill=\"#000\"/>\n</g>\n",
293
- variant05: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M5 7h3v2H5V7Zm7 0h3v2h-3V7Z\" fill=\"#fff\"/>\n<path d=\"M5 8h2v1H5V8Zm7 0h2v1h-2V8Z\" fill=\"#000\"/>\n</g>\n",
294
- variant04: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M5 7h3v3H5V7Zm7 0h3v3h-3V7Z\" fill=\"#fff\"/>\n<path d=\"M6 8h1v1H6V8Zm7 0h1v1h-1V8Z\" fill=\"#000\"/>\n</g>\n",
295
- variant03: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M5 7h3v3H5V7Zm7 0h3v3h-3V7Z\" fill=\"#fff\"/>\n<path d=\"M6 7h2v2H6V7Zm7 0h2v2h-2V7Z\" fill=\"#000\"/>\n<path d=\"M6 7v1h1v1h1V8H7V7H6Zm7 0v1h1v1h1V8h-1V7h-1Z\" fill=\"#fff\" fill-opacity=\".4\"/>\n<path d=\"M7 7v1h1V7H7Zm7 0h1v1h-1V7Z\" fill=\"#fff\" fill-opacity=\".7\"/>\n</g>\n",
296
- variant02: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M5 7h3v3H5V7Zm7 0h3v3h-3V7Z\" fill=\"#fff\"/>\n<path d=\"M5 8h2v1H5V8Zm7 0h2v1h-2V8Z\" fill=\"#000\"/>\n<path d=\"M5 8h1v1H5V8Zm7 0h1v1h-1V8Z\" fill=\"#fff\" fill-opacity=\".7\"/>\n</g>\n",
297
- variant01: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M6 7h1v2H5V8h1V7Zm7 0h1v2h-2V8h1V7Z\" fill=\"#fff\"/>\n<path d=\"M7 7v1H6v1h2V7H7Zm7 0v1h-1v1h2V7h-1Z\" fill=\"#000\"/>\n<path d=\"M7 7v1h1V7H7ZM6 8v1h1V8H6Zm8-1v1h1V7h-1Zm-1 1v1h1V8h-1Z\" fill=\"#fff\" fill-opacity=\".5\"/>\n</g>\n"
298
- };
299
-
300
- const eyebrows = {
301
- variant13: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M8 4v1H7v1H5V5h2V4h1Zm4 0h1v1h2v1h-2V5h-1V4Z\" fill=\"".concat(colors.hair.value, "\"/>\n<path d=\"M8 4v1H7v1H5V5h2V4h1Zm4 0h1v1h2v1h-2V5h-1V4Z\" fill=\"#000\" fill-opacity=\".1\"/>\n</g>\n"),
302
- variant12: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M6 5h3v2H8V6H6V5Zm5 0h3v1h-2v1h-1V5Z\" fill=\"".concat(colors.hair.value, "\"/>\n<path d=\"M6 5h3v2H8V6H6V5Zm5 0h3v1h-2v1h-1V5Z\" fill=\"#000\" fill-opacity=\".1\"/>\n</g>\n"),
303
- variant11: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M5 5h3v1h1v1H8V6H5V5Zm10 0h-3v1h-1v1h1V6h3V5Z\" fill=\"".concat(colors.hair.value, "\"/>\n<path d=\"M5 5h3v1h1v1H8V6H5V5Zm10 0h-3v1h-1v1h1V6h3V5Z\" fill=\"#000\" fill-opacity=\".1\"/>\n</g>\n"),
304
- variant10: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M6 5H4v2h1V6h1V5Zm8 0h2v2h-1V6h-1V5Z\" fill=\"".concat(colors.hair.value, "\"/>\n<path d=\"M6 5H4v2h1V6h1V5Zm8 0h2v2h-1V6h-1V5Z\" fill=\"#000\" fill-opacity=\".1\"/>\n</g>\n"),
305
- variant09: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M5 6h2v1H5V6Zm8 0h2v1h-2V6Z\" fill=\"".concat(colors.hair.value, "\"/>\n<path d=\"M5 6h2v1H5V6Zm8 0h2v1h-2V6Z\" fill=\"#000\" fill-opacity=\".1\"/>\n</g>\n"),
306
- variant08: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M6 5h1v1h1v1H5V6h1V5Zm7 0h1v1h1v1h-3V6h1V5Z\" fill=\"".concat(colors.hair.value, "\"/>\n<path d=\"M6 5h1v1h1v1H5V6h1V5Zm7 0h1v1h1v1h-3V6h1V5Z\" fill=\"#000\" fill-opacity=\".1\"/>\n</g>\n"),
307
- variant07: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M6 5h2v1h1v1H8V6H6V5Zm8 0h-2v1h-1v1h1V6h2V5Z\" fill=\"".concat(colors.hair.value, "\"/>\n<path d=\"M6 5h2v1h1v1H8V6H6V5Zm8 0h-2v1h-1v1h1V6h2V5Z\" fill=\"#000\" fill-opacity=\".1\"/>\n</g>\n"),
308
- variant06: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M12 7V6h1V5h1v1h1v1h-1V6h-1v1h-1ZM5 7V6h1V5h1v1h1v1H7V6H6v1H5Z\" fill=\"".concat(colors.hair.value, "\"/>\n<path d=\"M12 7V6h1V5h1v1h1v1h-1V6h-1v1h-1ZM5 7V6h1V5h1v1h1v1H7V6H6v1H5Z\" fill=\"#000\" fill-opacity=\".1\"/>\n</g>\n"),
309
- variant05: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M7 5v1H5v1H4V6h1V5h2Zm6 0h2v1h1v1h-1V6h-2V5Z\" fill=\"".concat(colors.hair.value, "\"/>\n<path d=\"M7 5v1H5v1H4V6h1V5h2Zm6 0h2v1h1v1h-1V6h-2V5Z\" fill=\"#000\" fill-opacity=\".1\"/>\n</g>\n"),
310
- variant04: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M4 7V5h3v1H5v1H4Zm12-2v2h-1V6h-2V5h3Z\" fill=\"".concat(colors.hair.value, "\"/>\n<path d=\"M4 7V5h3v1H5v1H4Zm12-2v2h-1V6h-2V5h3Z\" fill=\"#000\" fill-opacity=\".1\"/>\n</g>\n"),
311
- variant03: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M7 5h1v1h1v1H8V6H7V5Zm6 0v1h-1v1h-1V6h1V5h1Z\" fill=\"".concat(colors.hair.value, "\"/>\n<path d=\"M7 5h1v1h1v1H8V6H7V5Zm6 0v1h-1v1h-1V6h1V5h1Z\" fill=\"#000\" fill-opacity=\".1\"/>\n</g>\n"),
312
- variant02: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M4 7V6h1V5h1v1H5v1H4Zm10-2h1v1h1v1h-1V6h-1V5Z\" fill=\"".concat(colors.hair.value, "\"/>\n<path d=\"M4 7V6h1V5h1v1H5v1H4Zm10-2h1v1h1v1h-1V6h-1V5Z\" fill=\"#000\" fill-opacity=\".1\"/>\n</g>\n"),
313
- variant01: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M7 5v1H5v1H4V6h1V5h2Zm7 0v1h-2v1h-1V6h1V5h2Z\" fill=\"".concat(colors.hair.value, "\"/>\n<path d=\"M7 5v1H5v1H4V6h1V5h2Zm7 0v1h-2v1h-1V6h1V5h2Z\" fill=\"#000\" fill-opacity=\".1\"/>\n</g>\n")
314
- };
315
-
316
- const mouth$1 = {
317
- surprised03: (components, colors) => "\n<path d=\"M9 12v2h2v-2H9Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
318
- surprised02: (components, colors) => "\n<path d=\"M9 13v1h1v-1H9Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
319
- happy09: (components, colors) => "\n<path d=\"M7 12v1h1v1h4v-1H8v-1H7Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
320
- happy08: (components, colors) => "\n<path d=\"M10 12v1H9v1h2v-2h-1Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
321
- happy07: (components, colors) => "\n<path d=\"M8 13v1h4v-1h1v-1h-1v1H8Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
322
- happy06: (components, colors) => "\n<path d=\"M9 12v2h2v-1h-1v-1H9Z\" fill=\"".concat(colors.mouth.value, "\"/>\n<path d=\"M11 14v-1h-1v-1H9v1h1v1h1Z\" fill=\"#fff\" fill-opacity=\".2\"/>\n"),
323
- happy05: (components, colors) => "\n<path d=\"M8 12v1h1v1h2v-1h1v-1H8Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
324
- happy04: (components, colors) => "\n<path d=\"M9 13v1h2v-1h1v-1h-1v1H9Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
325
- happy03: (components, colors) => "\n<path d=\"M8 12v1h1v1h2v-1H9v-1H8Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
326
- happy02: (components, colors) => "\n<path d=\"M8 12v1h1v1h2v-1h1v-1h-1v-1H9v1H8Z\" fill=\"".concat(colors.mouth.value, "\"/>\n<path d=\"M9 12v1h2v-1H9Z\" fill=\"#fff\"/>\n"),
327
- happy01: (components, colors) => "\n<path d=\"M8 12v1h1v1h2v-1h1v-1h-1v-1H9v1H8Z\" fill=\"".concat(colors.mouth.value, "\"/>\n<path d=\"M9 12v1h2v-1H9Z\" fill=\"#fff\" fill-opacity=\".2\"/>\n"),
328
- sad08: (components, colors) => "\n<path d=\"M9 12v1H8v1h4v-1h-1v-1H9Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
329
- sad07: (components, colors) => "\n<path d=\"M11 12v1H9v1H8v-1h1v-1h2Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
330
- sad06: (components, colors) => "\n<path d=\"M8 12h3v1H8v-1Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
331
- sad05: (components, colors) => "\n<path d=\"M8 12h4v1H8v-1Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
332
- sad04: (components, colors) => "\n<path d=\"M9 12h2v1H9v-1Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
333
- sad03: (components, colors) => "\n<path d=\"M8 12v1h3v1h1v-1h-1v-1H8Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
334
- sad02: (components, colors) => "\n<path d=\"M8 13v1h1v-1h3v-1H9v1H8Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
335
- sad01: (components, colors) => "\n<path d=\"M10 12v1h1v1h1v-2h-2Z\" fill=\"".concat(colors.mouth.value, "\"/>\n"),
336
- surprised01: (components, colors) => "\n<path d=\"M8 12v2h4v-2H8Z\" fill=\"#fff\"/>\n"
337
- };
338
-
339
- const glasses$1 = {
340
- variant07: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path opacity=\".2\" d=\"M5 7h3v3H5V7Zm7 0h3v3h-3V7Z\" fill=\"#fff\"/>\n<path opacity=\".2\" d=\"M7 7h1v1H7V7Zm7 0h1v1h-1V7Z\" fill=\"#fff\"/>\n<path d=\"M12 10V7h3v3h-3Zm-1-4v1H9V6H4v1H3v1h1v3h5V8h2v3h5V8h1V7h-1V6h-5Zm-6 4V7h3v3H5Z\" fill=\"".concat(colors.glasses.value, "\"/>\n<path d=\"M3 7h1v1H3V7Zm6 0h2v1H9V7Zm7 0h1v1h-1V7Z\" fill=\"#fff\" fill-opacity=\".2\"/>\n</g>\n"),
341
- variant06: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path opacity=\".2\" d=\"M5 7h3v2H5V7Zm7 0h3v2h-3V7Z\" fill=\"#fff\"/>\n<path opacity=\".2\" d=\"M7 7h1v1H7V7Zm7 0h1v1h-1V7Z\" fill=\"#fff\"/>\n<path d=\"M5 7v2h3V7H5ZM4 6v1H3v1h1v1h1v1h3V9h1V8h2v1h1v1h3V9h1V8h1V7h-1V6h-5v1H9V6H4Zm8 1v2h3V7h-3Z\" fill=\"".concat(colors.glasses.value, "\"/>\n<path d=\"M3 7h1v1H3V7Zm6 0h2v1H9V7Zm7 0h1v1h-1V7Z\" fill=\"#fff\" fill-opacity=\".2\"/>\n</g>\n"),
342
- variant05: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path opacity=\".2\" d=\"M5 8h3v1H5V8Zm7 0h3v1h-3V8Z\" fill=\"#fff\"/>\n<path opacity=\".2\" d=\"M7 8h1v1H7V8Zm7 0h1v1h-1V8Z\" fill=\"#fff\"/>\n<path d=\"M5 8v1h3V8H5ZM3 7v1h1v1h1v1h3V9h1V8h2v1h1v1h3V9h1V8h1V7H3Zm9 1v1h3V8h-3Z\" fill=\"".concat(colors.glasses.value, "\"/>\n<path d=\"M3 7v1h1V7H3Zm6 0v1h2V7H9Zm7 0v1h1V7h-1Z\" fill=\"#fff\" fill-opacity=\".2\"/>\n</g>\n"),
343
- variant04: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path opacity=\".2\" d=\"M5 7h3v2H5V7Zm7 0h3v2h-3V7Z\" fill=\"#fff\"/>\n<path opacity=\".2\" d=\"M7 7h1v1H7V7Zm7 0h1v1h-1V7Z\" fill=\"#fff\"/>\n<path d=\"M12 7v2h3V7h-3ZM8 6H5v1H3v1h1v1h1v1h3V9h1V8h2v1h1v1h3V9h1V8h1V7h-2V6h-3v1H8V6ZM5 7v2h3V7H5Z\" fill=\"".concat(colors.glasses.value, "\"/>\n<path d=\"M3 7h1v1H3V7Zm6 0h2v1H9V7Zm7 0h1v1h-1V7Z\" fill=\"#fff\" fill-opacity=\".2\"/>\n</g>\n"),
344
- variant03: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M4 8H3V7h1V6h5v1h2V6h5v1h1v1h-1v2h-5V8H9v2H4V8Zm1 0V7h3v2H5V8Zm7-1v2h3V7h-3Z\" fill=\"".concat(colors.glasses.value, "\"/>\n<path opacity=\".2\" d=\"M5 7h3v2H5V7Zm7 0h3v2h-3V7Z\" fill=\"#fff\"/>\n<path opacity=\".2\" d=\"M14 7h1v1h-1V7ZM7 7h1v1H7V7Z\" fill=\"#fff\"/>\n<path d=\"M3 8V7h1v1H3Zm6-1v1h2V7H9Zm7 0v1h1V7h-1Z\" fill=\"#fff\" fill-opacity=\".2\"/>\n</g>\n"),
345
- variant02: (components, colors) => "\n<g fill-rule=\"evenodd\" clip-rule=\"evenodd\">\n<path d=\"M4 8H3V7h14v1h-1v2h-5V8H9v2H4V8Zm1 0h3v1H5V8Zm7 0h3v1h-3V8Z\" fill=\"".concat(colors.glasses.value, "\"/>\n<path opacity=\".2\" d=\"M7 8v1h1V8H7Zm7 0v1h1V8h-1Z\" fill=\"#fff\"/>\n<path opacity=\".2\" d=\"M5 8h3v1H5V8Zm7 0h3v1h-3V8Z\" fill=\"#fff\"/>\n<path d=\"M3 7v1h1V7H3Zm13 0v1h1V7h-1ZM9 7v1h2V7H9Z\" fill=\"#fff\" fill-opacity=\".2\"/>\n</g>\n"),
346
- variant01: (components, colors) => "\n<path d=\"M3 8V7h1V6h2v1h1V6h2v1h2V6h2v1h1V6h2v1h1v1h-1v1h-1v1h-1v1h-1v-1h-1V9h-1V8H9v1H8v1H7v1H6v-1H5V9H4V8H3Z\" fill=\"".concat(colors.glasses.value, "\"/>\n<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M3 7v1h1V7h1V6H4v1H3Zm5-1v1h1v1h2V7h1V6h-1v1H9V6H8Zm7 0v1h1v1h1V7h-1V6h-1Z\" fill=\"#fff\" fill-opacity=\".2\"/>\n")
347
- };
348
-
349
- var components = /*#__PURE__*/Object.freeze({
350
- __proto__: null,
351
- eyes: eyes,
352
- eyebrows: eyebrows,
353
- mouth: mouth$1,
354
- glasses: glasses$1
355
- });
356
-
357
- function pickComponent(_ref) {
358
- let {
359
- prng,
360
- group,
361
- values = []
362
- } = _ref;
363
- const componentCollection = components;
364
- const key = prng.pick(values);
365
-
366
- if (componentCollection[group][key]) {
367
- return {
368
- name: key,
369
- value: componentCollection[group][key]
370
- };
371
- } else {
372
- return undefined;
373
- }
374
- }
375
-
376
- function getComponents(_ref) {
377
- let {
378
- prng,
379
- options
380
- } = _ref;
381
- const eyesComponent = pickComponent({
382
- prng,
383
- group: 'eyes',
384
- values: options.eyes
385
- });
386
- const eyebrowsComponent = pickComponent({
387
- prng,
388
- group: 'eyebrows',
389
- values: options.eyebrows
390
- });
391
- const mouthComponent = pickComponent({
392
- prng,
393
- group: 'mouth',
394
- values: options.mouth
395
- });
396
- const glassesComponent = pickComponent({
397
- prng,
398
- group: 'glasses',
399
- values: options.glasses
400
- });
401
- return {
402
- eyes: eyesComponent,
403
- eyebrows: eyebrowsComponent,
404
- mouth: mouthComponent,
405
- glasses: prng.bool(options.glassesProbability) ? glassesComponent : undefined
406
- };
407
- }
408
-
409
- const skin = {
410
- variant01: 'rgba(255, 219, 172, 1)',
411
- variant02: 'rgba(245, 207, 160, 1)',
412
- variant03: 'rgba(234, 195, 147, 1)',
413
- variant04: 'rgba(224, 182, 135, 1)',
414
- variant05: 'rgba(203, 158, 110, 1)',
415
- variant06: 'rgba(182, 134, 85, 1)',
416
- variant07: 'rgba(162, 109, 61, 1)',
417
- variant08: 'rgba(141, 85, 36, 1)'
418
- };
419
-
420
- const hair = {
421
- variant01: 'rgba(202, 177, 136, 1)',
422
- variant02: 'rgba(167, 137, 97, 1)',
423
- variant03: 'rgba(131, 98, 59, 1)',
424
- variant04: 'rgba(96, 58, 20, 1)',
425
- variant05: 'rgba(96, 48, 21, 1)',
426
- variant06: 'rgba(97, 38, 22, 1)',
427
- variant07: 'rgba(97, 28, 23, 1)',
428
- variant08: 'rgba(78, 26, 19, 1)',
429
- variant09: 'rgba(59, 23, 14, 1)',
430
- variant10: 'rgba(40, 21, 10, 1)'
431
- };
432
-
433
- const mouth = {
434
- variant01: 'rgba(210, 153, 133, 1)',
435
- variant02: 'rgba(201, 130, 118, 1)',
436
- variant03: 'rgba(227, 93, 106, 1)',
437
- variant04: 'rgba(222, 15, 13, 1)'
438
- };
439
-
440
- const glasses = {
441
- green01: 'rgba(95, 112, 92, 1)',
442
- blue01: 'rgba(67, 103, 125, 1)',
443
- red01: 'rgba(160, 75, 93, 1)',
444
- black01: 'rgba(75, 75, 75, 1)',
445
- black02: 'rgba(50, 50, 50, 1)',
446
- black03: 'rgba(25, 25, 25, 1)'
447
- };
448
-
449
- var colors = /*#__PURE__*/Object.freeze({
450
- __proto__: null,
451
- skin: skin,
452
- hair: hair,
453
- mouth: mouth,
454
- glasses: glasses
455
- });
456
-
457
- function pickColor(_ref) {
458
- var _colorCollection$grou;
459
-
460
- let {
461
- prng,
462
- group,
463
- values = []
464
- } = _ref;
465
- const colorCollection = colors;
466
-
467
- if (values.length === 0) {
468
- values.push('transparent');
469
- }
470
-
471
- const key = prng.pick(values);
472
- return {
473
- name: key,
474
- value: (_colorCollection$grou = colorCollection[group][key]) !== null && _colorCollection$grou !== void 0 ? _colorCollection$grou : key
475
- };
476
- }
477
-
478
- function getColors(_ref) {
479
- let {
480
- prng,
481
- options
482
- } = _ref;
483
- return {
484
- hair: pickColor({
485
- prng,
486
- group: 'hair',
487
- values: options.hairColor
488
- }),
489
- mouth: pickColor({
490
- prng,
491
- group: 'mouth',
492
- values: options.mouthColor
493
- }),
494
- glasses: pickColor({
495
- prng,
496
- group: 'glasses',
497
- values: options.glassesColor
498
- }),
499
- background: pickColor({
500
- prng,
501
- group: 'skin',
502
- values: options.backgroundColor
503
- })
504
- };
505
- }
506
-
507
- const dimensions = {
508
- eyes: {
509
- width: 20,
510
- height: 20
511
- },
512
- eyebrows: {
513
- width: 20,
514
- height: 20
515
- },
516
- mouth: {
517
- width: 20,
518
- height: 20
519
- },
520
- glasses: {
521
- width: 20,
522
- height: 20
523
- }
524
- };
525
-
526
- const style = {
527
- meta: {
528
- title: 'Pixel Art - Neutral',
529
- creator: 'Plastic Jam',
530
- license: {
531
- name: 'MIT',
532
- url: 'https://github.com/dicebear/dicebear/blob/main/packages/%40dicebear/pixel-art-neutral/LICENSE'
533
- }
534
- },
535
- schema: schema$1,
536
- create: _ref => {
537
- var _components$eyes$valu, _components$eyes, _components$eyebrows$, _components$eyebrows, _components$mouth$val, _components$mouth, _components$glasses$v, _components$glasses;
538
-
539
- let {
540
- prng,
541
- options
542
- } = _ref;
543
- const components = getComponents({
544
- prng,
545
- options
546
- });
547
- const colors = getColors({
548
- prng,
549
- options
550
- });
551
- options.backgroundColor = [colors.background.value];
552
- return {
553
- attributes: {
554
- viewBox: '0 0 14 14',
555
- fill: 'none',
556
- 'shape-rendering': 'auto'
557
- },
558
- body: "\n<g transform=\"translate(-3 -3)\">\n".concat((_components$eyes$valu = (_components$eyes = components.eyes) === null || _components$eyes === void 0 ? void 0 : _components$eyes.value(components, colors)) !== null && _components$eyes$valu !== void 0 ? _components$eyes$valu : '', "\n</g>\n<g transform=\"translate(-3 -3)\">\n").concat((_components$eyebrows$ = (_components$eyebrows = components.eyebrows) === null || _components$eyebrows === void 0 ? void 0 : _components$eyebrows.value(components, colors)) !== null && _components$eyebrows$ !== void 0 ? _components$eyebrows$ : '', "\n</g>\n<g transform=\"translate(-3 -2)\">\n").concat((_components$mouth$val = (_components$mouth = components.mouth) === null || _components$mouth === void 0 ? void 0 : _components$mouth.value(components, colors)) !== null && _components$mouth$val !== void 0 ? _components$mouth$val : '', "\n</g>\n<g transform=\"translate(-3 -3)\">\n").concat((_components$glasses$v = (_components$glasses = components.glasses) === null || _components$glasses === void 0 ? void 0 : _components$glasses.value(components, colors)) !== null && _components$glasses$v !== void 0 ? _components$glasses$v : '', "\n</g>\n")
559
- };
560
- },
561
- preview: _ref2 => {
562
- let {
563
- prng,
564
- options,
565
- property
566
- } = _ref2;
567
- const componentGroup = property.toString();
568
- const colorGroup = property.toString().replace(/Color$/, '');
569
- const components = getComponents({
570
- prng,
571
- options
572
- });
573
- const colors = getColors({
574
- prng,
575
- options
576
- });
577
- options.backgroundColor = [colors.background.value];
578
-
579
- if (componentGroup in components) {
580
- var _components$component, _components$component2;
581
-
582
- const {
583
- width,
584
- height
585
- } = dimensions[componentGroup];
586
- return {
587
- attributes: {
588
- viewBox: "0 0 ".concat(width, " ").concat(height),
589
- fill: 'none',
590
- 'shape-rendering': 'auto'
591
- },
592
- body: (_components$component = (_components$component2 = components[componentGroup]) === null || _components$component2 === void 0 ? void 0 : _components$component2.value(components, colors)) !== null && _components$component !== void 0 ? _components$component : ''
593
- };
594
- }
595
-
596
- if (colorGroup in colors) {
597
- return {
598
- attributes: {
599
- viewBox: "0 0 1 1",
600
- fill: 'none',
601
- 'shape-rendering': 'auto'
602
- },
603
- body: "<rect width=\"1\" height=\"1\" fill=\"".concat(colors[colorGroup].value, "\" />")
604
- };
605
- }
606
-
607
- return undefined;
608
- }
609
- };
610
-
611
- /*!
612
- * Pixel Art - Neutral (@dicebear/pixel-art-neutral)
613
- *
614
- * Code licensed under MIT License.
615
- * Copyright (c) 2021 Florian Körner
616
- * Copyright (c) 2021 Plastic Jam
617
- *
618
- * Design "Pixel Art - Neutral" by Plastic Jam licensed under MIT.
619
- * License: https://github.com/dicebear/dicebear/blob/main/packages/%40dicebear/pixel-art-neutral/LICENSE
620
- */
621
- let {
622
- create,
623
- preview,
624
- meta,
625
- schema
626
- } = style;
627
-
628
- export { create, meta, preview, schema };