/** * Kanban Diagram Wrapper Class * * A unified API for building, mutating, and querying kanban diagrams. * Provides a fluent interface that wraps the KanbanAST. */ import { DiagramWrapper } from './diagram-wrapper.js'; import type { KanbanAST, KanbanNode } from './types/kanban.js'; import { KanbanNodeType } from './types/kanban.js'; import type { RenderOptions } from './types/render-options.js'; /** * Options for adding a node */ export interface AddKanbanNodeOptions { /** Node shape type */ type?: KanbanNodeType; /** Optional icon */ icon?: string; /** Optional CSS class */ class?: string; /** Optional shape data */ shapeData?: string; } /** * Query options for finding nodes */ export interface FindKanbanNodesQuery { /** Find nodes with this type */ type?: KanbanNodeType; /** Find nodes with this icon */ icon?: string; /** Find nodes with this class */ class?: string; /** Find nodes whose description contains this string */ descrContains?: string; /** Find nodes at this indent level */ indent?: number; } /** * A fluent wrapper for KanbanAST that supports building, mutating, and querying. */ export declare class Kanban extends DiagramWrapper { private constructor(); /** * Create a new empty kanban diagram */ static create(): Kanban; /** * Create a Kanban wrapper from an existing AST */ static from(ast: KanbanAST): Kanban; /** * Parse Mermaid syntax and create a Kanban wrapper */ static parse(text: string): Kanban; /** * Render to Mermaid syntax */ render(options?: RenderOptions): string; /** * Create a deep clone of this kanban */ clone(): Kanban; /** * Get all root-level nodes */ get nodes(): KanbanNode[]; /** * Get total node count (including children) */ get nodeCount(): number; /** * Add a root-level node */ addNode(id: string, descr?: string, options?: AddKanbanNodeOptions): this; /** * Add a child node to a parent */ addChild(parentId: string, id: string, descr?: string, options?: AddKanbanNodeOptions): this; /** * Find a node by ID (searches recursively) */ findNodeById(id: string): KanbanNode | undefined; /** * Remove a node by ID */ removeNode(id: string): this; /** * Set node description */ setNodeDescr(id: string, descr: string): this; /** * Set node type */ setNodeType(id: string, type: KanbanNodeType): this; /** * Set node icon */ setNodeIcon(id: string, icon: string): this; /** * Remove node icon */ removeNodeIcon(id: string): this; /** * Set node class */ setNodeClass(id: string, className: string): this; /** * Remove node class */ removeNodeClass(id: string): this; /** * Get all nodes (flattened, including children) */ getAllNodes(): KanbanNode[]; /** * Find nodes matching a query */ findNodes(query: FindKanbanNodesQuery): KanbanNode[]; /** * Get children of a node */ getChildren(id: string): KanbanNode[]; /** * Get parent of a node */ getParent(id: string): KanbanNode | undefined; /** * Get all leaf nodes (nodes with no children) */ getLeafNodes(): KanbanNode[]; /** * Get depth of the tree */ getDepth(): number; } //# sourceMappingURL=kanban.d.ts.map