@pandacss/generator 0.32.0 → 0.32.1
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.js +4 -3
- package/dist/index.mjs +4 -3
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -88,7 +88,7 @@ function generateConditions(ctx) {
|
|
|
88
88
|
export interface Conditions {
|
|
89
89
|
${keys.map(
|
|
90
90
|
(key) => ` ${key === "base" ? `/** The base (=no conditions) styles to apply */
|
|
91
|
-
` : ctx.conditions.get(key) ? `/** \`${ctx.conditions.get(key)}\` */
|
|
91
|
+
` : ctx.conditions.get(key) ? `/** \`${[].concat(ctx.conditions.get(key)).join(" ")}\` */
|
|
92
92
|
` : ""} ${JSON.stringify(key)}: string`
|
|
93
93
|
).join("\n")}
|
|
94
94
|
}
|
|
@@ -3772,8 +3772,9 @@ function generateTokenCss(ctx, sheet) {
|
|
|
3772
3772
|
const keys = key.split(":");
|
|
3773
3773
|
const css2 = (0, import_core4.stringify)(varsObj);
|
|
3774
3774
|
const mapped = keys.map((key2) => conditions.get(key2)).filter(Boolean).map((condition) => {
|
|
3775
|
-
const
|
|
3776
|
-
|
|
3775
|
+
const lastSegment = Array.isArray(condition) ? condition.at(-1) : condition;
|
|
3776
|
+
const parent = (0, import_core4.extractParentSelectors)(lastSegment);
|
|
3777
|
+
return parent ? `&${parent}` : lastSegment;
|
|
3777
3778
|
});
|
|
3778
3779
|
const rule = getDeepestRule(root, mapped);
|
|
3779
3780
|
if (!rule)
|
package/dist/index.mjs
CHANGED
|
@@ -52,7 +52,7 @@ function generateConditions(ctx) {
|
|
|
52
52
|
export interface Conditions {
|
|
53
53
|
${keys.map(
|
|
54
54
|
(key) => ` ${key === "base" ? `/** The base (=no conditions) styles to apply */
|
|
55
|
-
` : ctx.conditions.get(key) ? `/** \`${ctx.conditions.get(key)}\` */
|
|
55
|
+
` : ctx.conditions.get(key) ? `/** \`${[].concat(ctx.conditions.get(key)).join(" ")}\` */
|
|
56
56
|
` : ""} ${JSON.stringify(key)}: string`
|
|
57
57
|
).join("\n")}
|
|
58
58
|
}
|
|
@@ -3736,8 +3736,9 @@ function generateTokenCss(ctx, sheet) {
|
|
|
3736
3736
|
const keys = key.split(":");
|
|
3737
3737
|
const css2 = stringify4(varsObj);
|
|
3738
3738
|
const mapped = keys.map((key2) => conditions.get(key2)).filter(Boolean).map((condition) => {
|
|
3739
|
-
const
|
|
3740
|
-
|
|
3739
|
+
const lastSegment = Array.isArray(condition) ? condition.at(-1) : condition;
|
|
3740
|
+
const parent = extractParentSelectors(lastSegment);
|
|
3741
|
+
return parent ? `&${parent}` : lastSegment;
|
|
3741
3742
|
});
|
|
3742
3743
|
const rule = getDeepestRule(root, mapped);
|
|
3743
3744
|
if (!rule)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/generator",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.1",
|
|
4
4
|
"description": "The css generator for css panda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"pluralize": "8.0.0",
|
|
38
38
|
"postcss": "8.4.35",
|
|
39
39
|
"ts-pattern": "5.0.8",
|
|
40
|
-
"@pandacss/core": "0.32.
|
|
41
|
-
"@pandacss/is-valid-prop": "^0.32.
|
|
42
|
-
"@pandacss/logger": "0.32.
|
|
43
|
-
"@pandacss/shared": "0.32.
|
|
44
|
-
"@pandacss/token-dictionary": "0.32.
|
|
45
|
-
"@pandacss/types": "0.32.
|
|
40
|
+
"@pandacss/core": "0.32.1",
|
|
41
|
+
"@pandacss/is-valid-prop": "^0.32.1",
|
|
42
|
+
"@pandacss/logger": "0.32.1",
|
|
43
|
+
"@pandacss/shared": "0.32.1",
|
|
44
|
+
"@pandacss/token-dictionary": "0.32.1",
|
|
45
|
+
"@pandacss/types": "0.32.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/pluralize": "0.0.33"
|