import { Plugin } from "vite";

//#region node_modules/.cache/bundler-plugins-dts/vite/reactDuplicateRuntimeCheck.d.ts
/**
 * Env-флаг `BUNDLER_RUNTIME_STRICT=1` переводит defensive детекторы в throw-режим.
 * CLI устанавливает его автоматически при локальной сборке плагина из нашего репо.
 */
declare const STRICT_ENV_FLAG = "BUNDLER_RUNTIME_STRICT";
declare function isStrictMode(envSource?: NodeJS.ProcessEnv): boolean;
interface RuntimeDuplicateCheckSignals {
  warn?: (message: string) => void;
  fail?: (message: string) => never;
  env?: NodeJS.ProcessEnv;
}
type RuntimeDuplicateCheckOutcome = 'no-prebundle' | 'no-runtime-resolved' | 'clean' | 'duplicate-warned' | 'duplicate-throw';
declare function runReactDuplicateRuntimeCheck(opts: {
  viteCacheDir: string;
  mainPackage: string;
  pluginName: string;
  existsSync?: (p: string) => boolean;
  readFileSync?: (p: string, encoding: 'utf-8') => string;
}, signals?: RuntimeDuplicateCheckSignals): RuntimeDuplicateCheckOutcome;
//#endregion
//#region node_modules/.cache/bundler-plugins-dts/vite/depsRuntimePaths.d.ts
/** Для тестов и плагина: один RegExp на процесс, без пересборки в hot-path. */
declare function createAppCoreOptimizedDepRe(appName: string): RegExp;
/**
 * Vite prebundles may rewrite runtime asset requests under `/.vite/deps/`.
 * Maps request pathname → абсолютный путь файла в корне runtime-пакета.
 */
declare function getDepsRuntimeFilePath(pathname: string, packageRoot: string, appCoreOptimizedDepRe: RegExp): string | null;
//#endregion
//#region node_modules/.cache/bundler-plugins-dts/vite/index.d.ts
type VitePluginOptions = {
  publicPath?: string;
  outputFolder?: string;
  modulesPath?: string;
  startupPrefetchMode?: 'eager' | 'idle' | 'manual' | 'off';
};
/**
 * Vite plugin for host applications.
 * Copies static assets (images, iframe, fonts, monaco workers) to the build output
 * and injects publicPath into the entry module so the editor can locate them at runtime.
 * The thin facade entry is still handled by the consumer bundler, while
 * browser-loaded core assets are copied to the host output and served from publicPath.
 *
 * For plugin development (externals + alias), use a separate plugin
 * from the `vite/pluginDev` subpath.
 */
declare const VitePlugin: (options?: VitePluginOptions) => Plugin[];
//#endregion
export { type RuntimeDuplicateCheckOutcome, type RuntimeDuplicateCheckSignals, STRICT_ENV_FLAG, VitePluginOptions, createAppCoreOptimizedDepRe, VitePlugin as default, getDepsRuntimeFilePath, isStrictMode, runReactDuplicateRuntimeCheck };