import { AssetFunctions } from "./jitTranscodeMiddleware.js"; import { EfHandlers } from "./efHandlers.js"; import { ServerResponse } from "node:http"; import { IncomingMessage as IncomingMessage$1, NextFunction } from "connect"; //#region src/router.d.ts interface DevServerOptions { root: string; cacheRoot: string; /** * Override the origin embedded in JIT manifest baseUrl and endpoint * templates. Pass the public-facing dev server origin when the sidecar * runs on a different port (e.g. Next.js rewrites proxy scenario). */ publicOrigin?: string; } interface RouterAssetFunctions extends AssetFunctions { cacheImage: (cacheRoot: string, src: string) => Promise; findOrCreateCaptions: (cacheRoot: string, src: string) => Promise; md5FilePath: (src: string) => Promise; } type ConnectMiddleware = (req: IncomingMessage$1, res: ServerResponse, next: NextFunction) => void | Promise; /** * Assemble the full Editframe middleware stack. * Returns a single Connect-compatible middleware function that can be mounted * onto any Connect/Express/Vite/http server. */ declare function createEditframeRouter(options: DevServerOptions, assetFns: RouterAssetFunctions, efHandlers: EfHandlers): ConnectMiddleware; /** * Inject the apiHost script into an HTML string. * Each framework adapter calls this from its own HTML transform hook. */ declare function injectApiHostScript(html: string, origin: string): string; //#endregion export { DevServerOptions, RouterAssetFunctions, createEditframeRouter, injectApiHostScript }; //# sourceMappingURL=router.d.ts.map