@pandacss/compiler-wasm 2.0.0-beta.2 → 2.0.0-beta.20

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.
@@ -19,6 +19,11 @@ export class WasmCompiler {
19
19
  private constructor();
20
20
  free(): void;
21
21
  [Symbol.dispose](): void;
22
+ /**
23
+ * Files whose folded imports changed since the last call. Clears on read.
24
+ * Re-parse each via `refreshFile`, then call again until empty.
25
+ */
26
+ affectedFiles(): string[];
22
27
  /**
23
28
  * Hydrate an external build info into this project (additive), optionally
24
29
  * restricted to imported modules (tree-shaking). Returns `false` on a
@@ -65,6 +70,26 @@ export class WasmCompiler {
65
70
  * stamped into build info as `configFingerprint`.
66
71
  */
67
72
  configFingerprint(): string;
73
+ /**
74
+ * Build a `panda/lib.json` value from host-supplied fields, stamping the
75
+ * engine-owned schema version. Backs the `designSystem.create` JS namespace.
76
+ *
77
+ * # Errors
78
+ * Returns a JS error if `input` is invalid or the manifest fails to serialize.
79
+ */
80
+ createDesignSystemManifest(input: any): any;
81
+ /**
82
+ * Per-package import selections from one scan. Each entry is `null` = all,
83
+ * or export names to narrow.
84
+ *
85
+ * # Errors
86
+ * Returns a JS error when the scan fails or serialization fails.
87
+ */
88
+ designSystemImportSelections(packages: any): any;
89
+ /**
90
+ * The manifest wire-format version this binding reads/writes.
91
+ */
92
+ designSystemManifestSchemaVersion(): number;
68
93
  /**
69
94
  * Config validation diagnostics from construction.
70
95
  *
@@ -105,23 +130,14 @@ export class WasmCompiler {
105
130
  static fromConfig(fs: WasmFileSystem, config: any, options: any): WasmCompiler;
106
131
  /**
107
132
  * Generate artifacts affected by the provided config dependency names.
108
- *
109
- * # Errors
110
- * Returns a JS error if dependencies/options are invalid or serializing fails.
111
133
  */
112
134
  generateAffectedArtifacts(dependencies: any, options: any): any;
113
135
  /**
114
136
  * Generate one codegen artifact by id.
115
- *
116
- * # Errors
117
- * Returns a JS error if the id/options are invalid or serializing fails.
118
137
  */
119
138
  generateArtifact(id: string, options: any): any;
120
139
  /**
121
140
  * Generate every codegen artifact from the resolved project state.
122
- *
123
- * # Errors
124
- * Returns a JS error if options are invalid or serializing fails.
125
141
  */
126
142
  generateArtifacts(options: any): any;
127
143
  /**
@@ -131,6 +147,23 @@ export class WasmCompiler {
131
147
  * Returns a JS error if serializing fails.
132
148
  */
133
149
  getFile(path: string): any;
150
+ /**
151
+ * Theme `@keyframes` CSS only (no token vars or other layers).
152
+ */
153
+ getKeyframeCss(options?: any | null): any;
154
+ /**
155
+ * CSS for the named cascade layers, concatenated in order. Sliced in Rust
156
+ * (byte offsets stay valid); unknown layer names are skipped.
157
+ */
158
+ getLayerCss(options: any): any;
159
+ /**
160
+ * Split the stylesheet into per-file outputs (one per layer + per recipe,
161
+ * plus `recipes.css` / `styles.css` index files) for `--splitting`.
162
+ *
163
+ * # Errors
164
+ * Returns a JS error if serializing fails.
165
+ */
166
+ getSplitCss(options?: any | null): any;
134
167
  /**
135
168
  * Whether `css` declares Panda's cascade layers (`@layer reset, base, …;`),
136
169
  * marking it as the stylesheet root to inject the compiled CSS into.
@@ -154,11 +187,6 @@ export class WasmCompiler {
154
187
  */
155
188
  isSourceFile(path: string): boolean;
156
189
  joinPath(parts: any): string;
157
- /**
158
- * CSS for the named cascade layers, concatenated in order. Sliced in Rust
159
- * (byte offsets stay valid); unknown layer names are skipped.
160
- */
161
- layerCss(layers: string[]): string;
162
190
  /**
163
191
  * The resolved cascade-layer names (config overrides merged over defaults).
164
192
  *
@@ -182,8 +210,8 @@ export class WasmCompiler {
182
210
  */
183
211
  parseFileSource(path: string, source: string): any;
184
212
  /**
185
- * Read + parse source paths returned from `scan()`. Returns one report per
186
- * successfully parsed path.
213
+ * Read + parse source paths from `scan()`. One report per requested path;
214
+ * a read miss keeps last-good state and reports a warning diagnostic.
187
215
  *
188
216
  * # Errors
189
217
  * Returns a JS error when `paths` is malformed or serializing the report fails.
@@ -212,18 +240,15 @@ export class WasmCompiler {
212
240
  */
213
241
  refreshFileSource(path: string, source: string): boolean;
214
242
  /**
215
- * Register a JS-backed pattern transform callback. The wrapper package
216
- * installs callbacks referenced by the serialized config snapshot.
243
+ * Register a JS-backed pattern transform callback.
217
244
  */
218
245
  registerPatternTransform(id: string, callback: Function): void;
219
246
  /**
220
- * Register a JS-backed `parser:before` source transform with a Rust-side
221
- * filter. The filter is evaluated before calling into JS.
247
+ * Register a JS-backed `parser:before` source transform.
222
248
  */
223
249
  registerSourceTransform(id: string, filter: any, callback: Function): void;
224
250
  /**
225
- * Register a JS-backed utility transform callback. The JS package wraps
226
- * the user callback so Rust only has to pass the raw value.
251
+ * Register a JS-backed utility transform callback.
227
252
  */
228
253
  registerUtilityTransform(id: string, callback: Function): void;
229
254
  /**
@@ -255,7 +280,7 @@ export class WasmCompiler {
255
280
  * # Errors
256
281
  * Returns a JS error if serializing the build info fails.
257
282
  */
258
- serializeBuildInfo(panda: string): any;
283
+ serializeBuildInfo(panda: string, dependencies: any): any;
259
284
  /**
260
285
  * Every `sva()` slot-recipe entry.
261
286
  *
@@ -278,20 +303,30 @@ export class WasmCompiler {
278
303
  */
279
304
  spec(): any;
280
305
  /**
281
- * Split the stylesheet into per-file outputs (one per layer + per recipe,
282
- * plus `recipes.css` / `styles.css` index files) for `--splitting`.
306
+ * `staticCss.patterns` expansion as raw atoms, without compiling.
283
307
  *
284
308
  * # Errors
285
309
  * Returns a JS error if serializing fails.
286
310
  */
287
- splitCss(): any;
311
+ staticPatternAtoms(): any;
312
+ /**
313
+ * Remove Panda `@layer a, b;` order statements; leave unrelated ones.
314
+ */
315
+ stripLayerOrderStatements(css: string): string;
288
316
  /**
289
- * `staticCss.patterns` expansion as raw atoms, without compiling.
317
+ * Semantic tokens that carry the same value as a token path.
290
318
  *
291
319
  * # Errors
292
- * Returns a JS error if serializing fails.
320
+ * Returns a JS error if serialization fails.
293
321
  */
294
- staticPatternAtoms(): any;
322
+ suggestSemanticTokens(path: string): any;
323
+ /**
324
+ * Tokens that carry a hardcoded value, ranked (safe equivalents first).
325
+ *
326
+ * # Errors
327
+ * Returns a JS error if serialization fails.
328
+ */
329
+ suggestTokens(prop: string, value: string): any;
295
330
  /**
296
331
  * Aggregate counts.
297
332
  *
@@ -302,16 +337,13 @@ export class WasmCompiler {
302
337
  /**
303
338
  * Rust-built token dictionary projected into the small JS interop shape.
304
339
  */
305
- token_dictionary(): any;
340
+ tokenDictionary(): any;
306
341
  /**
307
- * Generate artifacts and write them under `outdir` via the in-memory fs.
308
- * Returns the written paths.
309
- *
310
- * # Errors
311
- * Returns a JS error if a file fails to write or results fail to serialize.
342
+ * Generate artifacts and write them under `outdir`.
312
343
  */
313
344
  writeArtifacts(options: any): any;
314
345
  writeCss(options: any): any;
346
+ writeLayerCss(options: any): any;
315
347
  writeSplitCss(options: any): any;
316
348
  }
317
349