@dicebear/core 11.0.0-rc.1 → 11.0.0-rc.3

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.
@@ -3459,6 +3459,47 @@ const validate = (function () {
3459
3459
  }
3460
3460
  return errorCount === 0;
3461
3461
  };
3462
+ const ref21 = function validate(data) {
3463
+ validate.errors = null;
3464
+ let errorCount = 0;
3465
+ const err179 = validate.errors;
3466
+ const res179 = ref10(data);
3467
+ const suberr189 = ref10.errors;
3468
+ validate.errors = err179;
3469
+ if (!res179) {
3470
+ if (validate.errors === null)
3471
+ validate.errors = [];
3472
+ validate.errors.push(...suberr189.map(e => errorMerge(e, "#/allOf/0/$ref", "#")));
3473
+ errorCount++;
3474
+ }
3475
+ if (typeof data === "object" && data && !Array.isArray(data)) {
3476
+ if (data.animations !== undefined && hasOwn(data, "animations")) {
3477
+ if (validate.errors === null)
3478
+ validate.errors = [];
3479
+ validate.errors.push({ keywordLocation: "#/allOf/1/properties/animations", instanceLocation: "#/animations" });
3480
+ errorCount++;
3481
+ }
3482
+ if (data.children !== undefined && hasOwn(data, "children")) {
3483
+ if (Array.isArray(data.children)) {
3484
+ for (let o = 0; o < data.children.length; o++) {
3485
+ if (data.children[o] !== undefined && hasOwn(data.children, o)) {
3486
+ const err180 = validate.errors;
3487
+ const res180 = validate(data.children[o]);
3488
+ const suberr190 = validate.errors;
3489
+ validate.errors = err180;
3490
+ if (!res180) {
3491
+ if (validate.errors === null)
3492
+ validate.errors = [];
3493
+ validate.errors.push(...suberr190.map(e => errorMerge(e, "#/allOf/1/properties/children/items/$ref", "#/children/" + o)));
3494
+ errorCount++;
3495
+ }
3496
+ }
3497
+ }
3498
+ }
3499
+ }
3500
+ }
3501
+ return errorCount === 0;
3502
+ };
3462
3503
  const ref20 = function validate(data) {
3463
3504
  validate.errors = null;
3464
3505
  let errorCount = 0;
@@ -3559,6 +3600,54 @@ const validate = (function () {
3559
3600
  errorCount++;
3560
3601
  }
3561
3602
  }
3603
+ const sub31 = (() => {
3604
+ let errorCount = 0;
3605
+ if (!(data.name !== undefined && hasOwn(data, "name")))
3606
+ errorCount++;
3607
+ if (data.name !== undefined && hasOwn(data, "name")) {
3608
+ if (!(data.name === "clipPath" || data.name === "defs"))
3609
+ errorCount++;
3610
+ }
3611
+ return errorCount === 0;
3612
+ })();
3613
+ if (sub31) {
3614
+ if (data.children !== undefined && hasOwn(data, "children")) {
3615
+ if (Array.isArray(data.children)) {
3616
+ for (let n = 0; n < data.children.length; n++) {
3617
+ if (data.children[n] !== undefined && hasOwn(data.children, n)) {
3618
+ const err181 = validate.errors;
3619
+ const res181 = ref21(data.children[n]);
3620
+ const suberr191 = ref21.errors;
3621
+ validate.errors = err181;
3622
+ if (!res181) {
3623
+ if (validate.errors === null)
3624
+ validate.errors = [];
3625
+ validate.errors.push(...suberr191.map(e => errorMerge(e, "#/allOf/0/then/properties/children/items/$ref", "#/children/" + n)));
3626
+ errorCount++;
3627
+ }
3628
+ }
3629
+ }
3630
+ }
3631
+ }
3632
+ }
3633
+ const sub32 = (() => {
3634
+ let errorCount = 0;
3635
+ if (!(data.name !== undefined && hasOwn(data, "name")))
3636
+ errorCount++;
3637
+ if (data.name !== undefined && hasOwn(data, "name")) {
3638
+ if (!(data.name === "feBlend" || data.name === "feColorMatrix" || data.name === "feComponentTransfer" || data.name === "feComposite" || data.name === "feConvolveMatrix" || data.name === "feDiffuseLighting" || data.name === "feDisplacementMap" || data.name === "feDistantLight" || data.name === "feDropShadow" || data.name === "feFlood" || data.name === "feFuncA" || data.name === "feFuncB" || data.name === "feFuncG" || data.name === "feFuncR" || data.name === "feGaussianBlur" || data.name === "feImage" || data.name === "feMerge" || data.name === "feMergeNode" || data.name === "feMorphology" || data.name === "feOffset" || data.name === "fePointLight" || data.name === "feSpecularLighting" || data.name === "feSpotLight" || data.name === "feTile" || data.name === "feTurbulence" || data.name === "mpath" || data.name === "stop" || data.name === "textPath" || data.name === "tspan"))
3639
+ errorCount++;
3640
+ }
3641
+ return errorCount === 0;
3642
+ })();
3643
+ if (sub32) {
3644
+ if (data.animations !== undefined && hasOwn(data, "animations")) {
3645
+ if (validate.errors === null)
3646
+ validate.errors = [];
3647
+ validate.errors.push({ keywordLocation: "#/allOf/1/then/properties/animations", instanceLocation: "#/animations" });
3648
+ errorCount++;
3649
+ }
3650
+ }
3562
3651
  }
