@dicebear/core 10.5.0 → 10.6.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/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  <h1><img src="https://www.dicebear.com/logo-readme.svg" width="28" /> DiceBear Core (JavaScript)</h1>
2
2
 
3
+ [![stars](https://www.dicebear.com/badges/stars.svg)](https://github.com/dicebear/dicebear/stargazers)
4
+ [![license](https://www.dicebear.com/badges/license.svg)](https://github.com/dicebear/dicebear/blob/10.x/LICENSE)
5
+
3
6
  JavaScript implementation of the DiceBear avatar library. Generates
4
7
  deterministic SVG avatars from style definitions and a seed string.
5
8
 
@@ -23,6 +23,7 @@ interface ColorField {
23
23
  readonly type: 'color';
24
24
  readonly list?: true;
25
25
  readonly contrastTo?: string;
26
+ readonly notEqualTo?: readonly string[];
26
27
  }
27
28
  interface RangeField {
28
29
  readonly type: 'range';
@@ -70,11 +70,16 @@ _a = OptionsDescriptor, _OptionsDescriptor_descriptor = new WeakMap(), _OptionsD
70
70
  }
71
71
  }
72
72
  for (const name of [...__classPrivateFieldGet(this, _OptionsDescriptor_style, "f").colors().keys(), 'background']) {
73
- const contrastTo = __classPrivateFieldGet(this, _OptionsDescriptor_style, "f").colors().get(name)?.contrastTo();
73
+ const color = __classPrivateFieldGet(this, _OptionsDescriptor_style, "f").colors().get(name);
74
+ const contrastTo = color?.contrastTo();
75
+ const notEqualTo = color?.notEqualTo() ?? [];
74
76
  result[`${name}Color`] = {
75
77
  type: 'color',
76
78
  list: true,
77
79
  ...(contrastTo ? { contrastTo } : {}),
80
+ ...(notEqualTo.length > 0
81
+ ? { notEqualTo: Array.from(notEqualTo) }
82
+ : {}),
78
83
  };
79
84
  result[`${name}ColorFill`] = {
80
85
  type: 'enum',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dicebear/core",
3
- "version": "10.5.0",
3
+ "version": "10.6.0",
4
4
  "description": "Unique avatars from dozens of styles — deterministic, customizable, vector-based.",
5
5
  "keywords": [
6
6
  "avatar",
@@ -17,6 +17,7 @@
17
17
  "type": "git",
18
18
  "url": "git+https://github.com/dicebear/dicebear.git"
19
19
  },
20
+ "funding": "https://www.dicebear.com/support/",
20
21
  "license": "MIT",
21
22
  "author": "Florian Körner <contact@florian-koerner.com>",
22
23
  "type": "module",