Socket
Socket
Sign inDemoInstall

@dicebear/shapes

Package Overview
Dependencies
79
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.0.0-rc.2 to 8.0.0

8

./lib/index.js

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

@@ -13,5 +13,5 @@ import { getComponents } from './utils/getComponents.js';

title: 'Shapes',
creator: 'Florian Körner',
source: 'https://dicebear.com',
homepage: 'https://dicebear.com',
creator: 'DiceBear',
source: 'https://www.dicebear.com',
homepage: 'https://www.dicebear.com',
license: {

@@ -18,0 +18,0 @@ name: 'CC0 1.0',

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

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

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

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

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/
import type { ComponentGroup } from '../types.js';
export declare const shape1: ComponentGroup;

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

@@ -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/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/
import type { ComponentGroup } from '../types.js';
export declare const shape2: ComponentGroup;

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

@@ -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/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/
import type { ComponentGroup } from '../types.js';
export declare const shape3: ComponentGroup;

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

@@ -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/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

@@ -8,0 +8,0 @@ import { Prng, StyleOptions } from "@dicebear/core";

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

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

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

@@ -12,7 +12,7 @@ /*!

* Code licensed under MIT License.
* Copyright (c) 2023 Florian Körner
* Copyright (c) 2024 Florian Körner
*
* Design "Shapes" by Florian Körner licensed under CC0 1.0. / Remix of the original.
* Source: https://dicebear.com
* Homepage: https://dicebear.com
* Design "Shapes" by DiceBear licensed under CC0 1.0.
* Source: https://www.dicebear.com
* Homepage: https://www.dicebear.com
* License: https://creativecommons.org/publicdomain/zero/1.0/

@@ -19,0 +19,0 @@ */

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

@@ -13,5 +13,5 @@ import { getComponents } from './utils/getComponents.js';

title: 'Shapes',
creator: 'Florian Körner',
source: 'https://dicebear.com',
homepage: 'https://dicebear.com',
creator: 'DiceBear',
source: 'https://www.dicebear.com',
homepage: 'https://www.dicebear.com',
license: {

@@ -18,0 +18,0 @@ name: 'CC0 1.0',

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/
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/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

@@ -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/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

@@ -8,0 +8,0 @@ export interface Options {

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/
export {};

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/
export declare function convertColor(color: string): string;

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

@@ -8,0 +8,0 @@ export function convertColor(color) {

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

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

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

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

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

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

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

@@ -15,2 +15,4 @@ import { pickComponent } from './pickComponent.js';

values: options.shape1,
width: 100,
height: 100,
rotation: ((_a = options.shape1Rotation) === null || _a === void 0 ? void 0 : _a.length) ? options.shape1Rotation : [0],

@@ -24,2 +26,4 @@ offsetX: ((_b = options.shape1OffsetX) === null || _b === void 0 ? void 0 : _b.length) ? options.shape1OffsetX : [0],

values: options.shape2,
width: 100,
height: 100,
rotation: ((_d = options.shape2Rotation) === null || _d === void 0 ? void 0 : _d.length) ? options.shape2Rotation : [0],

@@ -33,2 +37,4 @@ offsetX: ((_e = options.shape2OffsetX) === null || _e === void 0 ? void 0 : _e.length) ? options.shape2OffsetX : [0],

values: options.shape3,
width: 100,
height: 100,
rotation: ((_g = options.shape3Rotation) === null || _g === void 0 ? void 0 : _g.length) ? options.shape3Rotation : [0],

@@ -35,0 +41,0 @@ offsetX: ((_h = options.shape3OffsetX) === null || _h === void 0 ? void 0 : _h.length) ? options.shape3OffsetX : [0],

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/

@@ -14,2 +14,4 @@ import type { Prng } from '@dicebear/core';

values?: string[];
width: number;
height: number;
rotation: number[];

@@ -19,3 +21,3 @@ offsetX: number[];

};
export declare function pickComponent({ prng, group, values, rotation, offsetX, offsetY }: Props): ComponentPick;
export declare function pickComponent({ prng, group, width, height, values, rotation, offsetX, offsetY }: Props): ComponentPick;
export {};

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

* Plugin: https://www.figma.com/community/plugin/1005765655729342787
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic/%40dicebear%2Fshapes
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
*/
import * as components from '../components/index.js';
export function pickComponent({ prng, group, values = [], rotation, offsetX, offsetY }) {
export function pickComponent({ prng, group, width, height, values = [], rotation, offsetX, offsetY }) {
const componentCollection = components;

@@ -22,3 +22,3 @@ const key = prng.pick(values);

if (this.rotation || this.offsetX || this.offsetY) {
result = `<g transform="translate(${((_a = this.offsetX) !== null && _a !== void 0 ? _a : 0)}, ${(_b = this.offsetY) !== null && _b !== void 0 ? _b : 0}) rotate(${(_c = this.rotation) !== null && _c !== void 0 ? _c : 0} 50 50)">${result}</g>`;
result = `<g transform="translate(${((_a = this.offsetX) !== null && _a !== void 0 ? _a : 0)}, ${(_b = this.offsetY) !== null && _b !== void 0 ? _b : 0}) rotate(${(_c = this.rotation) !== null && _c !== void 0 ? _c : 0} ${width / 2} ${height / 2})">${result}</g>`;
}

@@ -25,0 +25,0 @@ return result;

{
"name": "@dicebear/shapes",
"version": "8.0.0-rc.2",
"version": "8.0.0",
"description": "Avatar style for DiceBear",

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

"devDependencies": {
"@dicebear/core": "8.0.0-rc.2",
"@dicebear/core": "8.0.0",
"@tsconfig/recommended": "^1.0.2",

@@ -40,3 +40,3 @@ "del-cli": "^5.0.0",

"peerDependencies": {
"@dicebear/core": "^8.0.0-rc.2"
"@dicebear/core": "^8.0.0"
},

@@ -49,3 +49,3 @@ "engines": {

},
"gitHead": "226c203a893f9e22401d35ab24c0418462d262c9"
"gitHead": "218cf2a59086fb512ac9b1bfc498ccb8855f4226"
}

@@ -1,5 +0,5 @@

<h1 align="center"><img src="https://dicebear.com/logo-readme.svg" width="96" /> <br />DiceBear Shapes</h1>
<h1 align="center"><img src="https://www.dicebear.com/logo-readme.svg" width="96" /> <br />DiceBear Shapes</h1>
<p align="center">
<strong>Avatar Style for <a href="https://dicebear.com/">DiceBear</a></strong><br />
<a href="https://dicebear.com">Shapes</a> by <a href="https://dicebear.com">Florian Körner</a>
<strong>Avatar Style for <a href="https://www.dicebear.com/">DiceBear</a></strong><br />
<a href="https://www.dicebear.com">Shapes</a> by <a href="https://www.dicebear.com">DiceBear</a>
</p>

@@ -18,14 +18,14 @@

<p align="center">
The avatar style is based on <a href="https://dicebear.com">Shapes</a> by
<a href="https://dicebear.com">Florian Körner</a>, licensed under
<a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0</a>. / Remix of the original.
<a href="https://www.dicebear.com">Shapes</a> by
<a href="https://www.dicebear.com">DiceBear</a>, licensed under
<a href="https://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0</a>.
</p>
<p align="center">
See <a href="https://dicebear.com/licenses">license overview</a> for more information.
See <a href="https://www.dicebear.com/licenses">license overview</a> for more information.
</p>
<p align="center">
<a href="https://dicebear.com/styles/shapes">
<a href="https://www.dicebear.com/styles/shapes">
Read Documentation
</a>
</p>

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc