import type { Tonic } from './index.js'; /** * Render a Tonic component instance to an HTML string. * * This function takes a Tonic component instance, calls its render method, * and recursively processes any nested Tonic components to produce a complete * HTML string suitable for server-side rendering. * * @param component - A Tonic component instance to render * @returns A promise that resolves to an HTML string * * @example * ```ts * import { render } from '@substrate-system/tonic/render-to-string' * import { MyComponent } from './components' * * const component = new MyComponent() * const html = await render(component) * console.log(html) //
...
* ``` */ export declare function render(component: InstanceType): Promise; /** * Generate a ` * ``` */ export declare function getHydrationScript(state: Record): string; /** * Wrap rendered component content in its custom element tag, * with props encoded as attributes. * * Use this to build a hydratable HTML page from * server-rendered content. * * @param component The component instance that was rendered * @param content The HTML string from `render(component)` * @param opts.id Element `id` attribute (required for * state transfer via hydration) * @param opts.tagName Override the tag name (defaults to * the class name converted to kebab-case) * @param opts.state Hydration state -- if provided, a * `