From cbdc6a8add069a3b44ddca11e86a3b966f17f39c Mon Sep 17 00:00:00 2001 From: pvh Date: Thu, 22 Aug 2024 01:50:51 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20automerg?= =?UTF-8?q?e/automerge-repo@1704b06fc3025e4cd357f0fc62d02c061395f576=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_automerge_automerge_repo.Counter.html | 4 +- .../_automerge_automerge_repo.DocHandle.html | 44 +++++++++---------- ...tomerge_automerge_repo.NetworkAdapter.html | 14 +++--- .../_automerge_automerge_repo.RawString.html | 4 +- classes/_automerge_automerge_repo.Repo.html | 26 +++++------ ...tomerge_automerge_repo.StorageAdapter.html | 14 +++--- ...hannel.BroadcastChannelNetworkAdapter.html | 14 +++--- ...echannel.MessageChannelNetworkAdapter.html | 14 +++--- ...bsocket.BrowserWebSocketClientAdapter.html | 14 +++--- ...network_websocket.NodeWSServerAdapter.html | 16 +++---- ...age_indexeddb.IndexedDBStorageAdapter.html | 16 +++---- ...o_storage_nodefs.NodeFSStorageAdapter.html | 16 +++---- ...automerge_automerge_repo.applyChanges.html | 4 +- .../_automerge_automerge_repo.deleteAt.html | 4 +- ...e_automerge_repo.generateAutomergeUrl.html | 4 +- ...utomerge_automerge_repo.getAllChanges.html | 4 +- .../_automerge_automerge_repo.getChanges.html | 4 +- ...automerge_automerge_repo.getConflicts.html | 4 +- .../_automerge_automerge_repo.getCursor.html | 4 +- ...erge_automerge_repo.getCursorPosition.html | 4 +- .../_automerge_automerge_repo.insertAt.html | 4 +- ..._automerge_repo.interpretAsDocumentId.html | 4 +- ...utomerge_automerge_repo.isRepoMessage.html | 2 +- ...ge_automerge_repo.isValidAutomergeUrl.html | 4 +- ...erge_automerge_repo.isValidDocumentId.html | 2 +- .../_automerge_automerge_repo.mark-1.html | 2 +- ...erge_automerge_repo.parseAutomergeUrl.html | 4 +- .../_automerge_automerge_repo.splice.html | 4 +- ..._automerge_repo.stringifyAutomergeUrl.html | 4 +- .../_automerge_automerge_repo.unmark.html | 2 +- .../_automerge_automerge_repo.updateText.html | 4 +- functions/_automerge_automerge_repo.view.html | 4 +- ...utomerge_repo_react_hooks.useDocument.html | 4 +- ...tomerge_repo_react_hooks.useDocuments.html | 4 +- ..._automerge_repo_react_hooks.useHandle.html | 4 +- ...ge_repo_react_hooks.useLocalAwareness.html | 4 +- ...e_repo_react_hooks.useRemoteAwareness.html | 4 +- ...ge_automerge_repo_react_hooks.useRepo.html | 4 +- ..._automerge_repo_svelte_store.document.html | 4 +- ...erge_repo_svelte_store.getContextRepo.html | 2 +- ...erge_repo_svelte_store.setContextRepo.html | 2 +- hierarchy.html | 2 +- index.html | 4 +- ..._automerge_repo.DeleteDocumentPayload.html | 4 +- ...automerge_repo.DocHandleChangePayload.html | 12 ++--- ...automerge_repo.DocHandleDeletePayload.html | 6 +-- ...ge_repo.DocHandleEncodedChangePayload.html | 6 +-- ...repo.DocHandleEphemeralMessagePayload.html | 6 +-- ...omerge_automerge_repo.DocHandleEvents.html | 6 +-- ...HandleOutboundEphemeralMessagePayload.html | 6 +-- ...erge_repo.DocHandleRemoteHeadsPayload.html | 6 +-- ...omerge_automerge_repo.DocumentPayload.html | 4 +- .../_automerge_automerge_repo.MarkSet.html | 2 +- ...e_automerge_repo.NetworkAdapterEvents.html | 10 ++--- ...utomerge_repo.NetworkAdapterInterface.html | 14 +++--- ..._automerge_automerge_repo.OpenPayload.html | 4 +- ...e_automerge_repo.PeerCandidatePayload.html | 4 +- ...utomerge_repo.PeerDisconnectedPayload.html | 4 +- ...automerge_automerge_repo.PeerMetadata.html | 6 +-- .../_automerge_automerge_repo.RepoConfig.html | 14 +++--- .../_automerge_automerge_repo.RepoEvents.html | 8 ++-- ...utomerge_repo.StorageAdapterInterface.html | 14 +++--- ...el.MessageChannelNetworkAdapterConfig.html | 4 +- ...po_react_hooks.UseLocalAwarenessProps.html | 10 ++--- ...o_react_hooks.UseRemoteAwarenessProps.html | 10 ++--- modules/_automerge_automerge_repo.html | 4 +- ...tomerge_repo_network_broadcastchannel.html | 4 +- ...automerge_repo_network_messagechannel.html | 4 +- ...erge_automerge_repo_network_websocket.html | 4 +- ..._automerge_automerge_repo_react_hooks.html | 4 +- ...erge_automerge_repo_storage_indexeddb.html | 4 +- ...tomerge_automerge_repo_storage_nodefs.html | 4 +- ...automerge_automerge_repo_svelte_store.html | 4 +- modules/_automerge_create_repo_node_app.html | 4 +- modules/_automerge_create_vite_app.html | 4 +- types/_automerge_automerge_repo.ActorId.html | 2 +- ...utomerge_automerge_repo.AnyDocumentId.html | 2 +- ...automerge_automerge_repo.AutomergeUrl.html | 4 +- ...merge_automerge_repo.BinaryDocumentId.html | 4 +- types/_automerge_automerge_repo.Change.html | 2 +- types/_automerge_automerge_repo.ChangeFn.html | 4 +- types/_automerge_automerge_repo.Chunk.html | 4 +- .../_automerge_automerge_repo.ChunkInfo.html | 4 +- .../_automerge_automerge_repo.ChunkType.html | 2 +- types/_automerge_automerge_repo.Cursor.html | 2 +- types/_automerge_automerge_repo.Doc.html | 4 +- .../_automerge_automerge_repo.DocumentId.html | 4 +- ...merge_repo.DocumentUnavailableMessage.html | 4 +- ...merge_automerge_repo.EphemeralMessage.html | 4 +- ..._automerge_automerge_repo.HandleState.html | 2 +- types/_automerge_automerge_repo.Heads.html | 2 +- ...merge_automerge_repo.LegacyDocumentId.html | 4 +- types/_automerge_automerge_repo.Mark.html | 2 +- .../_automerge_automerge_repo.MarkRange.html | 2 +- .../_automerge_automerge_repo.MarkValue.html | 2 +- types/_automerge_automerge_repo.Message.html | 4 +- types/_automerge_automerge_repo.Patch.html | 2 +- ...utomerge_automerge_repo.PatchCallback.html | 4 +- types/_automerge_automerge_repo.PeerId.html | 4 +- types/_automerge_automerge_repo.Prop.html | 2 +- ..._automerge_automerge_repo.RepoMessage.html | 4 +- ...tomerge_automerge_repo.RequestMessage.html | 4 +- .../_automerge_automerge_repo.SessionId.html | 4 +- ..._automerge_automerge_repo.SharePolicy.html | 4 +- .../_automerge_automerge_repo.StorageId.html | 4 +- .../_automerge_automerge_repo.StorageKey.html | 4 +- ..._automerge_automerge_repo.SyncMessage.html | 4 +- ...BroadcastChannelNetworkAdapterOptions.html | 2 +- ...e_repo_network_websocket.ErrorMessage.html | 4 +- ...o_network_websocket.FromClientMessage.html | 4 +- ...o_network_websocket.FromServerMessage.html | 4 +- ...ge_repo_network_websocket.JoinMessage.html | 4 +- ...ge_repo_network_websocket.PeerMessage.html | 4 +- ...epo_network_websocket.ProtocolVersion.html | 4 +- ...automerge_repo_react_hooks.Heartbeats.html | 4 +- ...automerge_repo_react_hooks.PeerStates.html | 4 +- ...utomerge_automerge_repo.HandleState-1.html | 4 +- ...rge_repo_network_websocket.ProtocolV1.html | 2 +- ...utomerge_repo_react_hooks.RepoContext.html | 4 +- 119 files changed, 327 insertions(+), 327 deletions(-) diff --git a/classes/_automerge_automerge_repo.Counter.html b/classes/_automerge_automerge_repo.Counter.html index d7d62c13b..153f12a20 100644 --- a/classes/_automerge_automerge_repo.Counter.html +++ b/classes/_automerge_automerge_repo.Counter.html @@ -1,4 +1,4 @@ -Counter | Automerge Repo - v2.0.0-alpha.9

The most basic CRDT: an integer value that can be changed only by +Counter | Automerge Repo - v2.0.0-alpha.10

The most basic CRDT: an integer value that can be changed only by incrementing and decrementing. Since addition of integers is commutative, the value trivially converges.

Constructors

constructor @@ -25,4 +25,4 @@ This method is also called when coercing a value to a string by concatenating it with another string, as in x + ''. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf

-

Returns number

\ No newline at end of file +

Returns number

\ No newline at end of file diff --git a/classes/_automerge_automerge_repo.DocHandle.html b/classes/_automerge_automerge_repo.DocHandle.html index 7e80f3acc..c98c77aa3 100644 --- a/classes/_automerge_automerge_repo.DocHandle.html +++ b/classes/_automerge_automerge_repo.DocHandle.html @@ -1,4 +1,4 @@ -DocHandle | Automerge Repo - v2.0.0-alpha.9

A DocHandle is a wrapper around a single Automerge document that lets us listen for changes and +DocHandle | Automerge Repo - v2.0.0-alpha.10

A DocHandle is a wrapper around a single Automerge document that lets us listen for changes and notify the network and storage of new changes.

Remarks

A DocHandle represents a document which is being managed by a Repo. You shouldn't ever instantiate this yourself. To obtain DocHandle use Repo.find or Repo.create.

@@ -6,7 +6,7 @@ DocHandle.changeAt. These methods will notify the Repo that some change has occured and the Repo will save any new changes to the attached StorageAdapter and send sync messages to connected peers.

-

Type Parameters

  • T

Hierarchy

Properties

Type Parameters

  • T

Hierarchy

Properties

Accessors

Methods

Properties

documentId: DocumentId
prefixed: string | boolean

Accessors

Methods

  • Type Parameters

    Parameters

    • event: T
    • fn: ((...args) => void)
    • Optional context: any

    Returns this

  • Sends an arbitrary ephemeral message out to all reachable peers who would receive sync messages +

Properties

documentId: DocumentId
prefixed: string | boolean

Accessors

Methods

  • Type Parameters

    Parameters

    • event: T
    • fn: ((...args) => void)
    • Optional context: any

    Returns this

  • Sends an arbitrary ephemeral message out to all reachable peers who would receive sync messages from you. It has no guarantee of delivery, and is not persisted to the underlying automerge doc in any way. Messages will have a sending PeerId but this is not a useful user identifier (a user could have multiple tabs open and would appear as multiple PeerIds). Every message source must have a unique PeerId.

    -

    Parameters

    • message: unknown

    Returns void

  • All changes to an Automerge document should be made through this method. Inside the callback, the document should be treated as mutable: all edits will be recorded using a Proxy and translated into operations as part of a single recorded "change".

    Note that assignment via ES6 spread operators will result in replacing the object @@ -53,19 +53,19 @@

    Local changes will be stored (by the StorageSubsystem) and synchronized (by the DocSynchronizer) to any peers you are sharing it with.

    Parameters

    • callback: ChangeFn<T>

      A function that takes the current document and mutates it.

      -
    • options: ChangeOptions<T> = {}

    Returns void

  • Makes a change as if the document were at heads.

    +
  • options: ChangeOptions<T> = {}

Returns void

  • Makes a change as if the document were at heads.

    Parameters

    Returns undefined | string[]

    A set of heads representing the concurrent change that was made.

    -
  • Returns a set of Patch operations that will move a materialized document from one state to another if applied.

    Parameters

    Returns undefined | Patch[]

    Automerge patches that go from one document state to the other. Use view() to get the full state.

    Remarks

    We allow specifying both a from/to heads or just a single comparison point, in which case the base will be the current document heads.

    -
  • Parameters

    • awaitStates: HandleState[] = ...

      states to wait for, such as "LOADING". mostly for internal use.

    Returns Promise<undefined | Doc<T>>

    the current state of this handle's Automerge document.

    This is the recommended way to access a handle's document. Note that this waits for the handle to be ready if necessary. If loading (or synchronization) fails, this will never resolve.

    -
  • Synchronously returns the current state of the Automerge document this handle manages, or undefined. Consider using await handle.doc() instead. Check isReady(), or use whenReady() if you want to make sure loading is complete first.

    Not to be confused with the SyncState of the document, which describes the state of the @@ -73,17 +73,17 @@

    Note that undefined is not a valid Automerge document, so the return from this function is unambigous.

    Returns undefined | Doc<T>

    the current document, or undefined if the document is not ready.

    -
  • doneLoading is called by the repo after it decides it has all the changes it's going to get during setup. This might mean it was created locally, or that it was loaded from storage, or that it was received from a peer.

    -

    Returns void

  • Calls each of the listeners registered for a given event.

    Type Parameters

    Parameters

    Returns boolean

  • Return an array listing the events for which the emitter has registered listeners.

    Returns (keyof DocHandleEvents<T>)[]

  • Returns the current "heads" of the document, akin to a git commit. This precisely defines the state of a document.

    Returns undefined | Heads

    the current document's heads, or undefined if the document is not ready

    -
  • Creates a fixed "view" of an automerge document at the given point in time represented by the heads passed in. The return value is the same type as docSync() and will return undefined if the object hasn't finished loading.

    Returns undefined | Heads[]

    The individual heads for every change in the document.

    @@ -93,23 +93,23 @@ history views would be quite large under concurrency (every thing in each branch against each other). There might be a clever way to think about this, but we haven't found it yet, so for now at least we present a single traversable view which excludes concurrency.

    -
  • Returns boolean

    true if the document has been marked as deleted.

    +
\ No newline at end of file +
\ No newline at end of file diff --git a/classes/_automerge_automerge_repo.NetworkAdapter.html b/classes/_automerge_automerge_repo.NetworkAdapter.html index 6c5a1b87f..cb0e753c2 100644 --- a/classes/_automerge_automerge_repo.NetworkAdapter.html +++ b/classes/_automerge_automerge_repo.NetworkAdapter.html @@ -1,10 +1,10 @@ -NetworkAdapter | Automerge Repo - v2.0.0-alpha.9

An interface representing some way to connect to other peers

+NetworkAdapter | Automerge Repo - v2.0.0-alpha.10

An interface representing some way to connect to other peers

Remarks

The Repo uses one or more NetworkAdapters to connect to other peers. Because the network may take some time to be ready the Repo will wait until the adapter emits a ready event before it starts trying to use it

This utility class can be used as a base to build a custom network adapter. It is most useful as a simple way to add the necessary event emitter functionality

-

Hierarchy

Implements

Constructors

Hierarchy

Implements

Constructors

Properties

Constructors

Properties

peerId?: PeerId
peerMetadata?: PeerMetadata
prefixed: string | boolean

Methods

  • Called by the Repo to start the connection process

    +

Constructors

Properties

peerId?: PeerId
peerMetadata?: PeerMetadata
prefixed: string | boolean

Methods

  • Return the number of listeners listening to a given event.

    +

    Returns (keyof NetworkAdapterEvents)[]

  • Return the number of listeners listening to a given event.

    Parameters

    Returns number

  • Return the listeners registered for a given event.

    Type Parameters

    Parameters

    • event: T

    Returns ((...args) => void)[]

  • Type Parameters

    Parameters

    Returns this

  • Add a listener for a given event.

    Type Parameters

    Parameters

    Returns this

  • Add a one-time listener for a given event.

    @@ -38,4 +38,4 @@

    Argument

    peerMetadata - how this adapter should present itself to oth

    Parameters

    • Optional event: keyof NetworkAdapterEvents

    Returns this

  • Remove the listeners of a given event.

    Type Parameters

    Parameters

    Returns this

\ No newline at end of file +
\ No newline at end of file diff --git a/classes/_automerge_automerge_repo.RawString.html b/classes/_automerge_automerge_repo.RawString.html index 268205791..0c4c95acb 100644 --- a/classes/_automerge_automerge_repo.RawString.html +++ b/classes/_automerge_automerge_repo.RawString.html @@ -1,6 +1,6 @@ -RawString | Automerge Repo - v2.0.0-alpha.9

Constructors

constructor +RawString | Automerge Repo - v2.0.0-alpha.10

Constructors

Properties

Methods

Constructors

  • Parameters

    • val: string

    Returns RawString

Properties

val: string

Methods

  • Returns string

  • Returns the content of the RawString object as a simple string

    -

    Returns string

\ No newline at end of file +

Returns string

