/** * Mindmap Wrapper Class * * A unified API for building, mutating, and querying mindmap diagrams. * Provides a fluent interface that wraps the MindmapAST. */ import { DiagramWrapper } from './diagram-wrapper.js'; import type { MindmapAST, MindmapNode, MindmapNodeShape } from './types/mindmap.js'; import type { RenderOptions } from './types/render-options.js'; /** * Options for adding a node */ export interface AddMindmapNodeOptions { /** Node shape (default: 'default') */ shape?: MindmapNodeShape; /** Icon */ icon?: string; /** CSS class */ cssClass?: string; } /** * Query options for finding nodes */ export interface FindMindmapNodesQuery { /** Find nodes with this shape */ shape?: MindmapNodeShape; /** Find nodes whose description contains this string */ textContains?: string; /** Find nodes with this icon */ icon?: string; /** Find nodes with this CSS class */ cssClass?: string; /** Find nodes at this level */ level?: number; } /** * A fluent wrapper for MindmapAST that supports building, mutating, and querying. */ export declare class Mindmap extends DiagramWrapper { private constructor(); /** * Create a new mindmap with a root node */ static create(rootId: string, rootDescription?: string, options?: AddMindmapNodeOptions): Mindmap; /** * Create a Mindmap wrapper from an existing AST */ static from(ast: MindmapAST): Mindmap; /** * Parse Mermaid syntax and create a Mindmap wrapper */ static parse(text: string): Mindmap; /** * Render to Mermaid syntax */ render(options?: RenderOptions): string; /** * Create a deep clone of this mindmap */ clone(): Mindmap; /** * Get the root node */ get root(): MindmapNode | undefined; /** * Get total node count */ get nodeCount(): number; /** * Get maximum depth of the tree */ get maxDepth(): number; /** * Find a node by ID */ getNode(id: string): MindmapNode | undefined; /** * Find the parent of a node */ getParent(id: string): MindmapNode | undefined; /** * Add a child node to a parent */ addChild(parentId: string, childId: string, description?: string, options?: AddMindmapNodeOptions): this; /** * Remove a node and all its children */ removeNode(id: string): this; /** * Set node description */ setDescription(id: string, description: string): this; /** * Set node shape */ setShape(id: string, shape: MindmapNodeShape): this; /** * Set node icon */ setIcon(id: string, icon: string): this; /** * Remove node icon */ removeIcon(id: string): this; /** * Set node CSS class */ setClass(id: string, cssClass: string): this; /** * Remove node CSS class */ removeClass(id: string): this; /** * Move a node to a new parent */ moveNode(id: string, newParentId: string): this; /** * Get all nodes as a flat array */ getAllNodes(): MindmapNode[]; /** * Find nodes matching a query */ findNodes(query: FindMindmapNodesQuery): MindmapNode[]; /** * Get all nodes at a specific level */ getNodesAtLevel(level: number): MindmapNode[]; /** * Get all leaf nodes (nodes with no children) */ getLeafNodes(): MindmapNode[]; /** * Get the path from root to a node */ getPath(id: string): MindmapNode[]; /** * Get siblings of a node */ getSiblings(id: string): MindmapNode[]; } //# sourceMappingURL=mindmap.d.ts.map