loro-mirror
Version:
Type-safe state management synchronized with Loro CRDT via a declarative schema and bidirectional mirroring.
27 lines (22 loc) • 621 B
text/typescript
/**
* Loro Mirror Core
* A TypeScript state management library that automatically syncs application state with loro-crdt
*/
// Re-export all public APIs
export * from "./schema";
export {
Mirror,
toNormalizedJson,
type MirrorOptions,
type SetStateOptions,
type UpdateMetadata,
type SubscriberCallback,
type InferContainerOptions,
SyncDirection,
} from "./core";
// Default export
import * as schema from "./schema";
import * as core from "./core";
type Combined = typeof schema & typeof core;
const loroMirror: Combined = Object.assign({}, schema, core);
export default loroMirror;