dicebear-schema 2.0.2__tar.gz → 2.1.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: dicebear-schema
3
- Version: 2.0.2
3
+ Version: 2.1.0
4
4
  Summary: JSON Schema definitions for DiceBear avatar styles and options
5
5
  Project-URL: Homepage, https://www.dicebear.com
6
6
  Project-URL: Repository, https://github.com/dicebear/schema
@@ -48,34 +48,35 @@ https://www.dicebear.com/create-styles/definition-schema/
48
48
 
49
49
  Validates the options object passed by users when generating an avatar. Supported properties include:
50
50
 
51
- | Property | Type | Description |
52
- | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------- |
53
- | `seed` | `string` | PRNG seed for reproducible avatars |
54
- | `size` | `integer` | Output size in pixels (1 to 4096) |
55
- | `idRandomization` | `boolean` | SVG ID randomization to avoid conflicts |
56
- | `title` | `string` | Accessible title rendered as `<title>` and `aria-label` |
57
- | `flip` | `string \| array` | Mirror direction: `none`, `horizontal`, `vertical`, or `both` |
58
- | `rotate` | `number \| [min, max]` | Rotation in degrees (−360 to 360) |
59
- | `scale` | `number \| [min, max]` | Scaling factor (0 to 10, 1 = original size) |
60
- | `translateX` | `number \| [min, max]` | Horizontal offset (−1000 to 1000) |
61
- | `translateY` | `number \| [min, max]` | Vertical offset (−1000 to 1000) |
62
- | `borderRadius` | `number \| [min, max]` | Corner radius (0 = sharp, 50 = circle) |
63
- | `fontFamily` | `string \| array` | Font family for text rendering |
64
- | `fontWeight` | `integer \| array` | Font weight (1 to 1000) |
65
- | `tags` | `string \| string[]` | Keep only variants carrying these tags (`category` or `category:value`, `!` disallows) |
66
- | `animation` | `boolean` | Plays the style's animations, off by default |
67
- | `animationSpeed` | `number \| [min, max]` | Playback speed multiplier (0.1 to 10, 1 = as authored) |
68
- | `animationDelay` | `number \| [min, max]` | Start offset in seconds (-3600 to 3600), added after the speed applies |
69
- | `*Animation` | `boolean` | Switches one animation by name, wins over `animation` |
70
- | `*AnimationSpeed` | `number \| [min, max]` | Playback speed of one animation by name, wins over `animationSpeed` |
71
- | `*AnimationDelay` | `number \| [min, max]` | Start offset of one animation by name, wins over `animationDelay` |
72
- | `*Variant` | `string \| string[] \| object` | Component variant filter and weights |
73
- | `*Probability` | `number` | Component display probability (0 to 100) |
74
- | `*Color` | `string \| array` | Hex colors |
75
- | `*ColorFill` | `string \| array` | Color fill: `solid`, `linear`, or `radial` |
76
- | `*ColorFillStops` | `integer \| [min, max]` | Gradient color stops (min 2) |
77
- | `*ColorAngle` | `number \| [min, max]` | Gradient angle (−360 to 360) |
78
- | `*ColorOrder` | `string` | `random` shuffles the colors per seed, `fixed` keeps the given order |
51
+ | Property | Type | Description |
52
+ | ---------------------- | ------------------------------ | -------------------------------------------------------------------------------------- |
53
+ | `seed` | `string` | PRNG seed for reproducible avatars |
54
+ | `size` | `integer` | Output size in pixels (1 to 4096) |
55
+ | `idRandomization` | `boolean` | SVG ID randomization to avoid conflicts |
56
+ | `title` | `string` | Accessible title rendered as `<title>` and `aria-label` |
57
+ | `flip` | `string \| array` | Mirror direction: `none`, `horizontal`, `vertical`, or `both` |
58
+ | `rotate` | `number \| [min, max]` | Rotation in degrees (−360 to 360) |
59
+ | `scale` | `number \| [min, max]` | Scaling factor (0 to 10, 1 = original size) |
60
+ | `translateX` | `number \| [min, max]` | Horizontal offset (−1000 to 1000) |
61
+ | `translateY` | `number \| [min, max]` | Vertical offset (−1000 to 1000) |
62
+ | `borderRadius` | `number \| [min, max]` | Corner radius (0 = sharp, 50 = circle) |
63
+ | `fontFamily` | `string \| array` | Font family for text rendering |
64
+ | `fontWeight` | `integer \| array` | Font weight (1 to 1000) |
65
+ | `tags` | `string \| string[]` | Keep only variants carrying these tags (`category` or `category:value`, `!` disallows) |
66
+ | `animation` | `boolean` | Plays the style's animations, off by default |
67
+ | `animationSpeed` | `number \| [min, max]` | Playback speed multiplier (0.1 to 10, 1 = as authored) |
68
+ | `animationDelay` | `number \| [min, max]` | Start offset in seconds (-3600 to 3600), added after the speed applies |
69
+ | `animationMotionQuery` | `boolean` | Wraps the animation CSS in `prefers-reduced-motion`, on by default |
70
+ | `*Animation` | `boolean` | Switches one animation by name, wins over `animation` |
71
+ | `*AnimationSpeed` | `number \| [min, max]` | Playback speed of one animation by name, wins over `animationSpeed` |
72
+ | `*AnimationDelay` | `number \| [min, max]` | Start offset of one animation by name, wins over `animationDelay` |
73
+ | `*Variant` | `string \| string[] \| object` | Component variant filter and weights |
74
+ | `*Probability` | `number` | Component display probability (0 to 100) |
75
+ | `*Color` | `string \| array` | Hex colors |
76
+ | `*ColorFill` | `string \| array` | Color fill: `solid`, `linear`, or `radial` |
77
+ | `*ColorFillStops` | `integer \| [min, max]` | Gradient color stops (min 2) |
78
+ | `*ColorAngle` | `number \| [min, max]` | Gradient angle (−360 to 360) |
79
+ | `*ColorOrder` | `string` | `random` shuffles the colors per seed, `fixed` keeps the given order |
79
80
 
