A collection used to store data in an indexed sequence structure. This type is internally
implemented as a double linked list, which may squash values inserted directly one after another
into single list node upon transaction commit.
A ywasm document type. Documents are most important units of collaborative resources management.
All shared collections live within a scope of their corresponding documents. All updates are
generated on per-document basis (rather than individual shared type). All operations on shared
collections happen via YTransaction, which lifetime is also bound to a document.
Collection used to store key-value entries in an unordered manner. Keys are always represented
as UTF-8 strings. Values can be any value type supported by Yrs: JSON-like primitives as well as
shared data types.
A shared data type used for collaborative text editing. It enables multiple users to add and
remove chunks of text in efficient manner. This type is internally represented as a mutable
double-linked list of text chunks - an optimization occurs during YTransaction.commit, which
allows to squash multiple consecutively inserted characters together as a single chunk of text
even between transaction boundaries in order to preserve more efficient memory model.
Applies delta update generated by the remote document replica to a current document. This
method assumes that a payload maintains lib0 v1 encoding format.
Applies delta update generated by the remote document replica to a current document. This
method assumes that a payload maintains lib0 v2 encoding format.
Retrieves a sticky index corresponding to a given human-readable index pointing into
the shared ytype. Unlike standard indexes sticky indexes enables to track
the location inside of a shared y-types, even in the face of concurrent updates.
Encodes all updates that have happened since a given version vector into a compact delta
representation using lib0 v1 encoding. If vector parameter has not been provided, generated
delta payload will contain all changes of a current ywasm document, working effectivelly as its
state snapshot.
Encodes all updates that have happened since a given version vector into a compact delta
representation using lib0 v2 encoding. If vector parameter has not been provided, generated
delta payload will contain all changes of a current ywasm document, working effectivelly as its
state snapshot.
Encodes a state vector of a given ywasm document into its binary representation using lib0 v1
encoding. State vector is a compact representation of updates performed on a given document and
can be used by encode_state_as_update on remote peer to generate a delta update payload to
synchronize changes between peers.