@dicebear/micah 5.0.0-beta.5 → 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.
Files changed (45) hide show
  1. package/LICENSE +14 -1
  2. package/README.md +17 -5
  3. package/lib/components/base.d.ts +1 -1
  4. package/lib/components/base.js +1 -1
  5. package/lib/components/earrings.d.ts +1 -1
  6. package/lib/components/earrings.js +1 -1
  7. package/lib/components/ears.d.ts +1 -1
  8. package/lib/components/ears.js +1 -1
  9. package/lib/components/eyebrows.d.ts +1 -1
  10. package/lib/components/eyebrows.js +1 -1
  11. package/lib/components/eyes.d.ts +1 -1
  12. package/lib/components/eyes.js +1 -1
  13. package/lib/components/facialHair.d.ts +1 -1
  14. package/lib/components/facialHair.js +1 -1
  15. package/lib/components/glasses.d.ts +1 -1
  16. package/lib/components/glasses.js +1 -1
  17. package/lib/components/hair.d.ts +1 -1
  18. package/lib/components/hair.js +1 -1
  19. package/lib/components/index.d.ts +1 -1
  20. package/lib/components/index.js +1 -1
  21. package/lib/components/mouth.d.ts +1 -1
  22. package/lib/components/mouth.js +1 -1
  23. package/lib/components/nose.d.ts +1 -1
  24. package/lib/components/nose.js +1 -1
  25. package/lib/components/shirt.d.ts +1 -1
  26. package/lib/components/shirt.js +1 -1
  27. package/lib/hooks/onPostCreate.d.ts +2 -2
  28. package/lib/hooks/onPostCreate.js +3 -2
  29. package/lib/hooks/onPreCreate.d.ts +2 -2
  30. package/lib/hooks/onPreCreate.js +1 -1
  31. package/lib/index.d.ts +17 -3
  32. package/lib/index.js +31 -15
  33. package/lib/schema.d.ts +1 -1
  34. package/lib/schema.js +1 -1
  35. package/lib/types.d.ts +7 -7
  36. package/lib/types.js +1 -1
  37. package/lib/utils/getColors.d.ts +2 -2
  38. package/lib/utils/getColors.js +1 -1
  39. package/lib/utils/getComponents.d.ts +2 -2
  40. package/lib/utils/getComponents.js +1 -1
  41. package/lib/utils/pickComponent.d.ts +2 -2
  42. package/lib/utils/pickComponent.js +1 -1
  43. package/package.json +3 -3
  44. package/lib/core.d.ts +0 -9
  45. 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: Avatar Illustration System (https://www.figma.com/community/file/829741575478342595)
8
+ Designer: Micah Lanier (https://dribbble.com/micahlanier)
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) 2022 Florian Körner
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="./tests/svg/0.svg" width="124" /> <br />Micah</h1>
1
+ <h1 align="center"><img src="https://dicebear.com/logo-readme.svg" width="96" /> <br />DiceBear Micah</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/829741575478342595">Avatar Illustration System</a>
5
- by <a href="https://dribbble.com/micahlanier">Micah Lanier</a>
4
+ <a href="https://www.figma.com/community/file/829741575478342595">Avatar Illustration System</a> by <a href="https://dribbble.com/micahlanier">Micah Lanier</a>
6
5
  </p>
7
6
 
8
7
  <p align="center">
9
- While our code is MIT licensed, the design is licensed under
10
- <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
8
+ <img src="https://api.dicebear.com/5.x/micah/svg?seed=Mimi" width="64" />
9
+ <img src="https://api.dicebear.com/5.x/micah/svg?seed=Sasha" width="64" />
10
+ <img src="https://api.dicebear.com/5.x/micah/svg?seed=Lilly" width="64" />
11
+ <img src="https://api.dicebear.com/5.x/micah/svg?seed=Tigger" width="64" />
12
+ <img src="https://api.dicebear.com/5.x/micah/svg?seed=Bella" width="64" />
13
+ <img src="https://api.dicebear.com/5.x/micah/svg?seed=Zoe" width="64" />
14
+ <img src="https://api.dicebear.com/5.x/micah/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/829741575478342595">Avatar Illustration System</a> by
19
+ <a href="https://dribbble.com/micahlanier">Micah Lanier</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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const base: 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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const base = {
@@ -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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const earrings: 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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const earrings = {
@@ -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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const ears: 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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const ears = {
@@ -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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const eyebrows: 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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const eyebrows = {
@@ -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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const eyes: 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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const eyes = {
@@ -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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const facialHair: 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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  export const facialHair = {
8
8
  'beard': (components, colors) => `<path d="M146.13 49.15A73.74 73.74 0 0 1 27.69 123.4C10.5 107.5 6.5 56 2.7 31.65c14 31.5 49.62 33.94 83.5 28 28.5-5 51.3-6 51.3-45 1.88 2.62 6.97 27.59 8.63 34.5Z" fill="#000"/>`,
@@ -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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const glasses: 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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const glasses = {
@@ -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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const hair: 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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  export { base } from './base.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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  export { base } from './base.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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const mouth: 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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const mouth = {
@@ -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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const nose: 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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  export const nose = {
8
8
  'curve': (components, colors) => `<path d="M16.5 7c-.33 3.83 0 12.2 4 15 5 3.5-.5 12-10.5 10" stroke="#000" stroke-width="4"/>`,
@@ -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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import type { ComponentGroup } from '../types.js';
8
8
  export declare const shirt: 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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import { escape } from '@dicebear/core';
8
8
  export const shirt = {
@@ -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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import { Prng, StyleOptions } from "@dicebear/core";
8
8
  import { Options, ColorPickCollection, ComponentPickCollection } from "../types.js";
9
- declare type Props = {
9
+ type Props = {
10
10
  prng: Prng;
11
11
  options: StyleOptions<Options>;
12
12
  components: ComponentPickCollection;
@@ -2,11 +2,12 @@
2
2
  * Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
3
3
  *
4
4
  * Plugin: https://www.figma.com/community/plugin/1005765655729342787
5
- * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  export function onPostCreate({ prng, options, components, colors }) {
8
+ var _a;
8
9
  // Ensure that the mouth remains visible. #132
9
- if (components.facialHair && colors.facialHair === colors.mouth) {
10
+ if (((_a = components.facialHair) === null || _a === void 0 ? void 0 : _a.name) === 'beard' && colors.facialHair === colors.mouth) {
10
11
  colors.mouth = 'ffffff33';
11
12
  }
12
13
  }
@@ -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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import { Prng, StyleOptions } from "@dicebear/core";
8
8
  import { Options } from "../types.js";
9
- declare type Props = {
9
+ type Props = {
10
10
  prng: Prng;
11
11
  options: StyleOptions<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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  export function onPreCreate({ prng, options }) {
8
8
  var _a, _b;
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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
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 };
7
+ /*!
8
+ * Micah (@dicebear/micah)
9
+ *
10
+ * Code licensed under MIT License.
11
+ * Copyright (c) 2023 Florian Körner
12
+ *
13
+ * Design "Avatar Illustration System" by Micah Lanier licensed under CC BY 4.0. / Remix of the original.
14
+ * Source: https://www.figma.com/community/file/829741575478342595
15
+ * Homepage: https://dribbble.com/micahlanier
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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
- /*!
8
- * Micah (@dicebear/micah)
9
- *
10
- * Code licensed under MIT License.
11
- * Copyright (c) 2022 Florian Körner
12
- *
13
- * Design "Avatar Illustration System" by Micah Lanier licensed under CC BY 4.0. / Remix of the original.
14
- * Source: https://www.figma.com/community/file/829741575478342595
15
- * Homepage: https://dribbble.com/micahlanier
16
- * License: https://creativecommons.org/licenses/by/4.0/
17
- */
18
- import { style } from './core.js';
19
- const { create, meta, schema } = style;
20
- export { create, meta, schema };
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: 'Avatar Illustration System',
13
+ creator: 'Micah Lanier',
14
+ source: 'https://www.figma.com/community/file/829741575478342595',
15
+ homepage: 'https://dribbble.com/micahlanier',
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, _l, _m, _o, _p, _q, _r;
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 360 360',
30
+ fill: 'none',
31
+ 'shape-rendering': 'auto'
32
+ },
33
+ body: `<g transform="translate(80 23)">${(_b = (_a = components.base) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g><g transform="translate(170 183)">${(_d = (_c = components.mouth) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}</g><g transform="translate(110 102)">${(_f = (_e = components.eyebrows) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}</g><g transform="translate(49 11)">${(_h = (_g = components.hair) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ''}</g><g transform="translate(142 119)">${(_k = (_j = components.eyes) === null || _j === void 0 ? void 0 : _j.value(components, colors)) !== null && _k !== void 0 ? _k : ''}</g><g transform="rotate(-8 1149.44 -1186.92)">${(_m = (_l = components.nose) === null || _l === void 0 ? void 0 : _l.value(components, colors)) !== null && _m !== void 0 ? _m : ''}</g><g transform="translate(84 154)">${(_p = (_o = components.ears) === null || _o === void 0 ? void 0 : _o.value(components, colors)) !== null && _p !== void 0 ? _p : ''}</g><g transform="translate(53 272)">${(_r = (_q = components.shirt) === null || _q === void 0 ? void 0 : _q.value(components, colors)) !== null && _r !== void 0 ? _r : ''}</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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  export interface Options {
8
8
  base?: ('standard')[];
@@ -31,12 +31,12 @@ export interface Options {
31
31
  shirtColor?: string[];
32
32
  eyesColor?: string[];
33
33
  }
34
- export declare type ColorPickCollection = Record<string, string>;
35
- export declare type ComponentGroup = Record<string, ComponentGroupItem>;
36
- export declare type ComponentGroupCollection = Record<string, ComponentGroup>;
37
- export declare type ComponentGroupItem = (components: ComponentPickCollection, colors: ColorPickCollection) => string;
38
- export declare type ComponentPickCollection = Record<string, ComponentPick>;
39
- export declare type ComponentPick = {
34
+ export type ColorPickCollection = Record<string, string>;
35
+ export type ComponentGroup = Record<string, ComponentGroupItem>;
36
+ export type ComponentGroupCollection = Record<string, ComponentGroup>;
37
+ export type ComponentGroupItem = (components: ComponentPickCollection, colors: ColorPickCollection) => string;
38
+ export type ComponentPickCollection = Record<string, ComponentPick>;
39
+ export type ComponentPick = {
40
40
  name: string;
41
41
  value: ComponentGroupItem;
42
42
  } | 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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  export {};
@@ -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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import type { Prng } from '@dicebear/core';
8
8
  import type { Options, ColorPickCollection } from '../types.js';
9
- declare type Props = {
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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  export function getColors({ prng, options }) {
8
8
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
@@ -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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import type { Prng } from '@dicebear/core';
8
8
  import type { Options, ComponentPickCollection } from '../types.js';
9
- declare type Props = {
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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
6
6
  */
7
7
  import type { Prng } from '@dicebear/core';
8
8
  import type { ComponentPick } from '../types.js';
9
- declare type Props = {
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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
5
+ * File: https://www.figma.com/file/YHb4ShTgmO8Lqhkz1plLfL
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/micah",
3
- "version": "5.0.0-beta.5",
3
+ "version": "5.0.0-beta.6",
4
4
  "description": "Avatar style for DiceBear",
5
5
  "keywords": [
6
6
  "dicebear"
@@ -29,7 +29,7 @@
29
29
  "test": "uvu tests"
30
30
  },
31
31
  "devDependencies": {
32
- "@dicebear/core": "^5.0.0-beta.5",
32
+ "@dicebear/core": "^5.0.0-beta.6",
33
33
  "@tsconfig/recommended": "^1.0.1",
34
34
  "del-cli": "^4.0.1",
35
35
  "typescript": "^4.6.3",
@@ -44,5 +44,5 @@
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "gitHead": "067460b00a40a7720d556f45edb32d9311edde14"
47
+ "gitHead": "1a81759251d30336383497f31843b48809d0f56b"
48
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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
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/YHb4ShTgmO8Lqhkz1plLfL/%40dicebear%2Fmicah?node-id=259%3A555
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: 'Avatar Illustration System',
15
- creator: 'Micah Lanier',
16
- source: 'https://www.figma.com/community/file/829741575478342595',
17
- homepage: 'https://dribbble.com/micahlanier',
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, _l, _m, _o, _p, _q, _r;
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 360 360',
33
- fill: 'none',
34
- 'shape-rendering': 'auto'
35
- },
36
- body: `<g transform="translate(80 23)">${(_b = (_a = components.base) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g><g transform="translate(170 183)">${(_d = (_c = components.mouth) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}</g><g transform="translate(110 102)">${(_f = (_e = components.eyebrows) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}</g><g transform="translate(49 11)">${(_h = (_g = components.hair) === null || _g === void 0 ? void 0 : _g.value(components, colors)) !== null && _h !== void 0 ? _h : ''}</g><g transform="translate(142 119)">${(_k = (_j = components.eyes) === null || _j === void 0 ? void 0 : _j.value(components, colors)) !== null && _k !== void 0 ? _k : ''}</g><g transform="rotate(-8 1149.44 -1186.92)">${(_m = (_l = components.nose) === null || _l === void 0 ? void 0 : _l.value(components, colors)) !== null && _m !== void 0 ? _m : ''}</g><g transform="translate(84 154)">${(_p = (_o = components.ears) === null || _o === void 0 ? void 0 : _o.value(components, colors)) !== null && _p !== void 0 ? _p : ''}</g><g transform="translate(53 272)">${(_r = (_q = components.shirt) === null || _q === void 0 ? void 0 : _q.value(components, colors)) !== null && _r !== void 0 ? _r : ''}</g>`,
37
- };
38
- },
39
- };