@dicebear/miniavs 5.0.0-alpha.10 → 5.0.0-alpha.11

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 (55) hide show
  1. package/lib/colors/body.d.ts +2 -0
  2. package/lib/colors/body.js +5 -0
  3. package/lib/colors/hair.d.ts +2 -0
  4. package/lib/colors/hair.js +5 -0
  5. package/lib/colors/index.d.ts +3 -0
  6. package/lib/colors/index.js +3 -0
  7. package/lib/colors/skin.d.ts +2 -0
  8. package/lib/colors/skin.js +5 -0
  9. package/lib/components/blushes.d.ts +2 -0
  10. package/lib/components/blushes.js +3 -0
  11. package/lib/components/body.d.ts +2 -0
  12. package/lib/components/body.js +4 -0
  13. package/lib/components/eyes.d.ts +2 -0
  14. package/lib/components/eyes.js +14 -0
  15. package/lib/components/glasses.d.ts +2 -0
  16. package/lib/components/glasses.js +3 -0
  17. package/lib/components/hair.d.ts +2 -0
  18. package/lib/components/hair.js +11 -0
  19. package/lib/components/head.d.ts +2 -0
  20. package/lib/components/head.js +5 -0
  21. package/lib/components/index.d.ts +8 -0
  22. package/lib/components/index.js +8 -0
  23. package/lib/components/mouth.d.ts +2 -0
  24. package/lib/components/mouth.js +4 -0
  25. package/lib/components/mustache.d.ts +2 -0
  26. package/lib/components/mustache.js +6 -0
  27. package/lib/core.d.ts +3 -0
  28. package/lib/core.js +64 -0
  29. package/lib/hooks/onPostCreate.d.ts +11 -0
  30. package/lib/hooks/onPostCreate.js +3 -0
  31. package/lib/hooks/onPreCreate.d.ts +9 -0
  32. package/lib/hooks/onPreCreate.js +3 -0
  33. package/lib/index.d.ts +13 -0
  34. package/lib/index.js +13 -0
  35. package/lib/meta/components.d.ts +4 -0
  36. package/lib/meta/components.js +34 -0
  37. package/lib/schema.d.ts +2 -0
  38. package/lib/schema.js +136 -0
  39. package/lib/types.d.ts +32 -0
  40. package/lib/types.js +1 -0
  41. package/lib/utils/getColors.d.ts +8 -0
  42. package/lib/utils/getColors.js +20 -0
  43. package/lib/utils/getComponents.d.ts +8 -0
  44. package/lib/utils/getComponents.js +59 -0
  45. package/lib/utils/pickColor.d.ts +9 -0
  46. package/lib/utils/pickColor.js +13 -0
  47. package/lib/utils/pickComponent.d.ts +9 -0
  48. package/lib/utils/pickComponent.js +14 -0
  49. package/package.json +18 -26
  50. package/dist/index.d.ts +0 -24
  51. package/dist/index.d.ts.map +0 -1
  52. package/dist/index.es.js +0 -373
  53. package/dist/index.es.js.map +0 -1
  54. package/dist/index.js +0 -377
  55. package/dist/index.js.map +0 -1
