@plumeria/utils 2.2.3 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/transform.js +20 -15
- package/package.json +2 -2
package/dist/transform.js
CHANGED
|
@@ -62,23 +62,28 @@ function compileToSingleCSS(rule) {
|
|
|
62
62
|
nonFlatBase[atRule] = nestedObj;
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return;
|
|
68
|
-
const nonFlatObj = { [key]: targetNonFlat };
|
|
65
|
+
Object.entries(nonFlatBase).forEach(([selector, style]) => {
|
|
66
|
+
const nonFlatObj = { [key]: { [selector]: style } };
|
|
69
67
|
const nonFlatHash = (0, zss_engine_1.genBase36Hash)(nonFlatObj, 1, 7);
|
|
70
68
|
const { styleSheet } = (0, zss_engine_1.transpile)(nonFlatObj, nonFlatHash);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
: styleSheet
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
69
|
+
records.push({
|
|
70
|
+
key: selector,
|
|
71
|
+
hash: nonFlatHash,
|
|
72
|
+
sheet: styleSheet,
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
Object.entries(nonFlatQuery).forEach(([atRule, nestedStyles]) => {
|
|
76
|
+
Object.entries(nestedStyles).forEach(([selector, style]) => {
|
|
77
|
+
const nonFlatObj = {
|
|
78
|
+
[key]: { [atRule]: { [selector]: style } },
|
|
79
|
+
};
|
|
80
|
+
const nonFlatHash = (0, zss_engine_1.genBase36Hash)(nonFlatObj, 1, 7);
|
|
81
|
+
const { styleSheet } = (0, zss_engine_1.transpile)(nonFlatObj, nonFlatHash);
|
|
82
|
+
const finalSheet = styleSheet.replace(`.${nonFlatHash}`, `.${nonFlatHash}:not(#\\#):not(#\\#)`);
|
|
83
|
+
records.push({
|
|
84
|
+
key: atRule + selector,
|
|
85
|
+
hash: nonFlatHash,
|
|
86
|
+
sheet: finalSheet,
|
|
82
87
|
});
|
|
83
88
|
});
|
|
84
89
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/utils",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Plumeria Utils",
|
|
5
5
|
"author": "Refirst 11",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@swc/core": "1.15.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"zss-engine": "
|
|
27
|
+
"zss-engine": "2.0.0"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public",
|