refactor(packages): change package structure
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import ReactFlow, { Edge, useEdges } from 'reactflow';
|
||||
import ReactFlow, { Edge, useEdges } from '@xyflow/react';
|
||||
|
||||
import { nodes as initialNodes, edges as initialEdges } from '../../fixtures/simpleflow';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useEffect } from 'react';
|
||||
import ReactFlow, { Node, useNodes } from 'reactflow';
|
||||
import ReactFlow, { Node, useNodes } from '@xyflow/react';
|
||||
|
||||
import { nodes } from '../../fixtures/simpleflow';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ReactFlow, { useNodesInitialized } from 'reactflow';
|
||||
import ReactFlow, { useNodesInitialized } from '@xyflow/react';
|
||||
|
||||
import { nodes } from '../../fixtures/simpleflow';
|
||||
import ControlledFlow from '../../support/ControlledFlow';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ReactFlow, { useOnViewportChange, Viewport } from 'reactflow';
|
||||
import ReactFlow, { useOnViewportChange, Viewport } from '@xyflow/react';
|
||||
|
||||
describe('useOnViewportChange.cy.tsx', () => {
|
||||
it('listen to viewport drag', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ReactFlow, { useViewport, Viewport } from 'reactflow';
|
||||
import ReactFlow, { useViewport, Viewport } from '@xyflow/react';
|
||||
|
||||
describe('useViewport.cy.tsx', () => {
|
||||
it('handles drag', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ReactFlow, { EdgeProps } from 'reactflow';
|
||||
import ReactFlow, { EdgeProps } from '@xyflow/react';
|
||||
|
||||
import ControlledFlow from '../../support/ControlledFlow';
|
||||
import * as simpleflow from '../../fixtures/simpleflow';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ReactFlow, { BaseEdge, EdgeLabelRenderer, EdgeProps, getSmoothStepPath, ReactFlowProvider } from 'reactflow';
|
||||
import ReactFlow, { BaseEdge, EdgeLabelRenderer, EdgeProps, getSmoothStepPath, ReactFlowProvider } from '@xyflow/react';
|
||||
import * as simpleflow from '../../fixtures/simpleflow';
|
||||
|
||||
function CustomEdge(props: EdgeProps) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ReactFlow from 'reactflow';
|
||||
import ReactFlow from '@xyflow/react';
|
||||
|
||||
import { nodes, edges } from '../../fixtures/simpleflow';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ReactFlow, { ReactFlowProps, Viewport, useViewport, SnapGrid, CoordinateExtent, Node } from 'reactflow';
|
||||
import ReactFlow, { ReactFlowProps, Viewport, useViewport, SnapGrid, CoordinateExtent, Node } from '@xyflow/react';
|
||||
|
||||
import ControlledFlow from '../../support/ControlledFlow';
|
||||
import * as simpleflow from '../../fixtures/simpleflow';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Node, Edge, isNode, isEdge, getOutgoers, getIncomers, addEdge } from 'reactflow';
|
||||
import { Node, Edge, isNode, isEdge, getOutgoers, getIncomers, addEdge } from '@xyflow/react';
|
||||
|
||||
const nodes: Node[] = [
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Node, Edge } from 'reactflow';
|
||||
import { Node, Edge } from '@xyflow/react';
|
||||
|
||||
export const nodes: Node[] = [
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
Connection,
|
||||
addEdge,
|
||||
ReactFlowProps,
|
||||
} from 'reactflow';
|
||||
} from '@xyflow/react';
|
||||
|
||||
function ControlledFlow({
|
||||
addOnNodeChangeHandler = true,
|
||||
|
||||
@@ -6,9 +6,9 @@ import './commands';
|
||||
import 'cypress-real-events/support';
|
||||
|
||||
import { mount } from 'cypress/react18';
|
||||
import { XYPosition } from 'reactflow';
|
||||
import { XYPosition } from '@xyflow/react';
|
||||
|
||||
import 'reactflow/dist/style.css';
|
||||
import '@xyflow/react/dist/style.css';
|
||||
|
||||
declare global {
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
|
||||
Reference in New Issue
Block a user