\ No newline at end of file diff --git a/classes/_automerge_automerge_repo.Repo.html b/classes/_automerge_automerge_repo.Repo.html index e7229c04d..03268bd8e 100644 --- a/classes/_automerge_automerge_repo.Repo.html +++ b/classes/_automerge_automerge_repo.Repo.html @@ -1,8 +1,8 @@ -Repo | Automerge Repo - v2.0.0-alpha.9

The Repo is the main entry point of this library

+Repo | Automerge Repo - v2.0.0-alpha.10

The Repo is the main entry point of this library

Remarks

To construct a Repo you will need an StorageAdapter and one or more NetworkAdapters. Once you have a Repo you can use it to obtain DocHandles.

-

Hierarchy

Constructors

Hierarchy

Constructors

Properties

Accessors

Constructors

Properties

prefixed: string | boolean

Accessors

Methods

  • Type Parameters

    Parameters

    • event: T
    • fn: ((...args) => void)
    • Optional context: any

    Returns this

  • Create a new DocHandle by cloning the history of an existing DocHandle.

    +

Constructors

Properties

prefixed: string | boolean

Accessors

Methods

  • Type Parameters

    Parameters

    • event: T
    • fn: ((...args) => void)
    • Optional context: any

    Returns this

  • Create a new DocHandle by cloning the history of an existing DocHandle.

    Type Parameters

    • T

    Parameters

    Returns DocHandle<T>

    Remarks

    This is a wrapper around the clone function in the Automerge library. The new DocHandle will have a new URL but will share history with the original, @@ -39,26 +39,26 @@ be notified of the newly created DocHandle.

    Throws

    if the cloned handle is not yet ready or if clonedHandle.docSync() returns undefined (i.e. the handle is unavailable).

    -
  • Creates a new document and returns a handle to it. The initial value of the document is an empty object {} unless an initial value is provided. Its documentId is generated by the system. we emit a document event to advertise interest in the document.

    -

    Type Parameters

    • T

    Parameters

    • Optional initialValue: T

    Returns DocHandle<T>

  • Calls each of the listeners registered for a given event.

    Type Parameters

    Parameters

    Returns boolean

  • Return an array listing the events for which the emitter has registered listeners.

    Returns (keyof RepoEvents)[]

  • Exports a document to a binary format.

    Parameters

    Returns Promise<undefined | Uint8Array>

    Promise<Uint8Array | undefined> - A Promise containing the binary document, or undefined if the document is unavailable.

    -
  • Imports document binary into the repo.

    +

Returns DocHandle<T>

  • Return the number of listeners listening to a given event.

    +

Returns DocHandle<T>

  • Return the number of listeners listening to a given event.

    Parameters

    Returns number

  • Return the listeners registered for a given event.

    -

    Type Parameters

    Parameters

    • event: T

    Returns ((...args) => void)[]

  • Returns {
        documents: {
            [key: string]: any;
        };
    }

    • documents: {
          [key: string]: any;
      }
      • [key: string]: any
  • Type Parameters

    Parameters

    • event: T
    • Optional fn: ((...args) => void)
    • Optional context: any
    • Optional once: boolean

    Returns this

  • Add a listener for a given event.

    +

    Type Parameters

    Parameters

    • event: T

    Returns ((...args) => void)[]

  • Returns {
        documents: {
            [key: string]: any;
        };
    }

    • documents: {
          [key: string]: any;
      }
      • [key: string]: any
  • Type Parameters

    Parameters

    • event: T
    • Optional fn: ((...args) => void)
    • Optional context: any
    • Optional once: boolean

    Returns this

  • Add a listener for a given event.

    Type Parameters

    Parameters

    • event: T
    • fn: ((...args) => void)
    • Optional context: any

    Returns this

  • Add a one-time listener for a given event.

    Type Parameters

    Parameters

    • event: T
    • fn: ((...args) => void)
    • Optional context: any

    Returns this

  • Remove all listeners, or those of the specified event.

    Parameters

    • Optional event: keyof RepoEvents

    Returns this

  • Remove the listeners of a given event.

    -

    Type Parameters

    Parameters

    • event: T
    • Optional fn: ((...args) => void)
    • Optional context: any
    • Optional once: boolean

    Returns this

\ No newline at end of file +

Type Parameters

Parameters

Returns this

\ No newline at end of file diff --git a/classes/_automerge_automerge_repo.StorageAdapter.html b/classes/_automerge_automerge_repo.StorageAdapter.html index 98f0b038a..dedf09169 100644 --- a/classes/_automerge_automerge_repo.StorageAdapter.html +++ b/classes/_automerge_automerge_repo.StorageAdapter.html @@ -1,15 +1,15 @@ -StorageAdapter | Automerge Repo - v2.0.0-alpha.9

A storage adapter represents some way of storing binary data for a Repo

+StorageAdapter | Automerge Repo - v2.0.0-alpha.10

A storage adapter represents some way of storing binary data for a Repo

Deprecated

use StorageAdapterInterface

Remarks

StorageAdapters provide a key/value storage interface. The keys are arrays of strings (StorageKey) and the values are binary blobs.

-

Implements

Constructors

Implements

Constructors

Methods

  • Load all values with keys that start with keyPrefix.

    Parameters

    Returns Promise<Chunk[]>

    Remarks

    The keyprefix will match any key that starts with the given array. For example:

    • [documentId, "incremental"] will match all incremental saves
    • @@ -17,7 +17,7 @@

      Remarks

      StorageAdapters provide a key/value storage inte

    Be careful! [documentId] would also match something like [documentId, "syncState"]! We aren't using this yet but keep it in mind.)

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/classes/_automerge_automerge_repo_network_broadcastchannel.BroadcastChannelNetworkAdapter.html b/classes/_automerge_automerge_repo_network_broadcastchannel.BroadcastChannelNetworkAdapter.html index 6b031fc99..cc9ae24d3 100644 --- a/classes/_automerge_automerge_repo_network_broadcastchannel.BroadcastChannelNetworkAdapter.html +++ b/classes/_automerge_automerge_repo_network_broadcastchannel.BroadcastChannelNetworkAdapter.html @@ -1,10 +1,10 @@ -BroadcastChannelNetworkAdapter | Automerge Repo - v2.0.0-alpha.9

An interface representing some way to connect to other peers

+BroadcastChannelNetworkAdapter | Automerge Repo - v2.0.0-alpha.10

An interface representing some way to connect to other peers

Remarks

The Repo uses one or more NetworkAdapters to connect to other peers. Because the network may take some time to be ready the Repo will wait until the adapter emits a ready event before it starts trying to use it

This utility class can be used as a base to build a custom network adapter. It is most useful as a simple way to add the necessary event emitter functionality

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

Constructors

Properties

peerId?: PeerId
peerMetadata?: PeerMetadata
prefixed: string | boolean

Methods

  • Called by the Repo to start the connection process

    +

Constructors

Properties

peerId?: PeerId
peerMetadata?: PeerMetadata
prefixed: string | boolean

Methods

  • Return the number of listeners listening to a given event.

    +

    Returns (keyof NetworkAdapterEvents)[]

  • Return the number of listeners listening to a given event.

    Parameters

    Returns number

  • Return the listeners registered for a given event.

    Type Parameters

    Parameters

    • event: T

    Returns ((...args) => void)[]

  • Type Parameters

    Parameters

    Returns this

  • Add a listener for a given event.

    Type Parameters

    Parameters

    Returns this

  • Add a one-time listener for a given event.

    @@ -38,4 +38,4 @@

    Argument

    peerMetadata - how this adapter should present itself to oth

    Parameters

    • Optional event: keyof NetworkAdapterEvents

    Returns this

  • Remove the listeners of a given event.

    Type Parameters

    Parameters

    Returns this

\ No newline at end of file +
\ No newline at end of file diff --git a/classes/_automerge_automerge_repo_network_messagechannel.MessageChannelNetworkAdapter.html b/classes/_automerge_automerge_repo_network_messagechannel.MessageChannelNetworkAdapter.html index fcf07ee37..12415ac47 100644 --- a/classes/_automerge_automerge_repo_network_messagechannel.MessageChannelNetworkAdapter.html +++ b/classes/_automerge_automerge_repo_network_messagechannel.MessageChannelNetworkAdapter.html @@ -1,10 +1,10 @@ -MessageChannelNetworkAdapter | Automerge Repo - v2.0.0-alpha.9

An interface representing some way to connect to other peers

+MessageChannelNetworkAdapter | Automerge Repo - v2.0.0-alpha.10

An interface representing some way to connect to other peers

Remarks

The Repo uses one or more NetworkAdapters to connect to other peers. Because the network may take some time to be ready the Repo will wait until the adapter emits a ready event before it starts trying to use it

This utility class can be used as a base to build a custom network adapter. It is most useful as a simple way to add the necessary event emitter functionality

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

Constructors

Properties

channels: {} = {}

Type declaration

    peerId?: PeerId
    peerMetadata?: PeerMetadata
    prefixed: string | boolean

    Methods

    • Called by the Repo to start the connection process

      +

    Constructors

    Properties

    channels: {} = {}

    Type declaration

      peerId?: PeerId
      peerMetadata?: PeerMetadata
      prefixed: string | boolean

      Methods

      • Return the number of listeners listening to a given event.

        +

        Returns (keyof NetworkAdapterEvents)[]

      • Return the number of listeners listening to a given event.

        Parameters

        Returns number

      • Return the listeners registered for a given event.

        Type Parameters

        Parameters

        • event: T

        Returns ((...args) => void)[]

      • Type Parameters

        Parameters

        Returns this

      • Add a listener for a given event.

        Type Parameters

        Parameters

        Returns this

      • Add a one-time listener for a given event.

        @@ -40,4 +40,4 @@

        Argument

        peerMetadata - how this adapter should present itself to oth

        Parameters

        • Optional event: keyof NetworkAdapterEvents

        Returns this

      • Remove the listeners of a given event.

        Type Parameters

        Parameters

        Returns this

      \ No newline at end of file +
      \ No newline at end of file diff --git a/classes/_automerge_automerge_repo_network_websocket.BrowserWebSocketClientAdapter.html b/classes/_automerge_automerge_repo_network_websocket.BrowserWebSocketClientAdapter.html index a2ce43bfc..f7fe349f9 100644 --- a/classes/_automerge_automerge_repo_network_websocket.BrowserWebSocketClientAdapter.html +++ b/classes/_automerge_automerge_repo_network_websocket.BrowserWebSocketClientAdapter.html @@ -1,4 +1,4 @@ -BrowserWebSocketClientAdapter | Automerge Repo - v2.0.0-alpha.9

      Hierarchy

      • WebSocketNetworkAdapter
        • BrowserWebSocketClientAdapter

      Constructors

      constructor +BrowserWebSocketClientAdapter | Automerge Repo - v2.0.0-alpha.10

      Hierarchy

      • WebSocketNetworkAdapter
        • BrowserWebSocketClientAdapter

      Constructors

      Properties

      Constructors

      Properties

      peerId?: PeerId
      peerMetadata?: PeerMetadata
      remotePeerId?: PeerId
      retryInterval: number = 5000
      socket?: WebSocket
      url: string
      prefixed: string | boolean

      Methods

      • Type Parameters

        Parameters

        Returns this

      • Calls each of the listeners registered for a given event.

        +

      Constructors

      Properties

      peerId?: PeerId
      peerMetadata?: PeerMetadata
      remotePeerId?: PeerId
      retryInterval: number = 5000
      socket?: WebSocket
      url: string
      prefixed: string | boolean

      Methods

      • Type Parameters

        Parameters

        Returns this

      • Calls each of the listeners registered for a given event.

        Type Parameters

        Parameters

        Returns boolean

      • Return an array listing the events for which the emitter has registered listeners.

        -

        Returns (keyof NetworkAdapterEvents)[]

      • Return the number of listeners listening to a given event.

        +

        Returns (keyof NetworkAdapterEvents)[]

      • Return the number of listeners listening to a given event.

        Parameters

        Returns number

      • Return the listeners registered for a given event.

        Type Parameters

        Parameters

        • event: T

        Returns ((...args) => void)[]

      • Type Parameters

        Parameters

        Returns this

      • Add a listener for a given event.

        -

        Type Parameters

        Parameters

        Returns this

      • Add a one-time listener for a given event.

        -

        Type Parameters

        Parameters

        Returns this

      • Remove all listeners, or those of the specified event.

        +

        Type Parameters

        Parameters

        Returns this

      • Add a one-time listener for a given event.

        +

        Type Parameters

        Parameters

        Returns this

      • Remove all listeners, or those of the specified event.

        Parameters

        • Optional event: keyof NetworkAdapterEvents

        Returns this

      • Remove the listeners of a given event.

        -

        Type Parameters

        Parameters

        Returns this

      \ No newline at end of file +

      Type Parameters

      Parameters

      Returns this

      \ No newline at end of file diff --git a/classes/_automerge_automerge_repo_network_websocket.NodeWSServerAdapter.html b/classes/_automerge_automerge_repo_network_websocket.NodeWSServerAdapter.html index 41abdd9af..65e86f459 100644 --- a/classes/_automerge_automerge_repo_network_websocket.NodeWSServerAdapter.html +++ b/classes/_automerge_automerge_repo_network_websocket.NodeWSServerAdapter.html @@ -1,10 +1,10 @@ -NodeWSServerAdapter | Automerge Repo - v2.0.0-alpha.9

      An interface representing some way to connect to other peers

      +NodeWSServerAdapter | Automerge Repo - v2.0.0-alpha.10

      An interface representing some way to connect to other peers

      Remarks

      The Repo uses one or more NetworkAdapters to connect to other peers. Because the network may take some time to be ready the Repo will wait until the adapter emits a ready event before it starts trying to use it

      This utility class can be used as a base to build a custom network adapter. It is most useful as a simple way to add the necessary event emitter functionality

      -

      Hierarchy (view full)

      Constructors

      Hierarchy (view full)

      Constructors

      Properties

      Constructors

      Properties

      peerId?: PeerId
      peerMetadata?: PeerMetadata
      sockets: {
          [peerId: PeerId]: WebSocket;
      } = {}

      Type declaration

      prefixed: string | boolean

      Methods

      • Called by the Repo to start the connection process

        +

      Constructors

      Properties

      peerId?: PeerId
      peerMetadata?: PeerMetadata
      sockets: {
          [peerId: PeerId]: WebSocket;
      } = {}

      Type declaration

      prefixed: string | boolean

      Methods

      • Return the number of listeners listening to a given event.

        +

        Returns (keyof NetworkAdapterEvents)[]

      • Return the number of listeners listening to a given event.

        Parameters

        Returns number

      • Return the listeners registered for a given event.

        Type Parameters

        Parameters

        • event: T

        Returns ((...args) => void)[]

      • Type Parameters

        Parameters

        Returns this

      • Add a listener for a given event.

        Type Parameters

        Parameters

        Returns this

      • Add a one-time listener for a given event.

        -

        Type Parameters

        Parameters

        Returns this

      • Remove all listeners, or those of the specified event.

        +

        Type Parameters

        Parameters

        Returns this

      • Remove all listeners, or those of the specified event.

        Parameters

        • Optional event: keyof NetworkAdapterEvents

        Returns this

      • Remove the listeners of a given event.

        Type Parameters

        Parameters

        Returns this

      \ No newline at end of file +
      \ No newline at end of file diff --git a/classes/_automerge_automerge_repo_storage_indexeddb.IndexedDBStorageAdapter.html b/classes/_automerge_automerge_repo_storage_indexeddb.IndexedDBStorageAdapter.html index 8fe9e2422..fe745a394 100644 --- a/classes/_automerge_automerge_repo_storage_indexeddb.IndexedDBStorageAdapter.html +++ b/classes/_automerge_automerge_repo_storage_indexeddb.IndexedDBStorageAdapter.html @@ -1,7 +1,7 @@ -IndexedDBStorageAdapter | Automerge Repo - v2.0.0-alpha.9

      A storage adapter represents some way of storing binary data for a Repo

      +IndexedDBStorageAdapter | Automerge Repo - v2.0.0-alpha.10

      A storage adapter represents some way of storing binary data for a Repo

      Remarks

      StorageAdapters provide a key/value storage interface. The keys are arrays of strings (StorageKey) and the values are binary blobs.

      -

      Implements

      Constructors

      Implements

      Constructors

      Methods

      load loadRange remove @@ -10,8 +10,8 @@

      Constructors

      Methods

      • Load the single value corresponding to key

        -

        Parameters

        • keyArray: string[]

        Returns Promise<undefined | Uint8Array>

      • Load all values with keys that start with keyPrefix.

        +

      Returns IndexedDBStorageAdapter

      Methods

      • Load the single value corresponding to key

        +

        Parameters

        • keyArray: string[]

        Returns Promise<undefined | Uint8Array>

      • Load all values with keys that start with keyPrefix.

        Parameters

        • keyPrefix: string[]

        Returns Promise<Chunk[]>

        Remarks

        The keyprefix will match any key that starts with the given array. For example:

        • [documentId, "incremental"] will match all incremental saves
        • @@ -19,7 +19,7 @@

        Be careful! [documentId] would also match something like [documentId, "syncState"]! We aren't using this yet but keep it in mind.)

        -
      • Save the value data to the key key

        -

        Parameters

        • keyArray: string[]
        • binary: Uint8Array

        Returns Promise<void>

      \ No newline at end of file +
      • Save the value data to the key key

        +

        Parameters

        • keyArray: string[]
        • binary: Uint8Array

        Returns Promise<void>

      \ No newline at end of file diff --git a/classes/_automerge_automerge_repo_storage_nodefs.NodeFSStorageAdapter.html b/classes/_automerge_automerge_repo_storage_nodefs.NodeFSStorageAdapter.html index 2cd5c604d..97db5ff06 100644 --- a/classes/_automerge_automerge_repo_storage_nodefs.NodeFSStorageAdapter.html +++ b/classes/_automerge_automerge_repo_storage_nodefs.NodeFSStorageAdapter.html @@ -1,15 +1,15 @@ -NodeFSStorageAdapter | Automerge Repo - v2.0.0-alpha.9

      A storage adapter represents some way of storing binary data for a Repo

      +NodeFSStorageAdapter | Automerge Repo - v2.0.0-alpha.10

      A storage adapter represents some way of storing binary data for a Repo

      Remarks

      StorageAdapters provide a key/value storage interface. The keys are arrays of strings (StorageKey) and the values are binary blobs.

      -

      Implements

      Constructors

      Implements

      Constructors

      Methods

      • Load all values with keys that start with keyPrefix.

        +

      Returns NodeFSStorageAdapter

      Methods

      • Load all values with keys that start with keyPrefix.

        Parameters

        Returns Promise<Chunk[]>

        Remarks

        The keyprefix will match any key that starts with the given array. For example:

        • [documentId, "incremental"] will match all incremental saves
        • @@ -17,7 +17,7 @@

        Be careful! [documentId] would also match something like [documentId, "syncState"]! We aren't using this yet but keep it in mind.)

        -
      \ No newline at end of file +
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.applyChanges.html b/functions/_automerge_automerge_repo.applyChanges.html index 4c46a59f4..80d69b488 100644 --- a/functions/_automerge_automerge_repo.applyChanges.html +++ b/functions/_automerge_automerge_repo.applyChanges.html @@ -1,7 +1,7 @@ -applyChanges | Automerge Repo - v2.0.0-alpha.9
      • Apply changes received from another document

        +applyChanges | Automerge Repo - v2.0.0-alpha.10
        • Apply changes received from another document

          doc will be updated to reflect the changes. If there are changes which we do not have dependencies for yet those will be stored in the document and applied when the depended on changes arrive.

          You can use the ApplyOptions to pass a patchcallback which will be informed of any changes which occur as a result of applying the changes

          -

          Type Parameters

          • T

          Parameters

          • doc: Doc<T>
          • changes: Uint8Array[]
          • Optional opts: ApplyOptions<T>

          Returns [Doc<T>]

        \ No newline at end of file +

        Type Parameters

        • T

        Parameters

        • doc: Doc<T>
        • changes: Uint8Array[]
        • Optional opts: ApplyOptions<T>

        Returns [Doc<T>]

      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.deleteAt.html b/functions/_automerge_automerge_repo.deleteAt.html index 23589946b..04c312a32 100644 --- a/functions/_automerge_automerge_repo.deleteAt.html +++ b/functions/_automerge_automerge_repo.deleteAt.html @@ -1,2 +1,2 @@ -deleteAt | Automerge Repo - v2.0.0-alpha.9
      • Function for use in change which deletes values from a list at a given index

        -

        Type Parameters

        • T

        Parameters

        • list: T[]
        • index: number
        • Optional numDelete: number

        Returns void

      \ No newline at end of file +deleteAt | Automerge Repo - v2.0.0-alpha.10
      • Function for use in change which deletes values from a list at a given index

        +

        Type Parameters

        • T

        Parameters

        • list: T[]
        • index: number
        • Optional numDelete: number

        Returns void

      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.generateAutomergeUrl.html b/functions/_automerge_automerge_repo.generateAutomergeUrl.html index e28e12bf9..a7ec8a0f1 100644 --- a/functions/_automerge_automerge_repo.generateAutomergeUrl.html +++ b/functions/_automerge_automerge_repo.generateAutomergeUrl.html @@ -1,2 +1,2 @@ -generateAutomergeUrl | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file +generateAutomergeUrl | Automerge Repo - v2.0.0-alpha.10
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.getAllChanges.html b/functions/_automerge_automerge_repo.getAllChanges.html index 77c9b16b2..098431c6f 100644 --- a/functions/_automerge_automerge_repo.getAllChanges.html +++ b/functions/_automerge_automerge_repo.getAllChanges.html @@ -1,4 +1,4 @@ -getAllChanges | Automerge Repo - v2.0.0-alpha.9
      • Get all the changes in a document

        +getAllChanges | Automerge Repo - v2.0.0-alpha.10
        • Get all the changes in a document

          This is different to save because the output is an array of changes which can be individually applied via applyChanges`

          -

          Type Parameters

          • T

          Parameters

          Returns Change[]

        \ No newline at end of file +

        Type Parameters

        • T

        Parameters

        Returns Change[]

      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.getChanges.html b/functions/_automerge_automerge_repo.getChanges.html index 3c2554aaf..24a8709e4 100644 --- a/functions/_automerge_automerge_repo.getChanges.html +++ b/functions/_automerge_automerge_repo.getChanges.html @@ -1,4 +1,4 @@ -getChanges | Automerge Repo - v2.0.0-alpha.9
      • Get the changes which are in newState but not in oldState. The returned +getChanges | Automerge Repo - v2.0.0-alpha.10

        • Get the changes which are in newState but not in oldState. The returned changes can be loaded in oldState via applyChanges.

          Note that this will crash if there are changes in oldState which are not in newState.

          -

          Type Parameters

          • T

          Parameters

          Returns Change[]

        \ No newline at end of file +

        Type Parameters

        • T

        Parameters

        Returns Change[]

      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.getConflicts.html b/functions/_automerge_automerge_repo.getConflicts.html index f93fdd571..520c943dd 100644 --- a/functions/_automerge_automerge_repo.getConflicts.html +++ b/functions/_automerge_automerge_repo.getConflicts.html @@ -1,4 +1,4 @@ -getConflicts | Automerge Repo - v2.0.0-alpha.9
      • Get the conflicts associated with a property

        +getConflicts | Automerge Repo - v2.0.0-alpha.10
        • Get the conflicts associated with a property

          The values of properties in a map in automerge can be conflicted if there are concurrent "put" operations to the same key. Automerge chooses one value arbitrarily (but deterministically, any two nodes who have the same set of @@ -8,4 +8,4 @@ getConflicts to get the conflicts for the key.

          Type Parameters

          • T

          Parameters

          Returns Conflicts | undefined

          Example

          import * as automerge from "@automerge/automerge"

          type Profile = {
          pets: Array<{name: string, type: string}>
          }

          let doc1 = automerge.init<Profile>("aaaa")
          doc1 = automerge.change(doc1, d => {
          d.pets = [{name: "Lassie", type: "dog"}]
          })
          let doc2 = automerge.init<Profile>("bbbb")
          doc2 = automerge.merge(doc2, automerge.clone(doc1))

          doc2 = automerge.change(doc2, d => {
          d.pets[0].name = "Beethoven"
          })

          doc1 = automerge.change(doc1, d => {
          d.pets[0].name = "Babe"
          })

          const doc3 = automerge.merge(doc1, doc2)

          // Note that here we pass `doc3.pets`, not `doc3`
          let conflicts = automerge.getConflicts(doc3.pets[0], "name")

          // The two conflicting values are the keys of the conflicts object
          assert.deepEqual(Object.values(conflicts), ["Babe", "Beethoven"])
          -
        \ No newline at end of file +
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.getCursor.html b/functions/_automerge_automerge_repo.getCursor.html index be917116a..396056636 100644 --- a/functions/_automerge_automerge_repo.getCursor.html +++ b/functions/_automerge_automerge_repo.getCursor.html @@ -1,4 +1,4 @@ -getCursor | Automerge Repo - v2.0.0-alpha.9
      • Returns a cursor for the given position in a string.

        +getCursor | Automerge Repo - v2.0.0-alpha.10
        • Returns a cursor for the given position in a string.

          Type Parameters

          • T

            The type of the value contained in the document

          Parameters

          • doc: Doc<T>

            The document

          • path: Prop[]

            The path to the string

            @@ -10,4 +10,4 @@

            The string representation is shareable, and so you can use this both to edit the document yourself (using splice) or to share multiple collaborator's current cursor positions over the network.

            -
        \ No newline at end of file +
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.getCursorPosition.html b/functions/_automerge_automerge_repo.getCursorPosition.html index 9725d2346..6a57087d4 100644 --- a/functions/_automerge_automerge_repo.getCursorPosition.html +++ b/functions/_automerge_automerge_repo.getCursorPosition.html @@ -1,5 +1,5 @@ -getCursorPosition | Automerge Repo - v2.0.0-alpha.9
      • Returns the current index of the cursor.

        +getCursorPosition | Automerge Repo - v2.0.0-alpha.10
        • Returns the current index of the cursor.

          Type Parameters

          • T

            The type of the value contained in the document

          Parameters

          • doc: Doc<T>

            The document

          • path: Prop[]

            The path to the string

            -
          • cursor: string

          Returns number

        \ No newline at end of file +
      • cursor: string

      Returns number

      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.insertAt.html b/functions/_automerge_automerge_repo.insertAt.html index 1b55a3e90..551f672ec 100644 --- a/functions/_automerge_automerge_repo.insertAt.html +++ b/functions/_automerge_automerge_repo.insertAt.html @@ -1,2 +1,2 @@ -insertAt | Automerge Repo - v2.0.0-alpha.9
      • Function for use in change which inserts values into a list at a given index

        -

        Type Parameters

        • T

        Parameters

        • list: T[]
        • index: number
        • Rest ...values: T[]

        Returns void

      \ No newline at end of file +insertAt | Automerge Repo - v2.0.0-alpha.10
      • Function for use in change which inserts values into a list at a given index

        +

        Type Parameters

        • T

        Parameters

        • list: T[]
        • index: number
        • Rest ...values: T[]

        Returns void

      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.interpretAsDocumentId.html b/functions/_automerge_automerge_repo.interpretAsDocumentId.html index 011929850..c67107845 100644 --- a/functions/_automerge_automerge_repo.interpretAsDocumentId.html +++ b/functions/_automerge_automerge_repo.interpretAsDocumentId.html @@ -1,4 +1,4 @@ -interpretAsDocumentId | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.isRepoMessage.html b/functions/_automerge_automerge_repo.isRepoMessage.html index a9ddb2bef..8ad2f1d35 100644 --- a/functions/_automerge_automerge_repo.isRepoMessage.html +++ b/functions/_automerge_automerge_repo.isRepoMessage.html @@ -1 +1 @@ -isRepoMessage | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file +isRepoMessage | Automerge Repo - v2.0.0-alpha.10
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.isValidAutomergeUrl.html b/functions/_automerge_automerge_repo.isValidAutomergeUrl.html index 70a4b8f55..51f1e00ca 100644 --- a/functions/_automerge_automerge_repo.isValidAutomergeUrl.html +++ b/functions/_automerge_automerge_repo.isValidAutomergeUrl.html @@ -1,3 +1,3 @@ -isValidAutomergeUrl | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.isValidDocumentId.html b/functions/_automerge_automerge_repo.isValidDocumentId.html index cf07964a8..5276d4b0a 100644 --- a/functions/_automerge_automerge_repo.isValidDocumentId.html +++ b/functions/_automerge_automerge_repo.isValidDocumentId.html @@ -1 +1 @@ -isValidDocumentId | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file +isValidDocumentId | Automerge Repo - v2.0.0-alpha.10
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.mark-1.html b/functions/_automerge_automerge_repo.mark-1.html index 76b988d2e..8bb9e7dbc 100644 --- a/functions/_automerge_automerge_repo.mark-1.html +++ b/functions/_automerge_automerge_repo.mark-1.html @@ -1 +1 @@ -mark | Automerge Repo - v2.0.0-alpha.9
      • Type Parameters

        • T

        Parameters

        Returns void

      \ No newline at end of file +mark | Automerge Repo - v2.0.0-alpha.10
      • Type Parameters

        • T

        Parameters

        Returns void

      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.parseAutomergeUrl.html b/functions/_automerge_automerge_repo.parseAutomergeUrl.html index 11c2ceb5c..9e1605125 100644 --- a/functions/_automerge_automerge_repo.parseAutomergeUrl.html +++ b/functions/_automerge_automerge_repo.parseAutomergeUrl.html @@ -1,2 +1,2 @@ -parseAutomergeUrl | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file +parseAutomergeUrl | Automerge Repo - v2.0.0-alpha.10
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.splice.html b/functions/_automerge_automerge_repo.splice.html index 77ae2e44b..ba2ca70ed 100644 --- a/functions/_automerge_automerge_repo.splice.html +++ b/functions/_automerge_automerge_repo.splice.html @@ -1,4 +1,4 @@ -splice | Automerge Repo - v2.0.0-alpha.9
      • Modify a string

        +splice | Automerge Repo - v2.0.0-alpha.10
        • Modify a string

          Type Parameters

          • T

            The type of the value contained in the document

          Parameters

          • doc: Doc<T>

            The document to modify

          • path: Prop[]

            The path to the string to modify

            @@ -10,4 +10,4 @@ deletes N characters after the cursor, a negative number deletes N characters before the cursor.

          • Optional newText: string

            The string to insert (if any).

            -

          Returns void

        \ No newline at end of file +

      Returns void

      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.stringifyAutomergeUrl.html b/functions/_automerge_automerge_repo.stringifyAutomergeUrl.html index 2787e1287..8d3db1d01 100644 --- a/functions/_automerge_automerge_repo.stringifyAutomergeUrl.html +++ b/functions/_automerge_automerge_repo.stringifyAutomergeUrl.html @@ -1,3 +1,3 @@ -stringifyAutomergeUrl | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.unmark.html b/functions/_automerge_automerge_repo.unmark.html index 1546a7d2f..964f5f4d2 100644 --- a/functions/_automerge_automerge_repo.unmark.html +++ b/functions/_automerge_automerge_repo.unmark.html @@ -1 +1 @@ -unmark | Automerge Repo - v2.0.0-alpha.9
      • Type Parameters

        • T

        Parameters

        Returns void

      \ No newline at end of file +unmark | Automerge Repo - v2.0.0-alpha.10
      • Type Parameters

        • T

        Parameters

        Returns void

      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.updateText.html b/functions/_automerge_automerge_repo.updateText.html index 23123d710..46194776b 100644 --- a/functions/_automerge_automerge_repo.updateText.html +++ b/functions/_automerge_automerge_repo.updateText.html @@ -1,4 +1,4 @@ -updateText | Automerge Repo - v2.0.0-alpha.9
      • Beta

        Update the value of a string

        +updateText | Automerge Repo - v2.0.0-alpha.10
        • Beta

          Update the value of a string

          Parameters

          • doc: Doc<unknown>

            The document to modify

          • path: Prop[]

            The path to the string to modify

          • newText: string

            The new text to update the value to

            @@ -8,4 +8,4 @@ sometimes it's not possible to capture user input and this is the best you can do.

            This is an experimental API and may change in the future.

            -
        \ No newline at end of file +
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.view.html b/functions/_automerge_automerge_repo.view.html index 6e35994bf..ab474d426 100644 --- a/functions/_automerge_automerge_repo.view.html +++ b/functions/_automerge_automerge_repo.view.html @@ -1,4 +1,4 @@ -view | Automerge Repo - v2.0.0-alpha.9
      • Make an immutable view of an automerge document as at heads

        +view | Automerge Repo - v2.0.0-alpha.10
        • Make an immutable view of an automerge document as at heads

          Type Parameters

          • T

            The type of the value contained in the document

          Parameters

          • doc: Doc<T>

            The document to create a view of

          • heads: Heads

            The hashes of the heads to create a view at

            @@ -7,4 +7,4 @@ consequently a very cheap copy.

            Note that this function will throw an error if any of the hashes in heads are not in the document.

            -
        \ No newline at end of file +
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo_react_hooks.useDocument.html b/functions/_automerge_automerge_repo_react_hooks.useDocument.html index 3ff0cfeb5..d7f5a9fb3 100644 --- a/functions/_automerge_automerge_repo_react_hooks.useDocument.html +++ b/functions/_automerge_automerge_repo_react_hooks.useDocument.html @@ -1,5 +1,5 @@ -useDocument | Automerge Repo - v2.0.0-alpha.9
      • A hook which returns a document identified by a URL and a function to change the document.

        +useDocument | Automerge Repo - v2.0.0-alpha.10
        • A hook which returns a document identified by a URL and a function to change the document.

          Type Parameters

          • T

          Parameters

          Returns [Doc<T> | undefined, ((changeFn, options?) => void)]

          a tuple of the document and a function to change the document. The document will be undefined if the document is not available in storage or from any peers

          Remarks

          This requires a RepoContext to be provided by a parent component.

          -
        \ No newline at end of file +
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo_react_hooks.useDocuments.html b/functions/_automerge_automerge_repo_react_hooks.useDocuments.html index 394515ef9..0c7cd6e75 100644 --- a/functions/_automerge_automerge_repo_react_hooks.useDocuments.html +++ b/functions/_automerge_automerge_repo_react_hooks.useDocuments.html @@ -1,5 +1,5 @@ -useDocuments | Automerge Repo - v2.0.0-alpha.9
      • Maintains a map of document states, keyed by DocumentId. Useful for collections of related +useDocuments | Automerge Repo - v2.0.0-alpha.10

        • Maintains a map of document states, keyed by DocumentId. Useful for collections of related documents. Accepts either URLs or document IDs in the input array, but all get converted to IDs for the output map.

          -

          Type Parameters

          • T

          Parameters

          • Optional idsOrUrls: DocId[]

          Returns Record<DocumentId, T>

        \ No newline at end of file +

        Type Parameters

        • T

        Parameters

        • Optional idsOrUrls: DocId[]

        Returns Record<DocumentId, T>

      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo_react_hooks.useHandle.html b/functions/_automerge_automerge_repo_react_hooks.useHandle.html index c1345daa6..3a5ee004d 100644 --- a/functions/_automerge_automerge_repo_react_hooks.useHandle.html +++ b/functions/_automerge_automerge_repo_react_hooks.useHandle.html @@ -1,3 +1,3 @@ -useHandle | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo_react_hooks.useLocalAwareness.html b/functions/_automerge_automerge_repo_react_hooks.useLocalAwareness.html index 9d634b6a0..7bb5d5dbf 100644 --- a/functions/_automerge_automerge_repo_react_hooks.useLocalAwareness.html +++ b/functions/_automerge_automerge_repo_react_hooks.useLocalAwareness.html @@ -1,8 +1,8 @@ -useLocalAwareness | Automerge Repo - v2.0.0-alpha.9
      • This hook maintains state for the local client. +useLocalAwareness | Automerge Repo - v2.0.0-alpha.10

        • This hook maintains state for the local client. Like React.useState, it returns a [state, setState] array. It is intended to be used alongside useRemoteAwareness.

          When state is changed it is broadcast to all clients. It also broadcasts a heartbeat to let other clients know it is online.

          Note that userIds aren't secure (yet). Any client can lie about theirs.

          Parameters

          Returns any[]

          [state, setState]

          -
        \ No newline at end of file +
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo_react_hooks.useRemoteAwareness.html b/functions/_automerge_automerge_repo_react_hooks.useRemoteAwareness.html index a75204a3e..9782a955b 100644 --- a/functions/_automerge_automerge_repo_react_hooks.useRemoteAwareness.html +++ b/functions/_automerge_automerge_repo_react_hooks.useRemoteAwareness.html @@ -1,5 +1,5 @@ -useRemoteAwareness | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo_react_hooks.useRepo.html b/functions/_automerge_automerge_repo_react_hooks.useRepo.html index 5ac6c5b2a..85be586a2 100644 --- a/functions/_automerge_automerge_repo_react_hooks.useRepo.html +++ b/functions/_automerge_automerge_repo_react_hooks.useRepo.html @@ -1,2 +1,2 @@ -useRepo | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file +useRepo | Automerge Repo - v2.0.0-alpha.10
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo_svelte_store.document.html b/functions/_automerge_automerge_repo_svelte_store.document.html index bb645134e..914dd9a41 100644 --- a/functions/_automerge_automerge_repo_svelte_store.document.html +++ b/functions/_automerge_automerge_repo_svelte_store.document.html @@ -1,8 +1,8 @@ -document | Automerge Repo - v2.0.0-alpha.9
      • A Svelte store for an Automerge document.

        +document | Automerge Repo - v2.0.0-alpha.10
        • A Svelte store for an Automerge document.

          Type Parameters

          • T

          Parameters

          • documentId: AutomergeUrl

            The Automerge document ID

          • Optional repo: Repo

            (Optional) The Automerge repo to use. If not provided, the repo will be retrieved from context.

          Returns {
              change: ((fn) => void);
              subscribe: ((this, run, invalidate?) => Unsubscriber);
          }

          A Svelte store for the Automerge document.

          • change: ((fn) => void)
              • (fn): void
              • Parameters

                Returns void

          • subscribe: ((this, run, invalidate?) => Unsubscriber)
              • (this, run, invalidate?): Unsubscriber
              • Subscribe on value changes.

                Parameters

                • this: void
                • run: Subscriber<Doc<T>>

                  subscription callback

                • Optional invalidate: Invalidator<Doc<T>>

                  cleanup callback

                  -

                Returns Unsubscriber

        \ No newline at end of file +

      Returns Unsubscriber

      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo_svelte_store.getContextRepo.html b/functions/_automerge_automerge_repo_svelte_store.getContextRepo.html index f5ed11f56..0f640e8af 100644 --- a/functions/_automerge_automerge_repo_svelte_store.getContextRepo.html +++ b/functions/_automerge_automerge_repo_svelte_store.getContextRepo.html @@ -1 +1 @@ -getContextRepo | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file +getContextRepo | Automerge Repo - v2.0.0-alpha.10
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo_svelte_store.setContextRepo.html b/functions/_automerge_automerge_repo_svelte_store.setContextRepo.html index 1e30c8af6..04fc81831 100644 --- a/functions/_automerge_automerge_repo_svelte_store.setContextRepo.html +++ b/functions/_automerge_automerge_repo_svelte_store.setContextRepo.html @@ -1 +1 @@ -setContextRepo | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file +setContextRepo | Automerge Repo - v2.0.0-alpha.10
      \ No newline at end of file diff --git a/hierarchy.html b/hierarchy.html index c091e63c1..a5eef3d64 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -1 +1 @@ -Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file +Automerge Repo - v2.0.0-alpha.10
      \ No newline at end of file diff --git a/index.html b/index.html index bfe8c8aa1..a74823c4f 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,3 @@ -Automerge Repo - v2.0.0-alpha.9

      Automerge Repo - v2.0.0-alpha.9

      Automerge Repo

      Automerge Repo is a wrapper for the Automerge CRDT library which provides facilities to support working with many documents at once, as well as pluggable networking and storage.

      +Automerge Repo - v2.0.0-alpha.10

      Automerge Repo - v2.0.0-alpha.10

      Automerge Repo

      Automerge Repo is a wrapper for the Automerge CRDT library which provides facilities to support working with many documents at once, as well as pluggable networking and storage.

      The core types of this library are in the automerge-repo package. The various automerge-repo-network-* packages contain network adapters for use with various transports whilst the automerge-repo-storage-* packages contain storage adapters. Check the documentation of automerge-repo for more info about network and storage adapters.

      -
      \ No newline at end of file +
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.DeleteDocumentPayload.html b/interfaces/_automerge_automerge_repo.DeleteDocumentPayload.html index a212aaf5b..a620140ef 100644 --- a/interfaces/_automerge_automerge_repo.DeleteDocumentPayload.html +++ b/interfaces/_automerge_automerge_repo.DeleteDocumentPayload.html @@ -1,2 +1,2 @@ -DeleteDocumentPayload | Automerge Repo - v2.0.0-alpha.9
      interface DeleteDocumentPayload {
          documentId: DocumentId;
      }

      Properties

      Properties

      documentId: DocumentId
      \ No newline at end of file +DeleteDocumentPayload | Automerge Repo - v2.0.0-alpha.10
      interface DeleteDocumentPayload {
          documentId: DocumentId;
      }

      Properties

      Properties

      documentId: DocumentId
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.DocHandleChangePayload.html b/interfaces/_automerge_automerge_repo.DocHandleChangePayload.html index f246849bf..40af71e7b 100644 --- a/interfaces/_automerge_automerge_repo.DocHandleChangePayload.html +++ b/interfaces/_automerge_automerge_repo.DocHandleChangePayload.html @@ -1,10 +1,10 @@ -DocHandleChangePayload | Automerge Repo - v2.0.0-alpha.9

      Emitted when this document has changed

      -
      interface DocHandleChangePayload<T> {
          doc: Doc<T>;
          handle: DocHandle<T>;
          patchInfo: PatchInfo<T>;
          patches: Patch[];
      }

      Type Parameters

      • T

      Properties

      doc +DocHandleChangePayload | Automerge Repo - v2.0.0-alpha.10

      Emitted when this document has changed

      +
      interface DocHandleChangePayload<T> {
          doc: Doc<T>;
          handle: DocHandle<T>;
          patchInfo: PatchInfo<T>;
          patches: Patch[];
      }

      Type Parameters

      • T

      Properties

      doc: Doc<T>

      The value of the document after the change

      -
      handle: DocHandle<T>

      The handle that changed

      -
      patchInfo: PatchInfo<T>

      Information about the change

      -
      patches: Patch[]

      The patches representing the change that occurred

      -
      \ No newline at end of file +
      handle: DocHandle<T>

      The handle that changed

      +
      patchInfo: PatchInfo<T>

      Information about the change

      +
      patches: Patch[]

      The patches representing the change that occurred

      +
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.DocHandleDeletePayload.html b/interfaces/_automerge_automerge_repo.DocHandleDeletePayload.html index 8f6d9fe8b..f0fb67fc3 100644 --- a/interfaces/_automerge_automerge_repo.DocHandleDeletePayload.html +++ b/interfaces/_automerge_automerge_repo.DocHandleDeletePayload.html @@ -1,3 +1,3 @@ -DocHandleDeletePayload | Automerge Repo - v2.0.0-alpha.9

      Emitted when this document is deleted

      -
      interface DocHandleDeletePayload<T> {
          handle: DocHandle<T>;
      }

      Type Parameters

      • T

      Properties

      Properties

      handle: DocHandle<T>
      \ No newline at end of file +DocHandleDeletePayload | Automerge Repo - v2.0.0-alpha.10

      Emitted when this document is deleted

      +
      interface DocHandleDeletePayload<T> {
          handle: DocHandle<T>;
      }

      Type Parameters

      • T

      Properties

      Properties

      handle: DocHandle<T>
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.DocHandleEncodedChangePayload.html b/interfaces/_automerge_automerge_repo.DocHandleEncodedChangePayload.html index e72eb9fe1..3743fb08f 100644 --- a/interfaces/_automerge_automerge_repo.DocHandleEncodedChangePayload.html +++ b/interfaces/_automerge_automerge_repo.DocHandleEncodedChangePayload.html @@ -1,4 +1,4 @@ -DocHandleEncodedChangePayload | Automerge Repo - v2.0.0-alpha.9

      Emitted when this document's heads have changed

      -
      interface DocHandleEncodedChangePayload<T> {
          doc: Doc<T>;
          handle: DocHandle<T>;
      }

      Type Parameters

      • T

      Properties

      doc +DocHandleEncodedChangePayload | Automerge Repo - v2.0.0-alpha.10

      Emitted when this document's heads have changed

      +
      interface DocHandleEncodedChangePayload<T> {
          doc: Doc<T>;
          handle: DocHandle<T>;
      }

      Type Parameters

      • T

      Properties

      Properties

      doc: Doc<T>
      handle: DocHandle<T>
      \ No newline at end of file +

      Properties

      doc: Doc<T>
      handle: DocHandle<T>
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.DocHandleEphemeralMessagePayload.html b/interfaces/_automerge_automerge_repo.DocHandleEphemeralMessagePayload.html index a2a57bb99..41c46bdcb 100644 --- a/interfaces/_automerge_automerge_repo.DocHandleEphemeralMessagePayload.html +++ b/interfaces/_automerge_automerge_repo.DocHandleEphemeralMessagePayload.html @@ -1,5 +1,5 @@ -DocHandleEphemeralMessagePayload | Automerge Repo - v2.0.0-alpha.9

      Emitted when an ephemeral message is received for the document

      -
      interface DocHandleEphemeralMessagePayload<T> {
          handle: DocHandle<T>;
          message: unknown;
          senderId: PeerId;
      }

      Type Parameters

      • T

      Properties

      handle +DocHandleEphemeralMessagePayload | Automerge Repo - v2.0.0-alpha.10

      Emitted when an ephemeral message is received for the document

      +
      interface DocHandleEphemeralMessagePayload<T> {
          handle: DocHandle<T>;
          message: unknown;
          senderId: PeerId;
      }

      Type Parameters

      • T

      Properties

      Properties

      handle: DocHandle<T>
      message: unknown
      senderId: PeerId
      \ No newline at end of file +

      Properties

      handle: DocHandle<T>
      message: unknown
      senderId: PeerId
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.DocHandleEvents.html b/interfaces/_automerge_automerge_repo.DocHandleEvents.html index 057759ff1..d688cacbf 100644 --- a/interfaces/_automerge_automerge_repo.DocHandleEvents.html +++ b/interfaces/_automerge_automerge_repo.DocHandleEvents.html @@ -1,9 +1,9 @@ -DocHandleEvents | Automerge Repo - v2.0.0-alpha.9

      These are the events that this DocHandle emits to external listeners

      -
      interface DocHandleEvents<T> {
          change: ((payload) => void);
          delete: ((payload) => void);
          ephemeral-message: ((payload) => void);
          ephemeral-message-outbound: ((payload) => void);
          heads-changed: ((payload) => void);
          remote-heads: ((payload) => void);
          unavailable: ((payload) => void);
      }

      Type Parameters

      • T

      Properties

      change +DocHandleEvents | Automerge Repo - v2.0.0-alpha.10

      These are the events that this DocHandle emits to external listeners

      +
      interface DocHandleEvents<T> {
          change: ((payload) => void);
          delete: ((payload) => void);
          ephemeral-message: ((payload) => void);
          ephemeral-message-outbound: ((payload) => void);
          heads-changed: ((payload) => void);
          remote-heads: ((payload) => void);
          unavailable: ((payload) => void);
      }

      Type Parameters

      • T

      Properties

      change: ((payload) => void)

      Type declaration

      delete: ((payload) => void)

      Type declaration

      ephemeral-message: ((payload) => void)

      Type declaration

      ephemeral-message-outbound: ((payload) => void)

      Type declaration

      heads-changed: ((payload) => void)

      Type declaration

      remote-heads: ((payload) => void)

      Type declaration

      unavailable: ((payload) => void)

      Type declaration

        • (payload): void
        • Parameters

          • payload: DocHandleUnavailablePayload<T>

          Returns void

      \ No newline at end of file +

      Properties

      change: ((payload) => void)

      Type declaration

      delete: ((payload) => void)

      Type declaration

      ephemeral-message: ((payload) => void)

      Type declaration

      ephemeral-message-outbound: ((payload) => void)

      Type declaration

      heads-changed: ((payload) => void)

      Type declaration

      remote-heads: ((payload) => void)

      Type declaration

      unavailable: ((payload) => void)

      Type declaration

        • (payload): void
        • Parameters

          • payload: DocHandleUnavailablePayload<T>

          Returns void

      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.DocHandleOutboundEphemeralMessagePayload.html b/interfaces/_automerge_automerge_repo.DocHandleOutboundEphemeralMessagePayload.html index 2f87d1a7c..e42f30112 100644 --- a/interfaces/_automerge_automerge_repo.DocHandleOutboundEphemeralMessagePayload.html +++ b/interfaces/_automerge_automerge_repo.DocHandleOutboundEphemeralMessagePayload.html @@ -1,4 +1,4 @@ -DocHandleOutboundEphemeralMessagePayload | Automerge Repo - v2.0.0-alpha.9

      Interface DocHandleOutboundEphemeralMessagePayload<T>

      Emitted when an ephemeral message is sent for this document

      -
      interface DocHandleOutboundEphemeralMessagePayload<T> {
          data: Uint8Array;
          handle: DocHandle<T>;
      }

      Type Parameters

      • T

      Properties

      data +DocHandleOutboundEphemeralMessagePayload | Automerge Repo - v2.0.0-alpha.10

      Interface DocHandleOutboundEphemeralMessagePayload<T>

      Emitted when an ephemeral message is sent for this document

      +
      interface DocHandleOutboundEphemeralMessagePayload<T> {
          data: Uint8Array;
          handle: DocHandle<T>;
      }

      Type Parameters

      • T

      Properties

      Properties

      data: Uint8Array
      handle: DocHandle<T>
      \ No newline at end of file +

      Properties

      data: Uint8Array
      handle: DocHandle<T>
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.DocHandleRemoteHeadsPayload.html b/interfaces/_automerge_automerge_repo.DocHandleRemoteHeadsPayload.html index e762ed72f..c6f823332 100644 --- a/interfaces/_automerge_automerge_repo.DocHandleRemoteHeadsPayload.html +++ b/interfaces/_automerge_automerge_repo.DocHandleRemoteHeadsPayload.html @@ -1,4 +1,4 @@ -DocHandleRemoteHeadsPayload | Automerge Repo - v2.0.0-alpha.9

      Emitted when we have new remote heads for this document

      -
      interface DocHandleRemoteHeadsPayload {
          heads: Heads;
          storageId: StorageId;
      }

      Properties

      heads +DocHandleRemoteHeadsPayload | Automerge Repo - v2.0.0-alpha.10

      Emitted when we have new remote heads for this document

      +
      interface DocHandleRemoteHeadsPayload {
          heads: Heads;
          storageId: StorageId;
      }

      Properties

      Properties

      heads: Heads
      storageId: StorageId
      \ No newline at end of file +

      Properties

      heads: Heads
      storageId: StorageId
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.DocumentPayload.html b/interfaces/_automerge_automerge_repo.DocumentPayload.html index f8ba91f96..ed68c6094 100644 --- a/interfaces/_automerge_automerge_repo.DocumentPayload.html +++ b/interfaces/_automerge_automerge_repo.DocumentPayload.html @@ -1,2 +1,2 @@ -DocumentPayload | Automerge Repo - v2.0.0-alpha.9
      interface DocumentPayload {
          handle: DocHandle<any>;
      }

      Properties

      Properties

      handle: DocHandle<any>
      \ No newline at end of file +DocumentPayload | Automerge Repo - v2.0.0-alpha.10
      interface DocumentPayload {
          handle: DocHandle<any>;
      }

      Properties

      Properties

      handle: DocHandle<any>
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.MarkSet.html b/interfaces/_automerge_automerge_repo.MarkSet.html index 5c2c8ef39..c89047ee9 100644 --- a/interfaces/_automerge_automerge_repo.MarkSet.html +++ b/interfaces/_automerge_automerge_repo.MarkSet.html @@ -1 +1 @@ -MarkSet | Automerge Repo - v2.0.0-alpha.9
      interface MarkSet {
          [name: string]: ScalarValue;
      }

      Indexable

      [name: string]: ScalarValue
      \ No newline at end of file +MarkSet | Automerge Repo - v2.0.0-alpha.10
      interface MarkSet {
          [name: string]: ScalarValue;
      }

      Indexable

      [name: string]: ScalarValue
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.NetworkAdapterEvents.html b/interfaces/_automerge_automerge_repo.NetworkAdapterEvents.html index d0154da74..7d7fb2256 100644 --- a/interfaces/_automerge_automerge_repo.NetworkAdapterEvents.html +++ b/interfaces/_automerge_automerge_repo.NetworkAdapterEvents.html @@ -1,9 +1,9 @@ -NetworkAdapterEvents | Automerge Repo - v2.0.0-alpha.9
      interface NetworkAdapterEvents {
          close: (() => void);
          message: ((payload) => void);
          peer-candidate: ((payload) => void);
          peer-disconnected: ((payload) => void);
      }

      Properties

      close +NetworkAdapterEvents | Automerge Repo - v2.0.0-alpha.10
      interface NetworkAdapterEvents {
          close: (() => void);
          message: ((payload) => void);
          peer-candidate: ((payload) => void);
          peer-disconnected: ((payload) => void);
      }

      Properties

      close: (() => void)

      Emitted when the network is closed

      -

      Type declaration

        • (): void
        • Returns void

      message: ((payload) => void)

      Emitted when the network adapter receives a message from a peer

      -

      Type declaration

        • (payload): void
        • Parameters

          Returns void

      peer-candidate: ((payload) => void)

      Emitted when the network adapter learns about a new peer

      -

      Type declaration

      peer-disconnected: ((payload) => void)

      Emitted when the network adapter learns that a peer has disconnected

      -

      Type declaration

      \ No newline at end of file +

      Type declaration

        • (): void
        • Returns void

      message: ((payload) => void)

      Emitted when the network adapter receives a message from a peer

      +

      Type declaration

        • (payload): void
        • Parameters

          Returns void

      peer-candidate: ((payload) => void)

      Emitted when the network adapter learns about a new peer

      +

      Type declaration

      peer-disconnected: ((payload) => void)

      Emitted when the network adapter learns that a peer has disconnected

      +

      Type declaration

      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.NetworkAdapterInterface.html b/interfaces/_automerge_automerge_repo.NetworkAdapterInterface.html index 6e9abef98..e7372ca96 100644 --- a/interfaces/_automerge_automerge_repo.NetworkAdapterInterface.html +++ b/interfaces/_automerge_automerge_repo.NetworkAdapterInterface.html @@ -1,11 +1,11 @@ -NetworkAdapterInterface | Automerge Repo - v2.0.0-alpha.9

      An interface representing some way to connect to other peers

      +NetworkAdapterInterface | Automerge Repo - v2.0.0-alpha.10

      An interface representing some way to connect to other peers

      Remarks

      The Repo uses one or more NetworkAdapters to connect to other peers. Because the network may take some time to be ready the Repo will wait until the adapter emits a ready event before it starts trying to use it

      The NetworkAdapter is an abstract class that can be used as a base to build a custom network adapter. It is most useful as a simple way to add the necessary event emitter functionality

      -
      interface NetworkAdapterInterface {
          peerId?: PeerId;
          peerMetadata?: PeerMetadata;
          addListener<T>(event, fn, context?): this;
          connect(peerId, peerMetadata?): void;
          disconnect(): void;
          emit<T>(event, ...args): boolean;
          eventNames(): (keyof NetworkAdapterEvents)[];
          isReady(): boolean;
          listenerCount(event): number;
          listeners<T>(event): ((...args) => void)[];
          off<T>(event, fn?, context?, once?): this;
          on<T>(event, fn, context?): this;
          once<T>(event, fn, context?): this;
          removeAllListeners(event?): this;
          removeListener<T>(event, fn?, context?, once?): this;
          send(message): void;
          whenReady(): Promise<void>;
      }

      Hierarchy

      Implemented by

      Properties

      interface NetworkAdapterInterface {
          peerId?: PeerId;
          peerMetadata?: PeerMetadata;
          addListener<T>(event, fn, context?): this;
          connect(peerId, peerMetadata?): void;
          disconnect(): void;
          emit<T>(event, ...args): boolean;
          eventNames(): (keyof NetworkAdapterEvents)[];
          isReady(): boolean;
          listenerCount(event): number;
          listeners<T>(event): ((...args) => void)[];
          off<T>(event, fn?, context?, once?): this;
          on<T>(event, fn, context?): this;
          once<T>(event, fn, context?): this;
          removeAllListeners(event?): this;
          removeListener<T>(event, fn?, context?, once?): this;
          send(message): void;
          whenReady(): Promise<void>;
      }

      Hierarchy

      Implemented by

      Properties

      Methods

      Properties

      peerId?: PeerId
      peerMetadata?: PeerMetadata

      Methods

      • Type Parameters

        Parameters

        Returns this

      • Called by the Repo to start the connection process

        +

      Properties

      peerId?: PeerId
      peerMetadata?: PeerMetadata

      Methods

      • Type Parameters

        Parameters

        Returns this

      • Calls each of the listeners registered for a given event.

        Type Parameters

        Parameters

        Returns boolean

      • Return an array listing the events for which the emitter has registered listeners.

        -

        Returns (keyof NetworkAdapterEvents)[]

      • Return the number of listeners listening to a given event.

        +

        Returns (keyof NetworkAdapterEvents)[]

      • Return the number of listeners listening to a given event.

        Parameters

        Returns number

      • Return the listeners registered for a given event.

        Type Parameters

        Parameters

        • event: T

        Returns ((...args) => void)[]

      • Type Parameters

        Parameters

        Returns this

      • Add a listener for a given event.

        Type Parameters

        Parameters

        Returns this

      • Add a one-time listener for a given event.

        @@ -37,4 +37,4 @@

        Argument

        peerMetadata - how this adapter should present itself to oth

        Parameters

        • Optional event: keyof NetworkAdapterEvents

        Returns this

      • Remove the listeners of a given event.

        Type Parameters

        Parameters

        Returns this

      \ No newline at end of file +
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.OpenPayload.html b/interfaces/_automerge_automerge_repo.OpenPayload.html index 306a841e5..1af0277cb 100644 --- a/interfaces/_automerge_automerge_repo.OpenPayload.html +++ b/interfaces/_automerge_automerge_repo.OpenPayload.html @@ -1,2 +1,2 @@ -OpenPayload | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file +OpenPayload | Automerge Repo - v2.0.0-alpha.10
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.PeerCandidatePayload.html b/interfaces/_automerge_automerge_repo.PeerCandidatePayload.html index f6732119a..ef6b21c89 100644 --- a/interfaces/_automerge_automerge_repo.PeerCandidatePayload.html +++ b/interfaces/_automerge_automerge_repo.PeerCandidatePayload.html @@ -1,3 +1,3 @@ -PeerCandidatePayload | Automerge Repo - v2.0.0-alpha.9
      interface PeerCandidatePayload {
          peerId: PeerId;
          peerMetadata: PeerMetadata;
      }

      Properties

      peerId +PeerCandidatePayload | Automerge Repo - v2.0.0-alpha.10
      \ No newline at end of file +

      Properties

      peerId: PeerId
      peerMetadata: PeerMetadata
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.PeerDisconnectedPayload.html b/interfaces/_automerge_automerge_repo.PeerDisconnectedPayload.html index 477f8f21c..2ee4cec20 100644 --- a/interfaces/_automerge_automerge_repo.PeerDisconnectedPayload.html +++ b/interfaces/_automerge_automerge_repo.PeerDisconnectedPayload.html @@ -1,2 +1,2 @@ -PeerDisconnectedPayload | Automerge Repo - v2.0.0-alpha.9
      interface PeerDisconnectedPayload {
          peerId: PeerId;
      }

      Properties

      Properties

      peerId: PeerId
      \ No newline at end of file +PeerDisconnectedPayload | Automerge Repo - v2.0.0-alpha.10
      interface PeerDisconnectedPayload {
          peerId: PeerId;
      }

      Properties

      Properties

      peerId: PeerId
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.PeerMetadata.html b/interfaces/_automerge_automerge_repo.PeerMetadata.html index cdf1f82b7..64c23d08b 100644 --- a/interfaces/_automerge_automerge_repo.PeerMetadata.html +++ b/interfaces/_automerge_automerge_repo.PeerMetadata.html @@ -1,6 +1,6 @@ -PeerMetadata | Automerge Repo - v2.0.0-alpha.9

      Describes a peer intent to the system +PeerMetadata | Automerge Repo - v2.0.0-alpha.10

      Describes a peer intent to the system storageId: the key for syncState to decide what the other peer already has isEphemeral: to decide if we bother recording this peer's sync state

      -
      interface PeerMetadata {
          isEphemeral?: boolean;
          storageId?: StorageId;
      }

      Properties

      interface PeerMetadata {
          isEphemeral?: boolean;
          storageId?: StorageId;
      }

      Properties

      isEphemeral?: boolean
      storageId?: StorageId
      \ No newline at end of file +

      Properties

      isEphemeral?: boolean
      storageId?: StorageId
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.RepoConfig.html b/interfaces/_automerge_automerge_repo.RepoConfig.html index a71770f5c..305746112 100644 --- a/interfaces/_automerge_automerge_repo.RepoConfig.html +++ b/interfaces/_automerge_automerge_repo.RepoConfig.html @@ -1,15 +1,15 @@ -RepoConfig | Automerge Repo - v2.0.0-alpha.9
      interface RepoConfig {
          enableRemoteHeadsGossiping?: boolean;
          isEphemeral?: boolean;
          network?: NetworkAdapterInterface[];
          peerId?: PeerId;
          sharePolicy?: SharePolicy;
          storage?: StorageAdapterInterface;
      }

      Properties

      enableRemoteHeadsGossiping? +RepoConfig | Automerge Repo - v2.0.0-alpha.10
      interface RepoConfig {
          enableRemoteHeadsGossiping?: boolean;
          isEphemeral?: boolean;
          network?: NetworkAdapterInterface[];
          peerId?: PeerId;
          sharePolicy?: SharePolicy;
          storage?: StorageAdapterInterface;
      }

      Properties

      enableRemoteHeadsGossiping?: boolean

      Whether to enable the experimental remote heads gossiping feature

      -
      isEphemeral?: boolean

      Indicates whether other peers should persist the sync state of this peer. +

      isEphemeral?: boolean

      Indicates whether other peers should persist the sync state of this peer. Sync state is only persisted for non-ephemeral peers

      -

      A list of network adapters (more can be added at runtime).

      -
      peerId?: PeerId

      Our unique identifier

      -
      sharePolicy?: SharePolicy

      Normal peers typically share generously with everyone (meaning we sync all our documents with +

      A list of network adapters (more can be added at runtime).

      +
      peerId?: PeerId

      Our unique identifier

      +
      sharePolicy?: SharePolicy

      Normal peers typically share generously with everyone (meaning we sync all our documents with all peers). A server only syncs documents that a peer explicitly requests by ID.

      -

      A storage adapter can be provided, or not

      -
      \ No newline at end of file +

      A storage adapter can be provided, or not

      +
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.RepoEvents.html b/interfaces/_automerge_automerge_repo.RepoEvents.html index 7ccfb5406..5f873a6dc 100644 --- a/interfaces/_automerge_automerge_repo.RepoEvents.html +++ b/interfaces/_automerge_automerge_repo.RepoEvents.html @@ -1,7 +1,7 @@ -RepoEvents | Automerge Repo - v2.0.0-alpha.9
      interface RepoEvents {
          delete-document: ((arg) => void);
          document: ((arg) => void);
          unavailable-document: ((arg) => void);
      }

      Properties

      delete-document +RepoEvents | Automerge Repo - v2.0.0-alpha.10
      interface RepoEvents {
          delete-document: ((arg) => void);
          document: ((arg) => void);
          unavailable-document: ((arg) => void);
      }

      Properties

      delete-document: ((arg) => void)

      A document was deleted

      -

      Type declaration

      document: ((arg) => void)

      A new document was created or discovered

      -

      Type declaration

      unavailable-document: ((arg) => void)

      A document was marked as unavailable (we don't have it and none of our peers have it)

      -

      Type declaration

      \ No newline at end of file +

      Type declaration

      document: ((arg) => void)

      A new document was created or discovered

      +

      Type declaration

      unavailable-document: ((arg) => void)

      A document was marked as unavailable (we don't have it and none of our peers have it)

      +

      Type declaration

      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.StorageAdapterInterface.html b/interfaces/_automerge_automerge_repo.StorageAdapterInterface.html index de3e9ed5e..df1ad5f09 100644 --- a/interfaces/_automerge_automerge_repo.StorageAdapterInterface.html +++ b/interfaces/_automerge_automerge_repo.StorageAdapterInterface.html @@ -1,13 +1,13 @@ -StorageAdapterInterface | Automerge Repo - v2.0.0-alpha.9

      A storage adapter represents some way of storing binary data for a Repo

      +StorageAdapterInterface | Automerge Repo - v2.0.0-alpha.10

      A storage adapter represents some way of storing binary data for a Repo

      Remarks

      StorageAdapters provide a key/value storage interface. The keys are arrays of strings (StorageKey) and the values are binary blobs.

      -
      interface StorageAdapterInterface {
          load(key): Promise<undefined | Uint8Array>;
          loadRange(keyPrefix): Promise<Chunk[]>;
          remove(key): Promise<void>;
          removeRange(keyPrefix): Promise<void>;
          save(key, data): Promise<void>;
      }

      Implemented by

      Methods

      interface StorageAdapterInterface {
          load(key): Promise<undefined | Uint8Array>;
          loadRange(keyPrefix): Promise<Chunk[]>;
          remove(key): Promise<void>;
          removeRange(keyPrefix): Promise<void>;
          save(key, data): Promise<void>;
      }

      Implemented by

      Methods

      • Load all values with keys that start with keyPrefix.

        Parameters

        Returns Promise<Chunk[]>

        Remarks

        The keyprefix will match any key that starts with the given array. For example:

        • [documentId, "incremental"] will match all incremental saves
        • @@ -15,7 +15,7 @@

        Be careful! [documentId] would also match something like [documentId, "syncState"]! We aren't using this yet but keep it in mind.)

        -
      \ No newline at end of file +
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo_network_messagechannel.MessageChannelNetworkAdapterConfig.html b/interfaces/_automerge_automerge_repo_network_messagechannel.MessageChannelNetworkAdapterConfig.html index a0f54e54b..92036952b 100644 --- a/interfaces/_automerge_automerge_repo_network_messagechannel.MessageChannelNetworkAdapterConfig.html +++ b/interfaces/_automerge_automerge_repo_network_messagechannel.MessageChannelNetworkAdapterConfig.html @@ -1,8 +1,8 @@ -MessageChannelNetworkAdapterConfig | Automerge Repo - v2.0.0-alpha.9
      interface MessageChannelNetworkAdapterConfig {
          useWeakRef?: boolean;
      }

      Properties

      useWeakRef? +MessageChannelNetworkAdapterConfig | Automerge Repo - v2.0.0-alpha.10
      interface MessageChannelNetworkAdapterConfig {
          useWeakRef?: boolean;
      }

      Properties

      Properties

      useWeakRef?: boolean

      This is an optional parameter to use a weak ref to reference the message port that is passed to the adapter. This option is useful when using a message channel with a shared worker. If you use a network adapter with useWeakRef = true in the shared worker and in the main thread network adapters with strong refs the network adapter will be automatically garbage collected if you close a page. The garbage collection doesn't happen immediately; there might be some time in between when the page is closed and when the port is garbage collected

      -
      \ No newline at end of file +
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo_react_hooks.UseLocalAwarenessProps.html b/interfaces/_automerge_automerge_repo_react_hooks.UseLocalAwarenessProps.html index b9acafb6d..6b85fca3e 100644 --- a/interfaces/_automerge_automerge_repo_react_hooks.UseLocalAwarenessProps.html +++ b/interfaces/_automerge_automerge_repo_react_hooks.UseLocalAwarenessProps.html @@ -1,9 +1,9 @@ -UseLocalAwarenessProps | Automerge Repo - v2.0.0-alpha.9
      interface UseLocalAwarenessProps {
          handle: DocHandle<unknown>;
          heartbeatTime?: number;
          initialState: any;
          userId: string;
      }

      Properties

      handle +UseLocalAwarenessProps | Automerge Repo - v2.0.0-alpha.10
      interface UseLocalAwarenessProps {
          handle: DocHandle<unknown>;
          heartbeatTime?: number;
          initialState: any;
          userId: string;
      }

      Properties

      handle: DocHandle<unknown>

      The document handle to send ephemeral state on

      -
      heartbeatTime?: number

      How frequently to send heartbeats

      -
      initialState: any

      The initial state object/primitive we should advertise

      -
      userId: string

      Our user ID *

      -
      \ No newline at end of file +
      heartbeatTime?: number

      How frequently to send heartbeats

      +
      initialState: any

      The initial state object/primitive we should advertise

      +
      userId: string

      Our user ID *

      +
      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo_react_hooks.UseRemoteAwarenessProps.html b/interfaces/_automerge_automerge_repo_react_hooks.UseRemoteAwarenessProps.html index e18f9e68a..79c0e1c91 100644 --- a/interfaces/_automerge_automerge_repo_react_hooks.UseRemoteAwarenessProps.html +++ b/interfaces/_automerge_automerge_repo_react_hooks.UseRemoteAwarenessProps.html @@ -1,9 +1,9 @@ -UseRemoteAwarenessProps | Automerge Repo - v2.0.0-alpha.9
      interface UseRemoteAwarenessProps<T> {
          getTime?: (() => number);
          handle: DocHandle<T>;
          localUserId?: string;
          offlineTimeout?: number;
      }

      Type Parameters

      • T

      Properties

      getTime? +UseRemoteAwarenessProps | Automerge Repo - v2.0.0-alpha.10
      interface UseRemoteAwarenessProps<T> {
          getTime?: (() => number);
          handle: DocHandle<T>;
          localUserId?: string;
          offlineTimeout?: number;
      }

      Type Parameters

      • T

      Properties

      getTime?: (() => number)

      Function to provide current epoch time

      -

      Type declaration

        • (): number
        • Returns number

      handle: DocHandle<T>

      The handle to receive ephemeral state on

      -
      localUserId?: string

      Our user ID

      -
      offlineTimeout?: number

      How long to wait (in ms) before marking a peer as offline

      -
      \ No newline at end of file +

      Type declaration

        • (): number
        • Returns number

      handle: DocHandle<T>

      The handle to receive ephemeral state on

      +
      localUserId?: string

      Our user ID

      +
      offlineTimeout?: number

      How long to wait (in ms) before marking a peer as offline

      +
      \ No newline at end of file diff --git a/modules/_automerge_automerge_repo.html b/modules/_automerge_automerge_repo.html index 226dcb269..4193e1af9 100644 --- a/modules/_automerge_automerge_repo.html +++ b/modules/_automerge_automerge_repo.html @@ -1,4 +1,4 @@ -@automerge/automerge-repo - v2.0.0-alpha.8 | Automerge Repo - v2.0.0-alpha.9

      Module @automerge/automerge-repo - v2.0.0-alpha.8

      The automerge CRDT +@automerge/automerge-repo - v2.0.0-alpha.9 | Automerge Repo - v2.0.0-alpha.10

      Module @automerge/automerge-repo - v2.0.0-alpha.9

      The 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.

      @@ -88,4 +88,4 @@ unmark updateText view -
      \ No newline at end of file +
      \ No newline at end of file diff --git a/modules/_automerge_automerge_repo_network_broadcastchannel.html b/modules/_automerge_automerge_repo_network_broadcastchannel.html index e692e7427..191d9fd5b 100644 --- a/modules/_automerge_automerge_repo_network_broadcastchannel.html +++ b/modules/_automerge_automerge_repo_network_broadcastchannel.html @@ -1,4 +1,4 @@ -@automerge/automerge-repo-network-broadcastchannel - v2.0.0-alpha.8 | Automerge Repo - v2.0.0-alpha.9

      Module @automerge/automerge-repo-network-broadcastchannel - v2.0.0-alpha.8

      A NetworkAdapter which uses BroadcastChannel +@automerge/automerge-repo-network-broadcastchannel - v2.0.0-alpha.9 | Automerge Repo - v2.0.0-alpha.10

      Module @automerge/automerge-repo-network-broadcastchannel - v2.0.0-alpha.9

      A NetworkAdapter which uses BroadcastChannel to communicate with other peers in the same browser tab. This is a bit of a hack because NetworkAdapters are supposed to be used as point to point communication channels. To get around this the BroadcastChannelNetworkAdapter @@ -9,4 +9,4 @@ automerge-repo-network-messagechannel.

      Index

      Classes

      Type Aliases

      \ No newline at end of file +
      \ No newline at end of file diff --git a/modules/_automerge_automerge_repo_network_messagechannel.html b/modules/_automerge_automerge_repo_network_messagechannel.html index 68dd29516..847b6c307 100644 --- a/modules/_automerge_automerge_repo_network_messagechannel.html +++ b/modules/_automerge_automerge_repo_network_messagechannel.html @@ -1,6 +1,6 @@ -@automerge/automerge-repo-network-messagechannel - v2.0.0-alpha.8 | Automerge Repo - v2.0.0-alpha.9

      Module @automerge/automerge-repo-network-messagechannel - v2.0.0-alpha.8

      A NetworkAdapter which uses MessageChannel +@automerge/automerge-repo-network-messagechannel - v2.0.0-alpha.9 | Automerge Repo - v2.0.0-alpha.10

      Module @automerge/automerge-repo-network-messagechannel - v2.0.0-alpha.9

      A NetworkAdapter which uses MessageChannel to communicate with other peers. This is useful for communicating between browser tabs and web workers (including shared workers).

      Index

      Classes

      Interfaces

      \ No newline at end of file +
      \ No newline at end of file diff --git a/modules/_automerge_automerge_repo_network_websocket.html b/modules/_automerge_automerge_repo_network_websocket.html index 8233742ef..367f06bb6 100644 --- a/modules/_automerge_automerge_repo_network_websocket.html +++ b/modules/_automerge_automerge_repo_network_websocket.html @@ -1,4 +1,4 @@ -@automerge/automerge-repo-network-websocket - v2.0.0-alpha.8 | Automerge Repo - v2.0.0-alpha.9

      Module @automerge/automerge-repo-network-websocket - v2.0.0-alpha.8

      A NetworkAdapter which connects to a remote host via WebSockets

      +@automerge/automerge-repo-network-websocket - v2.0.0-alpha.9 | Automerge Repo - v2.0.0-alpha.10

      Module @automerge/automerge-repo-network-websocket - v2.0.0-alpha.9

      A NetworkAdapter which connects to a remote host via WebSockets

      The websocket protocol requires a server to be listening and a client to connect to the server. To that end the NodeWSServerAdapter does not make outbound connections and instead listens on the provided socket for @@ -15,4 +15,4 @@ PeerMessage ProtocolVersion

      Variables

      \ No newline at end of file +
      \ No newline at end of file diff --git a/modules/_automerge_automerge_repo_react_hooks.html b/modules/_automerge_automerge_repo_react_hooks.html index c48f9b304..7e5fec404 100644 --- a/modules/_automerge_automerge_repo_react_hooks.html +++ b/modules/_automerge_automerge_repo_react_hooks.html @@ -1,4 +1,4 @@ -@automerge/automerge-repo-react-hooks - v2.0.0-alpha.8 | Automerge Repo - v2.0.0-alpha.9

      Module @automerge/automerge-repo-react-hooks - v2.0.0-alpha.8

      React Hooks for Automerge Repo

      These hooks are provided as helpers for using Automerge in your React project.

      +@automerge/automerge-repo-react-hooks - v2.0.0-alpha.9 | Automerge Repo - v2.0.0-alpha.10

      Module @automerge/automerge-repo-react-hooks - v2.0.0-alpha.9

      React Hooks for Automerge Repo

      These hooks are provided as helpers for using Automerge in your React project.

      useRepo/RepoContext

      Use RepoContext to set up react context for an Automerge repo. Use useRepo to lookup the repo from context. Most hooks depend on RepoContext being available.

      @@ -18,4 +18,4 @@ useLocalAwareness useRemoteAwareness useRepo -
      \ No newline at end of file +
      \ No newline at end of file diff --git a/modules/_automerge_automerge_repo_storage_indexeddb.html b/modules/_automerge_automerge_repo_storage_indexeddb.html index e17e00165..7cdcbf745 100644 --- a/modules/_automerge_automerge_repo_storage_indexeddb.html +++ b/modules/_automerge_automerge_repo_storage_indexeddb.html @@ -1,3 +1,3 @@ -@automerge/automerge-repo-storage-indexeddb - v2.0.0-alpha.8 | Automerge Repo - v2.0.0-alpha.9

      Module @automerge/automerge-repo-storage-indexeddb - v2.0.0-alpha.8

      This module provides a storage adapter for IndexedDB.

      +@automerge/automerge-repo-storage-indexeddb - v2.0.0-alpha.9 | Automerge Repo - v2.0.0-alpha.10

      Module @automerge/automerge-repo-storage-indexeddb - v2.0.0-alpha.9

      This module provides a storage adapter for IndexedDB.

      Index

      Classes

      \ No newline at end of file +
      \ No newline at end of file diff --git a/modules/_automerge_automerge_repo_storage_nodefs.html b/modules/_automerge_automerge_repo_storage_nodefs.html index 117e41a11..743b6a20e 100644 --- a/modules/_automerge_automerge_repo_storage_nodefs.html +++ b/modules/_automerge_automerge_repo_storage_nodefs.html @@ -1,3 +1,3 @@ -@automerge/automerge-repo-storage-nodefs - v2.0.0-alpha.8 | Automerge Repo - v2.0.0-alpha.9

      Module @automerge/automerge-repo-storage-nodefs - v2.0.0-alpha.8

      A StorageAdapter which stores data in the local filesystem

      +@automerge/automerge-repo-storage-nodefs - v2.0.0-alpha.9 | Automerge Repo - v2.0.0-alpha.10

      Module @automerge/automerge-repo-storage-nodefs - v2.0.0-alpha.9

      A StorageAdapter which stores data in the local filesystem

      Index

      Classes

      \ No newline at end of file +
      \ No newline at end of file diff --git a/modules/_automerge_automerge_repo_svelte_store.html b/modules/_automerge_automerge_repo_svelte_store.html index 1505eac7d..567c967c6 100644 --- a/modules/_automerge_automerge_repo_svelte_store.html +++ b/modules/_automerge_automerge_repo_svelte_store.html @@ -1,4 +1,4 @@ -@automerge/automerge-repo-svelte-store - v2.0.0-alpha.8 | Automerge Repo - v2.0.0-alpha.9

      Module @automerge/automerge-repo-svelte-store - v2.0.0-alpha.8

      Svelte store for Automerge Repo

      Example Usage

      For a working example, see the Svelte counter demo.

      +@automerge/automerge-repo-svelte-store - v2.0.0-alpha.9 | Automerge Repo - v2.0.0-alpha.10

      Module @automerge/automerge-repo-svelte-store - v2.0.0-alpha.9

      Example

      // App.svelte
      <script lang="ts">
      import { Repo } from "@automerge/automerge-repo"
      import Counter from './lib/Counter.svelte'
      import { setContextRepo } from "@automerge/automerge-repo-svelte-store"

      const repo = new Repo({storage: new SomeStorage() })

      // Make the `Repo` available to child components (via Svelte's `setContext`).
      setContextRepo(repo)

      const docId = repo.create()
      </script>

      <main>
      <div class="card">
      <Counter {docId}/>
      </div>
      </main>
      // Counter.svelte`
      <script lang="ts">
      import type { DocumentId } from "@automerge/automerge-repo"
      import { document } from "@automerge/automerge-repo-svelte-store"

      export let docId: DocumentId

      // `document` calls `getContextRepo` internally to access the closest `Repo`.
      // alternatively, you may pass in a specific repo as the second parameter
      const doc = document<{count?: number}>(docId)
      const increment = () => {
      doc.change((d) => d.count = (d.count || 0) + 1)
      }
      </script>

      <button on:click={increment}>
      count is {$doc?.count || 0}
      </button> @@ -8,4 +8,4 @@

      Index

      Functions

      \ No newline at end of file +
      \ No newline at end of file diff --git a/modules/_automerge_create_repo_node_app.html b/modules/_automerge_create_repo_node_app.html index 55f273728..7de8d921d 100644 --- a/modules/_automerge_create_repo_node_app.html +++ b/modules/_automerge_create_repo_node_app.html @@ -1,7 +1,7 @@ -@automerge/create-repo-node-app | Automerge Repo - v2.0.0-alpha.9

      Module @automerge/create-repo-node-app

      Scaffolding for a node automerge-repo app

      This generates a simple javascript project with the necessary dependencies for a repo which synchronises over websockets and stores data in the filesystem.

      +@automerge/create-repo-node-app | Automerge Repo - v2.0.0-alpha.10

      Module @automerge/create-repo-node-app

      Scaffolding for a node automerge-repo app

      This generates a simple javascript project with the necessary dependencies for a repo which synchronises over websockets and stores data in the filesystem.

      How to use

      NPM

      npm create @automerge/repo-node-app <your project name>
       

      Yarn

      yarn create @automerge/repo-node-app <your project name>
       

      Now change into the directory and start editing index.js

      -
      \ No newline at end of file +
      \ No newline at end of file diff --git a/modules/_automerge_create_vite_app.html b/modules/_automerge_create_vite_app.html index 9df508c08..86d19c312 100644 --- a/modules/_automerge_create_vite_app.html +++ b/modules/_automerge_create_vite_app.html @@ -1,4 +1,4 @@ -@automerge/create-vite-app | Automerge Repo - v2.0.0-alpha.9

      Module @automerge/create-vite-app

      Automerge Repo

      Automerge Repo is a wrapper for the Automerge CRDT library +@automerge/create-vite-app | Automerge Repo - v2.0.0-alpha.10

      Module @automerge/create-vite-app

      Automerge Repo

      Automerge Repo is a wrapper for the Automerge CRDT library which provides facilities to support working with many documents at once, as well as pluggable networking and storage.

      Getting started

      After cloning this repo, run pnpm install and pnpm build.

      @@ -44,4 +44,4 @@

      Please note that a reference sync-server peer which demonstrates the use of automerge-repo-network-websocket is available at automerge-repo-sync-server (this is different from sync-server).

      -
      \ No newline at end of file +
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.ActorId.html b/types/_automerge_automerge_repo.ActorId.html index 4fab8da29..230a51d3d 100644 --- a/types/_automerge_automerge_repo.ActorId.html +++ b/types/_automerge_automerge_repo.ActorId.html @@ -1 +1 @@ -ActorId | Automerge Repo - v2.0.0-alpha.9
      ActorId: string
      \ No newline at end of file +ActorId | Automerge Repo - v2.0.0-alpha.10
      ActorId: string
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.AnyDocumentId.html b/types/_automerge_automerge_repo.AnyDocumentId.html index 13218ad30..f227ecfd8 100644 --- a/types/_automerge_automerge_repo.AnyDocumentId.html +++ b/types/_automerge_automerge_repo.AnyDocumentId.html @@ -1 +1 @@ -AnyDocumentId | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file +AnyDocumentId | Automerge Repo - v2.0.0-alpha.10
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.AutomergeUrl.html b/types/_automerge_automerge_repo.AutomergeUrl.html index 9088e15bc..7917287ef 100644 --- a/types/_automerge_automerge_repo.AutomergeUrl.html +++ b/types/_automerge_automerge_repo.AutomergeUrl.html @@ -1,2 +1,2 @@ -AutomergeUrl | Automerge Repo - v2.0.0-alpha.9
      AutomergeUrl: string & {
          __documentUrl: true;
      }

      A branded string representing a URL for a document, in the form automerge:<base58check encoded string>; for example, automerge:4NMNnkMhL8jXrdJ9jamS58PAVdXu.

      -

      Type declaration

      • __documentUrl: true
      \ No newline at end of file +AutomergeUrl | Automerge Repo - v2.0.0-alpha.10
      AutomergeUrl: string & {
          __documentUrl: true;
      }

      A branded string representing a URL for a document, in the form automerge:<base58check encoded string>; for example, automerge:4NMNnkMhL8jXrdJ9jamS58PAVdXu.

      +

      Type declaration

      • __documentUrl: true
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.BinaryDocumentId.html b/types/_automerge_automerge_repo.BinaryDocumentId.html index 753926909..2c2fe9cea 100644 --- a/types/_automerge_automerge_repo.BinaryDocumentId.html +++ b/types/_automerge_automerge_repo.BinaryDocumentId.html @@ -1,2 +1,2 @@ -BinaryDocumentId | Automerge Repo - v2.0.0-alpha.9
      BinaryDocumentId: Uint8Array & {
          __binaryDocumentId: true;
      }

      The unencoded UUID of a document. Typically you should use a AutomergeUrl instead.

      -

      Type declaration

      • __binaryDocumentId: true
      \ No newline at end of file +BinaryDocumentId | Automerge Repo - v2.0.0-alpha.10
      BinaryDocumentId: Uint8Array & {
          __binaryDocumentId: true;
      }

      The unencoded UUID of a document. Typically you should use a AutomergeUrl instead.

      +

      Type declaration

      • __binaryDocumentId: true
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.Change.html b/types/_automerge_automerge_repo.Change.html index 6507eeb5b..25f590243 100644 --- a/types/_automerge_automerge_repo.Change.html +++ b/types/_automerge_automerge_repo.Change.html @@ -1 +1 @@ -Change | Automerge Repo - v2.0.0-alpha.9
      Change: Uint8Array
      \ No newline at end of file +Change | Automerge Repo - v2.0.0-alpha.10
      Change: Uint8Array
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.ChangeFn.html b/types/_automerge_automerge_repo.ChangeFn.html index 23fe1a725..be7a3431c 100644 --- a/types/_automerge_automerge_repo.ChangeFn.html +++ b/types/_automerge_automerge_repo.ChangeFn.html @@ -1,4 +1,4 @@ -ChangeFn | Automerge Repo - v2.0.0-alpha.9
      ChangeFn<T>: ((doc) => void)

      Function which is called by change when making changes to a Doc<T>

      +ChangeFn | Automerge Repo - v2.0.0-alpha.10
      ChangeFn<T>: ((doc) => void)

      Function which is called by change when making changes to a Doc<T>

      Type Parameters

      • T

        The type of value contained in the document

        This function may mutate doc

        -

      Type declaration

        • (doc): void
        • Parameters

          • doc: T

          Returns void

      \ No newline at end of file +

      Type declaration

        • (doc): void
        • Parameters

          • doc: T

          Returns void

      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.Chunk.html b/types/_automerge_automerge_repo.Chunk.html index ee8fc08b2..5681833d6 100644 --- a/types/_automerge_automerge_repo.Chunk.html +++ b/types/_automerge_automerge_repo.Chunk.html @@ -1,2 +1,2 @@ -Chunk | Automerge Repo - v2.0.0-alpha.9
      Chunk: {
          data: Uint8Array | undefined;
          key: StorageKey;
      }

      A chunk is a snapshot or incremental change that is stored in a StorageAdapter.

      -

      Type declaration

      \ No newline at end of file +Chunk | Automerge Repo - v2.0.0-alpha.10
      Chunk: {
          data: Uint8Array | undefined;
          key: StorageKey;
      }

      A chunk is a snapshot or incremental change that is stored in a StorageAdapter.

      +

      Type declaration

      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.ChunkInfo.html b/types/_automerge_automerge_repo.ChunkInfo.html index ee9cff6d9..b4ed390c2 100644 --- a/types/_automerge_automerge_repo.ChunkInfo.html +++ b/types/_automerge_automerge_repo.ChunkInfo.html @@ -1,3 +1,3 @@ -ChunkInfo | Automerge Repo - v2.0.0-alpha.9
      ChunkInfo: {
          key: StorageKey;
          size: number;
          type: ChunkType;
      }

      Metadata about a chunk of data loaded from storage. This is stored on the StorageSubsystem so +ChunkInfo | Automerge Repo - v2.0.0-alpha.10

      ChunkInfo: {
          key: StorageKey;
          size: number;
          type: ChunkType;
      }

      Metadata about a chunk of data loaded from storage. This is stored on the StorageSubsystem so when we are compacting we know what chunks we can safely delete.

      -

      Type declaration

      \ No newline at end of file +

      Type declaration

      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.ChunkType.html b/types/_automerge_automerge_repo.ChunkType.html index 1bd685ce3..247fed526 100644 --- a/types/_automerge_automerge_repo.ChunkType.html +++ b/types/_automerge_automerge_repo.ChunkType.html @@ -1 +1 @@ -ChunkType | Automerge Repo - v2.0.0-alpha.9
      ChunkType: "snapshot" | "incremental"
      \ No newline at end of file +ChunkType | Automerge Repo - v2.0.0-alpha.10
      ChunkType: "snapshot" | "incremental"
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.Cursor.html b/types/_automerge_automerge_repo.Cursor.html index bdfddf894..860446233 100644 --- a/types/_automerge_automerge_repo.Cursor.html +++ b/types/_automerge_automerge_repo.Cursor.html @@ -1 +1 @@ -Cursor | Automerge Repo - v2.0.0-alpha.9
      Cursor: string
      \ No newline at end of file +Cursor | Automerge Repo - v2.0.0-alpha.10
      Cursor: string
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.Doc.html b/types/_automerge_automerge_repo.Doc.html index ae189a9f7..acbb39e16 100644 --- a/types/_automerge_automerge_repo.Doc.html +++ b/types/_automerge_automerge_repo.Doc.html @@ -1,5 +1,5 @@ -Doc | Automerge Repo - v2.0.0-alpha.9
      Doc<T>: {
          readonly [P in keyof T]: T[P]
      }

      An automerge document.

      +Doc | Automerge Repo - v2.0.0-alpha.10
      Doc<T>: {
          readonly [P in keyof T]: T[P]
      }

      An automerge document.

      Type Parameters

      • T

        The type of the value contained in this document

        Note that this provides read only access to the fields of the value. To modify the value use change

        -
      \ No newline at end of file +
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.DocumentId.html b/types/_automerge_automerge_repo.DocumentId.html index 7081429c9..0cf01e331 100644 --- a/types/_automerge_automerge_repo.DocumentId.html +++ b/types/_automerge_automerge_repo.DocumentId.html @@ -1,5 +1,5 @@ -DocumentId | Automerge Repo - v2.0.0-alpha.9
      DocumentId: string & {
          __documentId: true;
      }

      The base58check-encoded UUID of a document. This is the string following the automerge: +DocumentId | Automerge Repo - v2.0.0-alpha.10

      DocumentId: string & {
          __documentId: true;
      }

      The base58check-encoded UUID of a document. This is the string following the automerge: protocol prefix in an AutomergeUrl; for example, 4NMNnkMhL8jXrdJ9jamS58PAVdXu. When recording links to an Automerge document in another Automerge document, you should store a AutomergeUrl instead.

      -

      Type declaration

      • __documentId: true
      \ No newline at end of file +

      Type declaration

      • __documentId: true
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.DocumentUnavailableMessage.html b/types/_automerge_automerge_repo.DocumentUnavailableMessage.html index de34fba9d..f6ef50fce 100644 --- a/types/_automerge_automerge_repo.DocumentUnavailableMessage.html +++ b/types/_automerge_automerge_repo.DocumentUnavailableMessage.html @@ -1,4 +1,4 @@ -DocumentUnavailableMessage | Automerge Repo - v2.0.0-alpha.9
      DocumentUnavailableMessage: {
          documentId: DocumentId;
          senderId: PeerId;
          targetId: PeerId;
          type: "doc-unavailable";
      }

      Sent by a Repo to indicate that it does not have the document and none of its connected +DocumentUnavailableMessage | Automerge Repo - v2.0.0-alpha.10

      DocumentUnavailableMessage: {
          documentId: DocumentId;
          senderId: PeerId;
          targetId: PeerId;
          type: "doc-unavailable";
      }

      Sent by a Repo to indicate that it does not have the document and none of its connected peers do either.

      Type declaration

      • documentId: DocumentId

        The document which the peer claims it doesn't have

        -
      • senderId: PeerId
      • targetId: PeerId
      • type: "doc-unavailable"
      \ No newline at end of file +
    • senderId: PeerId
    • targetId: PeerId
    • type: "doc-unavailable"
    • \ No newline at end of file diff --git a/types/_automerge_automerge_repo.EphemeralMessage.html b/types/_automerge_automerge_repo.EphemeralMessage.html index 5d523ca30..82041a38d 100644 --- a/types/_automerge_automerge_repo.EphemeralMessage.html +++ b/types/_automerge_automerge_repo.EphemeralMessage.html @@ -1,4 +1,4 @@ -EphemeralMessage | Automerge Repo - v2.0.0-alpha.9
      EphemeralMessage: {
          count: number;
          data: Uint8Array;
          documentId: DocumentId;
          senderId: PeerId;
          sessionId: SessionId;
          targetId: PeerId;
          type: "ephemeral";
      }

      An ephemeral message.

      +EphemeralMessage | Automerge Repo - v2.0.0-alpha.10
      EphemeralMessage: {
          count: number;
          data: Uint8Array;
          documentId: DocumentId;
          senderId: PeerId;
          sessionId: SessionId;
          targetId: PeerId;
          type: "ephemeral";
      }

      An ephemeral message.

      Type declaration

      • count: number

        A sequence number which must be incremented for each message sent by this peer.

      • data: Uint8Array

        The actual data of the message.

      • documentId: DocumentId

        The document ID this message pertains to.

        @@ -8,4 +8,4 @@

        In order to avoid infinite loops of ephemeral messages, every message has (a) a session ID, which is a random number generated by the sender at startup time; and (b) a sequence number. The combination of these two things allows us to discard messages we have already seen.

        -
      \ No newline at end of file +
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.HandleState.html b/types/_automerge_automerge_repo.HandleState.html index fc4573e73..d6f1e96de 100644 --- a/types/_automerge_automerge_repo.HandleState.html +++ b/types/_automerge_automerge_repo.HandleState.html @@ -1 +1 @@ -HandleState | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file +HandleState | Automerge Repo - v2.0.0-alpha.10
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.Heads.html b/types/_automerge_automerge_repo.Heads.html index 3165faed0..49a60535d 100644 --- a/types/_automerge_automerge_repo.Heads.html +++ b/types/_automerge_automerge_repo.Heads.html @@ -1 +1 @@ -Heads | Automerge Repo - v2.0.0-alpha.9
      Heads: Hash[]
      \ No newline at end of file +Heads | Automerge Repo - v2.0.0-alpha.10
      Heads: Hash[]
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.LegacyDocumentId.html b/types/_automerge_automerge_repo.LegacyDocumentId.html index 518c4abdd..fd14da951 100644 --- a/types/_automerge_automerge_repo.LegacyDocumentId.html +++ b/types/_automerge_automerge_repo.LegacyDocumentId.html @@ -1,3 +1,3 @@ -LegacyDocumentId | Automerge Repo - v2.0.0-alpha.9
      LegacyDocumentId: string & {
          __legacyDocumentId: true;
      }

      A UUID encoded as a hex string. As of v1.0, a DocumentID is stored as a base58-encoded string with a checksum. +LegacyDocumentId | Automerge Repo - v2.0.0-alpha.10

      LegacyDocumentId: string & {
          __legacyDocumentId: true;
      }

      A UUID encoded as a hex string. As of v1.0, a DocumentID is stored as a base58-encoded string with a checksum. Support for this format will be removed in a future version.

      -

      Type declaration

      • __legacyDocumentId: true
      \ No newline at end of file +

      Type declaration

      • __legacyDocumentId: true
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.Mark.html b/types/_automerge_automerge_repo.Mark.html index 619d69a3f..42000494e 100644 --- a/types/_automerge_automerge_repo.Mark.html +++ b/types/_automerge_automerge_repo.Mark.html @@ -1 +1 @@ -Mark | Automerge Repo - v2.0.0-alpha.9
      Mark: {
          end: number;
          name: string;
          start: number;
          value: ScalarValue;
      }

      Type declaration

      • end: number
      • name: string
      • start: number
      • value: ScalarValue
      \ No newline at end of file +Mark | Automerge Repo - v2.0.0-alpha.10
      Mark: {
          end: number;
          name: string;
          start: number;
          value: ScalarValue;
      }

      Type declaration

      • end: number
      • name: string
      • start: number
      • value: ScalarValue
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.MarkRange.html b/types/_automerge_automerge_repo.MarkRange.html index 0f5ba90b1..78f3bd48d 100644 --- a/types/_automerge_automerge_repo.MarkRange.html +++ b/types/_automerge_automerge_repo.MarkRange.html @@ -1 +1 @@ -MarkRange | Automerge Repo - v2.0.0-alpha.9
      MarkRange: {
          end: number;
          expand?: "before" | "after" | "both" | "none";
          start: number;
      }

      Type declaration

      • end: number
      • Optional expand?: "before" | "after" | "both" | "none"
      • start: number
      \ No newline at end of file +MarkRange | Automerge Repo - v2.0.0-alpha.10
      MarkRange: {
          end: number;
          expand?: "before" | "after" | "both" | "none";
          start: number;
      }

      Type declaration

      • end: number
      • Optional expand?: "before" | "after" | "both" | "none"
      • start: number
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.MarkValue.html b/types/_automerge_automerge_repo.MarkValue.html index 1363aa0e7..cefb691d8 100644 --- a/types/_automerge_automerge_repo.MarkValue.html +++ b/types/_automerge_automerge_repo.MarkValue.html @@ -1 +1 @@ -MarkValue | Automerge Repo - v2.0.0-alpha.9
      MarkValue: string | number | null | boolean | Date | Uint8Array
      \ No newline at end of file +MarkValue | Automerge Repo - v2.0.0-alpha.10
      MarkValue: string | number | null | boolean | Date | Uint8Array
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.Message.html b/types/_automerge_automerge_repo.Message.html index 35563251d..72f4ef995 100644 --- a/types/_automerge_automerge_repo.Message.html +++ b/types/_automerge_automerge_repo.Message.html @@ -1,3 +1,3 @@ -Message | Automerge Repo - v2.0.0-alpha.9
      Message: {
          data?: Uint8Array;
          documentId?: DocumentId;
          senderId: PeerId;
          targetId: PeerId;
          type: string;
      }

      Type declaration

      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.Patch.html b/types/_automerge_automerge_repo.Patch.html index 9f6b90dff..1f6ffe262 100644 --- a/types/_automerge_automerge_repo.Patch.html +++ b/types/_automerge_automerge_repo.Patch.html @@ -1 +1 @@ -Patch | Automerge Repo - v2.0.0-alpha.9
      Patch: PutPatch | DelPatch | SpliceTextPatch | IncPatch | InsertPatch | MarkPatch | UnmarkPatch | ConflictPatch
      \ No newline at end of file +Patch | Automerge Repo - v2.0.0-alpha.10
      Patch: PutPatch | DelPatch | SpliceTextPatch | IncPatch | InsertPatch | MarkPatch | UnmarkPatch | ConflictPatch
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.PatchCallback.html b/types/_automerge_automerge_repo.PatchCallback.html index d8c00362e..f5abea144 100644 --- a/types/_automerge_automerge_repo.PatchCallback.html +++ b/types/_automerge_automerge_repo.PatchCallback.html @@ -1,4 +1,4 @@ -PatchCallback | Automerge Repo - v2.0.0-alpha.9
      PatchCallback<T>: ((patches, info) => void)

      Callback which is called by various methods in this library to notify the +PatchCallback | Automerge Repo - v2.0.0-alpha.10

      PatchCallback<T>: ((patches, info) => void)

      Callback which is called by various methods in this library to notify the user of what changes have been made.

      Type Parameters

      • T

      Type declaration

        • (patches, info): void
        • Parameters

          • patches: Patch[]
          • info: PatchInfo<T>

            An object that has the "before" and "after" document state, and the "from" and "to" heads

            -

          Returns void

      \ No newline at end of file +

      Returns void

      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.PeerId.html b/types/_automerge_automerge_repo.PeerId.html index 60d1efa92..b32dca601 100644 --- a/types/_automerge_automerge_repo.PeerId.html +++ b/types/_automerge_automerge_repo.PeerId.html @@ -1,2 +1,2 @@ -PeerId | Automerge Repo - v2.0.0-alpha.9
      PeerId: string & {
          __peerId: true;
      }

      A branded type for peer IDs

      -

      Type declaration

      • __peerId: true
      \ No newline at end of file +PeerId | Automerge Repo - v2.0.0-alpha.10
      PeerId: string & {
          __peerId: true;
      }

      A branded type for peer IDs

      +

      Type declaration

      • __peerId: true
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.Prop.html b/types/_automerge_automerge_repo.Prop.html index 9fbf42515..1962b52eb 100644 --- a/types/_automerge_automerge_repo.Prop.html +++ b/types/_automerge_automerge_repo.Prop.html @@ -1 +1 @@ -Prop | Automerge Repo - v2.0.0-alpha.9
      Prop: string | number
      \ No newline at end of file +Prop | Automerge Repo - v2.0.0-alpha.10
      Prop: string | number
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.RepoMessage.html b/types/_automerge_automerge_repo.RepoMessage.html index 58e6e1f56..542e31609 100644 --- a/types/_automerge_automerge_repo.RepoMessage.html +++ b/types/_automerge_automerge_repo.RepoMessage.html @@ -1,2 +1,2 @@ -RepoMessage | Automerge Repo - v2.0.0-alpha.9
      RepoMessage: SyncMessage | EphemeralMessage | RequestMessage | DocumentUnavailableMessage | RemoteSubscriptionControlMessage | RemoteHeadsChanged

      These are message types that a NetworkAdapter surfaces to a Repo.

      -
      \ No newline at end of file +RepoMessage | Automerge Repo - v2.0.0-alpha.10
      RepoMessage: SyncMessage | EphemeralMessage | RequestMessage | DocumentUnavailableMessage | RemoteSubscriptionControlMessage | RemoteHeadsChanged

      These are message types that a NetworkAdapter surfaces to a Repo.

      +
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.RequestMessage.html b/types/_automerge_automerge_repo.RequestMessage.html index 733fad07b..9664485d2 100644 --- a/types/_automerge_automerge_repo.RequestMessage.html +++ b/types/_automerge_automerge_repo.RequestMessage.html @@ -1,6 +1,6 @@ -RequestMessage | Automerge Repo - v2.0.0-alpha.9
      RequestMessage: {
          data: Uint8Array;
          documentId: DocumentId;
          senderId: PeerId;
          targetId: PeerId;
          type: "request";
      }

      Sent by a Repo to request a document from a peer.

      +RequestMessage | Automerge Repo - v2.0.0-alpha.10
      RequestMessage: {
          data: Uint8Array;
          documentId: DocumentId;
          senderId: PeerId;
          targetId: PeerId;
          type: "request";
      }

      Sent by a Repo to request a document from a peer.

      Type declaration

      • data: Uint8Array

        The automerge sync message

      • documentId: DocumentId

        The document ID of the document this message is for

      • senderId: PeerId
      • targetId: PeerId
      • type: "request"

      Remarks

      This is identical to a SyncMessage except that it is sent by a Repo as the initial sync message when asking the other peer if it has the document.

      -
      \ No newline at end of file +
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.SessionId.html b/types/_automerge_automerge_repo.SessionId.html index dfa5b6fc4..4f1b6a4ce 100644 --- a/types/_automerge_automerge_repo.SessionId.html +++ b/types/_automerge_automerge_repo.SessionId.html @@ -1,2 +1,2 @@ -SessionId | Automerge Repo - v2.0.0-alpha.9
      SessionId: string & {
          __SessionId: true;
      }

      A randomly generated string created when the Repo starts up

      -

      Type declaration

      • __SessionId: true
      \ No newline at end of file +SessionId | Automerge Repo - v2.0.0-alpha.10
      SessionId: string & {
          __SessionId: true;
      }

      A randomly generated string created when the Repo starts up

      +

      Type declaration

      • __SessionId: true
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.SharePolicy.html b/types/_automerge_automerge_repo.SharePolicy.html index f8d096220..e8127f685 100644 --- a/types/_automerge_automerge_repo.SharePolicy.html +++ b/types/_automerge_automerge_repo.SharePolicy.html @@ -1,6 +1,6 @@ -SharePolicy | Automerge Repo - v2.0.0-alpha.9
      SharePolicy: ((peerId, documentId?) => Promise<boolean>)

      A function that determines whether we should share a document with a peer

      +SharePolicy | Automerge Repo - v2.0.0-alpha.10
      SharePolicy: ((peerId, documentId?) => Promise<boolean>)

      A function that determines whether we should share a document with a peer

      Type declaration

        • (peerId, documentId?): Promise<boolean>
        • Parameters

          Returns Promise<boolean>

      Remarks

      This function is called by the Repo every time a new document is created or discovered (such as when another peer starts syncing with us). If this function returns true then the Repo will begin sharing the new document with the peer given by peerId.

      -
      \ No newline at end of file +
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.StorageId.html b/types/_automerge_automerge_repo.StorageId.html index 72fac4c3e..3f9571cca 100644 --- a/types/_automerge_automerge_repo.StorageId.html +++ b/types/_automerge_automerge_repo.StorageId.html @@ -1,2 +1,2 @@ -StorageId | Automerge Repo - v2.0.0-alpha.9
      StorageId: string & {
          __storageId: true;
      }

      A branded type for storage IDs

      -

      Type declaration

      • __storageId: true
      \ No newline at end of file +StorageId | Automerge Repo - v2.0.0-alpha.10
      StorageId: string & {
          __storageId: true;
      }

      A branded type for storage IDs

      +

      Type declaration

      • __storageId: true
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.StorageKey.html b/types/_automerge_automerge_repo.StorageKey.html index 3b6b8066a..630508906 100644 --- a/types/_automerge_automerge_repo.StorageKey.html +++ b/types/_automerge_automerge_repo.StorageKey.html @@ -1,4 +1,4 @@ -StorageKey | Automerge Repo - v2.0.0-alpha.9
      StorageKey: string[]

      A storage key is an array of strings that represents a path to a value in a +StorageKey | Automerge Repo - v2.0.0-alpha.10

      StorageKey: string[]

      A storage key is an array of strings that represents a path to a value in a StorageAdapter.

      Remarks

      Storage keys are arrays because they are hierarchical and they allow the storage subsystem to do range queries for all keys that have a particular prefix. For example, incremental changes for a @@ -8,4 +8,4 @@

      However, the storage adapter implementation should be agnostic to the meaning of the key and should not assume any particular structure.

      -
      \ No newline at end of file +
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.SyncMessage.html b/types/_automerge_automerge_repo.SyncMessage.html index dabac500b..bfe0cf5c2 100644 --- a/types/_automerge_automerge_repo.SyncMessage.html +++ b/types/_automerge_automerge_repo.SyncMessage.html @@ -1,4 +1,4 @@ -SyncMessage | Automerge Repo - v2.0.0-alpha.9
      SyncMessage: {
          data: Uint8Array;
          documentId: DocumentId;
          senderId: PeerId;
          targetId: PeerId;
          type: "sync";
      }

      A sync message for a particular document

      +SyncMessage | Automerge Repo - v2.0.0-alpha.10
      SyncMessage: {
          data: Uint8Array;
          documentId: DocumentId;
          senderId: PeerId;
          targetId: PeerId;
          type: "sync";
      }

      A sync message for a particular document

      Type declaration

      • data: Uint8Array

        The automerge sync message

      • documentId: DocumentId

        The document ID of the document this message is for

        -
      • senderId: PeerId
      • targetId: PeerId
      • type: "sync"
      \ No newline at end of file +
    • senderId: PeerId
    • targetId: PeerId
    • type: "sync"
    • \ No newline at end of file diff --git a/types/_automerge_automerge_repo_network_broadcastchannel.BroadcastChannelNetworkAdapterOptions.html b/types/_automerge_automerge_repo_network_broadcastchannel.BroadcastChannelNetworkAdapterOptions.html index 96328817a..b3030f13b 100644 --- a/types/_automerge_automerge_repo_network_broadcastchannel.BroadcastChannelNetworkAdapterOptions.html +++ b/types/_automerge_automerge_repo_network_broadcastchannel.BroadcastChannelNetworkAdapterOptions.html @@ -1 +1 @@ -BroadcastChannelNetworkAdapterOptions | Automerge Repo - v2.0.0-alpha.9
      BroadcastChannelNetworkAdapterOptions: {
          channelName: string;
      }

      Type declaration

      • channelName: string
      \ No newline at end of file +BroadcastChannelNetworkAdapterOptions | Automerge Repo - v2.0.0-alpha.10
      BroadcastChannelNetworkAdapterOptions: {
          channelName: string;
      }

      Type declaration

      • channelName: string
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo_network_websocket.ErrorMessage.html b/types/_automerge_automerge_repo_network_websocket.ErrorMessage.html index 153602fb2..6c6169b10 100644 --- a/types/_automerge_automerge_repo_network_websocket.ErrorMessage.html +++ b/types/_automerge_automerge_repo_network_websocket.ErrorMessage.html @@ -1,5 +1,5 @@ -ErrorMessage | Automerge Repo - v2.0.0-alpha.9
      ErrorMessage: {
          message: string;
          senderId: PeerId;
          targetId: PeerId;
          type: "error";
      }

      An error occurred. The other end will terminate the connection after sending this message

      +ErrorMessage | Automerge Repo - v2.0.0-alpha.10
      ErrorMessage: {
          message: string;
          senderId: PeerId;
          targetId: PeerId;
          type: "error";
      }

      An error occurred. The other end will terminate the connection after sending this message

      Type declaration

      • message: string

        A description of the error

      • senderId: PeerId

        The peer sending the message

      • targetId: PeerId

        The PeerID of the client

        -
      • type: "error"
      \ No newline at end of file +
    • type: "error"
    • \ No newline at end of file diff --git a/types/_automerge_automerge_repo_network_websocket.FromClientMessage.html b/types/_automerge_automerge_repo_network_websocket.FromClientMessage.html index e521caa5b..f56d87144 100644 --- a/types/_automerge_automerge_repo_network_websocket.FromClientMessage.html +++ b/types/_automerge_automerge_repo_network_websocket.FromClientMessage.html @@ -1,2 +1,2 @@ -FromClientMessage | Automerge Repo - v2.0.0-alpha.9
      FromClientMessage: JoinMessage | Message

      A message from the client to the server

      -
      \ No newline at end of file +FromClientMessage | Automerge Repo - v2.0.0-alpha.10
      FromClientMessage: JoinMessage | Message

      A message from the client to the server

      +
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo_network_websocket.FromServerMessage.html b/types/_automerge_automerge_repo_network_websocket.FromServerMessage.html index c8e6f732d..620aa8e9b 100644 --- a/types/_automerge_automerge_repo_network_websocket.FromServerMessage.html +++ b/types/_automerge_automerge_repo_network_websocket.FromServerMessage.html @@ -1,2 +1,2 @@ -FromServerMessage | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file +FromServerMessage | Automerge Repo - v2.0.0-alpha.10
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo_network_websocket.JoinMessage.html b/types/_automerge_automerge_repo_network_websocket.JoinMessage.html index 59d681066..0f9c1bd7d 100644 --- a/types/_automerge_automerge_repo_network_websocket.JoinMessage.html +++ b/types/_automerge_automerge_repo_network_websocket.JoinMessage.html @@ -1,5 +1,5 @@ -JoinMessage | Automerge Repo - v2.0.0-alpha.9
      JoinMessage: {
          peerMetadata: PeerMetadata;
          senderId: PeerId;
          supportedProtocolVersions: ProtocolVersion[];
          type: "join";
      }

      Sent by the client to the server to tell the server the clients PeerID

      +JoinMessage | Automerge Repo - v2.0.0-alpha.10
      JoinMessage: {
          peerMetadata: PeerMetadata;
          senderId: PeerId;
          supportedProtocolVersions: ProtocolVersion[];
          type: "join";
      }

      Sent by the client to the server to tell the server the clients PeerID

      Type declaration

      • peerMetadata: PeerMetadata

        Metadata presented by the peer

      • senderId: PeerId

        The PeerID of the client

      • supportedProtocolVersions: ProtocolVersion[]

        The protocol version the client supports

        -
      • type: "join"
      \ No newline at end of file +
    • type: "join"
    • \ No newline at end of file diff --git a/types/_automerge_automerge_repo_network_websocket.PeerMessage.html b/types/_automerge_automerge_repo_network_websocket.PeerMessage.html index 30108738b..38572cbeb 100644 --- a/types/_automerge_automerge_repo_network_websocket.PeerMessage.html +++ b/types/_automerge_automerge_repo_network_websocket.PeerMessage.html @@ -1,6 +1,6 @@ -PeerMessage | Automerge Repo - v2.0.0-alpha.9
      PeerMessage: {
          peerMetadata: PeerMetadata;
          selectedProtocolVersion: ProtocolVersion;
          senderId: PeerId;
          targetId: PeerId;
          type: "peer";
      }

      Sent by the server in response to a "join" message to advertise the servers PeerID

      +PeerMessage | Automerge Repo - v2.0.0-alpha.10
      PeerMessage: {
          peerMetadata: PeerMetadata;
          selectedProtocolVersion: ProtocolVersion;
          senderId: PeerId;
          targetId: PeerId;
          type: "peer";
      }

      Sent by the server in response to a "join" message to advertise the servers PeerID

      Type declaration

      • peerMetadata: PeerMetadata

        Metadata presented by the peer

      • selectedProtocolVersion: ProtocolVersion

        The protocol version the server selected for this connection

      • senderId: PeerId

        The PeerID of the server

      • targetId: PeerId

        The PeerID of the client

        -
      • type: "peer"
      \ No newline at end of file +
    • type: "peer"
    • \ No newline at end of file diff --git a/types/_automerge_automerge_repo_network_websocket.ProtocolVersion.html b/types/_automerge_automerge_repo_network_websocket.ProtocolVersion.html index 114b81ea3..6c0bc0c09 100644 --- a/types/_automerge_automerge_repo_network_websocket.ProtocolVersion.html +++ b/types/_automerge_automerge_repo_network_websocket.ProtocolVersion.html @@ -1,2 +1,2 @@ -ProtocolVersion | Automerge Repo - v2.0.0-alpha.9
      ProtocolVersion: typeof ProtocolV1

      The versions of the websocket protocol

      -
      \ No newline at end of file +ProtocolVersion | Automerge Repo - v2.0.0-alpha.10
      ProtocolVersion: typeof ProtocolV1

      The versions of the websocket protocol

      +
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo_react_hooks.Heartbeats.html b/types/_automerge_automerge_repo_react_hooks.Heartbeats.html index f031136a2..0bf6e3cf7 100644 --- a/types/_automerge_automerge_repo_react_hooks.Heartbeats.html +++ b/types/_automerge_automerge_repo_react_hooks.Heartbeats.html @@ -1,2 +1,2 @@ -Heartbeats | Automerge Repo - v2.0.0-alpha.9
      Heartbeats: Record<string, number>

      A map from peer ID to their last heartbeat timestamp

      -
      \ No newline at end of file +Heartbeats | Automerge Repo - v2.0.0-alpha.10
      Heartbeats: Record<string, number>

      A map from peer ID to their last heartbeat timestamp

      +
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo_react_hooks.PeerStates.html b/types/_automerge_automerge_repo_react_hooks.PeerStates.html index 03cd36ed8..57a0f39e8 100644 --- a/types/_automerge_automerge_repo_react_hooks.PeerStates.html +++ b/types/_automerge_automerge_repo_react_hooks.PeerStates.html @@ -1,2 +1,2 @@ -PeerStates | Automerge Repo - v2.0.0-alpha.9
      PeerStates: Record<string, any>

      A map from peer ID to their state

      -
      \ No newline at end of file +PeerStates | Automerge Repo - v2.0.0-alpha.10
      PeerStates: Record<string, any>

      A map from peer ID to their state

      +
      \ No newline at end of file diff --git a/variables/_automerge_automerge_repo.HandleState-1.html b/variables/_automerge_automerge_repo.HandleState-1.html index 96a2f2992..ddeb7cf1d 100644 --- a/variables/_automerge_automerge_repo.HandleState-1.html +++ b/variables/_automerge_automerge_repo.HandleState-1.html @@ -1,8 +1,8 @@ -HandleState | Automerge Repo - v2.0.0-alpha.9
      HandleState: {
          DELETED: "deleted";
          IDLE: "idle";
          LOADING: "loading";
          READY: "ready";
          REQUESTING: "requesting";
          UNAVAILABLE: "unavailable";
      } = ...

      Possible internal states for a DocHandle

      +HandleState | Automerge Repo - v2.0.0-alpha.10
      HandleState: {
          DELETED: "deleted";
          IDLE: "idle";
          LOADING: "loading";
          READY: "ready";
          REQUESTING: "requesting";
          UNAVAILABLE: "unavailable";
      } = ...

      Possible internal states for a DocHandle

      Type declaration

      • Readonly DELETED: "deleted"

        The document has been deleted from the repo

      • Readonly IDLE: "idle"

        The handle has been created but not yet loaded or requested

      • Readonly LOADING: "loading"

        We are waiting for storage to finish loading

      • Readonly READY: "ready"

        The document is available

      • Readonly REQUESTING: "requesting"

        We are waiting for someone in the network to respond to a sync request

      • Readonly UNAVAILABLE: "unavailable"

        The document was not available in storage or from any connected peers

        -
      \ No newline at end of file +
      \ No newline at end of file diff --git a/variables/_automerge_automerge_repo_network_websocket.ProtocolV1.html b/variables/_automerge_automerge_repo_network_websocket.ProtocolV1.html index c15b6da38..97f14d55d 100644 --- a/variables/_automerge_automerge_repo_network_websocket.ProtocolV1.html +++ b/variables/_automerge_automerge_repo_network_websocket.ProtocolV1.html @@ -1 +1 @@ -ProtocolV1 | Automerge Repo - v2.0.0-alpha.9
      \ No newline at end of file +ProtocolV1 | Automerge Repo - v2.0.0-alpha.10
      \ No newline at end of file diff --git a/variables/_automerge_automerge_repo_react_hooks.RepoContext.html b/variables/_automerge_automerge_repo_react_hooks.RepoContext.html index 47e890f97..f3aef86d7 100644 --- a/variables/_automerge_automerge_repo_react_hooks.RepoContext.html +++ b/variables/_automerge_automerge_repo_react_hooks.RepoContext.html @@ -1,2 +1,2 @@ -RepoContext | Automerge Repo - v2.0.0-alpha.9
      RepoContext: Context<null | Repo> = ...

      A React context which provides access to an Automerge repo.

      -
      \ No newline at end of file +RepoContext | Automerge Repo - v2.0.0-alpha.10
      RepoContext: Context<null | Repo> = ...

      A React context which provides access to an Automerge repo.

      +
      \ No newline at end of file