import type { PageContext } from '../types/frontend.js'; export type { PageContext, PageContextInit } from '../types/frontend.js'; /** * Escape HTML entities to prevent XSS attacks. * * @param str - String to escape * @returns Escaped string safe for HTML content * * @example * ```typescript * escapeHtml('') * // Returns: '<script>alert("xss")</script>' * ``` */ export declare function escapeHtml(str: string): string; /** * Options for rendering an HTML shell */ export interface HTMLShellOptions { title?: string; description?: string; lang?: string; charset?: string; viewport?: string; styles?: string[]; scripts?: string[]; headContent?: string; bodyContent?: string; bodyAttributes?: Record; } /** * Render a basic HTML shell for SSR. * * @param options - Options for the HTML shell * @returns Complete HTML document string * * @example * ```typescript * const html = renderHTMLShell({ * title: 'My Page', * description: 'A sample page', * bodyContent: '
Loading...
', * styles: ['/styles/main.css'], * scripts: ['/js/app.js'], * }) * ``` */ export declare function renderHTMLShell(options?: HTMLShellOptions): string; /** * Render a page to HTML string for server-side rendering. * * This is a framework-agnostic utility for basic SSR. For React Server Components * and advanced features like Lexical rich text serialization, use the full * SSR handler at apps/mainframe/src/server/revealui-handler.tsx. * * @param pageData - The page data to render * @param context - Page context information * @returns HTML string * * @example * ```typescript * const html = renderPage( * { title: 'Welcome', content: '

Hello world

' }, * { url: '/welcome', locale: 'en' } * ) * ``` */ export declare function renderPage(pageData: unknown, context: PageContext): string; //# sourceMappingURL=renderPage.d.ts.map