@pandacss/node 1.6.0 → 1.7.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.
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _pandacss_reporter from '@pandacss/reporter';
2
2
  import { ReportFormat } from '@pandacss/reporter';
3
3
  import * as _pandacss_types from '@pandacss/types';
4
- import { LoadConfigResult, Runtime, PandaHooks, Artifact, WatchOptions, WatcherEventType, AnalysisOptions, ArtifactId, Config, CssArtifactType } from '@pandacss/types';
4
+ import { LoadConfigResult, Runtime, PandaHooks, Artifact, WatchOptions, WatcherEventType, AnalysisOptions, ArtifactId, Config, CssArtifactType, SpecFile } from '@pandacss/types';
5
5
  import { StyleEncoder, Stylesheet } from '@pandacss/core';
6
6
  import { Generator } from '@pandacss/generator';
7
7
  import * as _pandacss_parser from '@pandacss/parser';
@@ -165,4 +165,9 @@ type SetupOptions = Partial<Config> & {
165
165
  declare function setupConfig(cwd: string, opts?: SetupOptions): Promise<void>;
166
166
  declare function setupPostcss(cwd: string): Promise<void>;
167
167
 
168
- export { Builder, type CssGenOptions, PandaContext, analyze, buildInfo, codegen, cssgen, debug, generate, loadConfigAndCreateContext, parseDependency, setLogStream, setupConfig, setupGitIgnore, setupPostcss, startProfiling };
168
+ interface SpecOptions {
169
+ outdir?: string;
170
+ }
171
+ declare function spec(ctx: PandaContext, options: SpecOptions): Promise<SpecFile[]>;
172
+
173
+ export { Builder, type CssGenOptions, PandaContext, analyze, buildInfo, codegen, cssgen, debug, generate, loadConfigAndCreateContext, parseDependency, setLogStream, setupConfig, setupGitIgnore, setupPostcss, spec, startProfiling };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _pandacss_reporter from '@pandacss/reporter';
2
2
  import { ReportFormat } from '@pandacss/reporter';
3
3
  import * as _pandacss_types from '@pandacss/types';
4
- import { LoadConfigResult, Runtime, PandaHooks, Artifact, WatchOptions, WatcherEventType, AnalysisOptions, ArtifactId, Config, CssArtifactType } from '@pandacss/types';
4
+ import { LoadConfigResult, Runtime, PandaHooks, Artifact, WatchOptions, WatcherEventType, AnalysisOptions, ArtifactId, Config, CssArtifactType, SpecFile } from '@pandacss/types';
5
5
  import { StyleEncoder, Stylesheet } from '@pandacss/core';
6
6
  import { Generator } from '@pandacss/generator';
7
7
  import * as _pandacss_parser from '@pandacss/parser';
@@ -165,4 +165,9 @@ type SetupOptions = Partial<Config> & {
165
165
  declare function setupConfig(cwd: string, opts?: SetupOptions): Promise<void>;
166
166
  declare function setupPostcss(cwd: string): Promise<void>;
167
167
 
168
- export { Builder, type CssGenOptions, PandaContext, analyze, buildInfo, codegen, cssgen, debug, generate, loadConfigAndCreateContext, parseDependency, setLogStream, setupConfig, setupGitIgnore, setupPostcss, startProfiling };
168
+ interface SpecOptions {
169
+ outdir?: string;
170
+ }
171
+ declare function spec(ctx: PandaContext, options: SpecOptions): Promise<SpecFile[]>;
172
+
173
+ export { Builder, type CssGenOptions, PandaContext, analyze, buildInfo, codegen, cssgen, debug, generate, loadConfigAndCreateContext, parseDependency, setLogStream, setupConfig, setupGitIgnore, setupPostcss, spec, startProfiling };
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.2_@swc+helpers@0.5.17__jiti@2.6.1_postcss@8.5.6_tsx@4.20.6_typescript@5.9.3_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.6_tsx@4.20.6_typescript@5.9.3_yaml@2.8.1/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.2_@swc+helpers@0.5.17__jiti@2.6.1_postcss@8.5.6_tsx@4.20.6_typescript@5.9.3_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.6_tsx@4.20.6_typescript@5.9.3_yaml@2.8.1/node_modules/tsup/assets/cjs_shims.js"() {
39
39
  "use strict";
40
40
  }
41
41
  });
@@ -317,6 +317,7 @@ __export(index_exports, {
317
317
  setupConfig: () => setupConfig,
318
318
  setupGitIgnore: () => setupGitIgnore,
319
319
  setupPostcss: () => setupPostcss,
320
+ spec: () => spec,
320
321
  startProfiling: () => startProfiling
321
322
  });
322
323
  module.exports = __toCommonJS(index_exports);
