Expand description
General-purpose building blocks for Loom implementations.
This library aims to make building Loom implementations easier by providing the following primitives:
DependentWeave- A tree-basedWeavewhere eachNodedepends on the contents of the previous Node.DependentLoroWeave- ADependentWeavewrapper which adds collaborative editing using the [loro] CRDT library (requiresrkyvandlorofeatures to be enabled).
IndependentWeave- A DAG-basedWeavewhere eachNodedoes not depend on the contents of the previous Node.
Operations on the built-in Weave implementations always preserve node ordering through the use of IndexSet, and (non-tail) insertion and removal operations on ordered sets can have a worst-case time complexity of O(n).
Efficient (de)serialization is supported using rkyv and serde. Basic functionality for versioning serialized data is provided by VersionedBytes (requires rkyv feature to be enabled).
Re-exports§
Modules§
- dependent
DependentWeaveis a tree-basedWeavewhere eachNodedepends on the contents of the previous Node.- independent
IndependentWeaveis a DAG-basedWeavewhere eachNodedoes not depend on the contents of the previous Node.- layout
Weaverendering helpers.- versioning
- Utilities for versioning serialized binary data.
- wrappers
- Wrappers which add additional functionality to
Weaveimplementations.
Enums§
- Discrete
Content Result - A type representing the results of an action on a
DiscreteContentsitem. - Layout
Item - A geometric item within an arrangement of a Weave’s content.
Traits§
- Active
Path Weave - A
Weavewhere everyNodein the active path is always considered active. - Active
Singular Weave - A
Weavewhere only oneNodecan be considered active at a time. - Bookmarkable
Weave - A
Weavewhere nodes can be bookmarked. - Deduplicatable
Contents Nodecontents which can be meaningfully deduplicated.- Discrete
Contents Nodecontents which can be split apart or merged together.- Discrete
Weave - A
Weavewhere the contents ofNodeobjects can be split and merged. - Immutable
Active Path Weave - An
ImmutableWeavewhere everyNodein the active path is always considered active. - Immutable
Active Singular Weave - An
ImmutableWeavewhere only oneNodecan be considered active at a time. - Immutable
Bookmarkable Weave - An
ImmutableWeavewhere nodes can be bookmarked. - Immutable
Layouter - An algorithm which arranges an
ImmutableWeave’s content for graphical rendering in an efficiently accessible form. - Immutable
Metadata Weave - An
ImmutableWeavecontaining document-wide metadata. - Immutable
Weave - A read-only
Weave. - Independent
Contents Nodecontents which do not depend on the contents of otherNodeobjects in order to be meaningful.- Independent
Weave - A
WeavewhereNodeobjects do not depend on their parents in order to be meaningful. - Layouter
- An algorithm which arranges a
Weave’s content for graphical rendering in an efficiently accessible form. - Metadata
Weave - A
Weavecontaining document-wide metadata. - Node
- An item within a
Weavewhich can be connected to other items. - Semi
Independent Weave - A
WeavewhereNodeobjects do not depend on the contents of their parents in order to be meaningful. - Sortable
Bookmarkable Weave - A
Weavewhere the ordering of bookmarked nodes is stable and can be user-defined. - Sortable
Weave - A
Weavewhere the ordering of nodes is stable and can be user-defined. - Weave
- A document linking together multiple
Nodeobjects without cyclical links.