@pandacss/node 0.27.0 → 0.27.2
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.js +22 -24
- package/dist/index.mjs +10 -12
- package/package.json +11 -12
package/dist/index.js
CHANGED
|
@@ -791,7 +791,7 @@ var import_core = require("@pandacss/core");
|
|
|
791
791
|
var import_error = require("@pandacss/error");
|
|
792
792
|
var import_logger6 = require("@pandacss/logger");
|
|
793
793
|
var import_fs = require("fs");
|
|
794
|
-
var
|
|
794
|
+
var import_path3 = require("path");
|
|
795
795
|
|
|
796
796
|
// src/codegen.ts
|
|
797
797
|
init_cjs_shims();
|
|
@@ -2286,7 +2286,7 @@ var import_logger3 = require("@pandacss/logger");
|
|
|
2286
2286
|
var import_chokidar = __toESM(require("chokidar"));
|
|
2287
2287
|
var import_fast_glob = __toESM(require("fast-glob"));
|
|
2288
2288
|
var import_fs_extra = __toESM(require("fs-extra"));
|
|
2289
|
-
var
|
|
2289
|
+
var import_path = require("path");
|
|
2290
2290
|
var nodeRuntime = {
|
|
2291
2291
|
cwd() {
|
|
2292
2292
|
return process.cwd();
|
|
@@ -2295,15 +2295,15 @@ var nodeRuntime = {
|
|
|
2295
2295
|
return process.env[name];
|
|
2296
2296
|
},
|
|
2297
2297
|
path: {
|
|
2298
|
-
join:
|
|
2299
|
-
relative:
|
|
2300
|
-
dirname:
|
|
2301
|
-
extname:
|
|
2302
|
-
isAbsolute:
|
|
2303
|
-
sep:
|
|
2304
|
-
resolve:
|
|
2298
|
+
join: import_path.join,
|
|
2299
|
+
relative: import_path.relative,
|
|
2300
|
+
dirname: import_path.dirname,
|
|
2301
|
+
extname: import_path.extname,
|
|
2302
|
+
isAbsolute: import_path.isAbsolute,
|
|
2303
|
+
sep: import_path.sep,
|
|
2304
|
+
resolve: import_path.resolve,
|
|
2305
2305
|
abs(cwd, str) {
|
|
2306
|
-
return (0,
|
|
2306
|
+
return (0, import_path.isAbsolute)(str) ? str : (0, import_path.join)(cwd, str);
|
|
2307
2307
|
}
|
|
2308
2308
|
},
|
|
2309
2309
|
fs: {
|
|
@@ -2549,7 +2549,7 @@ async function loadConfigAndCreateContext(options = {}) {
|
|
|
2549
2549
|
// src/parse-dependency.ts
|
|
2550
2550
|
init_cjs_shims();
|
|
2551
2551
|
var import_is_glob = __toESM(require("is-glob"));
|
|
2552
|
-
var
|
|
2552
|
+
var import_path2 = require("path");
|
|
2553
2553
|
|
|
2554
2554
|
// src/parse-glob.ts
|
|
2555
2555
|
init_cjs_shims();
|
|
@@ -2580,12 +2580,12 @@ function parseDependency(fileOrGlob) {
|
|
|
2580
2580
|
let message = null;
|
|
2581
2581
|
if ((0, import_is_glob.default)(fileOrGlob)) {
|
|
2582
2582
|
const { base, glob: glob2 } = parseGlob(fileOrGlob);
|
|
2583
|
-
message = { type: "dir-dependency", dir: (0,
|
|
2583
|
+
message = { type: "dir-dependency", dir: (0, import_path2.normalize)((0, import_path2.resolve)(base)), glob: glob2 };
|
|
2584
2584
|
} else {
|
|
2585
|
-
message = { type: "dependency", file: (0,
|
|
2585
|
+
message = { type: "dependency", file: (0, import_path2.normalize)((0, import_path2.resolve)(fileOrGlob)) };
|
|
2586
2586
|
}
|
|
2587
2587
|
if (message.type === "dir-dependency" && process.env.ROLLUP_WATCH === "true") {
|
|
2588
|
-
message = { type: "dependency", file: (0,
|
|
2588
|
+
message = { type: "dependency", file: (0, import_path2.normalize)((0, import_path2.resolve)(message.dir)) };
|
|
2589
2589
|
}
|
|
2590
2590
|
return message;
|
|
2591
2591
|
}
|
|
@@ -2615,7 +2615,7 @@ var Builder = class {
|
|
|
2615
2615
|
const cwd = options?.cwd ?? this.context?.config.cwd ?? process.cwd();
|
|
2616
2616
|
const configDeps = /* @__PURE__ */ new Set([
|
|
2617
2617
|
...foundDeps,
|
|
2618
|
-
...(this.context?.conf.dependencies ?? []).map((file) => (0,
|
|
2618
|
+
...(this.context?.conf.dependencies ?? []).map((file) => (0, import_path3.resolve)(cwd, file))
|
|
2619
2619
|
]);
|
|
2620
2620
|
this.configDependencies = configDeps;
|
|
2621
2621
|
import_logger6.logger.debug("builder", "Config dependencies");
|
|
@@ -2714,7 +2714,6 @@ var Builder = class {
|
|
|
2714
2714
|
write = (root) => {
|
|
2715
2715
|
const ctx = this.getContextOrThrow();
|
|
2716
2716
|
const sheet = ctx.createSheet();
|
|
2717
|
-
ctx.appendLayerParams(sheet);
|
|
2718
2717
|
ctx.appendBaselineCss(sheet);
|
|
2719
2718
|
const css = ctx.getCss(sheet);
|
|
2720
2719
|
root.append(
|
|
@@ -2729,12 +2728,11 @@ var Builder = class {
|
|
|
2729
2728
|
const ctx = this.getContextOrThrow();
|
|
2730
2729
|
for (const fileOrGlob of ctx.config.include) {
|
|
2731
2730
|
const dependency = parseDependency(fileOrGlob);
|
|
2732
|
-
if (dependency)
|
|
2731
|
+
if (dependency)
|
|
2733
2732
|
fn(dependency);
|
|
2734
|
-
}
|
|
2735
2733
|
}
|
|
2736
2734
|
for (const file of this.configDependencies) {
|
|
2737
|
-
fn({ type: "dependency", file:
|
|
2735
|
+
fn({ type: "dependency", file: (0, import_path3.normalize)((0, import_path3.resolve)(file)) });
|
|
2738
2736
|
}
|
|
2739
2737
|
};
|
|
2740
2738
|
};
|
|
@@ -2776,7 +2774,7 @@ var cssgen = async (ctx, options) => {
|
|
|
2776
2774
|
// src/debug.ts
|
|
2777
2775
|
init_cjs_shims();
|
|
2778
2776
|
var import_logger8 = require("@pandacss/logger");
|
|
2779
|
-
var
|
|
2777
|
+
var import_path4 = require("path");
|
|
2780
2778
|
async function debug(ctx, options) {
|
|
2781
2779
|
const files = ctx.getFiles();
|
|
2782
2780
|
const measureTotal = import_logger8.logger.time.debug(`Done parsing ${files.length} files`);
|
|
@@ -2811,7 +2809,7 @@ async function debug(ctx, options) {
|
|
|
2811
2809
|
}
|
|
2812
2810
|
if (outdir) {
|
|
2813
2811
|
filesWithCss.push(file);
|
|
2814
|
-
const parsedPath = (0,
|
|
2812
|
+
const parsedPath = (0, import_path4.parse)(file);
|
|
2815
2813
|
const relative2 = path.relative(ctx.config.cwd, parsedPath.dir);
|
|
2816
2814
|
const astJsonPath = `${relative2}/${parsedPath.name}.ast.json`.replaceAll(path.sep, "__");
|
|
2817
2815
|
const cssPath = `${relative2}/${parsedPath.name}.css`.replaceAll(path.sep, "__");
|
|
@@ -2931,7 +2929,7 @@ var import_logger10 = require("@pandacss/logger");
|
|
|
2931
2929
|
var import_fs_extra2 = __toESM(require("fs-extra"));
|
|
2932
2930
|
var import_look_it_up2 = require("look-it-up");
|
|
2933
2931
|
var import_outdent2 = require("outdent");
|
|
2934
|
-
var
|
|
2932
|
+
var import_path5 = require("path");
|
|
2935
2933
|
var import_preferred_pm = __toESM(require("preferred-pm"));
|
|
2936
2934
|
var import_prettier = __toESM(require("prettier"));
|
|
2937
2935
|
async function setupConfig(cwd, opts = {}) {
|
|
@@ -2976,7 +2974,7 @@ jsxFramework: '${jsxFramework}',` : ""}
|
|
|
2976
2974
|
syntax: '${syntax}'` : ""}
|
|
2977
2975
|
})
|
|
2978
2976
|
`;
|
|
2979
|
-
await import_fs_extra2.default.writeFile((0,
|
|
2977
|
+
await import_fs_extra2.default.writeFile((0, import_path5.join)(cwd, file), import_prettier.default.format(content));
|
|
2980
2978
|
import_logger10.logger.log(import_core2.messages.thankYou());
|
|
2981
2979
|
}
|
|
2982
2980
|
}
|
|
@@ -2989,7 +2987,7 @@ module.exports = {
|
|
|
2989
2987
|
},
|
|
2990
2988
|
}
|
|
2991
2989
|
`;
|
|
2992
|
-
await import_fs_extra2.default.writeFile((0,
|
|
2990
|
+
await import_fs_extra2.default.writeFile((0, import_path5.join)(cwd, "postcss.config.cjs"), content);
|
|
2993
2991
|
}
|
|
2994
2992
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2995
2993
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -767,7 +767,7 @@ import { optimizeCss } from "@pandacss/core";
|
|
|
767
767
|
import { ConfigNotFoundError } from "@pandacss/error";
|
|
768
768
|
import { logger as logger6 } from "@pandacss/logger";
|
|
769
769
|
import { existsSync, statSync } from "fs";
|
|
770
|
-
import { resolve as resolve3 } from "
|
|
770
|
+
import { normalize as normalize2, resolve as resolve3 } from "path";
|
|
771
771
|
|
|
772
772
|
// src/codegen.ts
|
|
773
773
|
init_esm_shims();
|
|
@@ -2262,7 +2262,7 @@ import { logger as logger3 } from "@pandacss/logger";
|
|
|
2262
2262
|
import chokidar from "chokidar";
|
|
2263
2263
|
import glob from "fast-glob";
|
|
2264
2264
|
import fsExtra from "fs-extra";
|
|
2265
|
-
import { dirname, extname, isAbsolute, join, relative,
|
|
2265
|
+
import { dirname, extname, isAbsolute, join, relative, resolve, sep } from "path";
|
|
2266
2266
|
var nodeRuntime = {
|
|
2267
2267
|
cwd() {
|
|
2268
2268
|
return process.cwd();
|
|
@@ -2525,7 +2525,7 @@ async function loadConfigAndCreateContext(options = {}) {
|
|
|
2525
2525
|
// src/parse-dependency.ts
|
|
2526
2526
|
init_esm_shims();
|
|
2527
2527
|
import isGlob from "is-glob";
|
|
2528
|
-
import { resolve as resolve2 } from "
|
|
2528
|
+
import { normalize, resolve as resolve2 } from "path";
|
|
2529
2529
|
|
|
2530
2530
|
// src/parse-glob.ts
|
|
2531
2531
|
init_esm_shims();
|
|
@@ -2556,12 +2556,12 @@ function parseDependency(fileOrGlob) {
|
|
|
2556
2556
|
let message = null;
|
|
2557
2557
|
if (isGlob(fileOrGlob)) {
|
|
2558
2558
|
const { base, glob: glob2 } = parseGlob(fileOrGlob);
|
|
2559
|
-
message = { type: "dir-dependency", dir: resolve2(base), glob: glob2 };
|
|
2559
|
+
message = { type: "dir-dependency", dir: normalize(resolve2(base)), glob: glob2 };
|
|
2560
2560
|
} else {
|
|
2561
|
-
message = { type: "dependency", file: resolve2(fileOrGlob) };
|
|
2561
|
+
message = { type: "dependency", file: normalize(resolve2(fileOrGlob)) };
|
|
2562
2562
|
}
|
|
2563
2563
|
if (message.type === "dir-dependency" && process.env.ROLLUP_WATCH === "true") {
|
|
2564
|
-
message = { type: "dependency", file: resolve2(message.dir) };
|
|
2564
|
+
message = { type: "dependency", file: normalize(resolve2(message.dir)) };
|
|
2565
2565
|
}
|
|
2566
2566
|
return message;
|
|
2567
2567
|
}
|
|
@@ -2690,7 +2690,6 @@ var Builder = class {
|
|
|
2690
2690
|
write = (root) => {
|
|
2691
2691
|
const ctx = this.getContextOrThrow();
|
|
2692
2692
|
const sheet = ctx.createSheet();
|
|
2693
|
-
ctx.appendLayerParams(sheet);
|
|
2694
2693
|
ctx.appendBaselineCss(sheet);
|
|
2695
2694
|
const css = ctx.getCss(sheet);
|
|
2696
2695
|
root.append(
|
|
@@ -2705,12 +2704,11 @@ var Builder = class {
|
|
|
2705
2704
|
const ctx = this.getContextOrThrow();
|
|
2706
2705
|
for (const fileOrGlob of ctx.config.include) {
|
|
2707
2706
|
const dependency = parseDependency(fileOrGlob);
|
|
2708
|
-
if (dependency)
|
|
2707
|
+
if (dependency)
|
|
2709
2708
|
fn(dependency);
|
|
2710
|
-
}
|
|
2711
2709
|
}
|
|
2712
2710
|
for (const file of this.configDependencies) {
|
|
2713
|
-
fn({ type: "dependency", file:
|
|
2711
|
+
fn({ type: "dependency", file: normalize2(resolve3(file)) });
|
|
2714
2712
|
}
|
|
2715
2713
|
};
|
|
2716
2714
|
};
|
|
@@ -2752,7 +2750,7 @@ var cssgen = async (ctx, options) => {
|
|
|
2752
2750
|
// src/debug.ts
|
|
2753
2751
|
init_esm_shims();
|
|
2754
2752
|
import { colors as colors2, logger as logger8 } from "@pandacss/logger";
|
|
2755
|
-
import { parse as parse2 } from "
|
|
2753
|
+
import { parse as parse2 } from "path";
|
|
2756
2754
|
async function debug(ctx, options) {
|
|
2757
2755
|
const files = ctx.getFiles();
|
|
2758
2756
|
const measureTotal = logger8.time.debug(`Done parsing ${files.length} files`);
|
|
@@ -2907,7 +2905,7 @@ import { logger as logger10, quote } from "@pandacss/logger";
|
|
|
2907
2905
|
import fsExtra2 from "fs-extra";
|
|
2908
2906
|
import { lookItUpSync as lookItUpSync2 } from "look-it-up";
|
|
2909
2907
|
import { outdent as outdent2 } from "outdent";
|
|
2910
|
-
import { join as join2 } from "
|
|
2908
|
+
import { join as join2 } from "path";
|
|
2911
2909
|
import getPackageManager from "preferred-pm";
|
|
2912
2910
|
import prettier from "prettier";
|
|
2913
2911
|
async function setupConfig(cwd, opts = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/node",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.2",
|
|
4
4
|
"description": "The core css panda library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
"lodash.merge": "4.6.2",
|
|
45
45
|
"look-it-up": "2.1.0",
|
|
46
46
|
"outdent": " ^0.8.0",
|
|
47
|
-
"pathe": "^1.1.1",
|
|
48
47
|
"perfect-debounce": "^1.0.0",
|
|
49
48
|
"pkg-types": "1.0.3",
|
|
50
49
|
"pluralize": "8.0.0",
|
|
@@ -54,16 +53,16 @@
|
|
|
54
53
|
"ts-morph": "19.0.0",
|
|
55
54
|
"ts-pattern": "5.0.5",
|
|
56
55
|
"tsconfck": "^2.1.2",
|
|
57
|
-
"@pandacss/config": "0.27.
|
|
58
|
-
"@pandacss/core": "0.27.
|
|
59
|
-
"@pandacss/error": "0.27.
|
|
60
|
-
"@pandacss/extractor": "0.27.
|
|
61
|
-
"@pandacss/generator": "0.27.
|
|
62
|
-
"@pandacss/logger": "0.27.
|
|
63
|
-
"@pandacss/parser": "0.27.
|
|
64
|
-
"@pandacss/shared": "0.27.
|
|
65
|
-
"@pandacss/token-dictionary": "0.27.
|
|
66
|
-
"@pandacss/types": "0.27.
|
|
56
|
+
"@pandacss/config": "0.27.2",
|
|
57
|
+
"@pandacss/core": "0.27.2",
|
|
58
|
+
"@pandacss/error": "0.27.2",
|
|
59
|
+
"@pandacss/extractor": "0.27.2",
|
|
60
|
+
"@pandacss/generator": "0.27.2",
|
|
61
|
+
"@pandacss/logger": "0.27.2",
|
|
62
|
+
"@pandacss/parser": "0.27.2",
|
|
63
|
+
"@pandacss/shared": "0.27.2",
|
|
64
|
+
"@pandacss/token-dictionary": "0.27.2",
|
|
65
|
+
"@pandacss/types": "0.27.2"
|
|
67
66
|
},
|
|
68
67
|
"devDependencies": {
|
|
69
68
|
"@types/fs-extra": "11.0.4",
|