@eslint-react/core 1.43.0 → 1.43.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,359 +1,756 @@
1
1
  import * as AST6 from '@eslint-react/ast';
2
2
  import { flip, dual, constFalse, identity, _ } from '@eslint-react/eff';
3
3
  import * as JSX3 from '@eslint-react/jsx';
4
+ import { RE, SEL } from '@eslint-react/kit';
4
5
  import { DEFAULT_ESLINT_REACT_SETTINGS as DEFAULT_ESLINT_REACT_SETTINGS$1, unsafeDecodeSettings, getId } from '@eslint-react/shared';
5
6
  import { AST_NODE_TYPES } from '@typescript-eslint/types';
6
7
  import * as VAR from '@eslint-react/var';
7
8
  import { isMatching, P, match } from 'ts-pattern';
8
- import '@eslint-react/kit';
9
9
  import birecord from 'birecord';
10
10
 
11
11
  // src/component/component-collector.ts
12
12
 
13
- // src/constants.ts
14
- var DISPLAY_NAME_ASSIGNMENT_SELECTOR = [
15
- "AssignmentExpression",
16
- "[type]",
17
- "[operator='=']",
18
- "[left.type='MemberExpression']",
19
- "[left.property.name='displayName']"
20
- ].join("");
21
-
22
- // ../../node_modules/.pnpm/valibot@1.0.0_typescript@5.8.3/node_modules/valibot/dist/index.js
23
- var store;
13
+ // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/core.js
24
14
  // @__NO_SIDE_EFFECTS__
