import MagicString from 'magic-string'; declare const builtinPresets: { '@vue/composition-api': InlinePreset; '@vueuse/core': () => Preset; '@vueuse/head': InlinePreset; pinia: InlinePreset; preact: InlinePreset; quasar: InlinePreset; react: InlinePreset; 'react-router': InlinePreset; 'react-router-dom': InlinePreset; svelte: InlinePreset; 'svelte/animate': InlinePreset; 'svelte/easing': InlinePreset; 'svelte/motion': InlinePreset; 'svelte/store': InlinePreset; 'svelte/transition': InlinePreset; 'vee-validate': InlinePreset; vitepress: InlinePreset; 'vue-demi': InlinePreset; 'vue-i18n': InlinePreset; 'vue-router': InlinePreset; vue: InlinePreset; 'vue/macros': InlinePreset; vuex: InlinePreset; vitest: InlinePreset; 'uni-app': InlinePreset; 'solid-js': InlinePreset; 'solid-app-router': InlinePreset; }; type BuiltinPresetName = keyof typeof builtinPresets; type ModuleId = string; type ImportName = string; interface ImportCommon { /** Module specifier to import from */ from: ModuleId; /** * Priority of the import, if multiple imports have the same name, the one with the highest priority will be used * @default 1 */ priority?: number; /** If this import is disabled */ disabled?: boolean; /** * Metadata of the import */ meta?: { /** Short description of the import */ description?: string; /** URL to the documentation */ docsUrl?: string; /** Additional metadata */ [key: string]: any; }; } interface Import extends ImportCommon { /** Import name to be detected */ name: ImportName; /** Import as this name */ as?: ImportName; } type PresetImport = ImportName | [name: ImportName, as?: ImportName, from?: ModuleId] | Exclude; interface InlinePreset extends ImportCommon { imports: (PresetImport | InlinePreset)[]; } /** * Auto extract exports from a package for auto import */ interface PackagePreset { /** * Name of the package */ package: string; /** * Path of the importer * @default process.cwd() */ url?: string; /** * RegExp, string, or custom function to exclude names of the extracted imports */ ignore?: (string | RegExp | ((name: string) => boolean))[]; /** * Use local cache if exits * @default true */ cache?: boolean; } type Preset = InlinePreset | PackagePreset; interface UnimportContext { staticImports: Import[]; dynamicImports: Import[]; getImports(): Promise; getImportMap(): Promise>; addons: Addon[]; invalidate(): void; resolveId(id: string, parentId?: string): Thenable; options: Partial; getMetadata(): UnimportMeta | undefined; } interface InjectionUsageRecord { import: Import; count: number; moduleIds: string[]; } interface UnimportMeta { injectionUsage: Record; } interface AddonsOptions { /** * Enable auto import inside for Vue's