Socket
Socket
Sign inDemoInstall

@dicebear/pixel-art-neutral

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-neutral - npm Package Compare versions

Comparing version 5.0.0-alpha.16 to 5.0.0-alpha.20

37

lib/core.js

@@ -6,3 +6,2 @@ import { schema } from './schema.js';

import { onPostCreate } from './hooks/onPostCreate.js';
import { dimensions } from './meta/components.js';
export const style = {

@@ -20,6 +19,6 @@ meta: {

var _a, _b, _c, _d, _e, _f, _g, _h;
onPreCreate({ prng, options, preview: false });
onPreCreate({ prng, options });
const components = getComponents({ prng, options });
const colors = getColors({ prng, options });
onPostCreate({ prng, options, components, colors, preview: false });
onPostCreate({ prng, options, components, colors });
options.backgroundColor = [colors.background.value];

@@ -35,34 +34,2 @@ return {

},
preview: ({ prng, options, property }) => {
var _a, _b;
const componentGroup = property.toString();
const colorGroup = property.toString().replace(/Color$/, '');
onPreCreate({ prng, options, preview: true });
const components = getComponents({ prng, options });
const colors = getColors({ prng, options });
onPostCreate({ prng, options, components, colors, preview: true });
options.backgroundColor = [colors.background.value];
if (componentGroup in components) {
const { width, height } = dimensions[componentGroup];
return {
attributes: {
viewBox: `0 0 ${width} ${height}`,
fill: 'none',
'shape-rendering': 'auto',
},
body: (_b = (_a = components[componentGroup]) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : '',
};
}
if (colorGroup in colors) {
return {
attributes: {
viewBox: `0 0 1 1`,
fill: 'none',
'shape-rendering': 'auto',
},
body: `<rect width="1" height="1" fill="${colors[colorGroup].value}" />`,
};
}
return undefined;
},
};

3

lib/hooks/onPostCreate.d.ts

@@ -8,5 +8,4 @@ import { Prng, StyleOptions } from '@dicebear/core';

colors: ColorPickCollection;
preview: boolean;
};
export declare function onPostCreate({ prng, options, components, colors, preview, }: Props): void;
export declare function onPostCreate({ prng, options, components, colors }: Props): void;
export {};

@@ -1,3 +0,3 @@

export function onPostCreate({ prng, options, components, colors, preview, }) {
export function onPostCreate({ prng, options, components, colors }) {
// Write your modifications here
}

@@ -6,5 +6,4 @@ import { Prng, StyleOptions } from '@dicebear/core';

options: StyleOptions<Options>;
preview: boolean;
};
export declare function onPreCreate({ prng, options, preview }: Props): void;
export declare function onPreCreate({ prng, options }: Props): void;
export {};

@@ -1,3 +0,3 @@

export function onPreCreate({ prng, options, preview }) {
export function onPreCreate({ prng, options }) {
// Write your modifications here
}

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

* Code licensed under MIT License.
* Copyright (c) 2021 Florian Körner
* Copyright (c) 2021 Plastic Jam
* Copyright (c) 2022 Florian Körner
* Copyright (c) 2022 Plastic Jam
*

@@ -12,4 +12,4 @@ * Design "Pixel Art - Neutral" by Plastic Jam licensed under MIT.

*/
declare const create: import("@dicebear/core").StyleCreate<import("./types.js").Options>, preview: import("@dicebear/core").StylePreview<import("./types.js").Options> | undefined, meta: import("@dicebear/core").StyleMeta, schema: import("json-schema").JSONSchema7;
export { create, preview, meta, schema };
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 };
export type { Options } from './types.js';

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

* Code licensed under MIT License.
* Copyright (c) 2021 Florian Körner
* Copyright (c) 2021 Plastic Jam
* Copyright (c) 2022 Florian Körner
* Copyright (c) 2022 Plastic Jam
*

@@ -13,3 +13,3 @@ * Design "Pixel Art - Neutral" by Plastic Jam licensed under MIT.

import { style } from './core.js';
const { create, preview, meta, schema } = style;
export { create, preview, meta, schema };
const { create, meta, schema } = style;
export { create, meta, schema };
{
"name": "@dicebear/pixel-art-neutral",
"version": "5.0.0-alpha.16",
"version": "5.0.0-alpha.20",
"description": "Avatar style for DiceBear",

@@ -31,14 +31,13 @@ "keywords": [

"devDependencies": {
"@dicebear/core": "^5.0.0-alpha.16",
"@tsconfig/recommended": "^1.0.0",
"@types/jest": "^26.0.22",
"@dicebear/core": "^5.0.0-alpha.20",
"@tsconfig/recommended": "^1.0.1",
"del-cli": "^4.0.1",
"typescript": "^4.5.2",
"uvu": "^0.5.2"
"typescript": "^4.6.3",
"uvu": "^0.5.3"
},
"peerDependencies": {
"@dicebear/core": "^5.0.0-alpha.10"
"@dicebear/core": "^5.0.0-alpha.16"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": "^14.13.1 || >=16.0.0"
},

@@ -48,3 +47,3 @@ "publishConfig": {

},
"gitHead": "149a4a22c3a4d48dd5552bd22a49db0f853e0b5e"
"gitHead": "6b1c2bd64294365be21d0a133a362ede5ed62b5a"
}

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