3563
3652
  return errorCount === 0;
3564
3653
  };
@@ -3613,14 +3702,14 @@ const validate = (function () {
3613
3702
  if (!sub29) {
3614
3703
  const sub30 = (() => {
3615
3704
  let errorCount = 0;
3616
- const err179 = validate.errors;
3617
- const res179 = ref20(data);
3618
- const suberr189 = ref20.errors;
3619
- validate.errors = err179;
3620
- if (!res179) {
3705
+ const err182 = validate.errors;
3706
+ const res182 = ref20(data);
3707
+ const suberr192 = ref20.errors;
3708
+ validate.errors = err182;
3709
+ if (!res182) {
3621
3710
  if (validate.errors === null)
3622
3711
  validate.errors = [];
3623
- validate.errors.push(...suberr189.map(e => errorMerge(e, "#/anyOf/3/$ref", "#")));
3712
+ validate.errors.push(...suberr192.map(e => errorMerge(e, "#/anyOf/3/$ref", "#")));
3624
3713
  errorCount++;
3625
3714
  }
3626
3715
  return errorCount === 0;
@@ -3638,7 +3727,7 @@ const validate = (function () {
3638
3727
  }
3639
3728
  return errorCount === 0;
3640
3729
  };
3641
- const ref22 = function validate(data) {
3730
+ const ref23 = function validate(data) {
3642
3731
  validate.errors = null;
3643
3732
  let errorCount = 0;
3644
3733
  if (!(typeof data === "number")) {
@@ -3663,7 +3752,7 @@ const validate = (function () {
3663
3752
  }
3664
3753
  return errorCount === 0;
3665
3754
  };
3666
- const ref23 = function validate(data) {
3755
+ const ref24 = function validate(data) {
3667
3756
  validate.errors = null;
3668
3757
  let errorCount = 0;
3669
3758
  if (!(typeof data === "object" && data && !Array.isArray(data))) {
@@ -3762,7 +3851,7 @@ const validate = (function () {
3762
3851
  }
3763
3852
  return errorCount === 0;
3764
3853
  };
3765
- const ref24 = function validate(data) {
3854
+ const ref25 = function validate(data) {
3766
3855
  validate.errors = null;
3767
3856
  let errorCount = 0;
3768
3857
  if (!(typeof data === "object" && data && !Array.isArray(data))) {
@@ -3861,7 +3950,7 @@ const validate = (function () {
3861
3950
  }
3862
3951
  return errorCount === 0;
3863
3952
  };
3864
- const ref26 = function validate(data) {
3953
+ const ref27 = function validate(data) {
3865
3954
  validate.errors = null;
3866
3955
  let errorCount = 0;
3867
3956
  if (!(typeof data === "object" && data && !Array.isArray(data))) {
@@ -3960,7 +4049,7 @@ const validate = (function () {
3960
4049
  }
3961
4050
  return errorCount === 0;
3962
4051
  };
3963
- const ref25 = function validate(data) {
4052
+ const ref26 = function validate(data) {
3964
4053
  validate.errors = null;
3965
4054
  let errorCount = 0;
3966
4055
  if (!(typeof data === "object" && data && !Array.isArray(data))) {
@@ -3971,26 +4060,26 @@ const validate = (function () {
3971
4060
  }
3972
4061
  else {
3973
4062
  if (data.x !== undefined && hasOwn(data, "x")) {
3974
- const err185 = validate.errors;
3975
- const res185 = ref26(data.x);
3976
- const suberr196 = ref26.errors;
3977
- validate.errors = err185;
3978
- if (!res185) {
4063
+ const err188 = validate.errors;
4064
+ const res188 = ref27(data.x);
4065
+ const suberr199 = ref27.errors;
4066
+ validate.errors = err188;
4067
+ if (!res188) {
3979
4068
  if (validate.errors === null)
3980
4069
  validate.errors = [];
3981
- validate.errors.push(...suberr196.map(e => errorMerge(e, "#/properties/x/$ref", "#/x")));
4070
+ validate.errors.push(...suberr199.map(e => errorMerge(e, "#/properties/x/$ref", "#/x")));
3982
4071
  errorCount++;
3983
4072
  }
3984
4073
  }
3985
4074
  if (data.y !== undefined && hasOwn(data, "y")) {
3986
- const err186 = validate.errors;
3987
- const res186 = ref26(data.y);
3988
- const suberr197 = ref26.errors;
3989
- validate.errors = err186;
3990
- if (!res186) {
4075
+ const err189 = validate.errors;
4076
+ const res189 = ref27(data.y);
4077
+ const suberr200 = ref27.errors;
4078
+ validate.errors = err189;
4079
+ if (!res189) {
3991
4080
  if (validate.errors === null)
3992
4081
  validate.errors = [];
3993
- validate.errors.push(...suberr197.map(e => errorMerge(e, "#/properties/y/$ref", "#/y")));
4082
+ validate.errors.push(...suberr200.map(e => errorMerge(e, "#/properties/y/$ref", "#/y")));
3994
4083
  errorCount++;
3995
4084
  }
3996
4085
  }
@@ -4062,7 +4151,7 @@ const validate = (function () {
4062
4151
  }
4063
4152
  return false;
4064
4153
  };
4065
- const ref21 = function validate(data) {
4154
+ const ref22 = function validate(data) {
4066
4155
  validate.errors = null;
4067
4156
  let errorCount = 0;
4068
4157
  if (!(typeof data === "object" && data && !Array.isArray(data))) {
@@ -4135,50 +4224,50 @@ const validate = (function () {
4135
4224
  }
4136
4225
  }
4137
4226
  if (data.probability !== undefined && hasOwn(data, "probability")) {
4138
- const err182 = validate.errors;
4139
- const res182 = ref22(data.probability);
4140
- const suberr193 = ref22.errors;
4141
- validate.errors = err182;
4142
- if (!res182) {
4227
+ const err185 = validate.errors;
4228
+ const res185 = ref23(data.probability);
4229
+ const suberr196 = ref23.errors;
4230
+ validate.errors = err185;
4231
+ if (!res185) {
4143
4232
  if (validate.errors === null)
4144
4233
  validate.errors = [];
4145
- validate.errors.push(...suberr193.map(e => errorMerge(e, "#/properties/probability/$ref", "#/probability")));
4234
+ validate.errors.push(...suberr196.map(e => errorMerge(e, "#/properties/probability/$ref", "#/probability")));
4146
4235
  errorCount++;
4147
4236
  }
4148
4237
  }
4149
4238
  if (data.rotate !== undefined && hasOwn(data, "rotate")) {
4150
- const err183 = validate.errors;
4151
- const res183 = ref23(data.rotate);
4152
- const suberr194 = ref23.errors;
4153
- validate.errors = err183;
4154
- if (!res183) {
4239
+ const err186 = validate.errors;
4240
+ const res186 = ref24(data.rotate);
4241
+ const suberr197 = ref24.errors;
4242
+ validate.errors = err186;
4243
+ if (!res186) {
4155
4244
  if (validate.errors === null)
4156
4245
  validate.errors = [];
4157
- validate.errors.push(...suberr194.map(e => errorMerge(e, "#/properties/rotate/$ref", "#/rotate")));
4246
+ validate.errors.push(...suberr197.map(e => errorMerge(e, "#/properties/rotate/$ref", "#/rotate")));
4158
4247
  errorCount++;
4159
4248
  }
4160
4249
  }
4161
4250
  if (data.scale !== undefined && hasOwn(data, "scale")) {
4162
- const err184 = validate.errors;
4163
- const res184 = ref24(data.scale);
4164
- const suberr195 = ref24.errors;
4165
- validate.errors = err184;
4166
- if (!res184) {
4251
+ const err187 = validate.errors;
4252
+ const res187 = ref25(data.scale);
4253
+ const suberr198 = ref25.errors;
4254
+ validate.errors = err187;
4255
+ if (!res187) {
4167
4256
  if (validate.errors === null)
4168
4257
  validate.errors = [];
4169
- validate.errors.push(...suberr195.map(e => errorMerge(e, "#/properties/scale/$ref", "#/scale")));
4258
+ validate.errors.push(...suberr198.map(e => errorMerge(e, "#/properties/scale/$ref", "#/scale")));
4170
4259
  errorCount++;
4171
4260
  }
4172
4261
  }
4173
4262
  if (data.translate !== undefined && hasOwn(data, "translate")) {
4174
- const err187 = validate.errors;
4175
- const res187 = ref25(data.translate);
4176
- const suberr198 = ref25.errors;
4177
- validate.errors = err187;
4178
- if (!res187) {
4263
+ const err190 = validate.errors;
4264
+ const res190 = ref26(data.translate);
4265
+ const suberr201 = ref26.errors;
4266
+ validate.errors = err190;
4267
+ if (!res190) {
4179
4268
  if (validate.errors === null)
4180
4269
  validate.errors = [];
4181
- validate.errors.push(...suberr198.map(e => errorMerge(e, "#/properties/translate/$ref", "#/translate")));
4270
+ validate.errors.push(...suberr201.map(e => errorMerge(e, "#/properties/translate/$ref", "#/translate")));
4182
4271
  errorCount++;
4183
4272
  }
4184
4273
  }
@@ -4197,14 +4286,14 @@ const validate = (function () {
4197
4286
  errorCount++;
4198
4287
  }
4199
4288
  for (const key27 of Object.keys(data.variants)) {
4200
- const err188 = validate.errors;
4201
- const res188 = ref7(key27);
4202
- const suberr199 = ref7.errors;
4203
- validate.errors = err188;
4204
- if (!res188) {
4289
+ const err191 = validate.errors;
4290
+ const res191 = ref7(key27);
4291
+ const suberr202 = ref7.errors;
4292
+ validate.errors = err191;
4293
+ if (!res191) {
4205
4294
  if (validate.errors === null)
4206
4295
  validate.errors = [];
4207
- validate.errors.push(...suberr199.map(e => errorMerge(e, "#/properties/variants/propertyNames/$ref", "#/variants/" + pointerPart(key27))));
4296
+ validate.errors.push(...suberr202.map(e => errorMerge(e, "#/properties/variants/propertyNames/$ref", "#/variants/" + pointerPart(key27))));
4208
4297
  errorCount++;
4209
4298
  }
4210
4299
  }
@@ -4236,16 +4325,16 @@ const validate = (function () {
4236
4325
  validate.errors.push({ keywordLocation: "#/properties/variants/additionalProperties/properties/elements/maxItems", instanceLocation: "#/variants/" + pointerPart(key28) + "/elements" });
4237
4326
  errorCount++;
4238
4327
  }
4239
- for (let n = 0; n < data.variants[key28].elements.length; n++) {
4240
- if (data.variants[key28].elements[n] !== undefined && hasOwn(data.variants[key28].elements, n)) {
4241
- const err189 = validate.errors;
4242
- const res189 = ref10(data.variants[key28].elements[n]);
4243
- const suberr200 = ref10.errors;
4244
- validate.errors = err189;
4245
- if (!res189) {
4328
+ for (let p = 0; p < data.variants[key28].elements.length; p++) {
4329
+ if (data.variants[key28].elements[p] !== undefined && hasOwn(data.variants[key28].elements, p)) {
4330
+ const err192 = validate.errors;
4331
+ const res192 = ref10(data.variants[key28].elements[p]);
4332
+ const suberr203 = ref10.errors;
4333
+ validate.errors = err192;
4334
+ if (!res192) {
4246
4335
  if (validate.errors === null)
4247
4336
  validate.errors = [];
4248
- validate.errors.push(...suberr200.map(e => errorMerge(e, "#/properties/variants/additionalProperties/properties/elements/items/$ref", "#/variants/" + pointerPart(key28) + "elements/" + n)));
4337
+ validate.errors.push(...suberr203.map(e => errorMerge(e, "#/properties/variants/additionalProperties/properties/elements/items/$ref", "#/variants/" + pointerPart(key28) + "elements/" + p)));
4249
4338
  errorCount++;
4250
4339
  }
4251
4340
  }
@@ -4289,27 +4378,27 @@ const validate = (function () {
4289
4378
  validate.errors.push({ keywordLocation: "#/properties/variants/additionalProperties/properties/tags/maxItems", instanceLocation: "#/variants/" + pointerPart(key28) + "/tags" });
4290
4379
  errorCount++;
4291
4380
  }
4292
- for (let o = 0; o < data.variants[key28].tags.length; o++) {
4293
- if (data.variants[key28].tags[o] !== undefined && hasOwn(data.variants[key28].tags, o)) {
4294
- if (!(typeof data.variants[key28].tags[o] === "string")) {
4381
+ for (let q = 0; q < data.variants[key28].tags.length; q++) {
4382
+ if (data.variants[key28].tags[q] !== undefined && hasOwn(data.variants[key28].tags, q)) {
4383
+ if (!(typeof data.variants[key28].tags[q] === "string")) {
4295
4384
  if (validate.errors === null)
4296
4385
  validate.errors = [];
4297
- validate.errors.push({ keywordLocation: "#/properties/variants/additionalProperties/properties/tags/items/type", instanceLocation: "#/variants/" + pointerPart(key28) + "tags/" + o });
4386
+ validate.errors.push({ keywordLocation: "#/properties/variants/additionalProperties/properties/tags/items/type", instanceLocation: "#/variants/" + pointerPart(key28) + "tags/" + q });
4298
4387
  errorCount++;
4299
4388
  }
4300
4389
  else {
4301
4390
  const prev16 = errorCount;
4302
- if (data.variants[key28].tags[o].length > 129 && stringLength(data.variants[key28].tags[o]) > 129) {
4391
+ if (data.variants[key28].tags[q].length > 129 && stringLength(data.variants[key28].tags[q]) > 129) {
4303
4392
  if (validate.errors === null)
4304
4393
  validate.errors = [];
4305
- validate.errors.push({ keywordLocation: "#/properties/variants/additionalProperties/properties/tags/items/maxLength", instanceLocation: "#/variants/" + pointerPart(key28) + "tags/" + o });
4394
+ validate.errors.push({ keywordLocation: "#/properties/variants/additionalProperties/properties/tags/items/maxLength", instanceLocation: "#/variants/" + pointerPart(key28) + "tags/" + q });
4306
4395
  errorCount++;
4307
4396
  }
4308
4397
  if (errorCount === prev16) {
4309
- if (!(pattern15.test(data.variants[key28].tags[o]))) {
4398
+ if (!(pattern15.test(data.variants[key28].tags[q]))) {
4310
4399
  if (validate.errors === null)
4311
4400
  validate.errors = [];
4312
- validate.errors.push({ keywordLocation: "#/properties/variants/additionalProperties/properties/tags/items/pattern", instanceLocation: "#/variants/" + pointerPart(key28) + "tags/" + o });
4401
+ validate.errors.push({ keywordLocation: "#/properties/variants/additionalProperties/properties/tags/items/pattern", instanceLocation: "#/variants/" + pointerPart(key28) + "tags/" + q });
4313
4402
  errorCount++;
4314
4403
  }
4315
4404
  }
@@ -4349,7 +4438,7 @@ const validate = (function () {
4349
4438
  }
4350
4439
  return errorCount === 0;
4351
4440
  };
4352
- const ref27 = function validate(data) {
4441
+ const ref28 = function validate(data) {
4353
4442
  validate.errors = null;
4354
4443
  let errorCount = 0;
4355
4444
  if (!(typeof data === "object" && data && !Array.isArray(data))) {
@@ -4366,14 +4455,14 @@ const validate = (function () {
4366
4455
  errorCount++;
4367
4456
  }
4368
4457
  if (data.extends !== undefined && hasOwn(data, "extends")) {
4369
- const err191 = validate.errors;
4370
- const res191 = ref13(data.extends);
4371
- const suberr202 = ref13.errors;
4372
- validate.errors = err191;
4373
- if (!res191) {
4458
+ const err194 = validate.errors;
4459
+ const res194 = ref13(data.extends);
4460
+ const suberr205 = ref13.errors;
4461
+ validate.errors = err194;
4462
+ if (!res194) {
4374
4463
  if (validate.errors === null)
4375
4464
  validate.errors = [];
4376
- validate.errors.push(...suberr202.map(e => errorMerge(e, "#/properties/extends/$ref", "#/extends")));
4465
+ validate.errors.push(...suberr205.map(e => errorMerge(e, "#/properties/extends/$ref", "#/extends")));
4377
4466
  errorCount++;
4378
4467
  }
4379
4468
  }
@@ -4389,7 +4478,7 @@ const validate = (function () {
4389
4478
  return errorCount === 0;
4390
4479
  };
4391
4480
  const pattern16 = new RegExp("^#([a-fA-F0-9]{3}|[a-fA-F0-9]{4}|[a-fA-F0-9]{6}|[a-fA-F0-9]{8})$", "u");
4392
- const ref28 = function validate(data) {
4481
+ const ref29 = function validate(data) {
4393
4482
  validate.errors = null;
4394
4483
  let errorCount = 0;
4395
4484
  if (!(typeof data === "string")) {
@@ -4707,14 +4796,14 @@ const validate = (function () {
4707
4796
  }
4708
4797
  for (let i = 0; i < data.canvas.elements.length; i++) {
4709
4798
  if (data.canvas.elements[i] !== undefined && hasOwn(data.canvas.elements, i)) {
4710
- const err180 = validate.errors;
4711
- const res180 = ref10(data.canvas.elements[i]);
4712
- const suberr190 = ref10.errors;
4713
- validate.errors = err180;
4714
- if (!res180) {
4799
+ const err183 = validate.errors;
4800
+ const res183 = ref10(data.canvas.elements[i]);
4801
+ const suberr193 = ref10.errors;
4802
+ validate.errors = err183;
4803
+ if (!res183) {
4715
4804
  if (validate.errors === null)
4716
4805
  validate.errors = [];
4717
- validate.errors.push(...suberr190.map(e => errorMerge(e, "#/properties/canvas/properties/elements/items/$ref", "#/canvas/elements/" + i)));
4806
+ validate.errors.push(...suberr193.map(e => errorMerge(e, "#/properties/canvas/properties/elements/items/$ref", "#/canvas/elements/" + i)));
4718
4807
  errorCount++;
4719
4808
  }
4720
4809
  }
@@ -4790,54 +4879,54 @@ const validate = (function () {
4790
4879
  errorCount++;
4791
4880
  }
4792
4881
  for (const key21 of Object.keys(data.components)) {
4793
- const err181 = validate.errors;
4794
- const res181 = ref7(key21);
4795
- const suberr191 = ref7.errors;
4796
- validate.errors = err181;
4797
- if (!res181) {
4882
+ const err184 = validate.errors;
4883
+ const res184 = ref7(key21);
4884
+ const suberr194 = ref7.errors;
4885
+ validate.errors = err184;
4886
+ if (!res184) {
4798
4887
  if (validate.errors === null)
4799
4888
  validate.errors = [];
4800
- validate.errors.push(...suberr191.map(e => errorMerge(e, "#/properties/components/propertyNames/$ref", "#/components/" + pointerPart(key21))));
4889
+ validate.errors.push(...suberr194.map(e => errorMerge(e, "#/properties/components/propertyNames/$ref", "#/components/" + pointerPart(key21))));
4801
4890
  errorCount++;
4802
4891
  }
4803
4892
  }
4804
4893
  for (const key22 of Object.keys(data.components)) {
4805
- let suberr192 = null;
4806
- const sub31 = (() => {
4894
+ let suberr195 = null;
4895
+ const sub33 = (() => {
4807
4896
  let errorCount = 0;
4808
- const err190 = validate.errors;
4809
- const res190 = ref21(data.components[key22]);
4810
- const suberr201 = ref21.errors;
4811
- validate.errors = err190;
4812
- if (!res190) {
4897
+ const err193 = validate.errors;
4898
+ const res193 = ref22(data.components[key22]);
4899
+ const suberr204 = ref22.errors;
4900
+ validate.errors = err193;
4901
+ if (!res193) {
4813
4902
  if (validate.errors === null)
4814
4903
  validate.errors = [];
4815
- validate.errors.push(...suberr201.map(e => errorMerge(e, "#/properties/components/additionalProperties/anyOf/0/$ref", "#/components/" + pointerPart(key22))));
4904
+ validate.errors.push(...suberr204.map(e => errorMerge(e, "#/properties/components/additionalProperties/anyOf/0/$ref", "#/components/" + pointerPart(key22))));
4816
4905
  errorCount++;
4817
4906
  }
4818
4907
  return errorCount === 0;
4819
4908
  })();
4820
- if (!sub31) {
4821
- const sub32 = (() => {
4909
+ if (!sub33) {
4910
+ const sub34 = (() => {
4822
4911
  let errorCount = 0;
4823
- const err192 = validate.errors;
4824
- const res192 = ref27(data.components[key22]);
4825
- const suberr203 = ref27.errors;
4826
- validate.errors = err192;
4827
- if (!res192) {
4912
+ const err195 = validate.errors;
4913
+ const res195 = ref28(data.components[key22]);
4914
+ const suberr206 = ref28.errors;
4915
+ validate.errors = err195;
4916
+ if (!res195) {
4828
4917
  if (validate.errors === null)
4829
4918
  validate.errors = [];
4830
- validate.errors.push(...suberr203.map(e => errorMerge(e, "#/properties/components/additionalProperties/anyOf/1/$ref", "#/components/" + pointerPart(key22))));
4919
+ validate.errors.push(...suberr206.map(e => errorMerge(e, "#/properties/components/additionalProperties/anyOf/1/$ref", "#/components/" + pointerPart(key22))));
4831
4920
  errorCount++;
4832
4921
  }
4833
4922
  return errorCount === 0;
4834
4923
  })();
4835
- if (!sub32) {
4924
+ if (!sub34) {
4836
4925
  if (validate.errors === null)
4837
4926
  validate.errors = [];
4838
4927
  validate.errors.push({ keywordLocation: "#/properties/components/additionalProperties/anyOf", instanceLocation: "#/components/" + pointerPart(key22) });
4839
- if (suberr192)
4840
- validate.errors.push(...suberr192);
4928
+ if (suberr195)
4929
+ validate.errors.push(...suberr195);
4841
4930
  errorCount++;
4842
4931
  }
4843
4932
  }
@@ -4859,14 +4948,14 @@ const validate = (function () {
4859
4948
  errorCount++;
4860
4949
  }
4861
4950
  for (const key32 of Object.keys(data.colors)) {
4862
- const err193 = validate.errors;
4863
- const res193 = ref7(key32);
4864
- const suberr204 = ref7.errors;
4865
- validate.errors = err193;
4866
- if (!res193) {
4951
+ const err196 = validate.errors;
4952
+ const res196 = ref7(key32);
4953
+ const suberr207 = ref7.errors;
4954
+ validate.errors = err196;
4955
+ if (!res196) {
4867
4956
  if (validate.errors === null)
4868
4957
  validate.errors = [];
4869
- validate.errors.push(...suberr204.map(e => errorMerge(e, "#/properties/colors/propertyNames/$ref", "#/colors/" + pointerPart(key32))));
4958
+ validate.errors.push(...suberr207.map(e => errorMerge(e, "#/properties/colors/propertyNames/$ref", "#/colors/" + pointerPart(key32))));
4870
4959
  errorCount++;
4871
4960
  }
4872
4961
  }
@@ -4904,16 +4993,16 @@ const validate = (function () {
4904
4993
  validate.errors.push({ keywordLocation: "#/properties/colors/additionalProperties/properties/values/minItems", instanceLocation: "#/colors/" + pointerPart(key33) + "/values" });
4905
4994
  errorCount++;
4906
4995
  }
4907
- for (let p = 0; p < data.colors[key33].values.length; p++) {
4908
- if (data.colors[key33].values[p] !== undefined && hasOwn(data.colors[key33].values, p)) {
4909
- const err194 = validate.errors;
4910
- const res194 = ref28(data.colors[key33].values[p]);
4911
- const suberr205 = ref28.errors;
4912
- validate.errors = err194;
4913
- if (!res194) {
4996
+ for (let r = 0; r < data.colors[key33].values.length; r++) {
4997
+ if (data.colors[key33].values[r] !== undefined && hasOwn(data.colors[key33].values, r)) {
4998
+ const err197 = validate.errors;
4999
+ const res197 = ref29(data.colors[key33].values[r]);
5000
+ const suberr208 = ref29.errors;
5001
+ validate.errors = err197;
5002
+ if (!res197) {
4914
5003
  if (validate.errors === null)
4915
5004
  validate.errors = [];
4916
- validate.errors.push(...suberr205.map(e => errorMerge(e, "#/properties/colors/additionalProperties/properties/values/items/$ref", "#/colors/" + pointerPart(key33) + "values/" + p)));
5005
+ validate.errors.push(...suberr208.map(e => errorMerge(e, "#/properties/colors/additionalProperties/properties/values/items/$ref", "#/colors/" + pointerPart(key33) + "values/" + r)));
4917
5006
  errorCount++;
4918
5007
  }
4919
5008
  }
@@ -4934,16 +5023,16 @@ const validate = (function () {
4934
5023
  validate.errors.push({ keywordLocation: "#/properties/colors/additionalProperties/properties/notEqualTo/maxItems", instanceLocation: "#/colors/" + pointerPart(key33) + "/notEqualTo" });
4935
5024
  errorCount++;
4936
5025
  }
4937
- for (let q = 0; q < data.colors[key33].notEqualTo.length; q++) {
4938
- if (data.colors[key33].notEqualTo[q] !== undefined && hasOwn(data.colors[key33].notEqualTo, q)) {
4939
- const err195 = validate.errors;
4940
- const res195 = ref6(data.colors[key33].notEqualTo[q]);
4941
- const suberr206 = ref6.errors;
4942
- validate.errors = err195;
4943
- if (!res195) {
5026
+ for (let s = 0; s < data.colors[key33].notEqualTo.length; s++) {
5027
+ if (data.colors[key33].notEqualTo[s] !== undefined && hasOwn(data.colors[key33].notEqualTo, s)) {
5028
+ const err198 = validate.errors;
5029
+ const res198 = ref6(data.colors[key33].notEqualTo[s]);
5030
+ const suberr209 = ref6.errors;
5031
+ validate.errors = err198;
5032
+ if (!res198) {
4944
5033
  if (validate.errors === null)
4945
5034
  validate.errors = [];
4946
- validate.errors.push(...suberr206.map(e => errorMerge(e, "#/properties/colors/additionalProperties/properties/notEqualTo/items/$ref", "#/colors/" + pointerPart(key33) + "notEqualTo/" + q)));
5035
+ validate.errors.push(...suberr209.map(e => errorMerge(e, "#/properties/colors/additionalProperties/properties/notEqualTo/items/$ref", "#/colors/" + pointerPart(key33) + "notEqualTo/" + s)));
4947
5036
  errorCount++;
4948
5037
  }
4949
5038
  }
@@ -4951,14 +5040,14 @@ const validate = (function () {
4951
5040
  }
4952
5041
  }
4953
5042
  if (data.colors[key33].contrastTo !== undefined && hasOwn(data.colors[key33], "contrastTo")) {
4954
- const err196 = validate.errors;
4955
- const res196 = ref6(data.colors[key33].contrastTo);
4956
- const suberr207 = ref6.errors;
4957
- validate.errors = err196;
4958
- if (!res196) {
5043
+ const err199 = validate.errors;
5044
+ const res199 = ref6(data.colors[key33].contrastTo);
5045
+ const suberr210 = ref6.errors;
5046
+ validate.errors = err199;
5047
+ if (!res199) {
4959
5048
  if (validate.errors === null)
4960
5049
  validate.errors = [];
4961
- validate.errors.push(...suberr207.map(e => errorMerge(e, "#/properties/colors/additionalProperties/properties/contrastTo/$ref", "#/colors/" + pointerPart(key33) + "/contrastTo")));
5050
+ validate.errors.push(...suberr210.map(e => errorMerge(e, "#/properties/colors/additionalProperties/properties/contrastTo/$ref", "#/colors/" + pointerPart(key33) + "/contrastTo")));
4962
5051
  errorCount++;
4963
5052
  }
4964
5053
  }
package/lib/index.d.ts CHANGED
@@ -1,5 +1,22 @@
1
- export { Style, type StyleDefinition } from './Style.js';
2
- export { Avatar } from './Avatar.js';
3
- export { Color } from './Utils/Color.js';
1
+ import { Style as StyleBase, type StyleDefinition } from './Style.js';
2
+ import { Avatar as AvatarBase } from './Avatar.js';
3
+ import type { StyleOptions } from './StyleOptions.js';
4
+ /**
5
+ * A style whose definition is checked against the definition schema before
6
+ * it is parsed. `@dicebear/core/lite` exports the same class without the
7
+ * check, for definitions that come from your own code.
8
+ */
9
+ export declare class Style<D = unknown> extends StyleBase<D> {
10
+ constructor(data: D);
11
+ }
12
+ /**
13
+ * An avatar whose options are checked against the options schema before it
14
+ * renders. `@dicebear/core/lite` exports the same class without the check,
15
+ * for options that come from your own code.
16
+ */
17
+ export declare class Avatar<D = unknown> extends AvatarBase<D> {
18
+ constructor(style: StyleBase<D>, optionsInput?: StyleOptions<D>);
19
+ }
20
+ export type { StyleDefinition };
4
21
  export { OptionsDescriptor } from './OptionsDescriptor.js';
5
22
  export type { StyleOptions } from './StyleOptions.js';