@dicebear/micah 5.0.0-alpha.31 → 5.0.0-alpha.35

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 (68) hide show
  1. package/README.md +3 -3
  2. package/lib/components/base.d.ts +6 -0
  3. package/lib/components/base.js +7 -4
  4. package/lib/components/earrings.d.ts +6 -0
  5. package/lib/components/earrings.js +8 -2
  6. package/lib/components/ears.d.ts +6 -0
  7. package/lib/components/ears.js +8 -8
  8. package/lib/components/eyebrows.d.ts +6 -0
  9. package/lib/components/eyebrows.js +10 -4
  10. package/lib/components/eyes.d.ts +6 -0
  11. package/lib/components/eyes.js +10 -16
  12. package/lib/components/facialHair.d.ts +6 -0
  13. package/lib/components/facialHair.js +8 -3
  14. package/lib/components/glasses.d.ts +6 -0
  15. package/lib/components/glasses.js +8 -2
  16. package/lib/components/hair.d.ts +6 -0
  17. package/lib/components/hair.js +14 -8
  18. package/lib/components/index.d.ts +6 -0
  19. package/lib/components/index.js +6 -0
  20. package/lib/components/mouth.d.ts +6 -0
  21. package/lib/components/mouth.js +14 -8
  22. package/lib/components/nose.d.ts +6 -0
  23. package/lib/components/nose.js +9 -3
  24. package/lib/components/shirt.d.ts +6 -0
  25. package/lib/components/shirt.js +9 -3
  26. package/lib/core.d.ts +6 -0
  27. package/lib/core.js +7 -1
  28. package/lib/hooks/onPostCreate.d.ts +8 -2
  29. package/lib/hooks/onPostCreate.js +8 -2
  30. package/lib/hooks/onPreCreate.d.ts +8 -2
  31. package/lib/hooks/onPreCreate.js +10 -17
  32. package/lib/index.d.ts +5 -10
  33. package/lib/index.js +7 -1
  34. package/lib/schema.d.ts +6 -0
  35. package/lib/schema.js +337 -395
  36. package/lib/types.d.ts +7 -8
  37. package/lib/types.js +6 -0
  38. package/lib/utils/getColors.d.ts +6 -0
  39. package/lib/utils/getColors.js +18 -51
  40. package/lib/utils/getComponents.d.ts +7 -1
  41. package/lib/utils/getComponents.js +30 -29
  42. package/lib/utils/pickComponent.d.ts +7 -1
  43. package/lib/utils/pickComponent.js +8 -2
  44. package/package.json +4 -4
  45. package/lib/colors/base.d.ts +0 -2
  46. package/lib/colors/base.js +0 -15
  47. package/lib/colors/earring.d.ts +0 -2
  48. package/lib/colors/earring.js +0 -15
  49. package/lib/colors/eyeShadow.d.ts +0 -2
  50. package/lib/colors/eyeShadow.js +0 -15
  51. package/lib/colors/eyebrows.d.ts +0 -2
  52. package/lib/colors/eyebrows.js +0 -15
  53. package/lib/colors/eyes.d.ts +0 -2
  54. package/lib/colors/eyes.js +0 -15
  55. package/lib/colors/facialHair.d.ts +0 -2
  56. package/lib/colors/facialHair.js +0 -15
  57. package/lib/colors/glasses.d.ts +0 -2
  58. package/lib/colors/glasses.js +0 -15
  59. package/lib/colors/hair.d.ts +0 -2
  60. package/lib/colors/hair.js +0 -15
  61. package/lib/colors/index.d.ts +0 -10
  62. package/lib/colors/index.js +0 -10
  63. package/lib/colors/mouth.d.ts +0 -2
  64. package/lib/colors/mouth.js +0 -3
  65. package/lib/colors/shirt.d.ts +0 -2
  66. package/lib/colors/shirt.js +0 -15
  67. package/lib/utils/pickColor.d.ts +0 -9
  68. package/lib/utils/pickColor.js +0 -13
