@dicebear/avataaars-neutral 5.0.0-alpha.31 → 5.0.0-alpha.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/core.js CHANGED
@@ -21,7 +21,6 @@ export const style = {
21
21
  const components = getComponents({ prng, options });
22
22
  const colors = getColors({ prng, options });
23
23
  onPostCreate({ prng, options, components, colors });
24
- options.backgroundColor = [colors.background.value];
25
24
  return {
26
25
  attributes: {
27
26
  viewBox: '0 0 112 112',
package/lib/index.d.ts CHANGED
@@ -1,14 +1,3 @@
1
- /*!
2
- * Avataaars Neutral (@dicebear/avataaars-neutral)
3
- *
4
- * Code licensed under MIT License.
5
- * Copyright (c) 2022 Florian Körner
6
- *
7
- * Design "Avataaars" by Pablo Stanley licensed under Free for personal and commercial use..
8
- * Source: https://avataaars.com/
9
- * Homepage: https://twitter.com/pablostanley
10
- * License: https://avataaars.com/
11
- */
12
1
  declare const create: import("@dicebear/core").StyleCreate<import("./types.js").Options>, meta: import("@dicebear/core").StyleMeta, schema: import("json-schema").JSONSchema7;
13
2
  export { create, meta, schema };
14
3
  export type { Options } from './types.js';
package/lib/index.js CHANGED
@@ -8,7 +8,6 @@
8
8
  * Source: https://avataaars.com/
9
9
  * Homepage: https://twitter.com/pablostanley
10
10
  * License: https://avataaars.com/
11
- */
12
- import { style } from './core.js';
11
+ */ import { style } from './core.js';
13
12
  const { create, meta, schema } = style;
14
13
  export { create, meta, schema };
package/lib/schema.js CHANGED
@@ -6,25 +6,16 @@ export const schema = {
6
6
  type: 'array',
7
7
  items: {
8
8
  type: 'string',
9
- pattern: '^([0-9a-zA-Z]+|#[a-fA-F0-9]{3}|#[a-fA-F0-9]{4}|#[a-fA-F0-9]{6}|#[a-fA-F0-9]{8})$',
9
+ pattern: '^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$',
10
10
  },
11
11
  default: [
12
- 'black',
13
- 'brown',
14
- 'darkBrown',
15
- 'light',
16
- 'pale',
17
- 'tanned',
18
- 'yellow',
19
- ],
20
- examples: [
21
- ['black'],
22
- ['brown'],
23
- ['darkBrown'],
24
- ['light'],
25
- ['pale'],
26
- ['tanned'],
27
- ['yellow'],
12
+ '614335',
13
+ 'd08b5b',
14
+ 'ae5d29',
15
+ 'edb98a',
16
+ 'ffdbb4',
17
+ 'fd9841',
18
+ 'f8d25c',
28
19
  ],
29
20
  },
30
21
  eyebrows: {
package/lib/types.d.ts CHANGED
@@ -8,11 +8,7 @@ export interface Options {
8
8
  export declare type ColorGroup = Record<string, ColorGroupItem>;
9
9
  export declare type ColorGroupCollection = Record<string, ColorGroup>;
10
10
  export declare type ColorGroupItem = string;
11
- export declare type ColorPickCollection = Record<string, ColorPick>;
12
- export declare type ColorPick = {
13
- name: string;
14
- value: ColorGroupItem;
15
- };
11
+ export declare type ColorPickCollection = Record<string, string>;
16
12
  export declare type ComponentGroup = Record<string, ComponentGroupItem>;
17
13
  export declare type ComponentGroupCollection = Record<string, ComponentGroup>;
18
14
  export declare type ComponentGroupItem = (components: ComponentPickCollection, colors: ColorPickCollection) => string;
@@ -1,10 +1,3 @@
1
- import { pickColor } from './pickColor.js';
2
1
  export function getColors({ prng, options }) {
3
- return {
4
- background: pickColor({
5
- prng,
6
- group: 'skin',
7
- values: options.backgroundColor,
8
- }),
9
- };
2
+ return {};
10
3
  }
@@ -2,11 +2,8 @@ import * as components from '../components/index.js';
2
2
  export function pickComponent({ prng, group, values = [], }) {
3
3
  const componentCollection = components;
4
4
  const key = prng.pick(values);
5
- if (componentCollection[group][key]) {
6
- return {
7
- name: key,
8
- value: componentCollection[group][key],
9
- };
5
+ if (key && componentCollection[group][key]) {
6
+ return { name: key, value: componentCollection[group][key] };
10
7
  }
11
8
  else {
12
9
  return undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dicebear/avataaars-neutral",
3
- "version": "5.0.0-alpha.31",
3
+ "version": "5.0.0-alpha.32",
4
4
  "description": "Avatar style for DiceBear",
5
5
  "keywords": [
6
6
  "dicebear"
@@ -28,7 +28,7 @@
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.32",
32
32
  "@tsconfig/recommended": "^1.0.1",
33
33
  "del-cli": "^4.0.1",
34
34
  "typescript": "^4.6.3",
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "088e33eb5bc45d01c9b6350011d973a5bd23bcc8"
46
+ "gitHead": "5a4a06cbb8aca42a5d19da8e704b3a7b3a45d755"
47
47
  }
@@ -1 +0,0 @@
1
- export { skin } from './skin.js';
@@ -1 +0,0 @@
1
- export { skin } from './skin.js';
@@ -1,2 +0,0 @@
1
- import type { ColorGroup } from '../types.js';
2
- export declare const skin: ColorGroup;
@@ -1,9 +0,0 @@
1
- export const skin = {
2
- black: 'rgba(97, 67, 53, 1)',
3
- brown: 'rgba(208, 139, 91, 1)',
4
- darkBrown: 'rgba(174, 93, 41, 1)',
5
- light: 'rgba(237, 185, 138, 1)',
6
- pale: 'rgba(255, 219, 180, 1)',
7
- tanned: 'rgba(253, 152, 65, 1)',
8
- yellow: 'rgba(248, 210, 92, 1)',
9
- };
@@ -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
- }