feat(packages): add @reactflow/system and @reactflow/utils

This commit is contained in:
moklick
2023-02-16 21:54:09 +01:00
parent a12c893226
commit 3920fca670
90 changed files with 375 additions and 1152 deletions
+17 -17
View File
@@ -1,27 +1,27 @@
import { createStore } from 'zustand';
import { zoomIdentity } from 'd3-zoom';
import { internalsSymbol } from '@reactflow/system';
import { clampPosition, getDimensions } from '@reactflow/utils';
import {
internalsSymbol,
type ReactFlowState,
type Node,
type Edge,
type NodeDimensionUpdate,
type CoordinateExtent,
type NodeDimensionChange,
type EdgeSelectionChange,
type NodeSelectionChange,
type NodePositionChange,
type NodeDragItem,
type UnselectNodesAndEdgesParams,
type NodeChange,
type XYPosition,
} from '@reactflow/system';
import { clampPosition, getDimensions } from '../utils';
import { applyNodeChanges, createSelectionChange, getSelectionChanges } from '../utils/changes';
import { getHandleBounds } from '../components/Nodes/utils';
import { createNodeInternals, fitView, updateAbsoluteNodePositions, updateNodesAndEdgesSelections } from './utils';
import initialState from './initialState';
import type {
ReactFlowState,
Node,
Edge,
NodeDimensionUpdate,
CoordinateExtent,
NodeDimensionChange,
EdgeSelectionChange,
NodeSelectionChange,
NodePositionChange,
NodeDragItem,
UnselectNodesAndEdgesParams,
NodeChange,
XYPosition,
} from '../types';
const createRFStore = () =>
createStore<ReactFlowState>((set, get) => ({