Test/node_modules/@excalidraw/mermaid-to-excalidraw/dist/interfaces.d.ts
2026-04-09 22:54:00 +07:00

60 lines
1.4 KiB
TypeScript

import { ExcalidrawElementSkeleton } from "@excalidraw/excalidraw/types/data/transform.js";
import { BinaryFiles } from "@excalidraw/excalidraw/types/types.js";
export declare enum VERTEX_TYPE {
ROUND = "round",
STADIUM = "stadium",
DOUBLECIRCLE = "doublecircle",
CIRCLE = "circle",
DIAMOND = "diamond"
}
export declare enum LABEL_STYLE_PROPERTY {
COLOR = "color"
}
export declare enum CONTAINER_STYLE_PROPERTY {
FILL = "fill",
STROKE = "stroke",
STROKE_WIDTH = "stroke-width",
STROKE_DASHARRAY = "stroke-dasharray"
}
export interface Vertex {
id: string;
type: VERTEX_TYPE;
labelType: string;
text: string;
x: number;
y: number;
width: number;
height: number;
link?: string;
containerStyle: {
[key in CONTAINER_STYLE_PROPERTY]?: string;
};
labelStyle: {
[key in LABEL_STYLE_PROPERTY]?: string;
};
}
export interface SubGraph {
id: string;
nodeIds: string[];
text: string;
labelType: string;
x: number;
y: number;
width: number;
height: number;
}
export interface Position {
x: number;
y: number;
}
export interface GraphImage {
type: "graphImage";
mimeType: string;
dataURL: string;
width: number;
height: number;
}
export interface MermaidToExcalidrawResult {
elements: ExcalidrawElementSkeleton[];
files?: BinaryFiles;
}