/** * Automerge browser shim — resolves to the globally-loaded Automerge instance * exposed by shell-offline.ts via window.__automerge. * * Module builds alias '@automerge/automerge' to this file to avoid * re-bundling the full Automerge + WASM (~2.5MB) in every module. */ const Automerge = (window as any).__automerge; if (!Automerge) { console.warn('[automerge-shim] Automerge not loaded yet — shell-offline may not have initialized'); } export default Automerge; export const { init, from, change, emptyChange, load, save, merge, getActorId, getHeads, getHistory, getChanges, getAllChanges, applyChanges, generateSyncMessage, receiveSyncMessage, initSyncState, encodeSyncState, decodeSyncState, clone, free, getConflicts, getMissingDeps, equals, dump, toJS, } = Automerge ?? {};