import type { PagesMode } from "./codegen"; export declare const VIRTUAL_PAGES_SERVER = "ilha:pages/server"; export declare const VIRTUAL_PAGES_CLIENT = "ilha:pages/client"; export declare const VIRTUAL_LOADERS = "ilha:loaders"; export declare const RESOLVED_PAGES_SERVER = "\0ilha:pages/server"; export declare const RESOLVED_PAGES_CLIENT = "\0ilha:pages/client"; export declare const RESOLVED_LOADERS = "\0ilha:loaders"; export declare const RESOLVED_VIRTUAL_IDS: readonly ["\0ilha:pages/server", "\0ilha:pages/client", "\0ilha:loaders"]; /** Query suffix used on page/layout imports in the client file. */ export declare const CLIENT_QUERY = "?client"; export interface IlhaPagesOptions { /** Directory containing page files. Default: `src/pages` */ dir?: string; /** Output directory for generated files. Default: `.ilha` */ outDir?: string; /** * File-system router navigation mode. * - `spa` — full client route graph with SSR/hydration and client navigation. * - `static` — island registry only; no route graph bundled into the client. * Default: `spa`. */ mode?: PagesMode; /** * When `false`, internal `` clicks are not intercepted — browser performs * full document navigations. Only meaningful in `spa` mode. * Default: `true`. */ interceptLinks?: boolean; /** * Guard consulted on every `/__ilha/frame` request before a render runs. * Return a `Response` to reject; return nothing to allow. Island state is * world-readable through frames unless gated — install a session check here * when islands serve private data. Production equivalents register via * `setFrameGuard()` from `@ilha/router/ssr`. */ frameGuard?: (request: Request) => Response | undefined | Promise; /** * Explicit trusted origins for frame/loader requests (e.g. a `.vercel.app` * or custom domain). When unset, origin checks compare the `Origin` header * against the request's own `Host`. Mirrors `setFrameAuth({ trustedOrigins })`. */ trustedOrigins?: string[]; /** * Optional CSRF verifier for the state-changing `/__ilha/frame` POST. * Mirrors `setFrameAuth({ csrf })`. */ csrf?: (request: Request) => boolean | Promise; /** * Fail codegen on duplicate route patterns / registry name collisions * instead of warning. Recommended for CI/production builds. Default: `false`. */ strict?: boolean; } export declare const resolvePluginPaths: (root: string, options: IlhaPagesOptions) => { clientFile: string; outDir: string; pagesDir: string; serverFile: string; }; export interface PagesPluginState { pagesDir: string; outDir: string; serverFile: string; clientFile: string; setPaths: (root: string) => void; regen: () => Promise; shouldRegenOnChange: (file: string) => boolean; isUnderPagesDir: (file: string) => boolean; } export declare const createPagesPluginState: (options: IlhaPagesOptions) => PagesPluginState; export declare const regenFromPagesChange: (state: PagesPluginState, file: string, shouldRegen: (file: string) => boolean) => Promise; export declare const resolvePagesId: (state: PagesPluginState, id: string, importer?: string) => string | undefined; export declare const loadPagesModule: (state: PagesPluginState, id: string) => string | undefined; type InvalidateModules = () => Promise; export declare const createStructuralInvalidate: (state: PagesPluginState, invalidate: InvalidateModules) => (file: string) => Promise; export declare const setupRspackPagesWatcher: (state: PagesPluginState, structuralInvalidate: (file: string) => Promise) => () => void; export declare const ilhaPages: import("unplugin").UnpluginInstance; export {};