Socket
Socket
Sign inDemoInstall

@dicebear/pixel-art

Package Overview
Dependencies
Maintainers
1
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dicebear/pixel-art - npm Package Compare versions

Comparing version 5.0.0-beta.5 to 5.0.0-beta.6

2

lib/components/accessories.d.ts

@@ -5,5 +5,5 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
import type { ComponentGroup } from '../types.js';
export declare const accessories: ComponentGroup;

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ import { escape } from '@dicebear/core';

@@ -5,5 +5,5 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
import type { ComponentGroup } from '../types.js';
export declare const beard: ComponentGroup;

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ import { escape } from '@dicebear/core';

@@ -5,5 +5,5 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
import type { ComponentGroup } from '../types.js';
export declare const clothing: ComponentGroup;

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ import { escape } from '@dicebear/core';

@@ -5,5 +5,5 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
import type { ComponentGroup } from '../types.js';
export declare const eyes: ComponentGroup;

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ import { escape } from '@dicebear/core';

@@ -5,5 +5,5 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
import type { ComponentGroup } from '../types.js';
export declare const glasses: ComponentGroup;

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ import { escape } from '@dicebear/core';

@@ -5,5 +5,5 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
import type { ComponentGroup } from '../types.js';
export declare const hair: ComponentGroup;

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ import { escape } from '@dicebear/core';

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ export { accessories } from './accessories.js';

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ export { accessories } from './accessories.js';

@@ -5,5 +5,5 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
import type { ComponentGroup } from '../types.js';
export declare const mouth: ComponentGroup;

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ import { escape } from '@dicebear/core';

