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