import type { RenderMetadata } from "../types/index.js"; import type { VeryfrontConfig } from "../config/index.js"; import { type DependencyPinningSource } from "../transforms/esm/package-registry.js"; import type { RuntimeAdapter } from "../platform/adapters/base.js"; export interface SnippetRenderOptions { mode: "development" | "production"; projectDir: string; adapter?: RuntimeAdapter; isLocalProject?: boolean; projectId?: string; contentSourceId?: string; /** Release that owns the immutable hydration runtime for this shell. */ releaseId?: string; /** Canonical request-scoped dependency source supplied by server handlers. */ dependencyPinningSource?: DependencyPinningSource; filePath?: string; nonce?: string; /** Base URL for module server (e.g., http://localhost:3002) */ moduleServerUrl?: string; /** Project slug for proxy mode (needed to resolve @/ imports) */ projectSlug?: string; /** Project config for styling, theme, and HMR settings */ config?: VeryfrontConfig; /** Entity UUID from Studio to use for page_id (for postMessage communication) */ pageId?: string; } export interface SnippetRenderResult { html: string; frontmatter: Record; } /** Build the document shell for a compiled snippet. */ export declare function wrapSnippetInHTMLShell(bodyHtml: string, meta: RenderMetadata, options: SnippetRenderOptions, context: { hash: string; moduleServerBase: string; dependencyPinningCacheKey: string; dependencyPinningDependencies?: Readonly>; }): Promise; export declare function buildSnippetModuleUrl(moduleServerBase: string, hash: string, cacheBuster: number, dependencyPinningCacheKey?: string): string; export declare function getCompiledSnippet(hash: string): string | undefined; export declare function getCompiledSnippetAsync(hash: string): Promise; /** * Clear all cached snippets - used during cache invalidation * @deprecated Use clearSnippetCacheForProject for multi-tenant deployments */ export declare function clearSnippetCache(): void; export declare function clearSnippetCacheForProject(projectSlug: string): void; export declare function renderSnippet(mdxContent: string, options: SnippetRenderOptions): Promise; //# sourceMappingURL=snippet-renderer.d.ts.map