@pandacss/node 0.0.0-dev-20231214172157 → 0.0.0-dev-20231217184959

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 CHANGED
@@ -198,6 +198,7 @@ declare class Builder {
198
198
  */
199
199
  context: PandaContext | undefined;
200
200
  private hasEmitted;
201
+ private hasFilesChanged;
201
202
  private affecteds;
202
203
  getConfigPath: () => string;
203
204
  setup: (options?: {
package/dist/index.d.ts CHANGED
@@ -198,6 +198,7 @@ declare class Builder {
198
198
  */
199
199
  context: PandaContext | undefined;
200
200
  private hasEmitted;
201
+ private hasFilesChanged;
201
202
  private affecteds;
202
203
  getConfigPath: () => string;
203
204
  setup: (options?: {
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();
@@ -2680,8 +2681,8 @@ var Builder = class {
2680
2681
  await ctx.hooks.callHook("config:change", ctx.config);
2681
2682
  return;
2682
2683
  }
2683
- const hasFilesChanged = this.checkFilesChanged(ctx.getFiles());
2684
- if (hasFilesChanged) {
2684
+ this.hasFilesChanged = this.checkFilesChanged(ctx.getFiles());
2685
+ if (this.hasFilesChanged) {
2685
2686
  ctx.project.reloadSourceFiles();
2686
2687
  }
2687
2688
  };
@@ -2726,11 +2727,11 @@ var Builder = class {
2726
2727
  return files.some((file) => !this.getFileMeta(file).isUnchanged);
2727
2728
  }
2728
2729
  extract = async () => {
2730
+ const hasConfigChanged = this.affecteds ? this.affecteds.hasConfigChanged : true;
2731
+ if (!this.hasFilesChanged && !hasConfigChanged)
2732
+ return;
2729
2733
  const ctx = this.getContextOrThrow();
2730
2734
  const files = ctx.getFiles();
2731
- const hasConfigChanged = this.affecteds ? this.affecteds.hasConfigChanged : false;
2732
- if (hasConfigChanged)
2733
- return;
2734
2735
  const done = import_logger6.logger.time.info("Extracted in");
2735
2736
  const promises = files.map((file) => limit2(() => this.extractFile(ctx, file)));
2736
2737
  await Promise.allSettled(promises);
@@ -2756,9 +2757,10 @@ var Builder = class {
2756
2757
  this.initialRoot = root.toString();
2757
2758
  }
2758
2759
  root.removeAll();
2760
+ const css2 = this.toString();
2759
2761
  const newCss = (0, import_core.optimizeCss)(`
2760
2762
  ${this.initialRoot}
2761
- ${this.toString()}
2763
+ ${css2}
2762
2764
  `);
2763
2765
  root.append(newCss);
2764
2766
  };
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();
@@ -2654,8 +2655,8 @@ var Builder = class {
2654
2655
  await ctx.hooks.callHook("config:change", ctx.config);
2655
2656
  return;
2656
2657
  }
2657
- const hasFilesChanged = this.checkFilesChanged(ctx.getFiles());
2658
- if (hasFilesChanged) {
2658
+ this.hasFilesChanged = this.checkFilesChanged(ctx.getFiles());
2659
+ if (this.hasFilesChanged) {
2659
2660
  ctx.project.reloadSourceFiles();
2660
2661
  }
2661
2662
  };
@@ -2700,11 +2701,11 @@ var Builder = class {
2700
2701
  return files.some((file) => !this.getFileMeta(file).isUnchanged);
2701
2702
  }
2702
2703
  extract = async () => {
2704
+ const hasConfigChanged = this.affecteds ? this.affecteds.hasConfigChanged : true;
2705
+ if (!this.hasFilesChanged && !hasConfigChanged)
2706
+ return;
2703
2707
  const ctx = this.getContextOrThrow();
2704
2708
  const files = ctx.getFiles();
2705
- const hasConfigChanged = this.affecteds ? this.affecteds.hasConfigChanged : false;
2706
- if (hasConfigChanged)
2707
- return;
2708
2709
  const done = logger6.time.info("Extracted in");
2709
2710
  const promises = files.map((file) => limit2(() => this.extractFile(ctx, file)));
2710
2711
  await Promise.allSettled(promises);
@@ -2730,9 +2731,10 @@ var Builder = class {
2730
2731
  this.initialRoot = root.toString();
2731
2732
  }
2732
2733
  root.removeAll();
2734
+ const css2 = this.toString();
2733
2735
  const newCss = optimizeCss(`
2734
2736
  ${this.initialRoot}
2735
- ${this.toString()}
2737
+ ${css2}
2736
2738
  `);
2737
2739
  root.append(newCss);
2738
2740
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "0.0.0-dev-20231214172157",
3
+ "version": "0.0.0-dev-20231217184959",
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-20231214172157",
52
- "@pandacss/error": "0.0.0-dev-20231214172157",
53
- "@pandacss/core": "0.0.0-dev-20231214172157",
54
- "@pandacss/extractor": "0.0.0-dev-20231214172157",
55
- "@pandacss/generator": "0.0.0-dev-20231214172157",
56
- "@pandacss/parser": "0.0.0-dev-20231214172157",
57
- "@pandacss/is-valid-prop": "0.0.0-dev-20231214172157",
58
- "@pandacss/shared": "0.0.0-dev-20231214172157",
59
- "@pandacss/logger": "0.0.0-dev-20231214172157",
60
- "@pandacss/token-dictionary": "0.0.0-dev-20231214172157",
61
- "@pandacss/types": "0.0.0-dev-20231214172157"
51
+ "@pandacss/config": "0.0.0-dev-20231217184959",
52
+ "@pandacss/extractor": "0.0.0-dev-20231217184959",
53
+ "@pandacss/core": "0.0.0-dev-20231217184959",
54
+ "@pandacss/error": "0.0.0-dev-20231217184959",
55
+ "@pandacss/generator": "0.0.0-dev-20231217184959",
56
+ "@pandacss/is-valid-prop": "0.0.0-dev-20231217184959",
57
+ "@pandacss/logger": "0.0.0-dev-20231217184959",
58
+ "@pandacss/parser": "0.0.0-dev-20231217184959",
59
+ "@pandacss/shared": "0.0.0-dev-20231217184959",
60
+ "@pandacss/types": "0.0.0-dev-20231217184959",
61
+ "@pandacss/token-dictionary": "0.0.0-dev-20231217184959"
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-20231214172157"
71
+ "@pandacss/fixture": "0.0.0-dev-20231217184959"
72
72
  },
73
73
  "scripts": {
74
74
  "build": "tsup src/index.ts --format=cjs,esm --shims --dts",