package/lib/types.d.ts CHANGED
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
+ *
4
+ * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
6
+ */
1
7
  export interface Options {
2
8
  base?: ('standard')[];
3
9
  mouth?: ('surprised' | 'laughing' | 'nervous' | 'smile' | 'sad' | 'pucker' | 'frown' | 'smirk')[];
@@ -25,14 +31,7 @@ export interface Options {
25
31
  shirtColor?: string[];
26
32
  eyesColor?: string[];
27
33
  }
28
- export declare type ColorGroup = Record<string, ColorGroupItem>;
29
- export declare type ColorGroupCollection = Record<string, ColorGroup>;
30
- export declare type ColorGroupItem = string;
31
- export declare type ColorPickCollection = Record<string, ColorPick>;
32
- export declare type ColorPick = {
33
- name: string;
34
- value: ColorGroupItem;
35
- };
34
+ export declare type ColorPickCollection = Record<string, string>;
36
35
  export declare type ComponentGroup = Record<string, ComponentGroupItem>;
37
36
  export declare type ComponentGroupCollection = Record<string, ComponentGroup>;
38
37
  export declare type ComponentGroupItem = (components: ComponentPickCollection, colors: ColorPickCollection) => string;
package/lib/types.js CHANGED
@@ -1 +1,7 @@
1
+ /**
2
+ * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
+ *
4
+ * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
6
+ */
1
7
  export {};
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
+ *
4
+ * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
6
+ */
1
7
  import type { Prng } from '@dicebear/core';
2
8
  import type { Options, ColorPickCollection } from '../types.js';
3
9
  declare type Props = {
@@ -1,55 +1,22 @@
1
- import { pickColor } from './pickColor.js';
1
+ /**
2
+ * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
+ *
4
+ * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
6
+ */
2
7
  export function getColors({ prng, options }) {
8
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
3
9
  return {
4
- base: pickColor({
5
- prng,
6
- group: 'base',
7
- values: options.baseColor,
8
- }),
9
- earring: pickColor({
10
- prng,
11
- group: 'earring',
12
- values: options.earringColor,
13
- }),
14
- eyeShadow: pickColor({
15
- prng,
16
- group: 'eyeShadow',
17
- values: options.eyeShadowColor,
18
- }),
19
- eyebrows: pickColor({
20
- prng,
21
- group: 'eyebrows',
22
- values: options.eyebrowsColor,
23
- }),
24
- facialHair: pickColor({
25
- prng,
26
- group: 'facialHair',
27
- values: options.facialHairColor,
28
- }),
29
- glasses: pickColor({
30
- prng,
31
- group: 'glasses',
32
- values: options.glassesColor,
33
- }),
34
- hair: pickColor({
35
- prng,
36
- group: 'hair',
37
- values: options.hairColor,
38
- }),
39
- mouth: pickColor({
40
- prng,
41
- group: 'mouth',
42
- values: options.mouthColor,
43
- }),
44
- shirt: pickColor({
45
- prng,
46
- group: 'shirt',
47
- values: options.shirtColor,
48
- }),
49
- eyes: pickColor({
50
- prng,
51
- group: 'eyes',
52
- values: options.eyesColor,
53
- }),
10
+ 'base': (_b = prng.pick((_a = options.baseColor) !== null && _a !== void 0 ? _a : [])) !== null && _b !== void 0 ? _b : 'transparent',
11
+ 'earring': (_d = prng.pick((_c = options.earringColor) !== null && _c !== void 0 ? _c : [])) !== null && _d !== void 0 ? _d : 'transparent',
12
+ 'eyeShadow': (_f = prng.pick((_e = options.eyeShadowColor) !== null && _e !== void 0 ? _e : [])) !== null && _f !== void 0 ? _f : 'transparent',
13
+ 'eyebrows': (_h = prng.pick((_g = options.eyebrowsColor) !== null && _g !== void 0 ? _g : [])) !== null && _h !== void 0 ? _h : 'transparent',
14
+ 'facialHair': (_k = prng.pick((_j = options.facialHairColor) !== null && _j !== void 0 ? _j : [])) !== null && _k !== void 0 ? _k : 'transparent',
15
+ 'glasses': (_m = prng.pick((_l = options.glassesColor) !== null && _l !== void 0 ? _l : [])) !== null && _m !== void 0 ? _m : 'transparent',
16
+ 'hair': (_p = prng.pick((_o = options.hairColor) !== null && _o !== void 0 ? _o : [])) !== null && _p !== void 0 ? _p : 'transparent',
17
+ 'mouth': (_r = prng.pick((_q = options.mouthColor) !== null && _q !== void 0 ? _q : [])) !== null && _r !== void 0 ? _r : 'transparent',
18
+ 'shirt': (_t = prng.pick((_s = options.shirtColor) !== null && _s !== void 0 ? _s : [])) !== null && _t !== void 0 ? _t : 'transparent',
19
+ 'eyes': (_v = prng.pick((_u = options.eyesColor) !== null && _u !== void 0 ? _u : [])) !== null && _v !== void 0 ? _v : 'transparent',
54
20
  };
55
21
  }
22
+ ;
@@ -1,8 +1,14 @@
1
+ /**
2
+ * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
+ *
4
+ * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
6
+ */
1
7
  import type { Prng } from '@dicebear/core';
2
8
  import type { Options, ComponentPickCollection } from '../types.js';
3
9
  declare type Props = {
4
10
  prng: Prng;
5
11
  options: Options;
6
12
  };
7
- export declare function getComponents({ prng, options, }: Props): ComponentPickCollection;
13
+ export declare function getComponents({ prng, options }: Props): ComponentPickCollection;
8
14
  export {};
@@ -1,77 +1,78 @@
1
+ /**
2
+ * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
+ *
4
+ * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
6
+ */
1
7
  import { pickComponent } from './pickComponent.js';
2
- export function getComponents({ prng, options, }) {
8
+ export function getComponents({ prng, options }) {
3
9
  const baseComponent = pickComponent({
4
10
  prng,
5
11
  group: 'base',
6
- values: options.base,
12
+ values: options.base
7
13
  });
8
14
  const mouthComponent = pickComponent({
9
15
  prng,
10
16
  group: 'mouth',
11
- values: options.mouth,
17
+ values: options.mouth
12
18
  });
13
19
  const eyebrowsComponent = pickComponent({
14
20
  prng,
15
21
  group: 'eyebrows',
16
- values: options.eyebrows,
22
+ values: options.eyebrows
17
23
  });
18
24
  const hairComponent = pickComponent({
19
25
  prng,
20
26
  group: 'hair',
21
- values: options.hair,
27
+ values: options.hair
22
28
  });
23
29
  const eyesComponent = pickComponent({
24
30
  prng,
25
31
  group: 'eyes',
26
- values: options.eyes,
32
+ values: options.eyes
27
33
  });
28
34
  const noseComponent = pickComponent({
29
35
  prng,
30
36
  group: 'nose',
31
- values: options.nose,
37
+ values: options.nose
32
38
  });
33
39
  const earsComponent = pickComponent({
34
40
  prng,
35
41
  group: 'ears',
36
- values: options.ears,
42
+ values: options.ears
37
43
  });
38
44
  const shirtComponent = pickComponent({
39
45
  prng,
40
46
  group: 'shirt',
41
- values: options.shirt,
47
+ values: options.shirt
42
48
  });
43
49
  const earringsComponent = pickComponent({
44
50
  prng,
45
51
  group: 'earrings',
46
- values: options.earrings,
52
+ values: options.earrings
47
53
  });
48
54
  const glassesComponent = pickComponent({
49
55
  prng,
50
56
  group: 'glasses',
51
- values: options.glasses,
57
+ values: options.glasses
52
58
  });
53
59
  const facialHairComponent = pickComponent({
54
60
  prng,
55
61
  group: 'facialHair',
56
- values: options.facialHair,
62
+ values: options.facialHair
57
63
  });
58
64
  return {
59
- base: baseComponent,
60
- mouth: mouthComponent,
61
- eyebrows: eyebrowsComponent,
62
- hair: prng.bool(options.hairProbability) ? hairComponent : undefined,
63
- eyes: eyesComponent,
64
- nose: noseComponent,
65
- ears: earsComponent,
66
- shirt: shirtComponent,
67
- earrings: prng.bool(options.earringsProbability)
68
- ? earringsComponent
69
- : undefined,
70
- glasses: prng.bool(options.glassesProbability)
71
- ? glassesComponent
72
- : undefined,
73
- facialHair: prng.bool(options.facialHairProbability)
74
- ? facialHairComponent
75
- : undefined,
65
+ 'base': baseComponent,
66
+ 'mouth': mouthComponent,
67
+ 'eyebrows': eyebrowsComponent,
68
+ 'hair': prng.bool(options.hairProbability) ? hairComponent : undefined,
69
+ 'eyes': eyesComponent,
70
+ 'nose': noseComponent,
71
+ 'ears': earsComponent,
72
+ 'shirt': shirtComponent,
73
+ 'earrings': prng.bool(options.earringsProbability) ? earringsComponent : undefined,
74
+ 'glasses': prng.bool(options.glassesProbability) ? glassesComponent : undefined,
75
+ 'facialHair': prng.bool(options.facialHairProbability) ? facialHairComponent : undefined,
76
76
  };
77
77
  }
78
+ ;
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
+ *
4
+ * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
6
+ */
1
7
  import type { Prng } from '@dicebear/core';
2
8
  import type { ComponentPick } from '../types.js';
3
9
  declare type Props = {
@@ -5,5 +11,5 @@ declare type Props = {
5
11
  group: string;
6
12
  values?: string[];
7
13
  };
8
- export declare function pickComponent({ prng, group, values, }: Props): ComponentPick;
14
+ export declare function pickComponent({ prng, group, values }: Props): ComponentPick;
9
15
  export {};
@@ -1,8 +1,14 @@
1
+ /**
2
+ * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
+ *
4
+ * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
6
+ */
1
7
  import * as components from '../components/index.js';
2
- export function pickComponent({ prng, group, values = [], }) {
8
+ export function pickComponent({ prng, group, values = [] }) {
3
9
  const componentCollection = components;
4
10
  const key = prng.pick(values);
5
- if (componentCollection[group][key]) {
11
+ if (key && componentCollection[group][key]) {
6
12
  return {
7
13
  name: key,
8
14
  value: componentCollection[group][key],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dicebear/micah",
3
- "version": "5.0.0-alpha.31",
3
+ "version": "5.0.0-alpha.35",
4
4
  "description": "Avatar style for DiceBear",
5
5
  "keywords": [
6
6
  "dicebear"
@@ -28,14 +28,14 @@
28
28
  "test": "uvu tests"
29
29
  },
30
30
  "devDependencies": {
31
- "@dicebear/core": "^5.0.0-alpha.31",
31
+ "@dicebear/core": "^5.0.0-alpha.35",
32
32
  "@tsconfig/recommended": "^1.0.1",
33
33
  "del-cli": "^4.0.1",
34
34
  "typescript": "^4.6.3",
35
35
  "uvu": "^0.5.3"
36
36
  },
37
37
  "peerDependencies": {
38
- "@dicebear/core": "^5.0.0-alpha.16"
38
+ "@dicebear/core": "^5.0.0-alpha.32"
39
39
  },
40
40
  "engines": {
41
41
  "node": "^14.13.1 || >=16.0.0"
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "088e33eb5bc45d01c9b6350011d973a5bd23bcc8"
46
+ "gitHead": "e6f55ebe3a5b8a60394744d95533528bb8b119ef"
47
47
  }
@@ -1,2 +0,0 @@
1
- import type { ColorGroup } from '../types.js';
2
- export declare const base: ColorGroup;
@@ -1,15 +0,0 @@
1
- export const base = {
2
- apricot: 'rgba(249, 201, 182, 1)',
3
- coast: 'rgba(172, 102, 81, 1)',
4
- topaz: 'rgba(119, 49, 29, 1)',
5
- lavender: 'rgba(146, 135, 255, 1)',
6
- sky: 'rgba(107, 217, 233, 1)',
7
- salmon: 'rgba(252, 144, 159, 1)',
8
- canary: 'rgba(244, 209, 80, 1)',
9
- calm: 'rgba(224, 221, 255, 1)',
10
- azure: 'rgba(210, 239, 243, 1)',
11
- seashell: 'rgba(255, 237, 239, 1)',
12
- mellow: 'rgba(255, 235, 164, 1)',
13
- black: 'rgba(0, 0, 0, 1)',
14
- white: 'rgba(255, 255, 255, 1)',
15
- };
@@ -1,2 +0,0 @@
1
- import type { ColorGroup } from '../types.js';
2
- export declare const earring: ColorGroup;
@@ -1,15 +0,0 @@
1
- export const earring = {
2
- apricot: 'rgba(249, 201, 182, 1)',
3
- azure: 'rgba(210, 239, 243, 1)',
4
- black: 'rgba(0, 0, 0, 1)',
5
- calm: 'rgba(224, 221, 255, 1)',
6
- canary: 'rgba(244, 209, 80, 1)',
7
- coast: 'rgba(172, 102, 81, 1)',
8
- lavender: 'rgba(146, 135, 255, 1)',
9
- mellow: 'rgba(255, 235, 164, 1)',
10
- salmon: 'rgba(252, 144, 159, 1)',
11
- seashell: 'rgba(255, 237, 239, 1)',
12
- sky: 'rgba(107, 217, 233, 1)',
13
- topaz: 'rgba(119, 49, 29, 1)',
14
- white: 'rgba(255, 255, 255, 1)',
15
- };
@@ -1,2 +0,0 @@
1
- import type { ColorGroup } from '../types.js';
2
- export declare const eyeShadow: ColorGroup;
@@ -1,15 +0,0 @@
1
- export const eyeShadow = {
2
- apricot: 'rgba(249, 201, 182, 1)',
3
- azure: 'rgba(210, 239, 243, 1)',
4
- black: 'rgba(0, 0, 0, 1)',
5
- calm: 'rgba(224, 221, 255, 1)',
6
- canary: 'rgba(244, 209, 80, 1)',
7
- coast: 'rgba(172, 102, 81, 1)',
8
- lavender: 'rgba(146, 135, 255, 1)',
9
- mellow: 'rgba(255, 235, 164, 1)',
10
- salmon: 'rgba(252, 144, 159, 1)',
11
- seashell: 'rgba(255, 237, 239, 1)',
12
- sky: 'rgba(107, 217, 233, 1)',
13
- topaz: 'rgba(119, 49, 29, 1)',
14
- white: 'rgba(255, 255, 255, 1)',
15
- };
@@ -1,2 +0,0 @@
1
- import type { ColorGroup } from '../types.js';
2
- export declare const eyebrows: ColorGroup;
@@ -1,15 +0,0 @@
1
- export const eyebrows = {
2
- apricot: 'rgba(249, 201, 182, 1)',
3
- azure: 'rgba(210, 239, 243, 1)',
4
- black: 'rgba(0, 0, 0, 1)',
5
- calm: 'rgba(224, 221, 255, 1)',
6
- canary: 'rgba(244, 209, 80, 1)',
7
- coast: 'rgba(172, 102, 81, 1)',
8
- lavender: 'rgba(146, 135, 255, 1)',
9
- mellow: 'rgba(255, 235, 164, 1)',
10
- salmon: 'rgba(252, 144, 159, 1)',
11
- seashell: 'rgba(255, 237, 239, 1)',
12
- sky: 'rgba(107, 217, 233, 1)',
13
- topaz: 'rgba(119, 49, 29, 1)',
14
- white: 'rgba(255, 255, 255, 1)',
15
- };
@@ -1,2 +0,0 @@
1
- import type { ColorGroup } from '../types.js';
2
- export declare const eyes: ColorGroup;
@@ -1,15 +0,0 @@
1
- export const eyes = {
2
- apricot: 'rgba(249, 201, 182, 1)',
3
- azure: 'rgba(210, 239, 243, 1)',
4
- black: 'rgba(0, 0, 0, 1)',
5
- calm: 'rgba(224, 221, 255, 1)',
6
- canary: 'rgba(244, 209, 80, 1)',
7
- coast: 'rgba(172, 102, 81, 1)',
8
- lavender: 'rgba(146, 135, 255, 1)',
9
- mellow: 'rgba(255, 235, 164, 1)',
10
- salmon: 'rgba(252, 144, 159, 1)',
11
- seashell: 'rgba(255, 237, 239, 1)',
12
- sky: 'rgba(107, 217, 233, 1)',
13
- topaz: 'rgba(119, 49, 29, 1)',
14
- white: 'rgba(255, 255, 255, 1)',
15
- };
@@ -1,2 +0,0 @@
1
- import type { ColorGroup } from '../types.js';
2
- export declare const facialHair: ColorGroup;
@@ -1,15 +0,0 @@
1
- export const facialHair = {
2
- apricot: 'rgba(249, 201, 182, 1)',
3
- azure: 'rgba(210, 239, 243, 1)',
4
- black: 'rgba(0, 0, 0, 1)',
5
- calm: 'rgba(224, 221, 255, 1)',
6
- canary: 'rgba(244, 209, 80, 1)',
7
- coast: 'rgba(172, 102, 81, 1)',
8
- lavender: 'rgba(146, 135, 255, 1)',
9
- mellow: 'rgba(255, 235, 164, 1)',
10
- salmon: 'rgba(252, 144, 159, 1)',
11
- seashell: 'rgba(255, 237, 239, 1)',
12
- sky: 'rgba(107, 217, 233, 1)',
13
- topaz: 'rgba(119, 49, 29, 1)',
14
- white: 'rgba(255, 255, 255, 1)',
15
- };
@@ -1,2 +0,0 @@
1
- import type { ColorGroup } from '../types.js';
2
- export declare const glasses: ColorGroup;
@@ -1,15 +0,0 @@
1
- export const glasses = {
2
- apricot: 'rgba(249, 201, 182, 1)',
3
- azure: 'rgba(210, 239, 243, 1)',
4
- black: 'rgba(0, 0, 0, 1)',
5
- calm: 'rgba(224, 221, 255, 1)',
6
- canary: 'rgba(244, 209, 80, 1)',
7
- coast: 'rgba(172, 102, 81, 1)',
8
- lavender: 'rgba(146, 135, 255, 1)',
9
- mellow: 'rgba(255, 235, 164, 1)',
10
- salmon: 'rgba(252, 144, 159, 1)',
11
- seashell: 'rgba(255, 237, 239, 1)',
12
- sky: 'rgba(107, 217, 233, 1)',
13
- topaz: 'rgba(119, 49, 29, 1)',
14
- white: 'rgba(255, 255, 255, 1)',
15
- };
@@ -1,2 +0,0 @@
1
- import type { ColorGroup } from '../types.js';
2
- export declare const hair: ColorGroup;
@@ -1,15 +0,0 @@
1
- export const hair = {
2
- apricot: 'rgba(249, 201, 182, 1)',
3
- azure: 'rgba(210, 239, 243, 1)',
4
- black: 'rgba(0, 0, 0, 1)',
5
- calm: 'rgba(224, 221, 255, 1)',
6
- canary: 'rgba(244, 209, 80, 1)',
7
- coast: 'rgba(172, 102, 81, 1)',
8
- lavender: 'rgba(146, 135, 255, 1)',
9
- mellow: 'rgba(255, 235, 164, 1)',
10
- salmon: 'rgba(252, 144, 159, 1)',
11
- seashell: 'rgba(255, 237, 239, 1)',
12
- sky: 'rgba(107, 217, 233, 1)',
13
- topaz: 'rgba(119, 49, 29, 1)',
14
- white: 'rgba(255, 255, 255, 1)',
15
- };
@@ -1,10 +0,0 @@
1
- export { base } from './base.js';
2
- export { earring } from './earring.js';
3
- export { eyeShadow } from './eyeShadow.js';
4
- export { eyebrows } from './eyebrows.js';
5
- export { facialHair } from './facialHair.js';
6
- export { glasses } from './glasses.js';
7
- export { hair } from './hair.js';
8
- export { mouth } from './mouth.js';
9
- export { shirt } from './shirt.js';
10
- export { eyes } from './eyes.js';
@@ -1,10 +0,0 @@
1
- export { base } from './base.js';
2
- export { earring } from './earring.js';
3
- export { eyeShadow } from './eyeShadow.js';
4
- export { eyebrows } from './eyebrows.js';
5
- export { facialHair } from './facialHair.js';
6
- export { glasses } from './glasses.js';
7
- export { hair } from './hair.js';
8
- export { mouth } from './mouth.js';
9
- export { shirt } from './shirt.js';
10
- export { eyes } from './eyes.js';
@@ -1,2 +0,0 @@
1
- import type { ColorGroup } from '../types.js';
2
- export declare const mouth: ColorGroup;
@@ -1,3 +0,0 @@
1
- export const mouth = {
2
- black: 'rgba(0, 0, 0, 1)',
3
- };
@@ -1,2 +0,0 @@
1
- import type { ColorGroup } from '../types.js';
2
- export declare const shirt: ColorGroup;
@@ -1,15 +0,0 @@
1
- export const shirt = {
2
- apricot: 'rgba(249, 201, 182, 1)',
3
- azure: 'rgba(210, 239, 243, 1)',
4
- black: 'rgba(0, 0, 0, 1)',
5
- calm: 'rgba(224, 221, 255, 1)',
6
- canary: 'rgba(244, 209, 80, 1)',
7
- coast: 'rgba(172, 102, 81, 1)',
8
- lavender: 'rgba(146, 135, 255, 1)',
9
- mellow: 'rgba(255, 235, 164, 1)',
10
- salmon: 'rgba(252, 144, 159, 1)',
11
- seashell: 'rgba(255, 237, 239, 1)',
12
- sky: 'rgba(107, 217, 233, 1)',
13
- topaz: 'rgba(119, 49, 29, 1)',
14
- white: 'rgba(255, 255, 255, 1)',
15
- };
@@ -1,9 +0,0 @@
1
- import type { Prng } from '@dicebear/core';
2
- import type { ColorPick } from '../types.js';
3
- declare type Props = {
4
- prng: Prng;
5
- group: string;
6
- values?: string[];
7
- };
8
- export declare function pickColor({ prng, group, values }: Props): ColorPick;
9
- export {};
@@ -1,13 +0,0 @@
1
- import * as colors from '../colors/index.js';
2
- export function pickColor({ prng, group, values = [] }) {
3
- var _a;
4
- const colorCollection = colors;
5
- if (values.length === 0) {
6
- values.push('transparent');
7
- }
8
- const key = prng.pick(values);
9
- return {
10
- name: key,
11
- value: (_a = colorCollection[group][key]) !== null && _a !== void 0 ? _a : key,
12
- };
13
- }