import { VfsBackend } from '../core/types'; export interface BundleFsOptions { /** Manifest URL; its `coreBundleUrl` locates the bundle when `bundleUrl` is not given. */ manifestUrl?: string; /** Explicit bundle URL override. */ bundleUrl?: string; /** Pre-loaded bundle bytes (skip fetch). Useful for tests + Tauri resources. */ bundleBytes?: Uint8Array; /** * SHA-256 (hex) the fetched bundle must hash to. When the bundle comes from * a manifest, its `coreBundleSha256` is used automatically. */ sha256?: string; /** * Fetch a bundle for which no SHA-256 is known. Off by default: a bundle is * the whole TeX tree the engine will execute, and a cross-origin one that * nothing pins is a supply-chain hole. Same-origin bundles (the app serving * its own assets) are exempt — they carry the same trust as the code doing * the fetching. Turn this on only in development. */ allowUnverified?: boolean; /** * Compression format. Default: auto-detect from bundleUrl suffix (`.gz` * / `.br`) or via magic-byte sniff on the bytes. */ format?: 'gzip' | 'br'; /** * Strip a leading path prefix from every entry. Default: `'texmf/'` (the * bundle produced by `scripts/pack-tds.mjs` nests everything under that). */ stripPrefix?: string; /** Ceiling on the decompressed archive. Default: tar.ts's MAX_DECOMPRESSED_BYTES. */ maxBytes?: number; /** Ceiling on the compressed download. Default: MAX_COMPRESSED_BYTES. */ maxCompressedBytes?: number; } /** * Ceiling on the bundle we are willing to download. The full TDS bundle is * ~120 MB compressed; twice that is already not a bundle we published. */ export declare const MAX_COMPRESSED_BYTES: number; export declare function createBundleFs(opts: BundleFsOptions): Promise; /** * Identify the bundle's compression, or null when nothing identifies it. * * Brotli has no magic bytes, so it can only be asserted (by the `.tar.br` * suffix or an explicit `format`) — never inferred. Guessing 'br' for * "anything else" fed every unrecognized byte stream, including an HTML error * page a proxy substituted for the bundle, into DecompressionStream('br'). */ export declare function detectFormat(url: string | undefined, bytes: Uint8Array): 'gzip' | 'br' | 'raw' | null; //# sourceMappingURL=bundlefs.d.ts.map