quick-erd
Version:
quick and easy text-based ERD + code generator for migration, query, typescript types and orm entity
45 lines (44 loc) • 1.7 kB
TypeScript
export type Position = {
x: number;
y: number;
};
export type TablePositionColor = {
x: number;
y: number;
color?: string;
};
export declare const zoomLineRegex: RegExp;
export declare const zoomValueRegex: RegExp;
export declare function zoomToLine(zoom: number): string;
export declare const viewLineRegex: RegExp;
export declare const viewPositionRegex: RegExp;
export declare function viewToLine(view: Position): string;
export declare const tableNameRegex: RegExp;
export declare const tableNameRegex_g: RegExp;
export declare function tableNameToRegex(name: string): RegExp;
export declare function tableNameToLine(name: string, position: TablePositionColor): string;
export declare const textBgColorRegex: RegExp;
export declare function textBgColorToLine(color: string): string;
export declare const textColorRegex: RegExp;
export declare function textColorToLine(color: string): string;
export declare const diagramBgColorRegex: RegExp;
export declare function diagramBgColorToLine(color: string): string;
export declare const diagramTextColorRegex: RegExp;
export declare function diagramTextColorToLine(color: string): string;
export declare const tableBgColorRegex: RegExp;
export declare function tableBgColorToLine(color: string): string;
export declare const tableTextColorRegex: RegExp;
export declare function tableTextColorToLine(color: string): string;
export type ColorDict<T> = {
textBgColor: T;
textColor: T;
diagramBgColor: T;
diagramTextColor: T;
tableBgColor: T;
tableTextColor: T;
};
export declare const colors: ColorDict<{
regex: RegExp;
toLine: (color: string) => string;
}>;
export type ColorName = keyof typeof colors;