@dicebear/avataaars-neutral 5.0.2 → 5.0.3

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/index.js CHANGED
@@ -6,8 +6,6 @@
6
6
  */
7
7
  import { getComponents } from './utils/getComponents.js';
8
8
  import { getColors } from './utils/getColors.js';
9
- import { onPreCreate } from './hooks/onPreCreate.js';
10
- import { onPostCreate } from './hooks/onPostCreate.js';
11
9
  export const meta = {
12
10
  title: 'Avataaars',
13
11
  creator: 'Pablo Stanley',
@@ -20,10 +18,8 @@ export const meta = {
20
18
  };
21
19
  export const create = ({ prng, options }) => {
22
20
  var _a, _b, _c, _d, _e, _f, _g, _h;
23
- onPreCreate({ prng, options });
24
21
  const components = getComponents({ prng, options });
25
22
  const colors = getColors({ prng, options });
26
- onPostCreate({ prng, options, components, colors });
27
23
  return {
28
24
  attributes: {
29
25
  viewBox: '0 0 112 112',
package/lib/schema.js CHANGED
@@ -11,7 +11,7 @@ export const schema = {
11
11
  "type": "array",
12
12
  "items": {
13
13
  "type": "string",
14
- "pattern": "^[a-fA-F0-9]{6}$"
14
+ "pattern": "^(transparent|[a-fA-F0-9]{6})$"
15
15
  },
16
16
  "default": [
17
17
  "614335",
@@ -4,6 +4,4 @@
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
5
  * File: https://www.figma.com/file/HBLdITkkTnLs4M09BmCe4h
6
6
  */
7
- export function onPreCreate({ prng, options }) {
8
- // Write your modifications here
9
- }
7
+ export declare function convertColor(color: string): string;
@@ -4,6 +4,9 @@
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
5
  * File: https://www.figma.com/file/HBLdITkkTnLs4M09BmCe4h
6
6
  */
7
- export function onPostCreate({ prng, options, components, colors }) {
8
- // Write your modifications here
7
+ export function convertColor(color) {
8
+ if ('transparent' === color) {
9
+ return color;
10
+ }
11
+ return `#${color}`;
9
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dicebear/avataaars-neutral",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "description": "Avatar style for DiceBear",
5
5
  "keywords": [
6
6
  "dicebear"
@@ -29,7 +29,7 @@
29
29
  "test": "uvu tests"
30
30
  },
31
31
  "devDependencies": {
32
- "@dicebear/core": "^5.0.2",
32
+ "@dicebear/core": "^5.0.3",
33
33
  "@tsconfig/recommended": "^1.0.1",
34
34
  "del-cli": "^4.0.1",
35
35
  "typescript": "^4.6.3",
@@ -44,5 +44,5 @@
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "gitHead": "dbf7cf17531995f0981b8e15e21e66a72204faff"
47
+ "gitHead": "14f86eb4ad8c481902d505c838c26420370d232c"
48
48
  }
@@ -1,16 +0,0 @@
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/HBLdITkkTnLs4M09BmCe4h
6
- */
7
- import { Prng, StyleOptions } from "@dicebear/core";
8
- import { Options, ColorPickCollection, ComponentPickCollection } from "../types.js";
9
- type Props = {
10
- prng: Prng;
11
- options: StyleOptions<Options>;
12
- components: ComponentPickCollection;
13
- colors: ColorPickCollection;
14
- };
15
- export declare function onPostCreate({ prng, options, components, colors }: Props): void;
16
- export {};
@@ -1,14 +0,0 @@
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/HBLdITkkTnLs4M09BmCe4h
6
- */
7
- import { Prng, StyleOptions } from "@dicebear/core";
8
- import { Options } from "../types.js";
9
- type Props = {
10
- prng: Prng;
11
- options: StyleOptions<Options>;
12
- };
13
- export declare function onPreCreate({ prng, options }: Props): void;
14
- export {};