@pandacss/eslint-plugin 0.0.8 → 0.0.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/{chunk-6BVJTDXV.mjs → chunk-HALLAYDZ.mjs} +2 -2
- package/dist/index.js +97 -27
- package/dist/index.mjs +117 -37
- package/dist/utils/worker.js +215 -122
- package/dist/utils/worker.mjs +216 -123
- package/package.json +5 -5
package/dist/utils/worker.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_esm_shims
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-HALLAYDZ.mjs";
|
|
4
4
|
|
|
5
5
|
// src/utils/worker.ts
|
|
6
6
|
init_esm_shims();
|
|
@@ -13,7 +13,7 @@ init_esm_shims();
|
|
|
13
13
|
// ../fixture/src/config.ts
|
|
14
14
|
init_esm_shims();
|
|
15
15
|
|
|
16
|
-
// ../node_modules/.pnpm/@pandacss+preset-base@0.
|
|
16
|
+
// ../node_modules/.pnpm/@pandacss+preset-base@0.30.1/node_modules/@pandacss/preset-base/dist/index.mjs
|
|
17
17
|
init_esm_shims();
|
|
18
18
|
var conditions = {
|
|
19
19
|
hover: "&:is(:hover, [data-hover])",
|
|
@@ -105,6 +105,16 @@ var conditions = {
|
|
|
105
105
|
horizontal: "&[data-orientation=horizontal]",
|
|
106
106
|
vertical: "&[data-orientation=vertical]"
|
|
107
107
|
};
|
|
108
|
+
var createColorMixTransform = (prop) => (value, args) => {
|
|
109
|
+
const mix = args.utils.colorMix(value);
|
|
110
|
+
if (mix.invalid)
|
|
111
|
+
return { [prop]: value };
|
|
112
|
+
const cssVar = "--mix-" + prop;
|
|
113
|
+
return {
|
|
114
|
+
[cssVar]: mix.value,
|
|
115
|
+
[prop]: `var(${cssVar}, ${mix.color})`
|
|
116
|
+
};
|
|
117
|
+
};
|
|
108
118
|
var background = {
|
|
109
119
|
backgroundPosition: {
|
|
110
120
|
shorthand: "bgPosition",
|
|
@@ -135,12 +145,14 @@ var background = {
|
|
|
135
145
|
background: {
|
|
136
146
|
shorthand: "bg",
|
|
137
147
|
className: "bg",
|
|
138
|
-
values: "colors"
|
|
148
|
+
values: "colors",
|
|
149
|
+
transform: createColorMixTransform("background")
|
|
139
150
|
},
|
|
140
151
|
backgroundColor: {
|
|
141
152
|
shorthand: "bgColor",
|
|
142
153
|
className: "bg",
|
|
143
|
-
values: "colors"
|
|
154
|
+
values: "colors",
|
|
155
|
+
transform: createColorMixTransform("backgroundColor")
|
|
144
156
|
},
|
|
145
157
|
backgroundOrigin: {
|
|
146
158
|
shorthand: "bgOrigin",
|
|
@@ -215,32 +227,26 @@ var background = {
|
|
|
215
227
|
gradientFrom: {
|
|
216
228
|
className: "from",
|
|
217
229
|
values: "colors",
|
|
218
|
-
transform(
|
|
219
|
-
return {
|
|
220
|
-
"--gradient-from": value
|
|
221
|
-
};
|
|
222
|
-
}
|
|
230
|
+
transform: createColorMixTransform("--gradient-from")
|
|
223
231
|
},
|
|
224
232
|
gradientTo: {
|
|
225
233
|
className: "to",
|
|
226
234
|
values: "colors",
|
|
227
|
-
transform(
|
|
228
|
-
return {
|
|
229
|
-
"--gradient-to": value
|
|
230
|
-
};
|
|
231
|
-
}
|
|
235
|
+
transform: createColorMixTransform("--gradient-to")
|
|
232
236
|
},
|
|
233
237
|
gradientVia: {
|
|
234
238
|
className: "via",
|
|
235
239
|
values: "colors",
|
|
236
|
-
transform(value) {
|
|
240
|
+
transform(value, args) {
|
|
241
|
+
const transformed = gradientVia(value, args);
|
|
237
242
|
return {
|
|
238
|
-
|
|
239
|
-
"--gradient-via":
|
|
243
|
+
...transformed,
|
|
244
|
+
"--gradient-via-stops": "var(--gradient-from), var(--gradient-via), var(--gradient-to)"
|
|
240
245
|
};
|
|
241
246
|
}
|
|
242
247
|
}
|
|
243
248
|
};
|
|
249
|
+
var gradientVia = createColorMixTransform("--gradient-via");
|
|
244
250
|
var border = {
|
|
245
251
|
borderRadius: {
|
|
246
252
|
className: "rounded",
|
|
@@ -385,7 +391,8 @@ var border = {
|
|
|
385
391
|
},
|
|
386
392
|
borderColor: {
|
|
387
393
|
className: "border",
|
|
388
|
-
values: "colors"
|
|
394
|
+
values: "colors",
|
|
395
|
+
transform: createColorMixTransform("borderColor")
|
|
389
396
|
},
|
|
390
397
|
borderInline: {
|
|
391
398
|
className: "border-x",
|
|
@@ -400,7 +407,8 @@ var border = {
|
|
|
400
407
|
borderInlineColor: {
|
|
401
408
|
className: "border-x",
|
|
402
409
|
values: "colors",
|
|
403
|
-
shorthand: "borderXColor"
|
|
410
|
+
shorthand: "borderXColor",
|
|
411
|
+
transform: createColorMixTransform("borderInlineColor")
|
|
404
412
|
},
|
|
405
413
|
borderBlock: {
|
|
406
414
|
className: "border-y",
|
|
@@ -415,7 +423,8 @@ var border = {
|
|
|
415
423
|
borderBlockColor: {
|
|
416
424
|
className: "border-y",
|
|
417
425
|
values: "colors",
|
|
418
|
-
shorthand: "borderYColor"
|
|
426
|
+
shorthand: "borderYColor",
|
|
427
|
+
transform: createColorMixTransform("borderBlockColor")
|
|
419
428
|
},
|
|
420
429
|
borderLeft: {
|
|
421
430
|
className: "border-l",
|
|
@@ -423,7 +432,8 @@ var border = {
|
|
|
423
432
|
},
|
|
424
433
|
borderLeftColor: {
|
|
425
434
|
className: "border-l",
|
|
426
|
-
values: "colors"
|
|
435
|
+
values: "colors",
|
|
436
|
+
transform: createColorMixTransform("borderLeftColor")
|
|
427
437
|
},
|
|
428
438
|
borderInlineStart: {
|
|
429
439
|
className: "border-s",
|
|
@@ -438,7 +448,8 @@ var border = {
|
|
|
438
448
|
borderInlineStartColor: {
|
|
439
449
|
className: "border-s",
|
|
440
450
|
values: "colors",
|
|
441
|
-
shorthand: "borderStartColor"
|
|
451
|
+
shorthand: "borderStartColor",
|
|
452
|
+
transform: createColorMixTransform("borderInlineStartColor")
|
|
442
453
|
},
|
|
443
454
|
borderRight: {
|
|
444
455
|
className: "border-r",
|
|
@@ -446,7 +457,8 @@ var border = {
|
|
|
446
457
|
},
|
|
447
458
|
borderRightColor: {
|
|
448
459
|
className: "border-r",
|
|
449
|
-
values: "colors"
|
|
460
|
+
values: "colors",
|
|
461
|
+
transform: createColorMixTransform("borderRightColor")
|
|
450
462
|
},
|
|
451
463
|
borderInlineEnd: {
|
|
452
464
|
className: "border-e",
|
|
@@ -461,7 +473,8 @@ var border = {
|
|
|
461
473
|
borderInlineEndColor: {
|
|
462
474
|
className: "border-e",
|
|
463
475
|
values: "colors",
|
|
464
|
-
shorthand: "borderEndColor"
|
|
476
|
+
shorthand: "borderEndColor",
|
|
477
|
+
transform: createColorMixTransform("borderInlineEndColor")
|
|
465
478
|
},
|
|
466
479
|
borderTop: {
|
|
467
480
|
className: "border-t",
|
|
@@ -469,7 +482,8 @@ var border = {
|
|
|
469
482
|
},
|
|
470
483
|
borderTopColor: {
|
|
471
484
|
className: "border-t",
|
|
472
|
-
values: "colors"
|
|
485
|
+
values: "colors",
|
|
486
|
+
transform: createColorMixTransform("borderTopColor")
|
|
473
487
|
},
|
|
474
488
|
borderBottom: {
|
|
475
489
|
className: "border-b",
|
|
@@ -477,7 +491,8 @@ var border = {
|
|
|
477
491
|
},
|
|
478
492
|
borderBottomColor: {
|
|
479
493
|
className: "border-b",
|
|
480
|
-
values: "colors"
|
|
494
|
+
values: "colors",
|
|
495
|
+
transform: createColorMixTransform("borderBottomColor")
|
|
481
496
|
},
|
|
482
497
|
borderBlockEnd: {
|
|
483
498
|
className: "border-be",
|
|
@@ -485,7 +500,8 @@ var border = {
|
|
|
485
500
|
},
|
|
486
501
|
borderBlockEndColor: {
|
|
487
502
|
className: "border-be",
|
|
488
|
-
values: "colors"
|
|
503
|
+
values: "colors",
|
|
504
|
+
transform: createColorMixTransform("borderBlockEndColor")
|
|
489
505
|
},
|
|
490
506
|
borderBlockStart: {
|
|
491
507
|
className: "border-bs",
|
|
@@ -493,7 +509,21 @@ var border = {
|
|
|
493
509
|
},
|
|
494
510
|
borderBlockStartColor: {
|
|
495
511
|
className: "border-bs",
|
|
496
|
-
values: "colors"
|
|
512
|
+
values: "colors",
|
|
513
|
+
transform: createColorMixTransform("borderBlockStartColor")
|
|
514
|
+
}
|
|
515
|
+
};
|
|
516
|
+
var container = {
|
|
517
|
+
container: {
|
|
518
|
+
className: "cq"
|
|
519
|
+
},
|
|
520
|
+
containerName: {
|
|
521
|
+
className: "cq-name",
|
|
522
|
+
property: "containerName",
|
|
523
|
+
values: "containerNames"
|
|
524
|
+
},
|
|
525
|
+
containerType: {
|
|
526
|
+
className: "cq-type"
|
|
497
527
|
}
|
|
498
528
|
};
|
|
499
529
|
var display = {
|
|
@@ -555,11 +585,9 @@ var divide = {
|
|
|
555
585
|
divideColor: {
|
|
556
586
|
className: "divide",
|
|
557
587
|
values: "colors",
|
|
558
|
-
transform(value) {
|
|
588
|
+
transform(value, args) {
|
|
559
589
|
return {
|
|
560
|
-
"& > :not([hidden]) ~ :not([hidden])":
|
|
561
|
-
borderColor: value
|
|
562
|
-
}
|
|
590
|
+
"& > :not([hidden]) ~ :not([hidden])": divideColor(value, args)
|
|
563
591
|
};
|
|
564
592
|
}
|
|
565
593
|
},
|
|
@@ -575,6 +603,7 @@ var divide = {
|
|
|
575
603
|
}
|
|
576
604
|
}
|
|
577
605
|
};
|
|
606
|
+
var divideColor = createColorMixTransform("borderColor");
|
|
578
607
|
var effects = {
|
|
579
608
|
opacity: {
|
|
580
609
|
values: "opacity"
|
|
@@ -588,11 +617,7 @@ var effects = {
|
|
|
588
617
|
shorthand: "shadowColor",
|
|
589
618
|
className: "shadow",
|
|
590
619
|
values: "colors",
|
|
591
|
-
transform(
|
|
592
|
-
return {
|
|
593
|
-
"--shadow-color": value
|
|
594
|
-
};
|
|
595
|
-
}
|
|
620
|
+
transform: createColorMixTransform("--shadow-color")
|
|
596
621
|
},
|
|
597
622
|
mixBlendMode: {
|
|
598
623
|
className: "mix-blend"
|
|
@@ -1018,11 +1043,13 @@ var helpers = {
|
|
|
1018
1043
|
var interactivity = {
|
|
1019
1044
|
accentColor: {
|
|
1020
1045
|
className: "accent",
|
|
1021
|
-
values: "colors"
|
|
1046
|
+
values: "colors",
|
|
1047
|
+
transform: createColorMixTransform("accentColor")
|
|
1022
1048
|
},
|
|
1023
1049
|
caretColor: {
|
|
1024
1050
|
className: "caret",
|
|
1025
|
-
values: "colors"
|
|
1051
|
+
values: "colors",
|
|
1052
|
+
transform: createColorMixTransform("caretColor")
|
|
1026
1053
|
},
|
|
1027
1054
|
scrollBehavior: {
|
|
1028
1055
|
className: "scroll"
|
|
@@ -1395,7 +1422,8 @@ var outline = {
|
|
|
1395
1422
|
outlineColor: {
|
|
1396
1423
|
className: "ring",
|
|
1397
1424
|
values: "colors",
|
|
1398
|
-
shorthand: "ringColor"
|
|
1425
|
+
shorthand: "ringColor",
|
|
1426
|
+
transform: createColorMixTransform("outlineColor")
|
|
1399
1427
|
},
|
|
1400
1428
|
outline: {
|
|
1401
1429
|
className: "ring",
|
|
@@ -1414,6 +1442,56 @@ var outline = {
|
|
|
1414
1442
|
values: "spacing"
|
|
1415
1443
|
}
|
|
1416
1444
|
};
|
|
1445
|
+
var polyfill = {
|
|
1446
|
+
appearance: {
|
|
1447
|
+
className: "appearance",
|
|
1448
|
+
transform(value) {
|
|
1449
|
+
return { appearance: value, WebkitAppearance: value };
|
|
1450
|
+
}
|
|
1451
|
+
},
|
|
1452
|
+
backfaceVisibility: {
|
|
1453
|
+
className: "backface",
|
|
1454
|
+
transform(value) {
|
|
1455
|
+
return { backfaceVisibility: value, WebkitBackfaceVisibility: value };
|
|
1456
|
+
}
|
|
1457
|
+
},
|
|
1458
|
+
clipPath: {
|
|
1459
|
+
className: "clip-path",
|
|
1460
|
+
transform(value) {
|
|
1461
|
+
return { clipPath: value, WebkitClipPath: value };
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
hyphens: {
|
|
1465
|
+
className: "hyphens",
|
|
1466
|
+
transform(value) {
|
|
1467
|
+
return { hyphens: value, WebkitHyphens: value };
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
mask: {
|
|
1471
|
+
className: "mask",
|
|
1472
|
+
transform(value) {
|
|
1473
|
+
return { mask: value, WebkitMask: value };
|
|
1474
|
+
}
|
|
1475
|
+
},
|
|
1476
|
+
maskImage: {
|
|
1477
|
+
className: "mask-image",
|
|
1478
|
+
transform(value) {
|
|
1479
|
+
return { maskImage: value, WebkitMaskImage: value };
|
|
1480
|
+
}
|
|
1481
|
+
},
|
|
1482
|
+
maskSize: {
|
|
1483
|
+
className: "mask-size",
|
|
1484
|
+
transform(value) {
|
|
1485
|
+
return { maskSize: value, WebkitMaskSize: value };
|
|
1486
|
+
}
|
|
1487
|
+
},
|
|
1488
|
+
textSizeAdjust: {
|
|
1489
|
+
className: "text-size-adjust",
|
|
1490
|
+
transform(value) {
|
|
1491
|
+
return { textSizeAdjust: value, WebkitTextSizeAdjust: value };
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
};
|
|
1417
1495
|
var widthValues = (theme2) => ({
|
|
1418
1496
|
auto: "auto",
|
|
1419
1497
|
...theme2("sizes"),
|
|
@@ -1639,11 +1717,13 @@ var spacing = {
|
|
|
1639
1717
|
var svg = {
|
|
1640
1718
|
fill: {
|
|
1641
1719
|
className: "fill",
|
|
1642
|
-
values: "colors"
|
|
1720
|
+
values: "colors",
|
|
1721
|
+
transform: createColorMixTransform("fill")
|
|
1643
1722
|
},
|
|
1644
1723
|
stroke: {
|
|
1645
1724
|
className: "stroke",
|
|
1646
|
-
values: "colors"
|
|
1725
|
+
values: "colors",
|
|
1726
|
+
transform: createColorMixTransform("stroke")
|
|
1647
1727
|
},
|
|
1648
1728
|
strokeWidth: {
|
|
1649
1729
|
className: "stroke-w",
|
|
@@ -1831,7 +1911,8 @@ var transitions = {
|
|
|
1831
1911
|
var typography = {
|
|
1832
1912
|
color: {
|
|
1833
1913
|
className: "text",
|
|
1834
|
-
values: "colors"
|
|
1914
|
+
values: "colors",
|
|
1915
|
+
transform: createColorMixTransform("color")
|
|
1835
1916
|
},
|
|
1836
1917
|
fontFamily: {
|
|
1837
1918
|
className: "font",
|
|
@@ -1876,11 +1957,13 @@ var typography = {
|
|
|
1876
1957
|
},
|
|
1877
1958
|
textDecorationColor: {
|
|
1878
1959
|
className: "text-decor",
|
|
1879
|
-
values: "colors"
|
|
1960
|
+
values: "colors",
|
|
1961
|
+
transform: createColorMixTransform("textDecorationColor")
|
|
1880
1962
|
},
|
|
1881
1963
|
textEmphasisColor: {
|
|
1882
1964
|
className: "text-emphasis",
|
|
1883
|
-
values: "colors"
|
|
1965
|
+
values: "colors",
|
|
1966
|
+
transform: createColorMixTransform("textEmphasisColor")
|
|
1884
1967
|
},
|
|
1885
1968
|
textDecorationStyle: {
|
|
1886
1969
|
className: "decoration"
|
|
@@ -1948,56 +2031,6 @@ var typography = {
|
|
|
1948
2031
|
}
|
|
1949
2032
|
}
|
|
1950
2033
|
};
|
|
1951
|
-
var polyfill = {
|
|
1952
|
-
appearance: {
|
|
1953
|
-
className: "appearance",
|
|
1954
|
-
transform(value) {
|
|
1955
|
-
return { appearance: value, WebkitAppearance: value };
|
|
1956
|
-
}
|
|
1957
|
-
},
|
|
1958
|
-
backfaceVisibility: {
|
|
1959
|
-
className: "backface",
|
|
1960
|
-
transform(value) {
|
|
1961
|
-
return { backfaceVisibility: value, WebkitBackfaceVisibility: value };
|
|
1962
|
-
}
|
|
1963
|
-
},
|
|
1964
|
-
clipPath: {
|
|
1965
|
-
className: "clip-path",
|
|
1966
|
-
transform(value) {
|
|
1967
|
-
return { clipPath: value, WebkitClipPath: value };
|
|
1968
|
-
}
|
|
1969
|
-
},
|
|
1970
|
-
hyphens: {
|
|
1971
|
-
className: "hyphens",
|
|
1972
|
-
transform(value) {
|
|
1973
|
-
return { hyphens: value, WebkitHyphens: value };
|
|
1974
|
-
}
|
|
1975
|
-
},
|
|
1976
|
-
mask: {
|
|
1977
|
-
className: "mask",
|
|
1978
|
-
transform(value) {
|
|
1979
|
-
return { mask: value, WebkitMask: value };
|
|
1980
|
-
}
|
|
1981
|
-
},
|
|
1982
|
-
maskImage: {
|
|
1983
|
-
className: "mask-image",
|
|
1984
|
-
transform(value) {
|
|
1985
|
-
return { maskImage: value, WebkitMaskImage: value };
|
|
1986
|
-
}
|
|
1987
|
-
},
|
|
1988
|
-
maskSize: {
|
|
1989
|
-
className: "mask-size",
|
|
1990
|
-
transform(value) {
|
|
1991
|
-
return { maskSize: value, WebkitMaskSize: value };
|
|
1992
|
-
}
|
|
1993
|
-
},
|
|
1994
|
-
textSizeAdjust: {
|
|
1995
|
-
className: "text-size-adjust",
|
|
1996
|
-
transform(value) {
|
|
1997
|
-
return { textSizeAdjust: value, WebkitTextSizeAdjust: value };
|
|
1998
|
-
}
|
|
1999
|
-
}
|
|
2000
|
-
};
|
|
2001
2034
|
var utilities = Object.assign(
|
|
2002
2035
|
{},
|
|
2003
2036
|
layout,
|
|
@@ -2018,7 +2051,8 @@ var utilities = Object.assign(
|
|
|
2018
2051
|
interactivity,
|
|
2019
2052
|
svg,
|
|
2020
2053
|
helpers,
|
|
2021
|
-
polyfill
|
|
2054
|
+
polyfill,
|
|
2055
|
+
container
|
|
2022
2056
|
);
|
|
2023
2057
|
function definePattern(config2) {
|
|
2024
2058
|
return config2;
|
|
@@ -2060,8 +2094,12 @@ var stack = definePattern({
|
|
|
2060
2094
|
direction: { type: "property", value: "flexDirection" },
|
|
2061
2095
|
gap: { type: "property", value: "gap" }
|
|
2062
2096
|
},
|
|
2097
|
+
defaultValues: {
|
|
2098
|
+
direction: "column",
|
|
2099
|
+
gap: "10px"
|
|
2100
|
+
},
|
|
2063
2101
|
transform(props) {
|
|
2064
|
-
const { align, justify, direction
|
|
2102
|
+
const { align, justify, direction, gap, ...rest } = props;
|
|
2065
2103
|
return {
|
|
2066
2104
|
display: "flex",
|
|
2067
2105
|
flexDirection: direction,
|
|
@@ -2078,8 +2116,11 @@ var vstack = definePattern({
|
|
|
2078
2116
|
justify: { type: "property", value: "justifyContent" },
|
|
2079
2117
|
gap: { type: "property", value: "gap" }
|
|
2080
2118
|
},
|
|
2119
|
+
defaultValues: {
|
|
2120
|
+
gap: "10px"
|
|
2121
|
+
},
|
|
2081
2122
|
transform(props) {
|
|
2082
|
-
const { justify, gap
|
|
2123
|
+
const { justify, gap, ...rest } = props;
|
|
2083
2124
|
return {
|
|
2084
2125
|
display: "flex",
|
|
2085
2126
|
alignItems: "center",
|
|
@@ -2096,8 +2137,11 @@ var hstack = definePattern({
|
|
|
2096
2137
|
justify: { type: "property", value: "justifyContent" },
|
|
2097
2138
|
gap: { type: "property", value: "gap" }
|
|
2098
2139
|
},
|
|
2140
|
+
defaultValues: {
|
|
2141
|
+
gap: "10px"
|
|
2142
|
+
},
|
|
2099
2143
|
transform(props) {
|
|
2100
|
-
const { justify, gap
|
|
2144
|
+
const { justify, gap, ...rest } = props;
|
|
2101
2145
|
return {
|
|
2102
2146
|
display: "flex",
|
|
2103
2147
|
alignItems: "center",
|
|
@@ -2165,10 +2209,12 @@ var grid = definePattern({
|
|
|
2165
2209
|
columns: { type: "number" },
|
|
2166
2210
|
minChildWidth: { type: "token", value: "sizes", property: "width" }
|
|
2167
2211
|
},
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2212
|
+
defaultValues(props) {
|
|
2213
|
+
return { gap: props.columnGap || props.rowGap ? void 0 : "10px" };
|
|
2214
|
+
},
|
|
2215
|
+
transform(props, { map, isCssUnit }) {
|
|
2216
|
+
const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props;
|
|
2217
|
+
const getValue = (v) => isCssUnit(v) ? v : `token(sizes.${v}, ${v})`;
|
|
2172
2218
|
return {
|
|
2173
2219
|
display: "grid",
|
|
2174
2220
|
gridTemplateColumns: columns != null ? map(columns, (v) => `repeat(${v}, minmax(0, 1fr))`) : minChildWidth != null ? map(minChildWidth, (v) => `repeat(auto-fit, minmax(${getValue(v)}, 1fr))`) : void 0,
|
|
@@ -2224,7 +2270,7 @@ var wrap = definePattern({
|
|
|
2224
2270
|
};
|
|
2225
2271
|
}
|
|
2226
2272
|
});
|
|
2227
|
-
var
|
|
2273
|
+
var container2 = definePattern({
|
|
2228
2274
|
transform(props) {
|
|
2229
2275
|
return {
|
|
2230
2276
|
position: "relative",
|
|
@@ -2287,8 +2333,12 @@ var divider = definePattern({
|
|
|
2287
2333
|
thickness: { type: "token", value: "sizes", property: "borderWidth" },
|
|
2288
2334
|
color: { type: "token", value: "colors", property: "borderColor" }
|
|
2289
2335
|
},
|
|
2336
|
+
defaultValues: {
|
|
2337
|
+
orientation: "horizontal",
|
|
2338
|
+
thickness: "1px"
|
|
2339
|
+
},
|
|
2290
2340
|
transform(props, { map }) {
|
|
2291
|
-
const { orientation
|
|
2341
|
+
const { orientation, thickness, color, ...rest } = props;
|
|
2292
2342
|
return {
|
|
2293
2343
|
"--thickness": thickness,
|
|
2294
2344
|
width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
|
|
@@ -2350,8 +2400,12 @@ var float = definePattern({
|
|
|
2350
2400
|
]
|
|
2351
2401
|
}
|
|
2352
2402
|
},
|
|
2403
|
+
defaultValues(props) {
|
|
2404
|
+
const offset = props.offset || "0";
|
|
2405
|
+
return { offset, offsetX: offset, offsetY: offset, placement: "top-end" };
|
|
2406
|
+
},
|
|
2353
2407
|
transform(props, { map }) {
|
|
2354
|
-
const { offset
|
|
2408
|
+
const { offset, offsetX, offsetY, placement, ...rest } = props;
|
|
2355
2409
|
return {
|
|
2356
2410
|
display: "inline-flex",
|
|
2357
2411
|
justifyContent: "center",
|
|
@@ -2392,11 +2446,16 @@ var bleed = definePattern({
|
|
|
2392
2446
|
inline: { type: "property", value: "marginInline" },
|
|
2393
2447
|
block: { type: "property", value: "marginBlock" }
|
|
2394
2448
|
},
|
|
2395
|
-
|
|
2396
|
-
|
|
2449
|
+
defaultValues: {
|
|
2450
|
+
inline: "0",
|
|
2451
|
+
block: "0"
|
|
2452
|
+
},
|
|
2453
|
+
transform(props, { map, isCssUnit, isCssVar }) {
|
|
2454
|
+
const { inline, block, ...rest } = props;
|
|
2455
|
+
const valueFn = (v) => isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
|
|
2397
2456
|
return {
|
|
2398
|
-
"--bleed-x":
|
|
2399
|
-
"--bleed-y":
|
|
2457
|
+
"--bleed-x": map(inline, valueFn),
|
|
2458
|
+
"--bleed-y": map(block, valueFn),
|
|
2400
2459
|
marginInline: "calc(var(--bleed-x, 0) * -1)",
|
|
2401
2460
|
marginBlock: "calc(var(--bleed-y, 0) * -1)",
|
|
2402
2461
|
...rest
|
|
@@ -2411,6 +2470,23 @@ var visuallyHidden = definePattern({
|
|
|
2411
2470
|
};
|
|
2412
2471
|
}
|
|
2413
2472
|
});
|
|
2473
|
+
var cq = definePattern({
|
|
2474
|
+
properties: {
|
|
2475
|
+
name: { type: "token", value: "containerNames", property: "containerName" },
|
|
2476
|
+
type: { type: "property", value: "containerType" }
|
|
2477
|
+
},
|
|
2478
|
+
defaultValues: {
|
|
2479
|
+
type: "inline-size"
|
|
2480
|
+
},
|
|
2481
|
+
transform(props) {
|
|
2482
|
+
const { name, type, ...rest } = props;
|
|
2483
|
+
return {
|
|
2484
|
+
containerType: type,
|
|
2485
|
+
containerName: name,
|
|
2486
|
+
...rest
|
|
2487
|
+
};
|
|
2488
|
+
}
|
|
2489
|
+
});
|
|
2414
2490
|
var patterns = {
|
|
2415
2491
|
box,
|
|
2416
2492
|
flex,
|
|
@@ -2427,11 +2503,12 @@ var patterns = {
|
|
|
2427
2503
|
grid,
|
|
2428
2504
|
gridItem,
|
|
2429
2505
|
wrap,
|
|
2430
|
-
container,
|
|
2506
|
+
container: container2,
|
|
2431
2507
|
divider,
|
|
2432
2508
|
float,
|
|
2433
2509
|
bleed,
|
|
2434
|
-
visuallyHidden
|
|
2510
|
+
visuallyHidden,
|
|
2511
|
+
cq
|
|
2435
2512
|
};
|
|
2436
2513
|
var definePreset = (preset22) => preset22;
|
|
2437
2514
|
var preset = definePreset({
|
|
@@ -2441,7 +2518,7 @@ var preset = definePreset({
|
|
|
2441
2518
|
});
|
|
2442
2519
|
var src_default = preset;
|
|
2443
2520
|
|
|
2444
|
-
// ../node_modules/.pnpm/@pandacss+preset-panda@0.
|
|
2521
|
+
// ../node_modules/.pnpm/@pandacss+preset-panda@0.30.1/node_modules/@pandacss/preset-panda/dist/index.mjs
|
|
2445
2522
|
init_esm_shims();
|
|
2446
2523
|
var breakpoints = {
|
|
2447
2524
|
sm: "640px",
|
|
@@ -2450,6 +2527,20 @@ var breakpoints = {
|
|
|
2450
2527
|
xl: "1280px",
|
|
2451
2528
|
"2xl": "1536px"
|
|
2452
2529
|
};
|
|
2530
|
+
var containerSizes = {
|
|
2531
|
+
xs: "320px",
|
|
2532
|
+
sm: "384px",
|
|
2533
|
+
md: "448px",
|
|
2534
|
+
lg: "512px",
|
|
2535
|
+
xl: "576px",
|
|
2536
|
+
"2xl": "672px",
|
|
2537
|
+
"3xl": "768px",
|
|
2538
|
+
"4xl": "896px",
|
|
2539
|
+
"5xl": "1024px",
|
|
2540
|
+
"6xl": "1152px",
|
|
2541
|
+
"7xl": "1280px",
|
|
2542
|
+
"8xl": "1440px"
|
|
2543
|
+
};
|
|
2453
2544
|
var keyframes = {
|
|
2454
2545
|
spin: {
|
|
2455
2546
|
to: {
|
|
@@ -3069,7 +3160,8 @@ var preset2 = definePreset2({
|
|
|
3069
3160
|
keyframes,
|
|
3070
3161
|
breakpoints,
|
|
3071
3162
|
tokens,
|
|
3072
|
-
textStyles
|
|
3163
|
+
textStyles,
|
|
3164
|
+
containerSizes
|
|
3073
3165
|
}
|
|
3074
3166
|
});
|
|
3075
3167
|
var src_default2 = preset2;
|
|
@@ -3417,11 +3509,11 @@ async function getExtendWarnings() {
|
|
|
3417
3509
|
}
|
|
3418
3510
|
return Array.from(warnings);
|
|
3419
3511
|
}
|
|
3420
|
-
async function
|
|
3421
|
-
return paths.filter((path2) => !ctx.utility.tokens.get(path2));
|
|
3512
|
+
async function filterInvalidTokens(ctx, paths) {
|
|
3513
|
+
return paths.filter((path2) => !ctx.utility.tokens.view.get(path2));
|
|
3422
3514
|
}
|
|
3423
3515
|
async function isColorToken(ctx, value) {
|
|
3424
|
-
return !!ctx.utility.tokens.
|
|
3516
|
+
return !!ctx.utility.tokens.view.categoryMap.get("colors")?.get(value);
|
|
3425
3517
|
}
|
|
3426
3518
|
async function isColorAttribute(ctx, _attr) {
|
|
3427
3519
|
const longhand = await resolveLongHand(ctx, _attr);
|
|
@@ -3440,8 +3532,9 @@ async function isConfigFile(fileName) {
|
|
|
3440
3532
|
async function isValidFile(ctx, fileName) {
|
|
3441
3533
|
return ctx.getFiles().includes(fileName);
|
|
3442
3534
|
}
|
|
3443
|
-
async function
|
|
3444
|
-
|
|
3535
|
+
async function resolveShorthands(ctx, name) {
|
|
3536
|
+
console.log("name", name, ctx.utility.getPropShorthandsMap().get(name));
|
|
3537
|
+
return ctx.utility.getPropShorthandsMap().get(name);
|
|
3445
3538
|
}
|
|
3446
3539
|
async function resolveLongHand(ctx, name) {
|
|
3447
3540
|
const reverseShorthandsMap = /* @__PURE__ */ new Map();
|
|
@@ -3485,8 +3578,8 @@ async function runAsync(action, opts, ...args) {
|
|
|
3485
3578
|
return isValidProperty(ctx, ...args);
|
|
3486
3579
|
case "resolveLongHand":
|
|
3487
3580
|
return resolveLongHand(ctx, ...args);
|
|
3488
|
-
case "
|
|
3489
|
-
return
|
|
3581
|
+
case "resolveShorthands":
|
|
3582
|
+
return resolveShorthands(ctx, ...args);
|
|
3490
3583
|
case "isConfigFile":
|
|
3491
3584
|
return isConfigFile(opts.currentFile);
|
|
3492
3585
|
case "isValidFile":
|
|
@@ -3495,8 +3588,8 @@ async function runAsync(action, opts, ...args) {
|
|
|
3495
3588
|
return isColorAttribute(ctx, ...args);
|
|
3496
3589
|
case "isColorToken":
|
|
3497
3590
|
return isColorToken(ctx, ...args);
|
|
3498
|
-
case "
|
|
3499
|
-
return
|
|
3591
|
+
case "filterInvalidTokens":
|
|
3592
|
+
return filterInvalidTokens(ctx, ...args);
|
|
3500
3593
|
case "getExtendWarnings":
|
|
3501
3594
|
return getExtendWarnings();
|
|
3502
3595
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/eslint-plugin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "Eslint plugin for Panda CSS",
|
|
5
5
|
"author": "Abraham Aremu <anubra266@gmail.com>",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@pandacss/config": "^0.
|
|
30
|
-
"@pandacss/generator": "^0.
|
|
31
|
-
"@pandacss/node": "^0.
|
|
32
|
-
"@pandacss/shared": "^0.
|
|
29
|
+
"@pandacss/config": "^0.30.1",
|
|
30
|
+
"@pandacss/generator": "^0.30.1",
|
|
31
|
+
"@pandacss/node": "^0.30.1",
|
|
32
|
+
"@pandacss/shared": "^0.30.1",
|
|
33
33
|
"@typescript-eslint/utils": "^6.19.1",
|
|
34
34
|
"hookable": "^5.5.3",
|
|
35
35
|
"synckit": "^0.9.0"
|