/** * Active sync strategy — `withSync()` returns the real implementation * that wires the `SyncEngine`, `SyncTransaction`, and `PresenceHandle` * constructors into the Noydb / Vault / Collection hot paths. * * Consumers opt in by: * * ```ts * import { createNoydb } from '@noy-db/hub' * import { withSync } from '@noy-db/hub/sync' * * const db = await createNoydb({ * store: localStore, * sync: remoteStore, * user: ..., * syncStrategy: withSync(), * }) * ``` * * The factory delegates to the existing `sync.ts`, * `sync-transaction.ts`, and `presence.ts` modules. Splitting the * import chain through this file is what lets tsup tree-shake the * ~856 LOC of replication + presence machinery out of the default * bundle when no `withSync()` import is present. * * Keyring + grant/revoke/magic-link/delegation stay in the always-on * core (or tree-shake via direct named imports) — those are required * for any multi-user vault, even purely local ones. * * @public */ import type { SyncStrategy } from './sync-strategy.js'; export declare function withSync(): SyncStrategy;