@dicebear/pixel-art 5.0.0-beta.4 → 5.0.0-beta.6

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/LICENSE CHANGED
@@ -1,6 +1,19 @@
1
+ Licenses
2
+ --------
3
+
4
+ # Design
5
+ Applies to all design files in this package.
6
+
7
+ Source: Pixel Art (https://dicebear.com)
8
+ Designer: Florian Körner (https://dicebear.com)
9
+ License: CC0 1.0 (https://creativecommons.org/licenses/zero/1.0/)
10
+
11
+ # Code
12
+ Applies to all non-design files in this package.
13
+
1
14
  MIT License
2
15
 
3
- Copyright (c) 2022 Florian Körner
16
+ Copyright (c) 2023 Florian Körner
4
17
 
5
18
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
19
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,13 +1,25 @@
1
- <h1 align="center"><img src="./tests/svg/0.svg" width="124" /> <br />Pixel Art</h1>
1
+ <h1 align="center"><img src="https://dicebear.com/logo-readme.svg" width="96" /> <br />DiceBear Pixel Art</h1>
2
2
  <p align="center">
3
3
  <strong>Avatar Style for <a href="https://dicebear.com/">DiceBear</a></strong><br />
4
- <a href="https://dicebear.com">Pixel Art</a>
5
- by <a href="https://dicebear.com">Florian Körner</a>
4
+ <a href="https://dicebear.com">Pixel Art</a> by <a href="https://dicebear.com">Florian Körner</a>
6
5
  </p>
7
6
 
8
7
  <p align="center">
9
- While our code is MIT licensed, the design is licensed under
10
- <a href="https://creativecommons.org/licenses/zero/1.0/">CC0 1.0</a>.
8
+ <img src="https://api.dicebear.com/5.x/pixel-art/svg?seed=Mimi" width="64" />
9
+ <img src="https://api.dicebear.com/5.x/pixel-art/svg?seed=Sasha" width="64" />
10
+ <img src="https://api.dicebear.com/5.x/pixel-art/svg?seed=Lilly" width="64" />
11
+ <img src="https://api.dicebear.com/5.x/pixel-art/svg?seed=Tigger" width="64" />
12
+ <img src="https://api.dicebear.com/5.x/pixel-art/svg?seed=Bella" width="64" />
13
+ <img src="https://api.dicebear.com/5.x/pixel-art/svg?seed=Zoe" width="64" />
14
+ <img src="https://api.dicebear.com/5.x/pixel-art/svg?seed=Kitty" width="64" />
15
+ </p>
16
+
17
+ <p align="center">
18
+ The avatar style is based on <a href="https://dicebear.com">Pixel Art</a> by
19
+ <a href="https://dicebear.com">Florian Körner</a>, licensed under
20
+ <a href="https://creativecommons.org/licenses/zero/1.0/">CC0 1.0</a>. / Remix of the original.
21
+ </p>
22
+ <p align="center">
11
23
  See <a href="https://dicebear.com/licenses">license overview</a> for more information.
12
24
  </p>
13
25
 
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const accessories: ComponentGroup;
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const accessories = {
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const beard: ComponentGroup;
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const beard = {
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const clothing: ComponentGroup;
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const clothing = {
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const eyes: ComponentGroup;
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const eyes = {
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const glasses: ComponentGroup;
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const glasses = {
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const hair: ComponentGroup;
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const hair = {
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  export { accessories } from './accessories.js';
8
8
  export { clothing } from './clothing.js';
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  export { accessories } from './accessories.js';
8
8
  export { clothing } from './clothing.js';
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const mouth: ComponentGroup;
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const mouth = {
@@ -2,11 +2,11 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import { Prng, StyleOptions } from "@dicebear/core";
8
8
  import { Options, ColorPickCollection, ComponentPickCollection } from "../types.js";
9
- declare type Props = {
9
+ type Props = {
10
10
  prng: Prng;
11
11
  options: StyleOptions<Options>;
12
12
  components: ComponentPickCollection;
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  export function onPostCreate({ prng, options, components, colors }) {
8
8
  // Write your modifications here
@@ -2,11 +2,11 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import { Prng, StyleOptions } from "@dicebear/core";
8
8
  import { Options } from "../types.js";
9
- declare type Props = {
9
+ type Props = {
10
10
  prng: Prng;
11
11
  options: StyleOptions<Options>;
12
12
  };
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  export function onPreCreate({ prng, options }) {
8
8
  // Write your modifications here
package/lib/index.d.ts CHANGED
@@ -2,8 +2,22 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
- declare const create: import("@dicebear/core").StyleCreate<import("./types.js").Options>, meta: import("@dicebear/core").StyleMeta, schema: import("json-schema").JSONSchema7;
8
- export { create, meta, schema };
7
+ /*!
8
+ * Pixel Art (@dicebear/pixel-art)
9
+ *
10
+ * Code licensed under MIT License.
11
+ * Copyright (c) 2023 Florian Körner
12
+ *
13
+ * Design "Pixel Art" by Florian Körner licensed under CC0 1.0. / Remix of the original.
14
+ * Source: https://dicebear.com
15
+ * Homepage: https://dicebear.com
16
+ * License: https://creativecommons.org/licenses/zero/1.0/
17
+ */
18
+ import type { StyleCreate, StyleMeta } from '@dicebear/core';
19
+ import type { Options } from './types.js';
20
+ export declare const meta: StyleMeta;
21
+ export declare const create: StyleCreate<Options>;
22
+ export { schema } from './schema.js';
9
23
  export type { Options } from './types.js';
package/lib/index.js CHANGED
@@ -2,19 +2,36 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
- /*!
8
- * Pixel Art (@dicebear/pixel-art)
9
- *
10
- * Code licensed under MIT License.
11
- * Copyright (c) 2022 Florian Körner
12
- *
13
- * Design "Pixel Art" by Florian Körner licensed under CC0 1.0. / Remix of the original.
14
- * Source: https://dicebear.com
15
- * Homepage: https://dicebear.com
16
- * License: https://creativecommons.org/licenses/zero/1.0/
17
- */
18
- import { style } from './core.js';
19
- const { create, meta, schema } = style;
20
- export { create, meta, schema };
7
+ import { escape } from '@dicebear/core';
8
+ import { getComponents } from './utils/getComponents.js';
9
+ import { getColors } from './utils/getColors.js';
10
+ import { onPreCreate } from './hooks/onPreCreate.js';
11
+ import { onPostCreate } from './hooks/onPostCreate.js';
12
+ export const meta = {
13
+ title: 'Pixel Art',
14
+ creator: 'Florian Körner',
15
+ source: 'https://dicebear.com',
16
+ homepage: 'https://dicebear.com',
17
+ license: {
18
+ name: 'CC0 1.0',
19
+ url: 'https://creativecommons.org/licenses/zero/1.0/',
20
+ },
21
+ };
22
+ export const create = ({ prng, options }) => {
23
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
24
+ onPreCreate({ prng, options });
25
+ const components = getComponents({ prng, options });
26
+ const colors = getColors({ prng, options });
27
+ onPostCreate({ prng, options, components, colors });
28
+ return {
29
+ attributes: {
30
+ viewBox: '0 0 16 16',
31
+ fill: 'none',
32
+ 'shape-rendering': 'crispEdges'
33
+ },
34
+ body: `<path d="M4 2h8v1h1v3h1v2h-1v3h-1v1H9v1h4v1h1v2H2v-2h1v-1h4v-1H4v-1H3V8H2V6h1V3h1V2Z" fill="${escape.xml(`#${colors.skin}`)}"/><path d="M4 2h8v1h1v3h1v2h-1v3h-1v1H4v-1H3V8H2V6h1V3h1V2Z" fill="#fff" fill-opacity=".1"/>${(_b = (_a = components.accessories) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}${(_d = (_c = components.clothing) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}${(_f = (_e = components.eyes) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}${(_h = (_g = components.glasses) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ''}${(_k = (_j = components.beard) === null || _j === void 0 ? void 0 : _j.value(components, colors)) !== null && _k !== void 0 ? _k : ''}${(_m = (_l = components.mouth) === null || _l === void 0 ? void 0 : _l.value(components, colors)) !== null && _m !== void 0 ? _m : ''}${(_p = (_o = components.hair) === null || _o === void 0 ? void 0 : _o.value(components, colors)) !== null && _p !== void 0 ? _p : ''}`,
35
+ };
36
+ };
37
+ export { schema } from './schema.js';
package/lib/schema.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import type { StyleSchema } from '@dicebear/core';
8
8
  export declare const schema: StyleSchema;
package/lib/schema.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  export const schema = {
8
8
  "$schema": "http://json-schema.org/draft-07/schema#",
package/lib/types.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  export interface Options {
8
8
  accessories?: ('variant04' | 'variant03' | 'variant02' | 'variant01')[];
@@ -23,12 +23,12 @@ export interface Options {
23
23
  mouthColor?: string[];
24
24
  skinColor?: string[];
25
25
  }
26
- export declare type ColorPickCollection = Record<string, string>;
27
- export declare type ComponentGroup = Record<string, ComponentGroupItem>;
28
- export declare type ComponentGroupCollection = Record<string, ComponentGroup>;
29
- export declare type ComponentGroupItem = (components: ComponentPickCollection, colors: ColorPickCollection) => string;
30
- export declare type ComponentPickCollection = Record<string, ComponentPick>;
31
- export declare type ComponentPick = {
26
+ export type ColorPickCollection = Record<string, string>;
27
+ export type ComponentGroup = Record<string, ComponentGroupItem>;
28
+ export type ComponentGroupCollection = Record<string, ComponentGroup>;
29
+ export type ComponentGroupItem = (components: ComponentPickCollection, colors: ColorPickCollection) => string;
30
+ export type ComponentPickCollection = Record<string, ComponentPick>;
31
+ export type ComponentPick = {
32
32
  name: string;
33
33
  value: ComponentGroupItem;
34
34
  } | undefined;
package/lib/types.js CHANGED
@@ -2,6 +2,6 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  export {};
@@ -2,11 +2,11 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import type { Prng } from '@dicebear/core';
8
8
  import type { Options, ColorPickCollection } from '../types.js';
9
- declare type Props = {
9
+ type Props = {
10
10
  prng: Prng;
11
11
  options: Options;
12
12
  };
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  export function getColors({ prng, options }) {
8
8
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
@@ -2,11 +2,11 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import type { Prng } from '@dicebear/core';
8
8
  import type { Options, ComponentPickCollection } from '../types.js';
9
- declare type Props = {
9
+ type Props = {
10
10
  prng: Prng;
11
11
  options: Options;
12
12
  };
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import { pickComponent } from './pickComponent.js';
8
8
  export function getComponents({ prng, options }) {
@@ -2,11 +2,11 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import type { Prng } from '@dicebear/core';
8
8
  import type { ComponentPick } from '../types.js';
9
- declare type Props = {
9
+ type Props = {
10
10
  prng: Prng;
11
11
  group: string;
12
12
  values?: string[];
@@ -2,7 +2,7 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
5
+ * File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
6
6
  */
7
7
  import * as components from '../components/index.js';
8
8
  export function pickComponent({ prng, group, values = [] }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dicebear/pixel-art",
3
- "version": "5.0.0-beta.4",
3
+ "version": "5.0.0-beta.6",
4
4
  "description": "Avatar style for DiceBear",
5
5
  "keywords": [
6
6
  "dicebear"
@@ -14,6 +14,7 @@
14
14
  },
15
15
  "license": "MIT",
16
16
  "type": "module",
17
+ "main": "./lib/index.js",
17
18
  "exports": "./lib/index.js",
18
19
  "types": "./lib/index.d.ts",
19
20
  "files": [
@@ -28,7 +29,7 @@
28
29
  "test": "uvu tests"
29
30
  },
30
31
  "devDependencies": {
31
- "@dicebear/core": "^5.0.0-beta.4",
32
+ "@dicebear/core": "^5.0.0-beta.6",
32
33
  "@tsconfig/recommended": "^1.0.1",
33
34
  "del-cli": "^4.0.1",
34
35
  "typescript": "^4.6.3",
@@ -43,5 +44,5 @@
43
44
  "publishConfig": {
44
45
  "access": "public"
45
46
  },
46
- "gitHead": "5fcae5a84a2b4b2dd338c4f7a0e461c1efef1e9d"
47
+ "gitHead": "1a81759251d30336383497f31843b48809d0f56b"
47
48
  }
package/lib/core.d.ts DELETED
@@ -1,9 +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/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
6
- */
7
- import type { Style } from '@dicebear/core';
8
- import type { Options } from './types.js';
9
- export declare const style: Style<Options>;
package/lib/core.js DELETED
@@ -1,40 +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/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
6
- */
7
- import { escape } from '@dicebear/core';
8
- import { schema } from './schema.js';
9
- import { getComponents } from './utils/getComponents.js';
10
- import { getColors } from './utils/getColors.js';
11
- import { onPreCreate } from './hooks/onPreCreate.js';
12
- import { onPostCreate } from './hooks/onPostCreate.js';
13
- export const style = {
14
- meta: {
15
- title: 'Pixel Art',
16
- creator: 'Florian Körner',
17
- source: 'https://dicebear.com',
18
- homepage: 'https://dicebear.com',
19
- license: {
20
- name: 'CC0 1.0',
21
- url: 'https://creativecommons.org/licenses/zero/1.0/',
22
- },
23
- },
24
- schema: schema,
25
- create: ({ prng, options }) => {
26
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
27
- onPreCreate({ prng, options });
28
- const components = getComponents({ prng, options });
29
- const colors = getColors({ prng, options });
30
- onPostCreate({ prng, options, components, colors });
31
- return {
32
- attributes: {
33
- viewBox: '0 0 16 16',
34
- fill: 'none',
35
- 'shape-rendering': 'crispEdges'
36
- },
37
- body: `<path d="M4 2h8v1h1v3h1v2h-1v3h-1v1H9v1h4v1h1v2H2v-2h1v-1h4v-1H4v-1H3V8H2V6h1V3h1V2Z" fill="${escape.xml(`#${colors.skin}`)}"/><path d="M4 2h8v1h1v3h1v2h-1v3h-1v1H4v-1H3V8H2V6h1V3h1V2Z" fill="#fff" fill-opacity=".1"/>${(_b = (_a = components.accessories) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}${(_d = (_c = components.clothing) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}${(_f = (_e = components.eyes) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}${(_h = (_g = components.glasses) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ''}${(_k = (_j = components.beard) === null || _j === void 0 ? void 0 : _j.value(components, colors)) !== null && _k !== void 0 ? _k : ''}${(_m = (_l = components.mouth) === null || _l === void 0 ? void 0 : _l.value(components, colors)) !== null && _m !== void 0 ? _m : ''}${(_p = (_o = components.hair) === null || _o === void 0 ? void 0 : _o.value(components, colors)) !== null && _p !== void 0 ? _p : ''}`,
38
- };
39
- },
40
- };