@pandacss/node 1.11.5 → 1.12.0

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.
Files changed (3) hide show
  1. package/dist/index.js +40 -32
  2. package/dist/index.mjs +25 -17
  3. package/package.json +13 -13
package/dist/index.js CHANGED
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // ../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.3_@swc+helpers@0.5.17__jiti@2.6.1_postcss@8.5.14_tsx@4.20.6_typescript@6.0.2_yaml@2.8.1/node_modules/tsup/assets/cjs_shims.js
36
+ // ../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.3_@swc+helpers@0.5.17__jiti@2.6.1_postcss@8.5.14_supports-col_417629c956fdcd14cb97372bbc8200e9/node_modules/tsup/assets/cjs_shims.js
37
37
  var init_cjs_shims = __esm({
38
- "../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.3_@swc+helpers@0.5.17__jiti@2.6.1_postcss@8.5.14_tsx@4.20.6_typescript@6.0.2_yaml@2.8.1/node_modules/tsup/assets/cjs_shims.js"() {
38
+ "../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.3_@swc+helpers@0.5.17__jiti@2.6.1_postcss@8.5.14_supports-col_417629c956fdcd14cb97372bbc8200e9/node_modules/tsup/assets/cjs_shims.js"() {
39
39
  "use strict";
40
40
  }
41
41
  });
@@ -374,7 +374,7 @@ async function buildInfo(ctx, outfile) {
374
374
 
375
375
  // src/builder.ts
376
376
  init_cjs_shims();
377
- var import_config4 = require("@pandacss/config");
377
+ var import_config5 = require("@pandacss/config");
378
378
  var import_logger5 = require("@pandacss/logger");
379
379
  var import_shared2 = require("@pandacss/shared");
380
380
  var import_fs = require("fs");
@@ -402,11 +402,31 @@ async function codegen(ctx, ids) {
402
402
 
403
403
  // src/config.ts
404
404
  init_cjs_shims();
405
- var import_config3 = require("@pandacss/config");
405
+ var import_config4 = require("@pandacss/config");
406
+
407
+ // src/auto-plugins.ts
408
+ init_cjs_shims();
409
+ var import_config = require("@pandacss/config");
406
410
  var import_plugin_lightningcss = require("@pandacss/plugin-lightningcss");
407
411
  var import_plugin_svelte = require("@pandacss/plugin-svelte");
408
412
  var import_plugin_vue = require("@pandacss/plugin-vue");
409
413
  var import_browserslist = __toESM(require("browserslist"));
414
+ var RESOLVED_HOOKS_NAME = "__resolved__";
415
+ function getAutoPlugins(config) {
416
+ const plugins = [(0, import_plugin_vue.pluginVue)(), (0, import_plugin_svelte.pluginSvelte)()];
417
+ if (config.lightningcss) {
418
+ plugins.push((0, import_plugin_lightningcss.pluginLightningcss)());
419
+ }
420
+ return plugins;
421
+ }
422
+ function applyAutoPlugins(conf, cwd) {
423
+ if (conf.config.lightningcss && !conf.config.browserslist) {
424
+ conf.config.browserslist ||= import_browserslist.default.findConfig(cwd)?.defaults;
425
+ }
426
+ const autoPlugins = getAutoPlugins(conf.config);
427
+ conf.hooks = (0, import_config.mergeHooks)([...autoPlugins, { name: RESOLVED_HOOKS_NAME, hooks: conf.hooks }]);
428
+ conf.config.plugins = [...autoPlugins, ...conf.config.plugins ?? []];
429
+ }
410
430
 
411
431
  // src/create-context.ts
412
432
  init_cjs_shims();
@@ -1758,7 +1778,7 @@ var createBox = (options) => boxen(options.content, {
1758
1778
 
1759
1779
  // src/diff-engine.ts
1760
1780
  init_cjs_shims();
1761
- var import_config = require("@pandacss/config");
1781
+ var import_config2 = require("@pandacss/config");
1762
1782
  var import_generator = require("@pandacss/generator");
1763
1783
  var DiffEngine = class {
1764
1784
  constructor(ctx) {
@@ -1770,9 +1790,10 @@ var DiffEngine = class {
1770
1790
  * Reload config from disk and refresh the context
1771
1791
  */
1772
1792
  async reloadConfigAndRefreshContext(fn) {
1773
- const conf = await (0, import_config.loadConfig)({ cwd: this.ctx.config.cwd, file: this.ctx.conf.path });
1793
+ const conf = await (0, import_config2.loadConfig)({ cwd: this.ctx.config.cwd, file: this.ctx.conf.path });
1774
1794
  const { tsconfig, tsconfigFile, tsOptions } = this.ctx.conf;
1775
1795
  Object.assign(conf, { tsconfig, tsconfigFile, tsOptions });
1796
+ applyAutoPlugins(conf, this.ctx.config.cwd);
1776
1797
  return this.refresh(conf, fn);
1777
1798
  }
1778
1799
  /**
@@ -1781,7 +1802,7 @@ var DiffEngine = class {
1781
1802
  * Returns the list of affected artifacts/engines
1782
1803
  */
1783
1804
  refresh(conf, fn) {
1784
- const affected = (0, import_config.diffConfigs)(() => conf.deserialize(), this.prevConfig);
1805
+ const affected = (0, import_config2.diffConfigs)(() => conf.deserialize(), this.prevConfig);
1785
1806
  if (!affected.hasConfigChanged || !this.prevConfig) return affected;
1786
1807
  fn?.(conf);
1787
1808
  this.prevConfig = conf.deserialize();
@@ -2101,13 +2122,13 @@ var PandaContext = class extends import_generator2.Generator {
2101
2122
 
2102
2123
  // src/load-tsconfig.ts
2103
2124
  init_cjs_shims();
2104
- var import_config2 = require("@pandacss/config");
2125
+ var import_config3 = require("@pandacss/config");
2105
2126
  var import_node_path = __toESM(require("path"));
2106
2127
  async function loadTsConfig(conf, cwd) {
2107
2128
  const root = cwd;
2108
- let tsconfigFile = await (0, import_config2.resolveDirectTsconfigJson)(conf.path);
2129
+ let tsconfigFile = await (0, import_config3.resolveDirectTsconfigJson)(conf.path);
2109
2130
  if (!tsconfigFile) {
2110
- tsconfigFile = await (0, import_config2.findClosestTsconfig)(conf.path, root, "tsconfig.json");
2131
+ tsconfigFile = await (0, import_config3.findClosestTsconfig)(conf.path, root, "tsconfig.json");
2111
2132
  }
2112
2133
  if (!tsconfigFile) {
2113
2134
  return {
@@ -2117,7 +2138,7 @@ async function loadTsConfig(conf, cwd) {
2117
2138
  }
2118
2139
  const gtc = await import("get-tsconfig");
2119
2140
  const rootParsed = gtc.parseTsconfig(tsconfigFile);
2120
- const { tsconfig, tsconfigFile: effectiveTsconfigPath } = await (0, import_config2.resolveSolutionTsconfigForFile)(
2141
+ const { tsconfig, tsconfigFile: effectiveTsconfigPath } = await (0, import_config3.resolveSolutionTsconfigForFile)(
2121
2142
  import_node_path.default.resolve(conf.path),
2122
2143
  tsconfigFile,
2123
2144
  rootParsed,
@@ -2132,9 +2153,9 @@ async function loadTsConfig(conf, cwd) {
2132
2153
  const baseUrl = compilerOptions.baseUrl;
2133
2154
  result.tsOptions = {
2134
2155
  baseUrl,
2135
- pathMappings: (0, import_config2.convertTsPathsToRegexes)(
2156
+ pathMappings: (0, import_config3.convertTsPathsToRegexes)(
2136
2157
  compilerOptions.paths,
2137
- (0, import_config2.resolveBaseUrlForCompilerOptions)(baseUrl, effectiveTsconfigPath, cwd)
2158
+ (0, import_config3.resolveBaseUrlForCompilerOptions)(baseUrl, effectiveTsconfigPath, cwd)
2138
2159
  )
2139
2160
  };
2140
2161
  }
@@ -2142,30 +2163,17 @@ async function loadTsConfig(conf, cwd) {
2142
2163
  }
2143
2164
 
2144
2165
  // src/config.ts
2145
- var RESOLVED_HOOKS_NAME = "__resolved__";
2146
- function getAutoPlugins(config) {
2147
- const plugins = [(0, import_plugin_vue.pluginVue)(), (0, import_plugin_svelte.pluginSvelte)()];
2148
- if (config.lightningcss) {
2149
- plugins.push((0, import_plugin_lightningcss.pluginLightningcss)());
2150
- }
2151
- return plugins;
2152
- }
2153
2166
  async function loadConfigAndCreateContext(options = {}) {
2154
2167
  const { config, configPath } = options;
2155
2168
  const cwd = options.cwd ?? options?.config?.cwd ?? process.cwd();
2156
- const conf = await (0, import_config3.loadConfig)({ cwd, file: configPath });
2169
+ const conf = await (0, import_config4.loadConfig)({ cwd, file: configPath });
2157
2170
  if (config) {
2158
2171
  Object.assign(conf.config, config);
2159
2172
  }
2160
2173
  if (options.cwd) {
2161
2174
  conf.config.cwd = options.cwd;
2162
2175
  }
2163
- if (conf.config.lightningcss && !conf.config.browserslist) {
2164
- conf.config.browserslist ||= import_browserslist.default.findConfig(cwd)?.defaults;
2165
- }
2166
- const autoPlugins = getAutoPlugins(conf.config);
2167
- conf.hooks = (0, import_config3.mergeHooks)([...autoPlugins, { name: RESOLVED_HOOKS_NAME, hooks: conf.hooks }]);
2168
- conf.config.plugins = [...autoPlugins, ...conf.config.plugins ?? []];
2176
+ applyAutoPlugins(conf, cwd);
2169
2177
  const tsConfResult = await loadTsConfig(conf, cwd);
2170
2178
  if (tsConfResult) {
2171
2179
  Object.assign(conf, tsConfResult);
@@ -2232,7 +2240,7 @@ var Builder = class {
2232
2240
  setConfigDependencies(options) {
2233
2241
  const tsOptions = this.context?.conf.tsOptions ?? { baseUrl: void 0, pathMappings: [] };
2234
2242
  const compilerOptions = this.context?.conf.tsconfig?.compilerOptions ?? {};
2235
- const { deps: foundDeps } = (0, import_config4.getConfigDependencies)(options.configPath, tsOptions, compilerOptions);
2243
+ const { deps: foundDeps } = (0, import_config5.getConfigDependencies)(options.configPath, tsOptions, compilerOptions);
2236
2244
  const cwd = options?.cwd ?? this.context?.config.cwd ?? process.cwd();
2237
2245
  const configDeps = /* @__PURE__ */ new Set([
2238
2246
  ...foundDeps,
@@ -2246,7 +2254,7 @@ var Builder = class {
2246
2254
  }
2247
2255
  setup = async (options = {}) => {
2248
2256
  import_logger5.logger.debug("builder", "\u{1F6A7} Setup");
2249
- const configPath = options.configPath ?? (0, import_config4.findConfig)({ cwd: options.cwd });
2257
+ const configPath = options.configPath ?? (0, import_config5.findConfig)({ cwd: options.cwd });
2250
2258
  this.setConfigDependencies({ configPath, cwd: options.cwd });
2251
2259
  if (!this.context) {
2252
2260
  return this.setupContext({ configPath, cwd: options.cwd });
@@ -2656,7 +2664,7 @@ var ensure = (outPath) => {
2656
2664
 
2657
2665
  // src/setup-config.ts
2658
2666
  init_cjs_shims();
2659
- var import_config7 = require("@pandacss/config");
2667
+ var import_config8 = require("@pandacss/config");
2660
2668
  var import_core = require("@pandacss/core");
2661
2669
  var import_logger11 = require("@pandacss/logger");
2662
2670
  var import_shared3 = require("@pandacss/shared");
@@ -2669,7 +2677,7 @@ async function setupConfig(cwd, opts = {}) {
2669
2677
  const { force, outExtension, jsxFramework, syntax, outdir = "styled-system" } = opts;
2670
2678
  let configFile;
2671
2679
  try {
2672
- configFile = (0, import_config7.findConfig)({ cwd });
2680
+ configFile = (0, import_config8.findConfig)({ cwd });
2673
2681
  } catch (err) {
2674
2682
  if (!(err instanceof import_shared3.PandaError)) {
2675
2683
  throw err;
package/dist/index.mjs CHANGED
@@ -27,11 +27,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  mod
28
28
  ));
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.3_@swc+helpers@0.5.17__jiti@2.6.1_postcss@8.5.14_tsx@4.20.6_typescript@6.0.2_yaml@2.8.1/node_modules/tsup/assets/esm_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.3_@swc+helpers@0.5.17__jiti@2.6.1_postcss@8.5.14_supports-col_417629c956fdcd14cb97372bbc8200e9/node_modules/tsup/assets/esm_shims.js
31
31
  import path from "path";
32
32
  import { fileURLToPath } from "url";
33
33
  var init_esm_shims = __esm({
34
- "../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.3_@swc+helpers@0.5.17__jiti@2.6.1_postcss@8.5.14_tsx@4.20.6_typescript@6.0.2_yaml@2.8.1/node_modules/tsup/assets/esm_shims.js"() {
34
+ "../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.3_@swc+helpers@0.5.17__jiti@2.6.1_postcss@8.5.14_supports-col_417629c956fdcd14cb97372bbc8200e9/node_modules/tsup/assets/esm_shims.js"() {
35
35
  "use strict";
36
36
  }
37
37
  });
@@ -378,11 +378,31 @@ async function codegen(ctx, ids) {
378
378
 
379
379
  // src/config.ts
380
380
  init_esm_shims();
381
- import { loadConfig as loadConfig2, mergeHooks } from "@pandacss/config";
381
+ import { loadConfig as loadConfig2 } from "@pandacss/config";
382
+
383
+ // src/auto-plugins.ts
384
+ init_esm_shims();
385
+ import { mergeHooks } from "@pandacss/config";
382
386
  import { pluginLightningcss } from "@pandacss/plugin-lightningcss";
383
387
  import { pluginSvelte } from "@pandacss/plugin-svelte";
384
388
  import { pluginVue } from "@pandacss/plugin-vue";
385
389
  import browserslist from "browserslist";
390
+ var RESOLVED_HOOKS_NAME = "__resolved__";
391
+ function getAutoPlugins(config) {
392
+ const plugins = [pluginVue(), pluginSvelte()];
393
+ if (config.lightningcss) {
394
+ plugins.push(pluginLightningcss());
395
+ }
396
+ return plugins;
397
+ }
398
+ function applyAutoPlugins(conf, cwd) {
399
+ if (conf.config.lightningcss && !conf.config.browserslist) {
400
+ conf.config.browserslist ||= browserslist.findConfig(cwd)?.defaults;
401
+ }
402
+ const autoPlugins = getAutoPlugins(conf.config);
403
+ conf.hooks = mergeHooks([...autoPlugins, { name: RESOLVED_HOOKS_NAME, hooks: conf.hooks }]);
404
+ conf.config.plugins = [...autoPlugins, ...conf.config.plugins ?? []];
405
+ }
386
406
 
387
407
  // src/create-context.ts
388
408
  init_esm_shims();
@@ -1749,6 +1769,7 @@ var DiffEngine = class {
1749
1769
  const conf = await loadConfig({ cwd: this.ctx.config.cwd, file: this.ctx.conf.path });
1750
1770
  const { tsconfig, tsconfigFile, tsOptions } = this.ctx.conf;
1751
1771
  Object.assign(conf, { tsconfig, tsconfigFile, tsOptions });
1772
+ applyAutoPlugins(conf, this.ctx.config.cwd);
1752
1773
  return this.refresh(conf, fn);
1753
1774
  }
1754
1775
  /**
@@ -2124,14 +2145,6 @@ async function loadTsConfig(conf, cwd) {
2124
2145
  }
2125
2146
 
2126
2147
  // src/config.ts
2127
- var RESOLVED_HOOKS_NAME = "__resolved__";
2128
- function getAutoPlugins(config) {
2129
- const plugins = [pluginVue(), pluginSvelte()];
2130
- if (config.lightningcss) {
2131
- plugins.push(pluginLightningcss());
2132
- }
2133
- return plugins;
2134
- }
2135
2148
  async function loadConfigAndCreateContext(options = {}) {
2136
2149
  const { config, configPath } = options;
2137
2150
  const cwd = options.cwd ?? options?.config?.cwd ?? process.cwd();
@@ -2142,12 +2155,7 @@ async function loadConfigAndCreateContext(options = {}) {
2142
2155
  if (options.cwd) {
2143
2156
  conf.config.cwd = options.cwd;
2144
2157
  }
2145
- if (conf.config.lightningcss && !conf.config.browserslist) {
2146
- conf.config.browserslist ||= browserslist.findConfig(cwd)?.defaults;
2147
- }
2148
- const autoPlugins = getAutoPlugins(conf.config);
2149
- conf.hooks = mergeHooks([...autoPlugins, { name: RESOLVED_HOOKS_NAME, hooks: conf.hooks }]);
2150
- conf.config.plugins = [...autoPlugins, ...conf.config.plugins ?? []];
2158
+ applyAutoPlugins(conf, cwd);
2151
2159
  const tsConfResult = await loadTsConfig(conf, cwd);
2152
2160
  if (tsConfResult) {
2153
2161
  Object.assign(conf, tsConfResult);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "1.11.5",
3
+ "version": "1.12.0",
4
4
  "description": "The core css panda library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -53,18 +53,18 @@
53
53
  "ts-morph": "28.0.0",
54
54
  "ts-pattern": "5.9.0",
55
55
  "get-tsconfig": "^4.13.0",
56
- "@pandacss/config": "1.11.5",
57
- "@pandacss/core": "1.11.5",
58
- "@pandacss/generator": "1.11.5",
59
- "@pandacss/plugin-lightningcss": "1.11.5",
60
- "@pandacss/plugin-svelte": "1.11.5",
61
- "@pandacss/plugin-vue": "1.11.5",
62
- "@pandacss/reporter": "1.11.5",
63
- "@pandacss/logger": "1.11.5",
64
- "@pandacss/parser": "1.11.5",
65
- "@pandacss/shared": "1.11.5",
66
- "@pandacss/token-dictionary": "1.11.5",
67
- "@pandacss/types": "1.11.5"
56
+ "@pandacss/config": "1.12.0",
57
+ "@pandacss/core": "1.12.0",
58
+ "@pandacss/generator": "1.12.0",
59
+ "@pandacss/plugin-lightningcss": "1.12.0",
60
+ "@pandacss/plugin-svelte": "1.12.0",
61
+ "@pandacss/plugin-vue": "1.12.0",
62
+ "@pandacss/reporter": "1.12.0",
63
+ "@pandacss/logger": "1.12.0",
64
+ "@pandacss/parser": "1.12.0",
65
+ "@pandacss/shared": "1.12.0",
66
+ "@pandacss/token-dictionary": "1.12.0",
67
+ "@pandacss/types": "1.12.0"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@types/picomatch": "4.0.2",