@pandacss/node 0.0.0-dev-20231214172157 → 0.0.0-dev-20231218191858
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +13 -6
- package/dist/index.mjs +13 -6
- package/package.json +13 -13
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -2656,6 +2656,7 @@ var Builder = class {
|
|
|
2656
2656
|
*/
|
|
2657
2657
|
context;
|
|
2658
2658
|
hasEmitted = false;
|
|
2659
|
+
hasFilesChanged = true;
|
|
2659
2660
|
affecteds;
|
|
2660
2661
|
getConfigPath = () => {
|
|
2661
2662
|
const configPath = findConfig();
|
|
@@ -2675,18 +2676,21 @@ var Builder = class {
|
|
|
2675
2676
|
this.context = new PandaContext({ ...conf, hooks: ctx.hooks });
|
|
2676
2677
|
this.context.appendBaselineCss();
|
|
2677
2678
|
});
|
|
2679
|
+
import_logger6.logger.debug("builder", this.affecteds);
|
|
2678
2680
|
if (this.affecteds.hasConfigChanged) {
|
|
2679
2681
|
import_logger6.logger.debug("builder", "\u2699\uFE0F Config changed, reloading");
|
|
2680
2682
|
await ctx.hooks.callHook("config:change", ctx.config);
|
|
2681
2683
|
return;
|
|
2682
2684
|
}
|
|
2683
|
-
|
|
2684
|
-
if (hasFilesChanged) {
|
|
2685
|
+
this.hasFilesChanged = this.checkFilesChanged(ctx.getFiles());
|
|
2686
|
+
if (this.hasFilesChanged) {
|
|
2687
|
+
import_logger6.logger.debug("builder", "Files changed, invalidating them");
|
|
2685
2688
|
ctx.project.reloadSourceFiles();
|
|
2686
2689
|
}
|
|
2687
2690
|
};
|
|
2688
2691
|
async emit() {
|
|
2689
2692
|
if (this.hasEmitted && this.affecteds?.hasConfigChanged) {
|
|
2693
|
+
import_logger6.logger.debug("builder", "Emit artifacts after config change");
|
|
2690
2694
|
await emitArtifacts(this.getContextOrThrow(), Array.from(this.affecteds.artifacts));
|
|
2691
2695
|
}
|
|
2692
2696
|
this.hasEmitted = true;
|
|
@@ -2726,11 +2730,13 @@ var Builder = class {
|
|
|
2726
2730
|
return files.some((file) => !this.getFileMeta(file).isUnchanged);
|
|
2727
2731
|
}
|
|
2728
2732
|
extract = async () => {
|
|
2733
|
+
const hasConfigChanged = this.affecteds ? this.affecteds.hasConfigChanged : true;
|
|
2734
|
+
if (!this.hasFilesChanged && !hasConfigChanged) {
|
|
2735
|
+
import_logger6.logger.debug("builder", "No files or config changed, skipping extract");
|
|
2736
|
+
return;
|
|
2737
|
+
}
|
|
2729
2738
|
const ctx = this.getContextOrThrow();
|
|
2730
2739
|
const files = ctx.getFiles();
|
|
2731
|
-
const hasConfigChanged = this.affecteds ? this.affecteds.hasConfigChanged : false;
|
|
2732
|
-
if (hasConfigChanged)
|
|
2733
|
-
return;
|
|
2734
2740
|
const done = import_logger6.logger.time.info("Extracted in");
|
|
2735
2741
|
const promises = files.map((file) => limit2(() => this.extractFile(ctx, file)));
|
|
2736
2742
|
await Promise.allSettled(promises);
|
|
@@ -2756,9 +2762,10 @@ var Builder = class {
|
|
|
2756
2762
|
this.initialRoot = root.toString();
|
|
2757
2763
|
}
|
|
2758
2764
|
root.removeAll();
|
|
2765
|
+
const css2 = this.toString();
|
|
2759
2766
|
const newCss = (0, import_core.optimizeCss)(`
|
|
2760
2767
|
${this.initialRoot}
|
|
2761
|
-
${
|
|
2768
|
+
${css2}
|
|
2762
2769
|
`);
|
|
2763
2770
|
root.append(newCss);
|
|
2764
2771
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -2630,6 +2630,7 @@ var Builder = class {
|
|
|
2630
2630
|
*/
|
|
2631
2631
|
context;
|
|
2632
2632
|
hasEmitted = false;
|
|
2633
|
+
hasFilesChanged = true;
|
|
2633
2634
|
affecteds;
|
|
2634
2635
|
getConfigPath = () => {
|
|
2635
2636
|
const configPath = findConfig();
|
|
@@ -2649,18 +2650,21 @@ var Builder = class {
|
|
|
2649
2650
|
this.context = new PandaContext({ ...conf, hooks: ctx.hooks });
|
|
2650
2651
|
this.context.appendBaselineCss();
|
|
2651
2652
|
});
|
|
2653
|
+
logger6.debug("builder", this.affecteds);
|
|
2652
2654
|
if (this.affecteds.hasConfigChanged) {
|
|
2653
2655
|
logger6.debug("builder", "\u2699\uFE0F Config changed, reloading");
|
|
2654
2656
|
await ctx.hooks.callHook("config:change", ctx.config);
|
|
2655
2657
|
return;
|
|
2656
2658
|
}
|
|
2657
|
-
|
|
2658
|
-
if (hasFilesChanged) {
|
|
2659
|
+
this.hasFilesChanged = this.checkFilesChanged(ctx.getFiles());
|
|
2660
|
+
if (this.hasFilesChanged) {
|
|
2661
|
+
logger6.debug("builder", "Files changed, invalidating them");
|
|
2659
2662
|
ctx.project.reloadSourceFiles();
|
|
2660
2663
|
}
|
|
2661
2664
|
};
|
|
2662
2665
|
async emit() {
|
|
2663
2666
|
if (this.hasEmitted && this.affecteds?.hasConfigChanged) {
|
|
2667
|
+
logger6.debug("builder", "Emit artifacts after config change");
|
|
2664
2668
|
await emitArtifacts(this.getContextOrThrow(), Array.from(this.affecteds.artifacts));
|
|
2665
2669
|
}
|
|
2666
2670
|
this.hasEmitted = true;
|
|
@@ -2700,11 +2704,13 @@ var Builder = class {
|
|
|
2700
2704
|
return files.some((file) => !this.getFileMeta(file).isUnchanged);
|
|
2701
2705
|
}
|
|
2702
2706
|
extract = async () => {
|
|
2707
|
+
const hasConfigChanged = this.affecteds ? this.affecteds.hasConfigChanged : true;
|
|
2708
|
+
if (!this.hasFilesChanged && !hasConfigChanged) {
|
|
2709
|
+
logger6.debug("builder", "No files or config changed, skipping extract");
|
|
2710
|
+
return;
|
|
2711
|
+
}
|
|
2703
2712
|
const ctx = this.getContextOrThrow();
|
|
2704
2713
|
const files = ctx.getFiles();
|
|
2705
|
-
const hasConfigChanged = this.affecteds ? this.affecteds.hasConfigChanged : false;
|
|
2706
|
-
if (hasConfigChanged)
|
|
2707
|
-
return;
|
|
2708
2714
|
const done = logger6.time.info("Extracted in");
|
|
2709
2715
|
const promises = files.map((file) => limit2(() => this.extractFile(ctx, file)));
|
|
2710
2716
|
await Promise.allSettled(promises);
|
|
@@ -2730,9 +2736,10 @@ var Builder = class {
|
|
|
2730
2736
|
this.initialRoot = root.toString();
|
|
2731
2737
|
}
|
|
2732
2738
|
root.removeAll();
|
|
2739
|
+
const css2 = this.toString();
|
|
2733
2740
|
const newCss = optimizeCss(`
|
|
2734
2741
|
${this.initialRoot}
|
|
2735
|
-
${
|
|
2742
|
+
${css2}
|
|
2736
2743
|
`);
|
|
2737
2744
|
root.append(newCss);
|
|
2738
2745
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/node",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20231218191858",
|
|
4
4
|
"description": "The core css panda library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -48,17 +48,17 @@
|
|
|
48
48
|
"ts-morph": "19.0.0",
|
|
49
49
|
"ts-pattern": "5.0.5",
|
|
50
50
|
"tsconfck": "^2.1.2",
|
|
51
|
-
"@pandacss/config": "0.0.0-dev-
|
|
52
|
-
"@pandacss/
|
|
53
|
-
"@pandacss/
|
|
54
|
-
"@pandacss/extractor": "0.0.0-dev-
|
|
55
|
-
"@pandacss/
|
|
56
|
-
"@pandacss/
|
|
57
|
-
"@pandacss/
|
|
58
|
-
"@pandacss/
|
|
59
|
-
"@pandacss/
|
|
60
|
-
"@pandacss/
|
|
61
|
-
"@pandacss/
|
|
51
|
+
"@pandacss/config": "0.0.0-dev-20231218191858",
|
|
52
|
+
"@pandacss/core": "0.0.0-dev-20231218191858",
|
|
53
|
+
"@pandacss/error": "0.0.0-dev-20231218191858",
|
|
54
|
+
"@pandacss/extractor": "0.0.0-dev-20231218191858",
|
|
55
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20231218191858",
|
|
56
|
+
"@pandacss/generator": "0.0.0-dev-20231218191858",
|
|
57
|
+
"@pandacss/logger": "0.0.0-dev-20231218191858",
|
|
58
|
+
"@pandacss/parser": "0.0.0-dev-20231218191858",
|
|
59
|
+
"@pandacss/shared": "0.0.0-dev-20231218191858",
|
|
60
|
+
"@pandacss/types": "0.0.0-dev-20231218191858",
|
|
61
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20231218191858"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@types/fs-extra": "11.0.4",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@types/pluralize": "0.0.33",
|
|
69
69
|
"boxen": "^7.1.1",
|
|
70
70
|
"p-limit": "^4.0.0",
|
|
71
|
-
"@pandacss/fixture": "0.0.0-dev-
|
|
71
|
+
"@pandacss/fixture": "0.0.0-dev-20231218191858"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"build": "tsup src/index.ts --format=cjs,esm --shims --dts",
|