import type { Context } from "hono"; import { type HtmlEscapedString } from "hono/utils/html"; export type PatchElementsOptions = { selector?: string; mode?: "outer" | "inner" | "replace" | "prepend" | "append" | "before" | "after" | "remove"; }; export type SSEStream = { patchElements: (html: HtmlEscapedString | Promise, options?: PatchElementsOptions) => Promise; patchSignals: (signals: Record) => Promise; }; /** * Returns a full-page Response for direct browser loads, * or streams a datastar-patch-elements event for Datastar requests. */ export declare function respond(c: Context, opts: { fullPage: () => HtmlEscapedString | Promise; fragment: () => HtmlEscapedString | Promise; }): Promise; /** * Streams an SSE response for write operations (POST/PATCH/DELETE). * Callback receives helpers to patch DOM and signals. */ export declare function sseAction(c: Context, fn: (stream: SSEStream) => Promise): Response; //# sourceMappingURL=sse.d.ts.map