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:
24
apps/web/src/components/mindmap/nodes/TaskNode.tsx
Normal file
24
apps/web/src/components/mindmap/nodes/TaskNode.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
'use client';
|
||||
|
||||
import { NodeProps } from '@xyflow/react';
|
||||
import { BaseNode, BaseNodeData } from './BaseNode';
|
||||
|
||||
export function TaskNode(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="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"
|
||||
/>
|
||||
</svg>
|
||||
}
|
||||
color="#10b981"
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user