UNPKG

@dineug/erd-editor

Version:

Entity-Relationship Diagram Editor

20 lines (19 loc) 728 B
import { RootState } from '../../../engine/state'; import { Column, Table } from '../../../internal-types'; /** * Map<uuid, [tag, Map<path, diff>]> */ export type DiffMap = Map<string, DiffTuple>; type DiffTuple = [string, Map<string, number>]; type NameToTableMap = Map<string, { table: Table; nameToColumnMap: Map<string, Column>; }>; export declare const Diff: { readonly insert: 1; readonly delete: 2; }; export declare function diffState(prevState: RootState, state: RootState): [DiffMap, DiffMap]; export declare function getNameToTableMap({ doc: { tableIds }, collections, }: RootState): NameToTableMap; export declare function getDiffStyle(diff: number, diffMap: DiffMap): HTMLStyleElement; export {};