the list of operations in order. An operation can be any one of:
Prepend an operation to this delta.
Prepend an operation to this delta.
the delta with the operation prepended
Append an operation ot this delta.
Append an operation ot this delta.
the delta with the operation appended
The length of the starting document this delta operates on.
The length of the starting document this delta operates on. Equal to the sum of the lengths of its retain and delete operations.
Composes two deltas together, that should be applied to a document in sequence, into one delta.
Composes two deltas together, that should be applied to a document in sequence, into one delta.
the second delta to be composed after this one
the composed delta
Is the delta a "document"? If a delta contains only inserts, then it can be said that it represents the state of a document itself.
Is the delta "no-op"? In other words, is this a delta that has no effects if applied to a document or composed/transformed with another delta?
Composes two deltas together, that should be applied to a document in sequence, into one delta.
Composes two deltas together, that should be applied to a document in sequence, into one delta.
the second delta to be composed after this one
the composed delta
the list of operations in order.
the list of operations in order. An operation can be any one of:
The length of the document after applying this delta.
The length of the document after applying this delta. Equal to the length of its retain and insert operations.
a string representation of the delta. For debugging purposes only.
Transform another delta against this one.
Transform another delta against this one.
This delta has priority over that delta, unless the priority flag is set to true, in which case that delta wins.
the other operation to transform this one against
whether this delta wins contests. By default this operation is being applied _second_.
the "that" delta, transformed
Transform a position (ie: cursor index within a document) against this delta.
Transform a position (ie: cursor index within a document) against this delta. For example, if a user submits their current cursor position, and other deltas have been applied more recently, their cursor position can be transformed.
Transform two deltas applied to a document simultaneously.
Transform two deltas applied to a document simultaneously.
A delta represents a change performed on a document as a sequence of operations that move a cursor over the document.
the list of operations in order. An operation can be any one of: