Releases: dineug/erd-editor
Releases Β· dineug/erd-editor
v3.2.6
v3.2.5
v3.2.4
v3.2.3
v3.2.2
v3.2.0
v3.1.0
Changes
- The SharedStore API has been added to support collaborative editing.
type SharedStore = {
connection: () => void;
disconnect: () => void;
dispatch: (actions: Array<AnyAction> | AnyAction) => void;
dispatchSync: (actions: Array<AnyAction> | AnyAction) => void;
subscribe: (fn: (value: AnyAction[]) => void) => Unsubscribe;
destroy: () => void;
};
// example
const sharedStore = editor.getSharedStore({...});
- ReplicationStore API added for efficient remote storage.
type ReplicationStore = {
readonly value: string;
on: (reducers: Partial<ReducerRecord>) => Unsubscribe;
setInitialValue: (value: string) => void;
dispatch: (actions: Array<AnyAction> | AnyAction) => void;
dispatchSync: (actions: Array<AnyAction> | AnyAction) => void;
destroy: () => void;
};
// example
import { createReplicationStore } from '@dineug/erd-editor/engine.js';
const replicationStore = createReplicationStore({...});