diff --git a/classes/_automerge_automerge_repo.Counter.html b/classes/_automerge_automerge_repo.Counter.html index 79314785d..d493029b0 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.12

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

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 176917ddc..aef09ee88 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.12

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

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

addListener @@ -42,13 +42,13 @@ unload view whenReady -

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 @@ -57,19 +57,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 @@ -77,17 +77,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.

    @@ -97,40 +97,40 @@ 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.

    -
\ 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 e941b9526..a23b289c1 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.12

An interface representing some way to connect to other peers

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

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 33556fb61..33cbae4d8 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.12

Constructors

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

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 13330b2d8..0f99c9583 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.12

The Repo is the main entry point of this library

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

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>

\ 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 24d050b70..0d65c7fea 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.12

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

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

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 6d1bc7916..ac3e8ab41 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.12

An interface representing some way to connect to other peers

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

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 5634096f8..2b21e9726 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.12

An interface representing some way to connect to other peers

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

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 a2a3c50fb..61a6609a1 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.12

      Hierarchy

      • WebSocketNetworkAdapter
        • BrowserWebSocketClientAdapter

      Constructors

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

      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 d37d706e0..be0ad089d 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.12

      An interface representing some way to connect to other peers

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

      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 088c35d07..40f522e08 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.12

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

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

      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 7da30a457..c6424e022 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.12

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

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

      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 bf710067d..319668f18 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.12
      • Apply changes received from another document

        +applyChanges | Automerge Repo - v2.0.0-alpha.13
        • 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 de6d54596..98991bf82 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.12
      • 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.13
      • 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 b4d5d2153..4dfe491af 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.12
      \ No newline at end of file +generateAutomergeUrl | Automerge Repo - v2.0.0-alpha.13
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.getAllChanges.html b/functions/_automerge_automerge_repo.getAllChanges.html index a80518c1d..6334efeb0 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.12
      • Get all the changes in a document

        +getAllChanges | Automerge Repo - v2.0.0-alpha.13
        • 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 e6f4ebfc5..37dd3b329 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.12
      • Get the changes which are in newState but not in oldState. The returned +getChanges | Automerge Repo - v2.0.0-alpha.13

        • 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 92effae2b..10ea9beb7 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.12
      • Get the conflicts associated with a property

        +getConflicts | Automerge Repo - v2.0.0-alpha.13
        • 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 e19a8736b..35a6d2eff 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.12
      • Returns a cursor for the given position in a string.

        +getCursor | Automerge Repo - v2.0.0-alpha.13
        • 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 e9461813c..31a82ae85 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.12
      • Returns the current index of the cursor.

        +getCursorPosition | Automerge Repo - v2.0.0-alpha.13
        • 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 56cfba97e..9b66601c5 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.12
      • 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.13
      • 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 77d9cdba0..f92926344 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.12
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.isRepoMessage.html b/functions/_automerge_automerge_repo.isRepoMessage.html index 65578f752..4d59f9076 100644 --- a/functions/_automerge_automerge_repo.isRepoMessage.html +++ b/functions/_automerge_automerge_repo.isRepoMessage.html @@ -1 +1 @@ -isRepoMessage | Automerge Repo - v2.0.0-alpha.12
      \ No newline at end of file +isRepoMessage | Automerge Repo - v2.0.0-alpha.13
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.isValidAutomergeUrl.html b/functions/_automerge_automerge_repo.isValidAutomergeUrl.html index 3ad57d1f9..6848bc5c6 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.12
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.isValidDocumentId.html b/functions/_automerge_automerge_repo.isValidDocumentId.html index 6b3b40ed8..91829db73 100644 --- a/functions/_automerge_automerge_repo.isValidDocumentId.html +++ b/functions/_automerge_automerge_repo.isValidDocumentId.html @@ -1 +1 @@ -isValidDocumentId | Automerge Repo - v2.0.0-alpha.12
      \ No newline at end of file +isValidDocumentId | Automerge Repo - v2.0.0-alpha.13
      \ 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 393579a6f..b5fed6803 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.12
      • Type Parameters

        • T

        Parameters

        Returns void

      \ No newline at end of file +mark | Automerge Repo - v2.0.0-alpha.13
      • 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 3245dc7ae..01551543c 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.12
      \ No newline at end of file +parseAutomergeUrl | Automerge Repo - v2.0.0-alpha.13
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.splice.html b/functions/_automerge_automerge_repo.splice.html index 4b6a57f0c..eb43b0f42 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.12
      • Modify a string

        +splice | Automerge Repo - v2.0.0-alpha.13
        • 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 af8caedd9..17ad78ffe 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.12
      \ No newline at end of file diff --git a/functions/_automerge_automerge_repo.unmark.html b/functions/_automerge_automerge_repo.unmark.html index 5bd749262..071c886a1 100644 --- a/functions/_automerge_automerge_repo.unmark.html +++ b/functions/_automerge_automerge_repo.unmark.html @@ -1 +1 @@ -unmark | Automerge Repo - v2.0.0-alpha.12
      • Type Parameters

        • T

        Parameters

        Returns void

      \ No newline at end of file +unmark | Automerge Repo - v2.0.0-alpha.13
      • 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 bbabf7002..63a38c4cb 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.12
      • Beta

        Update the value of a string

        +updateText | Automerge Repo - v2.0.0-alpha.13
        • 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 395d48bbc..d795a3dca 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.12
      • Make an immutable view of an automerge document as at heads

        +view | Automerge Repo - v2.0.0-alpha.13
        • 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 b1ae3457c..70b602f06 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.12
      • A hook which returns a document identified by a URL and a function to change the document.

        +useDocument | Automerge Repo - v2.0.0-alpha.13
        • 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 ef8221578..45ce5575c 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.12
      • Maintains a map of document states, keyed by DocumentId. Useful for collections of related +useDocuments | Automerge Repo - v2.0.0-alpha.13

        • 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 89c38446f..23bec6306 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.12
      \ 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 ec3867636..b9148ac66 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.12
      • This hook maintains state for the local client. +useLocalAwareness | Automerge Repo - v2.0.0-alpha.13

        • 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 580e07a55..1f408231c 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.12
      \ 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 de349d70f..ca559f39c 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.12
      \ No newline at end of file +useRepo | Automerge Repo - v2.0.0-alpha.13
      \ 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 4dc86001d..17785103a 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.12
      • A Svelte store for an Automerge document.

        +document | Automerge Repo - v2.0.0-alpha.13
        • 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 affea83f2..0140c4aa4 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.12
      \ No newline at end of file +getContextRepo | Automerge Repo - v2.0.0-alpha.13
      \ 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 5c86ae568..336d97b74 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.12
      \ No newline at end of file +setContextRepo | Automerge Repo - v2.0.0-alpha.13
      \ No newline at end of file diff --git a/hierarchy.html b/hierarchy.html index 3b257c5ff..dcf465695 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -1 +1 @@ -Automerge Repo - v2.0.0-alpha.12

      Automerge Repo - v2.0.0-alpha.12

      Class Hierarchy

      \ No newline at end of file +Automerge Repo - v2.0.0-alpha.13

      Automerge Repo - v2.0.0-alpha.13

      Class Hierarchy

      \ No newline at end of file diff --git a/index.html b/index.html index 5061001b8..63201d0ef 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,3 @@ -Automerge Repo - v2.0.0-alpha.12

      Automerge Repo - v2.0.0-alpha.12

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

      Automerge Repo - v2.0.0-alpha.13

      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 2f7a5be06..9b0d692d0 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.12
      interface DeleteDocumentPayload {
          documentId: DocumentId;
      }

      Properties

      Properties

      documentId: DocumentId
      \ No newline at end of file +DeleteDocumentPayload | Automerge Repo - v2.0.0-alpha.13
      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 6d5c8da4d..dc157105a 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.12

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

      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 bff0b6384..a55e51d82 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.12

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

      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 86c5791be..6c61f58b8 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.12

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

      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 744f897a7..80131698a 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.12

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

      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 227792812..e8b5a34cb 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.12

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

      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 4cea96081..ce8d6efca 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.12

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

      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 e65195d51..7b6bd8011 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.12

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

      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 81fe03394..efd44f405 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.12
      interface DocumentPayload {
          handle: DocHandle<any>;
      }

      Properties

      Properties

      handle: DocHandle<any>
      \ No newline at end of file +DocumentPayload | Automerge Repo - v2.0.0-alpha.13
      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 b24b7d093..13356b27d 100644 --- a/interfaces/_automerge_automerge_repo.MarkSet.html +++ b/interfaces/_automerge_automerge_repo.MarkSet.html @@ -1 +1 @@ -MarkSet | Automerge Repo - v2.0.0-alpha.12
      interface MarkSet {
          [name: string]: ScalarValue;
      }

      Indexable

      [name: string]: ScalarValue
      \ No newline at end of file +MarkSet | Automerge Repo - v2.0.0-alpha.13
      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 945d24d27..95fd02517 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.12
      interface NetworkAdapterEvents {
          close: (() => void);
          message: ((payload) => void);
          peer-candidate: ((payload) => void);
          peer-disconnected: ((payload) => void);
      }

      Properties

      close +NetworkAdapterEvents | Automerge Repo - v2.0.0-alpha.13
      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 6a3c6dde6..c54d9e816 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.12

      An interface representing some way to connect to other peers

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

      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 1482b0531..9864e9552 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.12
      interface OpenPayload {
          network: NetworkAdapterInterface;
      }

      Properties

      Properties

      \ No newline at end of file +OpenPayload | Automerge Repo - v2.0.0-alpha.13
      interface OpenPayload {
          network: NetworkAdapterInterface;
      }

      Properties

      Properties

      \ No newline at end of file diff --git a/interfaces/_automerge_automerge_repo.PeerCandidatePayload.html b/interfaces/_automerge_automerge_repo.PeerCandidatePayload.html index 5f9b322f7..e4726d78c 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.12
      interface PeerCandidatePayload {
          peerId: PeerId;
          peerMetadata: PeerMetadata;
      }

      Properties

      peerId +PeerCandidatePayload | Automerge Repo - v2.0.0-alpha.13
      \ 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 7bc97a781..21d4d1588 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.12
      interface PeerDisconnectedPayload {
          peerId: PeerId;
      }

      Properties

      Properties

      peerId: PeerId
      \ No newline at end of file +PeerDisconnectedPayload | Automerge Repo - v2.0.0-alpha.13
      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 a2af45057..a53ce9a03 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.12

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

      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 9430c751e..cf9c3b65c 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.12
      interface RepoConfig {
          enableRemoteHeadsGossiping?: boolean;
          isEphemeral?: boolean;
          network?: NetworkAdapterInterface[];
          peerId?: PeerId;
          sharePolicy?: SharePolicy;
          storage?: StorageAdapterInterface;
      }

      Properties

      enableRemoteHeadsGossiping? +RepoConfig | Automerge Repo - v2.0.0-alpha.13
      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 730c897c4..e189d153b 100644 --- a/interfaces/_automerge_automerge_repo.RepoEvents.html +++ b/interfaces/_automerge_automerge_repo.RepoEvents.html @@ -1,8 +1,8 @@ -RepoEvents | Automerge Repo - v2.0.0-alpha.12
      interface RepoEvents {
          delete-document: ((arg) => void);
          doc-metrics: ((arg) => void);
          document: ((arg) => void);
          unavailable-document: ((arg) => void);
      }

      Properties

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

      Properties

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

      A document was deleted

      -

      Type declaration

      doc-metrics: ((arg) => void)

      Type declaration

        • (arg): void
        • Parameters

          • arg: DocMetrics

          Returns void

      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

      doc-metrics: ((arg) => void)

      Type declaration

        • (arg): void
        • Parameters

          • arg: DocMetrics

          Returns void

      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 99a33b13b..e2dc95ddc 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.12

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

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

      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 aeaa070a0..e0cf40100 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.12
      interface MessageChannelNetworkAdapterConfig {
          useWeakRef?: boolean;
      }

      Properties

      useWeakRef? +MessageChannelNetworkAdapterConfig | Automerge Repo - v2.0.0-alpha.13
      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 85f18a8e3..402e6a2ca 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.12
      interface UseLocalAwarenessProps {
          handle: DocHandle<unknown>;
          heartbeatTime?: number;
          initialState: any;
          userId: string;
      }

      Properties

      handle +UseLocalAwarenessProps | Automerge Repo - v2.0.0-alpha.13
      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 cc35c0bdf..d43d63434 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.12
      interface UseRemoteAwarenessProps<T> {
          getTime?: (() => number);
          handle: DocHandle<T>;
          localUserId?: string;
          offlineTimeout?: number;
      }

      Type Parameters

      • T

      Properties

      getTime? +UseRemoteAwarenessProps | Automerge Repo - v2.0.0-alpha.13
      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 95150a469..ddf460185 100644 --- a/modules/_automerge_automerge_repo.html +++ b/modules/_automerge_automerge_repo.html @@ -1,4 +1,4 @@ -@automerge/automerge-repo - v2.0.0-alpha.11 | Automerge Repo - v2.0.0-alpha.12

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

      The automerge CRDT +@automerge/automerge-repo - v2.0.0-alpha.12 | Automerge Repo - v2.0.0-alpha.13

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

      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 cc12a74ed..714c5a366 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.11 | Automerge Repo - v2.0.0-alpha.12

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

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

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

      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 cd56e4091..0098324ae 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.11 | Automerge Repo - v2.0.0-alpha.12

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

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

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

      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 4db49814e..e3b3794cf 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.11 | Automerge Repo - v2.0.0-alpha.12

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

      A NetworkAdapter which connects to a remote host via WebSockets

      +@automerge/automerge-repo-network-websocket - v2.0.0-alpha.12 | Automerge Repo - v2.0.0-alpha.13

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

      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 3db03131b..5a8531d5e 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.11 | Automerge Repo - v2.0.0-alpha.12

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

      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.12 | Automerge Repo - v2.0.0-alpha.13

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

      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 da650f85e..dd284161f 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.11 | Automerge Repo - v2.0.0-alpha.12

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

      This module provides a storage adapter for IndexedDB.

      +@automerge/automerge-repo-storage-indexeddb - v2.0.0-alpha.12 | Automerge Repo - v2.0.0-alpha.13

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

      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 13cab4508..26ef17a3f 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.11 | Automerge Repo - v2.0.0-alpha.12

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

      A StorageAdapter which stores data in the local filesystem

      +@automerge/automerge-repo-storage-nodefs - v2.0.0-alpha.12 | Automerge Repo - v2.0.0-alpha.13

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

      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 06b10778f..49ce12794 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.11 | Automerge Repo - v2.0.0-alpha.12

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

      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.12 | Automerge Repo - v2.0.0-alpha.13

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

      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 4d6780758..8f4fa9ebe 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.12

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

      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 8dc69356e..6979a6f28 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.12

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

      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 b30fcdbec..b8817f109 100644 --- a/types/_automerge_automerge_repo.ActorId.html +++ b/types/_automerge_automerge_repo.ActorId.html @@ -1 +1 @@ -ActorId | Automerge Repo - v2.0.0-alpha.12
      ActorId: string
      \ No newline at end of file +ActorId | Automerge Repo - v2.0.0-alpha.13
      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 c6ac5a0b9..85da796c8 100644 --- a/types/_automerge_automerge_repo.AnyDocumentId.html +++ b/types/_automerge_automerge_repo.AnyDocumentId.html @@ -1 +1 @@ -AnyDocumentId | Automerge Repo - v2.0.0-alpha.12
      \ No newline at end of file +AnyDocumentId | Automerge Repo - v2.0.0-alpha.13
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.AutomergeUrl.html b/types/_automerge_automerge_repo.AutomergeUrl.html index bc4a4e437..abe999cb0 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.12
      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.13
      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 bbf13d185..ddd34ee70 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.12
      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.13
      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 d8e50a617..1f5075ab4 100644 --- a/types/_automerge_automerge_repo.Change.html +++ b/types/_automerge_automerge_repo.Change.html @@ -1 +1 @@ -Change | Automerge Repo - v2.0.0-alpha.12
      Change: Uint8Array
      \ No newline at end of file +Change | Automerge Repo - v2.0.0-alpha.13
      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 25df70aa8..994913178 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.12
      ChangeFn<T>: ((doc) => void)

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

      +ChangeFn | Automerge Repo - v2.0.0-alpha.13
      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 fa66d8fa4..e05965713 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.12
      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.13
      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 5a20702c1..a96aab1c0 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.12
      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.13

      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 3809b6c8a..d31d80f27 100644 --- a/types/_automerge_automerge_repo.ChunkType.html +++ b/types/_automerge_automerge_repo.ChunkType.html @@ -1 +1 @@ -ChunkType | Automerge Repo - v2.0.0-alpha.12
      ChunkType: "snapshot" | "incremental"
      \ No newline at end of file +ChunkType | Automerge Repo - v2.0.0-alpha.13
      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 e180c3129..86ab15d4a 100644 --- a/types/_automerge_automerge_repo.Cursor.html +++ b/types/_automerge_automerge_repo.Cursor.html @@ -1 +1 @@ -Cursor | Automerge Repo - v2.0.0-alpha.12
      Cursor: string
      \ No newline at end of file +Cursor | Automerge Repo - v2.0.0-alpha.13
      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 d89b0b5eb..ccec73dce 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.12
      Doc<T>: {
          readonly [P in keyof T]: T[P]
      }

      An automerge document.

      +Doc | Automerge Repo - v2.0.0-alpha.13
      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 71c0a1a43..84b00a456 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.12
      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.13

      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 3a79dbb25..c11c6306f 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.12
      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.13

      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 3f81151c9..c5ad49daa 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.12
      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.13
      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 76baf4e93..eef59933d 100644 --- a/types/_automerge_automerge_repo.HandleState.html +++ b/types/_automerge_automerge_repo.HandleState.html @@ -1 +1 @@ -HandleState | Automerge Repo - v2.0.0-alpha.12
      \ No newline at end of file +HandleState | Automerge Repo - v2.0.0-alpha.13
      \ No newline at end of file diff --git a/types/_automerge_automerge_repo.Heads.html b/types/_automerge_automerge_repo.Heads.html index f309c2d73..7ff4b91ff 100644 --- a/types/_automerge_automerge_repo.Heads.html +++ b/types/_automerge_automerge_repo.Heads.html @@ -1 +1 @@ -Heads | Automerge Repo - v2.0.0-alpha.12
      Heads: Hash[]
      \ No newline at end of file +Heads | Automerge Repo - v2.0.0-alpha.13
      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 b39e04739..abdae91fe 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.12
      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.13

      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 e76cd1608..9f391cb2f 100644 --- a/types/_automerge_automerge_repo.Mark.html +++ b/types/_automerge_automerge_repo.Mark.html @@ -1 +1 @@ -Mark | Automerge Repo - v2.0.0-alpha.12
      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.13
      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 876f224e4..65cf762b8 100644 --- a/types/_automerge_automerge_repo.MarkRange.html +++ b/types/_automerge_automerge_repo.MarkRange.html @@ -1 +1 @@ -MarkRange | Automerge Repo - v2.0.0-alpha.12
      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.13
      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 4ad1e542e..d6b3d3722 100644 --- a/types/_automerge_automerge_repo.MarkValue.html +++ b/types/_automerge_automerge_repo.MarkValue.html @@ -1 +1 @@ -MarkValue | Automerge Repo - v2.0.0-alpha.12
      MarkValue: string | number | null | boolean | Date | Uint8Array
      \ No newline at end of file +MarkValue | Automerge Repo - v2.0.0-alpha.13
      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 7b40acad0..25d482ccd 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.12
      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 da3199ffe..634748ac8 100644 --- a/types/_automerge_automerge_repo.Patch.html +++ b/types/_automerge_automerge_repo.Patch.html @@ -1 +1 @@ -Patch | Automerge Repo - v2.0.0-alpha.12
      Patch: PutPatch | DelPatch | SpliceTextPatch | IncPatch | InsertPatch | MarkPatch | UnmarkPatch | ConflictPatch
      \ No newline at end of file +Patch | Automerge Repo - v2.0.0-alpha.13
      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 f0ee293f0..63cd8cd92 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.12
      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.13

      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 488d68953..f3f05cc0b 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.12
      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.13
      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 9199a243d..e5048755c 100644 --- a/types/_automerge_automerge_repo.Prop.html +++ b/types/_automerge_automerge_repo.Prop.html @@ -1 +1 @@ -Prop | Automerge Repo - v2.0.0-alpha.12
      Prop: string | number
      \ No newline at end of file +Prop | Automerge Repo - v2.0.0-alpha.13
      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 15eab9f45..9c851dcb4 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.12
      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.13
      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 9bf3c1182..1beb125fa 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.12
      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.13
      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 c1cea051d..61bc5201f 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.12
      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.13
      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 015376fbb..a9cf69012 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.12
      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.13
      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 8198f8566..e29a2027b 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.12
      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.13
      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 208e70719..d243b196b 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.12
      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.13

      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 2a919d179..8fb32e75b 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.12
      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.13
      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 a98a4975a..df91b8609 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.12
      BroadcastChannelNetworkAdapterOptions: {
          channelName: string;
      }

      Type declaration

      • channelName: string
      \ No newline at end of file +BroadcastChannelNetworkAdapterOptions | Automerge Repo - v2.0.0-alpha.13
      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 6ff0a407d..197d4be79 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.12
      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.13
      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 45fd9cf46..baef9e119 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.12
      FromClientMessage: JoinMessage | Message

      A message from the client to the server

      -
      \ No newline at end of file +FromClientMessage | Automerge Repo - v2.0.0-alpha.13
      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 170e543cd..427dbaf93 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.12
      FromServerMessage: PeerMessage | ErrorMessage | Message

      A message from the server to the client

      -
      \ No newline at end of file +FromServerMessage | Automerge Repo - v2.0.0-alpha.13
      FromServerMessage: PeerMessage | ErrorMessage | Message

      A message from the server to the client

      +
      \ 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 2d1cc8df7..63b3a1d1e 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.12
      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.13
      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 2489c3225..8d872f3b7 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.12
      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.13
      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 fc5e0e18e..daf1987f1 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.12
      ProtocolVersion: typeof ProtocolV1

      The versions of the websocket protocol

      -
      \ No newline at end of file +ProtocolVersion | Automerge Repo - v2.0.0-alpha.13
      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 d968d836a..3793bb4ac 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.12
      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.13
      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 d2c21a658..910ab24d1 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.12
      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.13
      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 f76d193ca..5b65b8840 100644 --- a/variables/_automerge_automerge_repo.HandleState-1.html +++ b/variables/_automerge_automerge_repo.HandleState-1.html @@ -1,4 +1,4 @@ -HandleState | Automerge Repo - v2.0.0-alpha.12
      HandleState: {
          DELETED: "deleted";
          IDLE: "idle";
          LOADING: "loading";
          READY: "ready";
          REQUESTING: "requesting";
          UNAVAILABLE: "unavailable";
          UNLOADED: "unloaded";
      } = ...

      Possible internal states for a DocHandle

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

      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

        @@ -6,4 +6,4 @@
      • 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

      • Readonly UNLOADED: "unloaded"

        The document has been unloaded from the handle, to free memory usage

        -
      \ 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 77850b890..2ade124d5 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.12
      ProtocolV1: "1" = "1"
      \ No newline at end of file +ProtocolV1 | Automerge Repo - v2.0.0-alpha.13
      ProtocolV1: "1" = "1"
      \ 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 c90a7c099..3dbd96b51 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.12
      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.13
      RepoContext: Context<null | Repo> = ...

      A React context which provides access to an Automerge repo.

      +
      \ No newline at end of file