@dicebear/dylan 9.2.1 → 9.2.3
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/lib/components/facialHair.js +1 -1
- package/lib/components/hair.js +12 -12
- package/lib/components/mood.js +7 -7
- package/lib/index.js +1 -1
- package/lib/schema.js +87 -104
- package/lib/types.d.ts +1 -1
- package/lib/utils/getColors.js +2 -3
- package/lib/utils/getComponents.d.ts +1 -1
- package/lib/utils/getComponents.js +6 -5
- package/lib/utils/pickComponent.d.ts +1 -1
- package/lib/utils/pickComponent.js +1 -1
- package/package.json +6 -6
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* File: https://www.figma.com/design/rjF7B4FgtEB3FC8ruNuUGf/%40dicebear%2Fdylan
|
|
6
6
|
*/
|
|
7
7
|
export const facialHair = {
|
|
8
|
-
|
|
8
|
+
default: (components, colors) => `<path d="M20.7 47.13a24 24 0 0 0-4.7 3c-.41.33-.37 1.07 0 1.41.43.4.98.35 1.41 0l.25-.2.13-.1q-.12.1 0 0a17 17 0 0 1 1.62-1.12q1.11-.7 2.3-1.27c.47-.23.64-.94.36-1.37-.3-.49-.86-.6-1.37-.36zm1.48 6.02-2.54 3.81c-.29.44-.1 1.13.36 1.37.5.27 1.06.11 1.37-.36l2.54-3.8c.3-.45.1-1.14-.36-1.38-.5-.27-1.06-.1-1.37.36m5.8 6.21-1.7 3.95c-.1.26-.17.5-.09.77.06.23.24.48.46.6.43.23 1.15.15 1.37-.36l1.7-3.95c.1-.26.17-.5.1-.77a1 1 0 0 0-.47-.6c-.43-.23-1.15-.15-1.37.36m6.22 3.19a63 63 0 0 1-.45 5.5c-.07.52.5 1.02 1 1 .6-.03.93-.44 1-1q.34-2.74.45-5.5a1 1 0 0 0-1-1c-.56.03-.98.44-1 1m7.19.98.54 5.93c.05.52.43 1.03 1 1 .5-.02 1.05-.44 1-1l-.54-5.93c-.05-.52-.43-1.03-1-1-.5.02-1.05.44-1 1m7.36-1.7a12 12 0 0 0 2.5 5.26c.34.4 1.1.37 1.42 0 .4-.43.35-.98 0-1.4l-.1-.14q.11.15 0 0l-.19-.26-.36-.54a11 11 0 0 1-.62-1.14q-.08-.15-.13-.3l-.05-.14-.22-.6q-.2-.63-.32-1.27c-.1-.5-.74-.86-1.23-.7-.55.18-.8.68-.7 1.23m5.9-3.58 2.54 4.52c.26.46.92.65 1.37.36s.63-.88.36-1.37l-2.54-4.52c-.26-.46-.92-.65-1.37-.36s-.63.88-.36 1.37m3.1-6.35a9 9 0 0 0 3.74 3.62c.47.24 1.1.14 1.37-.36.24-.46.14-1.1-.36-1.37a8 8 0 0 1-1-.6l-.23-.17c.27.2 0 0-.07-.06l-.44-.4-.4-.4-.18-.22c-.05-.07-.24-.34-.06-.07q-.34-.48-.64-1c-.25-.45-.92-.64-1.37-.35s-.63.88-.36 1.37" fill="black"/>`,
|
|
9
9
|
};
|
package/lib/components/hair.js
CHANGED
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { escape } from '@dicebear/core';
|
|
8
8
|
export const hair = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
plain: (components, colors) => `<path d="M17.34 30.1s.5 6.2 1.86 5.62 2.73-11.1 2.73-11.1 15.58-7.21 37.2 0c0 0 .19 9.54 1.56 9.93 1.34.4 2.64-4.37 2.64-4.37S63.6 8.45 40.32 8.56c-22.1.1-22.98 21.54-22.98 21.54" fill="${escape.xml(`${colors.hair}`)}"/>`,
|
|
10
|
+
wavy: (components, colors) => `<path d="M18.49 30.45s.13 3.91 1.44 3.8c1.3-.1 3.05-12.59 3.05-12.59s18.07 4.66 33.19-.65c0 0 1.72 13.2 3.34 13.07 1.38-.12 2.4-3.57 2.4-3.57 0 .02 4.47-8.58-.62-17.85-7.93-14.45-29.74-11.22-35.44-.21 0 0-5.9-.94-8.3 6.35-2.38 7.29.94 11.67.94 11.67" fill="${escape.xml(`${colors.hair}`)}"/>`,
|
|
11
|
+
shortCurls: (components, colors) => `<path d="m19.08 30.44 1.58 4.38 1.06-9.52s2.27 1.27 3.44-.26.16-3.47.16-3.47 1.8.55 3.3-.79c1.88-1.68 1.27-3.47 1.27-3.47s1.7 1.9 4.5 1.1c2.77-.8 3.14-2.76 3.14-2.76s.56 2.18 3.4 2.12 3.2-2 3.2-2 0 2.42 2.43 3.13 3.43-1.24 3.43-1.24-.9 2.37.66 3.74c1.44 1.26 3.5.35 3.5.35s-.73 2.3.77 3.62c1.6 1.41 3.48.6 3.48.6l.77 8.34 1.8-3.8s1.4-.13 2.72.15c0 0 2.58-2.79 1.15-5.9S61.2 21.9 61.2 21.9s1.95-3.05.13-5.65-4.94-1.95-4.94-1.95 1.18-3.52-1.68-5.27-5.92.46-5.92.46-.1-3.7-3.2-4.16C42.31 4.85 40.99 8 40.99 8s-1.36-2.9-4.15-2.44-3.32 3.54-3.32 3.54-2.42-2.56-4.82-1.13-1.8 4.51-1.8 4.51-2.98-2.24-5.32-.23-.14 5.1-.14 5.1-3.87-1.12-5.04 1.8 1.66 4.95 1.66 4.95-5.35 1.16-2.82 7.33c0 .03.6-.24 2.02-.58 1.42-.36 1.8-.4 1.8-.4z" fill="${escape.xml(`${colors.hair}`)}"/>`,
|
|
12
|
+
parting: (components, colors) => `<path d="M19.51 30.42c16.36-4.9 20.13-15.57 20.13-15.57S51.18 29.46 60.6 30.5c0-.01.85-.03 2.57.15 0 0-3.22-21.28-23.36-20.56S18.19 30.61 18.19 30.61l1.32-.2z" fill="${escape.xml(`${colors.hair}`)}"/>`,
|
|
13
|
+
spiky: (components, colors) => `<path d="m21.33 33.18 2.52-10.73 8.65 2.8 1.5-4.54 9.34 4.35 2.12-4.6 6.96 5.07 5.55-2.34 1.22 10.75 7.74-8.28-3.9-2.32.83-7.38-3.27.2-1.02-6.95-4.1 2.53-3.86-5.2-3.63 2.12-9.1-4.3-1.01 3.59-7.17-1.48v3.8h-9.21l1.64 4.22-8.4 3.16 4.5 2.95-4.5 4.22z" fill="${escape.xml(`${colors.hair}`)}"/>`,
|
|
14
|
+
roundBob: (components, colors) => `<path d="M26.74 18.86s9.68 6.45 29.03 4.64c0 0-3.58 42.43 6.9 42.63s13.77-27.55 5.19-45.05C57.99.92 21.5-1.3 12.03 22.29c-9.47 23.6-.7 44.46 5.93 44.9 12.3.8 8.78-48.33 8.78-48.33" fill="${escape.xml(`${colors.hair}`)}"/>`,
|
|
15
|
+
longCurls: (components, colors) => `<path d="M25.51 20.1c-.23.95-.21 2.72 0 3.67s1.46 1.17 2.44 1.15c1.01-.01 1.75-.93 2.22-1.83q.87-1.7 1.16-3.59c-.09 1.82.42 4.03 2.15 4.6 1.2.37 2.53-.25 3.34-1.2a10 10 0 0 0 1.6-3.39c-.1 1.13-.2 2.3.16 3.36.35 1.07 1.27 2.05 2.4 2.1.92.03 1.76-.53 2.4-1.2a7 7 0 0 0 1.8-3.93c-.54 2 1.15 4.27 3.21 4.34s3.9-2.1 3.48-4.13c.31 1.57 1.44 3.04 3 3.43 1.54.41 3.41-.58 3.68-2.16a16 16 0 0 0-.79 8.68c.17.92.5 1.91 1.32 2.33s2.1-.36 1.76-1.2a16.8 16.8 0 0 0-3.86 10.6c0 1.3.2 2.7 1.12 3.6.92.91 2.78.9 3.29-.3-1.68 1.32-2.76 6.96-2.81 9.1-.04 1.95 0 4 .94 5.7s2.98 2.98 4.83 2.37c2.1-.7 3.73-6.6 3.35-8.79-.32.2-.21.75.1.95.33.2.75.14 1.12.03a5.1 5.1 0 0 0 3.5-3.88 5.1 5.1 0 0 0-1.87-4.88c.06.62 1.02.5 1.5.1A7.2 7.2 0 0 0 74.39 38c-.33-.95-1.13-1.97-2.12-1.79 1.32-.17 1.98-1.72 2-3.05.06-3.83-2.17-8.5-6-8.3.96-2.2.86-5.1-.71-6.93-2.54-2.96-4.1-2.55-6.48-2.19A6.5 6.5 0 0 0 59.1 9.2a6.5 6.5 0 0 0-6.74-1C51.3 6 48.84 4.77 46.42 4.4a6 6 0 0 0-3.17.2c-1 .41-1.83 1.33-1.88 2.4a8.56 8.56 0 0 0-11.19-.16c-.55.5-.97 1.5-.3 1.84 0 0-6.66-1.62-9.49 2.62s-1.13 5.79-1.13 5.79-6.92.28-6.78 3.95 1.27 4.24 1.27 4.24-6.01-1.72-7.29 1.79c-1.04 2.82 1.79 4.42 1.79 4.42 0-.05-5.4 2.22-4.24 7.6.75 3.5 3.4 4.1 3.4 4.1s-2.41 6.6-.15 9 5.22.42 5.22.42-1.41 7.2 1.84 8.33 5.36-2.12 5.36-2.12-2.12 6.07 2.54 5.5c4.66-.55 7.46-9.6 3.4-13.68-.01 0 2.1-3.96 1.4-7.35s-3.25-5.79-3.25-5.79 1.98-1.12 1.7-3.94c-.3-2.82-3.26-4.38-3.26-4.38s3.4-3.1 3.53-9.18" fill="${escape.xml(`${colors.hair}`)}"/>`,
|
|
16
|
+
buns: (components, colors) => `<path d="M59.48 13.61s4.16-4.36 7.25-.75c3.29 3.86-2.45 7.15-2.45 7.15 0 .05 6.05 12.66 3.62 11.58-2.12-.94-7.86 3.25-7.86 3.25l-3.2-17.41-30.5.75-5.83 16.38c.05 0-3.5-3.86-6.1-2.73s-.63-5.66 3.5-12.62c0 0-5-3.01-2.53-6.21 3-3.92 7.06-.47 7.06-.47s7.53-5.27 19.39-5.27 17.69 6.4 17.69 6.4" fill="${escape.xml(`${colors.hair}`)}"/><path d="m20.38 9.89-8.61 10.98c-.33.42-.41 1 0 1.41.35.35 1.08.43 1.41 0l8.61-10.98c.33-.42.41-1 0-1.41-.35-.35-1.08-.43-1.41 0m39.04.58q4.98 7.08 10.28 13.9c.33.43 1.06.34 1.4 0 .44-.42.34-1 .01-1.41a356 356 0 0 1-9.97-13.5c-.73-1.04-2.47-.05-1.73 1z" fill="${escape.xml(`${colors.hair}`)}"/>`,
|
|
17
|
+
bangs: (components, colors) => `<path d="m23.63 27.26 32.94-.95 1.16 32.12 13.57-.19s10.17-16.35-3.2-37.07C53.77-1.04 16.07 7.11 9.3 28.77c-6.11 19.5 1.92 30.04 1.92 30.04l13.76.19-1.36-31.75z" fill="${escape.xml(`${colors.hair}`)}"/>`,
|
|
18
|
+
fluffy: (components, colors) => `<path d="M20.23 32.43s13.74 23.53 3.86 28.24C12.83 66.03 2.59 50.96 3.9 39.72s10.94-16.35 10.94-16.35-.58-9.5 9.2-15.04 16.64.44 16.64.44 8.06-5.9 15.5-1.37c7.46 4.53 7.26 14.68 7.26 14.68s13.74-.56 13.65 16.47c-.08 15.17-10.03 22.94-16.8 21.6-10.48-2.07 1.24-29.22 1.24-29.22s-14.4 1.04-20.14-9.75c0 0-4 5.95-9.7 8.62a32 32 0 0 1-11.46 2.64z" fill="${escape.xml(`${colors.hair}`)}"/>`,
|
|
19
|
+
flatTop: (components, colors) => `<path d="M19.07 30.47s1.63 6 2.49 5.81c2.1-.36 4.15-17.25 4.15-17.25l30.03-.32s1.64 17.06 3.18 17.06 3.37-5.22 3.37-5.22 1.22-19.9-.27-21.9C59.7 5.58 20.28 5.12 19 9.9s.06 20.58.06 20.58z" fill="${escape.xml(`${colors.hair}`)}"/>`,
|
|
20
|
+
shaggy: (components, colors) => `<path d="m64.3 39.49.46-.41.1-.09c.12-.1-.13.1-.02.02l.24-.17q.5-.35 1.06-.62l.26-.12.05-.02.05-.02.58-.21q.6-.18 1.2-.28c.52-.08.85-.76.7-1.23-.18-.56-.67-.8-1.23-.7a9.3 9.3 0 0 0-4.87 2.43c-.38.36-.4 1.06 0 1.4.4.36 1 .4 1.4 0zm-51.8-1.16.14.01c-.27-.02-.11-.01-.04 0l.3.05.52.14.28.09.12.05c.02 0 .22.09.06.02-.14-.1 0-.04.03-.03l.15.06.26.13.47.3.27.22q.47.38.83.83c.33.4 1.07.37 1.41 0 .4-.43.36-.98 0-1.4a7.3 7.3 0 0 0-4.84-2.53c-.52-.06-1.02.5-1 1 .03.59.44.94 1 1" fill="${escape.xml(`${colors.hair}`)}"/><path d="M75.32 50.46c-.64-2.77-3.29-4.28-3.29-4.28a13.2 13.2 0 0 1-.21 10.87c.21-3.4-2.98-4.69-2.98-4.69 0 11.29-10.44 13.85-10.44 13.85 4.05-5.97 2.13-11.08 2.13-11.08-2.13 2.77-5.54 2.34-5.54 2.34 4.9-3.84 4.69-11.08 4.69-11.08l-3.62 2.34c4.05-7.46.43-19.39.43-19.39l-1.5 4.7-7.45-6.83-.43 4.05-9.6-6.18 2.14 6.82L26 21.67c.01 0-5.32 11.29.86 23.65 0 0-4.05-.64-5.97-4.69 0 0 .85 11.29 8.1 15.98-.04 0-1.96 2.34-6.65-2.13 0 0-.43 8.95 7.88 14.06 0 0-10 .64-14.06-13.21 0 0-3.84.64-2.34 7.03 0 0-5.97-2.13-4.26-10.44 0 0-1.57-.81-3.64 4.93 0 0-3.76-28.24 10.67-42.64C30.29.58 57.75 4.05 67.55 16.34c12.19 15.29 7.77 34.11 7.77 34.11" fill="${escape.xml(`${colors.hair}`)}"/>`,
|
|
21
21
|
};
|
package/lib/components/mood.js
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
* File: https://www.figma.com/design/rjF7B4FgtEB3FC8ruNuUGf/%40dicebear%2Fdylan
|
|
6
6
|
*/
|
|
7
7
|
export const mood = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
happy: (components, colors) => `<path d="M27.86 43.79c2.41 9.29 15.16 12.28 22.34 6.67a14 14 0 0 0 4.7-7.22c.36-1.24-1.57-1.77-1.93-.53-1.24 4.23-4.33 7.39-8.68 8.33-3.77.8-8.03-.1-11.05-2.52a10 10 0 0 1-3.45-5.26c-.34-1.25-2.27-.72-1.95.53" fill="black"/>`,
|
|
9
|
+
angry: (components, colors) => `<path d="M32.92 49.45c1.24-2.82 4.75-4.07 7.63-4.27 3.08-.2 6.1.67 8.56 2.52 1.03.77 2.03-.96 1-1.73a14.5 14.5 0 0 0-10.1-2.75c-3.36.36-7.37 1.9-8.82 5.21-.5 1.17 1.2 2.2 1.73 1zm15.8-19.37q.15-.33.36-.6l-.16.2q.25-.34.58-.6l-.2.17q.33-.25.71-.41l-.24.1q.37-.15.75-.21l-.27.04s.1 0 .15-.02q.4-.02.7-.3a1 1 0 0 0 .3-.7c-.01-.25-.1-.53-.3-.71s-.44-.32-.7-.3a4.1 4.1 0 0 0-3.42 2.3c-.1.27-.18.5-.1.79.06.23.24.48.46.6q.36.2.77.1c.23-.08.5-.23.6-.46zM31.65 28.9l.18.03-.27-.04q.57.08 1.09.3l-.24-.1q.53.22.98.57l-.2-.16q.34.27.63.59c.16.2.47.29.7.29s.55-.1.72-.29c.4-.42.37-.99 0-1.41q-.65-.73-1.52-1.2a6 6 0 0 0-2.07-.59 1 1 0 0 0-1 1c0 .25.1.53.3.71q.3.27.7.29z" fill="black"/>`,
|
|
10
|
+
neutral: (components, colors) => `<path d="m35.05 46.19-.5.03c-1.29.07-1.3 2.04 0 2l13.82-.4c1.28-.03 1.29-2.03 0-2l-13.83.4v2l.5-.03c1.29-.07 1.3-2.07 0-2" fill="black"/>`,
|
|
11
|
+
superHappy: (components, colors) => `<path d="M50.27 44.1a244 244 0 0 0-18.92.2s-.85 12.28 9.88 12.75c9.6.42 9.03-12.96 9.03-12.96z" fill="white"/><path d="M50.27 43.1q-9.47-.26-18.92.2c-.57.03-.96.44-1 1-.3 4.37 1.29 9.41 5 11.96 2.88 1.97 7.21 2.5 10.35.87 2.69-1.39 4.18-4.28 4.9-7.1.5-1.9.76-3.97.68-5.93-.05-1.28-2.05-1.29-2 0 .14 3.56-.62 8.2-3.5 10.6-2.35 1.95-6.15 1.7-8.71.27-2.27-1.26-3.6-3.56-4.23-6.02-.4-1.5-.6-3.06-.5-4.64l-1 1q9.46-.45 18.93-.2c1.29.02 1.29-1.98 0-2z" fill="black"/>`,
|
|
12
|
+
sad: (components, colors) => `<path d="M30.5 32.66q.36-.4.77-.76l.09-.08.04-.03c-.12.09 0 0 .02 0l.12-.1.45-.3.44-.25.24-.12.14-.06c.03-.01.16-.07.02 0l.05-.02.1-.04.26-.1.55-.15c.5-.12.86-.73.7-1.23s-.7-.83-1.23-.7a8 8 0 0 0-4.17 2.52c-.34.4-.42 1.03 0 1.4.38.36 1.05.43 1.41 0m18.4-1.87q.9.15 1.8.43l.4.15.25.09.06.02-.06-.03c.02.04.19.08.23.1l.17.08.46.23c.46.25 1.1.13 1.37-.36.26-.5.13-1.1-.36-1.37a12 12 0 0 0-3.8-1.3c-.28-.03-.52-.04-.77.1a1 1 0 0 0-.46.6c-.1.49.15 1.15.7 1.24zM36.4 47.12a17 17 0 0 1 11.35-.1c1.22.4 1.74-1.52.53-1.94a18.8 18.8 0 0 0-12.4.1c-.5.19-.86.69-.7 1.24.12.49.71.88 1.22.7" fill="black"/>`,
|
|
13
|
+
hopeful: (components, colors) => `<path d="M35.7 42.4c-1.18 1.26-2.17 2.74-2.36 4.5a4.4 4.4 0 0 0 1.78 4.02c1.26.9 2.88.8 4.07-.13a5.5 5.5 0 0 0 1.87-3.88c.1-.97-1.46-1.38-1.86-.5-.75 1.63.16 3.26 1.34 4.42a3.9 3.9 0 0 0 4.13.98 4.6 4.6 0 0 0 2.93-3.14 6.6 6.6 0 0 0-.82-4.87c-.64-1.11-2.37-.11-1.73 1 .92 1.6 1.18 4-.7 5.02-.7.35-1.5.36-2.12-.12-.49-.39-1.63-1.55-1.3-2.26l-1.86-.5c-.14 1.34-1.44 3.63-2.97 2.23-1.74-1.59-.22-4 1.03-5.33.88-.94-.53-2.36-1.4-1.4z" fill="black"/>`,
|
|
14
|
+
confused: (components, colors) => `<path d="M30.36 48.8c.6-.5 2.22-2.29 2.9-2.12.41.1 1.03 1.1 1.3 1.41l1.57 1.74c.48.53 1.2.28 1.57-.2.88-1.15 2.48-2 3.68-2.78l-1.21-.16c1.02 1.08 2.36 2.66 3.9 3.06 1.34.34 2.28-.9 3.12-1.7q.44-.47.87-.88.3-.28.58-.58.1-.2.28.28c.72.5 1.33 1.4 1.92 2.04.89.94 2.3-.48 1.4-1.4l-1.91-2.05c-.45-.47-.9-.97-1.62-1-.6 0-1.08.35-1.5.73-.7.65-1.35 1.36-2.02 2-.05.07-.52.63-.66.64-.08 0-.24-.16-.33-.2-.42-.17-.8-.58-1.13-.88q-.78-.72-1.5-1.5a1 1 0 0 0-1.2-.17c-1.52 1-3.28 2.04-4.4 3.5l1.57-.2-2.3-2.53c-.51-.57-1.04-1.17-1.84-1.3s-1.45.3-2.06.8l-2.41 2c-1 .82.43 2.23 1.4 1.4z" fill="black"/>`,
|
|
15
15
|
};
|
package/lib/index.js
CHANGED
|
@@ -25,7 +25,7 @@ export const create = ({ prng, options }) => {
|
|
|
25
25
|
attributes: {
|
|
26
26
|
viewBox: '0 0 80 80',
|
|
27
27
|
fill: 'none',
|
|
28
|
-
'shape-rendering': 'auto'
|
|
28
|
+
'shape-rendering': 'auto',
|
|
29
29
|
},
|
|
30
30
|
body: `<path d="M19.07 30.47s1.57-20.23 21.59-20.23S62.3 30.55 62.3 30.55s9.43-.8 9.43 7.6c0 8.42-9.28 7.13-9.28 7.13S60.9 67.15 42.03 67.15c-21.11 0-23.4-20.8-23.4-20.8s-9 .72-9.93-6.25c-1.08-8.2 10.37-9.64 10.37-9.64" fill="${escape.xml(`${colors.skin}`)}"/><path d="m64.3 39.49.46-.41.1-.09c.12-.1-.13.1-.02.02l.24-.17q.5-.35 1.06-.62l.26-.12.05-.02.05-.02.58-.21q.6-.18 1.2-.28c.52-.08.85-.76.7-1.23-.18-.56-.67-.8-1.23-.7a9.3 9.3 0 0 0-4.87 2.43c-.38.36-.4 1.06 0 1.4.4.36 1 .4 1.4 0zm-51.8-1.16.14.01c-.27-.02-.11-.01-.04 0l.3.05.52.14.28.09.12.05c.02 0 .22.09.06.02-.14-.1 0-.04.03-.03l.15.06.26.13.47.3.27.22q.47.38.83.83c.33.4 1.07.37 1.41 0 .4-.43.36-.98 0-1.4a7.3 7.3 0 0 0-4.84-2.53c-.52-.06-1.02.5-1 1 .03.59.44.94 1 1m18.3-1.9v4.54c0 .52.46 1.02 1 1s1-.44 1-1V36.4c0-.52-.46-1.02-1-1s-1 .44-1 1M49.2 36l-.15 4.81a1 1 0 0 0 1 1c.56-.02.98-.44 1-1l.15-4.8a1 1 0 0 0-1-1 1 1 0 0 0-1 1" fill="black"/>${(_b = (_a = components.facialHair) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}${(_d = (_c = components.mood) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}${(_f = (_e = components.hair) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}`,
|
|
31
31
|
extra: () => ({
|
package/lib/schema.js
CHANGED
|
@@ -5,120 +5,103 @@
|
|
|
5
5
|
* File: https://www.figma.com/design/rjF7B4FgtEB3FC8ruNuUGf/%40dicebear%2Fdylan
|
|
6
6
|
*/
|
|
7
7
|
export const schema = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
9
|
+
properties: {
|
|
10
|
+
backgroundColor: {
|
|
11
|
+
type: 'array',
|
|
12
|
+
items: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
pattern: '^(transparent|[a-fA-F0-9]{6})$',
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
"ffa6e6",
|
|
18
|
-
"619eff",
|
|
19
|
-
"29e051"
|
|
20
|
-
]
|
|
16
|
+
default: ['ffa6e6', '619eff', '29e051'],
|
|
21
17
|
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"default"
|
|
28
|
-
]
|
|
18
|
+
facialHair: {
|
|
19
|
+
type: 'array',
|
|
20
|
+
items: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
enum: ['default'],
|
|
29
23
|
},
|
|
30
|
-
|
|
31
|
-
"default"
|
|
32
|
-
]
|
|
24
|
+
default: ['default'],
|
|
33
25
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
facialHairProbability: {
|
|
27
|
+
type: 'integer',
|
|
28
|
+
minimum: 0,
|
|
29
|
+
maximum: 100,
|
|
30
|
+
default: 20,
|
|
39
31
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
]
|
|
32
|
+
hair: {
|
|
33
|
+
type: 'array',
|
|
34
|
+
items: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
enum: [
|
|
37
|
+
'plain',
|
|
38
|
+
'wavy',
|
|
39
|
+
'shortCurls',
|
|
40
|
+
'parting',
|
|
41
|
+
'spiky',
|
|
42
|
+
'roundBob',
|
|
43
|
+
'longCurls',
|
|
44
|
+
'buns',
|
|
45
|
+
'bangs',
|
|
46
|
+
'fluffy',
|
|
47
|
+
'flatTop',
|
|
48
|
+
'shaggy',
|
|
49
|
+
],
|
|
58
50
|
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
]
|
|
51
|
+
default: [
|
|
52
|
+
'plain',
|
|
53
|
+
'wavy',
|
|
54
|
+
'shortCurls',
|
|
55
|
+
'parting',
|
|
56
|
+
'spiky',
|
|
57
|
+
'roundBob',
|
|
58
|
+
'longCurls',
|
|
59
|
+
'buns',
|
|
60
|
+
'bangs',
|
|
61
|
+
'fluffy',
|
|
62
|
+
'flatTop',
|
|
63
|
+
'shaggy',
|
|
64
|
+
],
|
|
73
65
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
hairColor: {
|
|
67
|
+
type: 'array',
|
|
68
|
+
items: {
|
|
69
|
+
type: 'string',
|
|
70
|
+
pattern: '^(transparent|[a-fA-F0-9]{6})$',
|
|
79
71
|
},
|
|
80
|
-
|
|
81
|
-
"000000",
|
|
82
|
-
"ff543d",
|
|
83
|
-
"fff500",
|
|
84
|
-
"1d5dff",
|
|
85
|
-
"ffffff"
|
|
86
|
-
]
|
|
72
|
+
default: ['000000', 'ff543d', 'fff500', '1d5dff', 'ffffff'],
|
|
87
73
|
},
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
]
|
|
74
|
+
mood: {
|
|
75
|
+
type: 'array',
|
|
76
|
+
items: {
|
|
77
|
+
type: 'string',
|
|
78
|
+
enum: [
|
|
79
|
+
'happy',
|
|
80
|
+
'angry',
|
|
81
|
+
'neutral',
|
|
82
|
+
'superHappy',
|
|
83
|
+
'sad',
|
|
84
|
+
'hopeful',
|
|
85
|
+
'confused',
|
|
86
|
+
],
|
|
101
87
|
},
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
]
|
|
88
|
+
default: [
|
|
89
|
+
'happy',
|
|
90
|
+
'angry',
|
|
91
|
+
'neutral',
|
|
92
|
+
'superHappy',
|
|
93
|
+
'sad',
|
|
94
|
+
'hopeful',
|
|
95
|
+
'confused',
|
|
96
|
+
],
|
|
111
97
|
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
98
|
+
skinColor: {
|
|
99
|
+
type: 'array',
|
|
100
|
+
items: {
|
|
101
|
+
type: 'string',
|
|
102
|
+
pattern: '^(transparent|[a-fA-F0-9]{6})$',
|
|
117
103
|
},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
]
|
|
122
|
-
}
|
|
123
|
-
}
|
|
104
|
+
default: ['ffd6c0', 'c26450'],
|
|
105
|
+
},
|
|
106
|
+
},
|
|
124
107
|
};
|
package/lib/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* File: https://www.figma.com/design/rjF7B4FgtEB3FC8ruNuUGf/%40dicebear%2Fdylan
|
|
6
6
|
*/
|
|
7
7
|
export interface Options {
|
|
8
|
-
facialHair?:
|
|
8
|
+
facialHair?: 'default'[];
|
|
9
9
|
facialHairProbability?: number;
|
|
10
10
|
mood?: ('happy' | 'angry' | 'neutral' | 'superHappy' | 'sad' | 'hopeful' | 'confused')[];
|
|
11
11
|
hair?: ('plain' | 'wavy' | 'shortCurls' | 'parting' | 'spiky' | 'roundBob' | 'longCurls' | 'buns' | 'bangs' | 'fluffy' | 'flatTop' | 'shaggy')[];
|
package/lib/utils/getColors.js
CHANGED
|
@@ -8,8 +8,7 @@ import { convertColor } from './convertColor.js';
|
|
|
8
8
|
export function getColors({ prng, options }) {
|
|
9
9
|
var _a, _b;
|
|
10
10
|
return {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
hair: convertColor(prng.pick((_a = options.hairColor) !== null && _a !== void 0 ? _a : [], 'transparent')),
|
|
12
|
+
skin: convertColor(prng.pick((_b = options.skinColor) !== null && _b !== void 0 ? _b : [], 'transparent')),
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* File: https://www.figma.com/design/rjF7B4FgtEB3FC8ruNuUGf/%40dicebear%2Fdylan
|
|
6
6
|
*/
|
|
7
7
|
import { pickComponent } from './pickComponent.js';
|
|
8
|
-
export function getComponents({ prng, options }) {
|
|
8
|
+
export function getComponents({ prng, options, }) {
|
|
9
9
|
const facialHairComponent = pickComponent({
|
|
10
10
|
prng,
|
|
11
11
|
group: 'facialHair',
|
|
@@ -22,9 +22,10 @@ export function getComponents({ prng, options }) {
|
|
|
22
22
|
values: options.hair,
|
|
23
23
|
});
|
|
24
24
|
return {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
facialHair: prng.bool(options.facialHairProbability)
|
|
26
|
+
? facialHairComponent
|
|
27
|
+
: undefined,
|
|
28
|
+
mood: moodComponent,
|
|
29
|
+
hair: hairComponent,
|
|
28
30
|
};
|
|
29
31
|
}
|
|
30
|
-
;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* File: https://www.figma.com/design/rjF7B4FgtEB3FC8ruNuUGf/%40dicebear%2Fdylan
|
|
6
6
|
*/
|
|
7
7
|
import * as components from '../components/index.js';
|
|
8
|
-
export function pickComponent({ prng, group, values = [] }) {
|
|
8
|
+
export function pickComponent({ prng, group, values = [], }) {
|
|
9
9
|
const componentCollection = components;
|
|
10
10
|
const key = prng.pick(values);
|
|
11
11
|
if (key && componentCollection[group][key]) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dicebear/dylan",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.3",
|
|
4
4
|
"description": "Avatar style for DiceBear",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dicebear"
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"test": "uvu tests"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@dicebear/core": "9.2.
|
|
33
|
-
"@tsconfig/recommended": "^1.0.
|
|
34
|
-
"del-cli": "^
|
|
35
|
-
"typescript": "^5.
|
|
32
|
+
"@dicebear/core": "9.2.3",
|
|
33
|
+
"@tsconfig/recommended": "^1.0.10",
|
|
34
|
+
"del-cli": "^6.0.0",
|
|
35
|
+
"typescript": "^5.8.3",
|
|
36
36
|
"uvu": "^0.5.6"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "8cfdc4d029c9de6a82fef4e27ed67b5e2cd14a30"
|
|
48
48
|
}
|