/** * Dismissal-cookie primitives — THE one implementation of "this surface was * dismissed", shared by every dismissible surface (announcement bar, floating * walkthrough video, and anything added later). * * The dismissal rule is an ID MATCH, never mere cookie presence: the store * holds the id of the LAST dismissed item, so publishing a NEW item re-shows * the surface while the old dismissal still suppresses the old item. * * TWO TIERS. The cookie is primary wherever cookies work; on a cookie-averse * document `localStorage` takes over under the same key. See `canUseCookies` * for when that is, and `fallbackStore` for why it is a fallback and not a * mirror. * * No `"use client"` on purpose — `isDismissedCookieValue` is pure and is used by * server code (the hub's root layout reads the cookie during SSR to avoid a * flash); the DOM-touching helpers guard on `typeof document`. */ /** THE dismissal match rule. `undefined` id (nothing active) → not dismissed. */ export declare function isDismissedCookieValue(cookieValue: string | undefined, id: string | undefined): boolean; /** * Read a dismissal. Returns `undefined` when absent OR unreadable — one * guarantee with two causes: a cookie with bad percent-encoding, where * `decodeURIComponent` throws `URIError`, and a fallback value that is not the * JSON string it should be, where the adapter swallows the parse failure. * Callers run this inside reveal paths where an uncaught throw would hide the * surface permanently, so failing open — treated as not-dismissed — is always * the safe side. */ export declare function readDismissCookie(name: string): string | undefined; /** Persist a dismissal. */ export declare function writeDismissCookie(name: string, id: string): void; /** * Clear a dismissal (test/story helper). * * BOTH tiers, unconditionally — the tier check governs writes, not removal. * Clearing writes nothing and cannot resurrect a dismissal, so it carries none * of the reasons the write path commits to one tier, and a clear that leaves * the other tier holding a value is a lie. * * NOT for a shell that changes the scheme it serves under: that is an origin * change, so the old tier moves to a storage bucket no code in the new origin * can reach — `clear` included. */ export declare function clearDismissCookie(name: string): void; //# sourceMappingURL=dismiss-cookie.d.ts.map