@pandacss/node 1.6.1 → 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 +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +23 -0
- package/dist/index.mjs +22 -0
- package/package.json +10 -10
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
|
-
|
|
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
|
-
|
|
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
|
@@ -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
|
@@ -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.
|
|
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",
|
|
@@ -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.
|
|
56
|
-
"@pandacss/core": "1.
|
|
57
|
-
"@pandacss/generator": "1.
|
|
58
|
-
"@pandacss/reporter": "1.
|
|
59
|
-
"@pandacss/logger": "1.
|
|
60
|
-
"@pandacss/parser": "1.
|
|
61
|
-
"@pandacss/shared": "1.
|
|
62
|
-
"@pandacss/token-dictionary": "1.
|
|
63
|
-
"@pandacss/types": "1.
|
|
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",
|