@@ -5,7 +5,7 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
import { Prng, StyleOptions } from "@dicebear/core";
import { Options, ColorPickCollection, ComponentPickCollection } from "../types.js";
declare type Props = {
type Props = {
prng: Prng;

@@ -12,0 +12,0 @@ options: StyleOptions<Options>;

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ export function onPostCreate({ prng, options, components, colors }) {

@@ -5,7 +5,7 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
import { Prng, StyleOptions } from "@dicebear/core";
import { Options } from "../types.js";
declare type Props = {
type Props = {
prng: Prng;

@@ -12,0 +12,0 @@ options: StyleOptions<Options>;

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ export function onPreCreate({ prng, options }) {

@@ -5,6 +5,20 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
declare const create: import("@dicebear/core").StyleCreate<import("./types.js").Options>, meta: import("@dicebear/core").StyleMeta, schema: import("json-schema").JSONSchema7;
export { create, meta, schema };
/*!
* Pixel Art (@dicebear/pixel-art)
*
* Code licensed under MIT License.
* Copyright (c) 2023 Florian Körner
*
* Design "Pixel Art" by Florian Körner licensed under CC0 1.0. / Remix of the original.
* Source: https://dicebear.com
* Homepage: https://dicebear.com
* License: https://creativecommons.org/licenses/zero/1.0/
*/
import type { StyleCreate, StyleMeta } from '@dicebear/core';
import type { Options } from './types.js';
export declare const meta: StyleMeta;
export declare const create: StyleCreate<Options>;
export { schema } from './schema.js';
export type { Options } from './types.js';

@@ -5,17 +5,34 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
/*!
* Pixel Art (@dicebear/pixel-art)
*
* Code licensed under MIT License.
* Copyright (c) 2022 Florian Körner
*
* Design "Pixel Art" by Florian Körner licensed under CC0 1.0. / Remix of the original.
* Source: https://dicebear.com
* Homepage: https://dicebear.com
* License: https://creativecommons.org/licenses/zero/1.0/
*/
import { style } from './core.js';
const { create, meta, schema } = style;
export { create, meta, schema };
import { escape } from '@dicebear/core';
import { getComponents } from './utils/getComponents.js';
import { getColors } from './utils/getColors.js';
import { onPreCreate } from './hooks/onPreCreate.js';
import { onPostCreate } from './hooks/onPostCreate.js';
export const meta = {
title: 'Pixel Art',
creator: 'Florian Körner',
source: 'https://dicebear.com',
homepage: 'https://dicebear.com',
license: {
name: 'CC0 1.0',
url: 'https://creativecommons.org/licenses/zero/1.0/',
},
};
export const create = ({ prng, options }) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
onPreCreate({ prng, options });
const components = getComponents({ prng, options });
const colors = getColors({ prng, options });
onPostCreate({ prng, options, components, colors });
return {
attributes: {
viewBox: '0 0 16 16',
fill: 'none',
'shape-rendering': 'crispEdges'
},
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 : ''}`,
};
};
export { schema } from './schema.js';

@@ -5,5 +5,5 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
import type { StyleSchema } from '@dicebear/core';
export declare const schema: StyleSchema;

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ export const schema = {

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -27,10 +27,10 @@ export interface Options {

}
export declare type ColorPickCollection = Record<string, string>;
export declare type ComponentGroup = Record<string, ComponentGroupItem>;
export declare type ComponentGroupCollection = Record<string, ComponentGroup>;
export declare type ComponentGroupItem = (components: ComponentPickCollection, colors: ColorPickCollection) => string;
export declare type ComponentPickCollection = Record<string, ComponentPick>;
export declare type ComponentPick = {
export type ColorPickCollection = Record<string, string>;
export type ComponentGroup = Record<string, ComponentGroupItem>;
export type ComponentGroupCollection = Record<string, ComponentGroup>;
export type ComponentGroupItem = (components: ComponentPickCollection, colors: ColorPickCollection) => string;
export type ComponentPickCollection = Record<string, ComponentPick>;
export type ComponentPick = {
name: string;
value: ComponentGroupItem;
} | undefined;

@@ -5,4 +5,4 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
export {};

@@ -5,7 +5,7 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
import type { Prng } from '@dicebear/core';
import type { Options, ColorPickCollection } from '../types.js';
declare type Props = {
type Props = {
prng: Prng;

@@ -12,0 +12,0 @@ options: Options;

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ export function getColors({ prng, options }) {

@@ -5,7 +5,7 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
import type { Prng } from '@dicebear/core';
import type { Options, ComponentPickCollection } from '../types.js';
declare type Props = {
type Props = {
prng: Prng;

@@ -12,0 +12,0 @@ options: Options;

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ import { pickComponent } from './pickComponent.js';

@@ -5,7 +5,7 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/
import type { Prng } from '@dicebear/core';
import type { ComponentPick } from '../types.js';
declare type Props = {
type Props = {
prng: Prng;

@@ -12,0 +12,0 @@ group: string;

@@ -5,3 +5,3 @@ /**

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9/%40dicebear%2Fpixel-art?node-id=5%3A1231
* File: https://www.figma.com/file/WTcivb1XPf5ODtyv7ZNnU9
*/

@@ -8,0 +8,0 @@ import * as components from '../components/index.js';

{
"name": "@dicebear/pixel-art",
"version": "5.0.0-beta.5",
"version": "5.0.0-beta.6",
"description": "Avatar style for DiceBear",

@@ -32,3 +32,3 @@ "keywords": [

"devDependencies": {
"@dicebear/core": "^5.0.0-beta.5",
"@dicebear/core": "^5.0.0-beta.6",
"@tsconfig/recommended": "^1.0.1",

@@ -48,3 +48,3 @@ "del-cli": "^4.0.1",

},
"gitHead": "067460b00a40a7720d556f45edb32d9311edde14"
"gitHead": "1a81759251d30336383497f31843b48809d0f56b"
}

@@ -1,11 +0,23 @@

<h1 align="center"><img src="./tests/svg/0.svg" width="124" /> <br />Pixel Art</h1>
<h1 align="center"><img src="https://dicebear.com/logo-readme.svg" width="96" /> <br />DiceBear Pixel Art</h1>
<p align="center">
<strong>Avatar Style for <a href="https://dicebear.com/">DiceBear</a></strong><br />
<a href="https://dicebear.com">Pixel Art</a>
by <a href="https://dicebear.com">Florian Körner</a>
<a href="https://dicebear.com">Pixel Art</a> by <a href="https://dicebear.com">Florian Körner</a>
</p>
<p align="center">
While our code is MIT licensed, the design is licensed under
<a href="https://creativecommons.org/licenses/zero/1.0/">CC0 1.0</a>.
<img src="https://api.dicebear.com/5.x/pixel-art/svg?seed=Mimi" width="64" />
<img src="https://api.dicebear.com/5.x/pixel-art/svg?seed=Sasha" width="64" />
<img src="https://api.dicebear.com/5.x/pixel-art/svg?seed=Lilly" width="64" />
<img src="https://api.dicebear.com/5.x/pixel-art/svg?seed=Tigger" width="64" />
<img src="https://api.dicebear.com/5.x/pixel-art/svg?seed=Bella" width="64" />
<img src="https://api.dicebear.com/5.x/pixel-art/svg?seed=Zoe" width="64" />
<img src="https://api.dicebear.com/5.x/pixel-art/svg?seed=Kitty" width="64" />
</p>
<p align="center">
The avatar style is based on <a href="https://dicebear.com">Pixel Art</a> by
<a href="https://dicebear.com">Florian Körner</a>, licensed under
<a href="https://creativecommons.org/licenses/zero/1.0/">CC0 1.0</a>. / Remix of the original.
</p>
<p align="center">
See <a href="https://dicebear.com/licenses">license overview</a> for more information.

@@ -12,0 +24,0 @@ </p>

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc