/** * @packageDocumentation * * The [`automerge`](https://www.npmjs.com/package/@automerge/automerge) CRDT * provides a core CRDT data structure and an implementation of a storage * format and sync protocol but doesn't provide the plumbing to use these tools * in a JS application. `automerge-repo` provides the plumbing. * * The main entry point is the {@link Repo} class, which you instantiate with * a {@link StorageAdapter} and zero or more {@link NetworkAdapter}s. Once you * have a repo you can use it to create {@link DocHandle}s. {@link DocHandle}s * are a reference to a document, identified by a {@link AutomergeUrl}, a place to * listen for changes to the document, and to make new changes. * * A typical example of how to use this library then might look like this: * * ```typescript * import { Repo } from "@creately/automerge-repo"; * * const repo = new Repo({ * storage: , * network: [, ] * }) * * const handle = repo.create * ``` */ export { DocHandle } from "./DocHandle.js"; export { isValidAutomergeUrl, isValidDocumentId, parseAutomergeUrl, stringifyAutomergeUrl, interpretAsDocumentId, generateAutomergeUrl, encodeHeads, decodeHeads, } from "./AutomergeUrl.js"; export { Repo } from "./Repo.js"; export { NetworkAdapter } from "./network/NetworkAdapter.js"; export type { NetworkAdapterInterface } from "./network/NetworkAdapterInterface.js"; export { isRepoMessage } from "./network/messages.js"; export { StorageAdapter } from "./storage/StorageAdapter.js"; export type { StorageAdapterInterface } from "./storage/StorageAdapterInterface.js"; import { next as Automerge } from "@automerge/automerge/slim"; /** @hidden **/ export * as cbor from "./helpers/cbor.js"; export type { DocHandleChangePayload, DocHandleDeletePayload, DocHandleEncodedChangePayload, DocHandleEphemeralMessagePayload, DocHandleRemoteHeadsPayload, DocHandleEvents, DocHandleOptions, DocHandleOutboundEphemeralMessagePayload, HandleState, } from "./DocHandle.js"; export type { DeleteDocumentPayload, DocumentPayload, RepoConfig, RepoEvents, SharePolicy, } from "./Repo.js"; export type { NetworkAdapterEvents, OpenPayload, PeerCandidatePayload, PeerDisconnectedPayload, PeerMetadata, } from "./network/NetworkAdapterInterface.js"; export type { NetworkSubsystemEvents, PeerPayload, } from "./network/NetworkSubsystem.js"; export type { DocumentUnavailableMessage, EphemeralMessage, Message, RepoMessage, RequestMessage, SyncMessage, } from "./network/messages.js"; export type { Chunk, ChunkInfo, ChunkType, StorageKey, StorageId, } from "./storage/types.js"; export * from "./types.js"; export declare const Counter: typeof Automerge.Counter; export declare const RawString: typeof Automerge.RawString; export declare const ImmutableString: typeof Automerge.RawString; export type Counter = Automerge.Counter; export type Doc = Automerge.Doc; export type Heads = Automerge.Heads; export type Patch = Automerge.Patch; export type PatchCallback = Automerge.PatchCallback; export type Prop = Automerge.Prop; export type ActorId = Automerge.ActorId; export type Change = Automerge.Change; export type ChangeFn = Automerge.ChangeFn; export type Mark = Automerge.Mark; export type MarkSet = Automerge.MarkSet; export type MarkRange = Automerge.MarkRange; export type MarkValue = Automerge.MarkValue; export type Cursor = Automerge.Cursor; export declare const getChanges: typeof Automerge.getChanges; export declare const getAllChanges: typeof Automerge.getAllChanges; export declare const applyChanges: typeof Automerge.applyChanges; export declare const view: typeof Automerge.view; export declare const getConflicts: typeof Automerge.getConflicts; export declare const getCursor: typeof Automerge.getCursor; export declare const getCursorPosition: typeof Automerge.getCursorPosition; export declare const splice: typeof Automerge.splice; export declare const updateText: typeof Automerge.updateText; export declare const insertAt: typeof Automerge.insertAt; export declare const deleteAt: typeof Automerge.deleteAt; export declare const mark: typeof Automerge.mark; export declare const unmark: typeof Automerge.unmark; export declare const isRawString: typeof Automerge.isRawString; export declare const isImmutableString: typeof Automerge.isRawString; //# sourceMappingURL=index.d.ts.map