@dicebear/personas 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 +14 -1
- package/README.md +17 -5
- package/lib/components/body.d.ts +1 -1
- package/lib/components/body.js +3 -3
- package/lib/components/eyes.d.ts +1 -1
- package/lib/components/eyes.js +1 -1
- package/lib/components/facialHair.d.ts +1 -1
- package/lib/components/facialHair.js +2 -2
- package/lib/components/hair.d.ts +1 -1
- package/lib/components/hair.js +3 -3
- package/lib/components/index.d.ts +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/mouth.d.ts +1 -1
- package/lib/components/mouth.js +1 -1
- package/lib/components/nose.d.ts +1 -1
- package/lib/components/nose.js +1 -1
- package/lib/hooks/onPostCreate.d.ts +2 -2
- package/lib/hooks/onPostCreate.js +1 -1
- package/lib/hooks/onPreCreate.d.ts +2 -2
- package/lib/hooks/onPreCreate.js +1 -1
- package/lib/index.d.ts +17 -3
- package/lib/index.js +32 -15
- package/lib/schema.d.ts +1 -1
- package/lib/schema.js +1 -1
- package/lib/types.d.ts +7 -7
- package/lib/types.js +1 -1
- package/lib/utils/getColors.d.ts +2 -2
- package/lib/utils/getColors.js +1 -1
- package/lib/utils/getComponents.d.ts +2 -2
- package/lib/utils/getComponents.js +1 -1
- package/lib/utils/pickComponent.d.ts +2 -2
- package/lib/utils/pickComponent.js +1 -1
- package/package.json +4 -3
- package/lib/core.d.ts +0 -9
- package/lib/core.js +0 -40
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: Personas by Draftbit (https://personas.draftbit.com/)
|
|
8
|
+
Designer: Draftbit - draftbit.com (https://draftbit.com/)
|
|
9
|
+
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
|
|
10
|
+
|
|
11
|
+
# Code
|
|
12
|
+
Applies to all non-design files in this package.
|
|
13
|
+
|
|
1
14
|
MIT License
|
|
2
15
|
|
|
3
|
-
Copyright (c)
|
|
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="
|
|
1
|
+
<h1 align="center"><img src="https://dicebear.com/logo-readme.svg" width="96" /> <br />DiceBear Personas</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://personas.draftbit.com/">Personas by Draftbit</a>
|
|
5
|
-
by <a href="https://draftbit.com/">Draftbit - draftbit.com</a>
|
|
4
|
+
<a href="https://personas.draftbit.com/">Personas by Draftbit</a> by <a href="https://draftbit.com/">Draftbit - draftbit.com</a>
|
|
6
5
|
</p>
|
|
7
6
|
|
|
8
7
|
<p align="center">
|
|
9
|
-
|
|
10
|
-
<
|
|
8
|
+
<img src="https://api.dicebear.com/5.x/personas/svg?seed=Mimi" width="64" />
|
|
9
|
+
<img src="https://api.dicebear.com/5.x/personas/svg?seed=Sasha" width="64" />
|
|
10
|
+
<img src="https://api.dicebear.com/5.x/personas/svg?seed=Lilly" width="64" />
|
|
11
|
+
<img src="https://api.dicebear.com/5.x/personas/svg?seed=Tigger" width="64" />
|
|
12
|
+
<img src="https://api.dicebear.com/5.x/personas/svg?seed=Bella" width="64" />
|
|
13
|
+
<img src="https://api.dicebear.com/5.x/personas/svg?seed=Zoe" width="64" />
|
|
14
|
+
<img src="https://api.dicebear.com/5.x/personas/svg?seed=Kitty" width="64" />
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
The avatar style is based on <a href="https://personas.draftbit.com/">Personas by Draftbit</a> by
|
|
19
|
+
<a href="https://draftbit.com/">Draftbit - draftbit.com</a>, licensed under
|
|
20
|
+
<a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.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
|
|
package/lib/components/body.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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
import type { ComponentGroup } from '../types.js';
|
|
8
8
|
export declare const body: ComponentGroup;
|
package/lib/components/body.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
import { escape } from '@dicebear/core';
|
|
8
8
|
export const body = {
|
|
9
9
|
'squared': (components, colors) => `<path d="M16 5v3a5 5 0 0 0 10 0V5l6.65 2.05a9 9 0 0 1 6.35 8.6V20H3v-4.35a9 9 0 0 1 6.35-8.6L16 5Z" fill="${escape.xml(`#${colors.clothing}`)}"/>`,
|
|
10
10
|
'rounded': (components, colors) => `<path d="M16 7v.47a5 5 0 1 0 10 0V7c7.06 1.52 12.93 6.74 16 13H0C3.07 13.74 8.94 8.52 16 7Z" fill="${escape.xml(`#${colors.clothing}`)}"/>`,
|
|
11
|
-
'small': (components, colors) => `<path d="M32 20H10v-8a11 11 0 0 1 6-9.8V4a5 5 0 0 0 10 0V2.2a11 11 0 0 1 6 9.8v8Z" fill="${escape.xml(`#${colors.clothing}`)}"/><mask id="bodySmall-a" style="mask-type:
|
|
12
|
-
'checkered': (components, colors) => `<path d="M16 5v3a5 5 0 0 0 10 0V5l6.65 2.05a9 9 0 0 1 6.35 8.6V20H3v-4.35a9 9 0 0 1 6.35-8.6L16 5Z" fill="${escape.xml(`#${colors.clothing}`)}"/><mask id="bodyCheckered-a" style="mask-type:
|
|
11
|
+
'small': (components, colors) => `<path d="M32 20H10v-8a11 11 0 0 1 6-9.8V4a5 5 0 0 0 10 0V2.2a11 11 0 0 1 6 9.8v8Z" fill="${escape.xml(`#${colors.clothing}`)}"/><mask id="bodySmall-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="10" y="2" width="22" height="18"><path d="M32 20H10v-8a11 11 0 0 1 6-9.8V4a5 5 0 0 0 10 0V2.2a11 11 0 0 1 6 9.8v8Z" fill="#fff"/></mask><g mask="url(#bodySmall-a)"><path opacity=".14" d="M20.62 8.25 22 8l1.2.5L10 15l10.62-6.75Z" fill="#000"/><path d="M21 1h11v47H10V15l13.34-6.58L21 1Z" fill="#fff" style="mix-blend-mode:overlay" opacity=".26"/></g>`,
|
|
12
|
+
'checkered': (components, colors) => `<path d="M16 5v3a5 5 0 0 0 10 0V5l6.65 2.05a9 9 0 0 1 6.35 8.6V20H3v-4.35a9 9 0 0 1 6.35-8.6L16 5Z" fill="${escape.xml(`#${colors.clothing}`)}"/><mask id="bodyCheckered-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="3" y="5" width="36" height="15"><path d="M16 5v3a5 5 0 0 0 10 0V5l6.65 2.05a9 9 0 0 1 6.35 8.6V20H3v-4.35a9 9 0 0 1 6.35-8.6L16 5Z" fill="#fff"/></mask><g mask="url(#bodyCheckered-a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 20h4V6.54l-1.65.5A9 9 0 0 0 7 8.17V20ZM32.65 7.05 31 6.54V20h4V8.16a9 9 0 0 0-2.35-1.11ZM23 20h4v-8.4a7.02 7.02 0 0 1-4 3.11v5.3Zm-4 0h-4v-8.4a7.02 7.02 0 0 0 4 3.11v5.3Z" fill="#000" style="mix-blend-mode:overlay" opacity=".4"/></g><path d="M3.4 13a9.01 9.01 0 0 1 2.53-4h8.14a6.98 6.98 0 0 0 2.03 4H3.4ZM39 17v3H3v-3h36ZM36.07 9a9.01 9.01 0 0 1 2.53 4H25.9a6.98 6.98 0 0 0 2.03-4h8.14Z" style="mix-blend-mode:lighten" opacity=".18" fill="#fff"/><mask id="bodyCheckered-b" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="3" y="9" width="36" height="11"><path d="M3.4 13a9.01 9.01 0 0 1 2.53-4h8.14a6.98 6.98 0 0 0 2.03 4H3.4ZM39 17v3H3v-3h36ZM36.07 9a9.01 9.01 0 0 1 2.53 4H25.9a6.98 6.98 0 0 0 2.03-4h8.14Z" style="mix-blend-mode:lighten" fill="#fff"/></mask>`,
|
|
13
13
|
};
|
package/lib/components/eyes.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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
import type { ComponentGroup } from '../types.js';
|
|
8
8
|
export declare const eyes: ComponentGroup;
|
package/lib/components/eyes.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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
export const eyes = {
|
|
8
8
|
'open': (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M4 4.5a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0Zm13 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 0 0-3 0Z" fill="#1B0640"/>`,
|
|
@@ -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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
import type { ComponentGroup } from '../types.js';
|
|
8
8
|
export declare const facialHair: ComponentGroup;
|
|
@@ -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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
import { escape } from '@dicebear/core';
|
|
8
8
|
export const facialHair = {
|
|
9
|
-
'beardMustache': (components, colors) => `<path d="m12.47 9.46 2.43-.83A2.5 2.5 0 0 1 18 10a2.5 2.5 0 0 1 3.1-1.37l2.43.83A18.65 18.65 0 0 0 32 2.7V9A14 14 0 1 1 4 9V2.7c2.05 2.94 5 5.43 8.47 6.76Z" fill="${escape.xml(`#${colors.hair}`)}"/><mask id="facialHairBeardMustache-a" style="mask-type:
|
|
9
|
+
'beardMustache': (components, colors) => `<path d="m12.47 9.46 2.43-.83A2.5 2.5 0 0 1 18 10a2.5 2.5 0 0 1 3.1-1.37l2.43.83A18.65 18.65 0 0 0 32 2.7V9A14 14 0 1 1 4 9V2.7c2.05 2.94 5 5.43 8.47 6.76Z" fill="${escape.xml(`#${colors.hair}`)}"/><mask id="facialHairBeardMustache-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="4" y="2" width="28" height="21"><path d="m12.47 9.46 2.43-.83A2.5 2.5 0 0 1 18 10a2.5 2.5 0 0 1 3.1-1.37l2.43.83A18.65 18.65 0 0 0 32 2.7V9A14 14 0 1 1 4 9V2.7c2.05 2.94 5 5.43 8.47 6.76Z" fill="#fff"/></mask><g mask="url(#facialHairBeardMustache-a)"><path d="M32 9V2.7c-2.05 2.94-5 5.43-8.47 6.76l2.8.96a1 1 0 0 1-.07 1.91l-5.08 1.3A2.71 2.71 0 0 1 18 12.05a2.72 2.72 0 0 1-3.18 1.58l-5.08-1.3a1 1 0 0 1-.08-1.91l2.81-.96A18.65 18.65 0 0 1 4 2.7V9a14 14 0 1 0 28 0Z" fill="#fff" style="mix-blend-mode:overlay" opacity=".26"/><path d="M22 13.42v.08a3 3 0 0 1-3 3h-2a3 3 0 0 1-3-3.08l.82.21A2.71 2.71 0 0 0 18 12.05a2.72 2.72 0 0 0 3.18 1.58l.82-.2Z" fill="#FFFEFD"/></g>`,
|
|
10
10
|
'pyramid': (components, colors) => `<path d="M18.02 12.05a2.72 2.72 0 0 1-3.19 1.59l-5.08-1.3a1 1 0 0 1-.07-1.92l5.23-1.79a2.5 2.5 0 0 1 3.1 1.37 2.5 2.5 0 0 1 3.11-1.37l5.24 1.8a1 1 0 0 1-.08 1.9l-5.08 1.3a2.72 2.72 0 0 1-3.18-1.58Z" fill="${escape.xml(`#${colors.hair}`)}"/>`,
|
|
11
11
|
'walrus': (components, colors) => `<path d="M10 14a5 5 0 0 1 5-5h6a5 5 0 0 1 5 5H10Z" fill="${escape.xml(`#${colors.hair}`)}"/>`,
|
|
12
12
|
'goatee': (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M13.61 10.67a3.61 3.61 0 0 0-2.6 3.57v4.67c0 1 .48 1.93 1.37 2.4 1.39.72 3.63 1.7 5.78 1.7 2.14 0 4.26-.96 5.56-1.7A2.62 2.62 0 0 0 25 18.99v-4.74a3.61 3.61 0 0 0-2.61-3.57 18.05 18.05 0 0 0-4.4-.67c-1.45 0-3.07.33-4.39.67Zm.3 1.41c-.8.22-1.32.97-1.32 1.8v2.67c0 1.07.56 2.06 1.54 2.48 1.08.46 2.59.97 3.97.97 1.39 0 2.85-.5 3.9-.97.96-.42 1.5-1.4 1.5-2.44v-2.7c0-.83-.52-1.58-1.33-1.8a16.72 16.72 0 0 0-4.17-.63c-1.51 0-3.05.33-4.1.62Z" fill="${escape.xml(`#${colors.hair}`)}"/>`,
|
package/lib/components/hair.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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
import type { ComponentGroup } from '../types.js';
|
|
8
8
|
export declare const hair: ComponentGroup;
|
package/lib/components/hair.js
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
import { escape } from '@dicebear/core';
|
|
8
8
|
export const hair = {
|
|
9
9
|
'long': (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M44 26c-1.8-2-3.13-4.5-3.97-7.47-1.87 2.28-4.55 3.6-8.03 3.97-5.83.61-10.82-.33-14.95-2.82A13.96 13.96 0 0 0 16 25v1.03c-.73.08-1.42.34-2 .73V25.5C14 16.39 21.16 9 30 9s16 7.39 16 16.5v1.26a4.47 4.47 0 0 0-2-.73V26Zm2 8.24v6.6c0 7.32-4.61 13.52-11 15.68V44.08A14.04 14.04 0 0 0 43.42 35h.08c.93 0 1.78-.28 2.5-.76Zm-32 6.6c0 7.37 4.68 13.6 11.13 15.73a1073 1073 0 0 0-.13-7.02v-5.47A14.04 14.04 0 0 1 16.58 35h-.08c-.93 0-1.79-.28-2.5-.76v6.6Z" fill="${escape.xml(`#${colors.hair}`)}"/><mask id="hairLong-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="14" y="9" width="32" height="48"><path fill-rule="evenodd" clip-rule="evenodd" d="M44 26c-1.8-2-3.13-4.5-3.97-7.47-1.87 2.28-4.55 3.6-8.03 3.97-5.83.61-10.82-.33-14.95-2.82A13.96 13.96 0 0 0 16 25v1.03c-.73.08-1.42.34-2 .73V25.5C14 16.39 21.16 9 30 9s16 7.39 16 16.5v1.26a4.47 4.47 0 0 0-2-.73V26Zm2 8.24v6.6c0 7.32-4.61 13.52-11 15.68V44.08A14.04 14.04 0 0 0 43.42 35h.08c.93 0 1.78-.28 2.5-.76Zm-32 6.6c0 7.37 4.68 13.6 11.13 15.73a1073 1073 0 0 0-.13-7.02v-5.47A14.04 14.04 0 0 1 16.58 35h-.08c-.93 0-1.79-.28-2.5-.76v6.6Z" fill="#362C47"/></mask><g mask="url(#hairLong-a)"><path fill="#fff" d="M14 9h32v18H14z" style="mix-blend-mode:overlay" opacity=".26"/></g>`,
|
|
10
10
|
'sideShave': (components, colors) => `<path d="M35 11.92A14 14 0 0 1 44 25v1s-1.33-3.1-3.16-4.93c-1.84-1.82-3.34-.7-4.53-2.52-1.2-1.83-1.31-6.63-1.31-6.63Z" fill="${escape.xml(`#${colors.hair}`)}" opacity=".3"/><path d="M30.65 23.09c-1.6 1.26-4.4 1.88-7.24 2.5-4.62 1.02-9.4 2.07-9.4 5.98V25.5C14 16.39 21.16 9 30 9c4.84 0 5.68 2.65 5.46 6.23-.2 3-.62 4.55-4.8 7.86ZM25 47a9.4 9.4 0 0 1-9.44 9.53L7.5 56.5s4-8.23 5-11.11l.06-.2c-.84.51-1.84.81-2.92.81H8.5s4.1-3.74 5.35-9.69c.1-1.23.15-2.07.15-2.07a4.48 4.48 0 0 0 2.58.76A14.04 14.04 0 0 0 25 44.08V47Z" fill="${escape.xml(`#${colors.hair}`)}"/>`,
|
|
11
11
|
'shortCombover': (components, colors) => `<path d="M40.26 12.63a7.93 7.93 0 0 1 4.6 8.35L44 27c-2.83-1.7-4.7-5.55-5.6-11.56a9.24 9.24 0 0 1-5.7 2.77c-1.82.2-3.39.29-4.7.29-3 0-5.67-.5-8-1.5 0 3.67-1.33 7.17-4 10.5l-.92-8.53A9 9 0 0 1 24.03 9H41c0 1.28-.26 2.51-.74 3.63Z" fill="${escape.xml(`#${colors.hair}`)}"/><path d="M40.26 12.63c.48-1.12.74-2.35.74-3.63H24.03a9 9 0 0 0-8.95 9.97L16 27.5c2.67-3.33 4-6.83 4-10.5 2.33 1 5 1.5 8 1.5 1.31 0 2.88-.1 4.7-.29a9.24 9.24 0 0 0 7.56-5.58ZM44.88 20.84a7.91 7.91 0 0 0-2.42-6.73 9.29 9.29 0 0 1-3.45 4.5c1.04 4.22 2.7 7.01 5 8.39l.85-6.02.02-.14Z" style="mix-blend-mode:overlay" opacity=".26" fill="#fff"/>`,
|
|
12
|
-
'curlyHighTop': (components, colors) => `<path d="M31.8 7a2 2 0 0 1 3.8 0h.57a2 2 0 0 1 3.83.67l.22.1a2 2 0 0 1 3.13 2.3l.15.17a2 2 0 0 1 1.77 3.41c.05.16.09.31.12.47a2 2 0 0 1 .02 3.75l-.05.32a2 2 0 0 1-.02 3.63 2 2 0 0 1 .16.85 1.8 1.8 0 0 1-1.22 2.92L44 27.5c-.44-.66-.84-1.48-1.2-2.46a1.8 1.8 0 0 1-.45-.8 2 2 0 0 1-.56-2.68l-.02-.1a2 2 0 0 1-.96-2.94 2 2 0 0 1-2.44-.32 2 2 0 0 1-3.72.06l-.31.03a2 2 0 0 1-3.58.2h-.23a2 2 0 0 1-3.52-.1l-.4-.03a2 2 0 0 1-3.68-.17 2 2 0 0 1-3.04-.22l-.03.16a2 2 0 0 1-.7 3.35 2 2 0 0 1-1.4 3.1c-.5.97-1.09 1.94-1.76 2.9l-.19-1.92a1.8 1.8 0 0 1-.34-3.47V22a2 2 0 0 1-.39-3.9l-.01-.14a2 2 0 0 1 .07-3.92c0-.06.02-.12.04-.17a2 2 0 0 1 1.46-3.63A2 2 0 0 1 19.7 7.9v-.1a2 2 0 0 1 3.84-.8h.05a2 2 0 0 1 3.82 0h.18a2 2 0 0 1 3.82 0h.38Z" fill="${escape.xml(`#${colors.hair}`)}"/><mask id="hairCurlyHighTop-a" style="mask-type:
|
|
12
|
+
'curlyHighTop': (components, colors) => `<path d="M31.8 7a2 2 0 0 1 3.8 0h.57a2 2 0 0 1 3.83.67l.22.1a2 2 0 0 1 3.13 2.3l.15.17a2 2 0 0 1 1.77 3.41c.05.16.09.31.12.47a2 2 0 0 1 .02 3.75l-.05.32a2 2 0 0 1-.02 3.63 2 2 0 0 1 .16.85 1.8 1.8 0 0 1-1.22 2.92L44 27.5c-.44-.66-.84-1.48-1.2-2.46a1.8 1.8 0 0 1-.45-.8 2 2 0 0 1-.56-2.68l-.02-.1a2 2 0 0 1-.96-2.94 2 2 0 0 1-2.44-.32 2 2 0 0 1-3.72.06l-.31.03a2 2 0 0 1-3.58.2h-.23a2 2 0 0 1-3.52-.1l-.4-.03a2 2 0 0 1-3.68-.17 2 2 0 0 1-3.04-.22l-.03.16a2 2 0 0 1-.7 3.35 2 2 0 0 1-1.4 3.1c-.5.97-1.09 1.94-1.76 2.9l-.19-1.92a1.8 1.8 0 0 1-.34-3.47V22a2 2 0 0 1-.39-3.9l-.01-.14a2 2 0 0 1 .07-3.92c0-.06.02-.12.04-.17a2 2 0 0 1 1.46-3.63A2 2 0 0 1 19.7 7.9v-.1a2 2 0 0 1 3.84-.8h.05a2 2 0 0 1 3.82 0h.18a2 2 0 0 1 3.82 0h.38Z" fill="${escape.xml(`#${colors.hair}`)}"/><mask id="hairCurlyHighTop-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="13" y="5" width="34" height="23"><path d="M31.8 7a2 2 0 0 1 3.8 0h.57a2 2 0 0 1 3.83.67l.22.1a2 2 0 0 1 3.13 2.3l.15.17a2 2 0 0 1 1.77 3.41c.05.16.09.31.12.47a2 2 0 0 1 .02 3.75l-.05.32a2 2 0 0 1-.02 3.63 2 2 0 0 1 .16.85 1.8 1.8 0 0 1-1.22 2.92L44 27.5c-.44-.66-.84-1.48-1.2-2.46a1.8 1.8 0 0 1-.45-.8 2 2 0 0 1-.56-2.68l-.02-.1a2 2 0 0 1-.96-2.94 2 2 0 0 1-2.44-.32 2 2 0 0 1-3.72.06l-.31.03a2 2 0 0 1-3.58.2h-.23a2 2 0 0 1-3.52-.1l-.4-.03a2 2 0 0 1-3.68-.17 2 2 0 0 1-3.04-.22l-.03.16a2 2 0 0 1-.7 3.35 2 2 0 0 1-1.4 3.1c-.5.97-1.09 1.94-1.76 2.9l-.19-1.92a1.8 1.8 0 0 1-.34-3.47V22a2 2 0 0 1-.39-3.9l-.01-.14a2 2 0 0 1 .07-3.92c0-.06.02-.12.04-.17a2 2 0 0 1 1.46-3.63A2 2 0 0 1 19.7 7.9v-.1a2 2 0 0 1 3.84-.8h.05a2 2 0 0 1 3.82 0h.18a2 2 0 0 1 3.82 0h.38Z" fill="#fff"/></mask><g mask="url(#hairCurlyHighTop-a)"><path fill="#fff" d="M13 5h34v23H13z" style="mix-blend-mode:overlay" opacity=".26"/></g>`,
|
|
13
13
|
'bobCut': (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M44 26a17.63 17.63 0 0 1-3.35-5.6A32.92 32.92 0 0 1 30 22.04c-4.85 0-9.14-.83-12.9-2.5A13.95 13.95 0 0 0 16 25v1.03c-.73.08-1.42.34-2 .73v-1.38C14 16.33 21.16 9 30 9s16 7.33 16 16.38v1.38a4.47 4.47 0 0 0-2-.73V26Zm-9 20.06v-1.98A14.04 14.04 0 0 0 43.42 35h.08c.93 0 1.78-.28 2.5-.76v6.38c0 .47-.02.95-.06 1.41A34.63 34.63 0 0 1 35 46.06Zm-20.94-4.03A34.63 34.63 0 0 0 25 46.06v-1.98A14.04 14.04 0 0 1 16.58 35h-.08c-.93 0-1.79-.28-2.5-.76v6.38c0 .47.02.95.06 1.41Z" fill="${escape.xml(`#${colors.hair}`)}"/><mask id="hairBobCut-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="14" y="9" width="32" height="38"><path fill-rule="evenodd" clip-rule="evenodd" d="M44 26a17.63 17.63 0 0 1-3.35-5.6A32.92 32.92 0 0 1 30 22.04c-4.85 0-9.14-.83-12.9-2.5A13.95 13.95 0 0 0 16 25v1.03c-.73.08-1.42.34-2 .73v-1.38C14 16.33 21.16 9 30 9s16 7.33 16 16.38v1.38a4.47 4.47 0 0 0-2-.73V26Zm-9 20.06v-1.98A14.04 14.04 0 0 0 43.42 35h.08c.93 0 1.78-.28 2.5-.76v6.38c0 .47-.02.95-.06 1.41A34.63 34.63 0 0 1 35 46.06Zm-20.94-4.03A34.63 34.63 0 0 0 25 46.06v-1.98A14.04 14.04 0 0 1 16.58 35h-.08c-.93 0-1.79-.28-2.5-.76v6.38c0 .47.02.95.06 1.41Z" fill="#362C47"/></mask><g mask="url(#hairBobCut-a)"><path fill="#fff" d="M13 9h34v18H13z" style="mix-blend-mode:overlay" opacity=".26"/></g>`,
|
|
14
|
-
'curly': (components, colors) => `<path d="m44 26-.02-.02-.3.02a2 2 0 0 1-1.8-2.88 2 2 0 0 1-2.73-2.1 2 2 0 0 1-3.3.56h-.02a1.99 1.99 0 0 1-2 2.05 2 2 0 0 1-1.75-1.04 2 2 0 0 1-3.92.33 2 2 0 0 1-3.87-.6c-.04 0-.09 0-.13-.02a2 2 0 0 1-3.67-.98c-.3-.1-.57-.2-.85-.32.02.09.02.17.02.26a2 2 0 0 1-2.74 1.86A2 2 0 0 1 16 25.8v.23a4.5 4.5 0 0 0 .58 8.97A14.04 14.04 0 0 0 25 44.08v3.06c-.25-.2-.47-.42-.65-.68-.49-.13-.96-.29-1.43-.46a3.46 3.46 0 0 1-4.54-2.3 20.9 20.9 0 0 1-.98-.7 3.46 3.46 0 0 1-3.83-3.8c-.17-.21-.34-.43-.5-.66a3.46 3.46 0 0 1-2.66-5.07l-.14-.39a3.47 3.47 0 0 1-1.08-5.96v-.01a3.47 3.47 0 0 1 .47-6.2 3.47 3.47 0 0 1 2.28-5.79 3.47 3.47 0 0 1 3.87-4.86 3.47 3.47 0 0 1 5.15-3.5 3.47 3.47 0 0 1 5.94-1.83 3.47 3.47 0 0 1 6.22 0 3.47 3.47 0 0 1 5.94 1.83 3.47 3.47 0 0 1 5.14 3.5 3.47 3.47 0 0 1 3.87 4.86 3.47 3.47 0 0 1 2.28 5.8 3.47 3.47 0 0 1 .47 6.19 3.47 3.47 0 0 1-1.08 5.97l-.14.4a3.47 3.47 0 0 1-2.66 5.06c-.16.23-.33.45-.5.66A3.46 3.46 0 0 1 42.6 43l-.98.7a3.46 3.46 0 0 1-4.54 2.3c-.47.17-.94.33-1.43.46-.18.26-.4.49-.65.68v-3.06A14.04 14.04 0 0 0 43.42 35h.08a4.5 4.5 0 0 0 .5-8.97V26Z" fill="${escape.xml(`#${colors.hair}`)}"/><mask id="hairCurly-a" style="mask-type:
|
|
14
|
+
'curly': (components, colors) => `<path d="m44 26-.02-.02-.3.02a2 2 0 0 1-1.8-2.88 2 2 0 0 1-2.73-2.1 2 2 0 0 1-3.3.56h-.02a1.99 1.99 0 0 1-2 2.05 2 2 0 0 1-1.75-1.04 2 2 0 0 1-3.92.33 2 2 0 0 1-3.87-.6c-.04 0-.09 0-.13-.02a2 2 0 0 1-3.67-.98c-.3-.1-.57-.2-.85-.32.02.09.02.17.02.26a2 2 0 0 1-2.74 1.86A2 2 0 0 1 16 25.8v.23a4.5 4.5 0 0 0 .58 8.97A14.04 14.04 0 0 0 25 44.08v3.06c-.25-.2-.47-.42-.65-.68-.49-.13-.96-.29-1.43-.46a3.46 3.46 0 0 1-4.54-2.3 20.9 20.9 0 0 1-.98-.7 3.46 3.46 0 0 1-3.83-3.8c-.17-.21-.34-.43-.5-.66a3.46 3.46 0 0 1-2.66-5.07l-.14-.39a3.47 3.47 0 0 1-1.08-5.96v-.01a3.47 3.47 0 0 1 .47-6.2 3.47 3.47 0 0 1 2.28-5.79 3.47 3.47 0 0 1 3.87-4.86 3.47 3.47 0 0 1 5.15-3.5 3.47 3.47 0 0 1 5.94-1.83 3.47 3.47 0 0 1 6.22 0 3.47 3.47 0 0 1 5.94 1.83 3.47 3.47 0 0 1 5.14 3.5 3.47 3.47 0 0 1 3.87 4.86 3.47 3.47 0 0 1 2.28 5.8 3.47 3.47 0 0 1 .47 6.19 3.47 3.47 0 0 1-1.08 5.97l-.14.4a3.47 3.47 0 0 1-2.66 5.06c-.16.23-.33.45-.5.66A3.46 3.46 0 0 1 42.6 43l-.98.7a3.46 3.46 0 0 1-4.54 2.3c-.47.17-.94.33-1.43.46-.18.26-.4.49-.65.68v-3.06A14.04 14.04 0 0 0 43.42 35h.08a4.5 4.5 0 0 0 .5-8.97V26Z" fill="${escape.xml(`#${colors.hair}`)}"/><mask id="hairCurly-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="7" y="3" width="46" height="45"><path d="m44 26-.02-.02-.3.02a2 2 0 0 1-1.8-2.88 2 2 0 0 1-2.73-2.1 2 2 0 0 1-3.3.56h-.02a1.99 1.99 0 0 1-2 2.05 2 2 0 0 1-1.75-1.04 2 2 0 0 1-3.92.33 2 2 0 0 1-3.87-.6c-.04 0-.09 0-.13-.02a2 2 0 0 1-3.67-.98c-.3-.1-.57-.2-.85-.32.02.09.02.17.02.26a2 2 0 0 1-2.74 1.86A2 2 0 0 1 16 25.8v.23a4.5 4.5 0 0 0 .58 8.97A14.04 14.04 0 0 0 25 44.08v3.06c-.25-.2-.47-.42-.65-.68-.49-.13-.96-.29-1.43-.46a3.46 3.46 0 0 1-4.54-2.3 20.9 20.9 0 0 1-.98-.7 3.46 3.46 0 0 1-3.83-3.8c-.17-.21-.34-.43-.5-.66a3.46 3.46 0 0 1-2.66-5.07l-.14-.39a3.47 3.47 0 0 1-1.08-5.96v-.01a3.47 3.47 0 0 1 .47-6.2 3.47 3.47 0 0 1 2.28-5.79 3.47 3.47 0 0 1 3.87-4.86 3.47 3.47 0 0 1 5.15-3.5 3.47 3.47 0 0 1 5.94-1.83 3.47 3.47 0 0 1 6.22 0 3.47 3.47 0 0 1 5.94 1.83 3.47 3.47 0 0 1 5.14 3.5 3.47 3.47 0 0 1 3.87 4.86 3.47 3.47 0 0 1 2.28 5.8 3.47 3.47 0 0 1 .47 6.19 3.47 3.47 0 0 1-1.08 5.97l-.14.4a3.47 3.47 0 0 1-2.66 5.06c-.16.23-.33.45-.5.66A3.46 3.46 0 0 1 42.6 43l-.98.7a3.46 3.46 0 0 1-4.54 2.3c-.47.17-.94.33-1.43.46-.18.26-.4.49-.65.68v-3.06A14.04 14.04 0 0 0 43.42 35h.08a4.5 4.5 0 0 0 .5-8.97V26Z" fill="#fff"/></mask><g mask="url(#hairCurly-a)"><path fill="#fff" d="M7 3h46v44H7z" style="mix-blend-mode:overlay" opacity=".26"/></g>`,
|
|
15
15
|
'pigtails': (components, colors) => `<path d="M39 11.84A5 5 0 0 1 44.04 7a4.99 4.99 0 0 1 5.03 5.18c.02 3.2.7 7.08 1.93 9.82a20.56 20.56 0 0 1-6.22-2.9A16.67 16.67 0 0 1 46 25.38v1.38a4.47 4.47 0 0 0-2-.73V26c-1.8-2-3.13-4.5-3.97-7.47-1.87 2.28-4.55 3.6-8.03 3.97-5.83.61-10.82-.33-14.95-2.82A13.96 13.96 0 0 0 16 25v1.03c-.73.08-1.42.34-2 .73v-1.38c0-2.22.43-4.35 1.22-6.28A20.56 20.56 0 0 1 9 22a26.57 26.57 0 0 0 1.92-10.06A4.99 4.99 0 0 1 15.96 7 5 5 0 0 1 21 11.84a15.67 15.67 0 0 1 18 0Z" fill="${escape.xml(`#${colors.hair}`)}"/><path d="M39.01 11.58c4.2 2.96 7 8.19 7 14.13v1.05a4.47 4.47 0 0 0-2-.73V26c-1.82-2-3.14-4.5-3.98-7.47-1.87 2.28-4.55 3.6-8.03 3.97-5.83.61-10.82-.33-14.95-2.82A13.96 13.96 0 0 0 16 25v1.03c-.73.08-1.42.34-2 .73V25.7c0-5.94 2.79-11.17 6.99-14.13v.26a15.67 15.67 0 0 1 18 0l.01-.26Z" fill="#fff" style="mix-blend-mode:overlay" opacity=".26"/><path fill-rule="evenodd" clip-rule="evenodd" d="M21 9a5 5 0 0 0-4.39 7.4 16.14 16.14 0 0 1 7.55-6.27A4.98 4.98 0 0 0 21 9Zm23 5a5 5 0 0 0-8.16-3.87 16.14 16.14 0 0 1 7.55 6.27c.39-.7.6-1.53.6-2.4Z" fill="#F55D81"/>`,
|
|
16
16
|
'curlyBun': (components, colors) => `<path d="M30 2.5a2 2 0 0 0-1.8 1.11 2 2 0 0 0-3.42 1.06 2 2 0 0 0-2.96 2.02 2 2 0 0 0-2.23 2.8 2 2 0 0 0-1.31 3.33A2 2 0 0 0 18 16.4a2 2 0 0 0-.55 2.38 14 14 0 0 1 25.08 0A2 2 0 0 0 42 16.4a2 2 0 0 0-.27-3.58 2 2 0 0 0-1.3-3.33 2 2 0 0 0-2.24-2.8 2 2 0 0 0-2.96-2.02 2 2 0 0 0-3.43-1.06A2 2 0 0 0 30 2.51Z" fill="${escape.xml(`#${colors.hair}`)}"/><path d="M43.93 23.63A14 14 0 0 0 31 15h-2a14 14 0 0 0-12.93 8.63 14 14 0 0 1 27.86 0Z" fill="#F55D81"/>`,
|
|
17
17
|
'buzzcut': (components, colors) => `<path d="M44 25v3c-1.33-1.67-2.67-4.67-4-9-2.66 1.33-6 2-10 2s-7.34-.67-10-2c-1.33 3.67-2.67 6.33-4 8v-2a14 14 0 1 1 28 0Z" style="mix-blend-mode:multiply" opacity=".2" fill="${escape.xml(`#${colors.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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
export { eyes } from './eyes.js';
|
|
8
8
|
export { hair } from './hair.js';
|
package/lib/components/index.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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
export { eyes } from './eyes.js';
|
|
8
8
|
export { hair } from './hair.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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
import type { ComponentGroup } from '../types.js';
|
|
8
8
|
export declare const mouth: ComponentGroup;
|
package/lib/components/mouth.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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
export const mouth = {
|
|
8
8
|
'smile': (components, colors) => `<path d="M5 5.87a1 1 0 1 1 1-1.74A6 6 0 0 0 9 5a6 6 0 0 0 3-.87 1 1 0 1 1 1 1.74A8 8 0 0 1 9 7a8 8 0 0 1-4-1.13Z" fill="#1B0640"/>`,
|
package/lib/components/nose.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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
import type { ComponentGroup } from '../types.js';
|
|
8
8
|
export declare const nose: ComponentGroup;
|
package/lib/components/nose.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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
export const nose = {
|
|
8
8
|
'mediumRound': (components, colors) => `<path d="M4.25 5a.75.75 0 0 1 1.5 0c0 .84.91 1.75 2.25 1.75 1.34 0 2.25-.91 2.25-1.75a.75.75 0 0 1 1.5 0c0 1.66-1.59 3.25-3.75 3.25S4.25 6.66 4.25 5Z" fill="#000" style="mix-blend-mode:overlay" opacity=".36"/>`,
|
|
@@ -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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
import { Prng, StyleOptions } from "@dicebear/core";
|
|
8
8
|
import { Options, ColorPickCollection, ComponentPickCollection } from "../types.js";
|
|
9
|
-
|
|
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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
import { Prng, StyleOptions } from "@dicebear/core";
|
|
8
8
|
import { Options } from "../types.js";
|
|
9
|
-
|
|
9
|
+
type Props = {
|
|
10
10
|
prng: Prng;
|
|
11
11
|
options: StyleOptions<Options>;
|
|
12
12
|
};
|
package/lib/hooks/onPreCreate.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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
/*!
|
|
8
|
+
* Personas (@dicebear/personas)
|
|
9
|
+
*
|
|
10
|
+
* Code licensed under MIT License.
|
|
11
|
+
* Copyright (c) 2023 Florian Körner
|
|
12
|
+
*
|
|
13
|
+
* Design "Personas by Draftbit" by Draftbit - draftbit.com licensed under CC BY 4.0. / Remix of the original.
|
|
14
|
+
* Source: https://personas.draftbit.com/
|
|
15
|
+
* Homepage: https://draftbit.com/
|
|
16
|
+
* License: https://creativecommons.org/licenses/by/4.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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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: 'Personas by Draftbit',
|
|
14
|
+
creator: 'Draftbit - draftbit.com',
|
|
15
|
+
source: 'https://personas.draftbit.com/',
|
|
16
|
+
homepage: 'https://draftbit.com/',
|
|
17
|
+
license: {
|
|
18
|
+
name: 'CC BY 4.0',
|
|
19
|
+
url: 'https://creativecommons.org/licenses/by/4.0/',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
export const create = ({ prng, options }) => {
|
|
23
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
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 64 64',
|
|
31
|
+
fill: 'none',
|
|
32
|
+
'shape-rendering': 'auto'
|
|
33
|
+
},
|
|
34
|
+
body: `<path d="M37 46.08V52a5 5 0 0 1-10 0v-5.92A14.04 14.04 0 0 1 18.58 37h-.08a4.5 4.5 0 0 1-.5-8.97V27a14 14 0 1 1 28 0v1.03a4.5 4.5 0 0 1-.58 8.97A14.04 14.04 0 0 1 37 46.08Z" fill="${escape.xml(`#${colors.skin}`)}"/><mask id="personas-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="14" y="13" width="36" height="44"><path d="M37 46.08V52a5 5 0 0 1-10 0v-5.92A14.04 14.04 0 0 1 18.58 37h-.08a4.5 4.5 0 0 1-.5-8.97V27a14 14 0 1 1 28 0v1.03a4.5 4.5 0 0 1-.58 8.97A14.04 14.04 0 0 1 37 46.08Z" fill="#fff"/></mask><g mask="url(#personas-a)"><path d="M32 13a14 14 0 0 1 14 14v6a14 14 0 1 1-28 0v-6a14 14 0 0 1 14-14Z" fill="#fff" style="mix-blend-mode:overlay" opacity=".36"/></g><g transform="translate(20 24)">${(_b = (_a = components.eyes) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g><g transform="translate(2 2)">${(_d = (_c = components.hair) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}</g><g transform="translate(11 44)">${(_f = (_e = components.body) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}</g><g transform="translate(23 36)">${(_h = (_g = components.mouth) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ''}</g><g transform="translate(24 28)">${(_k = (_j = components.nose) === null || _j === void 0 ? void 0 : _j.value(components, colors)) !== null && _k !== void 0 ? _k : ''}</g><g transform="translate(14 26)">${(_m = (_l = components.facialHair) === null || _l === void 0 ? void 0 : _l.value(components, colors)) !== null && _m !== void 0 ? _m : ''}</g>`,
|
|
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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
export interface Options {
|
|
8
8
|
eyes?: ('open' | 'sleep' | 'wink' | 'glasses' | 'happy' | 'sunglasses')[];
|
|
@@ -16,12 +16,12 @@ export interface Options {
|
|
|
16
16
|
clothingColor?: string[];
|
|
17
17
|
skinColor?: string[];
|
|
18
18
|
}
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
19
|
+
export type ColorPickCollection = Record<string, string>;
|
|
20
|
+
export type ComponentGroup = Record<string, ComponentGroupItem>;
|
|
21
|
+
export type ComponentGroupCollection = Record<string, ComponentGroup>;
|
|
22
|
+
export type ComponentGroupItem = (components: ComponentPickCollection, colors: ColorPickCollection) => string;
|
|
23
|
+
export type ComponentPickCollection = Record<string, ComponentPick>;
|
|
24
|
+
export type ComponentPick = {
|
|
25
25
|
name: string;
|
|
26
26
|
value: ComponentGroupItem;
|
|
27
27
|
} | 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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
export {};
|
package/lib/utils/getColors.d.ts
CHANGED
|
@@ -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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
import type { Prng } from '@dicebear/core';
|
|
8
8
|
import type { Options, ColorPickCollection } from '../types.js';
|
|
9
|
-
|
|
9
|
+
type Props = {
|
|
10
10
|
prng: Prng;
|
|
11
11
|
options: Options;
|
|
12
12
|
};
|
package/lib/utils/getColors.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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
export function getColors({ prng, options }) {
|
|
8
8
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
import type { Prng } from '@dicebear/core';
|
|
8
8
|
import type { Options, ComponentPickCollection } from '../types.js';
|
|
9
|
-
|
|
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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
6
6
|
*/
|
|
7
7
|
import type { Prng } from '@dicebear/core';
|
|
8
8
|
import type { ComponentPick } from '../types.js';
|
|
9
|
-
|
|
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/oa0iScDLrh1tVFzSud2Dwc
|
|
5
|
+
* File: https://www.figma.com/file/oa0iScDLrh1tVFzSud2Dwc
|
|
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/personas",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
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.
|
|
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": "
|
|
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/oa0iScDLrh1tVFzSud2Dwc/%40dicebear%2Fpersonas?node-id=1%3A169
|
|
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/oa0iScDLrh1tVFzSud2Dwc/%40dicebear%2Fpersonas?node-id=1%3A169
|
|
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: 'Personas by Draftbit',
|
|
16
|
-
creator: 'Draftbit - draftbit.com',
|
|
17
|
-
source: 'https://personas.draftbit.com/',
|
|
18
|
-
homepage: 'https://draftbit.com/',
|
|
19
|
-
license: {
|
|
20
|
-
name: 'CC BY 4.0',
|
|
21
|
-
url: 'https://creativecommons.org/licenses/by/4.0/',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
schema: schema,
|
|
25
|
-
create: ({ prng, options }) => {
|
|
26
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
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 64 64',
|
|
34
|
-
fill: 'none',
|
|
35
|
-
'shape-rendering': 'auto'
|
|
36
|
-
},
|
|
37
|
-
body: `<path d="M37 46.08V52a5 5 0 0 1-10 0v-5.92A14.04 14.04 0 0 1 18.58 37h-.08a4.5 4.5 0 0 1-.5-8.97V27a14 14 0 1 1 28 0v1.03a4.5 4.5 0 0 1-.58 8.97A14.04 14.04 0 0 1 37 46.08Z" fill="${escape.xml(`#${colors.skin}`)}"/><mask id="personas-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="14" y="13" width="36" height="44"><path d="M37 46.08V52a5 5 0 0 1-10 0v-5.92A14.04 14.04 0 0 1 18.58 37h-.08a4.5 4.5 0 0 1-.5-8.97V27a14 14 0 1 1 28 0v1.03a4.5 4.5 0 0 1-.58 8.97A14.04 14.04 0 0 1 37 46.08Z" fill="#fff"/></mask><g mask="url(#personas-a)"><path d="M32 13a14 14 0 0 1 14 14v6a14 14 0 1 1-28 0v-6a14 14 0 0 1 14-14Z" fill="#fff" style="mix-blend-mode:overlay" opacity=".36"/></g><g transform="translate(20 24)">${(_b = (_a = components.eyes) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g><g transform="translate(2 2)">${(_d = (_c = components.hair) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}</g><g transform="translate(11 44)">${(_f = (_e = components.body) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}</g><g transform="translate(23 36)">${(_h = (_g = components.mouth) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ''}</g><g transform="translate(24 28)">${(_k = (_j = components.nose) === null || _j === void 0 ? void 0 : _j.value(components, colors)) !== null && _k !== void 0 ? _k : ''}</g><g transform="translate(14 26)">${(_m = (_l = components.facialHair) === null || _l === void 0 ? void 0 : _l.value(components, colors)) !== null && _m !== void 0 ? _m : ''}</g>`,
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
};
|