import type { PluginOption } from "vite"; export interface BuildAdminOptions { /** The application's Admin entry, which default-exports `defineAdmin(...)`. The built-in entry when omitted. */ readonly entry?: string; /** Optional host-safe entry, also default-exporting `defineAdmin(...)`. Defaults to `entry`; it must not import browser-only implementations. */ readonly mcpEntry?: string; /** Where Admin's static files go, served at `/admin/`: `/admin`. It is emptied first. */ readonly outDir: string; } /** * Build Admin with Vite into `outDir`: the shell (`index.html`), the same-origin preview document (`preview.html`) and * its `host-bridge.js`, hashed assets, and the MCP App as one file (`mcp-app.html`), checked for what a host refuses. * The App uses `mcpEntry` when supplied, otherwise the same entry. `mantle bundle` calls this; it is not a CLI. */ export declare function buildAdmin({ entry, mcpEntry, outDir }: BuildAdminOptions): Promise; export interface AdminViteOptions { /** The application's Admin entry, as for `buildAdmin`. The built-in entry when omitted. */ readonly entry?: string; /** The running service, to which `/admin/api` and `/api/auth` are proxied. `http://localhost:8787`, `wrangler dev`'s address, by default. */ readonly target?: string; /** The service's auth base path when it is not `/api/auth`, as the service's `authBasePath`. */ readonly authBasePath?: string; } /** * Hot module replacement for Admin while you work on `src/admin.tsx`; optional, and nothing uses it by default (`wrangler dev` * rebuilds Admin with `mantle bundle`). Put it in a `vite.config.ts` and run `vite`; Admin is at `http://localhost:5173/admin/`: * * ```ts * import { defineConfig } from "vite"; * import { adminVitePlugin } from "@aotter/mantle-admin/build"; * export default defineConfig({ plugins: [adminVitePlugin({ entry: "src/admin.tsx" })] }); * ``` */ export declare function adminVitePlugin({ entry, target, authBasePath }?: AdminViteOptions): Promise;