JSPM

  • Created
  • Published
  • Downloads 53521
  • Score
    100M100P100Q140714F
  • License GPL-2.0-or-later

Sync Data.

Package Exports

  • @wordpress/sync
  • @wordpress/sync/package.json

Readme

Sync

Sync data between multiple peers and persist in a local database.

Installation

Install the module

npm install @wordpress/sync --save

API

CRDT_RECORD_MAP_KEY

Root-level key for the CRDT document that holds the entity record data.

createSyncManager

The sync manager orchestrates the lifecycle of syncing entity records. It creates Yjs documents, connects to providers, creates awareness instances, and coordinates with the core-data store.

LOCAL_EDITOR_ORIGIN

Origin string for CRDT document changes originating from the local editor.

LOCAL_SYNC_MANAGER_ORIGIN

Origin string for CRDT document changes originating from the sync manager.

Y

Exported copy of Yjs so that consumers of this package don't need to install it.

Contributing to this package

This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to npm and used by WordPress as well as other software projects.

To find out more about contributing to this package or Gutenberg as a whole, please read the project's main contributor guide.



Code is Poetry.