/** * Progressive hydration strategies. * * Provide thin wrappers around `hydrateMount()` that defer the hydration * pass until a chosen trigger fires. They are runtime-safe: in non-browser * environments they fall back to immediate hydration (or a no-op) so the * same code path can run in tests. * * @module bquery/ssr */ import type { BindingContext, View } from '../view/types'; import { type HydrateMountOptions } from './hydrate'; /** Common return shape for progressive hydration. */ export interface HydrationHandle { /** Cancels pending hydration (no-op if it has already run). */ cancel(): void; /** Resolves with the View once hydration runs, or `null` if cancelled. */ ready: Promise; } /** * Hydrates the target only once it scrolls into view. * * Falls back to immediate hydration if `IntersectionObserver` is unavailable. */ export declare const hydrateOnVisible: (selector: string | Element, context: BindingContext, options?: HydrateMountOptions & { rootMargin?: string; threshold?: number; }) => HydrationHandle; /** Hydrates when the browser is idle. */ export declare const hydrateOnIdle: (selector: string | Element, context: BindingContext, options?: HydrateMountOptions) => HydrationHandle; /** Hydrates on first user interaction (click/keydown/pointerdown/touchstart). */ export declare const hydrateOnInteraction: (selector: string | Element, context: BindingContext, options?: HydrateMountOptions & { events?: string[]; }) => HydrationHandle; /** Hydrates only when a media query matches. */ export declare const hydrateOnMedia: (selector: string | Element, context: BindingContext, query: string, options?: HydrateMountOptions) => HydrationHandle; /** * Hydrates a single SSR island using the same runtime-safe target resolution * as the other progressive hydration helpers. Returns `null` when the DOM is * unavailable or the target cannot be resolved. */ export declare const hydrateIsland: (selector: string | Element, context: BindingContext, options?: HydrateMountOptions) => View | null; //# sourceMappingURL=strategies.d.ts.map