@dicebear/schema 0.10.1 → 0.11.1
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 +28 -28
- package/dist/definition.min.json +1 -1
- package/dist/options.min.json +1 -1
- package/package.json +3 -2
- package/src/definition.json +415 -428
- package/src/options.json +76 -68
package/src/options.json
CHANGED
|
@@ -14,12 +14,13 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scale": {
|
|
16
16
|
"type": "number",
|
|
17
|
-
"minimum": 0
|
|
17
|
+
"minimum": 0,
|
|
18
|
+
"maximum": 10
|
|
18
19
|
},
|
|
19
20
|
"translate": {
|
|
20
21
|
"type": "number",
|
|
21
|
-
"minimum": -
|
|
22
|
-
"maximum":
|
|
22
|
+
"minimum": -1000,
|
|
23
|
+
"maximum": 1000
|
|
23
24
|
},
|
|
24
25
|
"borderRadius": {
|
|
25
26
|
"type": "number",
|
|
@@ -40,12 +41,40 @@
|
|
|
40
41
|
},
|
|
41
42
|
"fontFamilyName": {
|
|
42
43
|
"type": "string",
|
|
43
|
-
"pattern": "^[a-zA-Z0-
|
|
44
|
+
"pattern": "^[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*(, ?[a-zA-Z0-9_\\-]+( [a-zA-Z0-9_\\-]+)*)*$",
|
|
45
|
+
"maxLength": 256
|
|
44
46
|
},
|
|
45
47
|
"fontWeight": {
|
|
46
48
|
"type": "integer",
|
|
47
49
|
"minimum": 1,
|
|
48
50
|
"maximum": 1000
|
|
51
|
+
},
|
|
52
|
+
"variantName": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"pattern": "^[a-z][a-zA-Z0-9]*$",
|
|
55
|
+
"maxLength": 64
|
|
56
|
+
},
|
|
57
|
+
"rotateOption": {
|
|
58
|
+
"anyOf": [
|
|
59
|
+
{ "$ref": "#/definitions/rotate" },
|
|
60
|
+
{
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": { "$ref": "#/definitions/rotate" },
|
|
63
|
+
"minItems": 1,
|
|
64
|
+
"maxItems": 2
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"translateOption": {
|
|
69
|
+
"anyOf": [
|
|
70
|
+
{ "$ref": "#/definitions/translate" },
|
|
71
|
+
{
|
|
72
|
+
"type": "array",
|
|
73
|
+
"items": { "$ref": "#/definitions/translate" },
|
|
74
|
+
"minItems": 1,
|
|
75
|
+
"maxItems": 2
|
|
76
|
+
}
|
|
77
|
+
]
|
|
49
78
|
}
|
|
50
79
|
},
|
|
51
80
|
"properties": {
|
|
@@ -57,7 +86,8 @@
|
|
|
57
86
|
"size": {
|
|
58
87
|
"type": "integer",
|
|
59
88
|
"description": "Specifies the dimensions of the avatar in pixels. If no size is specified, the avatar defaults to a responsive design or scales to 100% of its container. This flexibility allows the avatar to seamlessly adapt to different screen sizes and layouts, ensuring optimal display across devices and environments.",
|
|
60
|
-
"minimum": 1
|
|
89
|
+
"minimum": 1,
|
|
90
|
+
"maximum": 4096
|
|
61
91
|
},
|
|
62
92
|
"idRandomization": {
|
|
63
93
|
"type": "boolean",
|
|
@@ -79,6 +109,7 @@
|
|
|
79
109
|
"items": {
|
|
80
110
|
"$ref": "#/definitions/flip"
|
|
81
111
|
},
|
|
112
|
+
"minItems": 1,
|
|
82
113
|
"maxItems": 128
|
|
83
114
|
}
|
|
84
115
|
]
|
|
@@ -94,6 +125,7 @@
|
|
|
94
125
|
"items": {
|
|
95
126
|
"$ref": "#/definitions/fontFamilyName"
|
|
96
127
|
},
|
|
128
|
+
"minItems": 1,
|
|
97
129
|
"maxItems": 128
|
|
98
130
|
}
|
|
99
131
|
]
|
|
@@ -109,6 +141,7 @@
|
|
|
109
141
|
"items": {
|
|
110
142
|
"$ref": "#/definitions/fontWeight"
|
|
111
143
|
},
|
|
144
|
+
"minItems": 1,
|
|
112
145
|
"maxItems": 128
|
|
113
146
|
}
|
|
114
147
|
]
|
|
@@ -124,6 +157,7 @@
|
|
|
124
157
|
"items": {
|
|
125
158
|
"$ref": "#/definitions/scale"
|
|
126
159
|
},
|
|
160
|
+
"minItems": 1,
|
|
127
161
|
"maxItems": 2
|
|
128
162
|
}
|
|
129
163
|
]
|
|
@@ -139,6 +173,7 @@
|
|
|
139
173
|
"items": {
|
|
140
174
|
"$ref": "#/definitions/borderRadius"
|
|
141
175
|
},
|
|
176
|
+
"minItems": 1,
|
|
142
177
|
"maxItems": 2
|
|
143
178
|
}
|
|
144
179
|
]
|
|
@@ -152,28 +187,28 @@
|
|
|
152
187
|
"maximum": 100
|
|
153
188
|
},
|
|
154
189
|
"^[a-z][a-zA-Z0-9]*Variant$": {
|
|
155
|
-
"description": "Specifies which variants of the avatar part can be selected by the PRNG and their relative weights. A string or array of strings filters which variants the PRNG can choose from. An object maps variant names to non-negative weights, simultaneously filtering and weighting selection.",
|
|
190
|
+
"description": "Specifies which variants of the avatar part can be selected by the PRNG and their relative weights. A string or array of strings filters which variants the PRNG can choose from. An object maps variant names to non-negative weights, simultaneously filtering and weighting selection. Variant names must be camelCase identifiers.",
|
|
156
191
|
"anyOf": [
|
|
157
192
|
{
|
|
158
|
-
"
|
|
193
|
+
"$ref": "#/definitions/variantName"
|
|
159
194
|
},
|
|
160
195
|
{
|
|
161
196
|
"type": "array",
|
|
162
197
|
"items": {
|
|
163
|
-
"
|
|
198
|
+
"$ref": "#/definitions/variantName"
|
|
164
199
|
},
|
|
200
|
+
"minItems": 1,
|
|
165
201
|
"maxItems": 128
|
|
166
202
|
},
|
|
167
203
|
{
|
|
168
204
|
"type": "object",
|
|
169
|
-
"propertyNames": {
|
|
170
|
-
"pattern": "^[a-z][a-zA-Z0-9]*$"
|
|
171
|
-
},
|
|
205
|
+
"propertyNames": { "$ref": "#/definitions/variantName" },
|
|
172
206
|
"additionalProperties": {
|
|
173
207
|
"type": "number",
|
|
174
208
|
"minimum": 0
|
|
175
209
|
},
|
|
176
|
-
"
|
|
210
|
+
"minProperties": 1,
|
|
211
|
+
"maxProperties": 512
|
|
177
212
|
}
|
|
178
213
|
]
|
|
179
214
|
},
|
|
@@ -188,6 +223,7 @@
|
|
|
188
223
|
"items": {
|
|
189
224
|
"$ref": "#/definitions/color"
|
|
190
225
|
},
|
|
226
|
+
"minItems": 1,
|
|
191
227
|
"maxItems": 128
|
|
192
228
|
}
|
|
193
229
|
]
|
|
@@ -203,12 +239,13 @@
|
|
|
203
239
|
"items": {
|
|
204
240
|
"$ref": "#/definitions/colorFill"
|
|
205
241
|
},
|
|
242
|
+
"minItems": 1,
|
|
206
243
|
"maxItems": 128
|
|
207
244
|
}
|
|
208
245
|
]
|
|
209
246
|
},
|
|
210
247
|
"^[a-z][a-zA-Z0-9]*ColorFillStops$": {
|
|
211
|
-
"description": "Specifies the number of color stops for gradient fills. This value is only relevant when the color fill method is set to `linear` or `radial`. The minimum value is
|
|
248
|
+
"description": "Specifies the number of color stops for gradient fills. This value is only relevant when the color fill method is set to `linear` or `radial`. The minimum value is 2. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.",
|
|
212
249
|
"anyOf": [
|
|
213
250
|
{
|
|
214
251
|
"$ref": "#/definitions/colorFillStops"
|
|
@@ -218,70 +255,41 @@
|
|
|
218
255
|
"items": {
|
|
219
256
|
"$ref": "#/definitions/colorFillStops"
|
|
220
257
|
},
|
|
258
|
+
"minItems": 1,
|
|
221
259
|
"maxItems": 2
|
|
222
260
|
}
|
|
223
261
|
]
|
|
224
262
|
},
|
|
225
263
|
"^[a-z][a-zA-Z0-9]*ColorAngle$": {
|
|
226
264
|
"description": "Specifies the angle for the color gradient. This value can be an integer or a float. A value of 0 results in no rotation, while values between -360 and 360 define the degree of rotation. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.",
|
|
227
|
-
"
|
|
228
|
-
{
|
|
229
|
-
"$ref": "#/definitions/rotate"
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
"type": "array",
|
|
233
|
-
"items": {
|
|
234
|
-
"$ref": "#/definitions/rotate"
|
|
235
|
-
},
|
|
236
|
-
"maxItems": 2
|
|
237
|
-
}
|
|
238
|
-
]
|
|
265
|
+
"allOf": [{ "$ref": "#/definitions/rotateOption" }]
|
|
239
266
|
},
|
|
240
|
-
"^
|
|
241
|
-
"description": "This is the rotation angle for the avatar
|
|
242
|
-
"
|
|
243
|
-
{
|
|
244
|
-
"$ref": "#/definitions/rotate"
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
"type": "array",
|
|
248
|
-
"items": {
|
|
249
|
-
"$ref": "#/definitions/rotate"
|
|
250
|
-
},
|
|
251
|
-
"maxItems": 2
|
|
252
|
-
}
|
|
253
|
-
]
|
|
267
|
+
"^rotate$": {
|
|
268
|
+
"description": "This is the rotation angle for the entire avatar. This value can be an integer or a float. A value of 0 results in no rotation, while values between -360 and 360 define the degree of rotation in both directions. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.",
|
|
269
|
+
"allOf": [{ "$ref": "#/definitions/rotateOption" }]
|
|
254
270
|
},
|
|
255
|
-
"^
|
|
256
|
-
"description": "This is the
|
|
257
|
-
"
|
|
258
|
-
{
|
|
259
|
-
"$ref": "#/definitions/translate"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
"type": "array",
|
|
263
|
-
"items": {
|
|
264
|
-
"$ref": "#/definitions/translate"
|
|
265
|
-
},
|
|
266
|
-
"maxItems": 2
|
|
267
|
-
}
|
|
268
|
-
]
|
|
271
|
+
"^[a-z][a-zA-Z0-9]*Rotate$": {
|
|
272
|
+
"description": "This is the rotation angle for a specific avatar part, prefixed with the part name in camelCase. This value can be an integer or a float. A value of 0 results in no rotation, while values between -360 and 360 define the degree of rotation in both directions. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.",
|
|
273
|
+
"allOf": [{ "$ref": "#/definitions/rotateOption" }]
|
|
269
274
|
},
|
|
270
|
-
"^
|
|
271
|
-
"description": "This is the
|
|
272
|
-
"
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
275
|
+
"^translateY$": {
|
|
276
|
+
"description": "This is the vertical translation of the entire avatar. This value can be an integer or a float. A value of 0 results in no translation, while positive values move the avatar down and negative values move it up. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.",
|
|
277
|
+
"allOf": [{ "$ref": "#/definitions/translateOption" }]
|
|
278
|
+
},
|
|
279
|
+
"^[a-z][a-zA-Z0-9]*TranslateY$": {
|
|
280
|
+
"description": "This is the vertical translation of a specific avatar part, prefixed with the part name in camelCase. This value can be an integer or a float. A value of 0 results in no translation, while positive values move the part down and negative values move it up. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.",
|
|
281
|
+
"allOf": [{ "$ref": "#/definitions/translateOption" }]
|
|
282
|
+
},
|
|
283
|
+
"^translateX$": {
|
|
284
|
+
"description": "This is the horizontal translation of the entire avatar. This value can be an integer or a float. A value of 0 results in no translation, while positive values move the avatar to the right and negative values move it to the left. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.",
|
|
285
|
+
"allOf": [{ "$ref": "#/definitions/translateOption" }]
|
|
286
|
+
},
|
|
287
|
+
"^[a-z][a-zA-Z0-9]*TranslateX$": {
|
|
288
|
+
"description": "This is the horizontal translation of a specific avatar part, prefixed with the part name in camelCase. This value can be an integer or a float. A value of 0 results in no translation, while positive values move the part to the right and negative values move it to the left. If specified as an array, the PRNG will select a value within the specified range, including the values themselves.",
|
|
289
|
+
"allOf": [{ "$ref": "#/definitions/translateOption" }]
|
|
284
290
|
}
|
|
285
291
|
},
|
|
286
|
-
"
|
|
292
|
+
"propertyNames": { "maxLength": 128 },
|
|
293
|
+
"additionalProperties": false,
|
|
294
|
+
"maxProperties": 512
|
|
287
295
|
}
|