@pandacss/compiler 2.0.0-beta.5 → 2.0.0-beta.6

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.ts CHANGED
@@ -1,5 +1,8 @@
1
- import { SerializedConfig, Span, Diagnostic, MatchCategory, ExtractedCall, ExtractedJsx, ExtractResult, Compiler, SerializedHookFilter, CompileOutput, Driver, CompilerOptions, ConfigSnapshot } from '@pandacss/compiler-shared';
1
+ import * as _pandacss_compiler_shared from '@pandacss/compiler-shared';
2
+ import { SerializedConfig, Span, Diagnostic, MatchCategory, ExtractedCall, ExtractedJsx, ExtractResult, Compiler, BuildInfoNative, DesignSystemManifestInput, DesignSystemManifest, DesignSystemChainPlan, FileInspectionResult, SerializedHookFilter, CompileOutput, BaseDriver, DesignSystemWatchTarget, DesignSystemWatchFileKind, SourceChange, DiffConfigResult, CodegenOptions, CompilerOptions, ConfigSnapshot } from '@pandacss/compiler-shared';
2
3
  export * from '@pandacss/compiler-shared';
4
+ export { createUsageReport } from '@pandacss/compiler-shared';
5
+ import { LoadConfigResult } from '@pandacss/config';
3
6
 
