Field Notes
    Preparing search index...

    Interface LayerSyncOptions

    Opt-in versioned layer-definition sync. Presentation only: layer records never carry element bytes, and element-level audience filtering remains the sole privacy boundary.

    interface LayerSyncOptions {
        applyLayer: (update: RemoteLayerUpdate) => void;
        ledger?: LayerLedger;
    }
    Index
    applyLayer: (update: RemoteLayerUpdate) => void

    Applies a winning remote record to host layer state. Called only when the record beats the ledger under the deterministic (version, editor) ordering, so hosts never see stale updates. The host owns policy: it may overlay role-local fields (e.g. keep a layer locked for players) and must apply through history-transparent operations — remote layer changes must never enter local undo history. A throwing hook does not disturb sync.

    ledger?: LayerLedger

    Versioned record state shared across successive clients over one store (e.g. managed-connection rebuilds). Defaults to a fresh ledger.