@eslint-react/core 1.43.2-next.1 → 1.43.2-next.2

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 (3) hide show
  1. package/dist/index.js +505 -19
  2. package/dist/index.mjs +505 -19
  3. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -35,9 +35,13 @@ var JSX3__namespace = /*#__PURE__*/_interopNamespace(JSX3);
35
35
  var VAR__namespace = /*#__PURE__*/_interopNamespace(VAR);
36
36
  var birecord__default = /*#__PURE__*/_interopDefault(birecord);
37
37
 
38
- // src/component/component-collector.ts
38
+ var __defProp = Object.defineProperty;
39
+ var __export = (target, all) => {
40
+ for (var name in all)
41
+ __defProp(target, name, { get: all[name], enumerable: true });
42
+ };
39
43
 
40
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/core.js
44
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/core.js
41
45
  // @__NO_SIDE_EFFECTS__
42
46
  function $constructor(name, initializer) {
43
47
  class _6 {
@@ -78,6 +82,87 @@ var globalConfig = {};
78
82
  function config(config2) {
79
83
  return globalConfig;
80
84
  }
85
+
86
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/util.js
87
+ var util_exports = {};
88
+ __export(util_exports, {
89
+ BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
90
+ NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
91
+ aborted: () => aborted,
92
+ allowsEval: () => allowsEval,
93
+ assert: () => assert,
94
+ assertEqual: () => assertEqual,
95
+ assertIs: () => assertIs,
96
+ assertNever: () => assertNever,
97
+ assertNotEqual: () => assertNotEqual,
98
+ assignProp: () => assignProp,
99
+ cached: () => cached,
100
+ cleanInterfaceKey: () => cleanInterfaceKey,
101
+ cleanInterfaceShape: () => cleanInterfaceShape,
102
+ cleanRegex: () => cleanRegex,
103
+ clone: () => clone,
104
+ createTransparentProxy: () => createTransparentProxy,
105
+ defineLazy: () => defineLazy,
106
+ esc: () => esc,
107
+ escapeRegex: () => escapeRegex,
108
+ extend: () => extend,
109
+ extendObjectLike: () => extendObjectLike,
110
+ finalizeIssue: () => finalizeIssue,
111
+ floatSafeRemainder: () => floatSafeRemainder,
112
+ getElementAtPath: () => getElementAtPath,
113
+ getLengthableOrigin: () => getLengthableOrigin,
114
+ getParsedType: () => getParsedType,
115
+ getSizableOrigin: () => getSizableOrigin,
116
+ getValidEnumValues: () => getValidEnumValues,
117
+ isObject: () => isObject,
118
+ isPlainObject: () => isPlainObject,
119
+ issue: () => issue,
120
+ joinValues: () => joinValues,
121
+ jsonStringifyReplacer: () => jsonStringifyReplacer,
122
+ mergeObjectLike: () => mergeObjectLike,
123
+ normalizeObjectLikeDef: () => normalizeObjectLikeDef,
124
+ normalizeParams: () => normalizeParams,
125
+ nullish: () => nullish,
126
+ numKeys: () => numKeys,
127
+ omit: () => omit,
128
+ optionalInterfaceKeys: () => optionalInterfaceKeys,
129
+ optionalObjectKeys: () => optionalObjectKeys,
130
+ partialObjectLike: () => partialObjectLike,
131
+ pick: () => pick,
132
+ prefixIssues: () => prefixIssues,
133
+ primitiveTypes: () => primitiveTypes,
134
+ promiseAllObject: () => promiseAllObject,
135
+ propertyKeyTypes: () => propertyKeyTypes,
136
+ randomString: () => randomString,
137
+ requiredObjectLike: () => requiredObjectLike,
138
+ splitChecksAndParams: () => splitChecksAndParams,
139
+ stringifyPrimitive: () => stringifyPrimitive,
140
+ unwrapMessage: () => unwrapMessage
141
+ });
142
+ function assertEqual(val) {
143
+ return val;
144
+ }
145
+ function assertNotEqual(val) {
146
+ return val;
147
+ }
148
+ function assertIs(_arg) {
149
+ }
150
+ function assertNever(_x) {
151
+ throw new Error();
152
+ }
153
+ function assert(_6) {
154
+ }
155
+ function getValidEnumValues(obj) {
156
+ const validKeys = Object.keys(obj).filter((k) => typeof obj[obj[k]] !== "number");
157
+ const filtered = {};
158
+ for (const k of validKeys) {
159
+ filtered[k] = obj[k];
160
+ }
161
+ return Object.values(filtered);
162
+ }
163
+ function joinValues(array2, separator = "|") {
164
+ return array2.map((val) => stringifyPrimitive(val)).join(separator);
165
+ }
81
166
  function jsonStringifyReplacer(_6, value) {
82
167
  if (typeof value === "bigint")
83
168
  return value.toString();
@@ -94,11 +179,22 @@ function cached(getter) {
94
179
  }
95
180
  };
96
181
  }
182
+ function nullish(input) {
183
+ return input === null || input === void 0;
184
+ }
97
185
  function cleanRegex(source) {
98
186
  const start = source.startsWith("^") ? 1 : 0;
99
187
  const end = source.endsWith("$") ? source.length - 1 : source.length;
100
188
  return source.slice(start, end);
101
189
  }
190
+ function floatSafeRemainder(val, step) {
191
+ const valDecCount = (val.toString().split(".")[1] || "").length;
192
+ const stepDecCount = (step.toString().split(".")[1] || "").length;
193
+ const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
194
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
195
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
196
+ return valInt % stepInt / 10 ** decCount;
197
+ }
102
198
  function defineLazy(object2, key, getter) {
103
199
  Object.defineProperty(object2, key, {
104
200
  get() {
@@ -117,6 +213,30 @@ function defineLazy(object2, key, getter) {
117
213
  configurable: true
118
214
  });
119
215
  }
216
+ function assignProp(target, prop, value) {
217
+ Object.defineProperty(target, prop, {
218
+ value,
219
+ writable: true,
220
+ enumerable: true,
221
+ configurable: true
222
+ });
223
+ }
224
+ function getElementAtPath(obj, path) {
225
+ if (!path)
226
+ return obj;
227
+ return path.reduce((acc, key) => acc?.[key], obj);
228
+ }
229
+ function promiseAllObject(promisesObj) {
230
+ const keys = Object.keys(promisesObj);
231
+ const promises = keys.map((key) => promisesObj[key]);
232
+ return Promise.all(promises).then((results) => {
233
+ const resolvedObj = {};
234
+ for (let i = 0; i < keys.length; i++) {
235
+ resolvedObj[keys[i]] = results[i];
236
+ }
237
+ return resolvedObj;
238
+ });
239
+ }
120
240
  function randomString(length = 10) {
121
241
  const chars = "abcdefghijklmnopqrstuvwxyz";
122
242
  let str = "";
@@ -139,9 +259,78 @@ var allowsEval = cached(() => {
139
259
  return false;
140
260
  }
141
261
  });
262
+ function isPlainObject(data) {
263
+ return typeof data === "object" && data !== null && Object.getPrototypeOf(data) === Object.prototype;
264
+ }
265
+ function numKeys(data) {
266
+ let keyCount = 0;
267
+ for (const key in data) {
268
+ if (Object.prototype.hasOwnProperty.call(data, key)) {
269
+ keyCount++;
270
+ }
271
+ }
272
+ return keyCount;
273
+ }
274
+ var getParsedType = (data) => {
275
+ const t = typeof data;
276
+ switch (t) {
277
+ case "undefined":
278
+ return "undefined";
279
+ case "string":
280
+ return "string";
281
+ case "number":
282
+ return Number.isNaN(data) ? "nan" : "number";
283
+ case "boolean":
284
+ return "boolean";
285
+ case "function":
286
+ return "function";
287
+ case "bigint":
288
+ return "bigint";
289
+ case "symbol":
290
+ return "symbol";
291
+ case "object":
292
+ if (Array.isArray(data)) {
293
+ return "array";
294
+ }
295
+ if (data === null) {
296
+ return "null";
297
+ }
298
+ if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
299
+ return "promise";
300
+ }
301
+ if (typeof Map !== "undefined" && data instanceof Map) {
302
+ return "map";
303
+ }
304
+ if (typeof Set !== "undefined" && data instanceof Set) {
305
+ return "set";
306
+ }
307
+ if (typeof Date !== "undefined" && data instanceof Date) {
308
+ return "date";
309
+ }
310
+ if (typeof File !== "undefined" && data instanceof File) {
311
+ return "file";
312
+ }
313
+ return "object";
314
+ default:
315
+ throw new Error(`Unknown data type: ${t}`);
316
+ }
317
+ };
318
+ var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
319
+ var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
320
+ function escapeRegex(str) {
321
+ return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
322
+ }
142
323
  function clone(inst, def) {
143
324
  return new inst._zod.constr(def);
144
325
  }
326
+ function splitChecksAndParams(_paramsOrChecks, _checks) {
327
+ const params = Array.isArray(_paramsOrChecks) ? {} : _paramsOrChecks ?? {};
328
+ const checks = Array.isArray(_paramsOrChecks) ? _paramsOrChecks : _checks ?? [];
329
+ return {
330
+ checks,
331
+ params
332
+ };
333
+ }
145
334
  function normalizeParams(_params) {
146
335
  const params = _params;
147
336
  if (!params)
@@ -158,11 +347,267 @@ function normalizeParams(_params) {
158
347
  return { ...params, error: () => params.error };
159
348
  return params;
160
349
  }
350
+ function createTransparentProxy(getter) {
351
+ let target;
352
+ return new Proxy({}, {
353
+ get(_6, prop, receiver) {
354
+ target ?? (target = getter());
355
+ return Reflect.get(target, prop, receiver);
356
+ },
357
+ set(_6, prop, value, receiver) {
358
+ target ?? (target = getter());
359
+ return Reflect.set(target, prop, value, receiver);
360
+ },
361
+ has(_6, prop) {
362
+ target ?? (target = getter());
363
+ return Reflect.has(target, prop);
364
+ },
365
+ deleteProperty(_6, prop) {
366
+ target ?? (target = getter());
367
+ return Reflect.deleteProperty(target, prop);
368
+ },
369
+ ownKeys(_6) {
370
+ target ?? (target = getter());
371
+ return Reflect.ownKeys(target);
372
+ },
373
+ getOwnPropertyDescriptor(_6, prop) {
374
+ target ?? (target = getter());
375
+ return Reflect.getOwnPropertyDescriptor(target, prop);
376
+ },
377
+ defineProperty(_6, prop, descriptor) {
378
+ target ?? (target = getter());
379
+ return Reflect.defineProperty(target, prop, descriptor);
380
+ }
381
+ // apply(target, thisArg, args) {
382
+ // return Reflect.apply(target, thisArg, args);
383
+ // },
384
+ // construct(target, args, newTarget) {
385
+ // return Reflect.construct(target, args, newTarget);
386
+ // },
387
+ });
388
+ }
389
+ function stringifyPrimitive(value) {
390
+ if (typeof value === "bigint")
391
+ return value.toString() + "n";
392
+ if (typeof value === "string")
393
+ return `"${value}"`;
394
+ return `${value}`;
395
+ }
161
396
  function optionalObjectKeys(shape) {
162
397
  return Object.keys(shape).filter((k) => {
163
398
  return shape[k]._zod.qout === "true";
164
399
  });
165
400
  }
401
+ function optionalInterfaceKeys(shape) {
402
+ return Object.keys(shape).filter((k) => {
403
+ return k.endsWith("?");
404
+ }).map((k) => k.replace(/\?$/, ""));
405
+ }
406
+ function cleanInterfaceKey(key) {
407
+ return key.replace(/^\?/, "").replace(/\?$/, "");
408
+ }
409
+ function cleanInterfaceShape(_shape) {
410
+ const keyMap = {};
411
+ const shape = {};
412
+ const optional2 = [];
413
+ const defaulted = [];
414
+ for (const [key, value] of Object.entries(_shape)) {
415
+ if (key.endsWith("?"))
416
+ optional2.push(key.slice(0, -1));
417
+ if (key.startsWith("?"))
418
+ defaulted.push(key.slice(1));
419
+ const cleanKey = cleanInterfaceKey(key);
420
+ shape[cleanKey] = value;
421
+ keyMap[cleanKey] = key;
422
+ }
423
+ return { shape, keyMap, optional: optional2, defaulted };
424
+ }
425
+ var NUMBER_FORMAT_RANGES = {
426
+ safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
427
+ int32: [-2147483648, 2147483647],
428
+ uint32: [0, 4294967295],
429
+ float32: [-34028234663852886e22, 34028234663852886e22],
430
+ float64: [-17976931348623157e292, 17976931348623157e292]
431
+ };
432
+ var BIGINT_FORMAT_RANGES = {
433
+ int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
434
+ uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
435
+ };
436
+ function pick(schema, mask) {
437
+ const newShape = {};
438
+ const newOptional = [];
439
+ const currShape = schema._zod.def.shape;
440
+ const currOptional = new Set(schema._zod.def.optional);
441
+ for (const key in mask) {
442
+ if (!(key in currShape)) {
443
+ throw new Error(`Unrecognized key: "${key}"`);
444
+ }
445
+ if (!mask[key])
446
+ continue;
447
+ newShape[key] = currShape[key];
448
+ if (currOptional.has(key)) {
449
+ newOptional.push(key);
450
+ }
451
+ }
452
+ return clone(schema, {
453
+ ...schema._zod.def,
454
+ shape: newShape,
455
+ optional: newOptional,
456
+ checks: []
457
+ });
458
+ }
459
+ function omit(schema, mask) {
460
+ const newShape = { ...schema._zod.def.shape };
461
+ const newOptional = new Set(schema._zod.def.optional);
462
+ for (const key in mask) {
463
+ if (!(key in schema._zod.def.shape)) {
464
+ throw new Error(`Unrecognized key: "${key}"`);
465
+ }
466
+ if (!mask[key])
467
+ continue;
468
+ delete newShape[key];
469
+ newOptional.delete(key);
470
+ }
471
+ return clone(schema, {
472
+ ...schema._zod.def,
473
+ shape: newShape,
474
+ optional: [...newOptional],
475
+ checks: []
476
+ });
477
+ }
478
+ function extend(schema, shape) {
479
+ const def = {
480
+ ...schema._zod.def,
481
+ get shape() {
482
+ const _shape = { ...schema._zod.def.shape, ...shape };
483
+ assignProp(this, "shape", _shape);
484
+ return _shape;
485
+ },
486
+ checks: []
487
+ // delete existing checks
488
+ };
489
+ defineLazy(def, "shape", () => ({ ...schema._zod.def.shape, ...shape }));
490
+ return clone(schema, def);
491
+ }
492
+ function mergeObjectLike(a, b) {
493
+ const bKeys = new Set(Object.keys(b._zod.def.shape));
494
+ const optional2 = [...a._zod.def.optional.filter((k) => !bKeys.has(k)), ...b._zod.def.optional];
495
+ return clone(a, {
496
+ ...a._zod.def,
497
+ get shape() {
498
+ const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
499
+ assignProp(this, "shape", _shape);
500
+ return _shape;
501
+ },
502
+ optional: optional2,
503
+ catchall: b._zod.def.catchall,
504
+ checks: []
505
+ // delete existing checks
506
+ });
507
+ }
508
+ function extendObjectLike(a, b) {
509
+ const bKeys = new Set(Object.keys(b._zod.def.shape));
510
+ const optional2 = [...a._zod.def.optional.filter((k) => !bKeys.has(k)), ...b._zod.def.optional];
511
+ return clone(a, {
512
+ ...a._zod.def,
513
+ get shape() {
514
+ const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
515
+ assignProp(this, "shape", _shape);
516
+ return _shape;
517
+ },
518
+ optional: optional2,
519
+ checks: []
520
+ // delete existent checks
521
+ });
522
+ }
523
+ function partialObjectLike(Class, schema, mask) {
524
+ const shape = { ...schema._zod.def.shape };
525
+ const optional2 = new Set(schema._zod.def.optional);
526
+ if (mask) {
527
+ for (const key in mask) {
528
+ if (!(key in shape)) {
529
+ throw new Error(`Unrecognized key: "${key}"`);
530
+ }
531
+ if (!mask[key])
532
+ continue;
533
+ shape[key] = new Class({
534
+ type: "optional",
535
+ innerType: schema._zod.def.shape[key]
536
+ });
537
+ optional2.add(key);
538
+ }
539
+ } else {
540
+ for (const key in schema._zod.def.shape) {
541
+ shape[key] = new Class({
542
+ type: "optional",
543
+ innerType: schema._zod.def.shape[key]
544
+ });
545
+ optional2.add(key);
546
+ }
547
+ }
548
+ return clone(schema, {
549
+ ...schema._zod.def,
550
+ shape,
551
+ optional: [...optional2],
552
+ checks: []
553
+ });
554
+ }
555
+ function requiredObjectLike(Class, schema, mask) {
556
+ const shape = { ...schema._zod.def.shape };
557
+ if (mask) {
558
+ for (const key in mask) {
559
+ if (!(key in shape)) {
560
+ throw new Error(`Unrecognized key: "${key}"`);
561
+ }
562
+ if (!mask[key])
563
+ continue;
564
+ shape[key] = new Class({
565
+ type: "nonoptional",
566
+ innerType: schema._zod.def.shape[key]
567
+ });
568
+ }
569
+ } else {
570
+ for (const key in schema._zod.def.shape) {
571
+ shape[key] = new Class({
572
+ type: "nonoptional",
573
+ innerType: schema._zod.def.shape[key]
574
+ });
575
+ }
576
+ }
577
+ return clone(schema, {
578
+ ...schema._zod.def,
579
+ shape,
580
+ optional: [],
581
+ checks: []
582
+ });
583
+ }
584
+ function normalizeObjectLikeDef(def) {
585
+ if (def.type === "interface") {
586
+ const keys = Object.keys(def.shape);
587
+ const keySet = new Set(Object.keys(def.shape));
588
+ return {
589
+ shape: { ...def.shape },
590
+ // resolve getters
591
+ keys,
592
+ keySet,
593
+ numKeys: keys.length,
594
+ optionalKeys: new Set(def.optional)
595
+ };
596
+ }
597
+ if (def.type === "object") {
598
+ const keys = Object.keys(def.shape);
599
+ const keySet = new Set(Object.keys(def.shape));
600
+ return {
601
+ shape: { ...def.shape },
602
+ // resolve getters
603
+ keys,
604
+ keySet,
605
+ numKeys: keys.length,
606
+ optionalKeys: new Set(def.optional)
607
+ };
608
+ }
609
+ throw new Error("Invalid object-like type");
610
+ }
166
611
  function aborted(x, startIndex = 0) {
167
612
  for (let i = startIndex; i < x.issues.length; i++) {
168
613
  if (x.issues[i].continue !== true)
@@ -194,8 +639,36 @@ function finalizeIssue(iss, ctx, config2) {
194
639
  }
195
640
  return full;
196
641
  }
642
+ function getSizableOrigin(input) {
643
+ if (input instanceof Set)
644
+ return "set";
645
+ if (input instanceof Map)
646
+ return "map";
647
+ if (input instanceof File)
648
+ return "file";
649
+ return "unknown";
650
+ }
651
+ function getLengthableOrigin(input) {
652
+ if (Array.isArray(input))
653
+ return "array";
654
+ if (typeof input === "string")
655
+ return "string";
656
+ return "unknown";
657
+ }
658
+ function issue(...args) {
659
+ const [iss, input, inst] = args;
660
+ if (typeof iss === "string") {
661
+ return {
662
+ message: iss,
663
+ code: "custom",
664
+ input,
665
+ inst
666
+ };
667
+ }
668
+ return { ...iss };
669
+ }
197
670
 
198
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/errors.js
671
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/errors.js
199
672
  var ZOD_ERROR = Symbol.for("{{zod.error}}");
200
673
  var $ZodError = class {
201
674
  get message() {
@@ -212,7 +685,7 @@ var $ZodError = class {
212
685
  }
213
686
  };
214
687
 
215
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/parse.js
688
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/parse.js
216
689
  function _parse(schema, value, _ctx) {
217
690
  const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
218
691
  const result = schema._zod.run({ value, issues: [] }, ctx);
@@ -264,7 +737,7 @@ var string = (params) => {
264
737
  };
265
738
  var boolean = /true|false/i;
266
739
 
267
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/doc.js
740
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/doc.js
268
741
  var Doc = class {
269
742
  constructor(args) {
270
743
  this.content = [];
@@ -296,13 +769,21 @@ var Doc = class {
296
769
  }
297
770
  };
298
771
 
299
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/schemas.js
772
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/versions.js
773
+ var version = {
774
+ major: 0,
775
+ minor: 3,
776
+ patch: 3
777
+ };
778
+
779
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/schemas.js
300
780
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
301
781
  var _a;
302
782
  inst ?? (inst = {});
303
783
  inst._zod.id = def.type + "_" + randomString(10);
304
784
  inst._zod.def = def;
305
785
  inst._zod.computed = inst._zod.computed || {};
786
+ inst._zod.version = version;
306
787
  const checks = [...inst._zod.def.checks ?? []];
307
788
  def.type;
308
789
  if (inst._zod.traits.has("$ZodCheck")) {
@@ -370,7 +851,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
370
851
  return runChecks(result, checks, ctx);
371
852
  };
372
853
  }
373
- defineLazy(inst, "~standard", () => ({
854
+ inst["~standard"] = {
374
855
  validate: (value) => {
375
856
  const result = inst._zod.run({ value, issues: [] }, {});
376
857
  if (result instanceof Promise) {
@@ -386,7 +867,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
386
867
  },
387
868
  vendor: "zod",
388
869
  version: 1
389
- }));
870
+ };
390
871
  });
391
872
  var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
392
873
  $ZodType.init(inst, def);
@@ -591,7 +1072,9 @@ var $ZodObjectLike = /* @__PURE__ */ $constructor("$ZodObjectLike", (inst, def)
591
1072
  const fastEnabled = allowsEval.value;
592
1073
  const isObject2 = isObject;
593
1074
  const { catchall } = def;
1075
+ let value;
594
1076
  inst._zod.parse = (payload, ctx) => {
1077
+ value ?? (value = _normalized.value);
595
1078
  const input = payload.value;
596
1079
  if (!isObject2(input)) {
597
1080
  payload.issues.push({
@@ -609,7 +1092,7 @@ var $ZodObjectLike = /* @__PURE__ */ $constructor("$ZodObjectLike", (inst, def)
609
1092
  payload = fastpass(payload, ctx);
610
1093
  } else {
611
1094
  payload.value = {};
612
- const { keys, shape, optionalKeys } = _normalized.value;
1095
+ const { keys, shape, optionalKeys } = value;
613
1096
  for (const key of keys) {
614
1097
  const valueSchema = shape[key];
615
1098
  const r = valueSchema._zod.run({ value: input[key], issues: [] }, ctx);
@@ -629,14 +1112,17 @@ var $ZodObjectLike = /* @__PURE__ */ $constructor("$ZodObjectLike", (inst, def)
629
1112
  return proms.length ? Promise.all(proms).then(() => payload) : payload;
630
1113
  }
631
1114
  const unrecognized = [];
1115
+ const keySet = value.keySet;
1116
+ const _catchall = catchall._zod;
1117
+ const t = _catchall.def.type;
632
1118
  for (const key of Object.keys(input)) {
633
- if (_normalized.value.keySet.has(key))
1119
+ if (keySet.has(key))
634
1120
  continue;
635
- if (catchall._zod.def.type === "never") {
1121
+ if (t === "never") {
636
1122
  unrecognized.push(key);
637
1123
  continue;
638
1124
  }
639
- const r = catchall._zod.run({ value: input[key], issues: [] }, ctx);
1125
+ const r = _catchall.run({ value: input[key], issues: [] }, ctx);
640
1126
  if (r instanceof Promise) {
641
1127
  proms.push(r.then((r2) => handleObjectResult(r2, payload, key)));
642
1128
  } else {
@@ -677,7 +1163,7 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
677
1163
  };
678
1164
  });
679
1165
 
680
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/api.js
1166
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/api.js
681
1167
  function _string(Class, params) {
682
1168
  return new Class({
683
1169
  type: "string",
@@ -691,7 +1177,7 @@ function _boolean(Class, params) {
691
1177
  });
692
1178
  }
693
1179
 
694
- // ../../node_modules/.pnpm/@zod+mini@4.0.0-beta.0/node_modules/@zod/mini/dist/esm/parse.js
1180
+ // ../../node_modules/.pnpm/@zod+mini@4.0.0-beta.20250411T005215_60e10b0f348e07070e4d24639ea7d4ee/node_modules/@zod/mini/dist/esm/parse.js
695
1181
  var parse2 = /* @__PURE__ */ _parse.bind({ Error: $ZodError });
696
1182
  var safeParse = /* @__PURE__ */ _safeParse.bind({ Error: $ZodError });
697
1183
  var parseAsync2 = /* @__PURE__ */ _parseAsync.bind({ Error: $ZodError });
@@ -699,7 +1185,7 @@ var safeParseAsync = /* @__PURE__ */ _safeParseAsync.bind({
699
1185
  Error: $ZodError
700
1186
  });
701
1187
 
702
- // ../../node_modules/.pnpm/@zod+mini@4.0.0-beta.0/node_modules/@zod/mini/dist/esm/schemas.js
1188
+ // ../../node_modules/.pnpm/@zod+mini@4.0.0-beta.20250411T005215_60e10b0f348e07070e4d24639ea7d4ee/node_modules/@zod/mini/dist/esm/schemas.js
703
1189
  var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
704
1190
  if (!inst._zod)
705
1191
  throw new Error("Uninitialized schema in mixin ZodMiniType.");
@@ -750,7 +1236,7 @@ function array(element, params) {
750
1236
  // get element() {
751
1237
  // return element;
752
1238
  // },
753
- ...normalizeParams(params)
1239
+ ...util_exports.normalizeParams(params)
754
1240
  });
755
1241
  }
756
1242
  var ZodMiniObject = /* @__PURE__ */ $constructor("ZodMiniObject", (inst, def) => {
@@ -762,9 +1248,9 @@ function object(shape, params) {
762
1248
  type: "object",
763
1249
  shape: shape ?? {},
764
1250
  get optional() {
765
- return optionalObjectKeys(shape ?? {});
1251
+ return util_exports.optionalObjectKeys(shape ?? {});
766
1252
  },
767
- ...normalizeParams(params)
1253
+ ...util_exports.normalizeParams(params)
768
1254
  };
769
1255
  return new ZodMiniObject(def);
770
1256
  }
@@ -776,7 +1262,7 @@ function optional(innerType, params) {
776
1262
  return new ZodMiniOptional({
777
1263
  type: "optional",
778
1264
  innerType,
779
- ...normalizeParams(params)
1265
+ ...util_exports.normalizeParams(params)
780
1266
  });
781
1267
  }
782
1268
 
package/dist/index.mjs CHANGED
@@ -8,9 +8,13 @@ import * as VAR from '@eslint-react/var';
8
8
  import { isMatching, P, match } from 'ts-pattern';
9
9
  import birecord from 'birecord';
10
10
 
11
- // src/component/component-collector.ts
11
+ var __defProp = Object.defineProperty;
12
+ var __export = (target, all) => {
13
+ for (var name in all)
14
+ __defProp(target, name, { get: all[name], enumerable: true });
15
+ };
12
16
 
13
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/core.js
17
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/core.js
14
18
  // @__NO_SIDE_EFFECTS__
15
19
  function $constructor(name, initializer) {
16
20
  class _6 {
@@ -51,6 +55,87 @@ var globalConfig = {};
51
55
  function config(config2) {
52
56
  return globalConfig;
53
57
  }
58
+
59
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/util.js
60
+ var util_exports = {};
61
+ __export(util_exports, {
62
+ BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
63
+ NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
64
+ aborted: () => aborted,
65
+ allowsEval: () => allowsEval,
66
+ assert: () => assert,
67
+ assertEqual: () => assertEqual,
68
+ assertIs: () => assertIs,
69
+ assertNever: () => assertNever,
70
+ assertNotEqual: () => assertNotEqual,
71
+ assignProp: () => assignProp,
72
+ cached: () => cached,
73
+ cleanInterfaceKey: () => cleanInterfaceKey,
74
+ cleanInterfaceShape: () => cleanInterfaceShape,
75
+ cleanRegex: () => cleanRegex,
76
+ clone: () => clone,
77
+ createTransparentProxy: () => createTransparentProxy,
78
+ defineLazy: () => defineLazy,
79
+ esc: () => esc,
80
+ escapeRegex: () => escapeRegex,
81
+ extend: () => extend,
82
+ extendObjectLike: () => extendObjectLike,
83
+ finalizeIssue: () => finalizeIssue,
84
+ floatSafeRemainder: () => floatSafeRemainder,
85
+ getElementAtPath: () => getElementAtPath,
86
+ getLengthableOrigin: () => getLengthableOrigin,
87
+ getParsedType: () => getParsedType,
88
+ getSizableOrigin: () => getSizableOrigin,
89
+ getValidEnumValues: () => getValidEnumValues,
90
+ isObject: () => isObject,
91
+ isPlainObject: () => isPlainObject,
92
+ issue: () => issue,
93
+ joinValues: () => joinValues,
94
+ jsonStringifyReplacer: () => jsonStringifyReplacer,
95
+ mergeObjectLike: () => mergeObjectLike,
96
+ normalizeObjectLikeDef: () => normalizeObjectLikeDef,
97
+ normalizeParams: () => normalizeParams,
98
+ nullish: () => nullish,
99
+ numKeys: () => numKeys,
100
+ omit: () => omit,
101
+ optionalInterfaceKeys: () => optionalInterfaceKeys,
102
+ optionalObjectKeys: () => optionalObjectKeys,
103
+ partialObjectLike: () => partialObjectLike,
104
+ pick: () => pick,
105
+ prefixIssues: () => prefixIssues,
106
+ primitiveTypes: () => primitiveTypes,
107
+ promiseAllObject: () => promiseAllObject,
108
+ propertyKeyTypes: () => propertyKeyTypes,
109
+ randomString: () => randomString,
110
+ requiredObjectLike: () => requiredObjectLike,
111
+ splitChecksAndParams: () => splitChecksAndParams,
112
+ stringifyPrimitive: () => stringifyPrimitive,
113
+ unwrapMessage: () => unwrapMessage
114
+ });
115
+ function assertEqual(val) {
116
+ return val;
117
+ }
118
+ function assertNotEqual(val) {
119
+ return val;
120
+ }
121
+ function assertIs(_arg) {
122
+ }
123
+ function assertNever(_x) {
124
+ throw new Error();
125
+ }
126
+ function assert(_6) {
127
+ }
128
+ function getValidEnumValues(obj) {
129
+ const validKeys = Object.keys(obj).filter((k) => typeof obj[obj[k]] !== "number");
130
+ const filtered = {};
131
+ for (const k of validKeys) {
132
+ filtered[k] = obj[k];
133
+ }
134
+ return Object.values(filtered);
135
+ }
136
+ function joinValues(array2, separator = "|") {
137
+ return array2.map((val) => stringifyPrimitive(val)).join(separator);
138
+ }
54
139
  function jsonStringifyReplacer(_6, value) {
55
140
  if (typeof value === "bigint")
56
141
  return value.toString();
@@ -67,11 +152,22 @@ function cached(getter) {
67
152
  }
68
153
  };
69
154
  }
155
+ function nullish(input) {
156
+ return input === null || input === void 0;
157
+ }
70
158
  function cleanRegex(source) {
71
159
  const start = source.startsWith("^") ? 1 : 0;
72
160
  const end = source.endsWith("$") ? source.length - 1 : source.length;
73
161
  return source.slice(start, end);
74
162
  }
163
+ function floatSafeRemainder(val, step) {
164
+ const valDecCount = (val.toString().split(".")[1] || "").length;
165
+ const stepDecCount = (step.toString().split(".")[1] || "").length;
166
+ const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
167
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
168
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
169
+ return valInt % stepInt / 10 ** decCount;
170
+ }
75
171
  function defineLazy(object2, key, getter) {
76
172
  Object.defineProperty(object2, key, {
77
173
  get() {
@@ -90,6 +186,30 @@ function defineLazy(object2, key, getter) {
90
186
  configurable: true
91
187
  });
92
188
  }
189
+ function assignProp(target, prop, value) {
190
+ Object.defineProperty(target, prop, {
191
+ value,
192
+ writable: true,
193
+ enumerable: true,
194
+ configurable: true
195
+ });
196
+ }
197
+ function getElementAtPath(obj, path) {
198
+ if (!path)
199
+ return obj;
200
+ return path.reduce((acc, key) => acc?.[key], obj);
201
+ }
202
+ function promiseAllObject(promisesObj) {
203
+ const keys = Object.keys(promisesObj);
204
+ const promises = keys.map((key) => promisesObj[key]);
205
+ return Promise.all(promises).then((results) => {
206
+ const resolvedObj = {};
207
+ for (let i = 0; i < keys.length; i++) {
208
+ resolvedObj[keys[i]] = results[i];
209
+ }
210
+ return resolvedObj;
211
+ });
212
+ }
93
213
  function randomString(length = 10) {
94
214
  const chars = "abcdefghijklmnopqrstuvwxyz";
95
215
  let str = "";
@@ -112,9 +232,78 @@ var allowsEval = cached(() => {
112
232
  return false;
113
233
  }
114
234
  });
235
+ function isPlainObject(data) {
236
+ return typeof data === "object" && data !== null && Object.getPrototypeOf(data) === Object.prototype;
237
+ }
238
+ function numKeys(data) {
239
+ let keyCount = 0;
240
+ for (const key in data) {
241
+ if (Object.prototype.hasOwnProperty.call(data, key)) {
242
+ keyCount++;
243
+ }
244
+ }
245
+ return keyCount;
246
+ }
247
+ var getParsedType = (data) => {
248
+ const t = typeof data;
249
+ switch (t) {
250
+ case "undefined":
251
+ return "undefined";
252
+ case "string":
253
+ return "string";
254
+ case "number":
255
+ return Number.isNaN(data) ? "nan" : "number";
256
+ case "boolean":
257
+ return "boolean";
258
+ case "function":
259
+ return "function";
260
+ case "bigint":
261
+ return "bigint";
262
+ case "symbol":
263
+ return "symbol";
264
+ case "object":
265
+ if (Array.isArray(data)) {
266
+ return "array";
267
+ }
268
+ if (data === null) {
269
+ return "null";
270
+ }
271
+ if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
272
+ return "promise";
273
+ }
274
+ if (typeof Map !== "undefined" && data instanceof Map) {
275
+ return "map";
276
+ }
277
+ if (typeof Set !== "undefined" && data instanceof Set) {
278
+ return "set";
279
+ }
280
+ if (typeof Date !== "undefined" && data instanceof Date) {
281
+ return "date";
282
+ }
283
+ if (typeof File !== "undefined" && data instanceof File) {
284
+ return "file";
285
+ }
286
+ return "object";
287
+ default:
288
+ throw new Error(`Unknown data type: ${t}`);
289
+ }
290
+ };
291
+ var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
292
+ var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
293
+ function escapeRegex(str) {
294
+ return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
295
+ }
115
296
  function clone(inst, def) {
116
297
  return new inst._zod.constr(def);
117
298
  }
299
+ function splitChecksAndParams(_paramsOrChecks, _checks) {
300
+ const params = Array.isArray(_paramsOrChecks) ? {} : _paramsOrChecks ?? {};
301
+ const checks = Array.isArray(_paramsOrChecks) ? _paramsOrChecks : _checks ?? [];
302
+ return {
303
+ checks,
304
+ params
305
+ };
306
+ }
118
307
  function normalizeParams(_params) {
119
308
  const params = _params;
120
309
  if (!params)
@@ -131,11 +320,267 @@ function normalizeParams(_params) {
131
320
  return { ...params, error: () => params.error };
132
321
  return params;
133
322
  }
323
+ function createTransparentProxy(getter) {
324
+ let target;
325
+ return new Proxy({}, {
326
+ get(_6, prop, receiver) {
327
+ target ?? (target = getter());
328
+ return Reflect.get(target, prop, receiver);
329
+ },
330
+ set(_6, prop, value, receiver) {
331
+ target ?? (target = getter());
332
+ return Reflect.set(target, prop, value, receiver);
333
+ },
334
+ has(_6, prop) {
335
+ target ?? (target = getter());
336
+ return Reflect.has(target, prop);
337
+ },
338
+ deleteProperty(_6, prop) {
339
+ target ?? (target = getter());
340
+ return Reflect.deleteProperty(target, prop);
341
+ },
342
+ ownKeys(_6) {
343
+ target ?? (target = getter());
344
+ return Reflect.ownKeys(target);
345
+ },
346
+ getOwnPropertyDescriptor(_6, prop) {
347
+ target ?? (target = getter());
348
+ return Reflect.getOwnPropertyDescriptor(target, prop);
349
+ },
350
+ defineProperty(_6, prop, descriptor) {
351
+ target ?? (target = getter());
352
+ return Reflect.defineProperty(target, prop, descriptor);
353
+ }
354
+ // apply(target, thisArg, args) {
355
+ // return Reflect.apply(target, thisArg, args);
356
+ // },
357
+ // construct(target, args, newTarget) {
358
+ // return Reflect.construct(target, args, newTarget);
359
+ // },
360
+ });
361
+ }
362
+ function stringifyPrimitive(value) {
363
+ if (typeof value === "bigint")
364
+ return value.toString() + "n";
365
+ if (typeof value === "string")
366
+ return `"${value}"`;
367
+ return `${value}`;
368
+ }
134
369
  function optionalObjectKeys(shape) {
135
370
  return Object.keys(shape).filter((k) => {
136
371
  return shape[k]._zod.qout === "true";
137
372
  });
138
373
  }
374
+ function optionalInterfaceKeys(shape) {
375
+ return Object.keys(shape).filter((k) => {
376
+ return k.endsWith("?");
377
+ }).map((k) => k.replace(/\?$/, ""));
378
+ }
379
+ function cleanInterfaceKey(key) {
380
+ return key.replace(/^\?/, "").replace(/\?$/, "");
381
+ }
382
+ function cleanInterfaceShape(_shape) {
383
+ const keyMap = {};
384
+ const shape = {};
385
+ const optional2 = [];
386
+ const defaulted = [];
387
+ for (const [key, value] of Object.entries(_shape)) {
388
+ if (key.endsWith("?"))
389
+ optional2.push(key.slice(0, -1));
390
+ if (key.startsWith("?"))
391
+ defaulted.push(key.slice(1));
392
+ const cleanKey = cleanInterfaceKey(key);
393
+ shape[cleanKey] = value;
394
+ keyMap[cleanKey] = key;
395
+ }
396
+ return { shape, keyMap, optional: optional2, defaulted };
397
+ }
398
+ var NUMBER_FORMAT_RANGES = {
399
+ safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
400
+ int32: [-2147483648, 2147483647],
401
+ uint32: [0, 4294967295],
402
+ float32: [-34028234663852886e22, 34028234663852886e22],
403
+ float64: [-17976931348623157e292, 17976931348623157e292]
404
+ };
405
+ var BIGINT_FORMAT_RANGES = {
406
+ int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
407
+ uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
408
+ };
409
+ function pick(schema, mask) {
410
+ const newShape = {};
411
+ const newOptional = [];
412
+ const currShape = schema._zod.def.shape;
413
+ const currOptional = new Set(schema._zod.def.optional);
414
+ for (const key in mask) {
415
+ if (!(key in currShape)) {
416
+ throw new Error(`Unrecognized key: "${key}"`);
417
+ }
418
+ if (!mask[key])
419
+ continue;
420
+ newShape[key] = currShape[key];
421
+ if (currOptional.has(key)) {
422
+ newOptional.push(key);
423
+ }
424
+ }
425
+ return clone(schema, {
426
+ ...schema._zod.def,
427
+ shape: newShape,
428
+ optional: newOptional,
429
+ checks: []
430
+ });
431
+ }
432
+ function omit(schema, mask) {
433
+ const newShape = { ...schema._zod.def.shape };
434
+ const newOptional = new Set(schema._zod.def.optional);
435
+ for (const key in mask) {
436
+ if (!(key in schema._zod.def.shape)) {
437
+ throw new Error(`Unrecognized key: "${key}"`);
438
+ }
439
+ if (!mask[key])
440
+ continue;
441
+ delete newShape[key];
442
+ newOptional.delete(key);
443
+ }
444
+ return clone(schema, {
445
+ ...schema._zod.def,
446
+ shape: newShape,
447
+ optional: [...newOptional],
448
+ checks: []
449
+ });
450
+ }
451
+ function extend(schema, shape) {
452
+ const def = {
453
+ ...schema._zod.def,
454
+ get shape() {
455
+ const _shape = { ...schema._zod.def.shape, ...shape };
456
+ assignProp(this, "shape", _shape);
457
+ return _shape;
458
+ },
459
+ checks: []
460
+ // delete existing checks
461
+ };
462
+ defineLazy(def, "shape", () => ({ ...schema._zod.def.shape, ...shape }));
463
+ return clone(schema, def);
464
+ }
465
+ function mergeObjectLike(a, b) {
466
+ const bKeys = new Set(Object.keys(b._zod.def.shape));
467
+ const optional2 = [...a._zod.def.optional.filter((k) => !bKeys.has(k)), ...b._zod.def.optional];
468
+ return clone(a, {
469
+ ...a._zod.def,
470
+ get shape() {
471
+ const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
472
+ assignProp(this, "shape", _shape);
473
+ return _shape;
474
+ },
475
+ optional: optional2,
476
+ catchall: b._zod.def.catchall,
477
+ checks: []
478
+ // delete existing checks
479
+ });
480
+ }
481
+ function extendObjectLike(a, b) {
482
+ const bKeys = new Set(Object.keys(b._zod.def.shape));
483
+ const optional2 = [...a._zod.def.optional.filter((k) => !bKeys.has(k)), ...b._zod.def.optional];
484
+ return clone(a, {
485
+ ...a._zod.def,
486
+ get shape() {
487
+ const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
488
+ assignProp(this, "shape", _shape);
489
+ return _shape;
490
+ },
491
+ optional: optional2,
492
+ checks: []
493
+ // delete existent checks
494
+ });
495
+ }
496
+ function partialObjectLike(Class, schema, mask) {
497
+ const shape = { ...schema._zod.def.shape };
498
+ const optional2 = new Set(schema._zod.def.optional);
499
+ if (mask) {
500
+ for (const key in mask) {
501
+ if (!(key in shape)) {
502
+ throw new Error(`Unrecognized key: "${key}"`);
503
+ }
504
+ if (!mask[key])
505
+ continue;
506
+ shape[key] = new Class({
507
+ type: "optional",
508
+ innerType: schema._zod.def.shape[key]
509
+ });
510
+ optional2.add(key);
511
+ }
512
+ } else {
513
+ for (const key in schema._zod.def.shape) {
514
+ shape[key] = new Class({
515
+ type: "optional",
516
+ innerType: schema._zod.def.shape[key]
517
+ });
518
+ optional2.add(key);
519
+ }
520
+ }
521
+ return clone(schema, {
522
+ ...schema._zod.def,
523
+ shape,
524
+ optional: [...optional2],
525
+ checks: []
526
+ });
527
+ }
528
+ function requiredObjectLike(Class, schema, mask) {
529
+ const shape = { ...schema._zod.def.shape };
530
+ if (mask) {
531
+ for (const key in mask) {
532
+ if (!(key in shape)) {
533
+ throw new Error(`Unrecognized key: "${key}"`);
534
+ }
535
+ if (!mask[key])
536
+ continue;
537
+ shape[key] = new Class({
538
+ type: "nonoptional",
539
+ innerType: schema._zod.def.shape[key]
540
+ });
541
+ }
542
+ } else {
543
+ for (const key in schema._zod.def.shape) {
544
+ shape[key] = new Class({
545
+ type: "nonoptional",
546
+ innerType: schema._zod.def.shape[key]
547
+ });
548
+ }
549
+ }
550
+ return clone(schema, {
551
+ ...schema._zod.def,
552
+ shape,
553
+ optional: [],
554
+ checks: []
555
+ });
556
+ }
557
+ function normalizeObjectLikeDef(def) {
558
+ if (def.type === "interface") {
559
+ const keys = Object.keys(def.shape);
560
+ const keySet = new Set(Object.keys(def.shape));
561
+ return {
562
+ shape: { ...def.shape },
563
+ // resolve getters
564
+ keys,
565
+ keySet,
566
+ numKeys: keys.length,
567
+ optionalKeys: new Set(def.optional)
568
+ };
569
+ }
570
+ if (def.type === "object") {
571
+ const keys = Object.keys(def.shape);
572
+ const keySet = new Set(Object.keys(def.shape));
573
+ return {
574
+ shape: { ...def.shape },
575
+ // resolve getters
576
+ keys,
577
+ keySet,
578
+ numKeys: keys.length,
579
+ optionalKeys: new Set(def.optional)
580
+ };
581
+ }
582
+ throw new Error("Invalid object-like type");
583
+ }
139
584
  function aborted(x, startIndex = 0) {
140
585
  for (let i = startIndex; i < x.issues.length; i++) {
141
586
  if (x.issues[i].continue !== true)
@@ -167,8 +612,36 @@ function finalizeIssue(iss, ctx, config2) {
167
612
  }
168
613
  return full;
169
614
  }
615
+ function getSizableOrigin(input) {
616
+ if (input instanceof Set)
617
+ return "set";
618
+ if (input instanceof Map)
619
+ return "map";
620
+ if (input instanceof File)
621
+ return "file";
622
+ return "unknown";
623
+ }
624
+ function getLengthableOrigin(input) {
625
+ if (Array.isArray(input))
626
+ return "array";
627
+ if (typeof input === "string")
628
+ return "string";
629
+ return "unknown";
630
+ }
631
+ function issue(...args) {
632
+ const [iss, input, inst] = args;
633
+ if (typeof iss === "string") {
634
+ return {
635
+ message: iss,
636
+ code: "custom",
637
+ input,
638
+ inst
639
+ };
640
+ }
641
+ return { ...iss };
642
+ }
170
643
 
171
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/errors.js
644
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/errors.js
172
645
  var ZOD_ERROR = Symbol.for("{{zod.error}}");
173
646
  var $ZodError = class {
174
647
  get message() {
@@ -185,7 +658,7 @@ var $ZodError = class {
185
658
  }
186
659
  };
187
660
 
188
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/parse.js
661
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/parse.js
189
662
  function _parse(schema, value, _ctx) {
190
663
  const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
191
664
  const result = schema._zod.run({ value, issues: [] }, ctx);
@@ -237,7 +710,7 @@ var string = (params) => {
237
710
  };
238
711
  var boolean = /true|false/i;
239
712
 
240
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/doc.js
713
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/doc.js
241
714
  var Doc = class {
242
715
  constructor(args) {
243
716
  this.content = [];
@@ -269,13 +742,21 @@ var Doc = class {
269
742
  }
270
743
  };
271
744
 
272
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/schemas.js
745
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/versions.js
746
+ var version = {
747
+ major: 0,
748
+ minor: 3,
749
+ patch: 3
750
+ };
751
+
752
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/schemas.js
273
753
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
274
754
  var _a;
275
755
  inst ?? (inst = {});
276
756
  inst._zod.id = def.type + "_" + randomString(10);
277
757
  inst._zod.def = def;
278
758
  inst._zod.computed = inst._zod.computed || {};
759
+ inst._zod.version = version;
279
760
  const checks = [...inst._zod.def.checks ?? []];
280
761
  def.type;
281
762
  if (inst._zod.traits.has("$ZodCheck")) {
@@ -343,7 +824,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
343
824
  return runChecks(result, checks, ctx);
344
825
  };
345
826
  }
346
- defineLazy(inst, "~standard", () => ({
827
+ inst["~standard"] = {
347
828
  validate: (value) => {
348
829
  const result = inst._zod.run({ value, issues: [] }, {});
349
830
  if (result instanceof Promise) {
@@ -359,7 +840,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
359
840
  },
360
841
  vendor: "zod",
361
842
  version: 1
362
- }));
843
+ };
363
844
  });
364
845
  var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
365
846
  $ZodType.init(inst, def);
@@ -564,7 +1045,9 @@ var $ZodObjectLike = /* @__PURE__ */ $constructor("$ZodObjectLike", (inst, def)
564
1045
  const fastEnabled = allowsEval.value;
565
1046
  const isObject2 = isObject;
566
1047
  const { catchall } = def;
1048
+ let value;
567
1049
  inst._zod.parse = (payload, ctx) => {
1050
+ value ?? (value = _normalized.value);
568
1051
  const input = payload.value;
569
1052
  if (!isObject2(input)) {
570
1053
  payload.issues.push({
@@ -582,7 +1065,7 @@ var $ZodObjectLike = /* @__PURE__ */ $constructor("$ZodObjectLike", (inst, def)
582
1065
  payload = fastpass(payload, ctx);
583
1066
  } else {
584
1067
  payload.value = {};
585
- const { keys, shape, optionalKeys } = _normalized.value;
1068
+ const { keys, shape, optionalKeys } = value;
586
1069
  for (const key of keys) {
587
1070
  const valueSchema = shape[key];
588
1071
  const r = valueSchema._zod.run({ value: input[key], issues: [] }, ctx);
@@ -602,14 +1085,17 @@ var $ZodObjectLike = /* @__PURE__ */ $constructor("$ZodObjectLike", (inst, def)
602
1085
  return proms.length ? Promise.all(proms).then(() => payload) : payload;
603
1086
  }
604
1087
  const unrecognized = [];
1088
+ const keySet = value.keySet;
1089
+ const _catchall = catchall._zod;
1090
+ const t = _catchall.def.type;
605
1091
  for (const key of Object.keys(input)) {
606
- if (_normalized.value.keySet.has(key))
1092
+ if (keySet.has(key))
607
1093
  continue;
608
- if (catchall._zod.def.type === "never") {
1094
+ if (t === "never") {
609
1095
  unrecognized.push(key);
610
1096
  continue;
611
1097
  }
612
- const r = catchall._zod.run({ value: input[key], issues: [] }, ctx);
1098
+ const r = _catchall.run({ value: input[key], issues: [] }, ctx);
613
1099
  if (r instanceof Promise) {
614
1100
  proms.push(r.then((r2) => handleObjectResult(r2, payload, key)));
615
1101
  } else {
@@ -650,7 +1136,7 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
650
1136
  };
651
1137
  });
652
1138
 
653
- // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/api.js
1139
+ // ../../node_modules/.pnpm/@zod+core@0.3.3/node_modules/@zod/core/dist/esm/api.js
654
1140
  function _string(Class, params) {
655
1141
  return new Class({
656
1142
  type: "string",
@@ -664,7 +1150,7 @@ function _boolean(Class, params) {
664
1150
  });
665
1151
  }
666
1152
 
667
- // ../../node_modules/.pnpm/@zod+mini@4.0.0-beta.0/node_modules/@zod/mini/dist/esm/parse.js
1153
+ // ../../node_modules/.pnpm/@zod+mini@4.0.0-beta.20250411T005215_60e10b0f348e07070e4d24639ea7d4ee/node_modules/@zod/mini/dist/esm/parse.js
668
1154
  var parse2 = /* @__PURE__ */ _parse.bind({ Error: $ZodError });
669
1155
  var safeParse = /* @__PURE__ */ _safeParse.bind({ Error: $ZodError });
670
1156
  var parseAsync2 = /* @__PURE__ */ _parseAsync.bind({ Error: $ZodError });
@@ -672,7 +1158,7 @@ var safeParseAsync = /* @__PURE__ */ _safeParseAsync.bind({
672
1158
  Error: $ZodError
673
1159
  });
674
1160
 
675
- // ../../node_modules/.pnpm/@zod+mini@4.0.0-beta.0/node_modules/@zod/mini/dist/esm/schemas.js
1161
+ // ../../node_modules/.pnpm/@zod+mini@4.0.0-beta.20250411T005215_60e10b0f348e07070e4d24639ea7d4ee/node_modules/@zod/mini/dist/esm/schemas.js
676
1162
  var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
677
1163
  if (!inst._zod)
678
1164
  throw new Error("Uninitialized schema in mixin ZodMiniType.");
@@ -723,7 +1209,7 @@ function array(element, params) {
723
1209
  // get element() {
724
1210
  // return element;
725
1211
  // },
726
- ...normalizeParams(params)
1212
+ ...util_exports.normalizeParams(params)
727
1213
  });
728
1214
  }
729
1215
  var ZodMiniObject = /* @__PURE__ */ $constructor("ZodMiniObject", (inst, def) => {
@@ -735,9 +1221,9 @@ function object(shape, params) {
735
1221
  type: "object",
736
1222
  shape: shape ?? {},
737
1223
  get optional() {
738
- return optionalObjectKeys(shape ?? {});
1224
+ return util_exports.optionalObjectKeys(shape ?? {});
739
1225
  },
740
- ...normalizeParams(params)
1226
+ ...util_exports.normalizeParams(params)
741
1227
  };
742
1228
  return new ZodMiniObject(def);
743
1229
  }
@@ -749,7 +1235,7 @@ function optional(innerType, params) {
749
1235
  return new ZodMiniOptional({
750
1236
  type: "optional",
751
1237
  innerType,
752
- ...normalizeParams(params)
1238
+ ...util_exports.normalizeParams(params)
753
1239
  });
754
1240
  }
755
1241
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/core",
3
- "version": "1.43.2-next.1",
3
+ "version": "1.43.2-next.2",
4
4
  "description": "ESLint React's ESLint utility module for static analysis of React core APIs and patterns.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -41,12 +41,12 @@
41
41
  "@typescript-eslint/utils": "^8.29.1",
42
42
  "birecord": "^0.1.1",
43
43
  "ts-pattern": "^5.7.0",
44
- "@eslint-react/ast": "1.43.2-next.1",
45
- "@eslint-react/eff": "1.43.2-next.1",
46
- "@eslint-react/shared": "1.43.2-next.1",
47
- "@eslint-react/var": "1.43.2-next.1",
48
- "@eslint-react/kit": "1.43.2-next.1",
49
- "@eslint-react/jsx": "1.43.2-next.1"
44
+ "@eslint-react/ast": "1.43.2-next.2",
45
+ "@eslint-react/eff": "1.43.2-next.2",
46
+ "@eslint-react/kit": "1.43.2-next.2",
47
+ "@eslint-react/shared": "1.43.2-next.2",
48
+ "@eslint-react/var": "1.43.2-next.2",
49
+ "@eslint-react/jsx": "1.43.2-next.2"
50
50
  },
51
51
  "devDependencies": {
52
52
  "tsup": "^8.4.0",