@pandacss/node 0.31.0 → 0.32.1

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
@@ -69,31 +69,11 @@ declare function analyzeTokens(ctx: PandaContext, options?: Options): {
69
69
  };
70
70
  fileSizes: {
71
71
  lineCount: number;
72
- normal: string | number | any[] | {
73
- value: any;
74
- symbol: any;
75
- exponent: number;
76
- unit: string;
77
- };
78
- minified: string | number | any[] | {
79
- value: any;
80
- symbol: any;
81
- exponent: number;
82
- unit: string;
83
- };
72
+ normal: string;
73
+ minified: string;
84
74
  gzip: {
85
- normal: string | number | any[] | {
86
- value: any;
87
- symbol: any;
88
- exponent: number;
89
- unit: string;
90
- };
91
- minified: string | number | any[] | {
92
- value: any;
93
- symbol: any;
94
- exponent: number;
95
- unit: string;
96
- };
75
+ normal: string;
76
+ minified: string;
97
77
  };
98
78
  };
99
79
  } & {
package/dist/index.d.ts CHANGED
@@ -69,31 +69,11 @@ declare function analyzeTokens(ctx: PandaContext, options?: Options): {
69
69
  };
70
70
  fileSizes: {
71
71
  lineCount: number;
72
- normal: string | number | any[] | {
73
- value: any;
74
- symbol: any;
75
- exponent: number;
76
- unit: string;
77
- };
78
- minified: string | number | any[] | {
79
- value: any;
80
- symbol: any;
81
- exponent: number;
82
- unit: string;
83
- };
72
+ normal: string;
73
+ minified: string;
84
74
  gzip: {
85
- normal: string | number | any[] | {
86
- value: any;
87
- symbol: any;
88
- exponent: number;
89
- unit: string;
90
- };
91
- minified: string | number | any[] | {
92
- value: any;
93
- symbol: any;
94
- exponent: number;
95
- unit: string;
96
- };
75
+ normal: string;
76
+ minified: string;
97
77
  };
98
78
  };
99
79
  } & {
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.0.1_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js
36
+ // ../../node_modules/.pnpm/tsup@8.0.2_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js
37
37
  var init_cjs_shims = __esm({
38
- "../../node_modules/.pnpm/tsup@8.0.1_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js"() {
38
+ "../../node_modules/.pnpm/tsup@8.0.2_typescript@5.3.3/node_modules/tsup/assets/cjs_shims.js"() {
39
39
  "use strict";
40
40
  }
41
41
  });
@@ -798,7 +798,7 @@ var import_path3 = require("path");
798
798
  // src/codegen.ts
799
799
  init_cjs_shims();
800
800
 
801
- // ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
801
+ // ../../node_modules/.pnpm/p-limit@5.0.0/node_modules/p-limit/index.js
802
802
  init_cjs_shims();
803
803
 
804
804
  // ../../node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
@@ -854,7 +854,8 @@ var Queue = class {
854
854
  }
855
855
  };
856
856
 
857
- // ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
857
+ // ../../node_modules/.pnpm/p-limit@5.0.0/node_modules/p-limit/index.js
858
+ var import_async_hooks = require("async_hooks");
858
859
  function pLimit(concurrency) {
859
860
  if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
860
861
  throw new TypeError("Expected `concurrency` to be a number from 1 and up");
@@ -867,9 +868,9 @@ function pLimit(concurrency) {
867
868
  queue.dequeue()();
868
869
  }
869
870
  };
870
- const run = async (fn, resolve4, args) => {
871
+ const run = async (function_, resolve4, arguments_) => {
871
872
  activeCount++;
872
- const result = (async () => fn(...args))();
873
+ const result = (async () => function_(...arguments_))();
873
874
  resolve4(result);
874
875
  try {
875
876
  await result;
@@ -877,8 +878,10 @@ function pLimit(concurrency) {
877
878
  }
878
879
  next();
879
880
  };
880
- const enqueue = (fn, resolve4, args) => {
881
- queue.enqueue(run.bind(void 0, fn, resolve4, args));
881
+ const enqueue = (function_, resolve4, arguments_) => {
882
+ queue.enqueue(
883
+ import_async_hooks.AsyncResource.bind(run.bind(void 0, function_, resolve4, arguments_))
884
+ );
882
885
  (async () => {
883
886
  await Promise.resolve();
884
887
  if (activeCount < concurrency && queue.size > 0) {
@@ -886,8 +889,8 @@ function pLimit(concurrency) {
886
889
  }
887
890
  })();
888
891
  };
889
- const generator = (fn, ...args) => new Promise((resolve4) => {
890
- enqueue(fn, resolve4, args);
892
+ const generator = (function_, ...arguments_) => new Promise((resolve4) => {
893
+ enqueue(function_, resolve4, arguments_);
891
894
  });
892
895
  Object.defineProperties(generator, {
893
896
  activeCount: {
@@ -897,7 +900,7 @@ function pLimit(concurrency) {
897
900
  get: () => queue.size
898
901
  },
899
902
  clearQueue: {
900
- value: () => {
903
+ value() {
901
904
  queue.clear();
902
905
  }
903
906
  }
@@ -979,10 +982,10 @@ function stringWidth(string, options = {}) {
979
982
  return width;
980
983
  }
981
984
 
982
- // ../../node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/index.js
985
+ // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
983
986
  init_cjs_shims();
984
987
 
985
- // ../../node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/vendor/ansi-styles/index.js
988
+ // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
986
989
  init_cjs_shims();
987
990
  var ANSI_BACKGROUND_OFFSET = 10;
988
991
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
@@ -1169,7 +1172,7 @@ function assembleStyles() {
1169
1172
  var ansiStyles = assembleStyles();
1170
1173
  var ansi_styles_default = ansiStyles;
1171
1174
 
1172
- // ../../node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/vendor/supports-color/index.js
1175
+ // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
1173
1176
  init_cjs_shims();
1174
1177
  var import_node_process = __toESM(require("process"), 1);
1175
1178
  var import_node_os = __toESM(require("os"), 1);
@@ -1244,7 +1247,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
1244
1247
  return 1;
1245
1248
  }
1246
1249
  if ("CI" in env) {
1247
- if ("GITHUB_ACTIONS" in env) {
1250
+ if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) {
1248
1251
  return 3;
1249
1252
  }
1250
1253
  if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
@@ -1296,7 +1299,7 @@ var supportsColor = {
1296
1299
  };
1297
1300
  var supports_color_default = supportsColor;
1298
1301
 
1299
- // ../../node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/utilities.js
1302
+ // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
1300
1303
  init_cjs_shims();
1301
1304
  function stringReplaceAll(string, substring, replacer) {
1302
1305
  let index = string.indexOf(substring);
@@ -1327,7 +1330,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
1327
1330
  return returnValue;
1328
1331
  }
1329
1332
 
1330
- // ../../node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/index.js
1333
+ // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
1331
1334
  var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
1332
1335
  var GENERATOR = Symbol("GENERATOR");
1333
1336
  var STYLER = Symbol("STYLER");
@@ -2224,8 +2227,12 @@ var limit = pLimit(20);
2224
2227
  async function codegen(ctx, ids) {
2225
2228
  if (ctx.config.clean)
2226
2229
  ctx.output.empty();
2227
- const artifacts = ctx.getArtifacts(ids);
2228
- await ctx.hooks["codegen:prepare"]?.({ changed: ids, artifacts });
2230
+ let artifacts = ctx.getArtifacts(ids);
2231
+ if (ctx.hooks["codegen:prepare"]) {
2232
+ const results = await ctx.hooks["codegen:prepare"]?.({ changed: ids, artifacts });
2233
+ if (results)
2234
+ artifacts = results;
2235
+ }
2229
2236
  const promises = artifacts.map((artifact) => limit(() => ctx.output.write(artifact)));
2230
2237
  await Promise.allSettled(promises);
2231
2238
  await ctx.hooks["codegen:done"]?.({ changed: ids });
@@ -2521,9 +2528,9 @@ var PandaContext = class extends import_generator2.Generator {
2521
2528
  // src/load-tsconfig.ts
2522
2529
  init_cjs_shims();
2523
2530
  var import_config2 = require("@pandacss/config");
2524
- var import_tsconfck = require("tsconfck");
2525
2531
  async function loadTsConfig(conf, cwd) {
2526
- const tsconfigResult = await (0, import_tsconfck.parse)(conf.path, {
2532
+ const { parse: parse2 } = await import("tsconfck");
2533
+ const tsconfigResult = await parse2(conf.path, {
2527
2534
  root: cwd,
2528
2535
  //@ts-ignore
2529
2536
  resolveWithEmptyIfConfigNotFound: true
package/dist/index.mjs CHANGED
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  mod
28
28
  ));
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.0.1_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.0.2_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js
31
31
  var init_esm_shims = __esm({
32
- "../../node_modules/.pnpm/tsup@8.0.1_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js"() {
32
+ "../../node_modules/.pnpm/tsup@8.0.2_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js"() {
33
33
  "use strict";
34
34
  }
35
35
  });
@@ -772,7 +772,7 @@ import { normalize as normalize2, resolve as resolve3 } from "path";
772
772
  // src/codegen.ts
773
773
  init_esm_shims();
774
774
 
775
- // ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
775
+ // ../../node_modules/.pnpm/p-limit@5.0.0/node_modules/p-limit/index.js
776
776
  init_esm_shims();
777
777
 
778
778
  // ../../node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
@@ -828,7 +828,8 @@ var Queue = class {
828
828
  }
829
829
  };
830
830
 
831
- // ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
831
+ // ../../node_modules/.pnpm/p-limit@5.0.0/node_modules/p-limit/index.js
832
+ import { AsyncResource } from "async_hooks";
832
833
  function pLimit(concurrency) {
833
834
  if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
834
835
  throw new TypeError("Expected `concurrency` to be a number from 1 and up");
@@ -841,9 +842,9 @@ function pLimit(concurrency) {
841
842
  queue.dequeue()();
842
843
  }
843
844
  };
844
- const run = async (fn, resolve4, args) => {
845
+ const run = async (function_, resolve4, arguments_) => {
845
846
  activeCount++;
846
- const result = (async () => fn(...args))();
847
+ const result = (async () => function_(...arguments_))();
847
848
  resolve4(result);
848
849
  try {
849
850
  await result;
@@ -851,8 +852,10 @@ function pLimit(concurrency) {
851
852
  }
852
853
  next();
853
854
  };
854
- const enqueue = (fn, resolve4, args) => {
855
- queue.enqueue(run.bind(void 0, fn, resolve4, args));
855
+ const enqueue = (function_, resolve4, arguments_) => {
856
+ queue.enqueue(
857
+ AsyncResource.bind(run.bind(void 0, function_, resolve4, arguments_))
858
+ );
856
859
  (async () => {
857
860
  await Promise.resolve();
858
861
  if (activeCount < concurrency && queue.size > 0) {
@@ -860,8 +863,8 @@ function pLimit(concurrency) {
860
863
  }
861
864
  })();
862
865
  };
863
- const generator = (fn, ...args) => new Promise((resolve4) => {
864
- enqueue(fn, resolve4, args);
866
+ const generator = (function_, ...arguments_) => new Promise((resolve4) => {
867
+ enqueue(function_, resolve4, arguments_);
865
868
  });
866
869
  Object.defineProperties(generator, {
867
870
  activeCount: {
@@ -871,7 +874,7 @@ function pLimit(concurrency) {
871
874
  get: () => queue.size
872
875
  },
873
876
  clearQueue: {
874
- value: () => {
877
+ value() {
875
878
  queue.clear();
876
879
  }
877
880
  }
@@ -953,10 +956,10 @@ function stringWidth(string, options = {}) {
953
956
  return width;
954
957
  }
955
958
 
956
- // ../../node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/index.js
959
+ // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
957
960
  init_esm_shims();
958
961
 
959
- // ../../node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/vendor/ansi-styles/index.js
962
+ // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/ansi-styles/index.js
960
963
  init_esm_shims();
961
964
  var ANSI_BACKGROUND_OFFSET = 10;
962
965
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
@@ -1143,7 +1146,7 @@ function assembleStyles() {
1143
1146
  var ansiStyles = assembleStyles();
1144
1147
  var ansi_styles_default = ansiStyles;
1145
1148
 
1146
- // ../../node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/vendor/supports-color/index.js
1149
+ // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
1147
1150
  init_esm_shims();
1148
1151
  import process2 from "node:process";
1149
1152
  import os from "node:os";
@@ -1218,7 +1221,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
1218
1221
  return 1;
1219
1222
  }
1220
1223
  if ("CI" in env) {
1221
- if ("GITHUB_ACTIONS" in env) {
1224
+ if ("GITHUB_ACTIONS" in env || "GITEA_ACTIONS" in env) {
1222
1225
  return 3;
1223
1226
  }
1224
1227
  if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
@@ -1270,7 +1273,7 @@ var supportsColor = {
1270
1273
  };
1271
1274
  var supports_color_default = supportsColor;
1272
1275
 
1273
- // ../../node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/utilities.js
1276
+ // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/utilities.js
1274
1277
  init_esm_shims();
1275
1278
  function stringReplaceAll(string, substring, replacer) {
1276
1279
  let index = string.indexOf(substring);
@@ -1301,7 +1304,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
1301
1304
  return returnValue;
1302
1305
  }
1303
1306
 
1304
- // ../../node_modules/.pnpm/chalk@5.2.0/node_modules/chalk/source/index.js
1307
+ // ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/index.js
1305
1308
  var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
1306
1309
  var GENERATOR = Symbol("GENERATOR");
1307
1310
  var STYLER = Symbol("STYLER");
@@ -2198,8 +2201,12 @@ var limit = pLimit(20);
2198
2201
  async function codegen(ctx, ids) {
2199
2202
  if (ctx.config.clean)
2200
2203
  ctx.output.empty();
2201
- const artifacts = ctx.getArtifacts(ids);
2202
- await ctx.hooks["codegen:prepare"]?.({ changed: ids, artifacts });
2204
+ let artifacts = ctx.getArtifacts(ids);
2205
+ if (ctx.hooks["codegen:prepare"]) {
2206
+ const results = await ctx.hooks["codegen:prepare"]?.({ changed: ids, artifacts });
2207
+ if (results)
2208
+ artifacts = results;
2209
+ }
2203
2210
  const promises = artifacts.map((artifact) => limit(() => ctx.output.write(artifact)));
2204
2211
  await Promise.allSettled(promises);
2205
2212
  await ctx.hooks["codegen:done"]?.({ changed: ids });
@@ -2495,9 +2502,9 @@ var PandaContext = class extends Generator2 {
2495
2502
  // src/load-tsconfig.ts
2496
2503
  init_esm_shims();
2497
2504
  import { convertTsPathsToRegexes } from "@pandacss/config";
2498
- import { parse } from "tsconfck";
2499
2505
  async function loadTsConfig(conf, cwd) {
2500
- const tsconfigResult = await parse(conf.path, {
2506
+ const { parse: parse2 } = await import("tsconfck");
2507
+ const tsconfigResult = await parse2(conf.path, {
2501
2508
  root: cwd,
2502
2509
  //@ts-ignore
2503
2510
  resolveWithEmptyIfConfigNotFound: true
@@ -2812,7 +2819,7 @@ var cssgen = async (ctx, options) => {
2812
2819
  // src/debug.ts
2813
2820
  init_esm_shims();
2814
2821
  import { colors as colors2, logger as logger9 } from "@pandacss/logger";
2815
- import { parse as parse2 } from "path";
2822
+ import { parse } from "path";
2816
2823
  async function debug(ctx, options) {
2817
2824
  const files = ctx.getFiles();
2818
2825
  const measureTotal = logger9.time.debug(`Done parsing ${files.length} files`);
@@ -2847,7 +2854,7 @@ async function debug(ctx, options) {
2847
2854
  }
2848
2855
  if (outdir) {
2849
2856
  filesWithCss.push(file);
2850
- const parsedPath = parse2(file);
2857
+ const parsedPath = parse(file);
2851
2858
  const relative2 = path3.relative(ctx.config.cwd, parsedPath.dir);
2852
2859
  const astJsonPath = `${relative2}/${parsedPath.name}.ast.json`.replaceAll(path3.sep, "__");
2853
2860
  const cssPath = `${relative2}/${parsedPath.name}.css`.replaceAll(path3.sep, "__");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "0.31.0",
3
+ "version": "0.32.1",
4
4
  "description": "The core css panda library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -32,44 +32,44 @@
32
32
  "access": "public"
33
33
  },
34
34
  "dependencies": {
35
- "browserslist": "^4.22.2",
36
- "chokidar": "^3.5.3",
37
- "fast-glob": "^3.3.1",
38
- "file-size": "^1.0.0",
39
- "filesize": "^10.0.8",
40
- "fs-extra": "11.1.1",
41
- "glob-parent": "^6.0.2",
42
- "is-glob": "^4.0.3",
35
+ "browserslist": "4.23.0",
36
+ "chokidar": "3.6.0",
37
+ "fast-glob": "3.3.2",
38
+ "file-size": "1.0.0",
39
+ "filesize": "10.1.0",
40
+ "fs-extra": "11.2.0",
41
+ "glob-parent": "6.0.2",
42
+ "is-glob": "4.0.3",
43
43
  "lodash.merge": "4.6.2",
44
44
  "look-it-up": "2.1.0",
45
45
  "outdent": " ^0.8.0",
46
- "perfect-debounce": "^1.0.0",
46
+ "perfect-debounce": "1.0.0",
47
47
  "pkg-types": "1.0.3",
48
48
  "pluralize": "8.0.0",
49
- "postcss": "^8.4.31",
50
- "preferred-pm": "^3.0.3",
51
- "prettier": "^2.8.8",
52
- "ts-morph": "19.0.0",
53
- "ts-pattern": "5.0.5",
54
- "tsconfck": "^2.1.2",
55
- "@pandacss/config": "0.31.0",
56
- "@pandacss/core": "0.31.0",
57
- "@pandacss/extractor": "0.31.0",
58
- "@pandacss/generator": "0.31.0",
59
- "@pandacss/logger": "0.31.0",
60
- "@pandacss/parser": "0.31.0",
61
- "@pandacss/shared": "0.31.0",
62
- "@pandacss/token-dictionary": "0.31.0",
63
- "@pandacss/types": "0.31.0"
49
+ "postcss": "8.4.35",
50
+ "preferred-pm": "3.1.2",
51
+ "prettier": "2.8.8",
52
+ "ts-morph": "21.0.1",
53
+ "ts-pattern": "5.0.8",
54
+ "tsconfck": "3.0.2",
55
+ "@pandacss/config": "0.32.1",
56
+ "@pandacss/core": "0.32.1",
57
+ "@pandacss/extractor": "0.32.1",
58
+ "@pandacss/generator": "0.32.1",
59
+ "@pandacss/logger": "0.32.1",
60
+ "@pandacss/parser": "0.32.1",
61
+ "@pandacss/shared": "0.32.1",
62
+ "@pandacss/token-dictionary": "0.32.1",
63
+ "@pandacss/types": "0.32.1"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@types/fs-extra": "11.0.4",
67
- "@types/glob-parent": "^5.1.1",
68
- "@types/is-glob": "^4.0.2",
69
- "@types/lodash.merge": "4.6.8",
67
+ "@types/glob-parent": "5.1.3",
68
+ "@types/is-glob": "4.0.4",
69
+ "@types/lodash.merge": "4.6.9",
70
70
  "@types/pluralize": "0.0.33",
71
- "boxen": "^7.1.1",
72
- "p-limit": "^4.0.0"
71
+ "boxen": "7.1.1",
72
+ "p-limit": "5.0.0"
73
73
  },
74
74
  "scripts": {
75
75
  "build": "tsup --tsconfig tsconfig.build.json src/index.ts --format=cjs,esm --shims --dts",