/** * DBCore Middleware for resolving BlobRefs on read * * This middleware intercepts read operations and resolves any BlobRefs * found in objects marked with _hasBlobRefs. * * Important: Avoids async/await to preserve Dexie's Promise.PSD context. * Uses Dexie.waitFor() only for explicit rw transactions to keep them alive. * For readonly or implicit transactions, resolves directly (no waitFor needed). * * Resolved blobs are persisted via db.blobDownloadTracker.enqueueSave(), * which internally uses a queue that runs in a fresh JS task to completely * isolate from Dexie's transaction context. Each blob is saved atomically * using Table.update() with its keyPath to avoid race conditions with other * property changes. * * Blob downloads use Authorization header (same as sync) via the server * proxy endpoint: GET /blob/{ref} */ import { DBCore, Middleware } from 'dexie'; import { DexieCloudDB } from '../db/DexieCloudDB'; export declare function createBlobResolveMiddleware(db: DexieCloudDB): Middleware;