@eslint-react/jsx 1.5.11-next.9 → 1.5.12-beta.10
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.d.mts +4 -76
- package/dist/index.d.ts +4 -76
- package/dist/index.js +922 -362
- package/dist/index.mjs +923 -340
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -1,23 +1,46 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var types = require('@typescript-eslint/types');
|
|
3
4
|
var ast = require('@eslint-react/ast');
|
|
4
|
-
var shared = require('@eslint-react/shared');
|
|
5
|
-
var memo = require('micro-memoize');
|
|
6
5
|
var _var = require('@eslint-react/var');
|
|
7
|
-
var types = require('@typescript-eslint/types');
|
|
8
6
|
require('@typescript-eslint/utils');
|
|
9
7
|
|
|
10
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
-
|
|
12
|
-
var memo__default = /*#__PURE__*/_interopDefault(memo);
|
|
13
|
-
|
|
14
8
|
var __defProp = Object.defineProperty;
|
|
15
9
|
var __export = (target, all3) => {
|
|
16
10
|
for (var name in all3)
|
|
17
11
|
__defProp(target, name, { get: all3[name], enumerable: true });
|
|
18
12
|
};
|
|
13
|
+
function resolveMemberExpressions(object, property) {
|
|
14
|
+
if (object.type === types.AST_NODE_TYPES.JSXMemberExpression) {
|
|
15
|
+
return `${resolveMemberExpressions(object.object, object.property)}.${property.name}`;
|
|
16
|
+
}
|
|
17
|
+
if (object.type === types.AST_NODE_TYPES.JSXNamespacedName) {
|
|
18
|
+
return `${object.namespace.name}:${object.name.name}.${property.name}`;
|
|
19
|
+
}
|
|
20
|
+
return `${object.name}.${property.name}`;
|
|
21
|
+
}
|
|
22
|
+
function elementType(node) {
|
|
23
|
+
if (node.type === types.AST_NODE_TYPES.JSXOpeningFragment) {
|
|
24
|
+
return "<>";
|
|
25
|
+
}
|
|
26
|
+
const { name } = node;
|
|
27
|
+
if (name.type === types.AST_NODE_TYPES.JSXMemberExpression) {
|
|
28
|
+
const { object, property } = name;
|
|
29
|
+
return resolveMemberExpressions(object, property);
|
|
30
|
+
}
|
|
31
|
+
if (name.type === types.AST_NODE_TYPES.JSXNamespacedName) {
|
|
32
|
+
return `${name.namespace.name}:${name.name.name}`;
|
|
33
|
+
}
|
|
34
|
+
return name.name;
|
|
35
|
+
}
|
|
36
|
+
function isJSXElementOfUserDefinedComponent(node) {
|
|
37
|
+
return node.openingElement.name.type === ast.NodeType.JSXIdentifier && /^[A-Z]/u.test(node.openingElement.name.name);
|
|
38
|
+
}
|
|
39
|
+
function isJSXElementOfBuiltinComponent(node) {
|
|
40
|
+
return node.openingElement.name.type === ast.NodeType.JSXIdentifier && node.openingElement.name.name.toLowerCase() === node.openingElement.name.name && /^[a-z]/u.test(node.openingElement.name.name);
|
|
41
|
+
}
|
|
19
42
|
|
|
20
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
43
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Function.js
|
|
21
44
|
var Function_exports = {};
|
|
22
45
|
__export(Function_exports, {
|
|
23
46
|
SK: () => SK,
|
|
@@ -192,25 +215,164 @@ function flow(ab, bc, cd, de, ef, fg, gh, hi, ij) {
|
|
|
192
215
|
var hole = /* @__PURE__ */ unsafeCoerce(absurd);
|
|
193
216
|
var SK = (_2, b2) => b2;
|
|
194
217
|
|
|
195
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
218
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Array.js
|
|
219
|
+
var Array_exports = {};
|
|
220
|
+
__export(Array_exports, {
|
|
221
|
+
allocate: () => allocate,
|
|
222
|
+
append: () => append,
|
|
223
|
+
appendAll: () => appendAll,
|
|
224
|
+
cartesian: () => cartesian,
|
|
225
|
+
cartesianWith: () => cartesianWith,
|
|
226
|
+
chop: () => chop,
|
|
227
|
+
chunksOf: () => chunksOf,
|
|
228
|
+
contains: () => contains2,
|
|
229
|
+
containsWith: () => containsWith2,
|
|
230
|
+
copy: () => copy,
|
|
231
|
+
dedupe: () => dedupe,
|
|
232
|
+
dedupeAdjacent: () => dedupeAdjacent,
|
|
233
|
+
dedupeAdjacentWith: () => dedupeAdjacentWith,
|
|
234
|
+
dedupeWith: () => dedupeWith,
|
|
235
|
+
difference: () => difference,
|
|
236
|
+
differenceWith: () => differenceWith,
|
|
237
|
+
drop: () => drop,
|
|
238
|
+
dropRight: () => dropRight,
|
|
239
|
+
dropWhile: () => dropWhile,
|
|
240
|
+
empty: () => empty2,
|
|
241
|
+
every: () => every2,
|
|
242
|
+
extend: () => extend,
|
|
243
|
+
filter: () => filter2,
|
|
244
|
+
filterMap: () => filterMap2,
|
|
245
|
+
filterMapWhile: () => filterMapWhile,
|
|
246
|
+
findFirst: () => findFirst2,
|
|
247
|
+
findFirstIndex: () => findFirstIndex,
|
|
248
|
+
findLast: () => findLast,
|
|
249
|
+
findLastIndex: () => findLastIndex,
|
|
250
|
+
flatMap: () => flatMap2,
|
|
251
|
+
flatMapNullable: () => flatMapNullable2,
|
|
252
|
+
flatten: () => flatten2,
|
|
253
|
+
forEach: () => forEach,
|
|
254
|
+
fromIterable: () => fromIterable2,
|
|
255
|
+
fromNullable: () => fromNullable2,
|
|
256
|
+
fromOption: () => fromOption2,
|
|
257
|
+
fromRecord: () => fromRecord,
|
|
258
|
+
get: () => get,
|
|
259
|
+
getEquivalence: () => getEquivalence2,
|
|
260
|
+
getLefts: () => getLefts,
|
|
261
|
+
getOrder: () => getOrder2,
|
|
262
|
+
getRights: () => getRights,
|
|
263
|
+
getSomes: () => getSomes,
|
|
264
|
+
group: () => group,
|
|
265
|
+
groupBy: () => groupBy,
|
|
266
|
+
groupWith: () => groupWith,
|
|
267
|
+
head: () => head,
|
|
268
|
+
headNonEmpty: () => headNonEmpty,
|
|
269
|
+
init: () => init,
|
|
270
|
+
initNonEmpty: () => initNonEmpty,
|
|
271
|
+
insertAt: () => insertAt,
|
|
272
|
+
intersection: () => intersection,
|
|
273
|
+
intersectionWith: () => intersectionWith,
|
|
274
|
+
intersperse: () => intersperse,
|
|
275
|
+
isArray: () => isArray,
|
|
276
|
+
isEmptyArray: () => isEmptyArray,
|
|
277
|
+
isEmptyReadonlyArray: () => isEmptyReadonlyArray,
|
|
278
|
+
isNonEmptyArray: () => isNonEmptyArray2,
|
|
279
|
+
isNonEmptyReadonlyArray: () => isNonEmptyReadonlyArray,
|
|
280
|
+
join: () => join,
|
|
281
|
+
last: () => last,
|
|
282
|
+
lastNonEmpty: () => lastNonEmpty,
|
|
283
|
+
length: () => length,
|
|
284
|
+
liftEither: () => liftEither,
|
|
285
|
+
liftNullable: () => liftNullable2,
|
|
286
|
+
liftOption: () => liftOption,
|
|
287
|
+
liftPredicate: () => liftPredicate2,
|
|
288
|
+
make: () => make4,
|
|
289
|
+
makeBy: () => makeBy,
|
|
290
|
+
map: () => map2,
|
|
291
|
+
mapAccum: () => mapAccum,
|
|
292
|
+
match: () => match2,
|
|
293
|
+
matchLeft: () => matchLeft,
|
|
294
|
+
matchRight: () => matchRight,
|
|
295
|
+
max: () => max2,
|
|
296
|
+
min: () => min2,
|
|
297
|
+
modify: () => modify,
|
|
298
|
+
modifyNonEmptyHead: () => modifyNonEmptyHead,
|
|
299
|
+
modifyNonEmptyLast: () => modifyNonEmptyLast,
|
|
300
|
+
modifyOption: () => modifyOption,
|
|
301
|
+
of: () => of,
|
|
302
|
+
partition: () => partition,
|
|
303
|
+
partitionMap: () => partitionMap2,
|
|
304
|
+
prepend: () => prepend,
|
|
305
|
+
prependAll: () => prependAll,
|
|
306
|
+
range: () => range,
|
|
307
|
+
reduce: () => reduce,
|
|
308
|
+
reduceRight: () => reduceRight,
|
|
309
|
+
remove: () => remove,
|
|
310
|
+
replace: () => replace,
|
|
311
|
+
replaceOption: () => replaceOption,
|
|
312
|
+
replicate: () => replicate,
|
|
313
|
+
reverse: () => reverse,
|
|
314
|
+
rotate: () => rotate,
|
|
315
|
+
scan: () => scan,
|
|
316
|
+
scanRight: () => scanRight,
|
|
317
|
+
separate: () => separate,
|
|
318
|
+
setNonEmptyHead: () => setNonEmptyHead,
|
|
319
|
+
setNonEmptyLast: () => setNonEmptyLast,
|
|
320
|
+
some: () => some4,
|
|
321
|
+
sort: () => sort,
|
|
322
|
+
sortBy: () => sortBy,
|
|
323
|
+
sortWith: () => sortWith,
|
|
324
|
+
span: () => span,
|
|
325
|
+
split: () => split,
|
|
326
|
+
splitAt: () => splitAt,
|
|
327
|
+
splitNonEmptyAt: () => splitNonEmptyAt,
|
|
328
|
+
splitWhere: () => splitWhere,
|
|
329
|
+
tail: () => tail,
|
|
330
|
+
tailNonEmpty: () => tailNonEmpty,
|
|
331
|
+
take: () => take,
|
|
332
|
+
takeRight: () => takeRight,
|
|
333
|
+
takeWhile: () => takeWhile,
|
|
334
|
+
unappend: () => unappend,
|
|
335
|
+
unfold: () => unfold,
|
|
336
|
+
union: () => union,
|
|
337
|
+
unionWith: () => unionWith,
|
|
338
|
+
unprepend: () => unprepend,
|
|
339
|
+
unsafeGet: () => unsafeGet,
|
|
340
|
+
unzip: () => unzip,
|
|
341
|
+
zip: () => zip,
|
|
342
|
+
zipWith: () => zipWith2
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Equivalence.js
|
|
196
346
|
var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
347
|
+
var array = (item) => make((self, that) => {
|
|
348
|
+
if (self.length !== that.length) {
|
|
349
|
+
return false;
|
|
350
|
+
}
|
|
351
|
+
for (let i2 = 0; i2 < self.length; i2++) {
|
|
352
|
+
const isEq = item(self[i2], that[i2]);
|
|
353
|
+
if (!isEq) {
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return true;
|
|
358
|
+
});
|
|
197
359
|
|
|
198
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
199
|
-
var let_ = (
|
|
360
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/internal/doNotation.js
|
|
361
|
+
var let_ = (map3) => dual(3, (self, name, f2) => map3(self, (a2) => Object.assign({}, a2, {
|
|
200
362
|
[name]: f2(a2)
|
|
201
363
|
})));
|
|
202
|
-
var bindTo = (
|
|
364
|
+
var bindTo = (map3) => dual(2, (self, name) => map3(self, (a2) => ({
|
|
203
365
|
[name]: a2
|
|
204
366
|
})));
|
|
205
|
-
var bind = (
|
|
367
|
+
var bind = (map3, flatMap3) => dual(3, (self, name, f2) => flatMap3(self, (a2) => map3(f2(a2), (b2) => Object.assign({}, a2, {
|
|
206
368
|
[name]: b2
|
|
207
369
|
}))));
|
|
208
370
|
|
|
209
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
210
|
-
var moduleVersion = "3.1.
|
|
371
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/internal/version.js
|
|
372
|
+
var moduleVersion = "3.1.5";
|
|
211
373
|
var getCurrentVersion = () => moduleVersion;
|
|
212
374
|
|
|
213
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
375
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/GlobalValue.js
|
|
214
376
|
var globalStoreId = /* @__PURE__ */ Symbol.for(`effect/GlobalValue/globalStoreId/${/* @__PURE__ */ getCurrentVersion()}`);
|
|
215
377
|
if (!(globalStoreId in globalThis)) {
|
|
216
378
|
globalThis[globalStoreId] = /* @__PURE__ */ new Map();
|
|
@@ -223,7 +385,7 @@ var globalValue = (id, compute) => {
|
|
|
223
385
|
return globalStore.get(id);
|
|
224
386
|
};
|
|
225
387
|
|
|
226
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
388
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Predicate.js
|
|
227
389
|
var Predicate_exports = {};
|
|
228
390
|
__export(Predicate_exports, {
|
|
229
391
|
all: () => all,
|
|
@@ -321,13 +483,13 @@ var all = (collection) => {
|
|
|
321
483
|
};
|
|
322
484
|
var productMany = (self, collection) => {
|
|
323
485
|
const rest = all(collection);
|
|
324
|
-
return ([
|
|
486
|
+
return ([head2, ...tail2]) => self(head2) === false ? false : rest(tail2);
|
|
325
487
|
};
|
|
326
488
|
var tuple = (...elements) => all(elements);
|
|
327
489
|
var struct = (fields) => {
|
|
328
|
-
const
|
|
490
|
+
const keys2 = Object.keys(fields);
|
|
329
491
|
return (a2) => {
|
|
330
|
-
for (const key of
|
|
492
|
+
for (const key of keys2) {
|
|
331
493
|
if (!fields[key](a2[key])) {
|
|
332
494
|
return false;
|
|
333
495
|
}
|
|
@@ -360,10 +522,10 @@ var some = (collection) => (a2) => {
|
|
|
360
522
|
return false;
|
|
361
523
|
};
|
|
362
524
|
|
|
363
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
525
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/internal/errors.js
|
|
364
526
|
var getBugErrorMessage = (message) => `BUG: ${message} - please report an issue at https://github.com/Effect-TS/effect/issues`;
|
|
365
527
|
|
|
366
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
528
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Utils.js
|
|
367
529
|
var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
|
|
368
530
|
var isGenKind = (u2) => isObject(u2) && GenKindTypeId in u2;
|
|
369
531
|
var GenKindImpl = class {
|
|
@@ -509,19 +671,19 @@ var PCGRandom = class {
|
|
|
509
671
|
* @category getter
|
|
510
672
|
* @since 2.0.0
|
|
511
673
|
*/
|
|
512
|
-
integer(
|
|
513
|
-
if (!
|
|
674
|
+
integer(max3) {
|
|
675
|
+
if (!max3) {
|
|
514
676
|
return this._next();
|
|
515
677
|
}
|
|
516
|
-
|
|
517
|
-
if ((
|
|
518
|
-
return this._next() &
|
|
678
|
+
max3 = max3 >>> 0;
|
|
679
|
+
if ((max3 & max3 - 1) === 0) {
|
|
680
|
+
return this._next() & max3 - 1;
|
|
519
681
|
}
|
|
520
682
|
let num = 0;
|
|
521
|
-
const skew = (-
|
|
683
|
+
const skew = (-max3 >>> 0) % max3 >>> 0;
|
|
522
684
|
for (num = this._next(); num < skew; num = this._next()) {
|
|
523
685
|
}
|
|
524
|
-
return num %
|
|
686
|
+
return num % max3;
|
|
525
687
|
}
|
|
526
688
|
/**
|
|
527
689
|
* Get a uniformly distributed IEEE-754 double between 0.0 and 1.0, with
|
|
@@ -607,11 +769,14 @@ var structuralRegionState = /* @__PURE__ */ globalValue("effect/Utils/isStructur
|
|
|
607
769
|
tester: void 0
|
|
608
770
|
}));
|
|
609
771
|
|
|
610
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
772
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Hash.js
|
|
611
773
|
var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
|
|
612
774
|
var pcgr = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/pcgr"), () => new PCGRandom());
|
|
613
775
|
var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
|
|
614
776
|
var hash = (self) => {
|
|
777
|
+
if (structuralRegionState.enabled === true) {
|
|
778
|
+
return 0;
|
|
779
|
+
}
|
|
615
780
|
switch (typeof self) {
|
|
616
781
|
case "number":
|
|
617
782
|
return number(self);
|
|
@@ -641,9 +806,6 @@ var hash = (self) => {
|
|
|
641
806
|
}
|
|
642
807
|
};
|
|
643
808
|
var random = (self) => {
|
|
644
|
-
if (structuralRegionState.enabled === true) {
|
|
645
|
-
return 0;
|
|
646
|
-
}
|
|
647
809
|
if (!randomHashCache.has(self)) {
|
|
648
810
|
randomHashCache.set(self, number(pcgr.integer(Number.MAX_SAFE_INTEGER)));
|
|
649
811
|
}
|
|
@@ -676,39 +838,27 @@ var cached = function() {
|
|
|
676
838
|
if (arguments.length === 1) {
|
|
677
839
|
const self2 = arguments[0];
|
|
678
840
|
return function(hash3) {
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
}
|
|
686
|
-
return hash3;
|
|
687
|
-
},
|
|
688
|
-
enumerable: false
|
|
689
|
-
});
|
|
690
|
-
}
|
|
841
|
+
Object.defineProperty(self2, symbol, {
|
|
842
|
+
value() {
|
|
843
|
+
return hash3;
|
|
844
|
+
},
|
|
845
|
+
enumerable: false
|
|
846
|
+
});
|
|
691
847
|
return hash3;
|
|
692
848
|
};
|
|
693
849
|
}
|
|
694
850
|
const self = arguments[0];
|
|
695
851
|
const hash2 = arguments[1];
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
}
|
|
703
|
-
return hash2;
|
|
704
|
-
},
|
|
705
|
-
enumerable: false
|
|
706
|
-
});
|
|
707
|
-
}
|
|
852
|
+
Object.defineProperty(self, symbol, {
|
|
853
|
+
value() {
|
|
854
|
+
return hash2;
|
|
855
|
+
},
|
|
856
|
+
enumerable: false
|
|
857
|
+
});
|
|
708
858
|
return hash2;
|
|
709
859
|
};
|
|
710
860
|
|
|
711
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
861
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Equal.js
|
|
712
862
|
var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
|
|
713
863
|
function equals() {
|
|
714
864
|
if (arguments.length === 1) {
|
|
@@ -727,7 +877,11 @@ function compareBoth(self, that) {
|
|
|
727
877
|
if (selfType === "object" || selfType === "function") {
|
|
728
878
|
if (self !== null && that !== null) {
|
|
729
879
|
if (isEqual(self) && isEqual(that)) {
|
|
730
|
-
|
|
880
|
+
if (hash(self) === hash(that) && self[symbol2](that)) {
|
|
881
|
+
return true;
|
|
882
|
+
} else {
|
|
883
|
+
return structuralRegionState.enabled && structuralRegionState.tester ? structuralRegionState.tester(self, that) : false;
|
|
884
|
+
}
|
|
731
885
|
}
|
|
732
886
|
}
|
|
733
887
|
if (structuralRegionState.enabled) {
|
|
@@ -754,7 +908,7 @@ function compareBoth(self, that) {
|
|
|
754
908
|
var isEqual = (u2) => hasProperty(u2, symbol2);
|
|
755
909
|
var equivalence = () => equals;
|
|
756
910
|
|
|
757
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
911
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Inspectable.js
|
|
758
912
|
var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
759
913
|
var toJSON = (x2) => {
|
|
760
914
|
if (hasProperty(x2, "toJSON") && isFunction2(x2["toJSON"]) && x2["toJSON"].length === 0) {
|
|
@@ -766,7 +920,7 @@ var toJSON = (x2) => {
|
|
|
766
920
|
};
|
|
767
921
|
var format = (x2) => JSON.stringify(x2, null, 2);
|
|
768
922
|
|
|
769
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
923
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Pipeable.js
|
|
770
924
|
var pipeArguments = (self, args) => {
|
|
771
925
|
switch (args.length) {
|
|
772
926
|
case 1:
|
|
@@ -797,7 +951,7 @@ var pipeArguments = (self, args) => {
|
|
|
797
951
|
}
|
|
798
952
|
};
|
|
799
953
|
|
|
800
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
954
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/internal/effectable.js
|
|
801
955
|
var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
|
|
802
956
|
var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
|
|
803
957
|
var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
|
|
@@ -858,7 +1012,7 @@ var EffectPrototype = {
|
|
|
858
1012
|
}
|
|
859
1013
|
};
|
|
860
1014
|
|
|
861
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
1015
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/internal/option.js
|
|
862
1016
|
var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
|
|
863
1017
|
var CommonProto = {
|
|
864
1018
|
...EffectPrototype,
|
|
@@ -876,7 +1030,7 @@ var SomeProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(Comm
|
|
|
876
1030
|
_tag: "Some",
|
|
877
1031
|
_op: "Some",
|
|
878
1032
|
[symbol2](that) {
|
|
879
|
-
return isOption(that) && isSome(that) && equals(
|
|
1033
|
+
return isOption(that) && isSome(that) && equals(this.value, that.value);
|
|
880
1034
|
},
|
|
881
1035
|
[symbol]() {
|
|
882
1036
|
return cached(this, combine(hash(this._tag))(hash(this.value)));
|
|
@@ -916,7 +1070,7 @@ var some2 = (value) => {
|
|
|
916
1070
|
return a2;
|
|
917
1071
|
};
|
|
918
1072
|
|
|
919
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
1073
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/internal/either.js
|
|
920
1074
|
var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
|
|
921
1075
|
var CommonProto2 = {
|
|
922
1076
|
...EffectPrototype,
|
|
@@ -934,7 +1088,7 @@ var RightProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(Com
|
|
|
934
1088
|
_tag: "Right",
|
|
935
1089
|
_op: "Right",
|
|
936
1090
|
[symbol2](that) {
|
|
937
|
-
return isEither(that) && isRight(that) && equals(
|
|
1091
|
+
return isEither(that) && isRight(that) && equals(this.right, that.right);
|
|
938
1092
|
},
|
|
939
1093
|
[symbol]() {
|
|
940
1094
|
return combine(hash(this._tag))(hash(this.right));
|
|
@@ -951,7 +1105,7 @@ var LeftProto = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(Comm
|
|
|
951
1105
|
_tag: "Left",
|
|
952
1106
|
_op: "Left",
|
|
953
1107
|
[symbol2](that) {
|
|
954
|
-
return isEither(that) && isLeft(that) && equals(
|
|
1108
|
+
return isEither(that) && isLeft(that) && equals(this.left, that.left);
|
|
955
1109
|
},
|
|
956
1110
|
[symbol]() {
|
|
957
1111
|
return combine(hash(this._tag))(hash(this.left));
|
|
@@ -980,7 +1134,14 @@ var right = (right2) => {
|
|
|
980
1134
|
var getLeft = (self) => isRight(self) ? none : some2(self.left);
|
|
981
1135
|
var getRight = (self) => isLeft(self) ? none : some2(self.right);
|
|
982
1136
|
|
|
983
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
1137
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Either.js
|
|
1138
|
+
var isLeft2 = isLeft;
|
|
1139
|
+
var isRight2 = isRight;
|
|
1140
|
+
|
|
1141
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/internal/array.js
|
|
1142
|
+
var isNonEmptyArray = (self) => self.length > 0;
|
|
1143
|
+
|
|
1144
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Option.js
|
|
984
1145
|
var Option_exports = {};
|
|
985
1146
|
__export(Option_exports, {
|
|
986
1147
|
Do: () => Do,
|
|
@@ -1042,10 +1203,41 @@ __export(Option_exports, {
|
|
|
1042
1203
|
zipWith: () => zipWith
|
|
1043
1204
|
});
|
|
1044
1205
|
|
|
1045
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
1206
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Order.js
|
|
1046
1207
|
var make2 = (compare) => (self, that) => self === that ? 0 : compare(self, that);
|
|
1208
|
+
var number2 = /* @__PURE__ */ make2((self, that) => self < that ? -1 : 1);
|
|
1209
|
+
var combineMany = /* @__PURE__ */ dual(2, (self, collection) => make2((a1, a2) => {
|
|
1210
|
+
let out = self(a1, a2);
|
|
1211
|
+
if (out !== 0) {
|
|
1212
|
+
return out;
|
|
1213
|
+
}
|
|
1214
|
+
for (const O2 of collection) {
|
|
1215
|
+
out = O2(a1, a2);
|
|
1216
|
+
if (out !== 0) {
|
|
1217
|
+
return out;
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
return out;
|
|
1221
|
+
}));
|
|
1222
|
+
var empty = () => make2(() => 0);
|
|
1223
|
+
var combineAll = (collection) => combineMany(empty(), collection);
|
|
1224
|
+
var mapInput2 = /* @__PURE__ */ dual(2, (self, f2) => make2((b1, b2) => self(f2(b1), f2(b2))));
|
|
1225
|
+
var array2 = (O2) => make2((self, that) => {
|
|
1226
|
+
const aLen = self.length;
|
|
1227
|
+
const bLen = that.length;
|
|
1228
|
+
const len = Math.min(aLen, bLen);
|
|
1229
|
+
for (let i2 = 0; i2 < len; i2++) {
|
|
1230
|
+
const o2 = O2(self[i2], that[i2]);
|
|
1231
|
+
if (o2 !== 0) {
|
|
1232
|
+
return o2;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
return number2(aLen, bLen);
|
|
1236
|
+
});
|
|
1237
|
+
var min = (O2) => dual(2, (self, that) => self === that || O2(self, that) < 1 ? self : that);
|
|
1238
|
+
var max = (O2) => dual(2, (self, that) => self === that || O2(self, that) > -1 ? self : that);
|
|
1047
1239
|
|
|
1048
|
-
// ../../../node_modules/.pnpm/effect@3.1.
|
|
1240
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Option.js
|
|
1049
1241
|
var TypeId3 = /* @__PURE__ */ Symbol.for("effect/Option");
|
|
1050
1242
|
var none2 = () => none;
|
|
1051
1243
|
var some3 = some2;
|
|
@@ -1212,32 +1404,598 @@ var gen = (f2) => {
|
|
|
1212
1404
|
return some3(state.value);
|
|
1213
1405
|
}
|
|
1214
1406
|
};
|
|
1407
|
+
|
|
1408
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Tuple.js
|
|
1409
|
+
var make3 = (...elements) => elements;
|
|
1410
|
+
|
|
1411
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Iterable.js
|
|
1412
|
+
var findFirst = /* @__PURE__ */ dual(2, (self, f2) => {
|
|
1413
|
+
let i2 = 0;
|
|
1414
|
+
for (const a2 of self) {
|
|
1415
|
+
const o2 = f2(a2, i2);
|
|
1416
|
+
if (isBoolean(o2)) {
|
|
1417
|
+
if (o2) {
|
|
1418
|
+
return some3(a2);
|
|
1419
|
+
}
|
|
1420
|
+
} else {
|
|
1421
|
+
if (isSome2(o2)) {
|
|
1422
|
+
return o2;
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
i2++;
|
|
1426
|
+
}
|
|
1427
|
+
return none2();
|
|
1428
|
+
});
|
|
1429
|
+
|
|
1430
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Record.js
|
|
1431
|
+
var collect = /* @__PURE__ */ dual(2, (self, f2) => {
|
|
1432
|
+
const out = [];
|
|
1433
|
+
for (const key of keys(self)) {
|
|
1434
|
+
out.push(f2(key, self[key]));
|
|
1435
|
+
}
|
|
1436
|
+
return out;
|
|
1437
|
+
});
|
|
1438
|
+
var toEntries = /* @__PURE__ */ collect((key, value) => [key, value]);
|
|
1439
|
+
var keys = (self) => Object.keys(self);
|
|
1440
|
+
|
|
1441
|
+
// ../../../node_modules/.pnpm/effect@3.1.5/node_modules/effect/dist/esm/Array.js
|
|
1442
|
+
var make4 = (...elements) => elements;
|
|
1443
|
+
var allocate = (n2) => new Array(n2);
|
|
1444
|
+
var makeBy = (n2, f2) => {
|
|
1445
|
+
const max3 = Math.max(1, Math.floor(n2));
|
|
1446
|
+
const out = new Array(max3);
|
|
1447
|
+
for (let i2 = 0; i2 < max3; i2++) {
|
|
1448
|
+
out[i2] = f2(i2);
|
|
1449
|
+
}
|
|
1450
|
+
return out;
|
|
1451
|
+
};
|
|
1452
|
+
var range = (start, end) => start <= end ? makeBy(end - start + 1, (i2) => start + i2) : [start];
|
|
1453
|
+
var replicate = /* @__PURE__ */ dual(2, (a2, n2) => makeBy(n2, () => a2));
|
|
1454
|
+
var fromIterable2 = (collection) => Array.isArray(collection) ? collection : Array.from(collection);
|
|
1455
|
+
var fromRecord = toEntries;
|
|
1456
|
+
var fromOption2 = toArray;
|
|
1457
|
+
var match2 = /* @__PURE__ */ dual(2, (self, {
|
|
1458
|
+
onEmpty,
|
|
1459
|
+
onNonEmpty
|
|
1460
|
+
}) => isNonEmptyReadonlyArray(self) ? onNonEmpty(self) : onEmpty());
|
|
1461
|
+
var matchLeft = /* @__PURE__ */ dual(2, (self, {
|
|
1462
|
+
onEmpty,
|
|
1463
|
+
onNonEmpty
|
|
1464
|
+
}) => isNonEmptyReadonlyArray(self) ? onNonEmpty(headNonEmpty(self), tailNonEmpty(self)) : onEmpty());
|
|
1465
|
+
var matchRight = /* @__PURE__ */ dual(2, (self, {
|
|
1466
|
+
onEmpty,
|
|
1467
|
+
onNonEmpty
|
|
1468
|
+
}) => isNonEmptyReadonlyArray(self) ? onNonEmpty(initNonEmpty(self), lastNonEmpty(self)) : onEmpty());
|
|
1469
|
+
var prepend = /* @__PURE__ */ dual(2, (self, head2) => [head2, ...self]);
|
|
1470
|
+
var prependAll = /* @__PURE__ */ dual(2, (self, that) => fromIterable2(that).concat(fromIterable2(self)));
|
|
1471
|
+
var append = /* @__PURE__ */ dual(2, (self, last2) => [...self, last2]);
|
|
1472
|
+
var appendAll = /* @__PURE__ */ dual(2, (self, that) => fromIterable2(self).concat(fromIterable2(that)));
|
|
1473
|
+
var scan = /* @__PURE__ */ dual(3, (self, b2, f2) => {
|
|
1474
|
+
const out = [b2];
|
|
1475
|
+
let i2 = 0;
|
|
1476
|
+
for (const a2 of self) {
|
|
1477
|
+
out[i2 + 1] = f2(out[i2], a2);
|
|
1478
|
+
i2++;
|
|
1479
|
+
}
|
|
1480
|
+
return out;
|
|
1481
|
+
});
|
|
1482
|
+
var scanRight = /* @__PURE__ */ dual(3, (self, b2, f2) => {
|
|
1483
|
+
const input = fromIterable2(self);
|
|
1484
|
+
const out = new Array(input.length + 1);
|
|
1485
|
+
out[input.length] = b2;
|
|
1486
|
+
for (let i2 = input.length - 1; i2 >= 0; i2--) {
|
|
1487
|
+
out[i2] = f2(out[i2 + 1], input[i2]);
|
|
1488
|
+
}
|
|
1489
|
+
return out;
|
|
1490
|
+
});
|
|
1491
|
+
var isArray = Array.isArray;
|
|
1492
|
+
var isEmptyArray = (self) => self.length === 0;
|
|
1493
|
+
var isEmptyReadonlyArray = isEmptyArray;
|
|
1494
|
+
var isNonEmptyArray2 = isNonEmptyArray;
|
|
1495
|
+
var isNonEmptyReadonlyArray = isNonEmptyArray;
|
|
1496
|
+
var length = (self) => self.length;
|
|
1497
|
+
var isOutOfBound = (i2, as2) => i2 < 0 || i2 >= as2.length;
|
|
1498
|
+
var clamp = (i2, as2) => Math.floor(Math.min(Math.max(0, i2), as2.length));
|
|
1499
|
+
var get = /* @__PURE__ */ dual(2, (self, index) => {
|
|
1500
|
+
const i2 = Math.floor(index);
|
|
1501
|
+
return isOutOfBound(i2, self) ? none2() : some3(self[i2]);
|
|
1502
|
+
});
|
|
1503
|
+
var unsafeGet = /* @__PURE__ */ dual(2, (self, index) => {
|
|
1504
|
+
const i2 = Math.floor(index);
|
|
1505
|
+
if (isOutOfBound(i2, self)) {
|
|
1506
|
+
throw new Error(`Index ${i2} out of bounds`);
|
|
1507
|
+
}
|
|
1508
|
+
return self[i2];
|
|
1509
|
+
});
|
|
1510
|
+
var unprepend = (self) => [headNonEmpty(self), tailNonEmpty(self)];
|
|
1511
|
+
var unappend = (self) => [initNonEmpty(self), lastNonEmpty(self)];
|
|
1512
|
+
var head = /* @__PURE__ */ get(0);
|
|
1513
|
+
var headNonEmpty = /* @__PURE__ */ unsafeGet(0);
|
|
1514
|
+
var last = (self) => isNonEmptyReadonlyArray(self) ? some3(lastNonEmpty(self)) : none2();
|
|
1515
|
+
var lastNonEmpty = (self) => self[self.length - 1];
|
|
1516
|
+
var tail = (self) => {
|
|
1517
|
+
const input = fromIterable2(self);
|
|
1518
|
+
return isNonEmptyReadonlyArray(input) ? some3(tailNonEmpty(input)) : none2();
|
|
1519
|
+
};
|
|
1520
|
+
var tailNonEmpty = (self) => self.slice(1);
|
|
1521
|
+
var init = (self) => {
|
|
1522
|
+
const input = fromIterable2(self);
|
|
1523
|
+
return isNonEmptyReadonlyArray(input) ? some3(initNonEmpty(input)) : none2();
|
|
1524
|
+
};
|
|
1525
|
+
var initNonEmpty = (self) => self.slice(0, -1);
|
|
1526
|
+
var take = /* @__PURE__ */ dual(2, (self, n2) => {
|
|
1527
|
+
const input = fromIterable2(self);
|
|
1528
|
+
return input.slice(0, clamp(n2, input));
|
|
1529
|
+
});
|
|
1530
|
+
var takeRight = /* @__PURE__ */ dual(2, (self, n2) => {
|
|
1531
|
+
const input = fromIterable2(self);
|
|
1532
|
+
const i2 = clamp(n2, input);
|
|
1533
|
+
return i2 === 0 ? [] : input.slice(-i2);
|
|
1534
|
+
});
|
|
1535
|
+
var takeWhile = /* @__PURE__ */ dual(2, (self, predicate) => {
|
|
1536
|
+
let i2 = 0;
|
|
1537
|
+
const out = [];
|
|
1538
|
+
for (const a2 of self) {
|
|
1539
|
+
if (!predicate(a2, i2)) {
|
|
1540
|
+
break;
|
|
1541
|
+
}
|
|
1542
|
+
out.push(a2);
|
|
1543
|
+
i2++;
|
|
1544
|
+
}
|
|
1545
|
+
return out;
|
|
1546
|
+
});
|
|
1547
|
+
var spanIndex = (self, predicate) => {
|
|
1548
|
+
let i2 = 0;
|
|
1549
|
+
for (const a2 of self) {
|
|
1550
|
+
if (!predicate(a2, i2)) {
|
|
1551
|
+
break;
|
|
1552
|
+
}
|
|
1553
|
+
i2++;
|
|
1554
|
+
}
|
|
1555
|
+
return i2;
|
|
1556
|
+
};
|
|
1557
|
+
var span = /* @__PURE__ */ dual(2, (self, predicate) => splitAt(self, spanIndex(self, predicate)));
|
|
1558
|
+
var drop = /* @__PURE__ */ dual(2, (self, n2) => {
|
|
1559
|
+
const input = fromIterable2(self);
|
|
1560
|
+
return input.slice(clamp(n2, input), input.length);
|
|
1561
|
+
});
|
|
1562
|
+
var dropRight = /* @__PURE__ */ dual(2, (self, n2) => {
|
|
1563
|
+
const input = fromIterable2(self);
|
|
1564
|
+
return input.slice(0, input.length - clamp(n2, input));
|
|
1565
|
+
});
|
|
1566
|
+
var dropWhile = /* @__PURE__ */ dual(2, (self, predicate) => fromIterable2(self).slice(spanIndex(self, predicate)));
|
|
1567
|
+
var findFirstIndex = /* @__PURE__ */ dual(2, (self, predicate) => {
|
|
1568
|
+
let i2 = 0;
|
|
1569
|
+
for (const a2 of self) {
|
|
1570
|
+
if (predicate(a2, i2)) {
|
|
1571
|
+
return some3(i2);
|
|
1572
|
+
}
|
|
1573
|
+
i2++;
|
|
1574
|
+
}
|
|
1575
|
+
return none2();
|
|
1576
|
+
});
|
|
1577
|
+
var findLastIndex = /* @__PURE__ */ dual(2, (self, predicate) => {
|
|
1578
|
+
const input = fromIterable2(self);
|
|
1579
|
+
for (let i2 = input.length - 1; i2 >= 0; i2--) {
|
|
1580
|
+
if (predicate(input[i2], i2)) {
|
|
1581
|
+
return some3(i2);
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
return none2();
|
|
1585
|
+
});
|
|
1586
|
+
var findFirst2 = findFirst;
|
|
1587
|
+
var findLast = /* @__PURE__ */ dual(2, (self, f2) => {
|
|
1588
|
+
const input = fromIterable2(self);
|
|
1589
|
+
for (let i2 = input.length - 1; i2 >= 0; i2--) {
|
|
1590
|
+
const a2 = input[i2];
|
|
1591
|
+
const o2 = f2(a2, i2);
|
|
1592
|
+
if (isBoolean(o2)) {
|
|
1593
|
+
if (o2) {
|
|
1594
|
+
return some3(a2);
|
|
1595
|
+
}
|
|
1596
|
+
} else {
|
|
1597
|
+
if (isSome2(o2)) {
|
|
1598
|
+
return o2;
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
return none2();
|
|
1603
|
+
});
|
|
1604
|
+
var insertAt = /* @__PURE__ */ dual(3, (self, i2, b2) => {
|
|
1605
|
+
const out = Array.from(self);
|
|
1606
|
+
if (i2 < 0 || i2 > out.length) {
|
|
1607
|
+
return none2();
|
|
1608
|
+
}
|
|
1609
|
+
out.splice(i2, 0, b2);
|
|
1610
|
+
return some3(out);
|
|
1611
|
+
});
|
|
1612
|
+
var replace = /* @__PURE__ */ dual(3, (self, i2, b2) => modify(self, i2, () => b2));
|
|
1613
|
+
var replaceOption = /* @__PURE__ */ dual(3, (self, i2, b2) => modifyOption(self, i2, () => b2));
|
|
1614
|
+
var modify = /* @__PURE__ */ dual(3, (self, i2, f2) => getOrElse(modifyOption(self, i2, f2), () => Array.from(self)));
|
|
1615
|
+
var modifyOption = /* @__PURE__ */ dual(3, (self, i2, f2) => {
|
|
1616
|
+
const out = Array.from(self);
|
|
1617
|
+
if (isOutOfBound(i2, out)) {
|
|
1618
|
+
return none2();
|
|
1619
|
+
}
|
|
1620
|
+
const next = f2(out[i2]);
|
|
1621
|
+
out[i2] = next;
|
|
1622
|
+
return some3(out);
|
|
1623
|
+
});
|
|
1624
|
+
var remove = /* @__PURE__ */ dual(2, (self, i2) => {
|
|
1625
|
+
const out = Array.from(self);
|
|
1626
|
+
if (isOutOfBound(i2, out)) {
|
|
1627
|
+
return out;
|
|
1628
|
+
}
|
|
1629
|
+
out.splice(i2, 1);
|
|
1630
|
+
return out;
|
|
1631
|
+
});
|
|
1632
|
+
var reverse = (self) => Array.from(self).reverse();
|
|
1633
|
+
var sort = /* @__PURE__ */ dual(2, (self, O2) => {
|
|
1634
|
+
const out = Array.from(self);
|
|
1635
|
+
out.sort(O2);
|
|
1636
|
+
return out;
|
|
1637
|
+
});
|
|
1638
|
+
var sortWith = /* @__PURE__ */ dual(3, (self, f2, order) => sort(self, mapInput2(order, f2)));
|
|
1639
|
+
var sortBy = (...orders) => {
|
|
1640
|
+
const sortByAll = sort(combineAll(orders));
|
|
1641
|
+
return (self) => {
|
|
1642
|
+
const input = fromIterable2(self);
|
|
1643
|
+
if (isNonEmptyReadonlyArray(input)) {
|
|
1644
|
+
return sortByAll(input);
|
|
1645
|
+
}
|
|
1646
|
+
return [];
|
|
1647
|
+
};
|
|
1648
|
+
};
|
|
1649
|
+
var zip = /* @__PURE__ */ dual(2, (self, that) => zipWith2(self, that, make3));
|
|
1650
|
+
var zipWith2 = /* @__PURE__ */ dual(3, (self, that, f2) => {
|
|
1651
|
+
const as2 = fromIterable2(self);
|
|
1652
|
+
const bs = fromIterable2(that);
|
|
1653
|
+
if (isNonEmptyReadonlyArray(as2) && isNonEmptyReadonlyArray(bs)) {
|
|
1654
|
+
const out = [f2(headNonEmpty(as2), headNonEmpty(bs))];
|
|
1655
|
+
const len = Math.min(as2.length, bs.length);
|
|
1656
|
+
for (let i2 = 1; i2 < len; i2++) {
|
|
1657
|
+
out[i2] = f2(as2[i2], bs[i2]);
|
|
1658
|
+
}
|
|
1659
|
+
return out;
|
|
1660
|
+
}
|
|
1661
|
+
return [];
|
|
1662
|
+
});
|
|
1663
|
+
var unzip = (self) => {
|
|
1664
|
+
const input = fromIterable2(self);
|
|
1665
|
+
if (isNonEmptyReadonlyArray(input)) {
|
|
1666
|
+
const fa = [input[0][0]];
|
|
1667
|
+
const fb = [input[0][1]];
|
|
1668
|
+
for (let i2 = 1; i2 < input.length; i2++) {
|
|
1669
|
+
fa[i2] = input[i2][0];
|
|
1670
|
+
fb[i2] = input[i2][1];
|
|
1671
|
+
}
|
|
1672
|
+
return [fa, fb];
|
|
1673
|
+
}
|
|
1674
|
+
return [[], []];
|
|
1675
|
+
};
|
|
1676
|
+
var intersperse = /* @__PURE__ */ dual(2, (self, middle) => {
|
|
1677
|
+
const input = fromIterable2(self);
|
|
1678
|
+
if (isNonEmptyReadonlyArray(input)) {
|
|
1679
|
+
const out = [headNonEmpty(input)];
|
|
1680
|
+
const tail2 = tailNonEmpty(input);
|
|
1681
|
+
for (let i2 = 0; i2 < tail2.length; i2++) {
|
|
1682
|
+
if (i2 < tail2.length) {
|
|
1683
|
+
out.push(middle);
|
|
1684
|
+
}
|
|
1685
|
+
out.push(tail2[i2]);
|
|
1686
|
+
}
|
|
1687
|
+
return out;
|
|
1688
|
+
}
|
|
1689
|
+
return [];
|
|
1690
|
+
});
|
|
1691
|
+
var modifyNonEmptyHead = /* @__PURE__ */ dual(2, (self, f2) => [f2(headNonEmpty(self)), ...tailNonEmpty(self)]);
|
|
1692
|
+
var setNonEmptyHead = /* @__PURE__ */ dual(2, (self, b2) => modifyNonEmptyHead(self, () => b2));
|
|
1693
|
+
var modifyNonEmptyLast = /* @__PURE__ */ dual(2, (self, f2) => append(initNonEmpty(self), f2(lastNonEmpty(self))));
|
|
1694
|
+
var setNonEmptyLast = /* @__PURE__ */ dual(2, (self, b2) => modifyNonEmptyLast(self, () => b2));
|
|
1695
|
+
var rotate = /* @__PURE__ */ dual(2, (self, n2) => {
|
|
1696
|
+
const input = fromIterable2(self);
|
|
1697
|
+
if (isNonEmptyReadonlyArray(input)) {
|
|
1698
|
+
const len = input.length;
|
|
1699
|
+
const m2 = Math.round(n2) % len;
|
|
1700
|
+
if (isOutOfBound(Math.abs(m2), input) || m2 === 0) {
|
|
1701
|
+
return copy(input);
|
|
1702
|
+
}
|
|
1703
|
+
if (m2 < 0) {
|
|
1704
|
+
const [f2, s2] = splitNonEmptyAt(input, -m2);
|
|
1705
|
+
return appendAll(s2, f2);
|
|
1706
|
+
} else {
|
|
1707
|
+
return rotate(self, m2 - len);
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
return [];
|
|
1711
|
+
});
|
|
1712
|
+
var containsWith2 = (isEquivalent) => dual(2, (self, a2) => {
|
|
1713
|
+
for (const i2 of self) {
|
|
1714
|
+
if (isEquivalent(a2, i2)) {
|
|
1715
|
+
return true;
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
return false;
|
|
1719
|
+
});
|
|
1720
|
+
var _equivalence2 = /* @__PURE__ */ equivalence();
|
|
1721
|
+
var contains2 = /* @__PURE__ */ containsWith2(_equivalence2);
|
|
1722
|
+
var chop = /* @__PURE__ */ dual(2, (self, f2) => {
|
|
1723
|
+
const input = fromIterable2(self);
|
|
1724
|
+
if (isNonEmptyReadonlyArray(input)) {
|
|
1725
|
+
const [b2, rest] = f2(input);
|
|
1726
|
+
const out = [b2];
|
|
1727
|
+
let next = rest;
|
|
1728
|
+
while (isNonEmptyArray(next)) {
|
|
1729
|
+
const [b3, rest2] = f2(next);
|
|
1730
|
+
out.push(b3);
|
|
1731
|
+
next = rest2;
|
|
1732
|
+
}
|
|
1733
|
+
return out;
|
|
1734
|
+
}
|
|
1735
|
+
return [];
|
|
1736
|
+
});
|
|
1737
|
+
var splitAt = /* @__PURE__ */ dual(2, (self, n2) => {
|
|
1738
|
+
const input = Array.from(self);
|
|
1739
|
+
const _n = Math.floor(n2);
|
|
1740
|
+
if (isNonEmptyReadonlyArray(input)) {
|
|
1741
|
+
if (_n >= 1) {
|
|
1742
|
+
return splitNonEmptyAt(input, _n);
|
|
1743
|
+
}
|
|
1744
|
+
return [[], input];
|
|
1745
|
+
}
|
|
1746
|
+
return [input, []];
|
|
1747
|
+
});
|
|
1748
|
+
var splitNonEmptyAt = /* @__PURE__ */ dual(2, (self, n2) => {
|
|
1749
|
+
const _n = Math.max(1, Math.floor(n2));
|
|
1750
|
+
return _n >= self.length ? [copy(self), []] : [prepend(self.slice(1, _n), headNonEmpty(self)), self.slice(_n)];
|
|
1751
|
+
});
|
|
1752
|
+
var split = /* @__PURE__ */ dual(2, (self, n2) => {
|
|
1753
|
+
const input = fromIterable2(self);
|
|
1754
|
+
return chunksOf(input, Math.ceil(input.length / Math.floor(n2)));
|
|
1755
|
+
});
|
|
1756
|
+
var splitWhere = /* @__PURE__ */ dual(2, (self, predicate) => span(self, (a2, i2) => !predicate(a2, i2)));
|
|
1757
|
+
var copy = (self) => self.slice();
|
|
1758
|
+
var chunksOf = /* @__PURE__ */ dual(2, (self, n2) => {
|
|
1759
|
+
const input = fromIterable2(self);
|
|
1760
|
+
if (isNonEmptyReadonlyArray(input)) {
|
|
1761
|
+
return chop(input, splitNonEmptyAt(n2));
|
|
1762
|
+
}
|
|
1763
|
+
return [];
|
|
1764
|
+
});
|
|
1765
|
+
var groupWith = /* @__PURE__ */ dual(2, (self, isEquivalent) => chop(self, (as2) => {
|
|
1766
|
+
const h2 = headNonEmpty(as2);
|
|
1767
|
+
const out = [h2];
|
|
1768
|
+
let i2 = 1;
|
|
1769
|
+
for (; i2 < as2.length; i2++) {
|
|
1770
|
+
const a2 = as2[i2];
|
|
1771
|
+
if (isEquivalent(a2, h2)) {
|
|
1772
|
+
out.push(a2);
|
|
1773
|
+
} else {
|
|
1774
|
+
break;
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
return [out, as2.slice(i2)];
|
|
1778
|
+
}));
|
|
1779
|
+
var group = /* @__PURE__ */ groupWith(/* @__PURE__ */ equivalence());
|
|
1780
|
+
var groupBy = /* @__PURE__ */ dual(2, (self, f2) => {
|
|
1781
|
+
const out = {};
|
|
1782
|
+
for (const a2 of self) {
|
|
1783
|
+
const k2 = f2(a2);
|
|
1784
|
+
if (Object.prototype.hasOwnProperty.call(out, k2)) {
|
|
1785
|
+
out[k2].push(a2);
|
|
1786
|
+
} else {
|
|
1787
|
+
out[k2] = [a2];
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
return out;
|
|
1791
|
+
});
|
|
1792
|
+
var unionWith = /* @__PURE__ */ dual(3, (self, that, isEquivalent) => {
|
|
1793
|
+
const a2 = fromIterable2(self);
|
|
1794
|
+
const b2 = fromIterable2(that);
|
|
1795
|
+
if (isNonEmptyReadonlyArray(a2)) {
|
|
1796
|
+
if (isNonEmptyReadonlyArray(b2)) {
|
|
1797
|
+
const dedupe2 = dedupeWith(isEquivalent);
|
|
1798
|
+
return dedupe2(appendAll(a2, b2));
|
|
1799
|
+
}
|
|
1800
|
+
return a2;
|
|
1801
|
+
}
|
|
1802
|
+
return b2;
|
|
1803
|
+
});
|
|
1804
|
+
var union = /* @__PURE__ */ dual(2, (self, that) => unionWith(self, that, _equivalence2));
|
|
1805
|
+
var intersectionWith = (isEquivalent) => {
|
|
1806
|
+
const has = containsWith2(isEquivalent);
|
|
1807
|
+
return dual(2, (self, that) => fromIterable2(self).filter((a2) => has(that, a2)));
|
|
1808
|
+
};
|
|
1809
|
+
var intersection = /* @__PURE__ */ intersectionWith(_equivalence2);
|
|
1810
|
+
var differenceWith = (isEquivalent) => {
|
|
1811
|
+
const has = containsWith2(isEquivalent);
|
|
1812
|
+
return dual(2, (self, that) => fromIterable2(self).filter((a2) => !has(that, a2)));
|
|
1813
|
+
};
|
|
1814
|
+
var difference = /* @__PURE__ */ differenceWith(_equivalence2);
|
|
1815
|
+
var empty2 = () => [];
|
|
1816
|
+
var of = (a2) => [a2];
|
|
1817
|
+
var map2 = /* @__PURE__ */ dual(2, (self, f2) => self.map(f2));
|
|
1818
|
+
var flatMap2 = /* @__PURE__ */ dual(2, (self, f2) => {
|
|
1819
|
+
if (isEmptyReadonlyArray(self)) {
|
|
1820
|
+
return [];
|
|
1821
|
+
}
|
|
1822
|
+
const out = [];
|
|
1823
|
+
for (let i2 = 0; i2 < self.length; i2++) {
|
|
1824
|
+
const inner = f2(self[i2], i2);
|
|
1825
|
+
for (let j2 = 0; j2 < inner.length; j2++) {
|
|
1826
|
+
out.push(inner[j2]);
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
return out;
|
|
1830
|
+
});
|
|
1831
|
+
var flatten2 = /* @__PURE__ */ flatMap2(identity);
|
|
1832
|
+
var filterMap2 = /* @__PURE__ */ dual(2, (self, f2) => {
|
|
1833
|
+
const as2 = fromIterable2(self);
|
|
1834
|
+
const out = [];
|
|
1835
|
+
for (let i2 = 0; i2 < as2.length; i2++) {
|
|
1836
|
+
const o2 = f2(as2[i2], i2);
|
|
1837
|
+
if (isSome2(o2)) {
|
|
1838
|
+
out.push(o2.value);
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
return out;
|
|
1842
|
+
});
|
|
1843
|
+
var filterMapWhile = /* @__PURE__ */ dual(2, (self, f2) => {
|
|
1844
|
+
let i2 = 0;
|
|
1845
|
+
const out = [];
|
|
1846
|
+
for (const a2 of self) {
|
|
1847
|
+
const b2 = f2(a2, i2);
|
|
1848
|
+
if (isSome2(b2)) {
|
|
1849
|
+
out.push(b2.value);
|
|
1850
|
+
} else {
|
|
1851
|
+
break;
|
|
1852
|
+
}
|
|
1853
|
+
i2++;
|
|
1854
|
+
}
|
|
1855
|
+
return out;
|
|
1856
|
+
});
|
|
1857
|
+
var partitionMap2 = /* @__PURE__ */ dual(2, (self, f2) => {
|
|
1858
|
+
const left2 = [];
|
|
1859
|
+
const right2 = [];
|
|
1860
|
+
const as2 = fromIterable2(self);
|
|
1861
|
+
for (let i2 = 0; i2 < as2.length; i2++) {
|
|
1862
|
+
const e2 = f2(as2[i2], i2);
|
|
1863
|
+
if (isLeft2(e2)) {
|
|
1864
|
+
left2.push(e2.left);
|
|
1865
|
+
} else {
|
|
1866
|
+
right2.push(e2.right);
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
return [left2, right2];
|
|
1870
|
+
});
|
|
1871
|
+
var getSomes = /* @__PURE__ */ filterMap2(identity);
|
|
1872
|
+
var getLefts = (self) => {
|
|
1873
|
+
const out = [];
|
|
1874
|
+
for (const a2 of self) {
|
|
1875
|
+
if (isLeft2(a2)) {
|
|
1876
|
+
out.push(a2.left);
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1879
|
+
return out;
|
|
1880
|
+
};
|
|
1881
|
+
var getRights = (self) => {
|
|
1882
|
+
const out = [];
|
|
1883
|
+
for (const a2 of self) {
|
|
1884
|
+
if (isRight2(a2)) {
|
|
1885
|
+
out.push(a2.right);
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
return out;
|
|
1889
|
+
};
|
|
1890
|
+
var filter2 = /* @__PURE__ */ dual(2, (self, predicate) => {
|
|
1891
|
+
const as2 = fromIterable2(self);
|
|
1892
|
+
const out = [];
|
|
1893
|
+
for (let i2 = 0; i2 < as2.length; i2++) {
|
|
1894
|
+
if (predicate(as2[i2], i2)) {
|
|
1895
|
+
out.push(as2[i2]);
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
return out;
|
|
1899
|
+
});
|
|
1900
|
+
var partition = /* @__PURE__ */ dual(2, (self, predicate) => {
|
|
1901
|
+
const left2 = [];
|
|
1902
|
+
const right2 = [];
|
|
1903
|
+
const as2 = fromIterable2(self);
|
|
1904
|
+
for (let i2 = 0; i2 < as2.length; i2++) {
|
|
1905
|
+
if (predicate(as2[i2], i2)) {
|
|
1906
|
+
right2.push(as2[i2]);
|
|
1907
|
+
} else {
|
|
1908
|
+
left2.push(as2[i2]);
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
return [left2, right2];
|
|
1912
|
+
});
|
|
1913
|
+
var separate = /* @__PURE__ */ partitionMap2(identity);
|
|
1914
|
+
var reduce = /* @__PURE__ */ dual(3, (self, b2, f2) => fromIterable2(self).reduce((b3, a2, i2) => f2(b3, a2, i2), b2));
|
|
1915
|
+
var reduceRight = /* @__PURE__ */ dual(3, (self, b2, f2) => fromIterable2(self).reduceRight((b3, a2, i2) => f2(b3, a2, i2), b2));
|
|
1916
|
+
var liftPredicate2 = (predicate) => (b2) => predicate(b2) ? [b2] : [];
|
|
1917
|
+
var liftOption = (f2) => (...a2) => fromOption2(f2(...a2));
|
|
1918
|
+
var fromNullable2 = (a2) => a2 == null ? empty2() : [a2];
|
|
1919
|
+
var liftNullable2 = (f2) => (...a2) => fromNullable2(f2(...a2));
|
|
1920
|
+
var flatMapNullable2 = /* @__PURE__ */ dual(2, (self, f2) => isNonEmptyReadonlyArray(self) ? fromNullable2(f2(headNonEmpty(self))) : empty2());
|
|
1921
|
+
var liftEither = (f2) => (...a2) => {
|
|
1922
|
+
const e2 = f2(...a2);
|
|
1923
|
+
return isLeft2(e2) ? [] : [e2.right];
|
|
1924
|
+
};
|
|
1925
|
+
var every2 = /* @__PURE__ */ dual(2, (self, refinement) => self.every(refinement));
|
|
1926
|
+
var some4 = /* @__PURE__ */ dual(2, (self, predicate) => self.some(predicate));
|
|
1927
|
+
var extend = /* @__PURE__ */ dual(2, (self, f2) => self.map((_2, i2, as2) => f2(as2.slice(i2))));
|
|
1928
|
+
var min2 = /* @__PURE__ */ dual(2, (self, O2) => self.reduce(min(O2)));
|
|
1929
|
+
var max2 = /* @__PURE__ */ dual(2, (self, O2) => self.reduce(max(O2)));
|
|
1930
|
+
var unfold = (b2, f2) => {
|
|
1931
|
+
const out = [];
|
|
1932
|
+
let next = b2;
|
|
1933
|
+
let o2;
|
|
1934
|
+
while (isSome2(o2 = f2(next))) {
|
|
1935
|
+
const [a2, b3] = o2.value;
|
|
1936
|
+
out.push(a2);
|
|
1937
|
+
next = b3;
|
|
1938
|
+
}
|
|
1939
|
+
return out;
|
|
1940
|
+
};
|
|
1941
|
+
var getOrder2 = array2;
|
|
1942
|
+
var getEquivalence2 = array;
|
|
1943
|
+
var forEach = /* @__PURE__ */ dual(2, (self, f2) => fromIterable2(self).forEach((a2, i2) => f2(a2, i2)));
|
|
1944
|
+
var dedupeWith = /* @__PURE__ */ dual(2, (self, isEquivalent) => {
|
|
1945
|
+
const input = fromIterable2(self);
|
|
1946
|
+
if (isNonEmptyReadonlyArray(input)) {
|
|
1947
|
+
const out = [headNonEmpty(input)];
|
|
1948
|
+
const rest = tailNonEmpty(input);
|
|
1949
|
+
for (const r2 of rest) {
|
|
1950
|
+
if (out.every((a2) => !isEquivalent(r2, a2))) {
|
|
1951
|
+
out.push(r2);
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
return out;
|
|
1955
|
+
}
|
|
1956
|
+
return [];
|
|
1957
|
+
});
|
|
1958
|
+
var dedupe = (self) => dedupeWith(self, equivalence());
|
|
1959
|
+
var dedupeAdjacentWith = /* @__PURE__ */ dual(2, (self, isEquivalent) => {
|
|
1960
|
+
const out = [];
|
|
1961
|
+
let lastA = none2();
|
|
1962
|
+
for (const a2 of self) {
|
|
1963
|
+
if (isNone2(lastA) || !isEquivalent(a2, lastA.value)) {
|
|
1964
|
+
out.push(a2);
|
|
1965
|
+
lastA = some3(a2);
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
return out;
|
|
1969
|
+
});
|
|
1970
|
+
var dedupeAdjacent = /* @__PURE__ */ dedupeAdjacentWith(/* @__PURE__ */ equivalence());
|
|
1971
|
+
var join = /* @__PURE__ */ dual(2, (self, sep) => fromIterable2(self).join(sep));
|
|
1972
|
+
var mapAccum = /* @__PURE__ */ dual(3, (self, s2, f2) => {
|
|
1973
|
+
let i2 = 0;
|
|
1974
|
+
let s1 = s2;
|
|
1975
|
+
const out = [];
|
|
1976
|
+
for (const a2 of self) {
|
|
1977
|
+
const r2 = f2(s1, a2, i2);
|
|
1978
|
+
s1 = r2[0];
|
|
1979
|
+
out.push(r2[1]);
|
|
1980
|
+
i2++;
|
|
1981
|
+
}
|
|
1982
|
+
return [s1, out];
|
|
1983
|
+
});
|
|
1984
|
+
var cartesianWith = /* @__PURE__ */ dual(3, (self, that, f2) => flatMap2(self, (a2) => map2(that, (b2) => f2(a2, b2))));
|
|
1985
|
+
var cartesian = /* @__PURE__ */ dual(2, (self, that) => cartesianWith(self, that, (a2, b2) => [a2, b2]));
|
|
1986
|
+
|
|
1987
|
+
// src/pragma.ts
|
|
1215
1988
|
var RE_JSX_ANNOTATION_REGEX = /@jsx\s+(\S+)/u;
|
|
1216
1989
|
var RE_JS_IDENTIFIER_REGEX = /^[$A-Z_a-z][\w$]*$/u;
|
|
1217
|
-
function
|
|
1218
|
-
const
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1990
|
+
function getJSXPragmaFromContext(context) {
|
|
1991
|
+
const { sourceCode } = context;
|
|
1992
|
+
return Function_exports.pipe(
|
|
1993
|
+
Array_exports.findFirst(sourceCode.getAllComments(), (node) => RE_JSX_ANNOTATION_REGEX.test(node.value)),
|
|
1994
|
+
Option_exports.map(({ value }) => RE_JSX_ANNOTATION_REGEX.exec(value)),
|
|
1995
|
+
Option_exports.flatMapNullable((matches) => matches?.[1]),
|
|
1996
|
+
Option_exports.filter((pragma) => RE_JS_IDENTIFIER_REGEX.test(pragma))
|
|
1997
|
+
);
|
|
1223
1998
|
}
|
|
1224
|
-
var getPragmaFromContext = memo__default.default(
|
|
1225
|
-
(context) => {
|
|
1226
|
-
const settings = shared.parseSchema(shared.ESLintSettingsSchema, context.settings);
|
|
1227
|
-
const pragma = settings.reactOptions?.jsxPragma;
|
|
1228
|
-
const { sourceCode } = context;
|
|
1229
|
-
const pragmaNode = sourceCode.getAllComments().find((node) => RE_JSX_ANNOTATION_REGEX.test(node.value));
|
|
1230
|
-
return Function_exports.pipe(
|
|
1231
|
-
Option_exports.orElse(Option_exports.fromNullable(pragma), () => Function_exports.pipe(
|
|
1232
|
-
Option_exports.fromNullable(pragmaNode),
|
|
1233
|
-
Option_exports.map(({ value }) => RE_JSX_ANNOTATION_REGEX.exec(value)),
|
|
1234
|
-
Option_exports.flatMapNullable((matches) => matches?.[1]?.split(".")[0])
|
|
1235
|
-
)),
|
|
1236
|
-
Option_exports.flatMap(Option_exports.liftPredicate((x2) => RE_JS_IDENTIFIER_REGEX.test(x2))),
|
|
1237
|
-
Option_exports.getOrElse(Function_exports.constant("React"))
|
|
1238
|
-
);
|
|
1239
|
-
}
|
|
1240
|
-
);
|
|
1241
1999
|
|
|
1242
2000
|
// ../../../node_modules/.pnpm/ts-pattern@5.1.1/node_modules/ts-pattern/dist/index.js
|
|
1243
2001
|
var t = Symbol.for("@ts-pattern/matcher");
|
|
@@ -1514,249 +2272,7 @@ var z = class _z {
|
|
|
1514
2272
|
}
|
|
1515
2273
|
};
|
|
1516
2274
|
|
|
1517
|
-
// src/
|
|
1518
|
-
function isInitializedFromPragma(variableName, context, initialScope, pragma = getPragmaFromContext(context)) {
|
|
1519
|
-
const maybeVariable = _var.findVariable(variableName, initialScope);
|
|
1520
|
-
const maybeLatestDef = Option_exports.flatMapNullable(maybeVariable, (variable) => variable.defs.at(-1));
|
|
1521
|
-
if (Option_exports.isNone(maybeLatestDef))
|
|
1522
|
-
return false;
|
|
1523
|
-
const latestDef = maybeLatestDef.value;
|
|
1524
|
-
const { node, parent } = latestDef;
|
|
1525
|
-
if (node.type === ast.NodeType.VariableDeclarator && node.init) {
|
|
1526
|
-
const { init } = node;
|
|
1527
|
-
if (a({ type: "MemberExpression", object: { type: "Identifier", name: pragma } }, init))
|
|
1528
|
-
return true;
|
|
1529
|
-
if (a({ type: "Identifier", name: pragma }, init))
|
|
1530
|
-
return true;
|
|
1531
|
-
const maybeRequireExpression = $(init).with({
|
|
1532
|
-
type: ast.NodeType.CallExpression,
|
|
1533
|
-
callee: { type: ast.NodeType.Identifier, name: "require" }
|
|
1534
|
-
}, (exp) => Option_exports.some(exp)).with(
|
|
1535
|
-
{
|
|
1536
|
-
type: ast.NodeType.MemberExpression,
|
|
1537
|
-
object: {
|
|
1538
|
-
type: ast.NodeType.CallExpression,
|
|
1539
|
-
callee: { type: ast.NodeType.Identifier, name: "require" }
|
|
1540
|
-
}
|
|
1541
|
-
},
|
|
1542
|
-
({ object }) => Option_exports.some(object)
|
|
1543
|
-
).otherwise(Option_exports.none);
|
|
1544
|
-
if (Option_exports.isNone(maybeRequireExpression))
|
|
1545
|
-
return false;
|
|
1546
|
-
const requireExpression = maybeRequireExpression.value;
|
|
1547
|
-
const [firstArg] = requireExpression.arguments;
|
|
1548
|
-
if (firstArg?.type !== ast.NodeType.Literal)
|
|
1549
|
-
return false;
|
|
1550
|
-
return firstArg.value === pragma.toLowerCase();
|
|
1551
|
-
}
|
|
1552
|
-
return a({ type: "ImportDeclaration", source: { value: pragma.toLowerCase() } }, parent);
|
|
1553
|
-
}
|
|
1554
|
-
function isPropertyOfPragma(name, context, pragma = getPragmaFromContext(context)) {
|
|
1555
|
-
const isMatch = a({
|
|
1556
|
-
type: ast.NodeType.MemberExpression,
|
|
1557
|
-
object: {
|
|
1558
|
-
type: ast.NodeType.Identifier,
|
|
1559
|
-
name: pragma
|
|
1560
|
-
},
|
|
1561
|
-
property: {
|
|
1562
|
-
name
|
|
1563
|
-
}
|
|
1564
|
-
});
|
|
1565
|
-
return isMatch;
|
|
1566
|
-
}
|
|
1567
|
-
function isFromPragma(name) {
|
|
1568
|
-
return (node, context) => {
|
|
1569
|
-
const initialScope = context.sourceCode.getScope(node);
|
|
1570
|
-
if (node.type === ast.NodeType.MemberExpression)
|
|
1571
|
-
return isPropertyOfPragma(name, context)(node);
|
|
1572
|
-
if (node.name === name)
|
|
1573
|
-
return isInitializedFromPragma(name, context, initialScope);
|
|
1574
|
-
return false;
|
|
1575
|
-
};
|
|
1576
|
-
}
|
|
1577
|
-
function isFromPragmaMember(pragmaMemberName, name) {
|
|
1578
|
-
return (node, context, pragma = getPragmaFromContext(context)) => {
|
|
1579
|
-
const initialScope = context.sourceCode.getScope(node);
|
|
1580
|
-
if (node.property.type !== ast.NodeType.Identifier || node.property.name !== name)
|
|
1581
|
-
return false;
|
|
1582
|
-
if (node.object.type === ast.NodeType.Identifier && node.object.name === pragmaMemberName) {
|
|
1583
|
-
return isInitializedFromPragma(node.object.name, context, initialScope, pragma);
|
|
1584
|
-
}
|
|
1585
|
-
if (node.object.type === ast.NodeType.MemberExpression && node.object.object.type === ast.NodeType.Identifier && node.object.object.name === pragma && node.object.property.type === ast.NodeType.Identifier) {
|
|
1586
|
-
return node.object.property.name === pragmaMemberName;
|
|
1587
|
-
}
|
|
1588
|
-
return false;
|
|
1589
|
-
};
|
|
1590
|
-
}
|
|
1591
|
-
function isCallFromPragma(name) {
|
|
1592
|
-
return (node, context) => {
|
|
1593
|
-
if (!ast.isOneOf([ast.NodeType.Identifier, ast.NodeType.MemberExpression])(node.callee))
|
|
1594
|
-
return false;
|
|
1595
|
-
return isFromPragma(name)(node.callee, context);
|
|
1596
|
-
};
|
|
1597
|
-
}
|
|
1598
|
-
function isCallFromPragmaMember(pragmaMemberName, name) {
|
|
1599
|
-
return (node, context) => {
|
|
1600
|
-
if (!ast.is(ast.NodeType.MemberExpression)(node.callee))
|
|
1601
|
-
return false;
|
|
1602
|
-
return isFromPragmaMember(pragmaMemberName, name)(node.callee, context);
|
|
1603
|
-
};
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
// src/element/api.ts
|
|
1607
|
-
var isCreateElement = isFromPragma("createElement");
|
|
1608
|
-
var isCreateElementCall = (node, context) => {
|
|
1609
|
-
if (!ast.isOneOf([ast.NodeType.Identifier, ast.NodeType.MemberExpression])(node.callee))
|
|
1610
|
-
return false;
|
|
1611
|
-
return isCreateElement(node.callee, context);
|
|
1612
|
-
};
|
|
1613
|
-
var isCloneElement = isFromPragma("cloneElement");
|
|
1614
|
-
var isCloneElementCall = (node, context) => {
|
|
1615
|
-
if (!ast.isOneOf([ast.NodeType.Identifier, ast.NodeType.MemberExpression])(node.callee))
|
|
1616
|
-
return false;
|
|
1617
|
-
return isCloneElement(node.callee, context);
|
|
1618
|
-
};
|
|
1619
|
-
function resolveMemberExpressions(object, property) {
|
|
1620
|
-
if (object.type === types.AST_NODE_TYPES.JSXMemberExpression) {
|
|
1621
|
-
return `${resolveMemberExpressions(object.object, object.property)}.${property.name}`;
|
|
1622
|
-
}
|
|
1623
|
-
if (object.type === types.AST_NODE_TYPES.JSXNamespacedName) {
|
|
1624
|
-
return `${object.namespace.name}:${object.name.name}.${property.name}`;
|
|
1625
|
-
}
|
|
1626
|
-
return `${object.name}.${property.name}`;
|
|
1627
|
-
}
|
|
1628
|
-
function elementType(node) {
|
|
1629
|
-
if (node.type === types.AST_NODE_TYPES.JSXOpeningFragment) {
|
|
1630
|
-
return "<>";
|
|
1631
|
-
}
|
|
1632
|
-
const { name } = node;
|
|
1633
|
-
if (name.type === types.AST_NODE_TYPES.JSXMemberExpression) {
|
|
1634
|
-
const { object, property } = name;
|
|
1635
|
-
return resolveMemberExpressions(object, property);
|
|
1636
|
-
}
|
|
1637
|
-
if (name.type === types.AST_NODE_TYPES.JSXNamespacedName) {
|
|
1638
|
-
return `${name.namespace.name}:${name.name.name}`;
|
|
1639
|
-
}
|
|
1640
|
-
return name.name;
|
|
1641
|
-
}
|
|
1642
|
-
function isInsideCreateElementProps(node, context) {
|
|
1643
|
-
return Function_exports.pipe(
|
|
1644
|
-
ast.traverseUp(node, (n2) => ast.is(ast.NodeType.CallExpression)(n2) && isCreateElementCall(n2, context)),
|
|
1645
|
-
Option_exports.filter(ast.is(ast.NodeType.CallExpression)),
|
|
1646
|
-
Option_exports.flatMapNullable((c2) => c2.arguments.at(1)),
|
|
1647
|
-
Option_exports.filter(ast.is(ast.NodeType.ObjectExpression)),
|
|
1648
|
-
Option_exports.zipWith(ast.traverseUp(node, ast.is(ast.NodeType.ObjectExpression)), (a2, b2) => a2 === b2),
|
|
1649
|
-
Option_exports.getOrElse(Function_exports.constFalse)
|
|
1650
|
-
);
|
|
1651
|
-
}
|
|
1652
|
-
function isChildrenOfCreateElement(node, context) {
|
|
1653
|
-
return Function_exports.pipe(
|
|
1654
|
-
Option_exports.fromNullable(node.parent),
|
|
1655
|
-
Option_exports.filter(ast.is(ast.NodeType.CallExpression)),
|
|
1656
|
-
Option_exports.filter((n2) => isCreateElementCall(n2, context)),
|
|
1657
|
-
Option_exports.exists(
|
|
1658
|
-
(n2) => n2.arguments.slice(2).some((arg) => arg === node)
|
|
1659
|
-
)
|
|
1660
|
-
);
|
|
1661
|
-
}
|
|
1662
|
-
function hasChildren(node, predicate) {
|
|
1663
|
-
if (Predicate_exports.isFunction(predicate))
|
|
1664
|
-
return node.children.some(predicate);
|
|
1665
|
-
return node.children.length > 0;
|
|
1666
|
-
}
|
|
1667
|
-
function isChildOfJSXElement(node) {
|
|
1668
|
-
return node.parent?.type === ast.NodeType.JSXElement && node.parent.children.some((child) => child === node);
|
|
1669
|
-
}
|
|
1670
|
-
function isJSXElementOfUserDefinedComponent(node) {
|
|
1671
|
-
return node.openingElement.name.type === ast.NodeType.JSXIdentifier && /^[A-Z]/u.test(node.openingElement.name.name);
|
|
1672
|
-
}
|
|
1673
|
-
function isJSXElementOfBuiltinComponent(node) {
|
|
1674
|
-
return node.openingElement.name.type === ast.NodeType.JSXIdentifier && node.openingElement.name.name.toLowerCase() === node.openingElement.name.name && /^[a-z]/u.test(node.openingElement.name.name);
|
|
1675
|
-
}
|
|
1676
|
-
var isFragment = (node, pragma, fragment) => {
|
|
1677
|
-
if (!ast.isOneOf([ast.NodeType.JSXElement, ast.NodeType.JSXFragment])(node))
|
|
1678
|
-
return false;
|
|
1679
|
-
return isFragmentSyntax(node) || isFragmentElement(node, pragma, fragment);
|
|
1680
|
-
};
|
|
1681
|
-
var isFragmentSyntax = ast.is(ast.NodeType.JSXFragment);
|
|
1682
|
-
function isFragmentElement(node, pragma, fragment) {
|
|
1683
|
-
const { name } = node.openingElement;
|
|
1684
|
-
if (name.type === ast.NodeType.JSXIdentifier && name.name === fragment)
|
|
1685
|
-
return true;
|
|
1686
|
-
return name.type === ast.NodeType.JSXMemberExpression && name.object.type === ast.NodeType.JSXIdentifier && name.object.name === pragma && name.property.name === fragment;
|
|
1687
|
-
}
|
|
1688
|
-
var JSXValueHint = {
|
|
1689
|
-
None: 0n,
|
|
1690
|
-
SkipNullLiteral: 1n << 0n,
|
|
1691
|
-
SkipUndefinedLiteral: 1n << 1n,
|
|
1692
|
-
SkipBooleanLiteral: 1n << 2n,
|
|
1693
|
-
SkipStringLiteral: 1n << 3n,
|
|
1694
|
-
SkipNumberLiteral: 1n << 4n,
|
|
1695
|
-
SkipCreateElement: 1n << 5n,
|
|
1696
|
-
StrictArray: 1n << 6n,
|
|
1697
|
-
StrictLogical: 1n << 7n,
|
|
1698
|
-
StrictConditional: 1n << 8n
|
|
1699
|
-
};
|
|
1700
|
-
var DEFAULT_JSX_VALUE_HINT = JSXValueHint.SkipUndefinedLiteral | JSXValueHint.SkipBooleanLiteral;
|
|
1701
|
-
function isJSXValue(node, context, hint = DEFAULT_JSX_VALUE_HINT) {
|
|
1702
|
-
if (!node)
|
|
1703
|
-
return false;
|
|
1704
|
-
return $(node).with({ type: ast.NodeType.JSXElement }, Function_exports.constTrue).with({ type: ast.NodeType.JSXFragment }, Function_exports.constTrue).with({ type: ast.NodeType.JSXMemberExpression }, Function_exports.constTrue).with({ type: ast.NodeType.JSXNamespacedName }, Function_exports.constTrue).with({ type: ast.NodeType.Literal }, (node2) => {
|
|
1705
|
-
return $(node2.value).with(null, () => !(hint & JSXValueHint.SkipNullLiteral)).with(N.boolean, () => !(hint & JSXValueHint.SkipBooleanLiteral)).with(N.string, () => !(hint & JSXValueHint.SkipStringLiteral)).with(N.number, () => !(hint & JSXValueHint.SkipNumberLiteral)).otherwise(Function_exports.constFalse);
|
|
1706
|
-
}).with({ type: ast.NodeType.TemplateLiteral }, () => !(hint & JSXValueHint.SkipStringLiteral)).with({ type: ast.NodeType.ArrayExpression }, (node2) => {
|
|
1707
|
-
if (hint & JSXValueHint.StrictArray)
|
|
1708
|
-
return node2.elements.every((n2) => isJSXValue(n2, context, hint));
|
|
1709
|
-
return node2.elements.some((n2) => isJSXValue(n2, context, hint));
|
|
1710
|
-
}).with({ type: ast.NodeType.ConditionalExpression }, (node2) => {
|
|
1711
|
-
function leftHasJSX(node3) {
|
|
1712
|
-
if (Array.isArray(node3.consequent)) {
|
|
1713
|
-
if (hint & JSXValueHint.StrictArray) {
|
|
1714
|
-
return node3.consequent.every((n2) => isJSXValue(n2, context, hint));
|
|
1715
|
-
}
|
|
1716
|
-
return node3.consequent.some((n2) => isJSXValue(n2, context, hint));
|
|
1717
|
-
}
|
|
1718
|
-
return isJSXValue(node3.consequent, context, hint);
|
|
1719
|
-
}
|
|
1720
|
-
function rightHasJSX(node3) {
|
|
1721
|
-
return isJSXValue(node3.alternate, context, hint);
|
|
1722
|
-
}
|
|
1723
|
-
if (hint & JSXValueHint.StrictConditional) {
|
|
1724
|
-
return leftHasJSX(node2) && rightHasJSX(node2);
|
|
1725
|
-
}
|
|
1726
|
-
return leftHasJSX(node2) || rightHasJSX(node2);
|
|
1727
|
-
}).with({ type: ast.NodeType.LogicalExpression }, (node2) => {
|
|
1728
|
-
return isJSXValue(node2.left, context, hint) || isJSXValue(node2.right, context, hint);
|
|
1729
|
-
}).with({ type: ast.NodeType.SequenceExpression }, (node2) => {
|
|
1730
|
-
const exp = node2.expressions.at(-1);
|
|
1731
|
-
return isJSXValue(exp, context, hint);
|
|
1732
|
-
}).with({ type: ast.NodeType.CallExpression }, (node2) => {
|
|
1733
|
-
if (hint & JSXValueHint.SkipCreateElement)
|
|
1734
|
-
return false;
|
|
1735
|
-
return isCreateElementCall(node2, context);
|
|
1736
|
-
}).with({ type: ast.NodeType.Identifier }, (node2) => {
|
|
1737
|
-
const { name } = node2;
|
|
1738
|
-
if (name === "undefined")
|
|
1739
|
-
return !(hint & JSXValueHint.SkipUndefinedLiteral);
|
|
1740
|
-
if (ast.isJSXTagNameExpression(node2))
|
|
1741
|
-
return true;
|
|
1742
|
-
const initialScope = context.sourceCode.getScope(node2);
|
|
1743
|
-
const maybeVariable = _var.findVariable(name, initialScope);
|
|
1744
|
-
return Function_exports.pipe(
|
|
1745
|
-
maybeVariable,
|
|
1746
|
-
Option_exports.flatMap(_var.getVariableInit(0)),
|
|
1747
|
-
Option_exports.exists((n2) => isJSXValue(n2, context, hint))
|
|
1748
|
-
);
|
|
1749
|
-
}).otherwise(Function_exports.constFalse);
|
|
1750
|
-
}
|
|
1751
|
-
|
|
1752
|
-
// src/misc.ts
|
|
1753
|
-
function isFunctionReturningJSXValue(node, context, hint = DEFAULT_JSX_VALUE_HINT) {
|
|
1754
|
-
if (node.body.type !== ast.NodeType.BlockStatement) {
|
|
1755
|
-
return isJSXValue(node.body, context, hint);
|
|
1756
|
-
}
|
|
1757
|
-
const statements = ast.getNestedReturnStatements(node.body);
|
|
1758
|
-
return statements.some((statement) => isJSXValue(statement.argument, context, hint));
|
|
1759
|
-
}
|
|
2275
|
+
// src/prop/get-prop.ts
|
|
1760
2276
|
var { getStaticValue } = ast.ESLintCommunityESLintUtils;
|
|
1761
2277
|
function getPropName(node) {
|
|
1762
2278
|
return $(node.name).when(ast.is(ast.NodeType.JSXIdentifier), (n2) => n2.name).when(ast.is(ast.NodeType.JSXNamespacedName), (n2) => `${n2.namespace.name}:${n2.name.name}`).exhaustive();
|
|
@@ -1794,13 +2310,13 @@ function findPropInProperties(properties, context, initialScope, seenProps = [])
|
|
|
1794
2310
|
);
|
|
1795
2311
|
if (Option_exports.isNone(maybeInit))
|
|
1796
2312
|
return false;
|
|
1797
|
-
const
|
|
1798
|
-
if (
|
|
2313
|
+
const init2 = maybeInit.value;
|
|
2314
|
+
if (init2.type !== ast.NodeType.ObjectExpression)
|
|
1799
2315
|
return false;
|
|
1800
2316
|
if (seenProps.includes(name))
|
|
1801
2317
|
return false;
|
|
1802
2318
|
return Option_exports.isSome(
|
|
1803
|
-
findPropInProperties(
|
|
2319
|
+
findPropInProperties(init2.properties, context, initialScope, [...seenProps, name])(propName)
|
|
1804
2320
|
);
|
|
1805
2321
|
}).when(ast.is(ast.NodeType.ObjectExpression), (argument) => {
|
|
1806
2322
|
return Option_exports.isSome(findPropInProperties(argument.properties, context, initialScope, seenProps)(propName));
|
|
@@ -1827,10 +2343,10 @@ function findPropInAttributes(attributes, context, initialScope) {
|
|
|
1827
2343
|
);
|
|
1828
2344
|
if (Option_exports.isNone(maybeInit))
|
|
1829
2345
|
return false;
|
|
1830
|
-
const
|
|
1831
|
-
if (!("properties" in
|
|
2346
|
+
const init2 = maybeInit.value;
|
|
2347
|
+
if (!("properties" in init2))
|
|
1832
2348
|
return false;
|
|
1833
|
-
return Option_exports.isSome(findPropInProperties(
|
|
2349
|
+
return Option_exports.isSome(findPropInProperties(init2.properties, context, initialScope)(propName));
|
|
1834
2350
|
}).when(ast.is(ast.NodeType.ObjectExpression), (argument) => {
|
|
1835
2351
|
return Option_exports.isSome(findPropInProperties(argument.properties, context, initialScope)(propName));
|
|
1836
2352
|
}).when(ast.is(ast.NodeType.MemberExpression), () => {
|
|
@@ -1877,37 +2393,82 @@ function isLineBreak(node) {
|
|
|
1877
2393
|
function isPaddingSpaces(node) {
|
|
1878
2394
|
return isLiteral(node) && isWhiteSpace(node) && node.raw.includes("\n");
|
|
1879
2395
|
}
|
|
2396
|
+
var JSXValueHint = {
|
|
2397
|
+
None: 0n,
|
|
2398
|
+
SkipNullLiteral: 1n << 0n,
|
|
2399
|
+
SkipUndefinedLiteral: 1n << 1n,
|
|
2400
|
+
SkipBooleanLiteral: 1n << 2n,
|
|
2401
|
+
SkipStringLiteral: 1n << 3n,
|
|
2402
|
+
SkipNumberLiteral: 1n << 4n,
|
|
2403
|
+
SkipCreateElement: 1n << 5n,
|
|
2404
|
+
StrictArray: 1n << 6n,
|
|
2405
|
+
StrictLogical: 1n << 7n,
|
|
2406
|
+
StrictConditional: 1n << 8n
|
|
2407
|
+
};
|
|
2408
|
+
var DEFAULT_JSX_VALUE_HINT = JSXValueHint.SkipUndefinedLiteral | JSXValueHint.SkipBooleanLiteral;
|
|
2409
|
+
function isJSXValue(node, context, hint = DEFAULT_JSX_VALUE_HINT) {
|
|
2410
|
+
if (!node)
|
|
2411
|
+
return false;
|
|
2412
|
+
return $(node).with({ type: ast.NodeType.JSXElement }, Function_exports.constTrue).with({ type: ast.NodeType.JSXFragment }, Function_exports.constTrue).with({ type: ast.NodeType.JSXMemberExpression }, Function_exports.constTrue).with({ type: ast.NodeType.JSXNamespacedName }, Function_exports.constTrue).with({ type: ast.NodeType.Literal }, (node2) => {
|
|
2413
|
+
return $(node2.value).with(null, () => !(hint & JSXValueHint.SkipNullLiteral)).with(N.boolean, () => !(hint & JSXValueHint.SkipBooleanLiteral)).with(N.string, () => !(hint & JSXValueHint.SkipStringLiteral)).with(N.number, () => !(hint & JSXValueHint.SkipNumberLiteral)).otherwise(Function_exports.constFalse);
|
|
2414
|
+
}).with({ type: ast.NodeType.TemplateLiteral }, () => !(hint & JSXValueHint.SkipStringLiteral)).with({ type: ast.NodeType.ArrayExpression }, (node2) => {
|
|
2415
|
+
if (hint & JSXValueHint.StrictArray)
|
|
2416
|
+
return node2.elements.every((n2) => isJSXValue(n2, context, hint));
|
|
2417
|
+
return node2.elements.some((n2) => isJSXValue(n2, context, hint));
|
|
2418
|
+
}).with({ type: ast.NodeType.ConditionalExpression }, (node2) => {
|
|
2419
|
+
function leftHasJSX(node3) {
|
|
2420
|
+
if (Array.isArray(node3.consequent)) {
|
|
2421
|
+
if (hint & JSXValueHint.StrictArray) {
|
|
2422
|
+
return node3.consequent.every((n2) => isJSXValue(n2, context, hint));
|
|
2423
|
+
}
|
|
2424
|
+
return node3.consequent.some((n2) => isJSXValue(n2, context, hint));
|
|
2425
|
+
}
|
|
2426
|
+
return isJSXValue(node3.consequent, context, hint);
|
|
2427
|
+
}
|
|
2428
|
+
function rightHasJSX(node3) {
|
|
2429
|
+
return isJSXValue(node3.alternate, context, hint);
|
|
2430
|
+
}
|
|
2431
|
+
if (hint & JSXValueHint.StrictConditional) {
|
|
2432
|
+
return leftHasJSX(node2) && rightHasJSX(node2);
|
|
2433
|
+
}
|
|
2434
|
+
return leftHasJSX(node2) || rightHasJSX(node2);
|
|
2435
|
+
}).with({ type: ast.NodeType.LogicalExpression }, (node2) => {
|
|
2436
|
+
return isJSXValue(node2.left, context, hint) || isJSXValue(node2.right, context, hint);
|
|
2437
|
+
}).with({ type: ast.NodeType.SequenceExpression }, (node2) => {
|
|
2438
|
+
const exp = node2.expressions.at(-1);
|
|
2439
|
+
return isJSXValue(exp, context, hint);
|
|
2440
|
+
}).with({ type: ast.NodeType.CallExpression }, (node2) => {
|
|
2441
|
+
if (hint & JSXValueHint.SkipCreateElement)
|
|
2442
|
+
return false;
|
|
2443
|
+
return $(node2.callee).with({ type: ast.NodeType.Identifier, name: "createElement" }, Function_exports.constTrue).with({ type: ast.NodeType.MemberExpression, property: { name: "createElement" } }, Function_exports.constTrue).otherwise(Function_exports.constFalse);
|
|
2444
|
+
}).with({ type: ast.NodeType.Identifier }, (node2) => {
|
|
2445
|
+
const { name } = node2;
|
|
2446
|
+
if (name === "undefined")
|
|
2447
|
+
return !(hint & JSXValueHint.SkipUndefinedLiteral);
|
|
2448
|
+
if (ast.isJSXTagNameExpression(node2))
|
|
2449
|
+
return true;
|
|
2450
|
+
const initialScope = context.sourceCode.getScope(node2);
|
|
2451
|
+
const maybeVariable = _var.findVariable(name, initialScope);
|
|
2452
|
+
return Function_exports.pipe(
|
|
2453
|
+
maybeVariable,
|
|
2454
|
+
Option_exports.flatMap(_var.getVariableInit(0)),
|
|
2455
|
+
Option_exports.exists((n2) => isJSXValue(n2, context, hint))
|
|
2456
|
+
);
|
|
2457
|
+
}).otherwise(Function_exports.constFalse);
|
|
2458
|
+
}
|
|
1880
2459
|
|
|
1881
2460
|
exports.DEFAULT_JSX_VALUE_HINT = DEFAULT_JSX_VALUE_HINT;
|
|
1882
2461
|
exports.JSXValueHint = JSXValueHint;
|
|
1883
2462
|
exports.elementType = elementType;
|
|
1884
2463
|
exports.findPropInAttributes = findPropInAttributes;
|
|
1885
2464
|
exports.findPropInProperties = findPropInProperties;
|
|
1886
|
-
exports.
|
|
1887
|
-
exports.getPragmaFromContext = getPragmaFromContext;
|
|
2465
|
+
exports.getJSXPragmaFromContext = getJSXPragmaFromContext;
|
|
1888
2466
|
exports.getProp = getProp;
|
|
1889
2467
|
exports.getPropName = getPropName;
|
|
1890
2468
|
exports.getPropValue = getPropValue;
|
|
1891
2469
|
exports.hasAnyProp = hasAnyProp;
|
|
1892
|
-
exports.hasChildren = hasChildren;
|
|
1893
2470
|
exports.hasEveryProp = hasEveryProp;
|
|
1894
2471
|
exports.hasProp = hasProp;
|
|
1895
|
-
exports.isCallFromPragma = isCallFromPragma;
|
|
1896
|
-
exports.isCallFromPragmaMember = isCallFromPragmaMember;
|
|
1897
|
-
exports.isChildOfJSXElement = isChildOfJSXElement;
|
|
1898
|
-
exports.isChildrenOfCreateElement = isChildrenOfCreateElement;
|
|
1899
|
-
exports.isCloneElement = isCloneElement;
|
|
1900
|
-
exports.isCloneElementCall = isCloneElementCall;
|
|
1901
|
-
exports.isCreateElement = isCreateElement;
|
|
1902
|
-
exports.isCreateElementCall = isCreateElementCall;
|
|
1903
|
-
exports.isFragment = isFragment;
|
|
1904
|
-
exports.isFragmentElement = isFragmentElement;
|
|
1905
|
-
exports.isFragmentSyntax = isFragmentSyntax;
|
|
1906
|
-
exports.isFromPragma = isFromPragma;
|
|
1907
|
-
exports.isFromPragmaMember = isFromPragmaMember;
|
|
1908
|
-
exports.isFunctionReturningJSXValue = isFunctionReturningJSXValue;
|
|
1909
|
-
exports.isInitializedFromPragma = isInitializedFromPragma;
|
|
1910
|
-
exports.isInsideCreateElementProps = isInsideCreateElementProps;
|
|
1911
2472
|
exports.isInsidePropValue = isInsidePropValue;
|
|
1912
2473
|
exports.isJSXElementOfBuiltinComponent = isJSXElementOfBuiltinComponent;
|
|
1913
2474
|
exports.isJSXElementOfUserDefinedComponent = isJSXElementOfUserDefinedComponent;
|
|
@@ -1915,6 +2476,5 @@ exports.isJSXValue = isJSXValue;
|
|
|
1915
2476
|
exports.isLineBreak = isLineBreak;
|
|
1916
2477
|
exports.isLiteral = isLiteral;
|
|
1917
2478
|
exports.isPaddingSpaces = isPaddingSpaces;
|
|
1918
|
-
exports.isPropertyOfPragma = isPropertyOfPragma;
|
|
1919
2479
|
exports.isWhiteSpace = isWhiteSpace;
|
|
1920
2480
|
exports.traverseUpProp = traverseUpProp;
|