Leaf
    Preparing search index...

    Module @muni-town/leaf

    Welcome to the Leaf SDK! Leaf is an opinionated wrapper around CRDT tools for building local-first apps!

    Leaf is built around an Entity-Component data model designed to help you build inter-operable apps.

    If you are new to Leaf, first check out defComponent and then look at Entity to get an idea of how things are put together. Finally you'll want to use a Peer in most cases to sync your entities with storage and sync interfaces.

    Leaf is currently built on Loro as its underlying CRDT, and Entity.doc is in fact a LoroDoc, so reading the Loro documentation will be necessary to understand how to fully interact with the Leaf entity data.

    Classes

    Awareness
    AwarenessWasm
    ChangeModifier
    Cursor
    Entity
    EntityId
    EphemeralStore
    EphemeralStoreWasm
    Loro
    LoroCounter
    LoroDoc
    LoroList
    LoroMap
    LoroMovableList
    LoroText
    LoroTree
    LoroTreeNode
    Marker
    Peer
    StorageManager
    SuperPeer1
    SuperPeer1BinaryWrapper
    Sync1BinaryWrapper
    Syncer1
    UndoManager
    VersionVector

    Interfaces

    Change
    EphemeralStoreEvent
    ImportBlobMetadata
    Listener
    LoroEvent
    LoroEventBatch
    StorageInterface
    Sync1BinaryInterface
    Sync1Interface
    TextUpdateOptions

    Type Aliases

    AwarenessListener
    ClientMessage
    ComponentConstructor
    ComponentDef
    ComponentId
    ComponentType
    Container
    ContainerID
    ContainerType
    CounterDiff
    CounterSpan
    Delta
    Diff
    EntityDoc
    EntityIdStr
    EphemeralListener
    EphemeralLocalListener
    ExportMode
    Frontiers
    IdSpan
    ImportStatus
    IntoEntityId
    JsonChange
    JsonContainerID
    JsonDiff
    JsonOp
    JsonOpID
    JsonSchema
    JsonValue
    ListDiff
    ListJsonDiff
    ListOp
    MapDiff
    MapJsonDiff
    MapOp
    MemorySync1Adapter
    MovableListOp
    NonNullableType
    OpId
    Path
    PeerID
    PeerOpenOptions
    PeerOption
    ServerResponse
    Side
    StorageConfig
    StorageKey
    Subscriber
    Subscription
    SuperPeer1Option
    TextDiff
    TextOp
    TreeDiff
    TreeDiffItem
    TreeID
    TreeNodeJSON
    TreeNodeShallowValue
    TreeNodeValue
    TreeOp
    UndoConfig
    UnknownOp
    Value
    VersionVectorDiff

    Variables

    clientMessage
    defaultPeerOpenOptions
    entityComponentsKey
    entityIdPrefix
    serverResponse

    Functions

    decodeClientMessage
    decodeFrontiers
    decodeImportBlobMeta
    decodeServerResponse
    defComponent
    encodeClientMessage
    encodeFrontiers
    encodeServerResponse
    getType
    idStrToId
    intoEntityId
    isContainer
    isContainerId
    LORO_VERSION
    memorySync1Adapters
    namespacedSubstorage
    newContainerID
    newRootContainerID
    run
    setDebug