@dineug/erd-editor
Version:
Entity-Relationship Diagram Editor
109 lines (108 loc) • 2.37 kB
TypeScript
import { Point, RelationshipPoint, ValuesType } from '../../internal-types';
export declare const DirectionName: {
readonly left: "left";
readonly right: "right";
readonly top: "top";
readonly bottom: "bottom";
};
export type DirectionName = ValuesType<typeof DirectionName>;
export declare const DirectionNameList: ReadonlyArray<string>;
export type PointToPoint = {
x1: number;
y1: number;
x2: number;
y2: number;
};
export type DrawPathLine = {
start: PointToPoint;
};
export type DrawLine = {
start: {
base: PointToPoint;
base2: PointToPoint;
center: PointToPoint;
center2: PointToPoint;
};
};
export type PathPoint = {
M: Point;
L: Point;
Q: Point;
d(): Array<[Point, Point]>;
};
export type Path = {
M: Point;
L: Point;
Q: Point;
d(): string;
};
export type DrawPath = {
path: {
path: Path;
line: DrawPathLine;
};
line: DrawLine;
};
export type PathLine = {
start: PointToPoint;
end: PointToPoint;
};
export type Line = {
start: {
base: PointToPoint;
base2: PointToPoint;
center: PointToPoint;
center2: PointToPoint;
};
end: {
base: PointToPoint;
base2: PointToPoint;
left: PointToPoint;
center: PointToPoint;
center2: PointToPoint;
right: PointToPoint;
};
};
export type Circle = {
cx: number;
cy: number;
};
export type RelationshipPath = {
path: {
path: PathPoint;
line: PathLine;
};
line: {
line: Line;
circle: Circle;
startCircle: Circle;
};
};
export type RelationshipMarginPoint = {
xArray: number[];
yArray: number[];
};
export type RelationshipOrder = {
start: RelationshipPoint;
end: RelationshipPoint;
distance: number;
};
export type ObjectPoint = {
width: number;
height: number;
top: Point;
bottom: Point;
left: Point;
right: Point;
lt: Point;
rt: Point;
lb: Point;
rb: Point;
};
export declare const isDirection: (value: string) => boolean;
export declare const PATH_HEIGHT = 30;
export declare const PATH_END_HEIGHT: number;
export declare const PATH_LINE_HEIGHT = 35;
export declare const LINE_SIZE = 10;
export declare const LINE_HEIGHT = 16;
export declare const CIRCLE_HEIGHT = 26;