@pandacss/compiler-wasm32-wasi 2.0.0-beta.8 → 2.0.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.
@@ -0,0 +1,800 @@
1
+ /* auto-generated by NAPI-RS */
2
+ /* eslint-disable */
3
+ export declare class Compiler {
4
+ /**
5
+ * Low-level build-info primitive — serialize the project's encoded atoms
6
+ * (string-interned, per-module provenance). The public surface is the
7
+ * `buildInfo.create` namespace in JS; `configFingerprint` is engine-owned.
8
+ *
9
+ * # Errors
10
+ * Returns an error if the build info fails to serialize.
11
+ */
12
+ serializeBuildInfo(panda: string, dependencies?: Array<BuildInfoDesignSystemDependency> | undefined | null): any
13
+ /**
14
+ * Low-level build-info primitive — hydrate a deserialized build info into
15
+ * this project (additive), optionally restricted to imported modules
16
+ * (tree-shaking). Returns `false` on schema-version mismatch. The public
17
+ * surface (with validation) is the `buildInfo.hydrate` namespace in JS.
18
+ *
19
+ * # Errors
20
+ * Returns an error if `buildInfo` isn't a valid build-info document.
21
+ */
22
+ applyBuildInfo(name: string, buildInfo: any, onlyModules?: Array<string> | undefined | null): boolean
23
+ /**
24
+ * The build-info wire-format version this binding reads/writes. The JS
25
+ * `buildInfo.validate` compares an artifact's `schemaVersion` against it.
26
+ */
27
+ buildInfoSchemaVersion(): number
28
+ /** Generate artifacts and write them under `outdir`. */
29
+ writeArtifacts(options: WriteArtifactsOptions): Array<string>
30
+ generateArtifacts(options?: GenerateArtifactOptions | undefined | null): Array<CodegenArtifact>
31
+ generateArtifact(id: string, options?: GenerateArtifactOptions | undefined | null): CodegenArtifact | null
32
+ generateAffectedArtifacts(dependencies: Array<string>, options?: GenerateArtifactOptions | undefined | null): Array<CodegenArtifact>
33
+ /**
34
+ * Return the serialized config snapshot this project was constructed
35
+ * with.
36
+ */
37
+ config(): any
38
+ /**
39
+ * The resolved cascade-layer names (config overrides merged over defaults).
40
+ * The host needs these to recognize the user's `@layer …;` directive
41
+ * without re-deriving the Rust defaults.
42
+ */
43
+ layers(): LayerNames
44
+ /**
45
+ * Whether `css` declares Panda's cascade layers (`@layer reset, base, …;`),
46
+ * marking it as the stylesheet root to inject the compiled CSS into.
47
+ */
48
+ hasLayerDeclaration(css: string): boolean
49
+ /** Remove Panda `@layer a, b;` order statements; leave unrelated ones. */
50
+ stripLayerOrderStatements(css: string): string
51
+ /**
52
+ * Tooling introspection snapshot (read once, index on the host).
53
+ *
54
+ * # Errors
55
+ * Returns an error if the snapshot fails to serialize.
56
+ */
57
+ spec(): any
58
+ /**
59
+ * Engine-owned fingerprint of the resolved config's output-affecting fields.
60
+ * Stamped into build info as `configFingerprint`; also exposed so a consumer
61
+ * host can compare its own config against a library's artifact.
62
+ */
63
+ configFingerprint(): string
64
+ /** Rust-built token dictionary projected into the small JS interop shape. */
65
+ tokenDictionary(): TokenDictionary | null
66
+ compile(options?: CompileOptions | undefined | null): CompileOutput
67
+ writeCss(options: WriteCssOptions): WriteCssResult
68
+ writeSplitCss(options: WriteSplitCssOptions): WriteSplitCssResult
69
+ /** Theme `@keyframes` CSS only (no token vars or other layers). */
70
+ getKeyframeCss(options?: CompileOptions | undefined | null): CompileOutput
71
+ /**
72
+ * CSS for the named cascade layers, concatenated in order. Sliced in Rust
73
+ * (byte offsets stay valid); unknown layer names are skipped.
74
+ */
75
+ getLayerCss(options: LayerCssOptions): CompileOutput
76
+ writeLayerCss(options: WriteLayerCssOptions): WriteCssResult
77
+ /**
78
+ * Split the stylesheet into per-file outputs (one per layer + per recipe,
79
+ * plus `recipes.css` / `styles.css` index files) for `--splitting`.
80
+ */
81
+ getSplitCss(options?: CssOutputOptions | undefined | null): SplitCssResult
82
+ /**
83
+ * Build a `panda/lib.json` value from host-supplied fields, stamping the
84
+ * engine-owned schema version. Backs the `designSystem.create` JS namespace.
85
+ *
86
+ * # Errors
87
+ * Returns an error if `input` is invalid or the manifest fails to serialize.
88
+ */
89
+ createDesignSystemManifest(input: any): any
90
+ /**
91
+ * The manifest wire-format version this binding reads/writes. The JS
92
+ * `designSystem.validate` compares a manifest's `schemaVersion` against it.
93
+ */
94
+ designSystemManifestSchemaVersion(): number
95
+ /** Read a source file from the native filesystem and parse it. */
96
+ parseFile(path: string): ParseFileReport
97
+ /**
98
+ * Extract + encode provided source text. Re-parsing a path replaces its
99
+ * prior contribution (atoms, recipes, diagnostics) — safe for watch mode.
100
+ */
101
+ parseFileSource(path: string, source: string): ParseFileReport
102
+ /**
103
+ * Source paths matching the config's `include`/`exclude` (overridable via
104
+ * `options`), via the platform filesystem engine. Useful for file
105
+ * discovery and the host's watch dependency list.
106
+ *
107
+ * # Errors
108
+ * Returns an error when the scan fails (e.g. a non-existent `cwd`).
109
+ */
110
+ scan(options?: ScanOptions | undefined | null): Array<string>
111
+ /**
112
+ * Per-package import selections from one scan of `include` sources.
113
+ * Each entry is `null` = hydrate all, or export names to narrow.
114
+ *
115
+ * # Errors
116
+ * Returns an error when the scan fails (e.g. a non-existent `cwd`).
117
+ */
118
+ designSystemImportSelections(packages: Array<DesignSystemImportPackageQuery>): Array<Array<string> | undefined | null>
119
+ /**
120
+ * Resolve a path to its real on-disk location (absolute, symlinks followed) so
121
+ * two paths to the same file compare equal. Lenient: returns the input path when
122
+ * it can't be resolved (e.g. it was just deleted), so callers can still match it.
123
+ */
124
+ realpath(path: string): string
125
+ readFile(path: string): string | null
126
+ exists(path: string): boolean
127
+ /**
128
+ * Whether `path` is a source file the project extracts from — its
129
+ * `cwd`-relative form matches the configured `include`/`exclude` globs.
130
+ * For routing a watch event to `applyChange` vs ignoring it.
131
+ */
132
+ isSourceFile(path: string): boolean
133
+ /**
134
+ * Read + parse source paths from `scan()`. One report per requested path;
135
+ * a read miss keeps last-good state and reports a warning diagnostic.
136
+ */
137
+ parseFiles(paths: Array<string>): Array<ParseFileReport>
138
+ /**
139
+ * Stateless single-file extraction — raw `calls` + `jsx` + diagnostics,
140
+ * using the project's configured matchers + token dictionary. Unlike
141
+ * `parseFile`, it registers nothing; it's the read-only peek companion.
142
+ */
143
+ extractFileSource(path: string, source: string): ExtractResult
144
+ /**
145
+ * Re-parse a path *only if* it is already known to the project.
146
+ * Returns `true` if the path was present and got re-parsed; `false`
147
+ * if the path is unknown (no-op). Watch-mode contract.
148
+ */
149
+ refreshFile(path: string): boolean
150
+ /** Re-parse provided source text only if the path is already known. */
151
+ refreshFileSource(path: string, source: string): boolean
152
+ /** Drop a file's contribution. Returns `true` if the path was known. */
153
+ removeFile(path: string): boolean
154
+ /**
155
+ * Files whose folded imports changed since the last call. Clears on read.
156
+ * Re-parse each via `refreshFile`, then call again until empty.
157
+ */
158
+ affectedFiles(): Array<string>
159
+ /**
160
+ * Drop every path's state. Keeps the config-derived extractor,
161
+ * token dictionary, and cross-file resolver intact.
162
+ */
163
+ clear(): void
164
+ /** Returns `true` when the project has no files and no accumulated output. */
165
+ isEmpty(): boolean
166
+ /**
167
+ * `(path, hex source_hash)` for every known file, sorted by path.
168
+ * The hash matches the one the re-parse short-circuit uses.
169
+ */
170
+ fileManifest(): Array<CompileFileManifest>
171
+ /** Per-file view; returns `null` when `path` isn't known. */
172
+ getFile(path: string): ParsedFileView | null
173
+ resolvePath(path: string, cwd?: string | undefined | null): string
174
+ joinPath(parts: Array<string>): string
175
+ dirname(path: string): string
176
+ /**
177
+ * Stateless source inspection for tooling (reporting, lint, IDE). Returns
178
+ * classified Panda usage sites plus file-local extraction diagnostics.
179
+ *
180
+ * # Errors
181
+ * Returns an error if the result fails to serialize.
182
+ */
183
+ inspectFileSource(path: string, source: string): any
184
+ /**
185
+ * Resolve selector and CSS metadata for one utility value.
186
+ *
187
+ * # Errors
188
+ * Returns an error if the value cannot be represented by the extractor
189
+ * literal model.
190
+ */
191
+ resolveUtilityValue(input: ResolveUtilityValueInput): ResolvedUtilityValue | null
192
+ /**
193
+ * Tokens that carry a hardcoded value, ranked (safe equivalents first).
194
+ * Empty when nothing matches. The rule lists these for the developer.
195
+ */
196
+ suggestTokens(prop: string, value: string): any
197
+ /** Semantic tokens that carry the same value as a token path. */
198
+ suggestSemanticTokens(path: string): any
199
+ /**
200
+ * Source globs + their static base dirs for the host watcher. `pattern` is
201
+ * relative to `base`, so `(base, pattern)` is a ready-to-use `(dir, glob)` pair.
202
+ */
203
+ sources(): Array<SourceEntry>
204
+ /**
205
+ * Config validation diagnostics from construction. Per-file and
206
+ * compile diagnostics live on [`ParseFileReport`] / [`CompileOutput`].
207
+ */
208
+ diagnostics(): Array<Diagnostic>
209
+ /** Aggregate counts. */
210
+ summary(): ProjectSummary
211
+ /**
212
+ * Deduplicated atoms across every currently-known file. Sorted by
213
+ * `(prop, conditions, value)` for stable iteration / snapshot tests.
214
+ */
215
+ atoms(): Array<Atom>
216
+ /** Every `cva()` recipe entry, in `(file, span_start)` order. */
217
+ recipes(): Array<RecipeEntry>
218
+ /** Every `sva()` slot recipe entry, in `(file, span_start)` order. */
219
+ slotRecipes(): Array<RecipeEntry>
220
+ /** Encoded config recipe styles, separate from atomic utility atoms. */
221
+ encodedRecipes(): any
222
+ /**
223
+ * `staticCss.patterns` expansion as raw atoms, without compiling.
224
+ * Routes through the same callback host as `parseFile`.
225
+ */
226
+ staticPatternAtoms(): StaticPatternResult
227
+ /** Rewrite one source file to inline static Panda class strings where safe. */
228
+ transformSource(input: TransformSourceInput): TransformSourceResult
229
+ /** Register a JS-backed utility transform callback. */
230
+ registerUtilityTransform(id: string, callback: UtilityTransformRef): void
231
+ /** Register a JS-backed pattern transform callback. */
232
+ registerPatternTransform(id: string, callback: (arg0: any) => any): void
233
+ /** Register a JS-backed `parser:before` source transform. */
234
+ registerSourceTransform(id: string, filter: any | undefined | null, callback: SourceTransformRef): void
235
+ /** Construct a compiler from the resolved, JSON-safe Panda config snapshot. */
236
+ static fromConfig(config: any, options?: ProjectOptions | undefined | null, utilityValuesCallbacks?: UtilityValueCallbacks | undefined | null): Compiler
237
+ }
238
+
239
+ /**
240
+ * ```js
241
+ * const extractor = new Extractor(matchers)
242
+ * for (const file of files) {
243
+ * const result = extractor.extract(file.path, file.source)
244
+ * }
245
+ * ```
246
+ */
247
+ export declare class Extractor {
248
+ /**
249
+ * Token dictionary (if any) is materialized once so each subsequent
250
+ * `extract` call is a lean parse + visit.
251
+ */
252
+ constructor(matchers: Matchers)
253
+ extract(path: string, source: string): ExtractResult
254
+ extractDebug(path: string, source: string): ExtractDebugResult
255
+ /**
256
+ * Run the matched-imports filter without re-parsing. Uses the
257
+ * session's `Matchers` config.
258
+ */
259
+ matchImports(scan: ImportScanResult): Array<MatchedImport>
260
+ }
261
+
262
+ /**
263
+ * One atomic style declaration: `(prop, value, conditions)`. Returned by
264
+ * `Compiler::atoms()`. Mirrors `pandacss_encoder::Atom` but with the
265
+ * internal `Box<str>` Number form parsed back to a JS-native number.
266
+ */
267
+ export interface Atom {
268
+ prop: string
269
+ /** `string | number | boolean | null`. */
270
+ value: any
271
+ /** Outer-to-inner condition chain. Empty for unconditional atoms. */
272
+ conditions: Array<string>
273
+ }
274
+
275
+ /** Package matching data used while recording design-system dependency imports. */
276
+ export interface BuildInfoDesignSystemDependency {
277
+ /** Published package name stored in build info. */
278
+ name: string
279
+ /** Import specifiers that resolve to this dependency. */
280
+ packageRoots: Array<string>
281
+ /** Non-component subpaths ignored by dependency tracking. */
282
+ excludeModules?: Array<string>
283
+ }
284
+
285
+ export interface CodegenArtifact {
286
+ id: string
287
+ files: Array<CodegenFile>
288
+ }
289
+
290
+ export interface CodegenFile {
291
+ path: string
292
+ code: string
293
+ dependencies: Array<string>
294
+ }
295
+
296
+ export interface CodegenOverlay {
297
+ jsx: string
298
+ recipes: string
299
+ patterns: string
300
+ css: string
301
+ helpers: string
302
+ ownedRecipes: Array<string>
303
+ ownedPatterns: Array<string>
304
+ virtualizeHelpers: boolean
305
+ virtualizeCss: boolean
306
+ }
307
+
308
+ /**
309
+ * One-shot stateless compile. Callback-bearing configs are not
310
+ * supported — use `Compiler.fromConfig(...)` + `registerPatternTransform`
311
+ * / `registerUtilityTransform` for that.
312
+ */
313
+ export declare function compile(input?: CompileInput | undefined | null): CompileOutput
314
+
315
+ export interface CompileFileManifest {
316
+ path: string
317
+ hash: string
318
+ }
319
+
320
+ export interface CompileInput {
321
+ files?: Array<InputFile>
322
+ config?: any
323
+ cwd?: string
324
+ cacheDir?: string
325
+ emitLayerDeclaration?: boolean
326
+ }
327
+
328
+ export interface CompileLayerRange {
329
+ start: number
330
+ end: number
331
+ }
332
+
333
+ /**
334
+ * Byte slices into `CompileOutput.css` so callers can pull a single
335
+ * layer without re-parsing. `None` when the layer wasn't emitted.
336
+ */
337
+ export interface CompileLayerRanges {
338
+ reset?: CompileLayerRange
339
+ base?: CompileLayerRange
340
+ tokens?: CompileLayerRange
341
+ recipes?: CompileLayerRange
342
+ utilities?: CompileLayerRange
343
+ }
344
+
345
+ export interface CompileManifest {
346
+ files: Array<CompileFileManifest>
347
+ tokens: Array<string>
348
+ }
349
+
350
+ export interface CompileOptions {
351
+ emitLayerDeclaration?: boolean
352
+ minify?: boolean
353
+ polyfill?: boolean
354
+ }
355
+
356
+ export interface CompileOutput {
357
+ css: string
358
+ sourceMap?: string
359
+ manifest: CompileManifest
360
+ layerRanges: CompileLayerRanges
361
+ diagnostics: Array<Diagnostic>
362
+ }
363
+
364
+ export interface CssOutputOptions {
365
+ layers?: Array<string>
366
+ emitLayerDeclaration?: boolean
367
+ minify?: boolean
368
+ polyfill?: boolean
369
+ }
370
+
371
+ export interface DesignSystemImportPackageQuery {
372
+ packageRoots: Array<string>
373
+ excludeModules?: Array<string>
374
+ }
375
+
376
+ export interface Diagnostic {
377
+ code: string
378
+ message: string
379
+ severity: DiagnosticSeverity
380
+ file?: string
381
+ category?: string
382
+ /** UTF-8 byte offsets. */
383
+ span?: Span
384
+ /** Human-readable line/column range covering `span`. */
385
+ location?: SourceRange
386
+ labels?: Array<DiagnosticLabel>
387
+ help?: Array<string>
388
+ }
389
+
390
+ export interface DiagnosticLabel {
391
+ message?: string
392
+ /** UTF-8 byte offsets. */
393
+ span?: Span
394
+ /** Human-readable line/column range covering `span`. */
395
+ location?: SourceRange
396
+ }
397
+
398
+ export declare const enum DiagnosticSeverity {
399
+ Info = 'info',
400
+ Warning = 'warning',
401
+ Error = 'error'
402
+ }
403
+
404
+ export declare function extract(path: string, source: string, matchers: Matchers): ExtractResult
405
+
406
+ export declare function extractCalls(path: string, source: string, matched: Array<MatchedImport>, matchers: Matchers): ExtractedCallsResult
407
+
408
+ export declare function extractDebug(path: string, source: string, matchers: Matchers): ExtractDebugResult
409
+
410
+ /**
411
+ * Kitchen-sink result with raw `imports` and Panda-filtered `matched`,
412
+ * for tooling and parity-compare flows.
413
+ */
414
+ export interface ExtractDebugResult {
415
+ imports: Array<ImportRecord>
416
+ matched: Array<MatchedImport>
417
+ calls: Array<ExtractedCall>
418
+ jsx: Array<ExtractedJsx>
419
+ diagnostics: Array<Diagnostic>
420
+ }
421
+
422
+ export interface ExtractedArg {
423
+ kind: ExtractedArgKind
424
+ value?: any
425
+ }
426
+
427
+ /**
428
+ * Tagged so a real `null` literal (`{ kind: "value", value: null }`) is
429
+ * distinguishable from a non-foldable argument (`{ kind: "missing",
430
+ * value: undefined }`). The previous `Array<unknown | null>` shape
431
+ * collapsed those two cases.
432
+ */
433
+ export declare const enum ExtractedArgKind {
434
+ Value = 'value',
435
+ Missing = 'missing'
436
+ }
437
+
438
+ export interface ExtractedCall {
439
+ category: MatchCategory
440
+ name: string
441
+ alias: string
442
+ /**
443
+ * Per-argument values in source order; `data.length` matches the
444
+ * source arity. Each entry is tagged so a real `null` literal stays
445
+ * distinct from a non-foldable argument — see [`ExtractedArg`].
446
+ */
447
+ data: Array<ExtractedArg>
448
+ span: Span
449
+ }
450
+
451
+ export interface ExtractedCallsResult {
452
+ calls: Array<ExtractedCall>
453
+ diagnostics: Array<Diagnostic>
454
+ }
455
+
456
+ export interface ExtractedJsx {
457
+ category: MatchCategory
458
+ kind: JsxKind
459
+ name: string
460
+ alias: string
461
+ data: any
462
+ span: Span
463
+ }
464
+
465
+ export interface ExtractedJsxResult {
466
+ jsx: Array<ExtractedJsx>
467
+ diagnostics: Array<Diagnostic>
468
+ }
469
+
470
+ export declare function extractJsx(path: string, source: string, matched: Array<MatchedImport>, matchers: Matchers): ExtractedJsxResult
471
+
472
+ /**
473
+ * Lean result for the production hot path — `imports` and `matched` are
474
+ * stripped so callers don't pay NAPI serialization cost for debug data.
475
+ */
476
+ export interface ExtractResult {
477
+ calls: Array<ExtractedCall>
478
+ jsx: Array<ExtractedJsx>
479
+ diagnostics: Array<Diagnostic>
480
+ }
481
+
482
+ export declare function flushTracing(): void
483
+
484
+ export interface GenerateArtifactOptions {
485
+ forceImportExtension?: boolean
486
+ overlay?: CodegenOverlay
487
+ }
488
+
489
+ export declare const enum ImportKind {
490
+ SideEffect = 'sideEffect',
491
+ Value = 'value'
492
+ }
493
+
494
+ export interface ImportRecord {
495
+ module: string
496
+ kind: ImportKind
497
+ typeOnly: boolean
498
+ specifiers: Array<ImportSpecifier>
499
+ span: Span
500
+ }
501
+
502
+ export interface ImportScanResult {
503
+ imports: Array<ImportRecord>
504
+ diagnostics: Array<Diagnostic>
505
+ }
506
+
507
+ export interface ImportSpecifier {
508
+ kind: ImportSpecifierKind
509
+ imported: string
510
+ local: string
511
+ typeOnly: boolean
512
+ span: Span
513
+ }
514
+
515
+ export declare const enum ImportSpecifierKind {
516
+ Named = 'named',
517
+ Default = 'default',
518
+ Namespace = 'namespace'
519
+ }
520
+
521
+ export interface InputFile {
522
+ path: string
523
+ content: string
524
+ }
525
+
526
+ export declare const enum JsxKind {
527
+ Factory = 'factory',
528
+ Pattern = 'pattern',
529
+ Recipe = 'recipe',
530
+ Component = 'component'
531
+ }
532
+
533
+ export interface LayerCssOptions {
534
+ layers: Array<string>
535
+ emitLayerDeclaration?: boolean
536
+ minify?: boolean
537
+ polyfill?: boolean
538
+ }
539
+
540
+ /** The resolved cascade-layer names (config overrides + defaults applied). */
541
+ export interface LayerNames {
542
+ reset: string
543
+ base: string
544
+ tokens: string
545
+ recipes: string
546
+ utilities: string
547
+ }
548
+
549
+ export declare const enum MatchCategory {
550
+ Css = 'css',
551
+ Recipe = 'recipe',
552
+ Pattern = 'pattern',
553
+ Jsx = 'jsx',
554
+ Tokens = 'tokens'
555
+ }
556
+
557
+ export interface MatchedImport {
558
+ category: MatchCategory
559
+ module: string
560
+ name: string
561
+ alias: string
562
+ kind: ImportSpecifierKind
563
+ }
564
+
565
+ export interface Matcher {
566
+ modules: Array<string>
567
+ /** Omit to match any imported name (used for recipes/patterns). */
568
+ names?: Array<string>
569
+ }
570
+
571
+ export interface Matchers {
572
+ css: Matcher
573
+ recipe: Matcher
574
+ pattern: Matcher
575
+ jsx?: Matcher
576
+ tokens: Matcher
577
+ jsxFramework?: string
578
+ /**
579
+ * When present, `token('path')` / `token.var('path')` fold during
580
+ * extraction. Pass parallel JS maps: `values[path]` → raw value,
581
+ * `vars[path]` → CSS-var form. Omit to disable.
582
+ */
583
+ tokenDictionary?: TokenDictionary
584
+ /**
585
+ * Resolved JSX factory names accepting member-chain tags
586
+ * (`<styled.div>`). Config loaders should pass the default explicitly.
587
+ */
588
+ jsxFactories?: Array<string>
589
+ }
590
+
591
+ export declare function matchImports(scan: ImportScanResult, matchers: Matchers): Array<MatchedImport>
592
+
593
+ export interface ParsedFileView {
594
+ path: string
595
+ atoms: Array<Atom>
596
+ diagnostics: Array<Diagnostic>
597
+ recipes: Array<RecipeEntry>
598
+ slotRecipes: Array<RecipeEntry>
599
+ }
600
+
601
+ /** Per-call telemetry from `parseFile`. Mirrors `pandacss_project::ParseFileReport`. */
602
+ export interface ParseFileReport {
603
+ /** Source path parsed for this report. */
604
+ path: string
605
+ cssCalls: number
606
+ cvaCalls: number
607
+ svaCalls: number
608
+ jsxUsages: number
609
+ diagnostics: Array<Diagnostic>
610
+ }
611
+
612
+ /** Optional project-construction inputs. */
613
+ export interface ProjectOptions {
614
+ /**
615
+ * When `true` (default), construct a `CrossFileResolver` over the
616
+ * native filesystem. Set to `false` to disable cross-file folding.
617
+ */
618
+ crossFile?: boolean
619
+ }
620
+
621
+ /** Aggregate counts across the project. Cheap; doesn't recompute anything. */
622
+ export interface ProjectSummary {
623
+ filesProcessed: number
624
+ atomCount: number
625
+ recipeCount: number
626
+ slotRecipeCount: number
627
+ }
628
+
629
+ /**
630
+ * One `(file, span_start, value)` entry for the recipe and slot-recipe
631
+ * iterators. `value` is the serialized recipe shape (matches
632
+ * `pandacss_recipes::Recipe` / `SlotRecipe`).
633
+ */
634
+ export interface RecipeEntry {
635
+ file: string
636
+ spanStart: number
637
+ recipe: any
638
+ }
639
+
640
+ export interface ResolvedUtilityValue {
641
+ utility: string
642
+ className: string
643
+ cssValue: any
644
+ important: boolean
645
+ source: any
646
+ }
647
+
648
+ export interface ResolveUtilityValueInput {
649
+ prop: string
650
+ value: any
651
+ }
652
+
653
+ export declare function scanImports(path: string, source: string): ImportScanResult
654
+
655
+ /**
656
+ * Glob overrides for `scan`. Omitted fields fall back to the
657
+ * config's `include`/`exclude`/`cwd`.
658
+ */
659
+ export interface ScanOptions {
660
+ include?: Array<string>
661
+ exclude?: Array<string>
662
+ cwd?: string
663
+ }
664
+
665
+ export declare function shutdownTracing(): boolean
666
+
667
+ /**
668
+ * A source glob paired with its static base directory. `base` is the dir a watcher
669
+ * subscribes to; `pattern` is the glob relative to `base`.
670
+ */
671
+ export interface SourceEntry {
672
+ base: string
673
+ pattern: string
674
+ }
675
+
676
+ /** 1-indexed line, 1-indexed UTF-16 column (matches `tsc`/IDE output). */
677
+ export interface SourceLocation {
678
+ line: number
679
+ column: number
680
+ }
681
+
682
+ export interface SourceRange {
683
+ start: SourceLocation
684
+ end: SourceLocation
685
+ }
686
+
687
+ export interface Span {
688
+ start: number
689
+ end: number
690
+ }
691
+
692
+ /** One file in a `--splitting` output set. Host writes `path -> code`. */
693
+ export interface SplitCssFile {
694
+ path: string
695
+ code: string
696
+ }
697
+
698
+ export interface SplitCssResult {
699
+ files: Array<SplitCssFile>
700
+ diagnostics: Array<Diagnostic>
701
+ }
702
+
703
+ export declare function startTracing(options?: TraceOptions | undefined | null): boolean
704
+
705
+ export interface StaticPatternResult {
706
+ atoms: Array<Atom>
707
+ diagnostics: Array<Diagnostic>
708
+ }
709
+
710
+ /** Renders `timings.json`. Call before `shutdownTracing`, which consumes the same data. */
711
+ export declare function takeTimingsJson(): string | null
712
+
713
+ export interface TokenDictionary {
714
+ values: Record<string, string>
715
+ vars: Record<string, string>
716
+ }
717
+
718
+ export interface TraceOptions {
719
+ filter?: string
720
+ output?: string
721
+ file?: string
722
+ }
723
+
724
+ export interface TransformSourceHelperFacts {
725
+ needsCx: boolean
726
+ needsAttachRecipe: boolean
727
+ needsMemoRecipe: boolean
728
+ }
729
+
730
+ export interface TransformSourceInput {
731
+ path: string
732
+ source: string
733
+ mode?: string
734
+ helperCx?: string
735
+ targetsCss?: boolean
736
+ targetsPatterns?: boolean
737
+ targetsRecipes?: boolean
738
+ targetsTokens?: boolean
739
+ targetsJsx?: boolean
740
+ }
741
+
742
+ export interface TransformSourceResult {
743
+ code: string
744
+ map?: string
745
+ changed: boolean
746
+ bailed: boolean
747
+ diagnostics: Array<Diagnostic>
748
+ dependencies: Array<string>
749
+ helper: TransformSourceHelperFacts
750
+ }
751
+
752
+ export interface WriteArtifactsOptions {
753
+ outdir: string
754
+ cwd?: string
755
+ forceImportExtension?: boolean
756
+ artifacts?: Array<CodegenArtifact>
757
+ overlay?: CodegenOverlay
758
+ }
759
+
760
+ export interface WriteCssOptions {
761
+ outfile: string
762
+ cwd?: string
763
+ emitLayerDeclaration?: boolean
764
+ minify?: boolean
765
+ polyfill?: boolean
766
+ }
767
+
768
+ export interface WriteCssResult {
769
+ path: string
770
+ css: string
771
+ sourceMap?: string
772
+ manifest: CompileManifest
773
+ layerRanges: CompileLayerRanges
774
+ diagnostics: Array<Diagnostic>
775
+ }
776
+
777
+ export interface WriteLayerCssOptions {
778
+ outfile: string
779
+ layers: Array<string>
780
+ cwd?: string
781
+ emitLayerDeclaration?: boolean
782
+ minify?: boolean
783
+ polyfill?: boolean
784
+ }
785
+
786
+ export interface WriteSplitCssOptions {
787
+ outdir?: string
788
+ cwd?: string
789
+ layers?: Array<string>
790
+ emitLayerDeclaration?: boolean
791
+ minify?: boolean
792
+ polyfill?: boolean
793
+ }
794
+
795
+ export interface WriteSplitCssResult {
796
+ root: string
797
+ paths: Array<string>
798
+ files: Array<SplitCssFile>
799
+ diagnostics: Array<Diagnostic>
800
+ }