feat: performance 1

This commit is contained in:
2026-03-12 18:01:27 +01:00
parent 4bd2f1b458
commit 923bf4bff0
18 changed files with 404 additions and 146 deletions

View File

@@ -2,8 +2,7 @@ import type { ComponentProps, ReactNode } from "react";
import { NodeResizer } from "@xyflow/react";
import { useContext } from "react";
import FlowContext from "@/lib/graph/flowContext";
import { useConnectionPathRole } from "@/lib/graph/flowContext";
import { FlowUIContext, useConnectionPathRole } from "@/lib/graph/flowContext";
import { cn } from "@/lib/utils";
/** Default min size for resizable nodes (used by NodeResizer). */
@@ -37,8 +36,8 @@ export function BaseNode({
resizeConstraints,
...props
}: BaseNodeProps) {
const flowContext = useContext(FlowContext);
const isFullscreenInstance = Boolean(nodeId && flowContext?.fullscreenNodeId === nodeId);
const flowUIContext = useContext(FlowUIContext);
const isFullscreenInstance = Boolean(nodeId && flowUIContext?.fullscreenNodeId === nodeId);
const connectionPathRole = useConnectionPathRole(nodeId);
const hasSize =
dimensions &&