import { Config, Dict } from '@pandacss/types'; type Extendable = T & { extend?: T; }; type ExtendableConfig = Extendable; interface ConfigSourceEntry { kind: 'config' | 'preset'; name?: string; specifier?: string; file?: string; } interface ConfigSources { entries: ConfigSourceEntry[]; paths: Record; } type SourceRecordMode = 'replace' | 'append'; declare class SourceTracker { sources: ConfigSources; constructor(entries: ConfigSourceEntry[]); record(path: string[], sourceId: number, mode: SourceRecordMode): void; moveIfMissing(from: string[], to: string[]): void; delete(path: string[]): void; } interface SourcedConfig { config: ExtendableConfig; source: ConfigSourceEntry; } /** * Same merge, but also records which config contributed each value * so the result can be traced back to its preset/config of origin. */ declare function mergeConfigsWithSources(configs: SourcedConfig[]): { config: Dict; sources: ConfigSources; }; /** * Merges an ordered list of configs (presets first, user config last) into one flat config. * A key written without `extend` replaces the entry it names; `extend` merges into it. */ declare function mergeConfigs(configs: ExtendableConfig[]): Dict; declare function mergeConfigs(configs: SourcedConfig[], tracker: SourceTracker): Dict; export { type ConfigSources as C, type SourcedConfig as S, type ConfigSourceEntry as a, mergeConfigsWithSources as b, mergeConfigs as m };