@pandacss/node 0.49.0 → 0.51.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,5 +1,7 @@
1
+ import * as _pandacss_reporter from '@pandacss/reporter';
2
+ import { ReportFormat } from '@pandacss/reporter';
1
3
  import * as _pandacss_types from '@pandacss/types';
2
- import { LoadConfigResult, Artifact, Runtime, PandaHooks, WatchOptions, WatcherEventType, ReportSnapshot, ParserResultInterface, ArtifactId, Config, CssArtifactType } from '@pandacss/types';
4
+ import { LoadConfigResult, Artifact, Runtime, PandaHooks, WatchOptions, WatcherEventType, AnalysisOptions, ArtifactId, Config, CssArtifactType } from '@pandacss/types';
3
5
  import { StyleEncoder, Stylesheet } from '@pandacss/core';
4
6
  import { Generator } from '@pandacss/generator';
5
7
  import * as _pandacss_parser from '@pandacss/parser';
@@ -53,15 +55,21 @@ declare class PandaContext extends Generator {
53
55
  results: ParserResult[];
54
56
  };
55
57
  writeCss: (sheet?: Stylesheet) => Promise<PromiseSettledResult<void>[]> | undefined;
56
- watchConfig: (cb: (file: string) => void | Promise<void>, opts?: Omit<WatchOptions, 'include'>) => void;
57
- watchFiles: (cb: (event: WatcherEventType, file: string) => void | Promise<void>, opts?: Omit<WatchOptions, 'include' | 'exclude' | 'poll' | 'cwd' | 'logger'>) => void;
58
+ watchConfig: (cb: (file: string) => void | Promise<void>, opts?: Omit<WatchOptions, "include">) => void;
59
+ watchFiles: (cb: (event: WatcherEventType, file: string) => void | Promise<void>, opts?: Omit<WatchOptions, "include" | "exclude" | "poll" | "cwd" | "logger">) => void;
58
60
  }
59
61
 
60
- interface Options {
61
- onResult?: (file: string, result: ParserResultInterface) => void;
62
- }
63
- declare function analyzeTokens(ctx: PandaContext, options?: Options): ReportSnapshot;
64
- declare const writeAnalyzeJSON: (filePath: string, result: ReportSnapshot, ctx: PandaContext) => Promise<void>;
62
+ declare function analyze(ctx: PandaContext, options?: AnalysisOptions): {
63
+ getRecipeReport(format?: ReportFormat): {
64
+ report: _pandacss_reporter.RecipeReportEntry[];
65
+ formatted: string;
66
+ };
67
+ getTokenReport(format?: ReportFormat): {
68
+ report: _pandacss_reporter.TokenAnalysisReport;
69
+ formatted: string;
70
+ };
71
+ writeReport(filePath: string): Promise<void>;
72
+ };
65
73
 
66
74
  declare function buildInfo(ctx: PandaContext, outfile: string): Promise<void>;
67
75
 
@@ -155,4 +163,4 @@ type SetupOptions = Partial<Config> & {
155
163
  declare function setupConfig(cwd: string, opts?: SetupOptions): Promise<void>;
156
164
  declare function setupPostcss(cwd: string): Promise<void>;
157
165
 
158
- export { Builder, type CssGenOptions, PandaContext, analyzeTokens, buildInfo, codegen, cssgen, debug, generate, loadConfigAndCreateContext, parseDependency, setLogStream, setupConfig, setupGitIgnore, setupPostcss, startProfiling, writeAnalyzeJSON };
166
+ export { Builder, type CssGenOptions, PandaContext, analyze, buildInfo, codegen, cssgen, debug, generate, loadConfigAndCreateContext, parseDependency, setLogStream, setupConfig, setupGitIgnore, setupPostcss, startProfiling };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
+ import * as _pandacss_reporter from '@pandacss/reporter';
2
+ import { ReportFormat } from '@pandacss/reporter';
1
3
  import * as _pandacss_types from '@pandacss/types';
2
- import { LoadConfigResult, Artifact, Runtime, PandaHooks, WatchOptions, WatcherEventType, ReportSnapshot, ParserResultInterface, ArtifactId, Config, CssArtifactType } from '@pandacss/types';
4
+ import { LoadConfigResult, Artifact, Runtime, PandaHooks, WatchOptions, WatcherEventType, AnalysisOptions, ArtifactId, Config, CssArtifactType } from '@pandacss/types';
3
5
  import { StyleEncoder, Stylesheet } from '@pandacss/core';
4
6
  import { Generator } from '@pandacss/generator';
5
7
  import * as _pandacss_parser from '@pandacss/parser';
@@ -53,15 +55,21 @@ declare class PandaContext extends Generator {
53
55
  results: ParserResult[];
54
56
  };
55
57
  writeCss: (sheet?: Stylesheet) => Promise<PromiseSettledResult<void>[]> | undefined;
56
- watchConfig: (cb: (file: string) => void | Promise<void>, opts?: Omit<WatchOptions, 'include'>) => void;
57
- watchFiles: (cb: (event: WatcherEventType, file: string) => void | Promise<void>, opts?: Omit<WatchOptions, 'include' | 'exclude' | 'poll' | 'cwd' | 'logger'>) => void;
58
+ watchConfig: (cb: (file: string) => void | Promise<void>, opts?: Omit<WatchOptions, "include">) => void;
59
+ watchFiles: (cb: (event: WatcherEventType, file: string) => void | Promise<void>, opts?: Omit<WatchOptions, "include" | "exclude" | "poll" | "cwd" | "logger">) => void;
58
60
  }
59
61
 
60
- interface Options {
61
- onResult?: (file: string, result: ParserResultInterface) => void;
62
- }
63
- declare function analyzeTokens(ctx: PandaContext, options?: Options): ReportSnapshot;
64
- declare const writeAnalyzeJSON: (filePath: string, result: ReportSnapshot, ctx: PandaContext) => Promise<void>;
62
+ declare function analyze(ctx: PandaContext, options?: AnalysisOptions): {
63
+ getRecipeReport(format?: ReportFormat): {
64
+ report: _pandacss_reporter.RecipeReportEntry[];
65
+ formatted: string;
66
+ };
67
+ getTokenReport(format?: ReportFormat): {
68
+ report: _pandacss_reporter.TokenAnalysisReport;
69
+ formatted: string;
70
+ };
71
+ writeReport(filePath: string): Promise<void>;
72
+ };
65
73
 
66
74
  declare function buildInfo(ctx: PandaContext, outfile: string): Promise<void>;
67
75
 
@@ -155,4 +163,4 @@ type SetupOptions = Partial<Config> & {
155
163
  declare function setupConfig(cwd: string, opts?: SetupOptions): Promise<void>;
156
164
  declare function setupPostcss(cwd: string): Promise<void>;
157
165
 
158
- export { Builder, type CssGenOptions, PandaContext, analyzeTokens, buildInfo, codegen, cssgen, debug, generate, loadConfigAndCreateContext, parseDependency, setLogStream, setupConfig, setupGitIgnore, setupPostcss, startProfiling, writeAnalyzeJSON };
166
+ export { Builder, type CssGenOptions, PandaContext, analyze, buildInfo, codegen, cssgen, debug, generate, loadConfigAndCreateContext, parseDependency, setLogStream, setupConfig, setupGitIgnore, setupPostcss, startProfiling };