@dicebear/shapes
Advanced tools
Comparing version 7.0.4 to 7.0.5
@@ -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,4 +14,4 @@ import { getComponents } from './utils/getComponents.js'; | ||
creator: 'Florian Körner', | ||
source: 'https://dicebear.com', | ||
homepage: 'https://dicebear.com', | ||
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 | ||
* 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 | ||
*/ | ||
@@ -14,4 +14,4 @@ import { getComponents } from './utils/getComponents.js'; | ||
creator: 'Florian Körner', | ||
source: 'https://dicebear.com', | ||
homepage: 'https://dicebear.com', | ||
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": "7.0.4", | ||
"version": "7.0.5", | ||
"description": "Avatar style for DiceBear", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@dicebear/core": "7.0.4", | ||
"@dicebear/core": "7.0.5", | ||
"@tsconfig/recommended": "^1.0.2", | ||
@@ -48,3 +48,3 @@ "del-cli": "^5.0.0", | ||
}, | ||
"gitHead": "b56fa7ab438d84b8bfa7b881ff829ec9e0d5860b" | ||
"gitHead": "644f1f7d23af086cdd17dda5bf64f5c3afa16a64" | ||
} |
<h1 align="center"><img src="https://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> | ||
<a href="https://www.dicebear.com">Shapes</a> by <a href="https://www.dicebear.com">Florian Körner</a> | ||
</p> | ||
@@ -18,4 +18,4 @@ | ||
<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 | ||
The avatar style is based on <a href="https://www.dicebear.com">Shapes</a> by | ||
<a href="https://www.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. | ||
@@ -22,0 +22,0 @@ </p> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
700
31798