/** * Versioned store snapshots and strict drift-checking hydration. * * Sits *on top of* the simple `serializeStoreState()` / `hydrateStore()` pair * to give applications a way to: * - tag the snapshot with a schema version so a stale client can refuse to * apply server data that no longer matches its store shape; * - opt into strict mode where unknown keys cause a warning; * - selectively serialize / hydrate a subset of stores. * * Backwards compatible: the existing helpers stay untouched and remain the * primary entry-point for simple use cases. * * @module bquery/ssr */ /** Versioned store snapshot. */ export interface SSRStoreSnapshot { /** Application-defined version string. Stable per schema. */ version: string; /** Map of store ID → sanitized state. */ state: Record>; } /** Result of `serializeStoreSnapshot()`. */ export interface SerializeSnapshotResult { snapshot: SSRStoreSnapshot; /** JSON-serialized snapshot. */ json: string; /** `