4
7
  interface CompileInput {
5
8
  files?: Array<{
@@ -106,9 +109,25 @@ interface TraceOptions {
106
109
  interface NativeCompilerOptions {
107
110
  crossFile?: boolean;
108
111
  }
112
+ interface RawDesignSystemBinding {
113
+ createDesignSystemManifest(input: DesignSystemManifestInput): DesignSystemManifest;
114
+ designSystemManifestSchemaVersion(): number;
115
+ resolveDesignSystemChain(manifests: DesignSystemManifest[]): DesignSystemChainPlan;
116
+ }
117
+ interface RawFileSystemBinding {
118
+ readFile(path: string): string | null | undefined;
119
+ exists(path: string): boolean;
120
+ }
121
+ interface RawPathBinding {
122
+ realpath(path: string): string;
123
+ resolvePath(path: string, cwd?: string): string;
124
+ joinPath(parts: string[]): string;
125
+ dirname(path: string): string;
126
+ }
109
127
  /** The raw native instance — superset of {@link Compiler} carrying the internal
110
128
  * methods the facade hides. */
111
- interface RawCompiler extends Compiler {
129
+ interface RawCompiler extends Compiler, BuildInfoNative, RawDesignSystemBinding, RawFileSystemBinding, RawPathBinding {
130
+ inspectFileSource(path: string, source: string): Omit<FileInspectionResult, 'path'>;
112
131
  token_dictionary?(): TokenDictionary | undefined;
113
132
  registerUtilityTransform?(id: string, callback: (resolved: unknown, original: unknown) => unknown): void;
114
133
  registerPatternTransform?(id: string, callback: (props: unknown, helpers: Record<string, unknown>) => unknown): void;
@@ -139,26 +158,66 @@ interface NodeDriverOptions {
139
158
  /** Override the config's `include` globs (e.g. CLI `--include`). Empty/omitted keeps the config value. */
140
159
  include?: string[];
141
160
  }
161
+ interface WriteDesignSystemLibOptions {
162
+ outdir?: string;
163
+ files?: string[];
164
+ panda?: string;
165
+ minify?: boolean;
166
+ maxWarnings?: number | string;
167
+ }
168
+ interface WriteDesignSystemLibResult {
169
+ manifestPath: string;
170
+ buildInfoPath: string;
171
+ presetPath: string;
172
+ exportsChanged: boolean;
173
+ parsedFileCount: number;
174
+ diagnostics: Diagnostic[];
175
+ }
142
176
  /**
143
177
  * {@link Driver} backed by the native compiler (`OsFileSystem`). Loads the
144
178
  * config from disk; `scan` / `codegen` run through the Rust fs engine.
145
179
  */
146
- declare function createNodeDriver(options: NodeDriverOptions): Promise<Driver>;
180
+ declare function createNodeDriver(options: NodeDriverOptions): Promise<NodeDriver>;
181
+ declare class NodeDriver extends BaseDriver {
182
+ #private;
183
+ constructor(options: NodeDriverOptions, loaded: LoadConfigResult);
184
+ get designSystemDiagnostics(): Diagnostic[];
185
+ get config(): _pandacss_compiler_shared.SerializedConfig;
186
+ get configPath(): string;
187
+ get configDependencies(): string[];
188
+ designSystemWatchTargets(): DesignSystemWatchTarget[];
189
+ isDesignSystemFile(file: string): DesignSystemWatchFileKind | false;
190
+ syncDesignSystemFileChange(change: SourceChange): Promise<boolean>;
191
+ reload(): Promise<DiffConfigResult>;
192
+ applyChange(change: SourceChange): boolean;
193
+ getOutdir(outdir?: string): string;
194
+ writeDesignSystemLib(options?: WriteDesignSystemLibOptions): Promise<WriteDesignSystemLibResult>;
195
+ codegen(options?: CodegenOptions): string[];
196
+ private codegenWithPrepareHooks;
197
+ isConfigFile(file: string): boolean;
198
+ private parseDesignSystemLib;
199
+ private compileDesignSystemPreset;
200
+ private writeDesignSystemLibArtifacts;
201
+ }
147
202
 
148
- /** One-shot stateless compile: build a compiler from `config`, parse every
149
- * input file, and emit the stylesheet. Callback-bearing configs
150
- * (`utilities.*.transform`, `patterns.*.transform`) are *not* supported here —
151
- * use [`createCompiler`] + `options.callbacks` for those. */
203
+ /**
204
+ * One-shot stateless compile: build a compiler from `config`, parse every
205
+ * input file, and emit the stylesheet. Callback-bearing configs
206
+ * (`utilities.*.transform`, `patterns.*.transform`) are *not* supported here -
207
+ * use [`createCompiler`] + `options.callbacks` for those.
208
+ */
152
209
  declare function compile(input?: CompileInput): CompileOutput;
153
210
  declare function startTracing(options?: TraceOptions): boolean;
154
211
  declare function flushTracing(): void;
155
212
  declare function shutdownTracing(): boolean;
156
213
  declare function createCompiler(config: SerializedConfig, options?: CompilerOptions): Compiler;
157
- /** Like {@link createCompiler}, but takes a snapshot; its callbacks merge under
158
- * any in `options.callbacks`. */
214
+ /**
215
+ * Like {@link createCompiler}, but takes a snapshot; its callbacks merge under
216
+ * any in `options.callbacks`.
217
+ */
159
218
  declare function createCompilerFromSnapshot(snapshot: ConfigSnapshot, options?: CompilerOptions): Compiler;
160
219
  declare function getBindingInfo(): {
161
220
  native: boolean;
162
221
  };
163
222
 
164
- export { type CompileInput, type CompilerConstructor, type CssSyntax, type ExtractDebugResult, type ExtractedCallsResult, type ExtractedJsxResult, type ExtractorSession, type ExtractorSessionConstructor, type ImportKind, type ImportRecord, type ImportScanResult, type ImportSpecifier, type ImportSpecifierKind, type JsxFramework, type MatchedImport, type Matcher, type Matchers, type NativeBinding, type NativeCompilerOptions, type NodeDriverOptions, type RawCompiler, type TokenDictionary, type TraceOptions, compile, createCompiler, createCompilerFromSnapshot, createNodeDriver, flushTracing, getBindingInfo, shutdownTracing, startTracing };
223
+ export { type CompileInput, type CompilerConstructor, type CssSyntax, type ExtractDebugResult, type ExtractedCallsResult, type ExtractedJsxResult, type ExtractorSession, type ExtractorSessionConstructor, type ImportKind, type ImportRecord, type ImportScanResult, type ImportSpecifier, type ImportSpecifierKind, type JsxFramework, type MatchedImport, type Matcher, type Matchers, type NativeBinding, type NativeCompilerOptions, NodeDriver, type NodeDriverOptions, type RawCompiler, type TokenDictionary, type TraceOptions, type WriteDesignSystemLibOptions, type WriteDesignSystemLibResult, compile, createCompiler, createCompilerFromSnapshot, createNodeDriver, flushTracing, getBindingInfo, shutdownTracing, startTracing };
package/dist/index.js CHANGED
@@ -1,18 +1,22 @@
1
1
  import {
2
+ NodeDriver,
2
3
  compile,
3
4
  createCompiler,
4
5
  createCompilerFromSnapshot,
5
6
  createNodeDriver,
7
+ createUsageReport,
6
8
  flushTracing,
7
9
  getBindingInfo,
8
10
  shutdownTracing,
9
11
  startTracing
10
- } from "./chunk-H22MKDJV.js";
12
+ } from "./chunk-VRB2SXJJ.js";
11
13
  export {
14
+ NodeDriver,
12
15
  compile,
13
16
  createCompiler,
14
17
  createCompilerFromSnapshot,
15
18
  createNodeDriver,
19
+ createUsageReport,
16
20
  flushTracing,
17
21
  getBindingInfo,
18
22
  shutdownTracing,
package/dist/loader.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCompilerFromSnapshot
3
- } from "./chunk-H22MKDJV.js";
3
+ } from "./chunk-VRB2SXJJ.js";
4
4
 
5
5
  // src/loader.ts
6
6
  import { loadConfig } from "@pandacss/config";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/compiler",
3
- "version": "2.0.0-beta.5",
3
+ "version": "2.0.0-beta.6",
4
4
  "description": "Native Rust binding for the Panda compiler engine",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -45,31 +45,34 @@
45
45
  "x86_64-unknown-linux-musl",
46
46
  "aarch64-unknown-linux-musl",
47
47
  "x86_64-pc-windows-msvc",
48
- "aarch64-pc-windows-msvc"
48
+ "aarch64-pc-windows-msvc",
49
+ "wasm32-wasip1-threads"
49
50
  ]
50
51
  },
51
52
  "dependencies": {
52
- "@pandacss/compiler-shared": "2.0.0-beta.5",
53
- "@pandacss/config": "2.0.0-beta.5"
53
+ "@napi-rs/wasm-runtime": "^1.1.6",
54
+ "@pandacss/compiler-shared": "2.0.0-beta.6",
55
+ "@pandacss/config": "2.0.0-beta.6"
54
56
  },
55
57
  "devDependencies": {
56
58
  "@napi-rs/cli": "^3.7.1",
57
59
  "rolldown": "1.0.0-rc.17",
58
- "@pandacss/preset-base": "2.0.0-beta.5",
59
- "@pandacss/preset-panda": "2.0.0-beta.5"
60
+ "@pandacss/preset-base": "2.0.0-beta.6",
61
+ "@pandacss/preset-panda": "2.0.0-beta.6"
60
62
  },
61
63
  "engines": {
62
64
  "node": ">=22"
63
65
  },
64
66
  "optionalDependencies": {
65
- "@pandacss/compiler-darwin-arm64": "2.0.0-beta.5",
66
- "@pandacss/compiler-darwin-x64": "2.0.0-beta.5",
67
- "@pandacss/compiler-linux-x64-gnu": "2.0.0-beta.5",
68
- "@pandacss/compiler-linux-arm64-gnu": "2.0.0-beta.5",
69
- "@pandacss/compiler-linux-x64-musl": "2.0.0-beta.5",
70
- "@pandacss/compiler-linux-arm64-musl": "2.0.0-beta.5",
71
- "@pandacss/compiler-win32-x64-msvc": "2.0.0-beta.5",
72
- "@pandacss/compiler-win32-arm64-msvc": "2.0.0-beta.5"
67
+ "@pandacss/compiler-darwin-arm64": "2.0.0-beta.6",
68
+ "@pandacss/compiler-darwin-x64": "2.0.0-beta.6",
69
+ "@pandacss/compiler-linux-x64-gnu": "2.0.0-beta.6",
70
+ "@pandacss/compiler-linux-arm64-gnu": "2.0.0-beta.6",
71
+ "@pandacss/compiler-linux-x64-musl": "2.0.0-beta.6",
72
+ "@pandacss/compiler-linux-arm64-musl": "2.0.0-beta.6",
73
+ "@pandacss/compiler-win32-x64-msvc": "2.0.0-beta.6",
74
+ "@pandacss/compiler-win32-arm64-msvc": "2.0.0-beta.6",
75
+ "@pandacss/compiler-wasm32-wasi": "2.0.0-beta.6"
73
76
  },
74
77
  "scripts": {
75
78
  "build": "pnpm build:native && pnpm build:js",
@@ -77,6 +80,7 @@
77
80
  "build:fast": "tsup src/index.ts src/loader.ts --format=esm --platform=node --no-dts",
78
81
  "build:native": "napi build --platform --release --manifest-path crate/Cargo.toml --output-dir . --js binding.cjs --dts native.d.ts",
79
82
  "dev": "pnpm build:fast --watch",
80
- "test": "vitest run"
83
+ "test": "vitest run",
84
+ "verify:webcontainer": "node scripts/verify-webcontainer-api.mjs"
81
85
  }
82
86
  }