@dicebear/avataaars-neutral 5.0.0-alpha.8 → 5.0.0-beta.0
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 +1 -1
- package/README.md +3 -3
- package/lib/components/eyebrows.d.ts +8 -0
- package/lib/components/eyebrows.js +21 -0
- package/lib/components/eyes.d.ts +8 -0
- package/lib/components/eyes.js +20 -0
- package/lib/components/index.d.ts +10 -0
- package/lib/components/index.js +10 -0
- package/lib/components/mouth.d.ts +8 -0
- package/lib/components/mouth.js +20 -0
- package/lib/components/nose.d.ts +8 -0
- package/lib/components/nose.js +9 -0
- package/lib/core.d.ts +9 -0
- package/lib/core.js +39 -0
- package/lib/hooks/onPostCreate.d.ts +16 -0
- package/lib/hooks/onPostCreate.js +9 -0
- package/lib/hooks/onPreCreate.d.ts +14 -0
- package/lib/hooks/onPreCreate.js +9 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +20 -0
- package/lib/schema.d.ts +8 -0
- package/lib/schema.js +143 -0
- package/lib/types.d.ts +22 -0
- package/lib/types.js +7 -0
- package/lib/utils/getColors.d.ts +14 -0
- package/lib/utils/getColors.js +10 -0
- package/lib/utils/getComponents.d.ts +14 -0
- package/lib/utils/getComponents.js +36 -0
- package/lib/utils/pickComponent.d.ts +15 -0
- package/lib/utils/pickComponent.js +20 -0
- package/package.json +19 -28
- package/dist/index.d.ts +0 -15
- package/dist/index.d.ts.map +0 -1
- package/dist/index.es.js +0 -319
- package/dist/index.es.js.map +0 -1
- package/dist/index.js +0 -323
- package/dist/index.js.map +0 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<h1 align="center"><img src="./tests/svg/0.svg" width="124" /> <br />Avataaars Neutral</h1>
|
|
2
2
|
<p align="center">
|
|
3
3
|
<strong>Avatar Style for <a href="https://dicebear.com/">DiceBear</a></strong><br />
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
<a href="https://avataaars.com/">Avataaars</a>
|
|
5
|
+
by <a href="https://twitter.com/pablostanley">Pablo Stanley</a>
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
9
|
While our code is MIT licensed, the design is licensed under
|
|
10
|
-
|
|
10
|
+
<a href="https://avataaars.com/">Free for personal and commercial use.</a>.
|
|
11
11
|
See <a href="https://dicebear.com/licenses">license overview</a> for more information.
|
|
12
12
|
</p>
|
|
13
13
|
|
|
@@ -0,0 +1,8 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
import type { ComponentGroup } from '../types.js';
|
|
8
|
+
export declare const eyebrows: ComponentGroup;
|
|
@@ -0,0 +1,21 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
export const eyebrows = {
|
|
8
|
+
'angryNatural': (components, colors) => `<path d="M44.1 17.12ZM19.27 5.01a7.16 7.16 0 0 0-6.42 2.43c-.6.73-1.56 2.48-1.51 3.42.02.35.22.37 1.12.59 1.65.39 4.5-1.12 6.36-.98 2.58.2 5.04 1.4 7.28 2.68 3.84 2.2 8.35 6.84 13.1 6.6.35-.02 5.41-1.74 4.4-2.72-.31-.49-3.03-1.13-3.5-1.36-2.17-1.09-4.37-2.45-6.44-3.72C29.14 9.18 24.72 5.6 19.28 5ZM68.03 17.12ZM92.91 5.01c2.36-.27 4.85.5 6.42 2.43.6.73 1.56 2.48 1.51 3.42-.02.35-.22.37-1.12.59-1.65.39-4.5-1.12-6.36-.98-2.58.2-5.04 1.4-7.28 2.68-3.84 2.2-8.35 6.84-13.1 6.6-.35-.02-5.41-1.74-4.4-2.72.31-.49 3.03-1.13 3.5-1.36 2.17-1.09 4.36-2.45 6.44-3.72C83.05 9.18 87.46 5.6 92.91 5Z" fill-rule="evenodd" clip-rule="evenodd" fill="#000" fill-opacity=".6"/>`,
|
|
9
|
+
'defaultNatural': (components, colors) => `<path d="M26.55 6.15c-5.8.27-15.2 4.49-14.96 10.34.01.18.3.27.43.12 2.76-2.96 22.32-5.95 29.2-4.36.64.14 1.12-.48.72-.93-3.43-3.85-10.2-5.43-15.4-5.18ZM86.45 6.15c5.8.27 15.2 4.49 14.96 10.34-.01.18-.3.27-.43.12-2.76-2.96-22.32-5.95-29.2-4.36-.64.14-1.12-.48-.72-.93 3.43-3.85 10.2-5.43 15.4-5.18Z" fill-rule="evenodd" clip-rule="evenodd" fill="#000" fill-opacity=".6"/>`,
|
|
10
|
+
'flatNatural': (components, colors) => `<path d="M38.66 11.1c-5 .35-9.92.08-14.92-.13-3.83-.16-7.72-.68-11.37 1.01-.7.32-4.53 2.28-4.44 3.35.07.85 3.93 2.2 4.63 2.44 3.67 1.29 7.18.9 10.95.66 4.64-.27 9.25-.07 13.87-.2 3.12-.1 7.92-.63 9.46-4.4.46-1.14.1-3.42-.36-4.66-.19-.5-.72-.69-1.13-.4a15.04 15.04 0 0 1-6.68 2.32ZM73.34 11.1c5 .35 9.92.08 14.92-.13 3.83-.16 7.72-.68 11.37 1.01.7.32 4.53 2.28 4.44 3.35-.07.85-3.93 2.2-4.63 2.44-3.67 1.29-7.18.9-10.95.66-4.63-.27-9.24-.07-13.86-.2-3.12-.1-7.92-.63-9.46-4.4-.46-1.14-.1-3.42.36-4.66.18-.5.72-.69 1.13-.4a15.04 15.04 0 0 0 6.68 2.32Z" fill-rule="evenodd" clip-rule="evenodd" fill="#000" fill-opacity=".6"/>`,
|
|
11
|
+
'frownNatural': (components, colors) => `<path d="M36.37 6.88c-1.97 2.9-5.55 4.64-8.74 5.68-3.94 1.29-18.55 3.38-15.11 11.35.05.12.22.12.27 0 1.15-2.65 17.47-5.12 18.97-5.7 4.45-1.71 8.4-5.5 9.17-10.55.35-2.31-.64-6.05-1.55-7.55-.11-.18-.37-.13-.43.07-.36 1.33-1.41 4.97-2.58 6.7ZM75.63 6.88c1.97 2.9 5.55 4.64 8.74 5.68 3.94 1.29 18.55 3.38 15.11 11.35a.15.15 0 0 1-.27 0c-1.15-2.65-17.47-5.12-18.97-5.7-4.45-1.71-8.4-5.5-9.17-10.55-.35-2.31.64-6.05 1.55-7.55.11-.18.37-.13.43.07.36 1.33 1.41 4.97 2.58 6.7Z" fill-rule="evenodd" clip-rule="evenodd" fill="#000" fill-opacity=".6"/>`,
|
|
12
|
+
'raisedExcitedNatural': (components, colors) => `<path d="m22.77 1.58.9-.4C28.93-.91 36.88-.03 41.73 2.3c.57.27.18 1.15-.4 1.1-14.92-1.14-24.96 8.15-28.37 14.45-.1.18-.41.2-.49.03-2.3-5.32 4.45-13.98 10.3-16.3ZM89.23 1.58l-.9-.4C83.07-.91 75.12-.03 70.27 2.3c-.57.27-.18 1.15.4 1.1 14.92-1.14 24.96 8.15 28.37 14.45.1.18.41.2.49.03 2.3-5.32-4.45-13.98-10.3-16.3Z" fill-rule="evenodd" clip-rule="evenodd" fill="#000" fill-opacity=".6"/>`,
|
|
13
|
+
'sadConcernedNatural': (components, colors) => `<path d="m31.23 20.42-.9.4c-5.25 2.09-13.2 1.21-18.05-1.12-.57-.27-.18-1.15.4-1.1 14.92 1.14 24.96-8.15 28.37-14.45.1-.18.41-.2.49-.03 2.3 5.32-4.45 13.98-10.3 16.3ZM80.77 20.42l.9.4c5.25 2.09 13.2 1.21 18.05-1.12.57-.27.18-1.15-.4-1.1-14.92 1.14-24.96-8.15-28.37-14.45-.1-.18-.41-.2-.49-.03-2.3 5.32 4.45 13.98 10.3 16.3Z" fill-rule="evenodd" clip-rule="evenodd" fill="#000" fill-opacity=".6"/>`,
|
|
14
|
+
'unibrowNatural': (components, colors) => `<g fill-rule="evenodd" clip-rule="evenodd" fill="#DADADA"><path d="M57 12.82ZM96.12 7.6c1.46.56 9.19 6.43 7.86 9.16a.8.8 0 0 1-1.29.22 10.63 10.63 0 0 0-1.7-1.19c-5.1-2.84-11.3-1.93-16.73-.91-6.12 1.14-12.11 3.48-18.39 2.67-2.04-.26-6.08-1.22-7.63-2.96-.47-.53-.06-1.38.64-1.43 1.44-.11 2.86-.86 4.33-1.28 3.65-1.03 7.4-1.56 11.11-2.29 6.62-1.3 15.17-4.53 21.8-2Z"/><path d="M58.76 12.76c-1.17.04-2.8 3.56-.56 3.68 2.23.11 1.73-3.72.56-3.68ZM55 12.8c0-.01 0-.01 0 0ZM15.88 7.56c-1.46.56-9.19 6.43-7.86 9.16.24.5.89.6 1.29.22.55-.52 1.58-1.11 1.71-1.18 5.1-2.84 11.3-1.93 16.73-.91 6.12 1.14 12.11 3.48 18.39 2.67 2.04-.26 6.08-1.22 7.63-2.96.47-.53.06-1.38-.64-1.43-1.44-.11-2.86-.86-4.33-1.28-3.65-1.03-7.4-1.56-11.11-2.29-6.62-1.3-15.17-4.53-21.8-2Z"/><path d="M54.97 11.79c1.17.04 2.77 4.5.53 4.67-2.24.18-1.7-4.71-.53-4.67Z"/></g>`,
|
|
15
|
+
'upDownNatural': (components, colors) => `<path d="m22.77 1.58.9-.4C28.93-.91 36.88-.03 41.73 2.3c.57.27.18 1.15-.4 1.1-14.92-1.14-24.96 8.15-28.37 14.45-.1.18-.41.2-.49.03-2.3-5.32 4.45-13.98 10.3-16.3ZM87 12.07c5.75.77 14.74 5.8 13.99 11.6-.03.2-.31.26-.44.1-2.49-3.2-21.71-7.87-28.71-6.9-.64.1-1.07-.57-.63-.98 3.75-3.54 10.62-4.52 15.78-3.82Z" fill-rule="evenodd" clip-rule="evenodd" fill="#000" fill-opacity=".6"/>`,
|
|
16
|
+
'angry': (components, colors) => `<path d="M15.61 15.18c4.24-5.76 6.88-5.48 13.31-.62l.67.5C34.41 18.73 36.7 20 40 20a2 2 0 1 0 0-4c-2.07 0-3.9-1.02-7.99-4.12l-.68-.52C27.57 8.53 25.37 7.3 22.63 7c-3.68-.4-7.05 1.48-10.24 5.83a2 2 0 1 0 3.22 2.36ZM96.39 15.18c-4.24-5.76-6.88-5.48-13.31-.62l-.67.5C77.58 18.73 75.29 20 72 20a2 2 0 1 1 0-4c2.07 0 3.9-1.02 7.99-4.12l.68-.52c3.76-2.83 5.96-4.07 8.7-4.37 3.68-.4 7.05 1.48 10.24 5.83a2 2 0 1 1-3.22 2.36Z" fill="#000" fill-opacity=".6"/>`,
|
|
17
|
+
'default': (components, colors) => `<path d="M15.63 17.16c3.92-5.51 14.65-8.6 23.9-6.33a2 2 0 1 0 .95-3.88c-10.74-2.64-23.17.94-28.11 7.9a2 2 0 0 0 3.26 2.3ZM96.37 17.16c-3.91-5.51-14.65-8.6-23.9-6.33a2 2 0 1 1-.95-3.88c10.74-2.64 23.17.94 28.11 7.9a2 2 0 0 1-3.26 2.3Z" fill="#000" fill-opacity=".6"/>`,
|
|
18
|
+
'raisedExcited': (components, colors) => `<path d="M15.98 17.13C17.48 7.6 30.06 1.1 39.16 5.3a2 2 0 1 0 1.68-3.63c-11.5-5.3-26.9 2.66-28.82 14.84a2 2 0 0 0 3.96.63ZM96.02 17.13C94.52 7.6 81.94 1.1 72.84 5.3a2 2 0 1 1-1.68-3.63c11.5-5.3 26.9 2.66 28.82 14.84a2 2 0 0 1-3.96.63Z" fill="#000" fill-opacity=".6"/>`,
|
|
19
|
+
'sadConcerned': (components, colors) => `<path d="M38.03 5.6c-1.48 8.38-14.1 14.17-23.24 10.42a2.04 2.04 0 0 0-2.64 1c-.43.97.04 2.1 1.05 2.5 11.45 4.7 26.84-2.37 28.76-13.3a1.92 1.92 0 0 0-1.64-2.2 2 2 0 0 0-2.3 1.57ZM73.97 5.6c1.48 8.38 14.1 14.17 23.24 10.42 1.02-.41 2.2.03 2.63 1 .43.97-.04 2.1-1.05 2.5-11.44 4.7-26.84-2.37-28.76-13.3a1.92 1.92 0 0 1 1.64-2.2 2 2 0 0 1 2.3 1.57Z" fill="#000" fill-opacity=".6"/>`,
|
|
20
|
+
'upDown': (components, colors) => `<path d="M15.6 14.16c4.49-6.32 14-9.5 23.75-6.36a2 2 0 1 0 1.23-3.81c-11.41-3.68-22.74.1-28.25 7.85a2 2 0 1 0 3.26 2.32ZM96.38 21.16c-3.92-5.51-14.65-8.6-23.9-6.33a2 2 0 0 1-.95-3.88c10.74-2.64 23.17.94 28.1 7.9a2 2 0 1 1-3.25 2.3Z" fill="#000" fill-opacity=".6"/>`,
|
|
21
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
import type { ComponentGroup } from '../types.js';
|
|
8
|
+
export declare const eyes: ComponentGroup;
|
|
@@ -0,0 +1,20 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
export const eyes = {
|
|
8
|
+
'closed': (components, colors) => `<path d="M16.16 27.55c1.85 3.8 6 6.45 10.84 6.45 4.81 0 8.96-2.63 10.82-6.4.55-1.13-.24-2.05-1.03-1.37a15.05 15.05 0 0 1-9.8 3.43c-3.73 0-7.12-1.24-9.55-3.23-.9-.73-1.82.01-1.28 1.12ZM74.16 27.55c1.85 3.8 6 6.45 10.84 6.45 4.81 0 8.96-2.63 10.82-6.4.55-1.13-.24-2.05-1.03-1.37a15.05 15.05 0 0 1-9.8 3.43c-3.74 0-7.13-1.24-9.56-3.23-.9-.73-1.82.01-1.28 1.12Z" fill-rule="evenodd" clip-rule="evenodd" fill="#000" fill-opacity=".6"/>`,
|
|
9
|
+
'cry': (components, colors) => `<path d="M25 27s-6 7.27-6 11.27a6 6 0 1 0 12 0c0-4-6-11.27-6-11.27Z" fill="#92D9FF"/><path d="M36 22a6 6 0 1 1-12 0 6 6 0 0 1 12 0ZM88 22a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z" fill="#000" fill-opacity=".6"/>`,
|
|
10
|
+
'default': (components, colors) => `<path d="M36 22a6 6 0 1 1-12 0 6 6 0 0 1 12 0ZM88 22a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z" fill="#000" fill-opacity=".6"/>`,
|
|
11
|
+
'eyeRoll': (components, colors) => `<path d="M44 22a14 14 0 1 1-28 0 14 14 0 0 1 28 0ZM96 22a14 14 0 1 1-28 0 14 14 0 0 1 28 0Z" fill="#fff"/><path d="M36 14a6 6 0 1 1-12 0 6 6 0 0 1 12 0ZM88 14a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z" fill="#000" fill-opacity=".7"/>`,
|
|
12
|
+
'happy': (components, colors) => `<path d="M16.16 22.45c1.85-3.8 6-6.45 10.84-6.45 4.81 0 8.96 2.63 10.82 6.4.55 1.13-.24 2.05-1.03 1.37a15.05 15.05 0 0 0-9.8-3.43c-3.73 0-7.12 1.24-9.55 3.23-.9.73-1.82-.01-1.28-1.12ZM74.16 22.45c1.85-3.8 6-6.45 10.84-6.45 4.81 0 8.96 2.63 10.82 6.4.55 1.13-.24 2.05-1.03 1.37a15.05 15.05 0 0 0-9.8-3.43c-3.74 0-7.13 1.24-9.56 3.23-.9.73-1.82-.01-1.28-1.12Z" fill-rule="evenodd" clip-rule="evenodd" fill="#000" fill-opacity=".6"/>`,
|
|
13
|
+
'hearts': (components, colors) => `<path d="M35.96 10c-2.55 0-5.08 1.98-6.46 3.82-1.39-1.84-3.9-3.82-6.46-3.82-5.49 0-9.04 3.33-9.04 7.64 0 5.73 4.41 9.13 9.04 12.74 1.66 1.23 4.78 4.4 5.17 5.1.38.68 2.1.7 2.58 0 .48-.73 3.51-3.87 5.17-5.1 4.63-3.6 9.04-7 9.04-12.74 0-4.3-3.55-7.64-9.04-7.64ZM88.96 10c-2.55 0-5.08 1.98-6.46 3.82-1.39-1.84-3.9-3.82-6.46-3.82-5.49 0-9.04 3.33-9.04 7.64 0 5.73 4.41 9.13 9.04 12.74 1.65 1.23 4.78 4.4 5.17 5.1.38.68 2.1.7 2.58 0 .48-.73 3.51-3.87 5.17-5.1 4.63-3.6 9.04-7 9.04-12.74 0-4.3-3.55-7.64-9.04-7.64Z" fill="#FF5353" fill-opacity=".8"/>`,
|
|
14
|
+
'side': (components, colors) => `<path d="M27 16c-4.84 0-9 2.65-10.84 6.45-.54 1.1.39 1.85 1.28 1.12a15.13 15.13 0 0 1 9.8-3.22 6 6 0 1 0 10.7 2.8 2 2 0 0 0-.12-.74l-.15-.38a6 6 0 0 0-1.64-2.48C33.9 17.32 30.5 16 27 16ZM85 16c-4.84 0-9 2.65-10.84 6.45-.54 1.1.39 1.85 1.28 1.12a15.13 15.13 0 0 1 9.8-3.22 6 6 0 1 0 10.7 2.8 2 2 0 0 0-.12-.74l-.15-.38a6 6 0 0 0-1.64-2.48C91.9 17.32 88.5 16 85 16Z" fill="#000" fill-opacity=".6"/>`,
|
|
15
|
+
'squint': (components, colors) => `<path d="M44 20.73c0 4.26-6.27 7.72-14 7.72S16 25 16 20.73C16 16.46 22.27 13 30 13s14 3.46 14 7.73ZM96 20.73c0 4.26-6.27 7.72-14 7.72S68 25 68 20.73C68 16.46 74.27 13 82 13s14 3.46 14 7.73Z" fill="#fff"/><path d="M32.82 28.3a25.15 25.15 0 0 1-5.64 0 6 6 0 1 1 5.64 0ZM84.82 28.3a25.15 25.15 0 0 1-5.64 0 6 6 0 1 1 5.64 0Z" fill="#000" fill-opacity=".7"/>`,
|
|
16
|
+
'surprised': (components, colors) => `<path d="M44 22a14 14 0 1 1-28 0 14 14 0 0 1 28 0ZM96 22a14 14 0 1 1-28 0 14 14 0 0 1 28 0Z" fill="#fff"/><path d="M36 22a6 6 0 1 1-12 0 6 6 0 0 1 12 0ZM88 22a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z" fill="#000" fill-opacity=".7"/>`,
|
|
17
|
+
'winkWacky': (components, colors) => `<circle cx="82" cy="22" r="12" fill="#fff"/><circle cx="82" cy="22" r="6" fill="#000" fill-opacity=".7"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16.16 25.45c1.85-3.8 6-6.45 10.84-6.45 4.81 0 8.96 2.63 10.82 6.4.55 1.13-.24 2.05-1.03 1.37a15.05 15.05 0 0 0-9.8-3.43c-3.73 0-7.12 1.24-9.55 3.23-.9.73-1.82-.01-1.28-1.12Z" fill="#000" fill-opacity=".6"/>`,
|
|
18
|
+
'wink': (components, colors) => `<g fill="#000" fill-opacity=".6"><path d="M36 22a6 6 0 1 1-12 0 6 6 0 0 1 12 0Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M70.6 24.96c1.59-3.92 5.55-6.86 10.37-7.2 4.8-.33 9.12 2 11.24 5.64.63 1.09-.1 2.06-.93 1.43-2.6-1.93-6.15-3-10-2.73A15.13 15.13 0 0 0 71.95 26c-.84.78-1.81.1-1.35-1.04Z"/></g>`,
|
|
19
|
+
'xDizzy': (components, colors) => `<path d="M34.5 30.7 29 25.2l-5.5 5.5c-.4.4-1.1.4-1.6 0l-1.6-1.6c-.4-.4-.4-1.1 0-1.6l5.5-5.5-5.5-5.5c-.4-.5-.4-1.2 0-1.6l1.6-1.6c.4-.4 1.1-.4 1.6 0l5.5 5.5 5.5-5.5c.4-.4 1.1-.4 1.6 0l1.6 1.6c.4.4.4 1.1 0 1.6L32.2 22l5.5 5.5c.4.4.4 1.1 0 1.6l-1.6 1.6c-.4.4-1.1.4-1.6 0ZM88.5 30.7 83 25.2l-5.5 5.5c-.4.4-1.1.4-1.6 0l-1.6-1.6c-.4-.4-.4-1.1 0-1.6l5.5-5.5-5.5-5.5c-.4-.5-.4-1.2 0-1.6l1.6-1.6c.4-.4 1.1-.4 1.6 0l5.5 5.5 5.5-5.5c.4-.4 1.1-.4 1.6 0l1.6 1.6c.4.4.4 1.1 0 1.6L86.2 22l5.5 5.5c.4.4.4 1.1 0 1.6l-1.6 1.6c-.4.4-1.1.4-1.6 0Z" fill="#000" fill-opacity=".6"/>`,
|
|
20
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
export { mouth } from './mouth.js';
|
|
8
|
+
export { nose } from './nose.js';
|
|
9
|
+
export { eyes } from './eyes.js';
|
|
10
|
+
export { eyebrows } from './eyebrows.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
export { mouth } from './mouth.js';
|
|
8
|
+
export { nose } from './nose.js';
|
|
9
|
+
export { eyes } from './eyes.js';
|
|
10
|
+
export { eyebrows } from './eyebrows.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
import type { ComponentGroup } from '../types.js';
|
|
8
|
+
export declare const mouth: ComponentGroup;
|
|
@@ -0,0 +1,20 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
export const mouth = {
|
|
8
|
+
'concerned': (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M35.12 29.87a19 19 0 0 1 37.77.09c.08.77-.77 2.04-1.85 2.04H37.1C36 32 35 30.82 35.12 29.87Z" fill="#000" fill-opacity=".7"/><path d="M69.59 32H38.4a11 11 0 0 1 15.6-6.8A11 11 0 0 1 69.59 32Z" fill="#FF4F6D"/><path d="M66.57 17.75A5 5 0 0 1 65 18H44c-.8 0-1.57-.2-2.24-.53A18.92 18.92 0 0 1 54 13c4.82 0 9.22 1.8 12.57 4.75Z" fill="#fff"/>`,
|
|
9
|
+
'default': (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M40 15a14 14 0 1 0 28 0" fill="#000" fill-opacity=".7"/>`,
|
|
10
|
+
'disbelief': (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M40 29a14 14 0 1 1 28 0" fill="#000" fill-opacity=".7"/>`,
|
|
11
|
+
'eating': (components, colors) => `<path d="M28 26.24c1.36.5 2.84.76 4.4.76 5.31 0 9.81-3.15 11.29-7.49 2.47 2.17 6.17 3.54 10.31 3.54 4.14 0 7.84-1.37 10.31-3.53 1.48 4.35 5.98 7.5 11.3 7.5 1.55 0 3.03-.27 4.4-.76h-.19c-6.33 0-11.8-4.9-11.8-10.56 0-4.18 2.32-7.72 5.69-9.68-5.5.8-9.73 5-9.9 10.1a17.61 17.61 0 0 1-9.8 2.8c-3.8 0-7.25-1.06-9.8-2.8-.18-5.1-4.4-9.3-9.9-10.1a11.18 11.18 0 0 1 5.68 9.68c0 5.66-5.47 10.57-11.8 10.57H28Z" fill="#000" fill-opacity=".6" opacity=".6"/><path d="M17 24a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM91 24a9 9 0 1 0 0-18 9 9 0 0 0 0 18Z" fill="#FF4646" fill-opacity=".2"/>`,
|
|
12
|
+
'grimace': (components, colors) => `<rect x="22" y="7" width="64" height="26" rx="13" fill="#000" fill-opacity=".6"/><rect x="24" y="9" width="60" height="22" rx="11" fill="#fff"/><path d="M24.18 18H32V9.41A11 11 0 0 1 35 9h1v9h9V9h4v9h9V9h4v9h9V9h2c.68 0 1.35.06 2 .18V18h8.82l.05.28v3.44l-.05.28H75v8.82c-.65.12-1.32.18-2 .18h-2v-9h-9v9h-4v-9h-9v9h-4v-9h-9v9h-1a11 11 0 0 1-3-.41V22h-7.82a11.06 11.06 0 0 1 0-4Z" fill="#E6E6E6"/>`,
|
|
13
|
+
'sad': (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M40.06 27.72C40.7 20.7 46.7 16 54 16c7.34 0 13.36 4.75 13.95 11.85.03.38-.87.67-1.32.45-5.54-2.77-9.75-4.16-12.63-4.16-2.84 0-7 1.36-12.45 4.07-.5.25-1.53-.07-1.5-.49Z" fill="#000" fill-opacity=".7"/>`,
|
|
14
|
+
'screamOpen': (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M34 38.86C35.14 24.88 38.24 13.01 54 13c15.76 0 18.92 11.94 20 26 .08 1.12-.83 2-1.96 2-6.69 0-9.37-2-18.05-2-8.7 0-13.24 2-17.9 2-1.15 0-2.2-.74-2.1-2.14Z" fill="#000" fill-opacity=".7"/><path d="M67.02 17.57c-.61.28-1.3.43-2.02.43H44c-.98 0-1.9-.28-2.67-.77C44.23 14.57 48.28 13 54 13c5.95 0 10.1 1.7 13.02 4.57Z" fill="#fff"/><path d="M69.8 40.92a44.2 44.2 0 0 1-5.54-.82c-2.73-.53-5.65-1.1-10.27-1.1-5.02 0-8.66.66-11.74 1.23-1.45.26-2.77.5-4.06.65A11 11 0 0 1 54 33.2a11 11 0 0 1 15.8 7.72Z" fill="#FF4F6D"/>`,
|
|
15
|
+
'serious': (components, colors) => `<rect x="42" y="18" width="24" height="6" rx="3" fill="#000" fill-opacity=".7"/>`,
|
|
16
|
+
'smile': (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M35.12 15.13a19 19 0 0 0 37.77-.09c.08-.77-.77-2.04-1.85-2.04H37.1C36 13 35 14.18 35.12 15.13Z" fill="#000" fill-opacity=".7"/><path d="M70 13H39a5 5 0 0 0 5 5h21a5 5 0 0 0 5-5Z" fill="#fff"/><path d="M66.7 27.14A10.96 10.96 0 0 0 54 25.2a10.95 10.95 0 0 0-12.7 1.94A18.93 18.93 0 0 0 54 32c4.88 0 9.33-1.84 12.7-4.86Z" fill="#FF4F6D"/>`,
|
|
17
|
+
'tongue': (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M29 15.6C30.41 25.24 41.06 33 54 33c12.97 0 23.65-7.82 25-18.26.1-.4-.22-1.74-2.17-1.74H31.17c-1.79 0-2.3 1.24-2.17 2.6Z" fill="#000" fill-opacity=".7"/><path d="M70 13H39a5 5 0 0 0 5 5h21a5 5 0 0 0 5-5Z" fill="#fff"/><path d="M43 23.5a1.88 1.88 0 0 0 0 .13v8.87a11.5 11.5 0 1 0 23 0v-8.87a1.62 1.62 0 0 0 0-.13c0-1.93-2.91-3.5-6.5-3.5-2.01 0-3.8.5-5 1.26a9.45 9.45 0 0 0-5-1.26c-3.59 0-6.5 1.57-6.5 3.5Z" fill="#FF4F6D"/>`,
|
|
18
|
+
'twinkle': (components, colors) => `<path d="M40 16c0 5.37 6.16 9 14 9s14-3.63 14-9c0-1.1-.95-2-2-2-1.3 0-1.87.9-2 2-1.24 2.94-4.32 4.72-10 5-5.68-.28-8.76-2.06-10-5-.13-1.1-.7-2-2-2-1.05 0-2 .9-2 2Z" fill="#000" fill-opacity=".6"/>`,
|
|
19
|
+
'vomit': (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M34 30.4C35.14 19.9 38.24 11 54 11c15.76 0 18.92 8.96 20 19.5.08.84-.83 1.5-1.96 1.5-6.69 0-9.37-1.5-18.05-1.5-8.7 0-13.24 1.5-17.9 1.5-1.15 0-2.2-.55-2.1-1.6Z" fill="#000" fill-opacity=".7"/><path d="M67.86 15.1c-.8.57-1.8.9-2.86.9H44c-1.3 0-2.49-.5-3.38-1.31C43.56 12.38 47.8 11 54 11c6.54 0 10.9 1.54 13.86 4.1Z" fill="#fff"/><path d="M42 25a6 6 0 0 0-6 6v7a6 6 0 0 0 12 0v-2h.08a6 6 0 0 1 11.84 0H60a6 6 0 0 0 12 0v-5a6 6 0 0 0-6-6H42Z" fill="#7BB24B"/><path d="M72 31a6 6 0 0 0-6-6H42a6 6 0 0 0-6 6v6a6 6 0 0 0 12 0v-2h.08a6 6 0 0 1 11.84 0H60a6 6 0 0 0 12 0v-4Z" fill="#88C553"/>`,
|
|
20
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
import type { ComponentGroup } from '../types.js';
|
|
8
|
+
export declare const nose: ComponentGroup;
|
|
@@ -0,0 +1,9 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
export const nose = {
|
|
8
|
+
'default': (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M16 8c0 4.42 5.37 8 12 8s12-3.58 12-8" fill="#000" fill-opacity=".16"/>`,
|
|
9
|
+
};
|
package/lib/core.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
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
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
import { schema } from './schema.js';
|
|
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 style = {
|
|
13
|
+
meta: {
|
|
14
|
+
title: 'Avataaars',
|
|
15
|
+
creator: 'Pablo Stanley',
|
|
16
|
+
source: 'https://avataaars.com/',
|
|
17
|
+
homepage: 'https://twitter.com/pablostanley',
|
|
18
|
+
license: {
|
|
19
|
+
name: 'Free for personal and commercial use.',
|
|
20
|
+
url: 'https://avataaars.com/',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
schema: schema,
|
|
24
|
+
create: ({ prng, options }) => {
|
|
25
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
26
|
+
onPreCreate({ prng, options });
|
|
27
|
+
const components = getComponents({ prng, options });
|
|
28
|
+
const colors = getColors({ prng, options });
|
|
29
|
+
onPostCreate({ prng, options, components, colors });
|
|
30
|
+
return {
|
|
31
|
+
attributes: {
|
|
32
|
+
viewBox: '0 0 112 112',
|
|
33
|
+
fill: 'none',
|
|
34
|
+
'shape-rendering': 'auto'
|
|
35
|
+
},
|
|
36
|
+
body: `<g transform="translate(2 63)">${(_b = (_a = components.mouth) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g><g transform="translate(28 51)">${(_d = (_c = components.nose) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}</g><g transform="translate(0 19)">${(_f = (_e = components.eyes) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}</g><g transform="translate(0 11)">${(_h = (_g = components.eyebrows) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ''}</g>`,
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
import { Prng, StyleOptions } from "@dicebear/core";
|
|
8
|
+
import { Options, ColorPickCollection, ComponentPickCollection } from "../types.js";
|
|
9
|
+
declare type Props = {
|
|
10
|
+
prng: Prng;
|
|
11
|
+
options: StyleOptions<Options>;
|
|
12
|
+
components: ComponentPickCollection;
|
|
13
|
+
colors: ColorPickCollection;
|
|
14
|
+
};
|
|
15
|
+
export declare function onPostCreate({ prng, options, components, colors }: Props): void;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
export function onPostCreate({ prng, options, components, colors }) {
|
|
8
|
+
// Write your modifications here
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
import { Prng, StyleOptions } from "@dicebear/core";
|
|
8
|
+
import { Options } from "../types.js";
|
|
9
|
+
declare type Props = {
|
|
10
|
+
prng: Prng;
|
|
11
|
+
options: StyleOptions<Options>;
|
|
12
|
+
};
|
|
13
|
+
export declare function onPreCreate({ prng, options }: Props): void;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
export function onPreCreate({ prng, options }) {
|
|
8
|
+
// Write your modifications here
|
|
9
|
+
}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
declare const create: import("@dicebear/core").StyleCreate<import("./types.js").Options>, meta: import("@dicebear/core").StyleMeta, schema: import("json-schema").JSONSchema7;
|
|
8
|
+
export { create, meta, schema };
|
|
9
|
+
export type { Options } from './types.js';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
/*!
|
|
8
|
+
* Avataaars Neutral (@dicebear/avataaars-neutral)
|
|
9
|
+
*
|
|
10
|
+
* Code licensed under MIT License.
|
|
11
|
+
* Copyright (c) 2022 Florian Körner
|
|
12
|
+
*
|
|
13
|
+
* Design "Avataaars" by Pablo Stanley licensed under Free for personal and commercial use.. / Remix of the original.
|
|
14
|
+
* Source: https://avataaars.com/
|
|
15
|
+
* Homepage: https://twitter.com/pablostanley
|
|
16
|
+
* License: https://avataaars.com/
|
|
17
|
+
*/
|
|
18
|
+
import { style } from './core.js';
|
|
19
|
+
const { create, meta, schema } = style;
|
|
20
|
+
export { create, meta, schema };
|
package/lib/schema.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
import type { StyleSchema } from '@dicebear/core';
|
|
8
|
+
export declare const schema: StyleSchema;
|
package/lib/schema.js
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
export const schema = {
|
|
8
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
9
|
+
"properties": {
|
|
10
|
+
"backgroundColor": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"pattern": "^[a-fA-F0-9]{6}$"
|
|
15
|
+
},
|
|
16
|
+
"default": [
|
|
17
|
+
"614335",
|
|
18
|
+
"d08b5b",
|
|
19
|
+
"ae5d29",
|
|
20
|
+
"edb98a",
|
|
21
|
+
"ffdbb4",
|
|
22
|
+
"fd9841",
|
|
23
|
+
"f8d25c"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"eyebrows": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"enum": [
|
|
31
|
+
"angryNatural",
|
|
32
|
+
"defaultNatural",
|
|
33
|
+
"flatNatural",
|
|
34
|
+
"frownNatural",
|
|
35
|
+
"raisedExcitedNatural",
|
|
36
|
+
"sadConcernedNatural",
|
|
37
|
+
"unibrowNatural",
|
|
38
|
+
"upDownNatural",
|
|
39
|
+
"angry",
|
|
40
|
+
"default",
|
|
41
|
+
"raisedExcited",
|
|
42
|
+
"sadConcerned",
|
|
43
|
+
"upDown"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"default": [
|
|
47
|
+
"angryNatural",
|
|
48
|
+
"defaultNatural",
|
|
49
|
+
"flatNatural",
|
|
50
|
+
"frownNatural",
|
|
51
|
+
"raisedExcitedNatural",
|
|
52
|
+
"sadConcernedNatural",
|
|
53
|
+
"unibrowNatural",
|
|
54
|
+
"upDownNatural",
|
|
55
|
+
"angry",
|
|
56
|
+
"default",
|
|
57
|
+
"raisedExcited",
|
|
58
|
+
"sadConcerned",
|
|
59
|
+
"upDown"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"eyes": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"enum": [
|
|
67
|
+
"closed",
|
|
68
|
+
"cry",
|
|
69
|
+
"default",
|
|
70
|
+
"eyeRoll",
|
|
71
|
+
"happy",
|
|
72
|
+
"hearts",
|
|
73
|
+
"side",
|
|
74
|
+
"squint",
|
|
75
|
+
"surprised",
|
|
76
|
+
"winkWacky",
|
|
77
|
+
"wink",
|
|
78
|
+
"xDizzy"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"default": [
|
|
82
|
+
"closed",
|
|
83
|
+
"cry",
|
|
84
|
+
"default",
|
|
85
|
+
"eyeRoll",
|
|
86
|
+
"happy",
|
|
87
|
+
"hearts",
|
|
88
|
+
"side",
|
|
89
|
+
"squint",
|
|
90
|
+
"surprised",
|
|
91
|
+
"winkWacky",
|
|
92
|
+
"wink",
|
|
93
|
+
"xDizzy"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"mouth": {
|
|
97
|
+
"type": "array",
|
|
98
|
+
"items": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"enum": [
|
|
101
|
+
"concerned",
|
|
102
|
+
"default",
|
|
103
|
+
"disbelief",
|
|
104
|
+
"eating",
|
|
105
|
+
"grimace",
|
|
106
|
+
"sad",
|
|
107
|
+
"screamOpen",
|
|
108
|
+
"serious",
|
|
109
|
+
"smile",
|
|
110
|
+
"tongue",
|
|
111
|
+
"twinkle",
|
|
112
|
+
"vomit"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"default": [
|
|
116
|
+
"concerned",
|
|
117
|
+
"default",
|
|
118
|
+
"disbelief",
|
|
119
|
+
"eating",
|
|
120
|
+
"grimace",
|
|
121
|
+
"sad",
|
|
122
|
+
"screamOpen",
|
|
123
|
+
"serious",
|
|
124
|
+
"smile",
|
|
125
|
+
"tongue",
|
|
126
|
+
"twinkle",
|
|
127
|
+
"vomit"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"nose": {
|
|
131
|
+
"type": "array",
|
|
132
|
+
"items": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"enum": [
|
|
135
|
+
"default"
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"default": [
|
|
139
|
+
"default"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
};
|
package/lib/types.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
export interface Options {
|
|
8
|
+
mouth?: ('concerned' | 'default' | 'disbelief' | 'eating' | 'grimace' | 'sad' | 'screamOpen' | 'serious' | 'smile' | 'tongue' | 'twinkle' | 'vomit')[];
|
|
9
|
+
nose?: ('default')[];
|
|
10
|
+
eyes?: ('closed' | 'cry' | 'default' | 'eyeRoll' | 'happy' | 'hearts' | 'side' | 'squint' | 'surprised' | 'winkWacky' | 'wink' | 'xDizzy')[];
|
|
11
|
+
eyebrows?: ('angryNatural' | 'defaultNatural' | 'flatNatural' | 'frownNatural' | 'raisedExcitedNatural' | 'sadConcernedNatural' | 'unibrowNatural' | 'upDownNatural' | 'angry' | 'default' | 'raisedExcited' | 'sadConcerned' | 'upDown')[];
|
|
12
|
+
backgroundColor?: string[];
|
|
13
|
+
}
|
|
14
|
+
export declare type ColorPickCollection = Record<string, string>;
|
|
15
|
+
export declare type ComponentGroup = Record<string, ComponentGroupItem>;
|
|
16
|
+
export declare type ComponentGroupCollection = Record<string, ComponentGroup>;
|
|
17
|
+
export declare type ComponentGroupItem = (components: ComponentPickCollection, colors: ColorPickCollection) => string;
|
|
18
|
+
export declare type ComponentPickCollection = Record<string, ComponentPick>;
|
|
19
|
+
export declare type ComponentPick = {
|
|
20
|
+
name: string;
|
|
21
|
+
value: ComponentGroupItem;
|
|
22
|
+
} | undefined;
|
package/lib/types.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
import type { Prng } from '@dicebear/core';
|
|
8
|
+
import type { Options, ColorPickCollection } from '../types.js';
|
|
9
|
+
declare type Props = {
|
|
10
|
+
prng: Prng;
|
|
11
|
+
options: Options;
|
|
12
|
+
};
|
|
13
|
+
export declare function getColors({ prng, options }: Props): ColorPickCollection;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
export function getColors({ prng, options }) {
|
|
8
|
+
return {};
|
|
9
|
+
}
|
|
10
|
+
;
|
|
@@ -0,0 +1,14 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
import type { Prng } from '@dicebear/core';
|
|
8
|
+
import type { Options, ComponentPickCollection } from '../types.js';
|
|
9
|
+
declare type Props = {
|
|
10
|
+
prng: Prng;
|
|
11
|
+
options: Options;
|
|
12
|
+
};
|
|
13
|
+
export declare function getComponents({ prng, options }: Props): ComponentPickCollection;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
import { pickComponent } from './pickComponent.js';
|
|
8
|
+
export function getComponents({ prng, options }) {
|
|
9
|
+
const mouthComponent = pickComponent({
|
|
10
|
+
prng,
|
|
11
|
+
group: 'mouth',
|
|
12
|
+
values: options.mouth
|
|
13
|
+
});
|
|
14
|
+
const noseComponent = pickComponent({
|
|
15
|
+
prng,
|
|
16
|
+
group: 'nose',
|
|
17
|
+
values: options.nose
|
|
18
|
+
});
|
|
19
|
+
const eyesComponent = pickComponent({
|
|
20
|
+
prng,
|
|
21
|
+
group: 'eyes',
|
|
22
|
+
values: options.eyes
|
|
23
|
+
});
|
|
24
|
+
const eyebrowsComponent = pickComponent({
|
|
25
|
+
prng,
|
|
26
|
+
group: 'eyebrows',
|
|
27
|
+
values: options.eyebrows
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
'mouth': mouthComponent,
|
|
31
|
+
'nose': noseComponent,
|
|
32
|
+
'eyes': eyesComponent,
|
|
33
|
+
'eyebrows': eyebrowsComponent,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
;
|
|
@@ -0,0 +1,15 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
import type { Prng } from '@dicebear/core';
|
|
8
|
+
import type { ComponentPick } from '../types.js';
|
|
9
|
+
declare type Props = {
|
|
10
|
+
prng: Prng;
|
|
11
|
+
group: string;
|
|
12
|
+
values?: string[];
|
|
13
|
+
};
|
|
14
|
+
export declare function pickComponent({ prng, group, values }: Props): ComponentPick;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
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/HBLdITkkTnLs4M09BmCe4h/%40dicebear%2Favataaars?node-id=20%3A299
|
|
6
|
+
*/
|
|
7
|
+
import * as components from '../components/index.js';
|
|
8
|
+
export function pickComponent({ prng, group, values = [] }) {
|
|
9
|
+
const componentCollection = components;
|
|
10
|
+
const key = prng.pick(values);
|
|
11
|
+
if (key && componentCollection[group][key]) {
|
|
12
|
+
return {
|
|
13
|
+
name: key,
|
|
14
|
+
value: componentCollection[group][key],
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
}
|