aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
59 lines • 1.94 kB
TypeScript
import React from "react";
export interface MindMapNode {
id: string;
label: string;
children?: MindMapNode[];
color?: string;
position?: {
x: number;
y: number;
};
size?: "sm" | "md" | "lg";
shape?: "circle" | "rectangle" | "diamond";
icon?: React.ReactNode;
data?: any;
}
export interface MindMapConnection {
from: string;
to: string;
label?: string;
type?: "solid" | "dashed" | "dotted";
color?: string;
}
export interface GlassMindMapProps {
/** Root node of the mind map */
data: MindMapNode;
/** Custom connections between nodes */
connections?: MindMapConnection[];
/** Whether nodes are editable */
editable?: boolean;
/** Whether to show mini-map */
showMinimap?: boolean;
/** Whether to enable zoom and pan */
zoomable?: boolean;
/** Layout direction */
direction?: "horizontal" | "vertical" | "radial";
/** Node spacing */
nodeSpacing?: number;
/** Custom className */
className?: string;
/** Node click handler */
onNodeClick?: (node: MindMapNode) => void;
/** Node double-click handler */
onNodeDoubleClick?: (node: MindMapNode) => void;
/** Node change handler (for editing) */
onNodeChange?: (nodeId: string, changes: Partial<MindMapNode>) => void;
/** Node add handler */
onNodeAdd?: (parentId: string, newNode: MindMapNode) => void;
/** Node delete handler */
onNodeDelete?: (nodeId: string) => void;
}
export declare const GlassMindMap: React.FC<GlassMindMapProps>;
export declare const useMindMap: (initialData: MindMapNode) => {
data: MindMapNode;
addNode: (parentId: string, newNode: MindMapNode) => void;
updateNode: (nodeId: string, changes: Partial<MindMapNode>) => void;
deleteNode: (nodeId: string) => void;
setData: React.Dispatch<React.SetStateAction<MindMapNode>>;
};
//# sourceMappingURL=GlassMindMap.d.ts.map