@pandacss/config 1.4.1 → 1.4.3

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.
@@ -85,7 +85,9 @@ var artifactConfigDeps = {
85
85
  "types-entry": [],
86
86
  "types-gen": [],
87
87
  "types-gen-system": [],
88
- themes: ["themes"].concat(tokens)
88
+ themes: ["themes"].concat(tokens),
89
+ // staticCss depends on tokens (for wildcards) and recipes (for recipe rules)
90
+ "static-css": ["staticCss", "patterns", "theme.recipes", "theme.slotRecipes"].concat(tokens)
89
91
  };
90
92
  var artifactMatchers = Object.entries(artifactConfigDeps).map(([key, paths]) => {
91
93
  if (!paths.length) return () => void 0;
@@ -94,6 +96,15 @@ var artifactMatchers = Object.entries(artifactConfigDeps).map(([key, paths]) =>
94
96
 
95
97
  // src/diff-config.ts
96
98
  var runIfFn = (fn) => typeof fn === "function" ? fn() : fn;
99
+ var hasRecipeStateTransition = (prevConfig, nextConfig) => {
100
+ const prevRecipes = prevConfig.theme?.recipes ?? {};
101
+ const prevSlotRecipes = prevConfig.theme?.slotRecipes ?? {};
102
+ const prevHasRecipes = Object.keys(prevRecipes).length > 0 || Object.keys(prevSlotRecipes).length > 0;
103
+ const nextRecipes = nextConfig.theme?.recipes ?? {};
104
+ const nextSlotRecipes = nextConfig.theme?.slotRecipes ?? {};
105
+ const nextHasRecipes = Object.keys(nextRecipes).length > 0 || Object.keys(nextSlotRecipes).length > 0;
106
+ return prevHasRecipes !== nextHasRecipes;
107
+ };
97
108
  function diffConfigs(config, prevConfig) {
98
109
  const affected = {
99
110
  artifacts: /* @__PURE__ */ new Set(),
@@ -126,6 +137,12 @@ function diffConfigs(config, prevConfig) {
126
137
  affected.artifacts.add(id);
127
138
  });
128
139
  });
140
+ if (affected.artifacts.has("recipes") || affected.artifacts.has("recipes-index")) {
141
+ const nextConfig = runIfFn(config);
142
+ if (hasRecipeStateTransition(prevConfig, nextConfig)) {
143
+ affected.artifacts.add("create-recipe");
144
+ }
145
+ }
129
146
  return affected;
130
147
  }
131
148
 
@@ -119,7 +119,9 @@ var artifactConfigDeps = {
119
119
  "types-entry": [],
120
120
  "types-gen": [],
121
121
  "types-gen-system": [],
122
- themes: ["themes"].concat(tokens)
122
+ themes: ["themes"].concat(tokens),
123
+ // staticCss depends on tokens (for wildcards) and recipes (for recipe rules)
124
+ "static-css": ["staticCss", "patterns", "theme.recipes", "theme.slotRecipes"].concat(tokens)
123
125
  };
124
126
  var artifactMatchers = Object.entries(artifactConfigDeps).map(([key, paths]) => {
125
127
  if (!paths.length) return () => void 0;
@@ -128,6 +130,15 @@ var artifactMatchers = Object.entries(artifactConfigDeps).map(([key, paths]) =>
128
130
 
129
131
  // src/diff-config.ts
130
132
  var runIfFn = (fn) => typeof fn === "function" ? fn() : fn;
133
+ var hasRecipeStateTransition = (prevConfig, nextConfig) => {
134
+ const prevRecipes = prevConfig.theme?.recipes ?? {};
135
+ const prevSlotRecipes = prevConfig.theme?.slotRecipes ?? {};
136
+ const prevHasRecipes = Object.keys(prevRecipes).length > 0 || Object.keys(prevSlotRecipes).length > 0;
137
+ const nextRecipes = nextConfig.theme?.recipes ?? {};
138
+ const nextSlotRecipes = nextConfig.theme?.slotRecipes ?? {};
139
+ const nextHasRecipes = Object.keys(nextRecipes).length > 0 || Object.keys(nextSlotRecipes).length > 0;
140
+ return prevHasRecipes !== nextHasRecipes;
141
+ };
131
142
  function diffConfigs(config, prevConfig) {
132
143
  const affected = {
133
144
  artifacts: /* @__PURE__ */ new Set(),
@@ -160,6 +171,12 @@ function diffConfigs(config, prevConfig) {
160
171
  affected.artifacts.add(id);
161
172
  });
162
173
  });
174
+ if (affected.artifacts.has("recipes") || affected.artifacts.has("recipes-index")) {
175
+ const nextConfig = runIfFn(config);
176
+ if (hasRecipeStateTransition(prevConfig, nextConfig)) {
177
+ affected.artifacts.add("create-recipe");
178
+ }
179
+ }
163
180
  return affected;
164
181
  }
165
182
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  diffConfigs
3
- } from "./chunk-U3UHISDU.mjs";
3
+ } from "./chunk-62NHWTD3.mjs";
4
4
  export {
5
5
  diffConfigs
6
6
  };
