import { a as ComponentMetadata } from "../implementation-DGziD7NW.cjs"; import { AtomStore, AtomStoreSnapshot, PrimitiveAtom } from "@dathra/store"; //#region src/ssr/implementation.d.ts interface SSRStoreOptions { store?: AtomStore; storeSnapshotSchema?: AtomStoreSnapshot>>; } /** * Render Declarative Shadow DOM content (inner template only). * * Returns `` for a registered component. * Useful with `dangerouslySetInnerHTML` in React or similar patterns. * * @param target - The custom element tag name or component class. * @param attrs - Attribute values to pass to the component. * @returns The DSD template HTML string. * @throws If the component is not registered. * * @example * ```tsx * // With component class * const Counter = defineComponent('my-counter', ...); * const dsd = renderDSDContent(Counter, { initial: '10' }); * * * // With tag name (legacy) * const dsd = renderDSDContent('my-counter', { initial: '10' }); * ``` */ declare function renderDSDContent(target: string | ComponentMetadata, attrs?: Record, options?: SSRStoreOptions): string; /** * Render a complete custom element with Declarative Shadow DOM. * * Returns the full element HTML including the DSD template. * Can be directly inserted into any SSR output (React, Vue, etc.). * * @param target - The custom element tag name or component class. * @param attrs - Attribute values to pass to the component. * @returns The full custom element HTML with DSD. * @throws If the component is not registered. * * @example * ```typescript * // With component class (recommended) * const Counter = defineComponent('my-counter', ...); * const html = renderDSD(Counter, { initial: '10' }); * // → '' * * // With tag name (legacy) * const html = renderDSD('my-counter', { initial: '10' }); * ``` */ declare function renderDSD(target: string | ComponentMetadata, attrs?: Record, options?: SSRStoreOptions): string; /** * Create a component renderer callback for Dathra's renderToString. * * Uses the component registry to resolve custom element tags * and render their content with Declarative Shadow DOM. * * @internal This is primarily for internal use by Dathra's SSR system. * Most users should use `renderDSD` or `renderDSDContent` instead. * * @returns A function that takes (tagName, attrs) and returns DSD HTML or null. */ declare function createComponentRenderer(): (tagName: string, attrs: Record) => string | null; /** * Ensure the global ComponentRenderer is set up for Dathra SSR. * Called automatically by defineComponent in SSR mode. * Safe to call multiple times (idempotent). * @internal */ //#endregion export { createComponentRenderer, renderDSD, renderDSDContent }; //# sourceMappingURL=index.d.cts.map