import { C as CookieOptions } from './types-BAqJDAl9.js'; interface StorageAdapter { /** Runtime read (post-hydration). */ get(): string | null; /** Runtime write. */ set(value: string): void; /** Optional: subscribe to cross-tab / external changes. */ subscribe?(cb: (value: string | null) => void): () => void; } interface AdapterOptions { key: string; cookie: Required> & Omit; /** * Called when a storage read or write throws. * * Every adapter swallows storage exceptions on purpose — Safari private mode, * sandboxed iframes, disabled cookies, and quota-exceeded must never break * theming. But swallowing them silently left users with no way to find out * why their theme stopped persisting. This is the diagnostic seam: failures * stay non-fatal, and now they are also observable. */ onStorageError?: (error: unknown, context: { operation: 'get' | 'set'; key: string; }) => void; } type AdapterFactory = (opts: AdapterOptions) => StorageAdapter; declare function readCookieFromString(cookie: string, name: string): string | null; declare function serializeCookie(name: string, value: string, options?: CookieOptions): string; declare const cookieAdapter: AdapterFactory; export { type AdapterFactory as A, type StorageAdapter as S, type AdapterOptions as a, cookieAdapter as c, readCookieFromString as r, serializeCookie as s };