import { InjectionKey } from "vue"; //#region src/hmr.d.ts interface DevErrorInfo { message: string; stack?: string; loc?: { file: string; line: number; column: number; }; phase?: "compile" | "evaluate" | "render"; } type DevState = { type: "ok"; } | { type: "error"; error: DevErrorInfo; } | { type: "update"; paths: string[]; }; interface HotContext { on(event: string, cb: (payload: unknown) => void): void; send(event: string, data?: unknown): void; } declare function isDevConnected(): boolean; /** Active privileged Vite session id, if any. Test and plugin introspection only. */ declare function getDevtoolsSessionId(): string | undefined; interface ConnectDevtoolsOptions { /** * Stable identity of the Vite dev session that owns this connection. * Full reload of the same server reuses the same id with a fresh hot context. * A different id while a session is already active fails deterministically. */ sessionId?: string; } declare class VueTuiDevSessionConflictError extends Error { readonly name = "VueTuiDevSessionConflictError"; constructor(); } declare function isVueTuiDevSessionConflictError(error: unknown): error is Error; declare function connectDevtools(hot: HotContext, options?: ConnectDevtoolsOptions): void; /** * Tear down the active Vite dev session owned by `sessionId` (or the only active * session when omitted). Identity-guarded and idempotent: a mismatched id is a * no-op; a second call after a successful disconnect is a no-op. * * Ends the mounted dev app and settles its exit, clears pending dev-status * timers, and drops the hot bridge so a later sequential session can connect. */ declare function disconnectDevtools(sessionId?: string): void | Promise; /** * Mark the HMR batch currently executing in Vite's module runner as failed. * * The runner reports its error over the same queued hot channel as the update, * so that payload arrives after `vite:afterUpdate`. This synchronous marker * prevents the failed batch from briefly clearing the overlay first. */ declare function invalidateDevHmrUpdate(): void; //#endregion export { connectDevtools as a, invalidateDevHmrUpdate as c, VueTuiDevSessionConflictError as i, isDevConnected as l, DevErrorInfo as n, disconnectDevtools as o, DevState as r, getDevtoolsSessionId as s, ConnectDevtoolsOptions as t, isVueTuiDevSessionConflictError as u };