80
81
  When an option accepts an array, the PRNG either picks from the list (for discrete values) or picks a value within the range (for numeric min/max pairs).
81
82
 
@@ -209,8 +210,8 @@ var names = DiceBear.Schema.All();
209
210
  The schemas are available directly via CDN, so no installation is required. We recommend using a specific version to ensure stability:
210
211
 
211
212
  ```
212
- https://cdn.hopjs.net/npm/@dicebear/schema@2.0.2/dist/definition.min.json
213
- https://cdn.hopjs.net/npm/@dicebear/schema@2.0.2/dist/options.min.json
213
+ https://cdn.hopjs.net/npm/@dicebear/schema@2.1.0/dist/definition.min.json
214
+ https://cdn.hopjs.net/npm/@dicebear/schema@2.1.0/dist/options.min.json
214
215
  ```
215
216
 
216
217
  ## Contributing
@@ -26,34 +26,35 @@ https://www.dicebear.com/create-styles/definition-schema/
26
26
 
27
27
  Validates the options object passed by users when generating an avatar. Supported properties include:
28
28
 
29
- | Property | Type | Description |
30
- | ----------------- | ------------------------------ | -------------------------------------------------------------------------------------- |
31
- | `seed` | `string` | PRNG seed for reproducible avatars |
32
- | `size` | `integer` | Output size in pixels (1 to 4096) |
33
- | `idRandomization` | `boolean` | SVG ID randomization to avoid conflicts |
34
- | `title` | `string` | Accessible title rendered as `<title>` and `aria-label` |
35
- | `flip` | `string \| array` | Mirror direction: `none`, `horizontal`, `vertical`, or `both` |
36
- | `rotate` | `number \| [min, max]` | Rotation in degrees (−360 to 360) |
37
- | `scale` | `number \| [min, max]` | Scaling factor (0 to 10, 1 = original size) |
38
- | `translateX` | `number \| [min, max]` | Horizontal offset (−1000 to 1000) |
39
- | `translateY` | `number \| [min, max]` | Vertical offset (−1000 to 1000) |
40
- | `borderRadius` | `number \| [min, max]` | Corner radius (0 = sharp, 50 = circle) |
41
- | `fontFamily` | `string \| array` | Font family for text rendering |
42
- | `fontWeight` | `integer \| array` | Font weight (1 to 1000) |
43
- | `tags` | `string \| string[]` | Keep only variants carrying these tags (`category` or `category:value`, `!` disallows) |
44
- | `animation` | `boolean` | Plays the style's animations, off by default |
45
- | `animationSpeed` | `number \| [min, max]` | Playback speed multiplier (0.1 to 10, 1 = as authored) |
46
- | `animationDelay` | `number \| [min, max]` | Start offset in seconds (-3600 to 3600), added after the speed applies |
47
- | `*Animation` | `boolean` | Switches one animation by name, wins over `animation` |
48
- | `*AnimationSpeed` | `number \| [min, max]` | Playback speed of one animation by name, wins over `animationSpeed` |
49
- | `*AnimationDelay` | `number \| [min, max]` | Start offset of one animation by name, wins over `animationDelay` |
50
- | `*Variant` | `string \| string[] \| object` | Component variant filter and weights |
51
- | `*Probability` | `number` | Component display probability (0 to 100) |
52
- | `*Color` | `string \| array` | Hex colors |
53
- | `*ColorFill` | `string \| array` | Color fill: `solid`, `linear`, or `radial` |
54
- | `*ColorFillStops` | `integer \| [min, max]` | Gradient color stops (min 2) |
55
- | `*ColorAngle` | `number \| [min, max]` | Gradient angle (−360 to 360) |
56
- | `*ColorOrder` | `string` | `random` shuffles the colors per seed, `fixed` keeps the given order |
29
+ | Property | Type | Description |
30
+ | ---------------------- | ------------------------------ | -------------------------------------------------------------------------------------- |
31
+ | `seed` | `string` | PRNG seed for reproducible avatars |
32
+ | `size` | `integer` | Output size in pixels (1 to 4096) |
33
+ | `idRandomization` | `boolean` | SVG ID randomization to avoid conflicts |
34
+ | `title` | `string` | Accessible title rendered as `<title>` and `aria-label` |
35
+ | `flip` | `string \| array` | Mirror direction: `none`, `horizontal`, `vertical`, or `both` |
36
+ | `rotate` | `number \| [min, max]` | Rotation in degrees (−360 to 360) |
37
+ | `scale` | `number \| [min, max]` | Scaling factor (0 to 10, 1 = original size) |
38
+ | `translateX` | `number \| [min, max]` | Horizontal offset (−1000 to 1000) |
39
+ | `translateY` | `number \| [min, max]` | Vertical offset (−1000 to 1000) |
40
+ | `borderRadius` | `number \| [min, max]` | Corner radius (0 = sharp, 50 = circle) |
41
+ | `fontFamily` | `string \| array` | Font family for text rendering |
42
+ | `fontWeight` | `integer \| array` | Font weight (1 to 1000) |
43
+ | `tags` | `string \| string[]` | Keep only variants carrying these tags (`category` or `category:value`, `!` disallows) |
44
+ | `animation` | `boolean` | Plays the style's animations, off by default |
45
+ | `animationSpeed` | `number \| [min, max]` | Playback speed multiplier (0.1 to 10, 1 = as authored) |
46
+ | `animationDelay` | `number \| [min, max]` | Start offset in seconds (-3600 to 3600), added after the speed applies |
47
+ | `animationMotionQuery` | `boolean` | Wraps the animation CSS in `prefers-reduced-motion`, on by default |
48
+ | `*Animation` | `boolean` | Switches one animation by name, wins over `animation` |
49
+ | `*AnimationSpeed` | `number \| [min, max]` | Playback speed of one animation by name, wins over `animationSpeed` |
50
+ | `*AnimationDelay` | `number \| [min, max]` | Start offset of one animation by name, wins over `animationDelay` |
51
+ | `*Variant` | `string \| string[] \| object` | Component variant filter and weights |
52
+ | `*Probability` | `number` | Component display probability (0 to 100) |
53
+ | `*Color` | `string \| array` | Hex colors |
54
+ | `*ColorFill` | `string \| array` | Color fill: `solid`, `linear`, or `radial` |
55
+ | `*ColorFillStops` | `integer \| [min, max]` | Gradient color stops (min 2) |
56
+ | `*ColorAngle` | `number \| [min, max]` | Gradient angle (−360 to 360) |
57
+ | `*ColorOrder` | `string` | `random` shuffles the colors per seed, `fixed` keeps the given order |
57
58
 