@@ -2822,6 +2823,27 @@ module.exports = {
2822
2823
  `;
2823
2824
  await import_fs_extra2.default.writeFile((0, import_path6.join)(cwd, "postcss.config.cjs"), content);
2824
2825
  }
2826
+
2827
+ // src/spec.ts
2828
+ init_cjs_shims();
2829
+ var import_logger12 = require("@pandacss/logger");
2830
+ async function spec(ctx, options) {
2831
+ const { outdir } = options;
2832
+ const specs = ctx.getSpec();
2833
+ const specDir = outdir ? [ctx.config.cwd, outdir] : ctx.paths.specs;
2834
+ const specDirPath = ctx.runtime.path.join(...specDir);
2835
+ const writeSpec = async (spec2) => {
2836
+ await ctx.output.write({
2837
+ id: `spec-${spec2.type}`,
2838
+ dir: specDir,
2839
+ files: [{ file: `${spec2.type}.json`, code: JSON.stringify(spec2, null, 2) }]
2840
+ });
2841
+ };
2842
+ await Promise.all(specs.map(writeSpec));
2843
+ const specTypes = specs.map((s) => s.type);
2844
+ import_logger12.logger.info("spec", `Generated ${specTypes.length} spec file(s) \u2192 ${specDirPath}`);
2845
+ return specs;
2846
+ }
2825
2847
  // Annotate the CommonJS export names for ESM import in node:
2826
2848
  0 && (module.exports = {
2827
2849
  Builder,
@@ -2838,5 +2860,6 @@ module.exports = {
2838
2860
  setupConfig,
2839
2861
  setupGitIgnore,
2840
2862
  setupPostcss,
2863
+ spec,
2841
2864
  startProfiling
2842
2865
  });
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.2_@swc+helpers@0.5.17__jiti@2.6.1_postcss@8.5.6_tsx@4.20.6_typescript@5.9.3_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.6_tsx@4.20.6_typescript@5.9.3_yaml@2.8.1/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.2_@swc+helpers@0.5.17__jiti@2.6.1_postcss@8.5.6_tsx@4.20.6_typescript@5.9.3_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.6_tsx@4.20.6_typescript@5.9.3_yaml@2.8.1/node_modules/tsup/assets/esm_shims.js"() {
35
35
  "use strict";
36
36
  }
37
37
  });
@@ -2799,6 +2799,27 @@ module.exports = {
2799
2799
  `;
2800
2800
  await fsExtra2.writeFile(join3(cwd, "postcss.config.cjs"), content);
2801
2801
  }
2802
+
2803
+ // src/spec.ts
2804
+ init_esm_shims();
2805
+ import { logger as logger12 } from "@pandacss/logger";
2806
+ async function spec(ctx, options) {
2807
+ const { outdir } = options;
2808
+ const specs = ctx.getSpec();
2809
+ const specDir = outdir ? [ctx.config.cwd, outdir] : ctx.paths.specs;
2810
+ const specDirPath = ctx.runtime.path.join(...specDir);
2811
+ const writeSpec = async (spec2) => {
2812
+ await ctx.output.write({
2813
+ id: `spec-${spec2.type}`,
2814
+ dir: specDir,
2815
+ files: [{ file: `${spec2.type}.json`, code: JSON.stringify(spec2, null, 2) }]
2816
+ });
2817
+ };
2818
+ await Promise.all(specs.map(writeSpec));
2819
+ const specTypes = specs.map((s) => s.type);
2820
+ logger12.info("spec", `Generated ${specTypes.length} spec file(s) \u2192 ${specDirPath}`);
2821
+ return specs;
2822
+ }
2802
2823
  export {
2803
2824
  Builder,
2804
2825
  PandaContext,
@@ -2814,5 +2835,6 @@ export {
2814
2835
  setupConfig,
2815
2836
  setupGitIgnore,
2816
2837
  setupPostcss,
2838
+ spec,
2817
2839
  startProfiling
2818
2840
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "The core css panda library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -42,7 +42,7 @@
42
42
  "lodash.merge": "4.6.2",
43
43
  "look-it-up": "2.1.0",
44
44
  "outdent": " ^0.8.0",
45
- "package-manager-detector": "1.5.0",
45
+ "package-manager-detector": "1.6.0",
46
46
  "perfect-debounce": "1.0.0",
47
47
  "pkg-types": "2.3.0",
48
48
  "picomatch": "4.0.3",
@@ -52,15 +52,15 @@
52
52
  "ts-morph": "27.0.2",
53
53
  "ts-pattern": "5.9.0",
54
54
  "tsconfck": "3.1.6",
55
- "@pandacss/config": "1.6.0",
56
- "@pandacss/core": "1.6.0",
57
- "@pandacss/generator": "1.6.0",
58
- "@pandacss/reporter": "1.6.0",
59
- "@pandacss/logger": "1.6.0",
60
- "@pandacss/parser": "1.6.0",
61
- "@pandacss/shared": "1.6.0",
62
- "@pandacss/token-dictionary": "1.6.0",
63
- "@pandacss/types": "1.6.0"
55
+ "@pandacss/config": "1.7.0",
56
+ "@pandacss/core": "1.7.0",
57
+ "@pandacss/generator": "1.7.0",
58
+ "@pandacss/reporter": "1.7.0",
59
+ "@pandacss/logger": "1.7.0",
60
+ "@pandacss/parser": "1.7.0",
61
+ "@pandacss/shared": "1.7.0",
62
+ "@pandacss/token-dictionary": "1.7.0",
63
+ "@pandacss/types": "1.7.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@types/picomatch": "4.0.2",