mermaid/packages/mermaid/src/diagrams/block/blockTypes.ts

54 lines
910 B
TypeScript
Raw Normal View History

2023-07-07 13:12:18 +02:00
import type { BaseDiagramConfig } from '../../config.type.js';
export interface BlockConfig extends BaseDiagramConfig {
padding?: number;
}
export type BlockType =
| 'column-setting'
| 'round'
| 'block_arrow'
| 'space'
| 'square'
| 'diamond'
| 'hexagon'
| 'odd'
| 'lean_right'
| 'lean_left'
| 'trapezoid'
| 'inv_trapezoid'
| 'rect_left_inv_arrow'
| 'odd_right'
| 'circle'
| 'ellipse'
| 'stadium'
| 'subroutine'
| 'cylinder'
| 'group'
2023-09-01 14:06:13 +02:00
| 'doublecircle'
| 'composite';
export interface Block {
width?: number;
2023-09-01 14:06:13 +02:00
id: string;
label?: string;
parent?: Block;
type?: BlockType;
2023-09-01 14:06:13 +02:00
children: Block[];
size?: {
width: number;
height: number;
x: number;
y: number;
};
node?: any;
columns?: number; // | TBlockColumnsDefaultValue;
classes?: string[];
directions?: string[];
}
export interface Link {
source: Block;
target: Block;
}