58
59
  When an option accepts an array, the PRNG either picks from the list (for discrete values) or picks a value within the range (for numeric min/max pairs).
59
60
 
@@ -187,8 +188,8 @@ var names = DiceBear.Schema.All();
187
188
  The schemas are available directly via CDN, so no installation is required. We recommend using a specific version to ensure stability:
188
189
 
189
190
  ```
190
- https://cdn.hopjs.net/npm/@dicebear/schema@2.0.2/dist/definition.min.json
191
- https://cdn.hopjs.net/npm/@dicebear/schema@2.0.2/dist/options.min.json
191
+ https://cdn.hopjs.net/npm/@dicebear/schema@2.1.0/dist/definition.min.json
192
+ https://cdn.hopjs.net/npm/@dicebear/schema@2.1.0/dist/options.min.json
192
193
  ```
193
194
 
194
195
  ## Contributing
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
5
5
 
6
6
  [project]
7
7
  name = "dicebear-schema"
8
- version = "2.0.2"
8
+ version = "2.1.0"
9
9
  description = "JSON Schema definitions for DiceBear avatar styles and options"
10
10
  readme = "README.md"
11
11
  requires-python = ">=3.10"
@@ -233,6 +233,10 @@
233
233
  "animationDelay": {
234
234
  "description": "A start offset in seconds for declarative animations, added to each timeline's own delay after the speed applies. As a `[min, max]` range the PRNG picks a value per seed, which keeps a wall of avatars from moving in step. Negative values start the animations mid-cycle. Only meaningful when animations play. A `*AnimationDelay` option takes precedence for the animation of that name.",
235
235
  "allOf": [{ "$ref": "#/definitions/animationDelayOption" }]
236
+ },
237
+ "animationMotionQuery": {
238
+ "description": "Wraps the animation CSS in a `prefers-reduced-motion: no-preference` media query, so viewers who ask their system for reduced motion see the static avatar. Defaults to true. Set it to false for renderers that ignore media queries, such as SVG libraries in native apps. The app then reads the system setting itself and decides whether to pass `animation`. Only meaningful when animations play.",
239
+ "type": "boolean"
236
240
  }
237
241
  },
238
242
  "patternProperties": {
File without changes