package/dist/index.js CHANGED
@@ -196,7 +196,9 @@ var artifactConfigDeps = {
196
196
  "types-entry": [],
197
197
  "types-gen": [],
198
198
  "types-gen-system": [],
199
- themes: ["themes"].concat(tokens)
199
+ themes: ["themes"].concat(tokens),
200
+ // staticCss depends on tokens (for wildcards) and recipes (for recipe rules)
201
+ "static-css": ["staticCss", "patterns", "theme.recipes", "theme.slotRecipes"].concat(tokens)
200
202
  };
201
203
  var artifactMatchers = Object.entries(artifactConfigDeps).map(([key, paths]) => {
202
204
  if (!paths.length) return () => void 0;
@@ -205,6 +207,15 @@ var artifactMatchers = Object.entries(artifactConfigDeps).map(([key, paths]) =>
205
207
 
206
208
  // src/diff-config.ts
207
209
  var runIfFn = (fn) => typeof fn === "function" ? fn() : fn;
210
+ var hasRecipeStateTransition = (prevConfig, nextConfig) => {
211
+ const prevRecipes = prevConfig.theme?.recipes ?? {};
212
+ const prevSlotRecipes = prevConfig.theme?.slotRecipes ?? {};
213
+ const prevHasRecipes = Object.keys(prevRecipes).length > 0 || Object.keys(prevSlotRecipes).length > 0;
214
+ const nextRecipes = nextConfig.theme?.recipes ?? {};
215
+ const nextSlotRecipes = nextConfig.theme?.slotRecipes ?? {};
216
+ const nextHasRecipes = Object.keys(nextRecipes).length > 0 || Object.keys(nextSlotRecipes).length > 0;
217
+ return prevHasRecipes !== nextHasRecipes;
218
+ };
208
219
  function diffConfigs(config, prevConfig) {
209
220
  const affected = {
210
221
  artifacts: /* @__PURE__ */ new Set(),
@@ -237,6 +248,12 @@ function diffConfigs(config, prevConfig) {
237
248
  affected.artifacts.add(id);
238
249
  });
239
250
  });
251
+ if (affected.artifacts.has("recipes") || affected.artifacts.has("recipes-index")) {
252
+ const nextConfig = runIfFn(config);
253
+ if (hasRecipeStateTransition(prevConfig, nextConfig)) {
254
+ affected.artifacts.add("create-recipe");
255
+ }
256
+ }
240
257
  return affected;
241
258
  }
242
259
 
@@ -356,7 +373,7 @@ function getDeps(opts, fromAlias) {
356
373
  const filename2 = resolveTsPathPattern(opts.pathMappings, mod);
357
374
  if (!filename2) return;
358
375
  getDeps(Object.assign({}, nextOpts, { filename: filename2 }), mod);
359
- } catch (err) {
376
+ } catch {
360
377
  }
361
378
  });
362
379
  }
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  diffConfigs
3
- } from "./chunk-U3UHISDU.mjs";
3
+ } from "./chunk-62NHWTD3.mjs";
4
4
  import {
5
5
  SEP,
6
6
  formatPath,
@@ -179,7 +179,7 @@ function getDeps(opts, fromAlias) {
179
179
  const filename2 = resolveTsPathPattern(opts.pathMappings, mod);
180
180
  if (!filename2) return;
181
181
  getDeps(Object.assign({}, nextOpts, { filename: filename2 }), mod);
182
- } catch (err) {
182
+ } catch {
183
183
  }
184
184
  });
185
185
  }
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@pandacss/config",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "Find and load panda config",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
8
  "author": "Segun Adebayo <joseshegs@gmail.com>",
9
+ "license": "MIT",
9
10
  "sideEffects": false,
10
11
  "homepage": "https://panda-css.com",
11
12
  "repository": {
@@ -71,16 +72,16 @@
71
72
  "bundle-n-require": "1.1.2",
72
73
  "escalade": "3.1.2",
73
74
  "merge-anything": "5.1.7",
74
- "microdiff": "1.3.2",
75
+ "microdiff": "1.5.0",
75
76
  "typescript": "5.8.3",
76
- "@pandacss/logger": "1.4.1",
77
- "@pandacss/preset-base": "1.4.1",
78
- "@pandacss/preset-panda": "1.4.1",
79
- "@pandacss/shared": "1.4.1",
80
- "@pandacss/types": "1.4.1"
77
+ "@pandacss/logger": "1.4.3",
78
+ "@pandacss/preset-base": "1.4.3",
79
+ "@pandacss/preset-panda": "1.4.3",
80
+ "@pandacss/shared": "1.4.3",
81
+ "@pandacss/types": "1.4.3"
81
82
  },
82
83
  "devDependencies": {
83
- "pkg-types": "2.2.0"
84
+ "pkg-types": "2.3.0"
84
85
  },
85
86
  "scripts": {
86
87
  "build": "tsup --tsconfig tsconfig.build.json --dts",