25
- function getGlobalConfig(config2) {
15
+ function $constructor(name, initializer) {
16
+ class _6 {
17
+ constructor(def) {
18
+ var _a;
19
+ const th = this;
20
+ _6.init(th, def);
21
+ (_a = th._zod).deferred ?? (_a.deferred = []);
22
+ for (const fn of th._zod.deferred) {
23
+ fn();
24
+ }
25
+ }
26
+ static init(inst, def) {
27
+ var _a;
28
+ inst._zod ?? (inst._zod = {});
29
+ (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set());
30
+ inst._zod.traits.add(name);
31
+ initializer(inst, def);
32
+ for (const k in _6.prototype) {
33
+ Object.defineProperty(inst, k, { value: _6.prototype[k].bind(inst) });
34
+ }
35
+ inst._zod.constr = _6;
36
+ inst._zod.def = def;
37
+ }
38
+ static [Symbol.hasInstance](inst) {
39
+ return inst?._zod?.traits?.has(name);
40
+ }
41
+ }
42
+ Object.defineProperty(_6, "name", { value: name });
43
+ return _6;
44
+ }
45
+ var $ZodAsyncError = class extends Error {
46
+ constructor() {
47
+ super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
48
+ }
49
+ };
50
+ var globalConfig = {};
51
+ function config(config2) {
52
+ return globalConfig;
53
+ }
54
+ function jsonStringifyReplacer(_6, value) {
55
+ if (typeof value === "bigint")
56
+ return value.toString();
57
+ return value;
58
+ }
59
+ function cached(getter) {
26
60
  return {
27
- lang: config2?.lang ?? store?.lang,
28
- message: config2?.message,
29
- abortEarly: config2?.abortEarly ?? store?.abortEarly,
30
- abortPipeEarly: config2?.abortPipeEarly ?? store?.abortPipeEarly
61
+ get value() {
62
+ {
63
+ const value = getter();
64
+ Object.defineProperty(this, "value", { value });
65
+ return value;
66
+ }
67
+ }
31
68
  };
32
69
  }
33
- var store2;
34
- // @__NO_SIDE_EFFECTS__
35
- function getGlobalMessage(lang) {
36
- return store2?.get(lang);
37
- }
38
- var store3;
39
- // @__NO_SIDE_EFFECTS__
40
- function getSchemaMessage(lang) {
41
- return store3?.get(lang);
70
+ function cleanRegex(source) {
71
+ const start = source.startsWith("^") ? 1 : 0;
72
+ const end = source.endsWith("$") ? source.length - 1 : source.length;
73
+ return source.slice(start, end);
42
74
  }
43
- var store4;
44
- // @__NO_SIDE_EFFECTS__
45
- function getSpecificMessage(reference, lang) {
46
- return store4?.get(reference)?.get(lang);
75
+ function defineLazy(object2, key, getter) {
76
+ Object.defineProperty(object2, key, {
77
+ get() {
78
+ {
79
+ const value = getter();
80
+ object2[key] = value;
81
+ return value;
82
+ }
83
+ },
84
+ set(v) {
85
+ Object.defineProperty(object2, key, {
86
+ value: v
87
+ // configurable: true,
88
+ });
89
+ },
90
+ configurable: true
91
+ });
47
92
  }
48
- // @__NO_SIDE_EFFECTS__
49
- function _stringify(input) {
50
- const type = typeof input;
51
- if (type === "string") {
52
- return `"${input}"`;
93
+ function randomString(length = 10) {
94
+ const chars = "abcdefghijklmnopqrstuvwxyz";
95
+ let str = "";
96
+ for (let i = 0; i < length; i++) {
97
+ str += chars[Math.floor(Math.random() * chars.length)];
53
98
  }
54
- if (type === "number" || type === "bigint" || type === "boolean") {
55
- return `${input}`;
99
+ return str;
100
+ }
101
+ function esc(str) {
102
+ return JSON.stringify(str);
103
+ }
104
+ function isObject(data) {
105
+ return typeof data === "object" && data !== null;
106
+ }
107
+ var allowsEval = cached(() => {
108
+ try {
109
+ new Function("");
110
+ return true;
111
+ } catch (_6) {
112
+ return false;
56
113
  }
57
- if (type === "object" || type === "function") {
58
- return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? "null";
114
+ });
115
+ function clone(inst, def) {
116
+ return new inst._zod.constr(def);
117
+ }
118
+ function normalizeParams(_params) {
119
+ const params = _params;
120
+ if (!params)
121
+ return {};
122
+ if (typeof params === "string")
123
+ return { error: () => params };
124
+ if (params?.message !== void 0) {
125
+ if (params?.error !== void 0)
126
+ throw new Error("Cannot specify both `message` and `error` params");
127
+ params.error = params.message;
59
128
  }
60
- return type;
61
- }
62
- function _addIssue(context, label, dataset, config2, other) {
63
- const input = other && "input" in other ? other.input : dataset.value;
64
- const expected = other?.expected ?? context.expects ?? null;
65
- const received = other?.received ?? /* @__PURE__ */ _stringify(input);
66
- const issue = {
67
- kind: context.kind,
68
- type: context.type,
69
- input,
70
- expected,
71
- received,
72
- message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : "R"}eceived ${received}`,
73
- requirement: context.requirement,
74
- path: other?.path,
75
- issues: other?.issues,
76
- lang: config2.lang,
77
- abortEarly: config2.abortEarly,
78
- abortPipeEarly: config2.abortPipeEarly
79
- };
80
- const isSchema = context.kind === "schema";
81
- const message = other?.message ?? context.message ?? /* @__PURE__ */ getSpecificMessage(context.reference, issue.lang) ?? (isSchema ? /* @__PURE__ */ getSchemaMessage(issue.lang) : null) ?? config2.message ?? /* @__PURE__ */ getGlobalMessage(issue.lang);
82
- if (message !== void 0) {
83
- issue.message = typeof message === "function" ? (
84
- // @ts-expect-error
85
- message(issue)
86
- ) : message;
129
+ delete params.message;
130
+ if (typeof params.error === "string")
131
+ return { ...params, error: () => params.error };
132
+ return params;
133
+ }
134
+ function optionalObjectKeys(shape) {
135
+ return Object.keys(shape).filter((k) => {
136
+ return shape[k]._zod.qout === "true";
137
+ });
138
+ }
139
+ function aborted(x, startIndex = 0) {
140
+ for (let i = startIndex; i < x.issues.length; i++) {
141
+ if (x.issues[i].continue !== true)
142
+ return true;
87
143
  }
88
- if (isSchema) {
89
- dataset.typed = false;
144
+ return false;
145
+ }
146
+ function prefixIssues(path, issues) {
147
+ return issues.map((iss) => {
148
+ var _a;
149
+ (_a = iss).path ?? (_a.path = []);
150
+ iss.path.unshift(path);
151
+ return iss;
152
+ });
153
+ }
154
+ function unwrapMessage(message) {
155
+ return typeof message === "string" ? message : message?.message;
156
+ }
157
+ function finalizeIssue(iss, ctx, config2) {
158
+ const full = { ...iss, path: iss.path ?? [] };
159
+ if (!iss.message) {
160
+ const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
161
+ full.message = message;
90
162
  }
91
- if (dataset.issues) {
92
- dataset.issues.push(issue);
93
- } else {
94
- dataset.issues = [issue];
163
+ delete full.inst;
164
+ delete full.continue;
165
+ if (!ctx?.reportInput) {
166
+ delete full.input;
95
167
  }
168
+ return full;
96
169
  }
97
- // @__NO_SIDE_EFFECTS__
98
- function _getStandardProps(context) {
99
- return {
100
- version: 1,
101
- vendor: "valibot",
102
- validate(value2) {
103
- return context["~run"]({ value: value2 }, /* @__PURE__ */ getGlobalConfig());
104
- }
105
- };
106
- }
107
- var ValiError = class extends Error {
108
- /**
109
- * Creates a Valibot error with useful information.
110
- *
111
- * @param issues The error issues.
112
- */
170
+
171
+ // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/errors.js
172
+ var ZOD_ERROR = Symbol.for("{{zod.error}}");
173
+ var $ZodError = class {
174
+ get message() {
175
+ return JSON.stringify(this.issues, jsonStringifyReplacer, 2);
176
+ }
113
177
  constructor(issues) {
114
- super(issues[0].message);
115
- this.name = "ValiError";
178
+ Object.defineProperty(this, "_tag", { value: ZOD_ERROR, enumerable: false });
179
+ Object.defineProperty(this, "name", { value: "$ZodError", enumerable: false });
116
180
  this.issues = issues;
117
181
  }
182
+ // @ts-ignore
183
+ static [Symbol.hasInstance](inst) {
184
+ return inst?._tag === ZOD_ERROR;
185
+ }
118
186
  };
119
- // @__NO_SIDE_EFFECTS__
120
- function getFallback(schema, dataset, config2) {
121
- return typeof schema.fallback === "function" ? (
122
- // @ts-expect-error
123
- schema.fallback(dataset, config2)
124
- ) : (
125
- // @ts-expect-error
126
- schema.fallback
127
- );
187
+
188
+ // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/parse.js
189
+ function _parse(schema, value, _ctx) {
190
+ const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
191
+ const result = schema._zod.run({ value, issues: [] }, ctx);
192
+ if (result instanceof Promise) {
193
+ throw new $ZodAsyncError();
194
+ }
195
+ if (result.issues.length) {
196
+ throw new (this?.Error ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
197
+ }
198
+ return result.value;
128
199
  }
129
- // @__NO_SIDE_EFFECTS__
130
- function getDefault(schema, dataset, config2) {
131
- return typeof schema.default === "function" ? (
132
- // @ts-expect-error
133
- schema.default(dataset, config2)
134
- ) : (
135
- // @ts-expect-error
136
- schema.default
137
- );
200
+ function _safeParse(schema, value, _ctx) {
201
+ const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
202
+ const result = schema._zod.run({ value, issues: [] }, ctx);
203
+ if (result instanceof Promise) {
204
+ throw new $ZodAsyncError();
205
+ }
206
+ return result.issues.length ? {
207
+ success: false,
208
+ error: new (this?.Error ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
209
+ } : { success: true, data: result.value };
210
+ }
211
+ async function _parseAsync(schema, value, _ctx) {
212
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
213
+ let result = schema._zod.run({ value, issues: [] }, ctx);
214
+ if (result instanceof Promise)
215
+ result = await result;
216
+ if (result.issues.length) {
217
+ throw new (this?.Error ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
218
+ }
219
+ return result.value;
220
+ }
221
+ async function _safeParseAsync(schema, value, _ctx) {
222
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
223
+ let result = schema._zod.run({ value, issues: [] }, ctx);
224
+ if (result instanceof Promise)
225
+ result = await result;
226
+ if (result.issues.length) {
227
+ return {
228
+ success: false,
229
+ error: new (this?.Error ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
230
+ };
231
+ }
232
+ return { success: true, data: result.value };
138
233
  }
139
- // @__NO_SIDE_EFFECTS__
140
- function array(item, message) {
141
- return {
142
- kind: "schema",
143
- type: "array",
144
- reference: array,
145
- expects: "Array",
146
- async: false,
147
- item,
148
- message,
149
- get "~standard"() {
150
- return /* @__PURE__ */ _getStandardProps(this);
151
- },
152
- "~run"(dataset, config2) {
153
- const input = dataset.value;
154
- if (Array.isArray(input)) {
155
- dataset.typed = true;
156
- dataset.value = [];
157
- for (let key = 0; key < input.length; key++) {
158
- const value2 = input[key];
159
- const itemDataset = this.item["~run"]({ value: value2 }, config2);
160
- if (itemDataset.issues) {
161
- const pathItem = {
162
- type: "array",
163
- origin: "value",
164
- input,
165
- key,
166
- value: value2
167
- };
168
- for (const issue of itemDataset.issues) {
169
- if (issue.path) {
170
- issue.path.unshift(pathItem);
171
- } else {
172
- issue.path = [pathItem];
173
- }
174
- dataset.issues?.push(issue);
175
- }
176
- if (!dataset.issues) {
177
- dataset.issues = itemDataset.issues;
178
- }
179
- if (config2.abortEarly) {
180
- dataset.typed = false;
181
- break;
182
- }
183
- }
184
- if (!itemDataset.typed) {
185
- dataset.typed = false;
234
+ var string = (params) => {
235
+ const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
236
+ return new RegExp(`^${regex}$`);
237
+ };
238
+ var boolean = /true|false/i;
239
+
240
+ // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/doc.js
241
+ var Doc = class {
242
+ constructor(args) {
243
+ this.content = [];
244
+ this.indent = 0;
245
+ this.args = args;
246
+ }
247
+ indented(fn) {
248
+ this.indent += 1;
249
+ fn(this);
250
+ this.indent -= 1;
251
+ }
252
+ write(arg) {
253
+ if (typeof arg === "function") {
254
+ arg(this, { execution: "sync" });
255
+ arg(this, { execution: "async" });
256
+ return;
257
+ }
258
+ const content = arg;
259
+ const lines = content.split("\n").filter((x) => x);
260
+ const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
261
+ const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
262
+ for (const line of dedented) {
263
+ this.content.push(line);
264
+ }
265
+ }
266
+ compile() {
267
+ const lines = [...this.content.map((x) => ` ${x}`)];
268
+ return new Function(...this.args, lines.join("\n"));
269
+ }
270
+ };
271
+
272
+ // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/schemas.js
273
+ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
274
+ var _a;
275
+ inst ?? (inst = {});
276
+ inst._zod.id = def.type + "_" + randomString(10);
277
+ inst._zod.def = def;
278
+ inst._zod.computed = inst._zod.computed || {};
279
+ const checks = [...inst._zod.def.checks ?? []];
280
+ def.type;
281
+ if (inst._zod.traits.has("$ZodCheck")) {
282
+ checks.unshift(inst);
283
+ }
284
+ for (const ch of checks) {
285
+ ch._zod.onattach?.(inst);
286
+ }
287
+ if (checks.length === 0) {
288
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
289
+ inst._zod.deferred?.push(() => {
290
+ inst._zod.run = inst._zod.parse;
291
+ });
292
+ } else {
293
+ const runChecks = (payload, checks2, ctx) => {
294
+ let isAborted = aborted(payload);
295
+ let asyncResult;
296
+ for (const ch of checks2) {
297
+ if (ch._zod.when) {
298
+ const shouldRun = ch._zod.when(payload);
299
+ if (!shouldRun)
300
+ continue;
301
+ } else {
302
+ if (isAborted) {
303
+ continue;
186
304
  }
187
- dataset.value.push(itemDataset.value);
188
305
  }
306
+ const currLen = payload.issues.length;
307
+ const _6 = ch._zod.check(payload);
308
+ if (_6 instanceof Promise && ctx?.async === false) {
309
+ throw new $ZodAsyncError();
310
+ }
311
+ if (asyncResult || _6 instanceof Promise) {
312
+ asyncResult = asyncResult ?? Promise.resolve();
313
+ asyncResult.then(async () => {
314
+ await _6;
315
+ const nextLen = payload.issues.length;
316
+ if (nextLen === currLen)
317
+ return;
318
+ if (!isAborted)
319
+ isAborted = aborted(payload, currLen);
320
+ });
321
+ } else {
322
+ const nextLen = payload.issues.length;
323
+ if (nextLen === currLen)
324
+ continue;
325
+ if (!isAborted)
326
+ isAborted = aborted(payload, currLen);
327
+ }
328
+ }
329
+ if (asyncResult) {
330
+ return asyncResult.then(() => {
331
+ return payload;
332
+ });
333
+ }
334
+ return payload;
335
+ };
336
+ inst._zod.run = (payload, ctx) => {
337
+ const result = inst._zod.parse(payload, ctx);
338
+ if (result instanceof Promise) {
339
+ if (ctx.async === false)
340
+ throw new $ZodAsyncError();
341
+ return result.then((result2) => runChecks(result2, checks, ctx));
342
+ }
343
+ return runChecks(result, checks, ctx);
344
+ };
345
+ }
346
+ defineLazy(inst, "~standard", () => ({
347
+ validate: (value) => {
348
+ const result = inst._zod.run({ value, issues: [] }, {});
349
+ if (result instanceof Promise) {
350
+ return result.then(({ issues, value: value2 }) => {
351
+ if (issues.length === 0)
352
+ return { value: value2 };
353
+ return { issues };
354
+ });
355
+ }
356
+ if (result.issues.length === 0)
357
+ return { value: result.value };
358
+ return { issues: result.issues };
359
+ },
360
+ vendor: "zod",
361
+ version: 1
362
+ }));
363
+ });
364
+ var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
365
+ $ZodType.init(inst, def);
366
+ inst._zod.pattern = inst?._zod.computed?.pattern ?? string(inst._zod.computed);
367
+ inst._zod.parse = (payload, _6) => {
368
+ if (def.coerce)
369
+ try {
370
+ payload.value = String(payload.value);
371
+ } catch (_7) {
372
+ }
373
+ if (typeof payload.value === "string")
374
+ return payload;
375
+ payload.issues.push({
376
+ expected: "string",
377
+ code: "invalid_type",
378
+ input: payload.value,
379
+ inst
380
+ });
381
+ return payload;
382
+ };
383
+ });
384
+ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
385
+ $ZodType.init(inst, def);
386
+ inst._zod.pattern = boolean;
387
+ inst._zod.parse = (payload, _ctx) => {
388
+ if (def.coerce)
389
+ try {
390
+ payload.value = Boolean(payload.value);
391
+ } catch (_6) {
392
+ }
393
+ const input = payload.value;
394
+ if (typeof input === "boolean")
395
+ return payload;
396
+ payload.issues.push({
397
+ expected: "boolean",
398
+ code: "invalid_type",
399
+ input,
400
+ inst
401
+ });
402
+ return payload;
403
+ };
404
+ });
405
+ function handleArrayResult(result, final, index) {
406
+ if (result.issues.length) {
407
+ final.issues.push(...prefixIssues(index, result.issues));
408
+ }
409
+ final.value[index] = result.value;
410
+ }
411
+ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
412
+ $ZodType.init(inst, def);
413
+ inst._zod.parse = (payload, ctx) => {
414
+ const input = payload.value;
415
+ if (!Array.isArray(input)) {
416
+ payload.issues.push({
417
+ expected: "array",
418
+ code: "invalid_type",
419
+ input,
420
+ inst
421
+ });
422
+ return payload;
423
+ }
424
+ payload.value = Array(input.length);
425
+ const proms = [];
426
+ for (let i = 0; i < input.length; i++) {
427
+ const item = input[i];
428
+ const result = def.element._zod.run({
429
+ value: item,
430
+ issues: []
431
+ }, ctx);
432
+ if (result instanceof Promise) {
433
+ proms.push(result.then((result2) => handleArrayResult(result2, payload, i)));
189
434
  } else {
190
- _addIssue(this, "type", dataset, config2);
435
+ handleArrayResult(result, payload, i);
191
436
  }
192
- return dataset;
193
437
  }
438
+ if (proms.length) {
439
+ return Promise.all(proms).then(() => payload);
440
+ }
441
+ return payload;
194
442
  };
443
+ });
444
+ function handleObjectResult(result, final, key) {
445
+ if (result.issues.length) {
446
+ final.issues.push(...prefixIssues(key, result.issues));
447
+ } else {
448
+ final.value[key] = result.value;
449
+ }
195
450
  }
196
- // @__NO_SIDE_EFFECTS__
197
- function boolean(message) {
198
- return {
199
- kind: "schema",
200
- type: "boolean",
201
- reference: boolean,
202
- expects: "boolean",
203
- async: false,
204
- message,
205
- get "~standard"() {
206
- return /* @__PURE__ */ _getStandardProps(this);
207
- },
208
- "~run"(dataset, config2) {
209
- if (typeof dataset.value === "boolean") {
210
- dataset.typed = true;
211
- } else {
212
- _addIssue(this, "type", dataset, config2);
451
+ function handleOptionalObjectResult(result, final, key, input) {
452
+ if (result.issues.length) {
453
+ if (input[key] === void 0) {
454
+ if (key in input) {
455
+ final.value[key] = void 0;
213
456
  }
214
- return dataset;
457
+ } else {
458
+ final.issues.push(...prefixIssues(key, result.issues));
215
459
  }
216
- };
460
+ } else if (result.value === void 0) {
461
+ if (key in input)
462
+ final.value[key] = void 0;
463
+ } else {
464
+ final.value[key] = result.value;
465
+ }
217
466
  }
218
- // @__NO_SIDE_EFFECTS__
219
- function object(entries, message) {
220
- return {
221
- kind: "schema",
222
- type: "object",
223
- reference: object,
224
- expects: "Object",
225
- async: false,
226
- entries,
227
- message,
228
- get "~standard"() {
229
- return /* @__PURE__ */ _getStandardProps(this);
230
- },
231
- "~run"(dataset, config2) {
232
- const input = dataset.value;
233
- if (input && typeof input === "object") {
234
- dataset.typed = true;
235
- dataset.value = {};
236
- for (const key in this.entries) {
237
- const valueSchema = this.entries[key];
238
- if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && // @ts-expect-error
239
- valueSchema.default !== void 0) {
240
- const value2 = key in input ? (
241
- // @ts-expect-error
242
- input[key]
243
- ) : /* @__PURE__ */ getDefault(valueSchema);
244
- const valueDataset = valueSchema["~run"]({ value: value2 }, config2);
245
- if (valueDataset.issues) {
246
- const pathItem = {
247
- type: "object",
248
- origin: "value",
249
- input,
250
- key,
251
- value: value2
252
- };
253
- for (const issue of valueDataset.issues) {
254
- if (issue.path) {
255
- issue.path.unshift(pathItem);
256
- } else {
257
- issue.path = [pathItem];
258
- }
259
- dataset.issues?.push(issue);
260
- }
261
- if (!dataset.issues) {
262
- dataset.issues = valueDataset.issues;
263
- }
264
- if (config2.abortEarly) {
265
- dataset.typed = false;
266
- break;
267
- }
268
- }
269
- if (!valueDataset.typed) {
270
- dataset.typed = false;
271
- }
272
- dataset.value[key] = valueDataset.value;
273
- } else if (valueSchema.fallback !== void 0) {
274
- dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
275
- } else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
276
- _addIssue(this, "key", dataset, config2, {
277
- input: void 0,
278
- expected: `"${key}"`,
279
- path: [
280
- {
281
- type: "object",
282
- origin: "key",
283
- input,
284
- key,
285
- // @ts-expect-error
286
- value: input[key]
287
- }
288
- ]
289
- });
290
- if (config2.abortEarly) {
291
- break;
467
+ var $ZodObjectLike = /* @__PURE__ */ $constructor("$ZodObjectLike", (inst, def) => {
468
+ $ZodType.init(inst, def);
469
+ defineLazy(inst._zod, "shape", () => def.shape);
470
+ const _normalized = cached(() => {
471
+ const keys = Object.keys(def.shape);
472
+ return {
473
+ shape: def.shape,
474
+ keys,
475
+ keySet: new Set(keys),
476
+ numKeys: keys.length,
477
+ optionalKeys: new Set(def.optional)
478
+ };
479
+ });
480
+ defineLazy(inst._zod, "disc", () => {
481
+ const shape = def.shape;
482
+ const discMap = /* @__PURE__ */ new Map();
483
+ let hasDisc = false;
484
+ for (const key in shape) {
485
+ const field = shape[key]._zod;
486
+ if (field.values || field.disc) {
487
+ hasDisc = true;
488
+ const o = {
489
+ values: new Set(field.values ?? []),
490
+ maps: field.disc ? [field.disc] : []
491
+ };
492
+ discMap.set(key, o);
493
+ }
494
+ }
495
+ if (!hasDisc)
496
+ return void 0;
497
+ return discMap;
498
+ });
499
+ const generateFastpass = (shape) => {
500
+ const doc = new Doc(["shape", "payload", "ctx"]);
501
+ const { keys, optionalKeys } = _normalized.value;
502
+ const parseStr = (key) => {
503
+ const k = esc(key);
504
+ return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
505
+ };
506
+ doc.write(`const input = payload.value;`);
507
+ const ids = {};
508
+ for (const key of keys) {
509
+ ids[key] = randomString(15);
510
+ }
511
+ for (const key of keys) {
512
+ if (optionalKeys.has(key))
513
+ continue;
514
+ const id = ids[key];
515
+ doc.write(`const ${id} = ${parseStr(key)};`);
516
+ doc.write(`
517
+ if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
518
+ ...iss,
519
+ path: iss.path ? [${esc(key)}, ...iss.path] : [${esc(key)}]
520
+ })));`);
521
+ }
522
+ doc.write(`payload.value = {`);
523
+ doc.indented(() => {
524
+ for (const key of keys) {
525
+ if (optionalKeys.has(key))
526
+ continue;
527
+ const id = ids[key];
528
+ doc.write(` ${esc(key)}: ${id}.value,`);
529
+ }
530
+ });
531
+ doc.write(`}`);
532
+ for (const key of keys) {
533
+ if (!optionalKeys.has(key))
534
+ continue;
535
+ const id = ids[key];
536
+ doc.write(`const ${id} = ${parseStr(key)};`);
537
+ const k = esc(key);
538
+ doc.write(`
539
+ if (${id}.issues.length) {
540
+ if (input[${k}] === undefined) {
541
+ if (${k} in input) {
542
+ payload.value[${k}] = undefined;
292
543
  }
544
+ } else {
545
+ payload.issues = payload.issues.concat(
546
+ ${id}.issues.map((iss) => ({
547
+ ...iss,
548
+ path: iss.path ? [${k}, ...iss.path] : [${k}],
549
+ }))
550
+ );
551
+ }
552
+ } else if (${id}.value === undefined) {
553
+ if (${k} in input) payload.value[${k}] = undefined;
554
+ } else {
555
+ payload.value[${k}] = ${id}.value;
556
+ }
557
+ `);
558
+ }
559
+ doc.write(`return payload;`);
560
+ const fn = doc.compile();
561
+ return (payload, ctx) => fn(shape, payload, ctx);
562
+ };
563
+ let fastpass;
564
+ const fastEnabled = allowsEval.value;
565
+ const isObject2 = isObject;
566
+ const { catchall } = def;
567
+ inst._zod.parse = (payload, ctx) => {
568
+ const input = payload.value;
569
+ if (!isObject2(input)) {
570
+ payload.issues.push({
571
+ expected: "object",
572
+ code: "invalid_type",
573
+ input,
574
+ inst
575
+ });
576
+ return payload;
577
+ }
578
+ const proms = [];
579
+ if (fastEnabled && ctx?.async === false && ctx.noPrecompilation !== true) {
580
+ if (!fastpass)
581
+ fastpass = generateFastpass(def.shape);
582
+ payload = fastpass(payload, ctx);
583
+ } else {
584
+ payload.value = {};
585
+ const { keys, shape, optionalKeys } = _normalized.value;
586
+ for (const key of keys) {
587
+ const valueSchema = shape[key];
588
+ const r = valueSchema._zod.run({ value: input[key], issues: [] }, ctx);
589
+ const isOptional = optionalKeys.has(key);
590
+ if (r instanceof Promise) {
591
+ proms.push(r.then((r2) => isOptional ? handleOptionalObjectResult(r2, payload, key, input) : handleObjectResult(r2, payload, key)));
592
+ } else {
593
+ if (isOptional) {
594
+ handleOptionalObjectResult(r, payload, key, input);
595
+ } else {
596
+ handleObjectResult(r, payload, key);
293
597
  }
294
598
  }
599
+ }
600
+ }
601
+ if (!catchall) {
602
+ return proms.length ? Promise.all(proms).then(() => payload) : payload;
603
+ }
604
+ const unrecognized = [];
605
+ for (const key of Object.keys(input)) {
606
+ if (_normalized.value.keySet.has(key))
607
+ continue;
608
+ if (catchall._zod.def.type === "never") {
609
+ unrecognized.push(key);
610
+ continue;
611
+ }
612
+ const r = catchall._zod.run({ value: input[key], issues: [] }, ctx);
613
+ if (r instanceof Promise) {
614
+ proms.push(r.then((r2) => handleObjectResult(r2, payload, key)));
295
615
  } else {
296
- _addIssue(this, "type", dataset, config2);
616
+ handleObjectResult(r, payload, key);
297
617
  }
298
- return dataset;
299
618
  }
619
+ if (unrecognized.length) {
620
+ payload.issues.push({
621
+ code: "unrecognized_keys",
622
+ keys: unrecognized,
623
+ input,
624
+ inst
625
+ });
626
+ }
627
+ if (!proms.length)
628
+ return payload;
629
+ return Promise.all(proms).then(() => {
630
+ return payload;
631
+ });
300
632
  };
301
- }
302
- // @__NO_SIDE_EFFECTS__
303
- function optional(wrapped, default_) {
304
- return {
305
- kind: "schema",
306
- type: "optional",
307
- reference: optional,
308
- expects: `(${wrapped.expects} | undefined)`,
309
- async: false,
310
- wrapped,
311
- default: default_,
312
- get "~standard"() {
313
- return /* @__PURE__ */ _getStandardProps(this);
314
- },
315
- "~run"(dataset, config2) {
316
- if (dataset.value === void 0) {
317
- if (this.default !== void 0) {
318
- dataset.value = /* @__PURE__ */ getDefault(this, dataset, config2);
319
- }
320
- if (dataset.value === void 0) {
321
- dataset.typed = true;
322
- return dataset;
323
- }
324
- }
325
- return this.wrapped["~run"](dataset, config2);
633
+ });
634
+ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
635
+ $ZodObjectLike.init(inst, def);
636
+ });
637
+ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
638
+ $ZodType.init(inst, def);
639
+ inst._zod.qout = "true";
640
+ if (def.innerType._zod.values)
641
+ inst._zod.values = /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]);
642
+ const pattern = def.innerType._zod.pattern;
643
+ if (pattern)
644
+ inst._zod.pattern = new RegExp(`^(${cleanRegex(pattern.source)})?$`);
645
+ inst._zod.parse = (payload, ctx) => {
646
+ if (payload.value === void 0) {
647
+ return payload;
326
648
  }
649
+ return def.innerType._zod.run(payload, ctx);
327
650
  };
328
- }
329
- // @__NO_SIDE_EFFECTS__
330
- function string(message) {
331
- return {
332
- kind: "schema",
651
+ });
652
+
653
+ // ../../node_modules/.pnpm/@zod+core@0.1.0/node_modules/@zod/core/dist/esm/api.js
654
+ function _string(Class, params) {
655
+ return new Class({
333
656
  type: "string",
334
- reference: string,
335
- expects: "string",
336
- async: false,
337
- message,
338
- get "~standard"() {
339
- return /* @__PURE__ */ _getStandardProps(this);
657
+ ...normalizeParams(params)
658
+ });
659
+ }
660
+ function _boolean(Class, params) {
661
+ return new Class({
662
+ type: "boolean",
663
+ ...normalizeParams(params)
664
+ });
665
+ }
666
+
667
+ // ../../node_modules/.pnpm/@zod+mini@4.0.0-beta.0/node_modules/@zod/mini/dist/esm/parse.js
668
+ var parse2 = /* @__PURE__ */ _parse.bind({ Error: $ZodError });
669
+ var safeParse = /* @__PURE__ */ _safeParse.bind({ Error: $ZodError });
670
+ var parseAsync2 = /* @__PURE__ */ _parseAsync.bind({ Error: $ZodError });
671
+ var safeParseAsync = /* @__PURE__ */ _safeParseAsync.bind({
672
+ Error: $ZodError
673
+ });
674
+
675
+ // ../../node_modules/.pnpm/@zod+mini@4.0.0-beta.0/node_modules/@zod/mini/dist/esm/schemas.js
676
+ var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
677
+ if (!inst._zod)
678
+ throw new Error("Uninitialized schema in mixin ZodMiniType.");
679
+ $ZodType.init(inst, def);
680
+ inst.def = def;
681
+ inst.parse = (data, params) => parse2(inst, data, params);
682
+ inst.safeParse = (data, params) => safeParse(inst, data, params);
683
+ inst.parseAsync = async (data, params) => parseAsync2(inst, data, params);
684
+ inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
685
+ inst.check = (...checks) => {
686
+ return inst.clone({
687
+ ...def,
688
+ checks: [
689
+ ...def.checks ?? [],
690
+ ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" } } } : ch)
691
+ ]
692
+ });
693
+ };
694
+ inst.clone = (_def) => clone(inst, _def ?? def);
695
+ inst.brand = () => inst;
696
+ inst.register = (reg, meta) => {
697
+ reg.add(inst, meta);
698
+ return inst;
699
+ };
700
+ });
701
+ var ZodMiniString = /* @__PURE__ */ $constructor("ZodMiniString", (inst, def) => {
702
+ $ZodString.init(inst, def);
703
+ ZodMiniType.init(inst, def);
704
+ });
705
+ function string2(params) {
706
+ return _string(ZodMiniString, params);
707
+ }
708
+ var ZodMiniBoolean = /* @__PURE__ */ $constructor("ZodMiniBoolean", (inst, def) => {
709
+ $ZodBoolean.init(inst, def);
710
+ ZodMiniType.init(inst, def);
711
+ });
712
+ function boolean2(params) {
713
+ return _boolean(ZodMiniBoolean, params);
714
+ }
715
+ var ZodMiniArray = /* @__PURE__ */ $constructor("ZodMiniArray", (inst, def) => {
716
+ $ZodArray.init(inst, def);
717
+ ZodMiniType.init(inst, def);
718
+ });
719
+ function array(element, params) {
720
+ return new ZodMiniArray({
721
+ type: "array",
722
+ element,
723
+ // get element() {
724
+ // return element;
725
+ // },
726
+ ...normalizeParams(params)
727
+ });
728
+ }
729
+ var ZodMiniObject = /* @__PURE__ */ $constructor("ZodMiniObject", (inst, def) => {
730
+ $ZodObject.init(inst, def);
731
+ ZodMiniType.init(inst, def);
732
+ });
733
+ function object(shape, params) {
734
+ const def = {
735
+ type: "object",
736
+ shape: shape ?? {},
737
+ get optional() {
738
+ return optionalObjectKeys(shape ?? {});
340
739
  },
341
- "~run"(dataset, config2) {
342
- if (typeof dataset.value === "string") {
343
- dataset.typed = true;
344
- } else {
345
- _addIssue(this, "type", dataset, config2);
346
- }
347
- return dataset;
348
- }
740
+ ...normalizeParams(params)
349
741
  };
742
+ return new ZodMiniObject(def);
350
743
  }
351
- function parse(schema, input, config2) {
352
- const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config2));
353
- if (dataset.issues) {
354
- throw new ValiError(dataset.issues);
355
- }
356
- return dataset.value;
744
+ var ZodMiniOptional = /* @__PURE__ */ $constructor("ZodMiniOptional", (inst, def) => {
745
+ $ZodOptional.init(inst, def);
746
+ ZodMiniType.init(inst, def);
747
+ });
748
+ function optional(innerType, params) {
749
+ return new ZodMiniOptional({
750
+ type: "optional",
751
+ innerType,
752
+ ...normalizeParams(params)
753
+ });
357
754
  }
358
755
 
359
756
  // ../shared/src/schemas.ts
@@ -363,26 +760,26 @@ var CustomComponentPropSchema = object({
363
760
  * @example
364
761
  * "to"
365
762
  */
366
- name: string(),
763
+ name: string2(),
367
764
  /**
368
765
  * The name of the prop in the host component.
369
766
  * @example
370
767
  * "href"
371
768
  */
372
- as: optional(string()),
769
+ as: optional(string2()),
373
770
  /**
374
771
  * Whether the prop is controlled or not in the user-defined component.
375
772
  * @internal
376
773
  * @example
377
774
  * `true`
378
775
  */
379
- controlled: optional(boolean()),
776
+ controlled: optional(boolean2()),
380
777
  /**
381
778
  * The default value of the prop in the user-defined component.
382
779
  * @example
383
780
  * `"/"`
384
781
  */
385
- defaultValue: optional(string())
782
+ defaultValue: optional(string2())
386
783
  });
387
784
  var CustomComponentSchema = object({
388
785
  /**
@@ -390,13 +787,13 @@ var CustomComponentSchema = object({
390
787
  * @example
391
788
  * "Link"
392
789
  */
393
- name: string(),
790
+ name: string2(),
394
791
  /**
395
792
  * The name of the host component that the user-defined component represents.
396
793
  * @example
397
794
  * "a"
398
795
  */
399
- as: optional(string()),
796
+ as: optional(string2()),
400
797
  /**
401
798
  * Attributes mapping between the user-defined component and the host component.
402
799
  * @example
@@ -409,28 +806,28 @@ var CustomComponentSchema = object({
409
806
  * @example
410
807
  * `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
411
808
  */
412
- selector: optional(string())
809
+ selector: optional(string2())
413
810
  });
414
811
  var CustomHooksSchema = object({
415
- use: optional(array(string())),
416
- useActionState: optional(array(string())),
417
- useCallback: optional(array(string())),
418
- useContext: optional(array(string())),
419
- useDebugValue: optional(array(string())),
420
- useDeferredValue: optional(array(string())),
421
- useEffect: optional(array(string())),
422
- useFormStatus: optional(array(string())),
423
- useId: optional(array(string())),
424
- useImperativeHandle: optional(array(string())),
425
- useInsertionEffect: optional(array(string())),
426
- useLayoutEffect: optional(array(string())),
427
- useMemo: optional(array(string())),
428
- useOptimistic: optional(array(string())),
429
- useReducer: optional(array(string())),
430
- useRef: optional(array(string())),
431
- useState: optional(array(string())),
432
- useSyncExternalStore: optional(array(string())),
433
- useTransition: optional(array(string()))
812
+ use: optional(array(string2())),
813
+ useActionState: optional(array(string2())),
814
+ useCallback: optional(array(string2())),
815
+ useContext: optional(array(string2())),
816
+ useDebugValue: optional(array(string2())),
817
+ useDeferredValue: optional(array(string2())),
818
+ useEffect: optional(array(string2())),
819
+ useFormStatus: optional(array(string2())),
820
+ useId: optional(array(string2())),
821
+ useImperativeHandle: optional(array(string2())),
822
+ useInsertionEffect: optional(array(string2())),
823
+ useLayoutEffect: optional(array(string2())),
824
+ useMemo: optional(array(string2())),
825
+ useOptimistic: optional(array(string2())),
826
+ useReducer: optional(array(string2())),
827
+ useRef: optional(array(string2())),
828
+ useState: optional(array(string2())),
829
+ useSyncExternalStore: optional(array(string2())),
830
+ useTransition: optional(array(string2()))
434
831
  });
435
832
  var ESLintReactSettingsSchema = object({
436
833
  /**
@@ -439,43 +836,43 @@ var ESLintReactSettingsSchema = object({
439
836
  * @default `"react"`
440
837
  * @example `"@pika/react"`
441
838
  */
442
- importSource: optional(string()),
839
+ importSource: optional(string2()),
443
840
  /**
444
841
  * The identifier that's used for JSX Element creation.
445
842
  * @default `"createElement"`
446
843
  * @deprecated
447
844
  */
448
- jsxPragma: optional(string()),
845
+ jsxPragma: optional(string2()),
449
846
  /**
450
847
  * The identifier that's used for JSX fragment elements.
451
848
  * @description This should not be a member expression (i.e. use "Fragment" instead of "React.Fragment").
452
849
  * @default `"Fragment"`
453
850
  * @deprecated
454
851
  */
455
- jsxPragmaFrag: optional(string()),
852
+ jsxPragmaFrag: optional(string2()),
456
853
  /**
457
854
  * The name of the prop that is used for polymorphic components.
458
855
  * @description This is used to determine the type of the component.
459
856
  * @example `"as"`
460
857
  */
461
- polymorphicPropName: optional(string()),
858
+ polymorphicPropName: optional(string2()),
462
859
  /**
463
860
  * @internal
464
861
  */
465
- strict: optional(boolean(), false),
862
+ strict: optional(boolean2()),
466
863
  /**
467
864
  * Check both the shape and the import to determine if an API is from React.
468
865
  * @description This can prevent false positives when using a irrelevant third-party library that has similar APIs to React.
469
866
  * @default `true`
470
867
  */
471
- skipImportCheck: optional(boolean(), true),
868
+ skipImportCheck: optional(boolean2()),
472
869
  /**
473
870
  * React version to use, "detect" means auto detect React version from the project's dependencies.
474
871
  * If `importSource` is specified, an equivalent version of React should be provided here.
475
872
  * @example `"18.3.1"`
476
873
  * @default `"detect"`
477
874
  */
478
- version: optional(string()),
875
+ version: optional(string2()),
479
876
  /**
480
877
  * A object to define additional hooks that are equivalent to the built-in React Hooks.
481
878
  * @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
@@ -489,8 +886,16 @@ var ESLintReactSettingsSchema = object({
489
886
  */
490
887
  additionalComponents: optional(array(CustomComponentSchema))
491
888
  });
889
+ optional(
890
+ object({
891
+ "react-x": optional(ESLintReactSettingsSchema),
892
+ /** @deprecated Use `react-x` instead */
893
+ reactOptions: optional(ESLintReactSettingsSchema)
894
+ }),
895
+ {}
896
+ );
492
897
  var DEFAULT_ESLINT_REACT_SETTINGS = {
493
- ...parse(ESLintReactSettingsSchema, {}),
898
+ ...parse2(ESLintReactSettingsSchema, {}),
494
899
  importSource: "react"};
495
900
  function getInstanceId(node, prev) {
496
901
  switch (true) {
@@ -626,11 +1031,7 @@ var isForwardRefCall = isReactAPICall("forwardRef");
626
1031
  var isMemoCall = isReactAPICall("memo");
627
1032
 
628
1033
  // src/hook/hook-name.ts
629
- var RE_HOOK_NAME = /^use[A-Z\d]/u;
630
1034
  function isReactHookName(name) {
631
- return name === "use" || RE_HOOK_NAME.test(name);
632
- }
633
- function isReactHookNameLoose(name) {
634
1035
  return name.startsWith("use");
635
1036
  }
636
1037
 
@@ -1035,13 +1436,11 @@ function getComponentFlagFromInitPath(initPath) {
1035
1436
  }
1036
1437
  return flag;
1037
1438
  }
1038
- var RE_COMPONENT_NAME = /^[A-Z]/u;
1039
- var RE_COMPONENT_NAME_LOOSE = /^_?[A-Z]/u;
1040
1439
  function isComponentName(name) {
1041
- return RE_COMPONENT_NAME.test(name);
1440
+ return RE.COMPONENT_NAME.test(name);
1042
1441
  }
1043
1442
  function isComponentNameLoose(name) {
1044
- return RE_COMPONENT_NAME_LOOSE.test(name);
1443
+ return RE.COMPONENT_NAME_LOOSE.test(name);
1045
1444
  }
1046
1445
  function getComponentNameFromId(id) {
1047
1446
  if (id == null) return _;
@@ -1093,7 +1492,7 @@ function useComponentCollector(context, options = {}) {
1093
1492
  const listeners = {
1094
1493
  ":function[type]": onFunctionEnter,
1095
1494
  ":function[type]:exit": onFunctionExit,
1096
- "ArrowFunctionExpression[type][body.type!='BlockStatement']"() {
1495
+ "ArrowFunctionExpression[body.type!='BlockStatement']"() {
1097
1496
  const entry = getCurrentEntry();
1098
1497
  if (entry == null) return;
1099
1498
  const { body } = entry.node;
@@ -1117,7 +1516,7 @@ function useComponentCollector(context, options = {}) {
1117
1516
  });
1118
1517
  },
1119
1518
  ...collectDisplayName ? {
1120
- [DISPLAY_NAME_ASSIGNMENT_SELECTOR](node) {
1519
+ [SEL.DISPLAY_NAME_ASSIGNMENT_EXPRESSION](node) {
1121
1520
  const { left, right } = node;
1122
1521
  if (left.type !== AST_NODE_TYPES.MemberExpression) return;
1123
1522
  const componentName = left.object.type === AST_NODE_TYPES.Identifier ? left.object.name : _;
@@ -1244,4 +1643,4 @@ function isAssignmentToThisState(node) {
1244
1643
  return left.type === AST_NODE_TYPES.MemberExpression && AST6.isThisExpression(left.object) && AST6.getPropertyName(left.property) === "state";
1245
1644
  }
1246
1645
 
1247
- export { ComponentDetectionHint, ComponentFlag, ComponentPhaseRelevance, DEFAULT_COMPONENT_DETECTION_HINT, DISPLAY_NAME_ASSIGNMENT_SELECTOR, RE_COMPONENT_NAME, RE_COMPONENT_NAME_LOOSE, RE_HOOK_NAME, getComponentFlagFromInitPath, getComponentNameFromId, getFunctionComponentId, getInstanceId, hasNoneOrLooseComponentName, isAssignmentToThisState, isCallFromReact, isCallFromReactObject, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDidCatch, isComponentDidMount, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFromReact, isFromReactLoose, isFromReactObject, isFromReactStrict, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfRender, isFunctionOfRenderMethod, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isInitializedFromReact, isInsideRenderMethod, isInstanceIdEqual, isInversePhase, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isReactHookNameLoose, isRenderFunctionLoose, isRenderLike, isRenderMethodLike, isRenderPropLoose, isShouldComponentUpdate, isThisSetState, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUseActionStateCall, isUseCall, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseFormStatusCall, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseOptimisticCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, isValidComponentDefinition, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
1646
+ export { ComponentDetectionHint, ComponentFlag, ComponentPhaseRelevance, DEFAULT_COMPONENT_DETECTION_HINT, getComponentFlagFromInitPath, getComponentNameFromId, getFunctionComponentId, getInstanceId, hasNoneOrLooseComponentName, isAssignmentToThisState, isCallFromReact, isCallFromReactObject, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCloneElement, isCloneElementCall, isComponentDidCatch, isComponentDidMount, isComponentDidUpdate, isComponentName, isComponentNameLoose, isComponentWillMount, isComponentWillReceiveProps, isComponentWillUnmount, isComponentWillUpdate, isComponentWrapperCall, isComponentWrapperCallLoose, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFromReact, isFromReactLoose, isFromReactObject, isFromReactStrict, isFunctionOfComponentDidMount, isFunctionOfComponentWillUnmount, isFunctionOfRender, isFunctionOfRenderMethod, isFunctionOfUseEffectCleanup, isFunctionOfUseEffectSetup, isGetChildContext, isGetDefaultProps, isGetDerivedStateFromError, isGetDerivedStateFromProps, isGetInitialState, isGetSnapshotBeforeUpdate, isInitializedFromReact, isInsideRenderMethod, isInstanceIdEqual, isInversePhase, isMemo, isMemoCall, isPureComponent, isReactAPI, isReactAPICall, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderLike, isRenderMethodLike, isRenderPropLoose, isShouldComponentUpdate, isThisSetState, isUnsafeComponentWillMount, isUnsafeComponentWillReceiveProps, isUnsafeComponentWillUpdate, isUseActionStateCall, isUseCall, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseFormStatusCall, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseOptimisticCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, isValidComponentDefinition, useComponentCollector, useComponentCollectorLegacy, useHookCollector };