import { MemoryRepositoryConfig } from '../config/repository.config.js'; import type { IStatsProvider, ISyncRepository } from '../interfaces/repository.interface.js'; import type { TranslationData } from '../types/translation-data.types.js'; /** * A bundle of translations to seed offline-first: locale → namespace → data, * where `data` is the raw `{ key: ContentUnit }` map the backend returns (and * the CLI `snapshot` command writes). Styles MUST be preserved (no flattening * to display strings), so inline markup renders offline. */ export type StaticBundle = Record>; /** * Read-only, pre-seeded sync repository for OFFLINE RESILIENCE. Bundle a * snapshot (or import the CLI's snapshot files) and feed it in; `t()` then * resolves synchronously from the bundle even with the server down and nothing * cached — the gap browser localStorage/Cache can't fill on a first load. * * It seeds an internal MemoryRepository exactly the way `SyncHandler.saveNamespace` * does (the namespace blob `@locale:namespace` + flattened `locale:namespace:key` * entries, each a JSON ContentUnit), so the standard SyncHandler resolves it with * zero special-casing. Writes are no-ops: when the network succeeds, the LIVE * MemoryRepository (priority 0) holds the fresh value and shadows this layer * (which sits at priority 0.5), so the bundle is never overwritten or corrupted. * TTL/size are effectively infinite so the bundle never expires or evicts. */ export declare class StaticRepository implements ISyncRepository, IStatsProvider { readonly name = "StaticRepository"; readonly type: "memory"; readonly config: MemoryRepositoryConfig; private readonly mem; constructor(bundle: StaticBundle, config?: MemoryRepositoryConfig); get(key: string): string | null; getNamespace(locale: string, namespace: string): TranslationData | null; getEntries(): Record; getConfig(): MemoryRepositoryConfig; set(): void; remove(): void; clear(): void; setNamespace(): void; } //# sourceMappingURL=static-repository.d.ts.map