@dicebear/lorelei 9.2.2 → 9.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/types.d.ts CHANGED
@@ -6,14 +6,14 @@
6
6
  */
7
7
  export interface Options {
8
8
  hair?: ('variant48' | 'variant47' | 'variant46' | 'variant45' | 'variant44' | 'variant43' | 'variant42' | 'variant41' | 'variant40' | 'variant39' | 'variant38' | 'variant37' | 'variant36' | 'variant35' | 'variant34' | 'variant33' | 'variant32' | 'variant31' | 'variant30' | 'variant29' | 'variant28' | 'variant27' | 'variant26' | 'variant25' | 'variant24' | 'variant23' | 'variant22' | 'variant21' | 'variant20' | 'variant19' | 'variant18' | 'variant17' | 'variant16' | 'variant15' | 'variant14' | 'variant13' | 'variant12' | 'variant11' | 'variant10' | 'variant09' | 'variant08' | 'variant07' | 'variant06' | 'variant05' | 'variant04' | 'variant03' | 'variant02' | 'variant01')[];
9
- hairAccessories?: ('flowers')[];
9
+ hairAccessories?: 'flowers'[];
10
10
  hairAccessoriesProbability?: number;
11
11
  head?: ('variant04' | 'variant03' | 'variant02' | 'variant01')[];
12
12
  eyes?: ('variant24' | 'variant23' | 'variant22' | 'variant21' | 'variant20' | 'variant19' | 'variant18' | 'variant17' | 'variant16' | 'variant15' | 'variant14' | 'variant13' | 'variant12' | 'variant11' | 'variant10' | 'variant09' | 'variant08' | 'variant07' | 'variant06' | 'variant05' | 'variant04' | 'variant03' | 'variant02' | 'variant01')[];
13
13
  eyebrows?: ('variant13' | 'variant12' | 'variant11' | 'variant10' | 'variant09' | 'variant08' | 'variant07' | 'variant06' | 'variant05' | 'variant04' | 'variant03' | 'variant02' | 'variant01')[];
14
14
  earrings?: ('variant01' | 'variant02' | 'variant03')[];
15
15
  earringsProbability?: number;
16
- freckles?: ('variant01')[];
16
+ freckles?: 'variant01'[];
17
17
  frecklesProbability?: number;
18
18
  nose?: ('variant01' | 'variant02' | 'variant03' | 'variant04' | 'variant05' | 'variant06')[];
19
19
  beard?: ('variant01' | 'variant02')[];
@@ -8,16 +8,15 @@ import { convertColor } from './convertColor.js';
8
8
  export function getColors({ prng, options }) {
9
9
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
10
10
  return {
11
- 'hair': convertColor(prng.pick((_a = options.hairColor) !== null && _a !== void 0 ? _a : [], 'transparent')),
12
- 'skin': convertColor(prng.pick((_b = options.skinColor) !== null && _b !== void 0 ? _b : [], 'transparent')),
13
- 'earrings': convertColor(prng.pick((_c = options.earringsColor) !== null && _c !== void 0 ? _c : [], 'transparent')),
14
- 'eyebrows': convertColor(prng.pick((_d = options.eyebrowsColor) !== null && _d !== void 0 ? _d : [], 'transparent')),
15
- 'eyes': convertColor(prng.pick((_e = options.eyesColor) !== null && _e !== void 0 ? _e : [], 'transparent')),
16
- 'freckles': convertColor(prng.pick((_f = options.frecklesColor) !== null && _f !== void 0 ? _f : [], 'transparent')),
17
- 'glasses': convertColor(prng.pick((_g = options.glassesColor) !== null && _g !== void 0 ? _g : [], 'transparent')),
18
- 'mouth': convertColor(prng.pick((_h = options.mouthColor) !== null && _h !== void 0 ? _h : [], 'transparent')),
19
- 'nose': convertColor(prng.pick((_j = options.noseColor) !== null && _j !== void 0 ? _j : [], 'transparent')),
20
- 'hairAccessories': convertColor(prng.pick((_k = options.hairAccessoriesColor) !== null && _k !== void 0 ? _k : [], 'transparent')),
11
+ hair: convertColor(prng.pick((_a = options.hairColor) !== null && _a !== void 0 ? _a : [], 'transparent')),
12
+ skin: convertColor(prng.pick((_b = options.skinColor) !== null && _b !== void 0 ? _b : [], 'transparent')),
13
+ earrings: convertColor(prng.pick((_c = options.earringsColor) !== null && _c !== void 0 ? _c : [], 'transparent')),
14
+ eyebrows: convertColor(prng.pick((_d = options.eyebrowsColor) !== null && _d !== void 0 ? _d : [], 'transparent')),
15
+ eyes: convertColor(prng.pick((_e = options.eyesColor) !== null && _e !== void 0 ? _e : [], 'transparent')),
16
+ freckles: convertColor(prng.pick((_f = options.frecklesColor) !== null && _f !== void 0 ? _f : [], 'transparent')),
17
+ glasses: convertColor(prng.pick((_g = options.glassesColor) !== null && _g !== void 0 ? _g : [], 'transparent')),
18
+ mouth: convertColor(prng.pick((_h = options.mouthColor) !== null && _h !== void 0 ? _h : [], 'transparent')),
19
+ nose: convertColor(prng.pick((_j = options.noseColor) !== null && _j !== void 0 ? _j : [], 'transparent')),
20
+ hairAccessories: convertColor(prng.pick((_k = options.hairAccessoriesColor) !== null && _k !== void 0 ? _k : [], 'transparent')),
21
21
  };
22
22
  }
23
- ;
@@ -10,5 +10,5 @@ type Props = {
10
10
  prng: Prng;
11
11
  options: Options;
12
12
  };
13
- export declare function getComponents({ prng, options }: Props): ComponentPickCollection;
13
+ export declare function getComponents({ prng, options, }: Props): ComponentPickCollection;
14
14
  export {};
@@ -5,7 +5,7 @@
5
5
  * File: https://www.figma.com/community/file/1198749693280469639
6
6
  */
7
7
  import { pickComponent } from './pickComponent.js';
8
- export function getComponents({ prng, options }) {
8
+ export function getComponents({ prng, options, }) {
9
9
  const hairComponent = pickComponent({
10
10
  prng,
11
11
  group: 'hair',
@@ -62,17 +62,24 @@ export function getComponents({ prng, options }) {
62
62
  values: options.glasses,
63
63
  });
64
64
  return {
65
- 'hair': hairComponent,
66
- 'hairAccessories': prng.bool(options.hairAccessoriesProbability) ? hairAccessoriesComponent : undefined,
67
- 'head': headComponent,
68
- 'eyes': eyesComponent,
69
- 'eyebrows': eyebrowsComponent,
70
- 'earrings': prng.bool(options.earringsProbability) ? earringsComponent : undefined,
71
- 'freckles': prng.bool(options.frecklesProbability) ? frecklesComponent : undefined,
72
- 'nose': noseComponent,
73
- 'beard': prng.bool(options.beardProbability) ? beardComponent : undefined,
74
- 'mouth': mouthComponent,
75
- 'glasses': prng.bool(options.glassesProbability) ? glassesComponent : undefined,
65
+ hair: hairComponent,
66
+ hairAccessories: prng.bool(options.hairAccessoriesProbability)
67
+ ? hairAccessoriesComponent
68
+ : undefined,
69
+ head: headComponent,
70
+ eyes: eyesComponent,
71
+ eyebrows: eyebrowsComponent,
72
+ earrings: prng.bool(options.earringsProbability)
73
+ ? earringsComponent
74
+ : undefined,
75
+ freckles: prng.bool(options.frecklesProbability)
76
+ ? frecklesComponent
77
+ : undefined,
78
+ nose: noseComponent,
79
+ beard: prng.bool(options.beardProbability) ? beardComponent : undefined,
80
+ mouth: mouthComponent,
81
+ glasses: prng.bool(options.glassesProbability)
82
+ ? glassesComponent
83
+ : undefined,
76
84
  };
77
85
  }
78
- ;
@@ -11,5 +11,5 @@ type Props = {
11
11
  group: string;
12
12
  values?: string[];
13
13
  };
14
- export declare function pickComponent({ prng, group, values }: Props): ComponentPick;
14
+ export declare function pickComponent({ prng, group, values, }: Props): ComponentPick;
15
15
  export {};
@@ -5,7 +5,7 @@
5
5
  * File: https://www.figma.com/community/file/1198749693280469639
6
6
  */
7
7
  import * as components from '../components/index.js';
8
- export function pickComponent({ prng, group, values = [] }) {
8
+ export function pickComponent({ prng, group, values = [], }) {
9
9
  const componentCollection = components;
10
10
  const key = prng.pick(values);
11
11
  if (key && componentCollection[group][key]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dicebear/lorelei",
3
- "version": "9.2.2",
3
+ "version": "9.2.4",
4
4
  "description": "Avatar style for DiceBear",
5
5
  "keywords": [
6
6
  "dicebear"
@@ -29,10 +29,10 @@
29
29
  "test": "uvu tests"
30
30
  },
31
31
  "devDependencies": {
32
- "@dicebear/core": "9.2.2",
33
- "@tsconfig/recommended": "^1.0.2",
34
- "del-cli": "^5.0.0",
35
- "typescript": "^5.1.6",
32
+ "@dicebear/core": "9.2.4",
33
+ "@tsconfig/recommended": "^1.0.10",
34
+ "del-cli": "^6.0.0",
35
+ "typescript": "^5.8.3",
36
36
  "uvu": "^0.5.6"
37
37
  },
38
38
  "peerDependencies": {
@@ -44,5 +44,5 @@
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "gitHead": "bf5b31d047f707f50299142660bc89ef020d9b24"
47
+ "gitHead": "b19e1a8e417d6cdaffbc46ca6dee3522bb266b29"
48
48
  }