Skip to content

Commit f135aac

Browse files
committed
feat(node-graph): rebuild editor with native react flow canvas
1 parent 20f67e8 commit f135aac

31 files changed

+1924
-6350
lines changed

apps/web/src/editor/features/development/NodeGraphEditor.controller.ts

Lines changed: 0 additions & 1625 deletions
This file was deleted.

apps/web/src/editor/features/development/NodeGraphEditor.tsx

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,13 @@
1-
import { useNodeGraphEditorController } from './NodeGraphEditor.controller';
2-
import { NodeGraphEditorCanvas } from './NodeGraphEditorCanvas';
3-
import { NodeGraphEditorContextMenu } from './NodeGraphEditorContextMenu';
4-
import { NodeGraphEditorCursor } from './NodeGraphEditorCursor';
5-
import { NodeGraphEditorDebugOverlay } from './NodeGraphEditorDebugOverlay';
6-
import { NodeGraphEditorFloatingIslands } from './NodeGraphEditorFloatingIslands';
7-
import { NodeGraphEditorGraphModal } from './NodeGraphEditorGraphModal';
1+
import '@xyflow/react/dist/style.css';
2+
import './reactflow/nodeGraphEditor.css';
3+
import { ReactFlowProvider } from '@xyflow/react';
4+
import { NodeGraphEditorContent } from './reactflow/NodeGraphEditorContent';
85

96
function NodeGraphEditor() {
10-
const controller = useNodeGraphEditorController();
11-
127
return (
13-
<div
14-
className="relative h-full min-h-full w-full cursor-none overflow-hidden"
15-
data-testid="nodegraph-editor-root"
16-
onPointerMove={controller.root.onPointerMove}
17-
onPointerLeave={controller.root.onPointerLeave}
18-
>
19-
<NodeGraphEditorCanvas canvas={controller.canvas} />
20-
<NodeGraphEditorCursor cursorPosition={controller.root.cursorPosition} />
21-
<NodeGraphEditorDebugOverlay debug={controller.debug} />
22-
23-
<div className="pointer-events-none absolute inset-0 z-10">
24-
<NodeGraphEditorFloatingIslands
25-
manager={controller.manager}
26-
viewport={controller.viewport}
27-
/>
28-
</div>
29-
30-
<NodeGraphEditorContextMenu contextMenu={controller.contextMenu} />
31-
<NodeGraphEditorGraphModal modal={controller.modal} />
32-
</div>
8+
<ReactFlowProvider>
9+
<NodeGraphEditorContent />
10+
</ReactFlowProvider>
3311
);
3412
}
3513

apps/web/src/editor/features/development/NodeGraphEditorCanvas.tsx

Lines changed: 0 additions & 25 deletions
This file was deleted.

apps/web/src/editor/features/development/NodeGraphEditorContextMenu.tsx

Lines changed: 0 additions & 183 deletions
This file was deleted.

apps/web/src/editor/features/development/NodeGraphEditorCursor.tsx

Lines changed: 0 additions & 25 deletions
This file was deleted.

apps/web/src/editor/features/development/NodeGraphEditorDebugOverlay.tsx

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)