import { Compiler, Diagnostic, FileInspectionResult, Spec, Deprecation } from '@pandacss/compiler-shared'; import { LoadConfigResult } from '@pandacss/config'; import { ImportMapOutput } from '@pandacss/types'; interface NativeCompiler extends Compiler { } interface ProjectKey { cwd: string; /** Explicit config file (relative to `cwd`); otherwise discovered upward. */ configPath?: string; } interface Project { compiler: NativeCompiler; configPath: string; dependencies: string[]; outdir: string; /** Non-fatal issues surfaced while hydrating a consumed design-system package. */ designSystemDiagnostics: Diagnostic[]; /** Treeshake import fingerprint (watch sync). */ designSystemTreeshakeKey?: string; } declare function createProjectFromLoadedConfig(loaded: LoadConfigResult): Project; declare function createProjectFromConfig(key: ProjectKey): Promise; interface FileInspectionCacheEntry { sourceKey: string; result: FileInspectionResult; } /** Caches `compiler.inspectFile()` results per `(compiler, path)`, invalidated by source content. */ declare class FileInspector { #private; inspect(compiler: Compiler, path: string, source: string): FileInspectionResult; clear(compiler?: Compiler): void; } declare function sourceCacheKey(source: string): string; interface ProjectRegistryOptions { createProject?: (key: ProjectKey) => Promise; } declare class ProjectRegistry { #private; constructor(options?: ProjectRegistryOptions); getProject(key: ProjectKey): Promise; invalidate(_changedPaths?: string[]): void; } declare class SpecIndex { #private; readonly spec: Spec; constructor(spec: Spec); resolveTokenValue(path: string): string | undefined; resolveTokenPaths(prefix?: string): string[]; resolveTokenDeprecation(path: string): Deprecation | undefined; hasCondition(name: string): boolean; /** Bare style-object keys: named/custom conditions plus breakpoints (`sm`, `md`, ...). */ resolveStyleObjectKeys(): string[]; resolveTokenCategoryForProperty(property: string): string | undefined; resolveLiteralsForProperty(property: string): string[] | undefined; resolveKeyframeNames(prefix?: string): string[]; /** Token category names actually present in this config (`colors`, `spacing`, ...). */ resolveTokenCategories(prefix?: string): string[]; } interface ConfigTokenRefSpan { start: number; end: number; pathStart: number; pathEnd: number; path: string; } declare function findConfigTokenRefs(text: string): ConfigTokenRefSpan[]; declare function findConfigTokenRefAt(text: string, position: number): ConfigTokenRefSpan | undefined; declare function completeConfigTokenPath(prefix: string, index: SpecIndex): string[]; type StyleObjectCursorKind = 'key' | 'value'; interface StyleObjectContext { existingKeys: string[]; cursorKind: StyleObjectCursorKind; /** * Style-object-relative key chain leading to the cursor (see typescript-plugin's * `getStyleObjectCursorInfo`) — e.g. `['color']`, or `['backgroundColor', 'sm']` for a * utility's own inline conditional value (`backgroundColor: { sm: 're' }`). */ propertyPath: string[]; prefix: string; } type CompletionEntryKind = 'utility' | 'condition' | 'token' | 'keyframe' | 'literal' | 'keyword' | 'category'; interface CompletionEntry { name: string; kind: CompletionEntryKind; } declare function completeConfigStyleObject(context: StyleObjectContext, index: SpecIndex): CompletionEntry[]; type SemanticTokenCursorKind = 'category' | 'condition'; interface SemanticTokenContext { cursorKind: SemanticTokenCursorKind; existingKeys: string[]; prefix: string; } declare function completeSemanticTokenObject(context: SemanticTokenContext, index: SpecIndex): CompletionEntry[]; interface ResolveModuleTargetOptions { outdir: string; } declare function resolveModuleTarget(specifier: string, importMap: ImportMapOutput, options: ResolveModuleTargetOptions): string | undefined; export { type CompletionEntry, type CompletionEntryKind, type ConfigTokenRefSpan, type FileInspectionCacheEntry, FileInspector, type Project, type ProjectKey, ProjectRegistry, type ProjectRegistryOptions, type ResolveModuleTargetOptions, type SemanticTokenContext, type SemanticTokenCursorKind, SpecIndex, type StyleObjectContext, type StyleObjectCursorKind, completeConfigStyleObject, completeConfigTokenPath, completeSemanticTokenObject, createProjectFromConfig, createProjectFromLoadedConfig, findConfigTokenRefAt, findConfigTokenRefs, resolveModuleTarget, sourceCacheKey };