@dicebear/big-smile 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/accessories.d.ts +1 -1
- package/lib/components/accessories.js +1 -1
- package/lib/components/eyes.d.ts +1 -1
- package/lib/components/eyes.js +1 -1
- package/lib/components/face.d.ts +1 -1
- package/lib/components/face.js +1 -1
- package/lib/components/hair.d.ts +1 -1
- package/lib/components/hair.js +1 -1
- 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/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 +31 -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 -39
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: Custom Avatar (https://www.figma.com/community/file/881358461963645496)
|
|
8
|
+
Designer: Ashley Seo (http://www.ashleyseo.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 Big Smile</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://www.figma.com/community/file/881358461963645496">Custom Avatar</a>
|
|
5
|
-
by <a href="http://www.ashleyseo.com/">Ashley Seo</a>
|
|
4
|
+
<a href="https://www.figma.com/community/file/881358461963645496">Custom Avatar</a> by <a href="http://www.ashleyseo.com/">Ashley Seo</a>
|
|
6
5
|
</p>
|
|
7
6
|
|
|
8
7
|
<p align="center">
|
|
9
|
-
|
|
10
|
-
<
|
|
8
|
+
<img src="https://api.dicebear.com/5.x/big-smile/svg?seed=Mimi" width="64" />
|
|
9
|
+
<img src="https://api.dicebear.com/5.x/big-smile/svg?seed=Sasha" width="64" />
|
|
10
|
+
<img src="https://api.dicebear.com/5.x/big-smile/svg?seed=Lilly" width="64" />
|
|
11
|
+
<img src="https://api.dicebear.com/5.x/big-smile/svg?seed=Tigger" width="64" />
|
|
12
|
+
<img src="https://api.dicebear.com/5.x/big-smile/svg?seed=Bella" width="64" />
|
|
13
|
+
<img src="https://api.dicebear.com/5.x/big-smile/svg?seed=Zoe" width="64" />
|
|
14
|
+
<img src="https://api.dicebear.com/5.x/big-smile/svg?seed=Kitty" width="64" />
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
The avatar style is based on <a href="https://www.figma.com/community/file/881358461963645496">Custom Avatar</a> by
|
|
19
|
+
<a href="http://www.ashleyseo.com/">Ashley Seo</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
|
|
|
@@ -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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
6
6
|
*/
|
|
7
7
|
import type { ComponentGroup } from '../types.js';
|
|
8
8
|
export declare const accessories: ComponentGroup;
|
|
@@ -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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
6
6
|
*/
|
|
7
7
|
export const accessories = {
|
|
8
8
|
'catEars': (components, colors) => `<path d="M192.2 102.9c11.2-17.1 55.8 14.7 77.3 33-29.2-1.8-45.2 37.3-50.4 56.4-9.2 9-24.5 10.7-30.7 10.7-3.4-26.3-7.3-83 3.8-100.1Z" fill="#A09B9B"/><mask id="accessoriesCatEars-a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="184" y="97" width="86" height="106"><path d="M192.2 102.9c11.2-17.1 55.8 14.7 77.3 33-29.2-1.8-45.2 37.3-50.4 56.4-9.2 9-24.5 10.7-30.7 10.7-3.4-26.3-7.3-83 3.8-100.1Z" fill="#A09B9B"/></mask><g fill="#C4C4C4" mask="url(#accessoriesCatEars-a)"><path d="M185.8 198.8c7.7-2.8 17.5-6 21.4-7.3l-25-8.9 3.6 16.2ZM179.5 173l-.6-10.8 18 6.2-17.4 4.6Z"/></g><path d="M269.5 136c-28.5 9.7-45.5 41.2-50.4 55.7-22.3-27.9-33.6-76.6-22-89.1 9.3-10 52.1 18 72.4 33.3Z" fill="#FEB3A4"/><mask id="accessoriesCatEars-b" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="192" y="100" width="78" height="92"><path d="M269.5 136c-28.5 9.7-45.5 41.2-50.4 55.7-22.3-27.9-33.6-76.6-22-89.1 9.3-10 52.1 18 72.4 33.3Z" fill="#FEB3A4"/></mask><g mask="url(#accessoriesCatEars-b)"><path d="M233.4 126.5c-21-.4-17.6 44.1-13.1 66.5l55.1-56a88.3 88.3 0 0 0-42-10.5Z" fill="#FFE7E2"/></g><mask id="accessoriesCatEars-c" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="336" y="102" width="90" height="80"><path d="M407 182a162 162 0 0 0-70.5-68.5l42-11.5 47.5 12.5-19 67.5Z" fill="#C4C4C4"/></mask><g mask="url(#accessoriesCatEars-c)"><path d="M387.5 106.9c13.4.4 14.4 38.3 13.2 57.7-10.5-18-37.3-13.5-49.3-9.7-8.4-2.2-15.3-10.7-17.7-14.4 12.4-11.4 40.5-34.1 53.8-33.6Z" fill="#A09B9B"/><mask id="accessoriesCatEars-d" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="333" y="106" width="69" height="59"><path d="M387.5 106.9c13.4.4 14.4 38.3 13.2 57.7-10.5-18-37.3-13.5-49.3-9.7-8.4-2.2-15.3-10.7-17.7-14.4 12.4-11.4 40.5-34.1 53.8-33.6Z" fill="#A09B9B"/></mask><g fill="#C4C4C4" mask="url(#accessoriesCatEars-d)"><path d="M334.8 137.5c4.6 3.5 10 8.2 12.3 10l-5.3-18-7 8ZM345.8 124.5l5.4-4.2L355 133l-9.2-8.6Z"/></g><path d="M401 172.5c-16.3-13.4-39.8-20.1-49.3-17.8 5.8-23.2 26.8-47.5 37.9-45 8.9 1.8 11.4 45.3 11.4 62.8Z" fill="#FEB3A4"/><mask id="accessoriesCatEars-e" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="351" y="109" width="50" height="65"><path d="M401 174c-16.3-13.4-39.8-21.6-49.3-19.3 5.8-23.2 26.8-47.5 37.9-45 8.9 1.8 11.4 46.8 11.4 64.3Z" fill="#FEB3A4"/></mask><g mask="url(#accessoriesCatEars-e)"><path d="M392.3 141.3c-9.4-14.9-30.9 3.9-40.5 15l54.2 18a93.3 93.3 0 0 0-13.7-33Z" fill="#FFE7E2"/></g></g>`,
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
6
6
|
*/
|
|
7
7
|
export const eyes = {
|
|
8
8
|
'cheery': (components, colors) => `<path d="M300.3 309.2c8.9-.2 17.7 3 25.5 7.7a24 24 0 0 0 5.2-21.5c-2.4-12-11.8-20-20.9-18-9 2-14.4 13.5-11.9 25.5.5 2.3 1.2 4.3 2.1 6.3ZM416.1 310.6c1.3-2.9 2-6.4 2-10.2-.2-9.5-5.3-17.2-11.4-17.2-6.1 0-11 7.8-10.8 17.4.1 5.2 1.8 9.9 4.2 13 5-2 10.5-3 16-3Z" fill="#2A1200"/><path d="M333.5 238.7a43.9 43.9 0 0 0-38.2 13.2c-3.2 3.4-4 9.3-.7 13 3 3.6 8.6 4.6 12 1l3.2-3c.4-.3 1.3-.8 1.6-1.2l.5-.4a37.7 37.7 0 0 1 6-3c.5 0 1.2-.4 1.7-.5a35.6 35.6 0 0 1 6.3-1.2h2l4.3.5c4.4.7 9-3.6 9.2-8.4.1-5.3-3.2-9.3-8-10ZM425.4 254.4a31.4 31.4 0 0 0-20.2-12.6c-2.1-.4-4.6.4-6.3 1.8a9.5 9.5 0 0 0-3.1 6.2c-.1 2.4.3 5 1.8 6.8a9 9 0 0 0 5.7 3.5l1.2.3c1 .4 2.1.8 3.2 1.4 1.2.8 2.3 1.7 3.3 2.7l1 1.3a8.8 8.8 0 0 0 5.8 3.5c2 .2 4.6-.4 6.2-2 1.7-1.5 3-3.6 3.2-6 .1-2.5-.4-5-1.8-7Z" fill="#71472D"/>`,
|
package/lib/components/face.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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
6
6
|
*/
|
|
7
7
|
import type { ComponentGroup } from '../types.js';
|
|
8
8
|
export declare const face: ComponentGroup;
|
package/lib/components/face.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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
6
6
|
*/
|
|
7
7
|
import { escape } from '@dicebear/core';
|
|
8
8
|
export const face = {
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
6
6
|
*/
|
|
7
7
|
import type { ComponentGroup } from '../types.js';
|
|
8
8
|
export declare const hair: ComponentGroup;
|
package/lib/components/hair.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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
6
6
|
*/
|
|
7
7
|
import { escape } from '@dicebear/core';
|
|
8
8
|
export const 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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
6
6
|
*/
|
|
7
7
|
export { face } from './face.js';
|
|
8
8
|
export { mouth } from './mouth.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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
6
6
|
*/
|
|
7
7
|
export { face } from './face.js';
|
|
8
8
|
export { mouth } from './mouth.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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
6
6
|
*/
|
|
7
7
|
export const mouth = {
|
|
8
8
|
'openedSmile': (components, colors) => `<path d="M393.3 367c3 1.7 24.1-24.8 38.2-16.7 4.7 2.7 8.3 7.3 11 12.3 6 11 8 24.4 5.7 36.8a67 67 0 0 1-29 41.2c-37.4 25.5-67 20.7-106.8 6-31.4-11.7-74-35.6-65.2-78.7 15.6-76 146.1-1 146.1-1Z" fill="#873C41"/><path d="M285.3 362c10.2 6.4 22.5 7 33.6 4.5 2.1-.5 3.8 1.3 4.3 3.4 5.4 21 36 32 51.5 18.5 1.2-1 3.3-1.3 4.5-.1 8.3 7.8 21.6 10 31.4 4.6 13.8-7.5 13.7-28.6 10-43.3-12.2 3.7-25 18.7-27.3 17.3 0 0-80.1-46-122.3-29.4a31 31 0 0 0 14.3 24.6Z" fill="#fff"/><path d="M400.3 443.8c-22-20.1-48.9-31.4-76.2-39.3-23.4-6.9-49.7-11.3-73.4-4.5 11 23.5 39.2 38.2 61.7 46.6 34.8 12.9 61.8 18.2 93 2.2-1.7-1.7-3.3-3.4-5.1-5Z" fill="#EE7E8B"/>`,
|
|
@@ -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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
/*!
|
|
8
|
+
* Big Smile (@dicebear/big-smile)
|
|
9
|
+
*
|
|
10
|
+
* Code licensed under MIT License.
|
|
11
|
+
* Copyright (c) 2023 Florian Körner
|
|
12
|
+
*
|
|
13
|
+
* Design "Custom Avatar" by Ashley Seo licensed under CC BY 4.0. / Remix of the original.
|
|
14
|
+
* Source: https://www.figma.com/community/file/881358461963645496
|
|
15
|
+
* Homepage: http://www.ashleyseo.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,35 @@
|
|
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
import { getComponents } from './utils/getComponents.js';
|
|
8
|
+
import { getColors } from './utils/getColors.js';
|
|
9
|
+
import { onPreCreate } from './hooks/onPreCreate.js';
|
|
10
|
+
import { onPostCreate } from './hooks/onPostCreate.js';
|
|
11
|
+
export const meta = {
|
|
12
|
+
title: 'Custom Avatar',
|
|
13
|
+
creator: 'Ashley Seo',
|
|
14
|
+
source: 'https://www.figma.com/community/file/881358461963645496',
|
|
15
|
+
homepage: 'http://www.ashleyseo.com/',
|
|
16
|
+
license: {
|
|
17
|
+
name: 'CC BY 4.0',
|
|
18
|
+
url: 'https://creativecommons.org/licenses/by/4.0/',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
export const create = ({ prng, options }) => {
|
|
22
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
23
|
+
onPreCreate({ prng, options });
|
|
24
|
+
const components = getComponents({ prng, options });
|
|
25
|
+
const colors = getColors({ prng, options });
|
|
26
|
+
onPostCreate({ prng, options, components, colors });
|
|
27
|
+
return {
|
|
28
|
+
attributes: {
|
|
29
|
+
viewBox: '0 0 480 480',
|
|
30
|
+
fill: 'none',
|
|
31
|
+
'shape-rendering': 'auto'
|
|
32
|
+
},
|
|
33
|
+
body: `<g transform="matrix(.85775 0 0 .85427 52 47)">${(_b = (_a = components.face) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g><g transform="matrix(.85472 0 0 .855 19 -17)">${(_d = (_c = components.mouth) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}</g><g transform="matrix(.85472 0 0 .855 19 -17)">${(_f = (_e = components.eyes) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}</g><g transform="matrix(.85472 0 0 .85667 18 -15)">${(_h = (_g = components.hair) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ''}</g><g transform="matrix(.85472 0 0 .85667 14 -12)">${(_k = (_j = components.accessories) === null || _j === void 0 ? void 0 : _j.value(components, colors)) !== null && _k !== void 0 ? _k : ''}</g>`,
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
6
6
|
*/
|
|
7
7
|
export interface Options {
|
|
8
8
|
face?: ('base')[];
|
|
@@ -14,12 +14,12 @@ export interface Options {
|
|
|
14
14
|
skinColor?: string[];
|
|
15
15
|
hairColor?: string[];
|
|
16
16
|
}
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
17
|
+
export type ColorPickCollection = Record<string, string>;
|
|
18
|
+
export type ComponentGroup = Record<string, ComponentGroupItem>;
|
|
19
|
+
export type ComponentGroupCollection = Record<string, ComponentGroup>;
|
|
20
|
+
export type ComponentGroupItem = (components: ComponentPickCollection, colors: ColorPickCollection) => string;
|
|
21
|
+
export type ComponentPickCollection = Record<string, ComponentPick>;
|
|
22
|
+
export type ComponentPick = {
|
|
23
23
|
name: string;
|
|
24
24
|
value: ComponentGroupItem;
|
|
25
25
|
} | 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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
6
6
|
*/
|
|
7
7
|
export function getColors({ prng, options }) {
|
|
8
8
|
var _a, _b, _c, _d;
|
|
@@ -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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
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/3Te9c70BX2Aj4IUP35sWhF
|
|
5
|
+
* File: https://www.figma.com/file/3Te9c70BX2Aj4IUP35sWhF
|
|
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/big-smile",
|
|
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/3Te9c70BX2Aj4IUP35sWhF/%40dicebear%2Fbig-smile?node-id=344%3A5223
|
|
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,39 +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/3Te9c70BX2Aj4IUP35sWhF/%40dicebear%2Fbig-smile?node-id=344%3A5223
|
|
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: 'Custom Avatar',
|
|
15
|
-
creator: 'Ashley Seo',
|
|
16
|
-
source: 'https://www.figma.com/community/file/881358461963645496',
|
|
17
|
-
homepage: 'http://www.ashleyseo.com/',
|
|
18
|
-
license: {
|
|
19
|
-
name: 'CC BY 4.0',
|
|
20
|
-
url: 'https://creativecommons.org/licenses/by/4.0/',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
schema: schema,
|
|
24
|
-
create: ({ prng, options }) => {
|
|
25
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
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 480 480',
|
|
33
|
-
fill: 'none',
|
|
34
|
-
'shape-rendering': 'auto'
|
|
35
|
-
},
|
|
36
|
-
body: `<g transform="matrix(.85775 0 0 .85427 52 47)">${(_b = (_a = components.face) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g><g transform="matrix(.85472 0 0 .855 19 -17)">${(_d = (_c = components.mouth) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}</g><g transform="matrix(.85472 0 0 .855 19 -17)">${(_f = (_e = components.eyes) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}</g><g transform="matrix(.85472 0 0 .85667 18 -15)">${(_h = (_g = components.hair) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ''}</g><g transform="matrix(.85472 0 0 .85667 14 -12)">${(_k = (_j = components.accessories) === null || _j === void 0 ? void 0 : _j.value(components, colors)) !== null && _k !== void 0 ? _k : ''}</g>`,
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
};
|