package/dist/index.js DELETED
@@ -1,377 +0,0 @@
1
- function $parcel$export(e, n, v, s) {
2
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
3
- }
4
- function $parcel$interopDefault(a) {
5
- return a && a.__esModule ? a.default : a;
6
- }
7
-
8
- $parcel$export(module.exports, "create", function () { return $b361a74bf78b498b$export$185802fd694ee1f5; });
9
- $parcel$export(module.exports, "preview", function () { return $b361a74bf78b498b$export$48c2d0f2f545ac27; });
10
- $parcel$export(module.exports, "meta", function () { return $b361a74bf78b498b$export$6990040ee07315; });
11
- $parcel$export(module.exports, "schema", function () { return $b361a74bf78b498b$export$4902baddc787debb; });
12
- var $22b291b742526db8$exports = {};
13
- $22b291b742526db8$exports = JSON.parse("{\"title\":\"Options\",\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"properties\":{\"blushes\":{\"type\":\"array\",\"uniqueItems\":true,\"items\":{\"type\":\"string\",\"enum\":[\"default\"]},\"default\":[\"default\"]},\"blushesProbability\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":100,\"default\":50},\"body\":{\"type\":\"array\",\"uniqueItems\":true,\"items\":{\"type\":\"string\",\"enum\":[\"tShirt\",\"golf\"]},\"default\":[\"tShirt\",\"golf\"]},\"bodyColor\":{\"type\":\"array\",\"uniqueItems\":true,\"items\":{\"anyOf\":[{\"type\":\"string\",\"pattern\":\"^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$\"},{\"type\":\"string\",\"enum\":[\"orange\",\"blue\",\"pink\"]}]},\"default\":[\"orange\",\"blue\",\"pink\"]},\"eyes\":{\"type\":\"array\",\"uniqueItems\":true,\"items\":{\"type\":\"string\",\"enum\":[\"normal\",\"confident\",\"happy\"]},\"default\":[\"normal\",\"confident\",\"happy\"]},\"glasses\":{\"type\":\"array\",\"uniqueItems\":true,\"items\":{\"type\":\"string\",\"enum\":[\"normal\"]},\"default\":[\"normal\"]},\"glassesProbability\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":100,\"default\":20},\"hair\":{\"type\":\"array\",\"uniqueItems\":true,\"items\":{\"type\":\"string\",\"enum\":[\"balndess\",\"slaughter\",\"ponyTail\",\"long\",\"curly\",\"stylish\",\"elvis\",\"classic02\",\"classic01\"]},\"default\":[\"balndess\",\"slaughter\",\"ponyTail\",\"long\",\"curly\",\"stylish\",\"elvis\",\"classic02\",\"classic01\"]},\"hairColor\":{\"type\":\"array\",\"uniqueItems\":true,\"items\":{\"anyOf\":[{\"type\":\"string\",\"pattern\":\"^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$\"},{\"type\":\"string\",\"enum\":[\"brown\",\"black\",\"red\"]}]},\"default\":[\"brown\",\"black\",\"red\"]},\"head\":{\"type\":\"array\",\"uniqueItems\":true,\"items\":{\"type\":\"string\",\"enum\":[\"normal\",\"wide\",\"thin\"]},\"default\":[\"normal\",\"wide\",\"thin\"]},\"mouth\":{\"type\":\"array\",\"uniqueItems\":true,\"items\":{\"type\":\"string\",\"enum\":[\"default\",\"missingTooth\"]},\"default\":[\"default\",\"missingTooth\"]},\"mustache\":{\"type\":\"array\",\"uniqueItems\":true,\"items\":{\"type\":\"string\",\"enum\":[\"pencilThinBeard\",\"pencilThin\",\"horshoe\",\"freddy\"]},\"default\":[\"pencilThinBeard\",\"pencilThin\",\"horshoe\",\"freddy\"]},\"mustacheProbability\":{\"type\":\"integer\",\"minimum\":0,\"maximum\":100,\"default\":20},\"skinColor\":{\"type\":\"array\",\"uniqueItems\":true,\"items\":{\"anyOf\":[{\"type\":\"string\",\"pattern\":\"^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$\"},{\"type\":\"string\",\"enum\":[\"yellow\",\"white\",\"dark\"]}]},\"default\":[\"yellow\",\"white\",\"dark\"]}},\"additionalProperties\":false}");
14
-
15
-
16
- var $8e018aca75223de3$exports = {};
17
-
18
- $parcel$export($8e018aca75223de3$exports, "head", function () { return $b26f01e9ae27fa55$export$5fd5031fecdacec3; });
19
- $parcel$export($8e018aca75223de3$exports, "body", function () { return $11ad31ba0fb023ba$export$32180ef41b15b513; });
20
- $parcel$export($8e018aca75223de3$exports, "hair", function () { return $f252f1ce090e706e$export$12c365d50e7cb3d6; });
21
- $parcel$export($8e018aca75223de3$exports, "mouth", function () { return $bc44546ebd9570d9$export$4ec1914b3efc3f9a; });
22
- $parcel$export($8e018aca75223de3$exports, "eyes", function () { return $7cf6aadde48df783$export$60b896fd2e3e4b2; });
23
- $parcel$export($8e018aca75223de3$exports, "glasses", function () { return $59a7ae967bc24faa$export$98222f1ebbc36891; });
24
- $parcel$export($8e018aca75223de3$exports, "mustache", function () { return $4ad336a52d9f2184$export$61c0929068836343; });
25
- $parcel$export($8e018aca75223de3$exports, "blushes", function () { return $3a6873dc01a09847$export$794fa1d50fd96b0e; });
26
- const $b26f01e9ae27fa55$export$5fd5031fecdacec3 = {
27
- normal: (components, colors)=>`<path d="M45.89 36.1c0 8.5-1.26 18.86-10.89 19.82v9.95S31.36 68 26.5 68c-4.86 0-8.5-3.48-8.5-3.48V42a5 5 0 0 1-1.3-9.83C15.36 22.64 17.5 13 32 13c14.59 0 14.24 11.08 13.96 19.81-.04 1.15-.07 2.25-.07 3.29Z" fill="${colors.skin.value}"/><path d="M35 55.92c-.48.05-.98.07-1.5.07-8.88 0-13.9-7.15-15.5-14.6v23.13S21.64 68 26.5 68c4.86 0 8.5-2.13 8.5-2.13v-9.95Z" fill="#000" fill-opacity=".07"/><path d="M34.63 55.95c-.37.03-.74.04-1.13.04-6.53 0-10.97-3.86-13.5-8.87V48.24c0 5.38 2.61 9.75 8.28 9.75h1.35c3.34.03 4.59.04 5-2.04ZM16.7 32.17A5 5 0 0 0 18.14 42c-.48-1.98-.71-3.99-.71-5.9a46.7 46.7 0 0 1-.73-3.93Z" fill="#000" fill-opacity=".07"/><rect x="36" y="41" width="3" height="2" rx="1" fill="#000" fill-opacity=".07"/>`
28
- ,
29
- wide: (components, colors)=>`<path d="M46.07 40.4c.47 7.5.94 15-11.07 15.56v9.91S31.36 68 26.5 68c-4.86 0-8.5-3.48-8.5-3.48V45.1c-.2-1.02-.33-2.06-.41-3.12a5 5 0 0 1-.9-9.8C15.37 22.63 17.52 13 32 13c14.59 0 14.24 11.08 13.96 19.81-.04 1.15-.07 2.25-.07 3.29 0 1.4.09 2.86.18 4.3Z" fill="${colors.skin.value}"/><path d="M17.59 41.98c-.16-1.97-.16-3.97-.16-5.88a46.7 46.7 0 0 1-.73-3.93 5 5 0 0 0 .89 9.81ZM18 45.1v19.42S21.64 68 26.5 68c4.86 0 8.5-2.13 8.5-2.13v-9.91c-.48.02-.98.03-1.5.03-10.79 0-14.34-4.95-15.5-10.9Z" fill="#000" fill-opacity=".07"/><path d="M34.93 55.96c-.46.02-.93.03-1.43.03-7.25 0-11.23-2.23-13.41-5.5.5 4.82 3.16 8.5 8.3 8.5h1.36c3.8.03 4.92.04 5.18-3.03Z" fill="#000" fill-opacity=".07"/><rect x="36" y="41" width="3" height="2" rx="1" fill="#000" fill-opacity=".07"/>`
30
- ,
31
- thin: (components, colors)=>`<path d="M45.89 36.1c0 8.92-3.9 18.9-10.39 20.4l-.5-.06v9.43S31.36 68 26.5 68c-4.86 0-8.5-3.48-8.5-3.48V42a5 5 0 0 1-1.3-9.83C15.36 22.64 17.5 13 32 13c14.59 0 14.24 11.08 13.96 19.81-.04 1.15-.07 2.25-.07 3.29Z" fill="${colors.skin.value}"/><path d="M18 42v22.52S21.64 68 26.5 68c4.86 0 8.5-2.13 8.5-2.13v-9.43c-7.26-1.02-13.9-7.5-16.45-14.47-.18.02-.37.03-.55.03Z" fill="#000" fill-opacity=".07"/><path d="M16.7 32.17a5 5 0 0 0 1.85 9.8 17.14 17.14 0 0 1-1.12-5.87 46.7 46.7 0 0 1-.73-3.93ZM34.7 56.4c-6.75-1.1-12.9-6.87-15.7-13.3v.4c0 5.65 6.27 14.47 9.38 15.49 2.57.83 5.4.65 6.32-2.6Z" fill="#000" fill-opacity=".07"/><rect x="36" y="41" width="3" height="2" rx="1" fill="#000" fill-opacity=".07"/>`
32
- };
33
-
34
-
35
- const $11ad31ba0fb023ba$export$32180ef41b15b513 = {
36
- tShirt: (components, colors)=>`<rect x="7" y="60" width="40" height="23" rx="9" fill="${colors.body.value}"/>`
37
- ,
38
- golf: (components, colors)=>`<rect x="7" y="60" width="40" height="23" rx="9" fill="${colors.body.value}"/><path d="M17 58h19v3s-5 1-9.5 1-9.5-1-9.5-1v-3Z" fill="${colors.body.value}"/><path d="M17 58h19v2s-3 1.5-9.5 1.5S17 60 17 60v-2Z" fill="#000" fill-opacity=".2"/><path d="M16.5 59c0-1.1.9-2 2-2h16a2 2 0 0 1 2 2s-5 1-10 1-10-1-10-1Z" fill="${colors.body.value}"/>`
39
- };
40
-
41
-
42
- const $f252f1ce090e706e$export$12c365d50e7cb3d6 = {
43
- balndess: (components, colors)=>`<g fill="${colors.hair.value}"><rect x="14" y="26" width="9" height="2" rx="1"/><rect x="14" y="33" width="7" height="2" rx="1"/><rect x="12" y="29" width="13" height="3" rx="1.5"/></g>`
44
- ,
45
- slaughter: (components, colors)=>`<path d="M24 25c0 .53-.1 1.04-.3 1.5A3.99 3.99 0 0 1 20 32a4 4 0 0 1-8 0c0-1.05.07-2.78.37-4.32a4 4 0 0 1 4.8-5.5A3.99 3.99 0 0 1 24 25ZM45.85 33.9a4 4 0 0 0 2.78-5.4 3.99 3.99 0 0 0-3.13-5.46c.6 3.14.48 6.61.38 9.78 0 .36-.02.72-.03 1.07Z" fill="${colors.hair.value}"/>`
46
- ,
47
- ponyTail: (components, colors)=>`<path d="M0 10c8-8 13 3 13 3l-2 8s-2 2.5 0 10-2.5 11.5-2.5 11.5S5 45 2 43s-3.4-3.92-3-7.5c.5-4.5 2-3 2-7.5s-9-10-1-18Z" fill="${colors.hair.value}"/><path d="m13.03 13.18 5.5 2.38-3.56 8.26-5.51-2.38S8.5 19.5 10 16.5c1.5-3 3.03-3.32 3.03-3.32Z" fill="#FF6C98"/><path d="m18 41-1.32-8.82A5 5 0 0 0 18 42v8.3c-1.55-1.37-2.93-3-4.08-4.83-1.7-2.7-2.9-5.8-3.48-9.1-.6-3.28-.58-6.68.04-9.96a25.57 25.57 0 0 1 3.55-9.05 21.32 21.32 0 0 1 6.43-6.5A17.85 17.85 0 0 1 31 8c2.5 0 4.97.45 7.27 1.33 2.3.88 4.4 2.17 6.16 3.8a17.48 17.48 0 0 1 4.12 5.67c.75 1.66 1.21 3.42 1.38 5.2H50v4.29s-.33.15-1 .36v8.5s0 1.4-1.5 2.45c-.52.36-1.22.64-1.9.85.19-1.45.29-2.91.29-4.35 0-1.04.03-2.14.07-3.29.04-1.11.07-2.27.08-3.44-1.85.34-4.37.63-7.58.63C30.62 30 26 28.29 26 28.29v-1A26.13 26.13 0 0 0 24 31c-.75 1.75-.75 3.54-.75 5.05 0 1.5 0 2.73-.75 3.34-1.5 1.2-4.5 1.6-4.5 1.6Z" fill="${colors.hair.value}"/>`
48
- ,
49
- long: (components, colors)=>`<path fill-rule="evenodd" clip-rule="evenodd" d="M48 25a18 18 0 0 0-36-.5V65h11V34.6a65.12 65.12 0 0 0 12.2-3.76 53.45 53.45 0 0 0 10.68-5.64c.24 2.53.15 5.16.08 7.61-.04 1.15-.08 2.25-.08 3.29 0 .4 0 .82-.02 1.23.23-.07.45-.15.64-.24 1.5-.69 1.5-1.6 1.5-1.6V25Zm-33 8a4.98 4.98 0 0 0 0 8v-8Z" fill="${colors.hair.value}"/>`
50
- ,
51
- curly: (components, colors)=>`<g fill="${colors.hair.value}"><path d="M45.97 32.48a4 4 0 0 0 1.78-4.88 4 4 0 0 0-2.97-7.41c1.42 3.67 1.31 8.22 1.19 12.3Z"/><path d="M36.3 22.76a4.98 4.98 0 0 1-6.36.2 6.98 6.98 0 0 1-6.99 1.74c-.26.28-.56.53-.89.73a3.98 3.98 0 0 1-1.35 6.19c.2.24.3.55.3.88a1.5 1.5 0 0 1-1.53 1.5 4 4 0 0 1-7.3-3.17 3.99 3.99 0 0 1 0-5.66 4 4 0 0 1 .74-3.71 7 7 0 0 1 4.1-10.17V11a4 4 0 0 1 5.94-3.5 7 7 0 0 1 9.8-2.42 6.48 6.48 0 0 1 10.78 1.95 4 4 0 0 1 3.43 4.58 7.33 7.33 0 0 1 3.05 5.9c0 4.14-3.58 7.5-8 7.5a8.25 8.25 0 0 1-5.7-2.24Z"/></g>`
52
- ,
53
- stylish: (components, colors)=>`<path d="M20.67 28.22v6.02c0 .76-.67 1.76-1.17 2.26-.5.5-2 1.5-2.85 1.5-.85 0-3.54-.45-4.83-2.26-1.28-1.8-.89-11.32 0-13.54.9-2.21 4.19-6.88 8.85-10.45a26.26 26.26 0 0 1 12.88-5.34C58.48 3.4 49.22 20.99 46 25.5c-5.5-2-9.5-2.5-16.72-1.53-7.21.99-8.01 1.99-8.6 4.24Z" fill="${colors.hair.value}"/>`
54
- ,
55
- elvis: (components, colors)=>`<path d="M22 28c-.63 3 1 6.98 1 7.74 0 .77-3.93 3.03-5 3.76-1.07.73-1.5-7-1.5-7-3 0-3.5 5.5-3.5 5.5s-2.25-.74-3-4.5c-.51-2.54.3-8.09.5-9.5.5-3.5 1-11.5 7.5-15.5s23-4 27-3C54.9 7.97 56.22 21.5 53 26c-5 5.5-19-1-23.5-1s-6.87 0-7.5 3Z" fill="${colors.hair.value}"/>`
56
- ,
57
- classic02: (components, colors)=>`<path d="M28.12 27.47C35.92 28.6 49.6 30.6 51 18 52 9 38.5-1.5 24 8c-9.1 1.35-11.39 8.28-11.9 14.26a3.99 3.99 0 0 0-.8 4.24 3.99 3.99 0 0 0 .87 4.33A4 4 0 1 0 20 32a4 4 0 0 0 3.87-5H24c.95 0 2.4.21 4.12.47Z" fill="${colors.hair.value}"/>`
58
- ,
59
- classic01: (components, colors)=>`<path d="M29.7 26.2c5.6 1.87 13.39 4.45 21.53-3.7 4-4-14-21-28.5-11.5-11.33 1.68-10.68 8.47-10.18 13.71.1 1 .18 1.95.18 2.8 0 .52.07.92.2 1.2-.16 1.24-.2 2.48-.2 3.3a4 4 0 1 0 8 0A4 4 0 0 0 24.61 27h.12a4 4 0 0 0 3.06-1.41c.6.18 1.24.4 1.9.61Z" fill="${colors.hair.value}"/>`
60
- };
61
-
62
-
63
- const $bc44546ebd9570d9$export$4ec1914b3efc3f9a = {
64
- default: (components, colors)=>`<path d="M27.93 46a1 1 0 0 1 1-1h9.14a1 1 0 0 1 1 1 5 5 0 0 1-5 5h-1.14a5 5 0 0 1-5-5Z" fill="#66253C"/><path d="M35.76 50.7a5 5 0 0 1-1.69.3h-1.14a5 5 0 0 1-5-4.8c.77-.29 1.9-.25 3.02-.22L32 46c2.21 0 4 1.57 4 3.5 0 .42-.09.83-.24 1.2Z" fill="#B03E67"/><path d="M29 45h10v1a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-1Z" fill="#fff"/>`
65
- ,
66
- missingTooth: (components, colors)=>`<path d="M27.93 46a1 1 0 0 1 1-1h9.14a1 1 0 0 1 1 1 5 5 0 0 1-5 5h-1.14a5 5 0 0 1-5-5Z" fill="#66253C"/><path d="M35.76 50.7a5 5 0 0 1-1.69.3h-1.14a5 5 0 0 1-5-4.8c.77-.29 1.9-.25 3.02-.22L32 46c2.21 0 4 1.57 4 3.5 0 .42-.09.83-.24 1.2Z" fill="#B03E67"/><path d="M29 45h10v1a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-1Z" fill="#fff"/><path d="M31 45.3c0-.17.13-.3.3-.3h1.4c.17 0 .3.13.3.3v2.4a.3.3 0 0 1-.3.3h-1.4a.3.3 0 0 1-.3-.3v-2.4Z" fill="#B03E67"/>`
67
- };
68
-
69
-
70
- var ref4, ref1, ref2;
71
- const $7cf6aadde48df783$export$60b896fd2e3e4b2 = {
72
- normal: (components, colors)=>{
73
- var ref3;
74
- return `<g fill="${colors.hair.value}"><rect x="30" y="36" width="3" height="4" rx="1.5"/><rect x="40" y="36" width="3" height="4" rx="1.5"/></g>${(ref4 = (ref3 = components.blushes) === null || ref3 === void 0 ? void 0 : ref3.value(components, colors)) !== null && ref4 !== void 0 ? ref4 : ''}`;
75
- },
76
- confident: (components, colors)=>{
77
- var ref;
78
- return `${(ref1 = (ref = components.blushes) === null || ref === void 0 ? void 0 : ref.value(components, colors)) !== null && ref1 !== void 0 ? ref1 : ''}<path d="M43 37.5a1.5 1.5 0 0 1-3 0v-1.23c0-.15.12-.27.27-.27h2.46c.15 0 .27.12.27.27v1.23ZM33 37.5a1.5 1.5 0 0 1-3 0v-1.23c0-.15.12-.27.27-.27h2.46c.15 0 .27.12.27.27v1.23Z" fill="${colors.hair.value}"/><path stroke="${colors.hair.value}" stroke-linecap="round" d="M29.5 36.5h4M39.5 36.5h4"/>`;
79
- },
80
- happy: (components, colors)=>{
81
- var ref;
82
- return `${(ref2 = (ref = components.blushes) === null || ref === void 0 ? void 0 : ref.value(components, colors)) !== null && ref2 !== void 0 ? ref2 : ''}<path d="M30 37.5a1.5 1.5 0 0 1 3 0v1.23c0 .15-.12.27-.27.27h-2.46a.27.27 0 0 1-.27-.27V37.5ZM40 37.5a1.5 1.5 0 0 1 3 0v1.23c0 .15-.12.27-.27.27h-2.46a.27.27 0 0 1-.27-.27V37.5Z" fill="#1B0B47"/>`;
83
- }
84
- };
85
-
86
-
87
- const $59a7ae967bc24faa$export$98222f1ebbc36891 = {
88
- normal: (components, colors)=>`<g stroke="#000" stroke-width="2"><circle cx="30.27" cy="36.27" r="4.27"/><circle cx="44.27" cy="36.27" r="4.27"/><path d="m33.99 35.11 7-.1"/></g>`
89
- };
90
-
91
-
92
- const $4ad336a52d9f2184$export$61c0929068836343 = {
93
- pencilThinBeard: (components, colors)=>`<path d="M26.5 45s4.5-.5 11-2v2c-1.5.67-5.5 1.6-7.5 2-2.5.5-3.5-2-3.5-2ZM48 44.76S44 44 38 43v2c1.43.59 4.6 1.15 6.5 1.5 2.38.44 3.5-1.74 3.5-1.74ZM33.31 55.24a1 1 0 0 1 .97-1.24h3.44a1 1 0 0 1 .97 1.24l-.25 1a1 1 0 0 1-.97.76h-2.94a1 1 0 0 1-.97-.76l-.25-1Z" fill="${colors.hair.value}"/>`
94
- ,
95
- pencilThin: (components, colors)=>`<path d="M37.5 43c-6.5 1.5-11 2-11 2s1 2.5 3.5 2c2-.4 6-1.33 7.5-2v-2ZM38 43c6 1 10 1.76 10 1.76s-1.12 2.18-3.5 1.74l-.32-.06c-1.92-.35-4.83-.89-6.18-1.44v-2Z" fill="${colors.hair.value}"/>`
96
- ,
97
- horshoe: (components, colors)=>`<path d="M27 46a3 3 0 0 1 3-3h11a3 3 0 0 1 3 3v11a4 4 0 0 1-4-4v-7h-9v7a4 4 0 0 1-4 4V46Z" fill="${colors.hair.value}"/>`
98
- ,
99
- freddy: (components, colors)=>`<path d="M28 46a3 3 0 0 1 3-3h9a3 3 0 0 1 3 3H28Z" fill="${colors.hair.value}"/>`
100
- };
101
-
102
-
103
- const $3a6873dc01a09847$export$794fa1d50fd96b0e = {
104
- default: (components, colors)=>`<g fill="#FF859B"><rect x="24" y="39" width="5" height="3" rx="1.5"/><rect x="43" y="39" width="4" height="3" rx="1.5"/></g>`
105
- };
106
-
107
-
108
-
109
-
110
- function $04186d2eae176e36$export$5bc6178a9a86ed74({ prng: prng , group: group , values: values = [] }) {
111
- const componentCollection = $8e018aca75223de3$exports;
112
- const key = prng.pick(values);
113
- if (componentCollection[group][key]) return {
114
- name: key,
115
- value: componentCollection[group][key]
116
- };
117
- else return undefined;
118
- }
119
-
120
-
121
- function $5855dd93fcfe7263$export$4e811121b221213b({ prng: prng , options: options }) {
122
- const headComponent = $04186d2eae176e36$export$5bc6178a9a86ed74({
123
- prng: prng,
124
- group: 'head',
125
- values: options.head
126
- });
127
- const bodyComponent = $04186d2eae176e36$export$5bc6178a9a86ed74({
128
- prng: prng,
129
- group: 'body',
130
- values: options.body
131
- });
132
- const hairComponent = $04186d2eae176e36$export$5bc6178a9a86ed74({
133
- prng: prng,
134
- group: 'hair',
135
- values: options.hair
136
- });
137
- const mouthComponent = $04186d2eae176e36$export$5bc6178a9a86ed74({
138
- prng: prng,
139
- group: 'mouth',
140
- values: options.mouth
141
- });
142
- const eyesComponent = $04186d2eae176e36$export$5bc6178a9a86ed74({
143
- prng: prng,
144
- group: 'eyes',
145
- values: options.eyes
146
- });
147
- const glassesComponent = $04186d2eae176e36$export$5bc6178a9a86ed74({
148
- prng: prng,
149
- group: 'glasses',
150
- values: options.glasses
151
- });
152
- const mustacheComponent = $04186d2eae176e36$export$5bc6178a9a86ed74({
153
- prng: prng,
154
- group: 'mustache',
155
- values: options.mustache
156
- });
157
- const blushesComponent = $04186d2eae176e36$export$5bc6178a9a86ed74({
158
- prng: prng,
159
- group: 'blushes',
160
- values: options.blushes
161
- });
162
- return {
163
- head: headComponent,
164
- body: bodyComponent,
165
- hair: hairComponent,
166
- mouth: mouthComponent,
167
- eyes: eyesComponent,
168
- glasses: prng.bool(options.glassesProbability) ? glassesComponent : undefined,
169
- mustache: prng.bool(options.mustacheProbability) ? mustacheComponent : undefined,
170
- blushes: prng.bool(options.blushesProbability) ? blushesComponent : undefined
171
- };
172
- }
173
-
174
-
175
- var $7ba06e92c09713e0$exports = {};
176
-
177
- $parcel$export($7ba06e92c09713e0$exports, "skin", function () { return $14e8a912334fa70f$export$fcdfe9c56b00fbfc; });
178
- $parcel$export($7ba06e92c09713e0$exports, "hair", function () { return $2a21aa7767470dcc$export$12c365d50e7cb3d6; });
179
- $parcel$export($7ba06e92c09713e0$exports, "body", function () { return $ffa853f7bcce8b3e$export$32180ef41b15b513; });
180
- const $14e8a912334fa70f$export$fcdfe9c56b00fbfc = {
181
- yellow: 'rgba(255, 203, 126, 1)',
182
- white: 'rgba(245, 208, 197, 1)',
183
- dark: 'rgba(131, 96, 85, 1)'
184
- };
185
-
186
-
187
- const $2a21aa7767470dcc$export$12c365d50e7cb3d6 = {
188
- brown: 'rgba(71, 40, 11, 1)',
189
- black: 'rgba(27, 11, 71, 1)',
190
- red: 'rgba(173, 58, 32, 1)'
191
- };
192
-
193
-
194
- const $ffa853f7bcce8b3e$export$32180ef41b15b513 = {
195
- orange: 'rgba(224, 90, 51, 1)',
196
- blue: 'rgba(54, 51, 224, 1)',
197
- pink: 'rgba(255, 77, 216, 1)'
198
- };
199
-
200
-
201
-
202
-
203
- function $4ba1e3cf2531858a$export$c6d89e41e42fa994({ prng: prng , group: group , values: values = [] }) {
204
- const colorCollection = $7ba06e92c09713e0$exports;
205
- if (values.length === 0) values.push('transparent');
206
- const key = prng.pick(values);
207
- var _key;
208
- return {
209
- name: key,
210
- value: (_key = colorCollection[group][key]) !== null && _key !== void 0 ? _key : key
211
- };
212
- }
213
-
214
-
215
- function $e383d835b923bf73$export$6cee60e8aa85e528({ prng: prng , options: options }) {
216
- return {
217
- skin: $4ba1e3cf2531858a$export$c6d89e41e42fa994({
218
- prng: prng,
219
- group: 'skin',
220
- values: options.skinColor
221
- }),
222
- hair: $4ba1e3cf2531858a$export$c6d89e41e42fa994({
223
- prng: prng,
224
- group: 'hair',
225
- values: options.hairColor
226
- }),
227
- body: $4ba1e3cf2531858a$export$c6d89e41e42fa994({
228
- prng: prng,
229
- group: 'body',
230
- values: options.bodyColor
231
- })
232
- };
233
- }
234
-
235
-
236
- function $5d63a8430c0a4ee7$export$19269755e7fb6f76({ prng: prng , options: options , preview: preview }) {
237
- // Write your modifications here
238
- }
239
-
240
-
241
- function $a07f32db8f08f516$export$2538c3cd8a13189f({ prng: prng , options: options , components: components , colors: colors , preview: preview }) {
242
- // Write your modifications here
243
- }
244
-
245
-
246
- const $c8ddf225eb40a0ac$export$62ad7b0c781000e9 = {
247
- head: {
248
- width: 64,
249
- height: 64
250
- },
251
- body: {
252
- width: 64,
253
- height: 64
254
- },
255
- hair: {
256
- width: 64,
257
- height: 64
258
- },
259
- mouth: {
260
- width: 64,
261
- height: 64
262
- },
263
- eyes: {
264
- width: 64,
265
- height: 64
266
- },
267
- glasses: {
268
- width: 64,
269
- height: 64
270
- },
271
- mustache: {
272
- width: 64,
273
- height: 64
274
- },
275
- blushes: {
276
- width: 64,
277
- height: 64
278
- }
279
- };
280
-
281
-
282
- const $fa44ff59bd03c3a8$export$1d567c320f4763bc = {
283
- meta: {
284
- title: 'Miniavs - Free Avatar Creator',
285
- creator: 'Webpixels',
286
- source: 'https://www.figma.com/community/file/923211396597067458',
287
- license: {
288
- name: 'CC BY 4.0',
289
- url: 'https://creativecommons.org/licenses/by/4.0/'
290
- }
291
- },
292
- schema: (/*@__PURE__*/$parcel$interopDefault($22b291b742526db8$exports)),
293
- create: ({ prng: prng , options: options })=>{
294
- var ref, ref1, ref2, ref3, ref4, ref5, ref6;
295
- $5d63a8430c0a4ee7$export$19269755e7fb6f76({
296
- prng: prng,
297
- options: options,
298
- preview: false
299
- });
300
- const components = $5855dd93fcfe7263$export$4e811121b221213b({
301
- prng: prng,
302
- options: options
303
- });
304
- const colors = $e383d835b923bf73$export$6cee60e8aa85e528({
305
- prng: prng,
306
- options: options
307
- });
308
- $a07f32db8f08f516$export$2538c3cd8a13189f({
309
- prng: prng,
310
- options: options,
311
- components: components,
312
- colors: colors,
313
- preview: false
314
- });
315
- var ref7, ref8, ref9, ref10, ref11, ref12, ref13;
316
- return {
317
- attributes: {
318
- viewBox: '0 0 64 64',
319
- fill: 'none',
320
- 'shape-rendering': 'auto'
321
- },
322
- body: `${(ref7 = (ref = components.head) === null || ref === void 0 ? void 0 : ref.value(components, colors)) !== null && ref7 !== void 0 ? ref7 : ''}${(ref8 = (ref1 = components.body) === null || ref1 === void 0 ? void 0 : ref1.value(components, colors)) !== null && ref8 !== void 0 ? ref8 : ''}${(ref9 = (ref2 = components.hair) === null || ref2 === void 0 ? void 0 : ref2.value(components, colors)) !== null && ref9 !== void 0 ? ref9 : ''}<g transform="translate(1)">${(ref10 = (ref3 = components.mouth) === null || ref3 === void 0 ? void 0 : ref3.value(components, colors)) !== null && ref10 !== void 0 ? ref10 : ''}</g><g transform="translate(0 -1)">${(ref11 = (ref4 = components.eyes) === null || ref4 === void 0 ? void 0 : ref4.value(components, colors)) !== null && ref11 !== void 0 ? ref11 : ''}</g>${(ref12 = (ref5 = components.glasses) === null || ref5 === void 0 ? void 0 : ref5.value(components, colors)) !== null && ref12 !== void 0 ? ref12 : ''}${(ref13 = (ref6 = components.mustache) === null || ref6 === void 0 ? void 0 : ref6.value(components, colors)) !== null && ref13 !== void 0 ? ref13 : ''}`
323
- };
324
- },
325
- preview: ({ prng: prng , options: options , property: property })=>{
326
- const componentGroup = property.toString();
327
- const colorGroup = property.toString().replace(/Color$/, '');
328
- $5d63a8430c0a4ee7$export$19269755e7fb6f76({
329
- prng: prng,
330
- options: options,
331
- preview: true
332
- });
333
- const components = $5855dd93fcfe7263$export$4e811121b221213b({
334
- prng: prng,
335
- options: options
336
- });
337
- const colors = $e383d835b923bf73$export$6cee60e8aa85e528({
338
- prng: prng,
339
- options: options
340
- });
341
- $a07f32db8f08f516$export$2538c3cd8a13189f({
342
- prng: prng,
343
- options: options,
344
- components: components,
345
- colors: colors,
346
- preview: true
347
- });
348
- if (componentGroup in components) {
349
- var ref;
350
- const { width: width , height: height } = $c8ddf225eb40a0ac$export$62ad7b0c781000e9[componentGroup];
351
- var ref14;
352
- return {
353
- attributes: {
354
- viewBox: `0 0 ${width} ${height}`,
355
- fill: 'none',
356
- 'shape-rendering': 'auto'
357
- },
358
- body: (ref14 = (ref = components[componentGroup]) === null || ref === void 0 ? void 0 : ref.value(components, colors)) !== null && ref14 !== void 0 ? ref14 : ''
359
- };
360
- }
361
- if (colorGroup in colors) return {
362
- attributes: {
363
- viewBox: `0 0 1 1`,
364
- fill: 'none',
365
- 'shape-rendering': 'auto'
366
- },
367
- body: `<rect width="1" height="1" fill="${colors[colorGroup].value}" />`
368
- };
369
- return undefined;
370
- }
371
- };
372
-
373
-
374
- const { create: $b361a74bf78b498b$export$185802fd694ee1f5 , preview: $b361a74bf78b498b$export$48c2d0f2f545ac27 , meta: $b361a74bf78b498b$export$6990040ee07315 , schema: $b361a74bf78b498b$export$4902baddc787debb } = $fa44ff59bd03c3a8$export$1d567c320f4763bc;
375
-
376
-
377
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;AEAA,yBAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAA4rF;;;;;;;;;;;;;AIMjtF,KAAK,CAAC,yCAAI,GAAmB,CAAC;IACnC,MAAM,GAAG,UAAmC,EAAE,MAA2B,IACtE,qNAAqN,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,0eAA0e;;IACttB,IAAI,GAAG,UAAmC,EAAE,MAA2B,IACpE,mQAAmQ,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,seAAse;;IAChwB,IAAI,GAAG,UAAmC,EAAE,MAA2B,IACpE,2NAA2N,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,gdAAgd;AACpsB,CAAC;;;ACPM,KAAK,CAAC,yCAAI,GAAmB,CAAC;IACnC,MAAM,GAAG,UAAmC,EAAE,MAA2B,IACtE,uDAAuD,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG;;IACjF,IAAI,GAAG,UAAmC,EAAE,MAA2B,IACpE,uDAAuD,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,0DAA0D,EAAE,MA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CAAC,UAAU,EAAE,MAAM,eAApD,KAAqD,cAArD,KAAqD,GAAI,CAAE;YACnE,CAAC;QACH,CAAC;QAED,EAAE,EAAE,UAAU,IAAI,MAAM,EACtB,MAAM,CAAC,CAAC;YACN,UAAU,EAAE,CAAC;gBACX,OAAO,GAAG,OAAO;gBACjB,IAAI,EAAE,CAAM;gBACZ,CAAiB,kBAAE,CAAM;YAC3B,CAAC;YACD,IAAI,GAAG,iCAAiC,EAAE,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,IAAI;QACzE,CAAC;QAGH,MAAM,CAAC,SAAS;IAClB,CAAC;AACH,CAAC;;;ADxED,KAAK,CAAC,CAAC,SAAC,yCAAM,YAAE,yCAAO,SAAE,uCAAI,WAAE,yCAAM,EAAC,CAAC,GAAG,yCAAK","sources":["packages/@dicebear/miniavs/src/index.ts","packages/@dicebear/miniavs/src/core.ts","packages/@dicebear/miniavs/src/schema.json","packages/@dicebear/miniavs/src/utils/getComponents.ts","packages/@dicebear/miniavs/src/utils/pickComponent.ts","packages/@dicebear/miniavs/src/components/index.ts","packages/@dicebear/miniavs/src/components/head.ts","packages/@dicebear/miniavs/src/components/body.ts","packages/@dicebear/miniavs/src/components/hair.ts","packages/@dicebear/miniavs/src/components/mouth.ts","packages/@dicebear/miniavs/src/components/eyes.ts","packages/@dicebear/miniavs/src/components/glasses.ts","packages/@dicebear/miniavs/src/components/mustache.ts","packages/@dicebear/miniavs/src/components/blushes.ts","packages/@dicebear/miniavs/src/utils/getColors.ts","packages/@dicebear/miniavs/src/utils/pickColor.ts","packages/@dicebear/miniavs/src/colors/index.ts","packages/@dicebear/miniavs/src/colors/skin.ts","packages/@dicebear/miniavs/src/colors/hair.ts","packages/@dicebear/miniavs/src/colors/body.ts","packages/@dicebear/miniavs/src/hooks/onPreCreate.ts","packages/@dicebear/miniavs/src/hooks/onPostCreate.ts","packages/@dicebear/miniavs/src/meta/components.ts"],"sourcesContent":["/*!\n * Miniavs (@dicebear/miniavs)\n *\n * Code licensed under MIT License.\n * Copyright (c) 2021 Florian Körner\n *\n * Design \"Miniavs - Free Avatar Creator\" by Webpixels licensed under CC BY 4.0.\n * Source: https://www.figma.com/community/file/923211396597067458\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","import type { Style, StyleSchema } from '@dicebear/core';\nimport type { Options } from './options';\n\nimport schema from './schema.json';\nimport { getComponents } from './utils/getComponents';\nimport { getColors } from './utils/getColors';\nimport { onPreCreate } from './hooks/onPreCreate';\nimport { onPostCreate } from './hooks/onPostCreate';\nimport { dimensions } from './meta/components';\n\nexport const style: Style<Options> = {\n meta: {\n title: 'Miniavs - Free Avatar Creator',\n creator: 'Webpixels',\n source: 'https://www.figma.com/community/file/923211396597067458',\n license: {\n name: 'CC BY 4.0',\n url: 'https://creativecommons.org/licenses/by/4.0/',\n },\n },\n schema: schema as StyleSchema,\n create: ({ prng, options }) => {\n onPreCreate({ prng, options, preview: false });\n\n const components = getComponents({ prng, options });\n const colors = getColors({ prng, options });\n\n onPostCreate({ prng, options, components, colors, preview: false });\n\n return {\n attributes: {\n viewBox: '0 0 64 64',\n fill: 'none',\n 'shape-rendering': 'auto',\n },\n body: `${components.head?.value(components, colors) ?? ''}${\n components.body?.value(components, colors) ?? ''\n }${\n components.hair?.value(components, colors) ?? ''\n }<g transform=\"translate(1)\">${\n components.mouth?.value(components, colors) ?? ''\n }</g><g transform=\"translate(0 -1)\">${\n components.eyes?.value(components, colors) ?? ''\n }</g>${components.glasses?.value(components, colors) ?? ''}${\n components.mustache?.value(components, colors) ?? ''\n }`,\n };\n },\n preview: ({ prng, options, property }) => {\n const componentGroup = property.toString();\n const colorGroup = property.toString().replace(/Color$/, '');\n\n onPreCreate({ prng, options, preview: true });\n\n const components = getComponents({ prng, options });\n const colors = getColors({ prng, options });\n\n onPostCreate({ prng, options, components, colors, preview: true });\n\n if (componentGroup in components) {\n const { width, height } = dimensions[componentGroup]!;\n\n return {\n attributes: {\n viewBox: `0 0 ${width} ${height}`,\n fill: 'none',\n 'shape-rendering': 'auto',\n },\n body: components[componentGroup]?.value(components, colors) ?? '',\n };\n }\n\n if (colorGroup in colors) {\n return {\n attributes: {\n viewBox: `0 0 1 1`,\n fill: 'none',\n 'shape-rendering': 'auto',\n },\n body: `<rect width=\"1\" height=\"1\" fill=\"${colors[colorGroup].value}\" />`,\n };\n }\n\n return undefined;\n },\n};\n","{\n \"title\": \"Options\",\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"properties\": {\n \"blushes\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"enum\": [\"default\"] },\n \"default\": [\"default\"]\n },\n \"blushesProbability\": {\n \"type\": \"integer\",\n \"minimum\": 0,\n \"maximum\": 100,\n \"default\": 50\n },\n \"body\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"enum\": [\"tShirt\", \"golf\"] },\n \"default\": [\"tShirt\", \"golf\"]\n },\n \"bodyColor\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"anyOf\": [\n {\n \"type\": \"string\",\n \"pattern\": \"^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$\"\n },\n { \"type\": \"string\", \"enum\": [\"orange\", \"blue\", \"pink\"] }\n ]\n },\n \"default\": [\"orange\", \"blue\", \"pink\"]\n },\n \"eyes\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"enum\": [\"normal\", \"confident\", \"happy\"] },\n \"default\": [\"normal\", \"confident\", \"happy\"]\n },\n \"glasses\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"enum\": [\"normal\"] },\n \"default\": [\"normal\"]\n },\n \"glassesProbability\": {\n \"type\": \"integer\",\n \"minimum\": 0,\n \"maximum\": 100,\n \"default\": 20\n },\n \"hair\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\n \"balndess\",\n \"slaughter\",\n \"ponyTail\",\n \"long\",\n \"curly\",\n \"stylish\",\n \"elvis\",\n \"classic02\",\n \"classic01\"\n ]\n },\n \"default\": [\n \"balndess\",\n \"slaughter\",\n \"ponyTail\",\n \"long\",\n \"curly\",\n \"stylish\",\n \"elvis\",\n \"classic02\",\n \"classic01\"\n ]\n },\n \"hairColor\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"anyOf\": [\n {\n \"type\": \"string\",\n \"pattern\": \"^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$\"\n },\n { \"type\": \"string\", \"enum\": [\"brown\", \"black\", \"red\"] }\n ]\n },\n \"default\": [\"brown\", \"black\", \"red\"]\n },\n \"head\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"enum\": [\"normal\", \"wide\", \"thin\"] },\n \"default\": [\"normal\", \"wide\", \"thin\"]\n },\n \"mouth\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": { \"type\": \"string\", \"enum\": [\"default\", \"missingTooth\"] },\n \"default\": [\"default\", \"missingTooth\"]\n },\n \"mustache\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\"pencilThinBeard\", \"pencilThin\", \"horshoe\", \"freddy\"]\n },\n \"default\": [\"pencilThinBeard\", \"pencilThin\", \"horshoe\", \"freddy\"]\n },\n \"mustacheProbability\": {\n \"type\": \"integer\",\n \"minimum\": 0,\n \"maximum\": 100,\n \"default\": 20\n },\n \"skinColor\": {\n \"type\": \"array\",\n \"uniqueItems\": true,\n \"items\": {\n \"anyOf\": [\n {\n \"type\": \"string\",\n \"pattern\": \"^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$\"\n },\n { \"type\": \"string\", \"enum\": [\"yellow\", \"white\", \"dark\"] }\n ]\n },\n \"default\": [\"yellow\", \"white\", \"dark\"]\n }\n },\n \"additionalProperties\": false\n}\n","import type { Prng } from '@dicebear/core';\nimport type { Options } from '../options';\nimport type { ComponentPickCollection } from '../static-types';\nimport { pickComponent } from './pickComponent';\n\ntype Props = {\n prng: Prng;\n options: Options;\n};\n\nexport function getComponents({\n prng,\n options,\n}: Props): ComponentPickCollection {\n const headComponent = pickComponent({\n prng,\n group: 'head',\n values: options.head,\n });\n const bodyComponent = pickComponent({\n prng,\n group: 'body',\n values: options.body,\n });\n const hairComponent = pickComponent({\n prng,\n group: 'hair',\n values: options.hair,\n });\n const mouthComponent = pickComponent({\n prng,\n group: 'mouth',\n values: options.mouth,\n });\n const eyesComponent = pickComponent({\n prng,\n group: 'eyes',\n values: options.eyes,\n });\n const glassesComponent = pickComponent({\n prng,\n group: 'glasses',\n values: options.glasses,\n });\n const mustacheComponent = pickComponent({\n prng,\n group: 'mustache',\n values: options.mustache,\n });\n const blushesComponent = pickComponent({\n prng,\n group: 'blushes',\n values: options.blushes,\n });\n\n return {\n head: headComponent,\n body: bodyComponent,\n hair: hairComponent,\n mouth: mouthComponent,\n eyes: eyesComponent,\n glasses: prng.bool(options.glassesProbability)\n ? glassesComponent\n : undefined,\n mustache: prng.bool(options.mustacheProbability)\n ? mustacheComponent\n : undefined,\n blushes: prng.bool(options.blushesProbability)\n ? blushesComponent\n : undefined,\n };\n}\n","import type { Prng } from '@dicebear/core';\nimport type { ComponentGroupCollection, ComponentPick } from '../static-types';\nimport * as components from '../components';\n\ntype Props = {\n prng: Prng;\n group: string;\n values?: string[];\n};\n\nexport function pickComponent({\n prng,\n group,\n values = [],\n}: Props): ComponentPick {\n const componentCollection: ComponentGroupCollection = components;\n\n const key = prng.pick(values);\n\n if (componentCollection[group][key]) {\n return {\n name: key,\n value: componentCollection[group][key],\n };\n } else {\n return undefined;\n }\n}\n","export { head } from './head';\nexport { body } from './body';\nexport { hair } from './hair';\nexport { mouth } from './mouth';\nexport { eyes } from './eyes';\nexport { glasses } from './glasses';\nexport { mustache } from './mustache';\nexport { blushes } from './blushes';\n","import type {\n ComponentGroup,\n ComponentPickCollection,\n ColorPickCollection,\n} from '../static-types';\n\nexport const head: ComponentGroup = {\n normal: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<path d=\"M45.89 36.1c0 8.5-1.26 18.86-10.89 19.82v9.95S31.36 68 26.5 68c-4.86 0-8.5-3.48-8.5-3.48V42a5 5 0 0 1-1.3-9.83C15.36 22.64 17.5 13 32 13c14.59 0 14.24 11.08 13.96 19.81-.04 1.15-.07 2.25-.07 3.29Z\" fill=\"${colors.skin.value}\"/><path d=\"M35 55.92c-.48.05-.98.07-1.5.07-8.88 0-13.9-7.15-15.5-14.6v23.13S21.64 68 26.5 68c4.86 0 8.5-2.13 8.5-2.13v-9.95Z\" fill=\"#000\" fill-opacity=\".07\"/><path d=\"M34.63 55.95c-.37.03-.74.04-1.13.04-6.53 0-10.97-3.86-13.5-8.87V48.24c0 5.38 2.61 9.75 8.28 9.75h1.35c3.34.03 4.59.04 5-2.04ZM16.7 32.17A5 5 0 0 0 18.14 42c-.48-1.98-.71-3.99-.71-5.9a46.7 46.7 0 0 1-.73-3.93Z\" fill=\"#000\" fill-opacity=\".07\"/><rect x=\"36\" y=\"41\" width=\"3\" height=\"2\" rx=\"1\" fill=\"#000\" fill-opacity=\".07\"/>`,\n wide: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<path d=\"M46.07 40.4c.47 7.5.94 15-11.07 15.56v9.91S31.36 68 26.5 68c-4.86 0-8.5-3.48-8.5-3.48V45.1c-.2-1.02-.33-2.06-.41-3.12a5 5 0 0 1-.9-9.8C15.37 22.63 17.52 13 32 13c14.59 0 14.24 11.08 13.96 19.81-.04 1.15-.07 2.25-.07 3.29 0 1.4.09 2.86.18 4.3Z\" fill=\"${colors.skin.value}\"/><path d=\"M17.59 41.98c-.16-1.97-.16-3.97-.16-5.88a46.7 46.7 0 0 1-.73-3.93 5 5 0 0 0 .89 9.81ZM18 45.1v19.42S21.64 68 26.5 68c4.86 0 8.5-2.13 8.5-2.13v-9.91c-.48.02-.98.03-1.5.03-10.79 0-14.34-4.95-15.5-10.9Z\" fill=\"#000\" fill-opacity=\".07\"/><path d=\"M34.93 55.96c-.46.02-.93.03-1.43.03-7.25 0-11.23-2.23-13.41-5.5.5 4.82 3.16 8.5 8.3 8.5h1.36c3.8.03 4.92.04 5.18-3.03Z\" fill=\"#000\" fill-opacity=\".07\"/><rect x=\"36\" y=\"41\" width=\"3\" height=\"2\" rx=\"1\" fill=\"#000\" fill-opacity=\".07\"/>`,\n thin: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<path d=\"M45.89 36.1c0 8.92-3.9 18.9-10.39 20.4l-.5-.06v9.43S31.36 68 26.5 68c-4.86 0-8.5-3.48-8.5-3.48V42a5 5 0 0 1-1.3-9.83C15.36 22.64 17.5 13 32 13c14.59 0 14.24 11.08 13.96 19.81-.04 1.15-.07 2.25-.07 3.29Z\" fill=\"${colors.skin.value}\"/><path d=\"M18 42v22.52S21.64 68 26.5 68c4.86 0 8.5-2.13 8.5-2.13v-9.43c-7.26-1.02-13.9-7.5-16.45-14.47-.18.02-.37.03-.55.03Z\" fill=\"#000\" fill-opacity=\".07\"/><path d=\"M16.7 32.17a5 5 0 0 0 1.85 9.8 17.14 17.14 0 0 1-1.12-5.87 46.7 46.7 0 0 1-.73-3.93ZM34.7 56.4c-6.75-1.1-12.9-6.87-15.7-13.3v.4c0 5.65 6.27 14.47 9.38 15.49 2.57.83 5.4.65 6.32-2.6Z\" fill=\"#000\" fill-opacity=\".07\"/><rect x=\"36\" y=\"41\" width=\"3\" height=\"2\" rx=\"1\" fill=\"#000\" fill-opacity=\".07\"/>`,\n};\n","import type {\n ComponentGroup,\n ComponentPickCollection,\n ColorPickCollection,\n} from '../static-types';\n\nexport const body: ComponentGroup = {\n tShirt: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<rect x=\"7\" y=\"60\" width=\"40\" height=\"23\" rx=\"9\" fill=\"${colors.body.value}\"/>`,\n golf: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<rect x=\"7\" y=\"60\" width=\"40\" height=\"23\" rx=\"9\" fill=\"${colors.body.value}\"/><path d=\"M17 58h19v3s-5 1-9.5 1-9.5-1-9.5-1v-3Z\" fill=\"${colors.body.value}\"/><path d=\"M17 58h19v2s-3 1.5-9.5 1.5S17 60 17 60v-2Z\" fill=\"#000\" fill-opacity=\".2\"/><path d=\"M16.5 59c0-1.1.9-2 2-2h16a2 2 0 0 1 2 2s-5 1-10 1-10-1-10-1Z\" fill=\"${colors.body.value}\"/>`,\n};\n","import type {\n ComponentGroup,\n ComponentPickCollection,\n ColorPickCollection,\n} from '../static-types';\n\nexport const hair: ComponentGroup = {\n balndess: (\n components: ComponentPickCollection,\n colors: ColorPickCollection\n ) =>\n `<g fill=\"${colors.hair.value}\"><rect x=\"14\" y=\"26\" width=\"9\" height=\"2\" rx=\"1\"/><rect x=\"14\" y=\"33\" width=\"7\" height=\"2\" rx=\"1\"/><rect x=\"12\" y=\"29\" width=\"13\" height=\"3\" rx=\"1.5\"/></g>`,\n slaughter: (\n components: ComponentPickCollection,\n colors: ColorPickCollection\n ) =>\n `<path d=\"M24 25c0 .53-.1 1.04-.3 1.5A3.99 3.99 0 0 1 20 32a4 4 0 0 1-8 0c0-1.05.07-2.78.37-4.32a4 4 0 0 1 4.8-5.5A3.99 3.99 0 0 1 24 25ZM45.85 33.9a4 4 0 0 0 2.78-5.4 3.99 3.99 0 0 0-3.13-5.46c.6 3.14.48 6.61.38 9.78 0 .36-.02.72-.03 1.07Z\" fill=\"${colors.hair.value}\"/>`,\n ponyTail: (\n components: ComponentPickCollection,\n colors: ColorPickCollection\n ) =>\n `<path d=\"M0 10c8-8 13 3 13 3l-2 8s-2 2.5 0 10-2.5 11.5-2.5 11.5S5 45 2 43s-3.4-3.92-3-7.5c.5-4.5 2-3 2-7.5s-9-10-1-18Z\" fill=\"${colors.hair.value}\"/><path d=\"m13.03 13.18 5.5 2.38-3.56 8.26-5.51-2.38S8.5 19.5 10 16.5c1.5-3 3.03-3.32 3.03-3.32Z\" fill=\"#FF6C98\"/><path d=\"m18 41-1.32-8.82A5 5 0 0 0 18 42v8.3c-1.55-1.37-2.93-3-4.08-4.83-1.7-2.7-2.9-5.8-3.48-9.1-.6-3.28-.58-6.68.04-9.96a25.57 25.57 0 0 1 3.55-9.05 21.32 21.32 0 0 1 6.43-6.5A17.85 17.85 0 0 1 31 8c2.5 0 4.97.45 7.27 1.33 2.3.88 4.4 2.17 6.16 3.8a17.48 17.48 0 0 1 4.12 5.67c.75 1.66 1.21 3.42 1.38 5.2H50v4.29s-.33.15-1 .36v8.5s0 1.4-1.5 2.45c-.52.36-1.22.64-1.9.85.19-1.45.29-2.91.29-4.35 0-1.04.03-2.14.07-3.29.04-1.11.07-2.27.08-3.44-1.85.34-4.37.63-7.58.63C30.62 30 26 28.29 26 28.29v-1A26.13 26.13 0 0 0 24 31c-.75 1.75-.75 3.54-.75 5.05 0 1.5 0 2.73-.75 3.34-1.5 1.2-4.5 1.6-4.5 1.6Z\" fill=\"${colors.hair.value}\"/>`,\n long: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M48 25a18 18 0 0 0-36-.5V65h11V34.6a65.12 65.12 0 0 0 12.2-3.76 53.45 53.45 0 0 0 10.68-5.64c.24 2.53.15 5.16.08 7.61-.04 1.15-.08 2.25-.08 3.29 0 .4 0 .82-.02 1.23.23-.07.45-.15.64-.24 1.5-.69 1.5-1.6 1.5-1.6V25Zm-33 8a4.98 4.98 0 0 0 0 8v-8Z\" fill=\"${colors.hair.value}\"/>`,\n curly: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<g fill=\"${colors.hair.value}\"><path d=\"M45.97 32.48a4 4 0 0 0 1.78-4.88 4 4 0 0 0-2.97-7.41c1.42 3.67 1.31 8.22 1.19 12.3Z\"/><path d=\"M36.3 22.76a4.98 4.98 0 0 1-6.36.2 6.98 6.98 0 0 1-6.99 1.74c-.26.28-.56.53-.89.73a3.98 3.98 0 0 1-1.35 6.19c.2.24.3.55.3.88a1.5 1.5 0 0 1-1.53 1.5 4 4 0 0 1-7.3-3.17 3.99 3.99 0 0 1 0-5.66 4 4 0 0 1 .74-3.71 7 7 0 0 1 4.1-10.17V11a4 4 0 0 1 5.94-3.5 7 7 0 0 1 9.8-2.42 6.48 6.48 0 0 1 10.78 1.95 4 4 0 0 1 3.43 4.58 7.33 7.33 0 0 1 3.05 5.9c0 4.14-3.58 7.5-8 7.5a8.25 8.25 0 0 1-5.7-2.24Z\"/></g>`,\n stylish: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<path d=\"M20.67 28.22v6.02c0 .76-.67 1.76-1.17 2.26-.5.5-2 1.5-2.85 1.5-.85 0-3.54-.45-4.83-2.26-1.28-1.8-.89-11.32 0-13.54.9-2.21 4.19-6.88 8.85-10.45a26.26 26.26 0 0 1 12.88-5.34C58.48 3.4 49.22 20.99 46 25.5c-5.5-2-9.5-2.5-16.72-1.53-7.21.99-8.01 1.99-8.6 4.24Z\" fill=\"${colors.hair.value}\"/>`,\n elvis: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<path d=\"M22 28c-.63 3 1 6.98 1 7.74 0 .77-3.93 3.03-5 3.76-1.07.73-1.5-7-1.5-7-3 0-3.5 5.5-3.5 5.5s-2.25-.74-3-4.5c-.51-2.54.3-8.09.5-9.5.5-3.5 1-11.5 7.5-15.5s23-4 27-3C54.9 7.97 56.22 21.5 53 26c-5 5.5-19-1-23.5-1s-6.87 0-7.5 3Z\" fill=\"${colors.hair.value}\"/>`,\n classic02: (\n components: ComponentPickCollection,\n colors: ColorPickCollection\n ) =>\n `<path d=\"M28.12 27.47C35.92 28.6 49.6 30.6 51 18 52 9 38.5-1.5 24 8c-9.1 1.35-11.39 8.28-11.9 14.26a3.99 3.99 0 0 0-.8 4.24 3.99 3.99 0 0 0 .87 4.33A4 4 0 1 0 20 32a4 4 0 0 0 3.87-5H24c.95 0 2.4.21 4.12.47Z\" fill=\"${colors.hair.value}\"/>`,\n classic01: (\n components: ComponentPickCollection,\n colors: ColorPickCollection\n ) =>\n `<path d=\"M29.7 26.2c5.6 1.87 13.39 4.45 21.53-3.7 4-4-14-21-28.5-11.5-11.33 1.68-10.68 8.47-10.18 13.71.1 1 .18 1.95.18 2.8 0 .52.07.92.2 1.2-.16 1.24-.2 2.48-.2 3.3a4 4 0 1 0 8 0A4 4 0 0 0 24.61 27h.12a4 4 0 0 0 3.06-1.41c.6.18 1.24.4 1.9.61Z\" fill=\"${colors.hair.value}\"/>`,\n};\n","import type {\n ComponentGroup,\n ComponentPickCollection,\n ColorPickCollection,\n} from '../static-types';\n\nexport const mouth: ComponentGroup = {\n default: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<path d=\"M27.93 46a1 1 0 0 1 1-1h9.14a1 1 0 0 1 1 1 5 5 0 0 1-5 5h-1.14a5 5 0 0 1-5-5Z\" fill=\"#66253C\"/><path d=\"M35.76 50.7a5 5 0 0 1-1.69.3h-1.14a5 5 0 0 1-5-4.8c.77-.29 1.9-.25 3.02-.22L32 46c2.21 0 4 1.57 4 3.5 0 .42-.09.83-.24 1.2Z\" fill=\"#B03E67\"/><path d=\"M29 45h10v1a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-1Z\" fill=\"#fff\"/>`,\n missingTooth: (\n components: ComponentPickCollection,\n colors: ColorPickCollection\n ) =>\n `<path d=\"M27.93 46a1 1 0 0 1 1-1h9.14a1 1 0 0 1 1 1 5 5 0 0 1-5 5h-1.14a5 5 0 0 1-5-5Z\" fill=\"#66253C\"/><path d=\"M35.76 50.7a5 5 0 0 1-1.69.3h-1.14a5 5 0 0 1-5-4.8c.77-.29 1.9-.25 3.02-.22L32 46c2.21 0 4 1.57 4 3.5 0 .42-.09.83-.24 1.2Z\" fill=\"#B03E67\"/><path d=\"M29 45h10v1a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-1Z\" fill=\"#fff\"/><path d=\"M31 45.3c0-.17.13-.3.3-.3h1.4c.17 0 .3.13.3.3v2.4a.3.3 0 0 1-.3.3h-1.4a.3.3 0 0 1-.3-.3v-2.4Z\" fill=\"#B03E67\"/>`,\n};\n","import type {\n ComponentGroup,\n ComponentPickCollection,\n ColorPickCollection,\n} from '../static-types';\n\nexport const eyes: ComponentGroup = {\n normal: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<g fill=\"${\n colors.hair.value\n }\"><rect x=\"30\" y=\"36\" width=\"3\" height=\"4\" rx=\"1.5\"/><rect x=\"40\" y=\"36\" width=\"3\" height=\"4\" rx=\"1.5\"/></g>${\n components.blushes?.value(components, colors) ?? ''\n }`,\n confident: (\n components: ComponentPickCollection,\n colors: ColorPickCollection\n ) =>\n `${\n components.blushes?.value(components, colors) ?? ''\n }<path d=\"M43 37.5a1.5 1.5 0 0 1-3 0v-1.23c0-.15.12-.27.27-.27h2.46c.15 0 .27.12.27.27v1.23ZM33 37.5a1.5 1.5 0 0 1-3 0v-1.23c0-.15.12-.27.27-.27h2.46c.15 0 .27.12.27.27v1.23Z\" fill=\"${\n colors.hair.value\n }\"/><path stroke=\"${\n colors.hair.value\n }\" stroke-linecap=\"round\" d=\"M29.5 36.5h4M39.5 36.5h4\"/>`,\n happy: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `${\n components.blushes?.value(components, colors) ?? ''\n }<path d=\"M30 37.5a1.5 1.5 0 0 1 3 0v1.23c0 .15-.12.27-.27.27h-2.46a.27.27 0 0 1-.27-.27V37.5ZM40 37.5a1.5 1.5 0 0 1 3 0v1.23c0 .15-.12.27-.27.27h-2.46a.27.27 0 0 1-.27-.27V37.5Z\" fill=\"#1B0B47\"/>`,\n};\n","import type {\n ComponentGroup,\n ComponentPickCollection,\n ColorPickCollection,\n} from '../static-types';\n\nexport const glasses: ComponentGroup = {\n normal: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<g stroke=\"#000\" stroke-width=\"2\"><circle cx=\"30.27\" cy=\"36.27\" r=\"4.27\"/><circle cx=\"44.27\" cy=\"36.27\" r=\"4.27\"/><path d=\"m33.99 35.11 7-.1\"/></g>`,\n};\n","import type {\n ComponentGroup,\n ComponentPickCollection,\n ColorPickCollection,\n} from '../static-types';\n\nexport const mustache: ComponentGroup = {\n pencilThinBeard: (\n components: ComponentPickCollection,\n colors: ColorPickCollection\n ) =>\n `<path d=\"M26.5 45s4.5-.5 11-2v2c-1.5.67-5.5 1.6-7.5 2-2.5.5-3.5-2-3.5-2ZM48 44.76S44 44 38 43v2c1.43.59 4.6 1.15 6.5 1.5 2.38.44 3.5-1.74 3.5-1.74ZM33.31 55.24a1 1 0 0 1 .97-1.24h3.44a1 1 0 0 1 .97 1.24l-.25 1a1 1 0 0 1-.97.76h-2.94a1 1 0 0 1-.97-.76l-.25-1Z\" fill=\"${colors.hair.value}\"/>`,\n pencilThin: (\n components: ComponentPickCollection,\n colors: ColorPickCollection\n ) =>\n `<path d=\"M37.5 43c-6.5 1.5-11 2-11 2s1 2.5 3.5 2c2-.4 6-1.33 7.5-2v-2ZM38 43c6 1 10 1.76 10 1.76s-1.12 2.18-3.5 1.74l-.32-.06c-1.92-.35-4.83-.89-6.18-1.44v-2Z\" fill=\"${colors.hair.value}\"/>`,\n horshoe: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<path d=\"M27 46a3 3 0 0 1 3-3h11a3 3 0 0 1 3 3v11a4 4 0 0 1-4-4v-7h-9v7a4 4 0 0 1-4 4V46Z\" fill=\"${colors.hair.value}\"/>`,\n freddy: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<path d=\"M28 46a3 3 0 0 1 3-3h9a3 3 0 0 1 3 3H28Z\" fill=\"${colors.hair.value}\"/>`,\n};\n","import type {\n ComponentGroup,\n ComponentPickCollection,\n ColorPickCollection,\n} from '../static-types';\n\nexport const blushes: ComponentGroup = {\n default: (components: ComponentPickCollection, colors: ColorPickCollection) =>\n `<g fill=\"#FF859B\"><rect x=\"24\" y=\"39\" width=\"5\" height=\"3\" rx=\"1.5\"/><rect x=\"43\" y=\"39\" width=\"4\" height=\"3\" rx=\"1.5\"/></g>`,\n};\n","import type { Prng } from '@dicebear/core';\nimport type { Options } from '../options';\nimport type { ColorPickCollection } from '../static-types';\nimport { pickColor } from './pickColor';\n\ntype Props = {\n prng: Prng;\n options: Options;\n};\n\nexport function getColors({ prng, options }: Props): ColorPickCollection {\n return {\n skin: pickColor({\n prng,\n group: 'skin',\n values: options.skinColor,\n }),\n hair: pickColor({\n prng,\n group: 'hair',\n values: options.hairColor,\n }),\n body: pickColor({\n prng,\n group: 'body',\n values: options.bodyColor,\n }),\n };\n}\n","import type { Prng } from '@dicebear/core';\nimport type { ColorGroupCollection, ColorPick } from '../static-types';\nimport * as colors from '../colors';\n\ntype Props = {\n prng: Prng;\n group: string;\n values?: string[];\n};\n\nexport function pickColor({ prng, group, values = [] }: Props): ColorPick {\n const colorCollection: ColorGroupCollection = colors;\n\n if (values.length === 0) {\n values.push('transparent');\n }\n\n const key = prng.pick(values);\n\n return {\n name: key,\n value: colorCollection[group][key] ?? key,\n };\n}\n","export { skin } from './skin';\nexport { hair } from './hair';\nexport { body } from './body';\n","import type { ColorGroup } from '../static-types';\n\nexport const skin: ColorGroup = {\n yellow: 'rgba(255, 203, 126, 1)',\n white: 'rgba(245, 208, 197, 1)',\n dark: 'rgba(131, 96, 85, 1)',\n};\n","import type { ColorGroup } from '../static-types';\n\nexport const hair: ColorGroup = {\n brown: 'rgba(71, 40, 11, 1)',\n black: 'rgba(27, 11, 71, 1)',\n red: 'rgba(173, 58, 32, 1)',\n};\n","import type { ColorGroup } from '../static-types';\n\nexport const body: ColorGroup = {\n orange: 'rgba(224, 90, 51, 1)',\n blue: 'rgba(54, 51, 224, 1)',\n pink: 'rgba(255, 77, 216, 1)',\n};\n","import { Prng, StyleOptions } from '@dicebear/core';\n\nimport { Options } from '../options';\n\ntype Props = { prng: Prng; options: StyleOptions<Options>; preview: boolean };\n\nexport function onPreCreate({ prng, options, preview }: Props) {\n // Write your modifications here\n}\n","import { Prng, StyleOptions } from '@dicebear/core';\n\nimport { Options } from '../options';\nimport { ColorPickCollection, ComponentPickCollection } from '../static-types';\n\ntype Props = {\n prng: Prng;\n options: StyleOptions<Options>;\n components: ComponentPickCollection;\n colors: ColorPickCollection;\n preview: boolean;\n};\n\nexport function onPostCreate({\n prng,\n options,\n components,\n colors,\n preview,\n}: Props) {\n // Write your modifications here\n}\n","export const dimensions: Record<string, { width: number; height: number }> = {\n head: {\n width: 64,\n height: 64,\n },\n body: {\n width: 64,\n height: 64,\n },\n hair: {\n width: 64,\n height: 64,\n },\n mouth: {\n width: 64,\n height: 64,\n },\n eyes: {\n width: 64,\n height: 64,\n },\n glasses: {\n width: 64,\n height: 64,\n },\n mustache: {\n width: 64,\n height: 64,\n },\n blushes: {\n width: 64,\n height: 64,\n },\n};\n"],"names":[],"version":3,"file":"index.js.map"}