@plumeria/core 2.2.1 → 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/index.js +21 -21
- package/dist/index.mjs +21 -21
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14,31 +14,31 @@ function create(object) {
|
|
|
14
14
|
if (prop.startsWith("@media") || prop.startsWith("@container")) Object.entries(value).forEach(([innerProp, innerValue]) => {
|
|
15
15
|
const atomicMap = new Map();
|
|
16
16
|
(0, zss_engine.processAtomicProps)({ [innerProp]: innerValue }, atomicMap, prop);
|
|
17
|
-
const
|
|
18
|
-
const
|
|
17
|
+
const querySheets = [];
|
|
18
|
+
const queryHashes = [];
|
|
19
19
|
for (const [hash, sheet] of atomicMap) {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
querySheets.push(sheet.replace(`.${hash}`, `.${hash}:not(#\\#)`));
|
|
21
|
+
queryHashes.push(hash);
|
|
22
22
|
}
|
|
23
|
-
if (
|
|
23
|
+
if (querySheets.length > 0) records.push({
|
|
24
24
|
key: prop + innerProp,
|
|
25
|
-
hash:
|
|
26
|
-
sheet:
|
|
25
|
+
hash: queryHashes.join(" "),
|
|
26
|
+
sheet: querySheets.join("")
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
else {
|
|
30
30
|
const atomicMap = new Map();
|
|
31
31
|
(0, zss_engine.processAtomicProps)({ [prop]: value }, atomicMap);
|
|
32
|
-
const
|
|
33
|
-
const
|
|
32
|
+
const sheets = [];
|
|
33
|
+
const hashes = [];
|
|
34
34
|
for (const [hash, sheet] of atomicMap) {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
sheets.push(sheet);
|
|
36
|
+
hashes.push(hash);
|
|
37
37
|
}
|
|
38
|
-
if (
|
|
38
|
+
if (sheets.length > 0) records.push({
|
|
39
39
|
key: prop,
|
|
40
|
-
hash:
|
|
41
|
-
sheet:
|
|
40
|
+
hash: hashes.join(" "),
|
|
41
|
+
sheet: sheets.join("")
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
});
|
|
@@ -73,10 +73,10 @@ function create(object) {
|
|
|
73
73
|
return Object.freeze(result);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
const
|
|
76
|
+
const setSheets = new Set();
|
|
77
77
|
function props(...objects) {
|
|
78
78
|
const seenSheets = new Set();
|
|
79
|
-
const
|
|
79
|
+
const baseSheets = [];
|
|
80
80
|
const classList = [];
|
|
81
81
|
const chosen = new Map();
|
|
82
82
|
const rightmostKeys = [];
|
|
@@ -112,17 +112,17 @@ function props(...objects) {
|
|
|
112
112
|
for (const { hash, sheet } of orderedKeys) if (!seenSheets.has(sheet)) {
|
|
113
113
|
seenSheets.add(sheet);
|
|
114
114
|
classList.push(hash);
|
|
115
|
-
|
|
115
|
+
baseSheets.push(sheet);
|
|
116
116
|
}
|
|
117
117
|
for (const { hash, sheet } of rightmostKeys) if (!seenSheets.has(sheet)) {
|
|
118
118
|
seenSheets.add(sheet);
|
|
119
119
|
classList.push(hash);
|
|
120
|
-
|
|
120
|
+
baseSheets.push(sheet);
|
|
121
121
|
}
|
|
122
|
-
const
|
|
123
|
-
|
|
122
|
+
const uniqueSheets = [...baseSheets].filter((sheet) => !setSheets.has(sheet));
|
|
123
|
+
uniqueSheets.forEach((sheet) => setSheets.add(sheet));
|
|
124
124
|
if (typeof require_css.pQueue.promise === "undefined") require_css.pQueue.init();
|
|
125
|
-
require_css.pQueue.resolve(
|
|
125
|
+
require_css.pQueue.resolve(uniqueSheets.join(""));
|
|
126
126
|
return classList.join(" ");
|
|
127
127
|
}
|
|
128
128
|
|
package/dist/index.mjs
CHANGED
|
@@ -14,31 +14,31 @@ function create(object) {
|
|
|
14
14
|
if (prop.startsWith("@media") || prop.startsWith("@container")) Object.entries(value).forEach(([innerProp, innerValue]) => {
|
|
15
15
|
const atomicMap = new Map();
|
|
16
16
|
processAtomicProps({ [innerProp]: innerValue }, atomicMap, prop);
|
|
17
|
-
const
|
|
18
|
-
const
|
|
17
|
+
const querySheets = [];
|
|
18
|
+
const queryHashes = [];
|
|
19
19
|
for (const [hash, sheet] of atomicMap) {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
querySheets.push(sheet.replace(`.${hash}`, `.${hash}:not(#\\#)`));
|
|
21
|
+
queryHashes.push(hash);
|
|
22
22
|
}
|
|
23
|
-
if (
|
|
23
|
+
if (querySheets.length > 0) records.push({
|
|
24
24
|
key: prop + innerProp,
|
|
25
|
-
hash:
|
|
26
|
-
sheet:
|
|
25
|
+
hash: queryHashes.join(" "),
|
|
26
|
+
sheet: querySheets.join("")
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
else {
|
|
30
30
|
const atomicMap = new Map();
|
|
31
31
|
processAtomicProps({ [prop]: value }, atomicMap);
|
|
32
|
-
const
|
|
33
|
-
const
|
|
32
|
+
const sheets = [];
|
|
33
|
+
const hashes = [];
|
|
34
34
|
for (const [hash, sheet] of atomicMap) {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
sheets.push(sheet);
|
|
36
|
+
hashes.push(hash);
|
|
37
37
|
}
|
|
38
|
-
if (
|
|
38
|
+
if (sheets.length > 0) records.push({
|
|
39
39
|
key: prop,
|
|
40
|
-
hash:
|
|
41
|
-
sheet:
|
|
40
|
+
hash: hashes.join(" "),
|
|
41
|
+
sheet: sheets.join("")
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
});
|
|
@@ -73,10 +73,10 @@ function create(object) {
|
|
|
73
73
|
return Object.freeze(result);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
const
|
|
76
|
+
const setSheets = new Set();
|
|
77
77
|
function props(...objects) {
|
|
78
78
|
const seenSheets = new Set();
|
|
79
|
-
const
|
|
79
|
+
const baseSheets = [];
|
|
80
80
|
const classList = [];
|
|
81
81
|
const chosen = new Map();
|
|
82
82
|
const rightmostKeys = [];
|
|
@@ -112,17 +112,17 @@ function props(...objects) {
|
|
|
112
112
|
for (const { hash, sheet } of orderedKeys) if (!seenSheets.has(sheet)) {
|
|
113
113
|
seenSheets.add(sheet);
|
|
114
114
|
classList.push(hash);
|
|
115
|
-
|
|
115
|
+
baseSheets.push(sheet);
|
|
116
116
|
}
|
|
117
117
|
for (const { hash, sheet } of rightmostKeys) if (!seenSheets.has(sheet)) {
|
|
118
118
|
seenSheets.add(sheet);
|
|
119
119
|
classList.push(hash);
|
|
120
|
-
|
|
120
|
+
baseSheets.push(sheet);
|
|
121
121
|
}
|
|
122
|
-
const
|
|
123
|
-
|
|
122
|
+
const uniqueSheets = [...baseSheets].filter((sheet) => !setSheets.has(sheet));
|
|
123
|
+
uniqueSheets.forEach((sheet) => setSheets.add(sheet));
|
|
124
124
|
if (typeof pQueue.promise === "undefined") pQueue.init();
|
|
125
|
-
pQueue.resolve(
|
|
125
|
+
pQueue.resolve(uniqueSheets.join(""));
|
|
126
126
|
return classList.join(" ");
|
|
127
127
|
}
|
|
128
128
|
|