feat: add mindmap components from jarvis frontend
- Copied mindmap visualization components (ReactFlow-based interactive graph) - Added MindmapViewer, ReactFlowEditor, MermaidViewer - Included all node types: Concept, Task, Idea, Project - Added controls: NodeCreateModal, ExportButton - Created mindmap route at /mindmap - Added useGraphData hook for knowledge graph API - Copied auth-client and api utilities (dependencies) Note: Requires better-auth packages to be installed for full compilation
This commit is contained in:
25
apps/web/src/components/mindmap/nodes/IdeaNode.tsx
Normal file
25
apps/web/src/components/mindmap/nodes/IdeaNode.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
'use client';
|
||||
|
||||
import { NodeProps } from '@xyflow/react';
|
||||
import { BaseNode, BaseNodeData } from './BaseNode';
|
||||
|
||||
export function IdeaNode(props: NodeProps) {
|
||||
return (
|
||||
<BaseNode
|
||||
{...props}
|
||||
data={props.data as BaseNodeData}
|
||||
icon={
|
||||
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
strokeWidth={2}
|
||||
d="M13 10V3L4 14h7v7l9-11h-7z"
|
||||
/>
|
||||
</svg>
|
||||
}
|
||||
color="#f59e0b"
|
||||
borderStyle="dashed"
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user