@plumeria/utils 2.2.0 → 2.2.2
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 +15 -17
- package/package.json +2 -2
package/dist/transform.js
CHANGED
|
@@ -14,23 +14,21 @@ function compileToSingleCSS(object) {
|
|
|
14
14
|
const finalFlat = (0, zss_engine_1.overrideLonghand)(flat);
|
|
15
15
|
const records = [];
|
|
16
16
|
Object.entries(finalFlat).forEach(([prop, value]) => {
|
|
17
|
-
if (
|
|
18
|
-
typeof value === 'object' &&
|
|
19
|
-
value !== null) {
|
|
17
|
+
if (prop.startsWith('@media') || prop.startsWith('@container')) {
|
|
20
18
|
Object.entries(value).forEach(([innerProp, innerValue]) => {
|
|
21
19
|
const atomicMap = new Map();
|
|
22
20
|
(0, zss_engine_1.processAtomicProps)({ [innerProp]: innerValue }, atomicMap, prop);
|
|
23
|
-
const
|
|
24
|
-
const
|
|
21
|
+
const querySheets = [];
|
|
22
|
+
const queryHashes = [];
|
|
25
23
|
for (const [hash, sheet] of atomicMap) {
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
querySheets.push(sheet.replace(`.${hash}`, `.${hash}:not(#\\#):not(#\\#)`));
|
|
25
|
+
queryHashes.push(hash);
|
|
28
26
|
}
|
|
29
|
-
if (
|
|
27
|
+
if (querySheets.length > 0) {
|
|
30
28
|
records.push({
|
|
31
29
|
key: prop + innerProp,
|
|
32
|
-
hash:
|
|
33
|
-
sheet:
|
|
30
|
+
hash: queryHashes.join(' '),
|
|
31
|
+
sheet: querySheets.join(''),
|
|
34
32
|
});
|
|
35
33
|
}
|
|
36
34
|
});
|
|
@@ -38,17 +36,17 @@ function compileToSingleCSS(object) {
|
|
|
38
36
|
else {
|
|
39
37
|
const atomicMap = new Map();
|
|
40
38
|
(0, zss_engine_1.processAtomicProps)({ [prop]: value }, atomicMap);
|
|
41
|
-
const
|
|
42
|
-
const
|
|
39
|
+
const sheets = [];
|
|
40
|
+
const hashes = [];
|
|
43
41
|
for (const [hash, sheet] of atomicMap) {
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
sheets.push(sheet);
|
|
43
|
+
hashes.push(hash);
|
|
46
44
|
}
|
|
47
|
-
if (
|
|
45
|
+
if (sheets.length > 0) {
|
|
48
46
|
records.push({
|
|
49
47
|
key: prop,
|
|
50
|
-
hash:
|
|
51
|
-
sheet:
|
|
48
|
+
hash: hashes.join(' '),
|
|
49
|
+
sheet: sheets.join(''),
|
|
52
50
|
});
|
|
53
51
|
}
|
|
54
52
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plumeria/utils",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
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": "1.2.
|
|
27
|
+
"zss-engine": "1.2.2"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public",
|