import { DesignSystemManifest, CodegenOverlay, Diagnostic, SerializedConfig, ProjectCallbacks, ProjectHooks, ConfigSnapshot, DiffConfigResult, DesignSystemManifestImportMap } from '@pandacss/compiler-shared'; export { DiffConfigResult } from '@pandacss/compiler-shared'; import { HookRegistry, Config, UserConfig } from '@pandacss/types'; import { C as ConfigSources } from './merge-EXcM0jFd.js'; export { a as ConfigSourceEntry, m as mergeConfigs } from './merge-EXcM0jFd.js'; export { ConfigSnapshot, createConfigSnapshot } from './serialize.js'; interface PluginHookEntry { pluginIndex: number; name: string | undefined; value: HookRegistry[Name]; } type HostHooks = { 'codegen:prepare'?: Array>; 'codegen:done'?: Array>; 'cssgen:done'?: Array>; }; interface DesignSystemOverlayInput { authored: { conditions: boolean; breakpoints: boolean; utilities: boolean; tokens: boolean; }; compatible: boolean; } interface ResolvedDesignSystem { name: string; specifier: string; manifest: DesignSystemManifest; manifestPath: string; buildInfoPath: string; files: string[]; tokenPaths: string[]; recipeNames: string[]; patternNames: string[]; importMap?: DesignSystemManifest['importMap']; packageExports?: Record; optionMismatch?: string[]; } interface DesignSystemMetadata { designSystem?: ResolvedDesignSystem[]; userRecipeNames?: string[]; userPatternNames?: string[]; overlayInput?: DesignSystemOverlayInput; } declare function buildCodegenOverlay(metadata: DesignSystemMetadata | undefined): CodegenOverlay | undefined; interface DesignSystemArtifactConflict { name: string; recipes: string[]; patterns: string[]; } declare function collectArtifactConflicts(metadata: DesignSystemMetadata | undefined): DesignSystemArtifactConflict[]; declare function collectExportMissingDiagnostics(metadata: DesignSystemMetadata | undefined, jsxFramework?: string): Diagnostic[]; declare function collectNameCollisionDiagnostics(metadata: DesignSystemMetadata | undefined): Diagnostic[]; interface LoadConfigOptions { cwd: string; /** Explicit config file path (relative to `cwd`); otherwise discovered upward. */ file?: string; /** Track which authored config or preset contributed resolved config entries. */ trackSources?: boolean; } interface LoadConfigResult { /** Absolute path to the resolved config file. */ path: string; /** JSON-safe, callback-lowered config; patterns carry `codegenSource`. */ config: SerializedConfig; /** Live utility/pattern transform callbacks, paired with `config`. */ callbacks: ProjectCallbacks; /** JSON-safe hot-path hook metadata paired with live callbacks. */ hooks?: ProjectHooks; /** Live JS host hooks that do not cross into Rust. */ hostHooks?: HostHooks; /** Module ids the config depends on, for watch-mode invalidation. */ dependencies: string[]; metadata?: { sources?: ConfigSources; designSystem?: ResolvedDesignSystem[]; userTokenPaths?: string[]; userRecipeNames?: string[]; userPatternNames?: string[]; overlayInput?: DesignSystemOverlayInput; }; } /** * Load and serialize a user's Panda config into a compiler-ready snapshot. * Bundles in memory (Rolldown + `data:` URL), then lowers functions to callback * refs and captures pattern transform source. The result feeds * `createCompilerFromSnapshot({ config, callbacks })`. * * Authored presets are resolved before defaults are applied; live hooks remain * in the JS host and only parser:before metadata crosses into Rust. */ declare function loadConfig(options: LoadConfigOptions): Promise; /** * Structurally diff two serialized configs and map each change to the coarse * `CodegenDependency` bits the Rust engine regenerates by. Ported from v1's * `diffConfigs` (`packages/config/src/diff-config.ts`), but targeting the * engine's `generateAffectedArtifacts(CodegenDependency[])` seam rather than v1's * per-file `ArtifactId` set. * * Callback refs carry a source hash, and hook filters are serialized data in * the optional `hooks` snapshot, so callback and filter edits remain visible to * this structural diff. */ declare function diffConfig(prev: SerializedConfig | ConfigSnapshot | undefined, next: SerializedConfig | ConfigSnapshot): DiffConfigResult; /** Locate the user's `panda.config.{ts,js,…}`, walking up from `cwd`. */ declare function findConfig(options: { cwd: string; file?: string; }): string; interface BundleConfigResult { config: T; dependencies: string[]; } /** * Bundle a config (or preset) module in memory with Rolldown and evaluate it via * a `data:` URL — no temp file is written. Mirrors the legacy in-memory loader * without re-adding `bundle-n-require`. */ declare function bundleConfig(filepath: string, cwd: string): Promise>; declare function readPandaVersion(): string | undefined; declare function getPandaMajorRange(): string | undefined; declare function isStampablePandaRange(range: string | undefined): range is string; interface CompilePresetResult { code: string; dependencies: string[]; } interface CompilePresetOptions { configPath: string; cwd: string; } declare function compilePreset(options: CompilePresetOptions): Promise; interface PackageIdentity { name: string; version?: string; pandaPeer?: string; packagePath: string; /** package.json `"files"` when it's a string array; used for lib fallback publish checks. */ publishFiles?: string[]; } declare function resolvePublishedPandaRange(range: string | undefined, currentVersion: string | undefined): string; declare function readPackageIdentity(cwd: string): PackageIdentity; declare function defaultImportMap(name: string): DesignSystemManifestImportMap; interface SyncExportsResult { changed: boolean; json: string; /** Existing subpaths whose value differed from the one Panda wrote (overwritten). */ conflicts: string[]; } interface SyncExportsOptions { packageJson: string; entries: Record; } declare function syncExports(options: SyncExportsOptions): SyncExportsResult; interface FilterPublishableLibFilesOptions { /** Fallback paths relative to the lib outdir (same form as manifest `files`). */ files: string[]; packageRoot: string; /** Lib outdir — resolve `files` entries from here. */ outRoot: string; /** package.json `"files"`; omit when the whole package is packed. */ publishFiles?: string[]; } interface FilterPublishableLibFilesResult { files: string[]; unpublished: string[]; } /** * Drop inferred lib fallback paths that would not ship in the npm tarball when * package.json `"files"` is set. Explicit `--files` should skip this filter. * * Runs once at `panda lib` time (not on consume/cssgen). Patterns are compiled * once per call; the common `"files": ["dist"]` case is prefix-only. */ declare function filterPublishableLibFiles(options: FilterPublishableLibFilesOptions): FilterPublishableLibFilesResult; /** Read package.json `"files"` when it is a non-empty string array. */ declare function readPublishFilesField(value: unknown): string[] | undefined; interface SmartIncludeResult { include: string[]; excludes: string[]; changed: boolean; } declare function resolveSmartInclude(include: string[], cwd: string, deps: Set): SmartIncludeResult; declare function mergeExcludes(existing: string[] | undefined, additions: string[]): string[]; declare function collectTokenPaths(config: Pick | undefined): string[]; declare function toPosixPath(path: string): string; declare function toPosixRelative(from: string, to: string): string; declare function toRelativeKey(key: string, cwd: string): string; declare function collectRecipeNames(config: Pick | undefined): string[]; declare function collectPatternNames(config: Pick | undefined): string[]; export { type BundleConfigResult, type CompilePresetOptions, type CompilePresetResult, ConfigSources, type DesignSystemArtifactConflict, type DesignSystemMetadata, type DesignSystemOverlayInput, type FilterPublishableLibFilesOptions, type FilterPublishableLibFilesResult, type HostHooks, type LoadConfigOptions, type LoadConfigResult, type PackageIdentity, type ResolvedDesignSystem, type SyncExportsOptions, type SyncExportsResult, buildCodegenOverlay, bundleConfig, collectArtifactConflicts, collectExportMissingDiagnostics, collectNameCollisionDiagnostics, collectPatternNames, collectRecipeNames, collectTokenPaths, compilePreset, defaultImportMap, diffConfig, filterPublishableLibFiles, findConfig, getPandaMajorRange, isStampablePandaRange, loadConfig, mergeExcludes, readPackageIdentity, readPandaVersion, readPublishFilesField, resolvePublishedPandaRange, resolveSmartInclude, syncExports, toPosixPath, toPosixRelative, toRelativeKey };