chaincss 2.1.20 → 2.1.21
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 +6 -8
- package/dist/runtime/index.js +6 -8
- package/package.json +1 -1
- package/src/runtime/index.ts +7 -9
package/dist/index.js
CHANGED
|
@@ -3356,15 +3356,13 @@ function injectChainStyles(styles) {
|
|
|
3356
3356
|
let staticCount = 0, dynamicCount = 0, hybridCount = 0;
|
|
3357
3357
|
for (const [key, obj] of Object.entries(styles)) {
|
|
3358
3358
|
if (!obj || !obj.selectors) continue;
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3359
|
+
if (obj.__isHybrid) {
|
|
3360
|
+
hybridCount++;
|
|
3361
|
+
} else if (obj.__runtimeClasses && Object.keys(obj.__runtimeClasses).length > 0) {
|
|
3362
|
+
dynamicCount++;
|
|
3363
|
+
} else {
|
|
3364
|
+
staticCount++;
|
|
3364
3365
|
}
|
|
3365
|
-
if (stat > 0 && dyn > 0) hybridCount++;
|
|
3366
|
-
else if (dyn > 0) dynamicCount++;
|
|
3367
|
-
else staticCount++;
|
|
3368
3366
|
const sel = "." + obj.selectors[0];
|
|
3369
3367
|
css += sel + "{";
|
|
3370
3368
|
for (const [k, v] of Object.entries(obj)) {
|
package/dist/runtime/index.js
CHANGED
|
@@ -3912,15 +3912,13 @@ function injectChainStyles(styles3) {
|
|
|
3912
3912
|
let staticCount = 0, dynamicCount = 0, hybridCount = 0;
|
|
3913
3913
|
for (const [key, obj] of Object.entries(styles3)) {
|
|
3914
3914
|
if (!obj || !obj.selectors) continue;
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3915
|
+
if (obj.__isHybrid) {
|
|
3916
|
+
hybridCount++;
|
|
3917
|
+
} else if (obj.__runtimeClasses && Object.keys(obj.__runtimeClasses).length > 0) {
|
|
3918
|
+
dynamicCount++;
|
|
3919
|
+
} else {
|
|
3920
|
+
staticCount++;
|
|
3920
3921
|
}
|
|
3921
|
-
if (stat > 0 && dyn > 0) hybridCount++;
|
|
3922
|
-
else if (dyn > 0) dynamicCount++;
|
|
3923
|
-
else staticCount++;
|
|
3924
3922
|
const sel = "." + obj.selectors[0];
|
|
3925
3923
|
css += sel + "{";
|
|
3926
3924
|
for (const [k, v] of Object.entries(obj)) {
|
package/package.json
CHANGED
package/src/runtime/index.ts
CHANGED
|
@@ -97,16 +97,14 @@ export function injectChainStyles(styles: Record<string, any>) {
|
|
|
97
97
|
for (const [key, obj] of Object.entries(styles)) {
|
|
98
98
|
if (!obj || !obj.selectors) continue;
|
|
99
99
|
|
|
100
|
-
//
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
// Use smartChain's built-in detection
|
|
101
|
+
if (obj.__isHybrid) {
|
|
102
|
+
hybridCount++;
|
|
103
|
+
} else if (obj.__runtimeClasses && Object.keys(obj.__runtimeClasses).length > 0) {
|
|
104
|
+
dynamicCount++;
|
|
105
|
+
} else {
|
|
106
|
+
staticCount++;
|
|
106
107
|
}
|
|
107
|
-
if (stat > 0 && dyn > 0) hybridCount++;
|
|
108
|
-
else if (dyn > 0) dynamicCount++;
|
|
109
|
-
else staticCount++;
|
|
110
108
|
|
|
111
109
|
const sel = '.' + obj.selectors[0];
|
|
112
110
|
css += sel + '{';
|