chaincss 2.1.19 → 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/plugins/vite.js +2 -4
- package/dist/runtime/index.js +6 -8
- package/package.json +2 -2
- package/src/plugins/vite.ts +2 -4
- 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/plugins/vite.js
CHANGED
|
@@ -3453,10 +3453,8 @@ const setManifest = (manifest) => {
|
|
|
3453
3453
|
if (chainCount > 0) {
|
|
3454
3454
|
console.log("");
|
|
3455
3455
|
console.log("\u26D3\uFE0F ChainCSS \u2014 Ready");
|
|
3456
|
-
console.log(` \u{
|
|
3457
|
-
console.log(
|
|
3458
|
-
console.log(` \u{1F500} Hybrid: ${hybridCount} styles \u2192 Auto-split`);
|
|
3459
|
-
console.log(` \u{1F4DD} Total: ${chainCount} chain() calls detected`);
|
|
3456
|
+
console.log(` \u{1F4DD} ${chainCount} chain() calls detected`);
|
|
3457
|
+
console.log(" \u{1F500} Auto-split active \u2014 open browser console for split report");
|
|
3460
3458
|
console.log("");
|
|
3461
3459
|
}
|
|
3462
3460
|
return {
|
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chaincss",
|
|
3
|
-
"version": "2.1.
|
|
4
|
-
"description": "ChainCSS
|
|
3
|
+
"version": "2.1.21",
|
|
4
|
+
"description": "ChainCSS - The first CSS-in-JS library with true auto-detection mixed mode. Zero runtime by default, dynamic when you need it.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
package/src/plugins/vite.ts
CHANGED
|
@@ -347,10 +347,8 @@ const setManifest = (manifest) => {
|
|
|
347
347
|
if (chainCount > 0) {
|
|
348
348
|
console.log('');
|
|
349
349
|
console.log('⛓️ ChainCSS — Ready');
|
|
350
|
-
console.log(`
|
|
351
|
-
console.log(
|
|
352
|
-
console.log(` 🔀 Hybrid: ${hybridCount} styles → Auto-split`);
|
|
353
|
-
console.log(` 📝 Total: ${chainCount} chain() calls detected`);
|
|
350
|
+
console.log(` 📝 ${chainCount} chain() calls detected`);
|
|
351
|
+
console.log(' 🔀 Auto-split active — open browser console for split report');
|
|
354
352
|
console.log('');
|
|
355
353
|
}
|
|
356
354
|
|
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 + '{';
|