/** * App Router — Next.js-style file-based routing * * Discovers routes from the app directory, renders pages with SSR, * builds client mount scripts, and handles API routes. */ import type { Handler, FrontendAppOptions, RenderPageOptions, AppRouterOptions } from "./types"; export declare function spa(options: FrontendAppOptions): Promise; /** @deprecated Use the createAppRouter() pattern instead. */ export declare function frontendApp(options: FrontendAppOptions): Promise; /** * Render a page component to HTML with SSR. * Used by app router to render route components. */ export declare function renderPage(options: RenderPageOptions): Promise; /** * Create a request handler with file-based routing. * Automatically discovers routes from app directory. * * @example * ```ts * import { serve, createAppRouter } from 'tradjs/web'; * * serve(createAppRouter({ * appDir: './app', * globalCss: './app/globals.css', * })); * ``` */ export declare function createAppRouter(options?: AppRouterOptions): Handler; export declare function resolveAppDir(appDir?: string): string; export interface ServeAppOptions extends AppRouterOptions { port?: number; unix?: string; } export declare function serve(options?: ServeAppOptions): Promise; export declare function serve(handler: Handler, options?: { port?: number; unix?: string; websocket?: any; }): Promise; /** * Start a TradJS server with file-based routing in one call. * Combines createAppRouter() + serve() for convenience. * * @example * ```ts * import { start } from 'tradjs'; * await start({ appDir: './app', port: 3000 }); * ``` */ export declare function start(options?: ServeAppOptions): Promise; //# sourceMappingURL=app-router.d.ts.map