import type { Plugin } from "vite"; import { type ActionSecurityOptions } from "../action/server.js"; import { type InterpolationMode } from "./interpolation-plugin.js"; export interface NixJsKitViteOptions { /** App directory relative to Vite root (default: src/app). */ appDir?: string; /** Islands directory relative to Vite root (default: src/islands). */ islandsDir?: string; /** Content directory relative to Vite root (default: src/content). */ contentDir?: string; /** Where to write the generated client entry (default: .nix-js/entry-client.ts). */ generatedEntry?: string; /** Public path for the client entry module (default: /_nix-js/entry-client.js). */ clientEntry?: string; /** HTML lang attribute (default: es). */ lang?: string; /** Import specifier for hydrateIslands in the generated entry. */ hydrateImport?: string; /** Import specifier for startClientRouter in the generated entry. */ routerImport?: string; /** CSRF / origin policy applied to the server actions endpoint in dev. */ actionSecurity?: ActionSecurityOptions; /** * How the legacy interpolation transform is handled (default: "auto"). * With a Nix.js core that supports partial attribute interpolation natively * the transform is not applied; use "legacy" for migrations against older * cores and "off" to never transform. */ interpolation?: InterpolationMode; } /** * Official Vite plugin for nix-js-kit. * * In dev mode it generates the islands entry and renders every page via SSR. * In production builds it can be combined with `nix-js-kit build` to generate * static HTML files. */ export declare function nixJsKit(options?: NixJsKitViteOptions): Plugin[]; export { nixJsInterpolationPlugin, type InterpolationPluginOptions } from "./interpolation-plugin.js"; export type { InterpolationMode } from "./interpolation-plugin.js"; export { coreSupportsPartialInterpolation, shouldUseLegacyInterpolation } from "./interpolation-plugin.js";