/** * Flowchart AST Types * * These types represent the Abstract Syntax Tree for Mermaid flowchart diagrams. * They capture all the information parsed from the flowchart syntax. */ /** * Direction of the flowchart layout */ export type FlowchartDirection = 'TB' | 'TD' | 'BT' | 'RL' | 'LR'; /** * Shape types for flowchart nodes */ export type FlowchartNodeShape = 'square' | 'round' | 'circle' | 'doublecircle' | 'ellipse' | 'stadium' | 'subroutine' | 'cylinder' | 'diamond' | 'hexagon' | 'odd' | 'trapezoid' | 'inv_trapezoid' | 'lean_right' | 'lean_left' | 'rect'; /** * Link/edge stroke types */ export type FlowchartLinkStroke = 'normal' | 'thick' | 'dotted'; /** * Link/edge arrow types */ export type FlowchartLinkType = 'arrow_point' | 'arrow_circle' | 'arrow_cross' | 'arrow_open'; /** * Text content with type information */ export interface FlowchartText { text: string; type: 'text' | 'string' | 'markdown'; } /** * A node (vertex) in the flowchart */ export interface FlowchartNode { id: string; text?: FlowchartText; shape: FlowchartNodeShape; classes?: string[]; props?: Record; shapeData?: string; } /** * A link (edge) between nodes */ export interface FlowchartLink { id?: string; source: string; target: string; text?: FlowchartText; stroke: FlowchartLinkStroke; type: FlowchartLinkType; length: number; } /** * A subgraph container */ export interface FlowchartSubgraph { id: string; title?: FlowchartText; nodes: string[]; direction?: FlowchartDirection; } /** * Style definition for a class */ export interface FlowchartClassDef { id: string; styles: Record; } /** * Click handler definition */ export interface FlowchartClickDef { nodeId: string; callback?: string; callbackArgs?: string; href?: string; target?: '_self' | '_blank' | '_parent' | '_top'; } /** * Link style definition */ export interface FlowchartLinkStyle { index: number | 'default'; styles: Record; interpolate?: string; } /** * The complete Flowchart AST */ export interface FlowchartAST { type: 'flowchart'; direction: FlowchartDirection; nodes: Map; links: FlowchartLink[]; subgraphs: FlowchartSubgraph[]; classDefs: Map; classes: Map; clicks: FlowchartClickDef[]; linkStyles: FlowchartLinkStyle[]; title?: string; accDescription?: string; } /** * Create an empty FlowchartAST */ export declare function createEmptyFlowchartAST(): FlowchartAST; //# sourceMappingURL=flowchart.d.ts.map