fix system library dependency
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { isNodeBase, isEdgeBase } from '@xyflow/system';
|
||||
import { isNodeBase, isEdgeBase, type XYPosition } from '@xyflow/system';
|
||||
|
||||
import type { Edge, Node } from '$lib/types';
|
||||
|
||||
@@ -25,3 +25,10 @@ export const isEdge = <EdgeType extends Edge = Edge>(element: unknown): element
|
||||
export function toPxString(value: number | undefined): string | undefined {
|
||||
return value === undefined ? undefined : `${value}px`;
|
||||
}
|
||||
|
||||
export const arrowKeyDiffs: Record<string, XYPosition> = {
|
||||
ArrowUp: { x: 0, y: -1 },
|
||||
ArrowDown: { x: 0, y: 1 },
|
||||
ArrowLeft: { x: -1, y: 0 },
|
||||
ArrowRight: { x: 1, y: 0 }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user