feat: create relationships on canvas modal (#946)

* feat: create relationships on canvas modal

* feat: create relationships on canvas modal

* feat: create relationships on canvas modal

* fix

* fix

* fix

* fix
This commit is contained in:
Guy Ben-Aharon
2025-10-13 18:08:28 +03:00
committed by GitHub
parent 38fedcec0c
commit 34475add32
10 changed files with 949 additions and 86 deletions

View File

@@ -0,0 +1,36 @@
import React from 'react';
import { type NodeProps, type Node, Handle, Position } from '@xyflow/react';
export const TEMP_CURSOR_NODE_ID = '__temp_cursor_node__';
export const TEMP_CURSOR_HANDLE_ID = '__temp-cursor-target__';
export type TempCursorNodeType = Node<
{
// Empty data object - this is just a cursor position marker
},
'temp-cursor'
>;
export const TempCursorNode: React.FC<NodeProps<TempCursorNodeType>> =
React.memo(() => {
// Invisible node that just serves as a connection point
return (
<div
style={{
width: 1,
height: 1,
opacity: 0,
pointerEvents: 'none',
}}
>
<Handle
id={TEMP_CURSOR_HANDLE_ID}
className="!invisible"
position={Position.Right}
type="target"
/>
</div>
);
});
TempCursorNode.displayName = 'TempCursorNode';