/** * TreeNode represents a node in the tree structure */ interface TreeNode { value: string; description?: string; child: TreeNode[]; edgeText?: string; nodeConfig?: Partial; [key: string]: any; collapsibleState?: CollapsibleNodeState; imageUrl?: string; title?: string; subtitle?: string; } /** * FormattedTreeNode represents a node after processing for rendering */ interface FormattedTreeNode { text: string; description?: string; parent: string | null; edgeText?: string | null; nodeConfig?: Partial; [key: string]: any; collapsibleState?: CollapsibleNodeState; imageUrl?: string; title?: string; subtitle?: string; } /** * FormattedTree is a 2D array where each sub-array represents a level in the tree */ type FormattedTree = FormattedTreeNode[][]; /** * NodePosition represents a node's position in the formatted tree */ interface NodePosition { level: number; position: number; } /** * VerticalAlignment options for tree rendering */ type VerticalAlignment = "left" | "center" | "right"; /** * HorizontalAlignment options for tree rendering */ type HorizontalAlignment = "top-to-bottom" | "bottom-to-top"; /** * TreeType represents the different types of tree visualizations */ type TreeType = "direct" | "right-angle" | "curved" | "all-direction"; /** * Connection type for drawing connections between nodes */ type ConnectionType = "direct" | "right-angle" | "curved" | "custom"; /** * Arrow direction for connections */ type ArrowDirection = "source-to-target" | "target-to-source" | "both"; /** * Point represents a coordinate in 2D space */ interface Point { x: number; y: number; } /** * ConnectionOptions represents configuration for drawing connections between nodes */ interface ConnectionOptions { type?: "direct" | "right-angle" | "curved" | "custom"; color?: string; width?: number; dasharray?: string; opacity?: number; showArrows?: boolean; arrowDirection?: "source-to-target" | "target-to-source" | "both"; arrowSize?: number; arrowColor?: string; curveRadius?: number; customPath?: string; edgeText?: string; textSize?: number; textColor?: string; textBackgroundColor?: string; } /** * Image configuration for image nodes */ interface ImageConfig { imageWidth?: number; imageHeight?: number; imageBorderRadius?: number; imageBorderColor?: string; imageBorderWidth?: number; imageOpacity?: number; backgroundColor?: string; } /** * Image title configuration for image nodes */ interface ImageTitleConfig { fontSize?: number; fontColor?: string; fontWeight?: string; marginTop?: number; alignment?: "left" | "center" | "right"; } /** * Image subtitle configuration for image nodes */ interface ImageSubtitleConfig { fontSize?: number; fontColor?: string; fontWeight?: string; marginTop?: number; alignment?: "left" | "center" | "right"; } /** * Text positioning configuration for image nodes */ interface ImageTextPositionConfig { position?: "bottom" | "left" | "right"; padding?: number; spacing?: number; } /** * NodeConfig represents configuration for node styling and behavior */ interface NodeConfig { type?: NodeType; width?: number; height?: number; color?: string; borderColor?: string; borderWidth?: number; borderRadius?: number; opacity?: number; fontSize?: number; fontColor?: string; fontFamily?: string; padding?: number; shadow?: boolean; shadowColor?: string; shadowOffset?: Point; gradient?: boolean; gradientStartColor?: string; gradientEndColor?: string; collapsible?: boolean; imageConfig?: ImageConfig; imageTitleConfig?: ImageTitleConfig; imageSubtitleConfig?: ImageSubtitleConfig; imageTextPositionConfig?: ImageTextPositionConfig; imageMargin?: number; customAttributes?: { [key: string]: string | number; }; } /** * EdgeConfig represents configuration for edge/connection styling and behavior */ interface EdgeConfig { color?: string; width?: number; opacity?: number; dasharray?: string; showArrows?: boolean; arrowDirection?: ArrowDirection; arrowSize?: number; arrowColor?: string; curveRadius?: number; customPath?: string; textSize?: number; textColor?: string; textBackgroundColor?: string; } /** * TitlePosition represents the positioning options for chart titles */ interface TitlePosition { horizontal: "left" | "center" | "right"; vertical: "top" | "bottom"; } /** * TitleConfig represents configuration for chart title and description */ interface TitleConfig { title: string; description: string; position: TitlePosition; titleStyle: { fontSize: number; fontColor: string; fontFamily: string; fontWeight: string; margin: number; }; descriptionStyle: { fontSize: number; fontColor: string; fontFamily: string; fontWeight: string; margin: number; }; } /** * Action button position options */ type ActionPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right"; /** * ActionConfig represents configuration for action buttons */ interface ActionConfig { download?: { enabled: boolean; position?: ActionPosition; filename?: string; }; } /** * TreeChartOptions represents configuration for the tree chart */ interface TreeChartOptions { horizontalGap?: number; verticalGap?: number; verticalAlign?: VerticalAlignment; horizontalAlign?: HorizontalAlignment; type?: TreeType; nodeConfig?: NodeConfig; edgeConfig?: EdgeConfig; titleConfig?: Partial; actionConfig?: ActionConfig; } /** * SvgNodeData represents the position and dimensions of a node in the SVG */ interface SvgNodeData { x: number; y: number; centerX?: number; centerY?: number; width?: number; height?: number; bottomY?: number; topY?: number; direction?: { x: number; y: number; }; angle?: number; node?: FormattedTreeNode; } /** * NodeMap is a mapping of node positions to their SVG coordinates */ interface NodeMap { [key: string]: SvgNodeData; } /** * ParentChildMap maps parent positions to arrays of child positions */ interface ParentChildMap { [key: string]: NodePosition[]; } /** * NodeType represents the different types of node shapes */ type NodeType = "rectangle" | "circle" | "ellipse" | "diamond" | "hexagon" | "triangle" | "pentagon" | "octagon" | "star" | "custom" | "node-with-description" | "collapsible-node" | "image"; /** * CollapsibleNodeState for tracking expanded/collapsed state */ interface CollapsibleNodeState { expanded: boolean; } /** * NodeOptions represents configuration for drawing individual nodes */ interface NodeOptions { type?: NodeType; x?: number; y?: number; width?: number; height?: number; fill?: string; stroke?: string; strokeWidth?: number; borderRadius?: number; opacity?: number; text?: string; description?: string; fontSize?: number; fontColor?: string; fontFamily?: string; textAnchor?: "start" | "middle" | "end"; padding?: number; descriptionFontSize?: number; descriptionFontColor?: string; descriptionMarginTop?: number; shadow?: boolean; shadowColor?: string; shadowOffset?: Point; gradient?: boolean; gradientStartColor?: string; gradientEndColor?: string; customAttributes?: { [key: string]: string | number; }; collapsible?: boolean; expanded?: boolean; onToggleExpand?: (expanded: boolean) => void; imageConfig?: ImageConfig; imageTitleConfig?: ImageTitleConfig; imageSubtitleConfig?: ImageSubtitleConfig; imageTextPositionConfig?: ImageTextPositionConfig; imageMargin?: number; imageUrl?: string; title?: string; subtitle?: string; } /** * NodePosition for layout calculations - represents positioned node data */ interface NodeLayoutPosition { node: any; nodeIndex: number; effectiveNodeConfig: any; x: number; y: number; width: number; height: number; actualHeight: number; } /** * LevelLayout represents layout data for a single level */ interface LevelLayout { levelIndex: number; levelHeight: number; nodes: NodeLayoutPosition[]; } /** * TreeLayout represents the complete calculated layout for a tree */ interface TreeLayout { levels: LevelLayout[]; totalWidth: number; totalHeight: number; yOffset: number; } /** * NodeMapEntry represents a node's final rendered position and bounds */ interface NodeMapEntry { x: number; y: number; centerX: number; centerY: number; width: number; height: number; bottomY: number; topY: number; node: any; } /** * Main TreeChart class for creating tree visualizations */ declare class TreeChart { private container; private options; private formattedTree; private svg; /** * Constructor for TreeChart * * @param containerId ID of the HTML element to render the chart in (optional) * @param options Configuration options for the chart */ constructor(containerId?: string, options?: TreeChartOptions); /** * Set the container element for the chart * * @param containerId ID of the HTML element * @returns The TreeChart instance for chaining */ setContainer(containerId: string): TreeChart; /** * Set chart options * * @param options Configuration options * @returns The TreeChart instance for chaining */ setOptions(options: TreeChartOptions): TreeChart; /** * Set the type of tree visualization * * @param type Type of tree visualization * @returns The TreeChart instance for chaining */ setType(type: TreeType): TreeChart; /** * Render the tree chart * * @param data Tree data to visualize * @returns The created SVG element */ render(data: TreeNode): SVGSVGElement; /** * Update the chart with new data * * @param data New tree data * @returns The updated SVG element */ update(data: TreeNode): SVGSVGElement; /** * Get the SVG element * * @returns The SVG element or null if not rendered */ getSvg(): SVGSVGElement | null; /** * Resize the chart * * @param width New width * @param height New height * @returns The TreeChart instance for chaining */ resize(width: number, height: number): TreeChart; } /** * Default options for tree chart rendering */ declare const DEFAULT_OPTIONS: Required> & { actionConfig?: ActionConfig; }; /** * Converts a hierarchical tree structure into a level-by-level array representation * that's easier to render visually * * @param tree The hierarchical tree structure * @param options Optional formatting options including alignment * @returns A formatted representation of the tree organized by levels */ declare function formatTree(tree: TreeNode, options?: { horizontalAlign?: string; }): FormattedTree; /** * Creates an SVG element with the specified dimensions * * @param width Width of the SVG * @param height Height of the SVG * @param viewBox Optional viewBox attribute * @returns SVG element */ declare function createSvgElement(width: number, height: number, viewBox?: string): SVGSVGElement; /** * Calculate width needed for the SVG based on tree data */ declare function calculateSvgWidth(formattedTree: FormattedTree, options: any, nodeDrawer: any): number; /** * Calculate height needed for the SVG based on tree data */ declare function calculateSvgHeight(formattedTree: FormattedTree, options: any, nodeDrawer: any, titleSpace: { top: number; bottom: number; }): number; /** * Utility to get node map key from level and position * * @param level Level in the tree * @param position Position within the level * @returns String key for the node map */ declare function getNodeKey(level: number, position: number): string; /** * Export utility functions */ declare const svgHelpers: { createSvgElement: typeof createSvgElement; getNodeKey: typeof getNodeKey; calculateSvgWidth: typeof calculateSvgWidth; calculateSvgHeight: typeof calculateSvgHeight; }; /** * ConnectionDrawer class for drawing connections between tree nodes * Provides unified connection drawing with customizable styling */ declare class ConnectionDrawer { private svg; private defaultOptions; constructor(svg: SVGSVGElement); /** * Draw a connection between two points */ drawConnection(fromPoint: Point, toPoint: Point, options?: Partial): SVGElement; /** * Draw a complete right-angle connection with three segments (parent → midpoint → child) * This is a higher-level method that creates the full L-shaped connection in one call */ drawThreeSegmentRightAngle(parentPoint: Point, childPoint: Point, options?: Partial): SVGElement[]; /** * Draw a multi-child right-angle connection system * This creates a horizontal connector line with vertical drops to each child */ drawMultiChildRightAngle(parentPoint: Point, childPoints: Point[], horizontalY: number, options?: Partial): SVGElement[]; /** * Draw individual child connections with text for multi-child right-angle systems * This method should be called after drawMultiChildRightAngle to add child connections with text and arrows */ drawChildConnectionsWithText(childPoints: Point[], horizontalY: number, childTexts: (string | undefined)[], options?: Partial): SVGElement[]; /** * Create a direct line connection */ private createDirectConnection; /** * Create a right-angle connection (L-shaped) */ private createRightAngleConnection; /** * Create a curved connection */ private createCurvedConnection; /** * Create a custom path connection */ private createCustomConnection; /** * Apply line styling to a path element */ private applyLineStyles; /** * Add arrow markers to the connection */ private addArrow; /** * Add marker to defs element */ private addMarkerToDefs; /** * Create an arrow marker element */ private createArrowMarker; private addEdgeText; } /** * NodeDrawer class for drawing different types of tree nodes * Provides unified node drawing with customizable styling and types */ declare class NodeDrawer { private svg; private imageNodeRenderer; private nodeWithDescriptionRenderer; private collapsibleNodeRenderer; private rectangleNodeRenderer; private shapeNodeRenderer; private defaultOptions; constructor(svg: SVGSVGElement); /** * Measure text width using BaseNodeRenderer utilities * @private */ private measureText; /** * Calculate text lines using BaseNodeRenderer utilities * @private */ private calculateTextLines; /** * Calculate text wrapping with line width information * @private */ private calculateTextWrapping; /** * Delegate calculation to appropriate specialized renderer * @private */ private delegateCalculation; /** * Calculate dynamic width for nodes that auto-size based on content */ calculateDynamicNodeWidth(node: any, nodeConfig: any): number; /** * Calculate dynamic height for nodes that auto-size based on content */ calculateDynamicNodeHeight(node: any, nodeConfig: any): number; /** * Draw a node at the specified position */ drawNode(options?: Partial): { elements: SVGElement[]; centerX: number; centerY: number; bounds: { x: number; y: number; width: number; height: number; }; }; /** * Create the main node shape based on type */ private createNodeShape; /** * Create an image node using the dedicated ImageNodeRenderer */ private createImageNodeUsingRenderer; /** * Create a node-with-description using the dedicated NodeWithDescriptionRenderer */ private createNodeWithDescriptionUsingRenderer; /** * Create a collapsible node using the dedicated CollapsibleNodeRenderer */ private createCollapsibleNodeUsingRenderer; /** * Create a rectangle node using the dedicated RectangleNodeRenderer */ private createRectangleUsingRenderer; /** * Create a circle node using the ShapeNodeRenderer */ private createCircleUsingRenderer; /** * Create a shape node using the dedicated ShapeNodeRenderer */ private createShapeUsingRenderer; /** * Create shadow for the node */ private createShadow; /** * Apply gradient to the node */ private applyGradient; /** * Apply basic styling to the node element */ private applyBasicStyling; /** * Create text element for the node */ private createText; } /** * TitleDrawer class for rendering chart titles and descriptions */ declare class TitleDrawer { private svg; private titleConfig; constructor(svg: SVGSVGElement, titleConfig?: Partial); /** * Measure text width using canvas context (similar to BaseNodeRenderer) */ private measureText; /** * Calculate lines needed for text wrapping (similar to BaseNodeRenderer) */ private calculateTextLines; /** * Draw the title and description on the SVG * @param svgWidth - Width of the SVG * @param svgHeight - Height of the SVG * @returns Object containing title and description heights for layout calculations */ drawTitle(svgWidth: number, svgHeight: number, titleSpace?: { top: number; bottom: number; }): { titleHeight: number; descriptionHeight: number; }; /** * Calculate horizontal position based on alignment */ private calculateHorizontalPosition; /** * Create wrapped text elements for title or description */ private createWrappedTextElements; /** * Create a text element with styling */ private createTextElement; /** * Calculate total height needed for titles (useful for adjusting chart layout) */ calculateTitleSpace(svgWidth?: number): { top: number; bottom: number; }; } /** * ActionDrawer handles drawing and managing action buttons on the chart */ declare class ActionDrawer { private svg; private actionConfig; private containerElement; private actionGroup?; constructor(svg: SVGSVGElement, actionConfig: ActionConfig, containerElement: HTMLElement); /** * Draw action buttons on the chart */ drawActions(): void; /** * Draw download button */ private drawDownloadButton; /** * Calculate button position based on configuration */ private calculateButtonPosition; /** * Download the chart as SVG */ private downloadChart; /** * Remove existing action buttons */ private removeActions; /** * Update action configuration and redraw */ updateActions(newActionConfig: ActionConfig): void; /** * Clean up resources */ destroy(): void; } declare class LayoutCalculator { private formattedTree; private options; private nodeDrawer; private titleDrawer; constructor(formattedTree: any[][], options: any, nodeDrawer: NodeDrawer, titleDrawer: TitleDrawer); /** * Calculate the complete layout for the tree */ calculateTreeLayout(): TreeLayout; /** * Calculate layouts for all levels in the tree */ private calculateLevelLayouts; /** * Calculate node data and maximum height for a single level */ private calculateLevelNodeData; /** * Create final layouts with Y positions calculated */ private createFinalLayouts; } declare class NodeFactory { private nodeDrawer; private onTreeUpdate?; constructor(nodeDrawer: NodeDrawer, onTreeUpdate?: (() => void) | undefined); /** * Create all nodes from the calculated layout */ createNodesFromLayout(layout: TreeLayout): Record; /** * Create a single node with the given position and configuration */ private createSingleNode; /** * Create a toggle handler for collapsible nodes */ private createToggleHandler; } /** * BaseRenderer class that all specific renderers extend * Provides common functionality for tree rendering */ declare abstract class BaseRenderer { protected formattedTree: FormattedTree; protected options: Required> & { actionConfig?: TreeChartOptions["actionConfig"]; }; protected nodeMap: NodeMap; protected svg: SVGSVGElement; protected connectionDrawer: ConnectionDrawer; protected nodeDrawer: NodeDrawer; protected titleDrawer: TitleDrawer; protected actionDrawer?: ActionDrawer; protected layoutCalculator: LayoutCalculator; protected nodeFactory: NodeFactory; protected containerElement?: HTMLElement; protected onTreeUpdate?: () => void; protected titleSpace?: { top: number; bottom: number; }; /** * Constructor for BaseRenderer * * @param formattedTree The formatted tree data * @param options Rendering options */ constructor(formattedTree: FormattedTree, options?: TreeChartOptions); /** * Set the callback for tree updates (for collapsible nodes) */ setTreeUpdateCallback(callback: () => void): void; /** * Create nodes for the tree using the layout calculator and node factory */ protected createNodes(): void; /** * Abstract method to draw connections between nodes * Each renderer must implement this */ protected abstract drawConnections(): void; /** * Render the tree and return the SVG element */ render(): SVGSVGElement; /** * Set container element for action positioning */ setContainer(containerElement: HTMLElement): void; /** * Render action buttons */ protected renderActions(): void; /** * Render chart title and description */ protected renderTitle(): void; } /** * DirectRenderer creates a tree with direct straight line connections between nodes */ declare class DirectRenderer extends BaseRenderer { /** * Draw direct straight line connections between parent and child nodes */ protected drawConnections(): void; } /** * RightAngleRenderer creates a tree with right-angle connections between nodes */ declare class RightAngleRenderer extends BaseRenderer { /** * Draw right-angle connections between parent and child nodes */ protected drawConnections(): void; private drawSingleChildConnection; private drawMultipleChildrenConnections; } /** * CurvedRenderer creates a tree with curved connections between nodes */ declare class CurvedRenderer extends BaseRenderer { /** * Draw curved bezier connections between parent and child nodes */ protected drawConnections(): void; } /** * AllDirectionRenderer creates a radial tree layout where nodes spread out in all directions */ declare class AllDirectionRenderer extends BaseRenderer { private centerX; private centerY; /** * Override constructor to calculate dynamic dimensions for all-direction layout */ constructor(formattedTree: any, options?: TreeChartOptions); /** * Calculate dynamic SVG dimensions based on tree structure */ private calculateDynamicDimensions; /** * Override node creation for radial layout */ protected createNodes(): void; /** * Draw edges between nodes for all-direction tree with improved edge connection */ protected drawConnections(): void; } /** * Result of rendering a node, including bounds and center points */ interface NodeRenderResult { element: SVGElement; bounds: { x: number; y: number; width: number; height: number; }; centerX: number; centerY: number; } /** * Base interface that all node renderers must implement */ interface NodeRenderer { /** * Render the node and return the SVG element with bounds information */ render(options: Required): NodeRenderResult; /** * Calculate dynamic width for nodes that auto-size based on content * Optional - only needed for nodes that support dynamic sizing */ calculateDynamicWidth?(node: any, config: any): number; /** * Calculate dynamic height for nodes that auto-size based on content * Optional - only needed for nodes that support dynamic sizing */ calculateDynamicHeight?(node: any, config: any): number; } /** * BaseNodeRenderer provides common functionality for all node renderers * Contains shared methods for styling, effects, and text handling */ declare abstract class BaseNodeRenderer implements NodeRenderer { protected svg: SVGSVGElement; constructor(svg: SVGSVGElement); /** * Abstract method that subclasses must implement to create their specific shape */ abstract render(options: Required): NodeRenderResult; /** * Apply common styling to an SVG element */ protected applyCommonStyling(element: SVGElement, options: Required): void; /** * Create shadow effect if enabled */ protected createShadow(options: Required): SVGElement | null; /** * Create gradient definition if enabled */ protected createGradient(options: Required): string | null; /** * Create basic text element */ protected createBasicText(options: Required): SVGTextElement; /** * Measure text width using canvas context */ measureText(text: string, fontSize: number, fontFamily: string): number; /** * Calculate lines needed for text wrapping */ calculateTextLines(text: string, maxWidth: number, fontSize: number, fontFamily: string): string[]; /** * Create multiple text lines for wrapped text */ protected createWrappedText(lines: string[], x: number, startY: number, fontSize: number, fontFamily: string, fontColor: string, lineHeight?: number): SVGTextElement[]; /** * Create a rectangle element with common styling */ protected createRectangleElement(options: Required): SVGRectElement; /** * Create canvas-based text wrapping for descriptions */ protected createWrappedDescriptionText(description: string, maxTextWidth: number, fontSize: number, fontFamily: string, x: number, startY: number, fillColor: string, lineHeight?: number, textAnchor?: "start" | "middle" | "end"): SVGElement[]; /** * Create canvas-based text wrapping for titles */ protected createWrappedTitleText(title: string, maxTextWidth: number, fontSize: number, fontFamily: string, x: number, startY: number, fillColor: string, lineHeight?: number, textAnchor?: "start" | "middle" | "end"): SVGElement[]; /** * Create canvas-based text wrapping with automatic line calculation */ protected createAutoWrappedText(text: string, maxTextWidth: number, fontSize: number, fontFamily: string, x: number, startY: number, fillColor: string, lineHeight?: number, textAnchor?: "start" | "middle" | "end", fontWeight?: string, dominantBaseline?: string): SVGElement[]; /** * Calculate height needed for wrapped title text */ protected calculateWrappedTitleHeight(title: string, maxTextWidth: number, fontSize: number, fontFamily: string, lineHeight?: number): number; /** * Calculate lines needed for text wrapping using canvas measurement */ protected calculateWrappedTextLines(text: string, maxWidth: number, fontSize: number, fontFamily: string): number; /** * Create an SVG group container */ protected createGroup(): SVGGElement; } /** * RectangleNodeRenderer handles rendering of rectangular nodes */ declare class RectangleNodeRenderer extends BaseNodeRenderer { render(options: Required): NodeRenderResult; } /** * NodeWithDescriptionRenderer handles rendering of nodes with description text * These nodes auto-size based on content and support text wrapping */ declare class NodeWithDescriptionRenderer extends BaseNodeRenderer { render(options: Required): NodeRenderResult; /** * Calculate dynamic width based on content (matches original NodeDrawer logic) */ calculateDynamicWidth(node: any, nodeConfig: any): number; /** * Calculate dynamic height based on content (matches original NodeDrawer logic) */ calculateDynamicHeight(node: any, nodeConfig: any): number; /** * Helper method to calculate width from options (adapter for render method) */ private calculateWidth; /** * Helper method to calculate height from options (adapter for render method) */ private calculateHeight; private createTextElements; } /** * CollapsibleNodeRenderer handles rendering of collapsible nodes with expand/collapse func // Position chevron vertically centered with the title text // Calculate the actual visual center of the text for perfect alignment const textY = options.y + options.padding + options.fontSize; const textVisualCenter = textY - (options.fontSize * 0.1); // Adjust for text visual center const chevronY = textVisualCenter; const chevronSize = 8;ity * These nodes can show/hide description based on expanded state and include chevron icons */ declare class CollapsibleNodeRenderer extends BaseNodeRenderer { render(options: Required): NodeRenderResult; /** * Calculate dynamic width based on content and collapsible state (matches original NodeDrawer logic) */ calculateDynamicWidth(node: any, nodeConfig: any): number; /** * Calculate dynamic height based on content and collapsible state (matches original NodeDrawer logic) */ calculateDynamicHeight(node: any, nodeConfig: any): number; /** * Helper method to calculate width from options (adapter for render method) */ private calculateWidth; /** * Helper method to calculate height from options (adapter for render method) */ private calculateHeight; private createTextElements; private createChevronIcon; private addClickHandler; } /** * ImageNodeRenderer handles rendering of nodes with images and optional text * Follows the same pattern as other node renderers in the codebase */ declare class ImageNodeRenderer extends BaseNodeRenderer { render(options: Required): NodeRenderResult; /** * Calculate dynamic width based on content and text position */ calculateDynamicWidth(node: any, nodeConfig: any): number; /** * Calculate dynamic height based on content and text position */ calculateDynamicHeight(node: any, nodeConfig: any): number; /** * Calculate layout for a node and config (used by dynamic sizing) */ private calculateLayoutForNode; /** * Calculate layout dimensions and positions based on text position */ private calculateLayout; /** * Create background container for the entire node */ private createBackgroundContainer; /** * Create the image element */ private createImageElement; /** * Create text elements (title and subtitle) */ private createTextElements; } /** * ShapeNodeRenderer handles rendering of various geometric shapes * Supports ellipse, diamond, hexagon, triangle, pentagon, octagon, star, and custom shapes */ declare class ShapeNodeRenderer extends BaseNodeRenderer { render(options: Required): NodeRenderResult; /** * Create shadow for shapes (uses appropriate shadow shape) */ private createShapeShadow; /** * Create the appropriate shape based on the node type */ private createShape; /** * Create a circle node */ private createCircle; /** * Create an ellipse node */ private createEllipse; /** * Create a diamond node */ private createDiamond; /** * Create a hexagon node */ private createHexagon; /** * Create a triangle node */ private createTriangle; /** * Create a pentagon node */ private createPentagon; /** * Create an octagon node */ private createOctagon; /** * Create a star node */ private createStar; /** * Create a custom shape node */ private createCustomShape; } export { ActionConfig, ActionPosition, AllDirectionRenderer, ArrowDirection, BaseNodeRenderer, BaseRenderer, CollapsibleNodeRenderer, CollapsibleNodeState, ConnectionOptions, ConnectionType, CurvedRenderer, DEFAULT_OPTIONS, DirectRenderer, EdgeConfig, FormattedTree, FormattedTreeNode, HorizontalAlignment, ImageConfig, ImageNodeRenderer, ImageSubtitleConfig, ImageTextPositionConfig, ImageTitleConfig, LevelLayout, NodeConfig, NodeLayoutPosition, NodeMap, NodeMapEntry, NodeOptions, NodePosition, NodeType, NodeWithDescriptionRenderer, ParentChildMap, Point, RectangleNodeRenderer, RightAngleRenderer, ShapeNodeRenderer, SvgNodeData, TitleConfig, TitlePosition, TreeChart, TreeChartOptions, TreeLayout, TreeNode, TreeType, VerticalAlignment, TreeChart as default, formatTree, svgHelpers };