diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index 0ed70389..00000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "mode": "pre", - "tag": "next", - "initialVersions": { - "react-flow-examples": "0.0.0", - "@react-flow/background": "10.0.0", - "@react-flow/bundle": "10.0.0", - "@react-flow/controls": "10.0.0", - "@react-flow/core": "10.0.0", - "@react-flow/minimap": "10.0.0" - }, - "changesets": [ - "rare-boats-cry" - ] -} diff --git a/.changeset/rare-boats-cry.md b/.changeset/rare-boats-cry.md deleted file mode 100644 index c390a142..00000000 --- a/.changeset/rare-boats-cry.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@react-flow/background': major -'@react-flow/bundle': major -'@react-flow/controls': major -'@react-flow/core': major -'@react-flow/minimap': major ---- - -beta release for v11 diff --git a/examples/nextjs/CHANGELOG.md b/examples/nextjs/CHANGELOG.md index 39bc620e..9b210a75 100644 --- a/examples/nextjs/CHANGELOG.md +++ b/examples/nextjs/CHANGELOG.md @@ -5,4 +5,4 @@ ### Patch Changes - Updated dependencies []: - - @react-flow/bundle@11.0.0-next.0 + - reactflow@11.0.0-next.0 diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index 5f4cac35..871f25a0 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -5,7 +5,7 @@ "license": "MIT", "scripts": { "dev": "next dev", - "copystyles": "cp ../../node_modules/@react-flow/bundle/dist/style.css ./styles/rf-style.css && cp ../../node_modules/@react-flow/bundle/dist/base.css ./styles/rf-base.css", + "copystyles": "cp ../../node_modules/reactflow/dist/style.css ./styles/rf-style.css && cp ../../node_modules/reactflow/dist/base.css ./styles/rf-base.css", "build": "next build", "start": "next start", "lint": "next lint", @@ -13,12 +13,12 @@ }, "dependencies": { "@preconstruct/next": "^4.0.0", - "@react-flow/bundle": "workspace:*", "dagre": "^0.8.5", "localforage": "^1.10.0", "next": "12.2.2", "react": "^18.2.0", - "react-dom": "^18.2.0" + "react-dom": "^18.2.0", + "reactflow": "workspace:*" }, "devDependencies": { "@types/dagre": "^0.7.47", diff --git a/examples/nextjs/pages/Backgrounds/index.tsx b/examples/nextjs/pages/Backgrounds/index.tsx index fa3eaec6..898328ac 100644 --- a/examples/nextjs/pages/Backgrounds/index.tsx +++ b/examples/nextjs/pages/Backgrounds/index.tsx @@ -8,7 +8,7 @@ import { Background, BackgroundProps, BackgroundVariant, -} from '@react-flow/bundle'; +} from 'reactflow'; import styles from './style.module.css'; diff --git a/examples/nextjs/pages/CustomConnectionLine/ConnectionLine.tsx b/examples/nextjs/pages/CustomConnectionLine/ConnectionLine.tsx index 8a552f44..4fe25917 100644 --- a/examples/nextjs/pages/CustomConnectionLine/ConnectionLine.tsx +++ b/examples/nextjs/pages/CustomConnectionLine/ConnectionLine.tsx @@ -1,5 +1,5 @@ import React, { FC } from 'react'; -import { ConnectionLineComponentProps } from '@react-flow/bundle'; +import { ConnectionLineComponentProps } from 'reactflow'; const ConnectionLine: FC = ({ fromX, fromY, toX, toY }) => { return ( diff --git a/examples/nextjs/pages/CustomConnectionLine/index.tsx b/examples/nextjs/pages/CustomConnectionLine/index.tsx index 360aa6d4..88f15e76 100644 --- a/examples/nextjs/pages/CustomConnectionLine/index.tsx +++ b/examples/nextjs/pages/CustomConnectionLine/index.tsx @@ -9,7 +9,7 @@ import { useEdgesState, Background, BackgroundVariant, -} from '@react-flow/bundle'; +} from 'reactflow'; import ConnectionLine from './ConnectionLine'; diff --git a/examples/nextjs/pages/CustomNode/ColorSelectorNode.tsx b/examples/nextjs/pages/CustomNode/ColorSelectorNode.tsx index c59aca93..2387e0e4 100644 --- a/examples/nextjs/pages/CustomNode/ColorSelectorNode.tsx +++ b/examples/nextjs/pages/CustomNode/ColorSelectorNode.tsx @@ -1,5 +1,5 @@ import React, { memo, FC, CSSProperties, useCallback } from 'react'; -import { Handle, Position, NodeProps, Connection, Edge, useOnViewportChange, Viewport } from '@react-flow/bundle'; +import { Handle, Position, NodeProps, Connection, Edge, useOnViewportChange, Viewport } from 'reactflow'; const targetHandleStyle: CSSProperties = { background: '#555' }; const sourceHandleStyleA: CSSProperties = { ...targetHandleStyle, top: 10 }; diff --git a/examples/nextjs/pages/CustomNode/index.tsx b/examples/nextjs/pages/CustomNode/index.tsx index 0daa35b0..07795fb8 100644 --- a/examples/nextjs/pages/CustomNode/index.tsx +++ b/examples/nextjs/pages/CustomNode/index.tsx @@ -11,7 +11,7 @@ import { Connection, useNodesState, useEdgesState, -} from '@react-flow/bundle'; +} from 'reactflow'; import ColorSelectorNode from './ColorSelectorNode'; diff --git a/examples/nextjs/pages/DefaultNodes/index.tsx b/examples/nextjs/pages/DefaultNodes/index.tsx index d51019f2..32cfaf3c 100644 --- a/examples/nextjs/pages/DefaultNodes/index.tsx +++ b/examples/nextjs/pages/DefaultNodes/index.tsx @@ -1,13 +1,5 @@ import React from 'react'; -import { - ReactFlow, - useReactFlow, - Node, - Edge, - ReactFlowProvider, - Background, - BackgroundVariant, -} from '@react-flow/bundle'; +import { ReactFlow, useReactFlow, Node, Edge, ReactFlowProvider, Background, BackgroundVariant } from 'reactflow'; const defaultNodes: Node[] = [ { diff --git a/examples/nextjs/pages/DragHandle/DragHandleNode.tsx b/examples/nextjs/pages/DragHandle/DragHandleNode.tsx index 5343f437..91ae44e8 100644 --- a/examples/nextjs/pages/DragHandle/DragHandleNode.tsx +++ b/examples/nextjs/pages/DragHandle/DragHandleNode.tsx @@ -1,6 +1,6 @@ import React, { memo, FC } from 'react'; -import { Handle, Position, NodeProps, Connection, Edge } from '@react-flow/bundle'; +import { Handle, Position, NodeProps, Connection, Edge } from 'reactflow'; const onConnect = (params: Connection | Edge) => console.log('handle onConnect', params); diff --git a/examples/nextjs/pages/DragNDrop/index.tsx b/examples/nextjs/pages/DragNDrop/index.tsx index dbc7edd0..dfe3ea17 100644 --- a/examples/nextjs/pages/DragNDrop/index.tsx +++ b/examples/nextjs/pages/DragNDrop/index.tsx @@ -11,7 +11,7 @@ import { useEdgesState, Controls, NodeOrigin, -} from '@react-flow/bundle'; +} from 'reactflow'; import Sidebar from './Sidebar'; diff --git a/examples/nextjs/pages/EdgeTypes/index.tsx b/examples/nextjs/pages/EdgeTypes/index.tsx index 6794d09b..238f8202 100644 --- a/examples/nextjs/pages/EdgeTypes/index.tsx +++ b/examples/nextjs/pages/EdgeTypes/index.tsx @@ -14,7 +14,7 @@ import { Edge, useNodesState, useEdgesState, -} from '@react-flow/bundle'; +} from 'reactflow'; import { getElements } from './utils'; diff --git a/examples/nextjs/pages/EdgeTypes/utils.ts b/examples/nextjs/pages/EdgeTypes/utils.ts index f837aa88..4992bd6f 100644 --- a/examples/nextjs/pages/EdgeTypes/utils.ts +++ b/examples/nextjs/pages/EdgeTypes/utils.ts @@ -1,4 +1,4 @@ -import { Edge, Node, Position } from '@react-flow/bundle'; +import { Edge, Node, Position } from 'reactflow'; const nodeWidth = 80; const nodeGapWidth = nodeWidth * 2; diff --git a/examples/nextjs/pages/Edges/CustomEdge.tsx b/examples/nextjs/pages/Edges/CustomEdge.tsx index a51c86af..54b77c66 100644 --- a/examples/nextjs/pages/Edges/CustomEdge.tsx +++ b/examples/nextjs/pages/Edges/CustomEdge.tsx @@ -1,5 +1,5 @@ import React, { FC } from 'react'; -import { EdgeProps, getBezierPath } from '@react-flow/bundle'; +import { EdgeProps, getBezierPath } from 'reactflow'; const CustomEdge: FC = ({ id, diff --git a/examples/nextjs/pages/Edges/CustomEdge2.tsx b/examples/nextjs/pages/Edges/CustomEdge2.tsx index cb446f07..97e6541b 100644 --- a/examples/nextjs/pages/Edges/CustomEdge2.tsx +++ b/examples/nextjs/pages/Edges/CustomEdge2.tsx @@ -1,5 +1,5 @@ import React, { FC } from 'react'; -import { EdgeProps, getBezierPath, EdgeText, getBezierEdgeCenter } from '@react-flow/bundle'; +import { EdgeProps, getBezierPath, EdgeText, getBezierEdgeCenter } from 'reactflow'; const CustomEdge: FC = ({ id, diff --git a/examples/nextjs/pages/Edges/index.tsx b/examples/nextjs/pages/Edges/index.tsx index a359abfa..a672be21 100644 --- a/examples/nextjs/pages/Edges/index.tsx +++ b/examples/nextjs/pages/Edges/index.tsx @@ -12,7 +12,7 @@ import { Node, useEdgesState, useNodesState, -} from '@react-flow/bundle'; +} from 'reactflow'; import CustomEdge from './CustomEdge'; import CustomEdge2 from './CustomEdge2'; diff --git a/examples/nextjs/pages/Empty/index.tsx b/examples/nextjs/pages/Empty/index.tsx index 8e65aa72..ff9ec986 100644 --- a/examples/nextjs/pages/Empty/index.tsx +++ b/examples/nextjs/pages/Empty/index.tsx @@ -12,7 +12,7 @@ import { useNodesState, useEdgesState, ReactFlowInstance, -} from '@react-flow/bundle'; +} from 'reactflow'; const onInit = (reactFlowInstance: ReactFlowInstance) => console.log('flow loaded:', reactFlowInstance); const onNodeClick = (_: MouseEvent, node: Node) => console.log('click', node); diff --git a/examples/nextjs/pages/FloatingEdges/FloatingConnectionLine.tsx b/examples/nextjs/pages/FloatingEdges/FloatingConnectionLine.tsx index 1930bf73..19fb70a7 100644 --- a/examples/nextjs/pages/FloatingEdges/FloatingConnectionLine.tsx +++ b/examples/nextjs/pages/FloatingEdges/FloatingConnectionLine.tsx @@ -1,5 +1,5 @@ import React, { FC } from 'react'; -import { getBezierPath, ConnectionLineComponentProps, Node } from '@react-flow/bundle'; +import { getBezierPath, ConnectionLineComponentProps, Node } from 'reactflow'; import { getEdgeParams } from './utils'; diff --git a/examples/nextjs/pages/FloatingEdges/FloatingEdge.tsx b/examples/nextjs/pages/FloatingEdges/FloatingEdge.tsx index 1187d70c..9f080bd3 100644 --- a/examples/nextjs/pages/FloatingEdges/FloatingEdge.tsx +++ b/examples/nextjs/pages/FloatingEdges/FloatingEdge.tsx @@ -1,5 +1,5 @@ import React, { FC, useMemo, CSSProperties } from 'react'; -import { EdgeProps, useStore, getBezierPath, ReactFlowState } from '@react-flow/bundle'; +import { EdgeProps, useStore, getBezierPath, ReactFlowState } from 'reactflow'; import { getEdgeParams } from './utils'; diff --git a/examples/nextjs/pages/FloatingEdges/index.tsx b/examples/nextjs/pages/FloatingEdges/index.tsx index 11f7ae38..7d1b3b4a 100644 --- a/examples/nextjs/pages/FloatingEdges/index.tsx +++ b/examples/nextjs/pages/FloatingEdges/index.tsx @@ -9,7 +9,7 @@ import { Connection, useNodesState, useEdgesState, -} from '@react-flow/bundle'; +} from 'reactflow'; import styles from './style.module.css'; diff --git a/examples/nextjs/pages/FloatingEdges/utils.ts b/examples/nextjs/pages/FloatingEdges/utils.ts index 9f12d22a..5c9b0068 100644 --- a/examples/nextjs/pages/FloatingEdges/utils.ts +++ b/examples/nextjs/pages/FloatingEdges/utils.ts @@ -1,4 +1,4 @@ -import { Position, XYPosition, Node, Edge } from '@react-flow/bundle'; +import { Position, XYPosition, Node, Edge } from 'reactflow'; // this helper function returns the intersection point // of the line between the center of the intersectionNode and the target node diff --git a/examples/nextjs/pages/Hidden/index.tsx b/examples/nextjs/pages/Hidden/index.tsx index e7c891f2..b4ab716b 100644 --- a/examples/nextjs/pages/Hidden/index.tsx +++ b/examples/nextjs/pages/Hidden/index.tsx @@ -1,16 +1,6 @@ import React, { useState, useEffect, useCallback } from 'react'; -import { - ReactFlow, - addEdge, - Connection, - Edge, - Node, - useNodesState, - useEdgesState, - MiniMap, - Controls, -} from '@react-flow/bundle'; +import { ReactFlow, addEdge, Connection, Edge, Node, useNodesState, useEdgesState, MiniMap, Controls } from 'reactflow'; const initialNodes: Node[] = [ { diff --git a/examples/nextjs/pages/Interaction/index.tsx b/examples/nextjs/pages/Interaction/index.tsx index efff90b6..e68ba86e 100644 --- a/examples/nextjs/pages/Interaction/index.tsx +++ b/examples/nextjs/pages/Interaction/index.tsx @@ -11,7 +11,7 @@ import { useEdgesState, Controls, MiniMap, -} from '@react-flow/bundle'; +} from 'reactflow'; const initialNodes: Node[] = [ { diff --git a/examples/nextjs/pages/Layouting/index.tsx b/examples/nextjs/pages/Layouting/index.tsx index a8fdc747..e3b9bcb4 100644 --- a/examples/nextjs/pages/Layouting/index.tsx +++ b/examples/nextjs/pages/Layouting/index.tsx @@ -11,7 +11,7 @@ import { useEdgesState, MarkerType, EdgeMarker, -} from '@react-flow/bundle'; +} from 'reactflow'; import dagre from 'dagre'; diff --git a/examples/nextjs/pages/Layouting/initial-elements.ts b/examples/nextjs/pages/Layouting/initial-elements.ts index 11d1b09c..8c88519e 100644 --- a/examples/nextjs/pages/Layouting/initial-elements.ts +++ b/examples/nextjs/pages/Layouting/initial-elements.ts @@ -1,4 +1,4 @@ -import { Node, Edge, XYPosition, MarkerType } from '@react-flow/bundle'; +import { Node, Edge, XYPosition, MarkerType } from 'reactflow'; const position: XYPosition = { x: 0, y: 0 }; diff --git a/examples/nextjs/pages/MultiFlows/index.tsx b/examples/nextjs/pages/MultiFlows/index.tsx index 62708846..8cd1e9ed 100644 --- a/examples/nextjs/pages/MultiFlows/index.tsx +++ b/examples/nextjs/pages/MultiFlows/index.tsx @@ -11,7 +11,7 @@ import { useNodesState, useEdgesState, MarkerType, -} from '@react-flow/bundle'; +} from 'reactflow'; import styles from './multiflows.module.css'; diff --git a/examples/nextjs/pages/NestedNodes/index.tsx b/examples/nextjs/pages/NestedNodes/index.tsx index 21e1bb2c..45ea9c10 100644 --- a/examples/nextjs/pages/NestedNodes/index.tsx +++ b/examples/nextjs/pages/NestedNodes/index.tsx @@ -11,7 +11,7 @@ import { Edge, ReactFlowInstance, Connection, -} from '@react-flow/bundle'; +} from 'reactflow'; const onNodeDragStop = (_: MouseEvent, node: Node) => console.log('drag stop', node); const onNodeClick = (_: MouseEvent, node: Node) => console.log('click', node); diff --git a/examples/nextjs/pages/NodeTypeChange/index.tsx b/examples/nextjs/pages/NodeTypeChange/index.tsx index 6a6406fe..eedefb96 100644 --- a/examples/nextjs/pages/NodeTypeChange/index.tsx +++ b/examples/nextjs/pages/NodeTypeChange/index.tsx @@ -1,6 +1,6 @@ import React, { CSSProperties, useCallback } from 'react'; -import { ReactFlow, addEdge, Node, Position, Connection, Edge, useNodesState, useEdgesState } from '@react-flow/bundle'; +import { ReactFlow, addEdge, Node, Position, Connection, Edge, useNodesState, useEdgesState } from 'reactflow'; const initialNodes: Node[] = [ { diff --git a/examples/nextjs/pages/NodeTypesObjectChange/index.tsx b/examples/nextjs/pages/NodeTypesObjectChange/index.tsx index 5c51fd76..94b2993f 100644 --- a/examples/nextjs/pages/NodeTypesObjectChange/index.tsx +++ b/examples/nextjs/pages/NodeTypesObjectChange/index.tsx @@ -11,7 +11,7 @@ import { NodeTypes, useNodesState, useEdgesState, -} from '@react-flow/bundle'; +} from 'reactflow'; const initialNodes: Node[] = [ { diff --git a/examples/nextjs/pages/Overview/index.tsx b/examples/nextjs/pages/Overview/index.tsx index d5336726..29a587a4 100644 --- a/examples/nextjs/pages/Overview/index.tsx +++ b/examples/nextjs/pages/Overview/index.tsx @@ -15,7 +15,7 @@ import { Controls, Background, MiniMap, -} from '@react-flow/bundle'; +} from 'reactflow'; const onNodeDragStart = (_: ReactMouseEvent, node: Node, nodes: Node[]) => console.log('drag start', node, nodes); const onNodeDrag = (_: ReactMouseEvent, node: Node, nodes: Node[]) => console.log('drag', node, nodes); diff --git a/examples/nextjs/pages/Provider/Sidebar.tsx b/examples/nextjs/pages/Provider/Sidebar.tsx index 0eaec64a..c1f5221c 100644 --- a/examples/nextjs/pages/Provider/Sidebar.tsx +++ b/examples/nextjs/pages/Provider/Sidebar.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { useStore, useStoreApi } from '@react-flow/bundle'; +import { useStore, useStoreApi } from 'reactflow'; import styles from './provider.module.css'; diff --git a/examples/nextjs/pages/Provider/index.tsx b/examples/nextjs/pages/Provider/index.tsx index 58f31e00..13528308 100644 --- a/examples/nextjs/pages/Provider/index.tsx +++ b/examples/nextjs/pages/Provider/index.tsx @@ -11,7 +11,7 @@ import { useNodesState, useEdgesState, ReactFlowInstance, -} from '@react-flow/bundle'; +} from 'reactflow'; import Sidebar from './Sidebar'; diff --git a/examples/nextjs/pages/SaveRestore/Controls.tsx b/examples/nextjs/pages/SaveRestore/Controls.tsx index dd419485..61ca1a64 100644 --- a/examples/nextjs/pages/SaveRestore/Controls.tsx +++ b/examples/nextjs/pages/SaveRestore/Controls.tsx @@ -1,5 +1,5 @@ import React, { memo, useCallback, Dispatch, FC } from 'react'; -import { useReactFlow, Edge, Node, ReactFlowJsonObject } from '@react-flow/bundle'; +import { useReactFlow, Edge, Node, ReactFlowJsonObject } from 'reactflow'; import localforage from 'localforage'; import styles from './save.module.css'; diff --git a/examples/nextjs/pages/SaveRestore/index.tsx b/examples/nextjs/pages/SaveRestore/index.tsx index 90b14859..f6f0d6b5 100644 --- a/examples/nextjs/pages/SaveRestore/index.tsx +++ b/examples/nextjs/pages/SaveRestore/index.tsx @@ -1,14 +1,5 @@ import React, { useCallback } from 'react'; -import { - ReactFlow, - ReactFlowProvider, - Node, - addEdge, - Connection, - Edge, - useNodesState, - useEdgesState, -} from '@react-flow/bundle'; +import { ReactFlow, ReactFlowProvider, Node, addEdge, Connection, Edge, useNodesState, useEdgesState } from 'reactflow'; import Controls from './Controls'; const initialNodes: Node[] = [ diff --git a/examples/nextjs/pages/Stress/index.tsx b/examples/nextjs/pages/Stress/index.tsx index 1003477e..0f3232cf 100644 --- a/examples/nextjs/pages/Stress/index.tsx +++ b/examples/nextjs/pages/Stress/index.tsx @@ -13,7 +13,7 @@ import { Controls, Background, MiniMap, -} from '@react-flow/bundle'; +} from 'reactflow'; import { getNodesAndEdges } from './utils'; diff --git a/examples/nextjs/pages/Stress/utils.ts b/examples/nextjs/pages/Stress/utils.ts index db965ffc..2c067d99 100644 --- a/examples/nextjs/pages/Stress/utils.ts +++ b/examples/nextjs/pages/Stress/utils.ts @@ -1,4 +1,4 @@ -import { Node, Edge } from '@react-flow/bundle'; +import { Node, Edge } from 'reactflow'; type ElementsCollection = { nodes: Node[]; diff --git a/examples/nextjs/pages/Subflow/DebugNode.tsx b/examples/nextjs/pages/Subflow/DebugNode.tsx index 91d04b54..7b5f6b5b 100644 --- a/examples/nextjs/pages/Subflow/DebugNode.tsx +++ b/examples/nextjs/pages/Subflow/DebugNode.tsx @@ -1,6 +1,6 @@ import React, { memo, FC, CSSProperties } from 'react'; -import { Handle, NodeProps, Position } from '@react-flow/bundle'; +import { Handle, NodeProps, Position } from 'reactflow'; const infoStyle: CSSProperties = { fontSize: 11 }; const idStyle: CSSProperties = { diff --git a/examples/nextjs/pages/Subflow/index.tsx b/examples/nextjs/pages/Subflow/index.tsx index d19a8ce4..e570ade4 100644 --- a/examples/nextjs/pages/Subflow/index.tsx +++ b/examples/nextjs/pages/Subflow/index.tsx @@ -12,7 +12,7 @@ import { Controls, MiniMap, Background, -} from '@react-flow/bundle'; +} from 'reactflow'; import DebugNode from './DebugNode'; diff --git a/examples/nextjs/pages/Switch/index.tsx b/examples/nextjs/pages/Switch/index.tsx index 7096b3fc..384be206 100644 --- a/examples/nextjs/pages/Switch/index.tsx +++ b/examples/nextjs/pages/Switch/index.tsx @@ -1,5 +1,5 @@ import React, { MouseEvent, useCallback } from 'react'; -import { ReactFlow, addEdge, Node, Connection, Edge, useNodesState, useEdgesState } from '@react-flow/bundle'; +import { ReactFlow, addEdge, Node, Connection, Edge, useNodesState, useEdgesState } from 'reactflow'; const onNodeDragStop = (_: MouseEvent, node: Node) => console.log('drag stop', node); const onNodeClick = (_: MouseEvent, node: Node) => console.log('click', node); diff --git a/examples/nextjs/pages/TouchDevice/index.tsx b/examples/nextjs/pages/TouchDevice/index.tsx index 910a99f8..d77b47ac 100644 --- a/examples/nextjs/pages/TouchDevice/index.tsx +++ b/examples/nextjs/pages/TouchDevice/index.tsx @@ -1,5 +1,5 @@ import React, { useCallback } from 'react'; -import { ReactFlow, Node, Edge, useNodesState, useEdgesState, Position, Connection, addEdge } from '@react-flow/bundle'; +import { ReactFlow, Node, Edge, useNodesState, useEdgesState, Position, Connection, addEdge } from 'reactflow'; import styles from './touch-device.module.css'; diff --git a/examples/nextjs/pages/Undirectional/CustomNode.tsx b/examples/nextjs/pages/Undirectional/CustomNode.tsx index d6deaa14..0ede3317 100644 --- a/examples/nextjs/pages/Undirectional/CustomNode.tsx +++ b/examples/nextjs/pages/Undirectional/CustomNode.tsx @@ -1,6 +1,6 @@ import React, { memo, FC, CSSProperties } from 'react'; -import { Handle, Position, NodeProps } from '@react-flow/bundle'; +import { Handle, Position, NodeProps } from 'reactflow'; const nodeStyles: CSSProperties = { padding: '10px 15px', diff --git a/examples/nextjs/pages/Undirectional/index.tsx b/examples/nextjs/pages/Undirectional/index.tsx index 84842d60..ebcdcf35 100644 --- a/examples/nextjs/pages/Undirectional/index.tsx +++ b/examples/nextjs/pages/Undirectional/index.tsx @@ -14,7 +14,7 @@ import { updateEdge, useNodesState, useEdgesState, -} from '@react-flow/bundle'; +} from 'reactflow'; import CustomNode from './CustomNode'; const initialNodes: Node[] = [ diff --git a/examples/nextjs/pages/UpdatableEdge/index.tsx b/examples/nextjs/pages/UpdatableEdge/index.tsx index 288fd4e5..a0faf359 100644 --- a/examples/nextjs/pages/UpdatableEdge/index.tsx +++ b/examples/nextjs/pages/UpdatableEdge/index.tsx @@ -12,7 +12,7 @@ import { NodeChange, EdgeChange, HandleType, -} from '@react-flow/bundle'; +} from 'reactflow'; import { Controls } from '@react-flow/controls'; diff --git a/examples/nextjs/pages/UpdateNode/index.tsx b/examples/nextjs/pages/UpdateNode/index.tsx index 40170c1f..efb336ff 100644 --- a/examples/nextjs/pages/UpdateNode/index.tsx +++ b/examples/nextjs/pages/UpdateNode/index.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { ReactFlow, Node, Edge, useNodesState, useEdgesState } from '@react-flow/bundle'; +import { ReactFlow, Node, Edge, useNodesState, useEdgesState } from 'reactflow'; import styles from './updatenode.module.css'; diff --git a/examples/nextjs/pages/UseKeyPress/index.tsx b/examples/nextjs/pages/UseKeyPress/index.tsx index b61dad2e..b2e8900d 100644 --- a/examples/nextjs/pages/UseKeyPress/index.tsx +++ b/examples/nextjs/pages/UseKeyPress/index.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { useKeyPress } from '@react-flow/bundle'; +import { useKeyPress } from 'reactflow'; const UseKeyPressComponent = () => { const metaPressed = useKeyPress(['Meta']); diff --git a/examples/nextjs/pages/UseReactFlow/index.tsx b/examples/nextjs/pages/UseReactFlow/index.tsx index 0d1b5f97..f2eb8e2c 100644 --- a/examples/nextjs/pages/UseReactFlow/index.tsx +++ b/examples/nextjs/pages/UseReactFlow/index.tsx @@ -11,7 +11,7 @@ import { Edge, useNodesState, useEdgesState, -} from '@react-flow/bundle'; +} from 'reactflow'; const initialNodes: Node[] = [ { diff --git a/examples/nextjs/pages/UseUpdateNodeInternals/CustomNode.tsx b/examples/nextjs/pages/UseUpdateNodeInternals/CustomNode.tsx index 8e9a91d1..1684656b 100644 --- a/examples/nextjs/pages/UseUpdateNodeInternals/CustomNode.tsx +++ b/examples/nextjs/pages/UseUpdateNodeInternals/CustomNode.tsx @@ -1,5 +1,5 @@ import React, { useState, memo, FC, useMemo, CSSProperties } from 'react'; -import { Handle, Position, NodeProps, useUpdateNodeInternals } from '@react-flow/bundle'; +import { Handle, Position, NodeProps, useUpdateNodeInternals } from 'reactflow'; const nodeStyles: CSSProperties = { padding: 10, border: '1px solid #ddd' }; diff --git a/examples/nextjs/pages/UseUpdateNodeInternals/index.tsx b/examples/nextjs/pages/UseUpdateNodeInternals/index.tsx index ac188a9c..7f8185fa 100644 --- a/examples/nextjs/pages/UseUpdateNodeInternals/index.tsx +++ b/examples/nextjs/pages/UseUpdateNodeInternals/index.tsx @@ -11,7 +11,7 @@ import { Position, useNodesState, useEdgesState, -} from '@react-flow/bundle'; +} from 'reactflow'; import CustomNode from './CustomNode'; diff --git a/examples/nextjs/pages/Validation/index.tsx b/examples/nextjs/pages/Validation/index.tsx index c4ab6f38..a59e3eb5 100644 --- a/examples/nextjs/pages/Validation/index.tsx +++ b/examples/nextjs/pages/Validation/index.tsx @@ -12,7 +12,7 @@ import { useNodesState, useEdgesState, OnConnectStartParams, -} from '@react-flow/bundle'; +} from 'reactflow'; import styles from './validation.module.css'; diff --git a/examples/nextjs/pages/index.tsx b/examples/nextjs/pages/index.tsx index bd8f0248..6027329a 100755 --- a/examples/nextjs/pages/index.tsx +++ b/examples/nextjs/pages/index.tsx @@ -10,7 +10,7 @@ import { Node, Edge, useReactFlow, -} from '@react-flow/bundle'; +} from 'reactflow'; const onNodeDrag = (_: MouseEvent, node: Node) => console.log('drag', node); const onNodeDragStop = (_: MouseEvent, node: Node) => console.log('drag stop', node); diff --git a/package.json b/package.json index 2a98f174..1e319207 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { - "name": "react-flow", + "name": "reactflow-monorepo", + "version": "0.0.0", "description": "A highly customizable React library for building node-based editors and interactive flow charts", "repository": "git@github.com:wbkd/react-flow.git", "license": "MIT", diff --git a/packages/background/CHANGELOG.md b/packages/background/CHANGELOG.md deleted file mode 100644 index 220b7314..00000000 --- a/packages/background/CHANGELOG.md +++ /dev/null @@ -1,12 +0,0 @@ -# @react-flow/background - -## 11.0.0-next.0 - -### Major Changes - -- beta release for v11 - -### Patch Changes - -- Updated dependencies []: - - @react-flow/core@11.0.0-next.0 diff --git a/packages/bundle/CHANGELOG.md b/packages/bundle/CHANGELOG.md deleted file mode 100644 index 98f6dd84..00000000 --- a/packages/bundle/CHANGELOG.md +++ /dev/null @@ -1,15 +0,0 @@ -# @react-flow/bundle - -## 11.0.0-next.0 - -### Major Changes - -- beta release for v11 - -### Patch Changes - -- Updated dependencies []: - - @react-flow/background@11.0.0-next.0 - - @react-flow/controls@11.0.0-next.0 - - @react-flow/core@11.0.0-next.0 - - @react-flow/minimap@11.0.0-next.0 diff --git a/packages/controls/CHANGELOG.md b/packages/controls/CHANGELOG.md deleted file mode 100644 index 3bdcaacb..00000000 --- a/packages/controls/CHANGELOG.md +++ /dev/null @@ -1,12 +0,0 @@ -# @react-flow/controls - -## 11.0.0-next.0 - -### Major Changes - -- beta release for v11 - -### Patch Changes - -- Updated dependencies []: - - @react-flow/core@11.0.0-next.0 diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md deleted file mode 100644 index 8db75c60..00000000 --- a/packages/core/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# @react-flow/core - -## 11.0.0-next.0 - -### Major Changes - -- beta release for v11 diff --git a/packages/minimap/CHANGELOG.md b/packages/minimap/CHANGELOG.md deleted file mode 100644 index c7caa823..00000000 --- a/packages/minimap/CHANGELOG.md +++ /dev/null @@ -1,12 +0,0 @@ -# @react-flow/minimap - -## 11.0.0-next.0 - -### Major Changes - -- beta release for v11 - -### Patch Changes - -- Updated dependencies []: - - @react-flow/core@11.0.0-next.0 diff --git a/packages/bundle/README.md b/packages/reactflow/README.md similarity index 71% rename from packages/bundle/README.md rename to packages/reactflow/README.md index eab39176..b0342eb4 100644 --- a/packages/bundle/README.md +++ b/packages/reactflow/README.md @@ -1,4 +1,4 @@ -# @react-flow/bundle +# reactflow Bundles: @@ -11,6 +11,6 @@ Bundles: ## Installation ```sh -npm install @react-flow/bundle +npm install reactflow ``` diff --git a/packages/bundle/package.json b/packages/reactflow/package.json similarity index 79% rename from packages/bundle/package.json rename to packages/reactflow/package.json index 36e01906..d69b6359 100644 --- a/packages/bundle/package.json +++ b/packages/reactflow/package.json @@ -1,7 +1,7 @@ { - "name": "@react-flow/bundle", + "name": "reactflow", "version": "11.0.0-next.0", - "description": "The bundled React Flow package that comes with all the essentials.", + "description": "A highly customizable React library for building node-based editors and interactive flow charts", "keywords": [ "react", "node-based UI", @@ -13,14 +13,14 @@ "files": [ "dist" ], - "main": "dist/react-flow-bundle.cjs.js", - "module": "dist/react-flow-bundle.esm.js", + "main": "dist/reactflow.cjs.js", + "module": "dist/reactflow.esm.js", "sideEffects": false, "license": "MIT", "repository": { "type": "git", "url": "https://github.com/wbkd/react-flow.git", - "directory": "packages/bundle" + "directory": "packages/reactflow" }, "scripts": { "build": "postcss src/*.css --config ../../postcss.config.json --dir dist" diff --git a/packages/bundle/src/base.css b/packages/reactflow/src/base.css similarity index 100% rename from packages/bundle/src/base.css rename to packages/reactflow/src/base.css diff --git a/packages/bundle/src/index.ts b/packages/reactflow/src/index.ts similarity index 100% rename from packages/bundle/src/index.ts rename to packages/reactflow/src/index.ts diff --git a/packages/bundle/src/style.css b/packages/reactflow/src/style.css similarity index 100% rename from packages/bundle/src/style.css rename to packages/reactflow/src/style.css diff --git a/yarn.lock b/yarn.lock index 25855695..ede246df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,7 +15,7 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.18.6, @babel/code-frame@npm:^7.5.5": +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.18.6, @babel/code-frame@npm:^7.5.5": version: 7.18.6 resolution: "@babel/code-frame@npm:7.18.6" dependencies: @@ -1386,7 +1386,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.10.4, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.14.6, @babel/runtime@npm:^7.18.9, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.7, @babel/runtime@npm:^7.8.4": +"@babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.10.4, @babel/runtime@npm:^7.18.9, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.7, @babel/runtime@npm:^7.8.4": version: 7.18.9 resolution: "@babel/runtime@npm:7.18.9" dependencies: @@ -2314,27 +2314,6 @@ __metadata: languageName: unknown linkType: soft -"@react-flow/bundle@workspace:*, @react-flow/bundle@workspace:packages/bundle": - version: 0.0.0-use.local - resolution: "@react-flow/bundle@workspace:packages/bundle" - dependencies: - "@babel/runtime": ^7.18.9 - "@react-flow/background": "workspace:*" - "@react-flow/controls": "workspace:*" - "@react-flow/core": "workspace:*" - "@react-flow/minimap": "workspace:*" - autoprefixer: ^10.4.8 - postcss: ^8.4.14 - postcss-cli: ^10.0.0 - postcss-combine-duplicated-selectors: ^10.0.3 - postcss-import: ^14.1.0 - postcss-nested: ^5.0.6 - peerDependencies: - react: ">=18" - react-dom: ">=18" - languageName: unknown - linkType: soft - "@react-flow/controls@workspace:*, @react-flow/controls@workspace:packages/controls": version: 0.0.0-use.local resolution: "@react-flow/controls@workspace:packages/controls" @@ -2517,34 +2496,6 @@ __metadata: languageName: node linkType: hard -"@testing-library/cypress@npm:^8.0.3": - version: 8.0.3 - resolution: "@testing-library/cypress@npm:8.0.3" - dependencies: - "@babel/runtime": ^7.14.6 - "@testing-library/dom": ^8.1.0 - peerDependencies: - cypress: ^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 - checksum: 319f6c7297f85e5673882a71009b5d5b576006f986d87a6ca6f2f8c679d96d9779f3ddbc01654b5a943407fa91192814f250835ce01f153e33ef24818cf1bf20 - languageName: node - linkType: hard - -"@testing-library/dom@npm:^8.1.0": - version: 8.17.1 - resolution: "@testing-library/dom@npm:8.17.1" - dependencies: - "@babel/code-frame": ^7.10.4 - "@babel/runtime": ^7.12.5 - "@types/aria-query": ^4.2.0 - aria-query: ^5.0.0 - chalk: ^4.1.0 - dom-accessibility-api: ^0.5.9 - lz-string: ^1.4.4 - pretty-format: ^27.0.2 - checksum: e4df091fcf84c9eac4a6ee4c76674c1d562bf98732f0ac8820972d7718ab10397b672b9f082aace3cacd1f610fc77de6e1b6094e67afe1df0443bf22eb9deab2 - languageName: node - linkType: hard - "@tootallnate/once@npm:2": version: 2.0.0 resolution: "@tootallnate/once@npm:2.0.0" @@ -2552,13 +2503,6 @@ __metadata: languageName: node linkType: hard -"@types/aria-query@npm:^4.2.0": - version: 4.2.2 - resolution: "@types/aria-query@npm:4.2.2" - checksum: 6f2ce11d91e2d665f3873258db19da752d91d85d3679eb5efcdf9c711d14492287e1e4eb52613b28e60375841a9e428594e745b68436c963d8bad4bf72188df3 - languageName: node - linkType: hard - "@types/d3-array@npm:*": version: 3.0.3 resolution: "@types/d3-array@npm:3.0.3" @@ -3478,13 +3422,6 @@ __metadata: languageName: node linkType: hard -"ansi-styles@npm:^5.0.0": - version: 5.2.0 - resolution: "ansi-styles@npm:5.2.0" - checksum: d7f4e97ce0623aea6bc0d90dcd28881ee04cba06c570b97fd3391bd7a268eedfd9d5e2dd4fdcbdd82b8105df5faf6f24aaedc08eaf3da898e702db5948f63469 - languageName: node - linkType: hard - "anymatch@npm:~3.1.2": version: 3.1.2 resolution: "anymatch@npm:3.1.2" @@ -3545,13 +3482,6 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:^5.0.0": - version: 5.0.0 - resolution: "aria-query@npm:5.0.0" - checksum: c41f98866c5a304561ee8cae55856711cddad6f3f85d8cb43cc5f79667078d9b8979ce32d244c1ff364e6463a4d0b6865804a33ccc717fed701b281cf7dc6296 - languageName: node - linkType: hard - "array-includes@npm:^3.1.4, array-includes@npm:^3.1.5": version: 3.1.5 resolution: "array-includes@npm:3.1.5" @@ -4735,13 +4665,6 @@ __metadata: languageName: node linkType: hard -"dom-accessibility-api@npm:^0.5.9": - version: 0.5.14 - resolution: "dom-accessibility-api@npm:0.5.14" - checksum: 782c813f75a09ba6735ef03b5e1624406a3829444ae49d5bdedd272a49d437ae3354f53e02ffc8c9fd9165880250f41546538f27461f839dd4ea1234e77e8d5e - languageName: node - linkType: hard - "dotenv@npm:^8.1.0": version: 8.6.0 resolution: "dotenv@npm:8.6.0" @@ -6947,15 +6870,6 @@ __metadata: languageName: node linkType: hard -"lz-string@npm:^1.4.4": - version: 1.4.4 - resolution: "lz-string@npm:1.4.4" - bin: - lz-string: bin/bin.js - checksum: 54e31238a61a84d8f664d9860a9fba7310c5b97a52c444f80543069bc084815eff40b8d4474ae1d93992fdf6c252dca37cf27f6adbeb4dbc3df2f3ac773d0e61 - languageName: node - linkType: hard - "magic-string@npm:^0.25.7": version: 0.25.9 resolution: "magic-string@npm:0.25.9" @@ -8395,17 +8309,6 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^27.0.2": - version: 27.5.1 - resolution: "pretty-format@npm:27.5.1" - dependencies: - ansi-regex: ^5.0.1 - ansi-styles: ^5.0.0 - react-is: ^17.0.1 - checksum: cf610cffcb793885d16f184a62162f2dd0df31642d9a18edf4ca298e909a8fe80bdbf556d5c9573992c102ce8bf948691da91bf9739bee0ffb6e79c8a8a6e088 - languageName: node - linkType: hard - "pretty-hrtime@npm:^1.0.3": version: 1.0.3 resolution: "pretty-hrtime@npm:1.0.3" @@ -8544,8 +8447,6 @@ __metadata: resolution: "react-flow-examples@workspace:examples/nextjs" dependencies: "@preconstruct/next": ^4.0.0 - "@react-flow/bundle": "workspace:*" - "@testing-library/cypress": ^8.0.3 "@types/dagre": ^0.7.47 cypress: ^10.6.0 dagre: ^0.8.5 @@ -8561,13 +8462,30 @@ __metadata: postcss-preset-env: ^7.7.2 react: ^18.2.0 react-dom: ^18.2.0 + reactflow: "workspace:*" webpack: ^5.74.0 languageName: unknown linkType: soft -"react-flow@workspace:.": +"react-is@npm:^16.13.1": + version: 16.13.1 + resolution: "react-is@npm:16.13.1" + checksum: f7a19ac3496de32ca9ae12aa030f00f14a3d45374f1ceca0af707c831b2a6098ef0d6bdae51bd437b0a306d7f01d4677fcc8de7c0d331eb47ad0f46130e53c5f + languageName: node + linkType: hard + +"react@npm:^18.2.0": + version: 18.2.0 + resolution: "react@npm:18.2.0" + dependencies: + loose-envify: ^1.1.0 + checksum: 88e38092da8839b830cda6feef2e8505dec8ace60579e46aa5490fc3dc9bba0bd50336507dc166f43e3afc1c42939c09fe33b25fae889d6f402721dcd78fca1b + languageName: node + linkType: hard + +"reactflow-monorepo@workspace:.": version: 0.0.0-use.local - resolution: "react-flow@workspace:." + resolution: "reactflow-monorepo@workspace:." dependencies: "@babel/core": ^7.18.10 "@babel/plugin-transform-runtime": ^7.18.10 @@ -8597,28 +8515,26 @@ __metadata: languageName: unknown linkType: soft -"react-is@npm:^16.13.1": - version: 16.13.1 - resolution: "react-is@npm:16.13.1" - checksum: f7a19ac3496de32ca9ae12aa030f00f14a3d45374f1ceca0af707c831b2a6098ef0d6bdae51bd437b0a306d7f01d4677fcc8de7c0d331eb47ad0f46130e53c5f - languageName: node - linkType: hard - -"react-is@npm:^17.0.1": - version: 17.0.2 - resolution: "react-is@npm:17.0.2" - checksum: 9d6d111d8990dc98bc5402c1266a808b0459b5d54830bbea24c12d908b536df7883f268a7868cfaedde3dd9d4e0d574db456f84d2e6df9c4526f99bb4b5344d8 - languageName: node - linkType: hard - -"react@npm:^18.2.0": - version: 18.2.0 - resolution: "react@npm:18.2.0" +"reactflow@workspace:*, reactflow@workspace:packages/reactflow": + version: 0.0.0-use.local + resolution: "reactflow@workspace:packages/reactflow" dependencies: - loose-envify: ^1.1.0 - checksum: 88e38092da8839b830cda6feef2e8505dec8ace60579e46aa5490fc3dc9bba0bd50336507dc166f43e3afc1c42939c09fe33b25fae889d6f402721dcd78fca1b - languageName: node - linkType: hard + "@babel/runtime": ^7.18.9 + "@react-flow/background": "workspace:*" + "@react-flow/controls": "workspace:*" + "@react-flow/core": "workspace:*" + "@react-flow/minimap": "workspace:*" + autoprefixer: ^10.4.8 + postcss: ^8.4.14 + postcss-cli: ^10.0.0 + postcss-combine-duplicated-selectors: ^10.0.3 + postcss-import: ^14.1.0 + postcss-nested: ^5.0.6 + peerDependencies: + react: ">=18" + react-dom: ">=18" + languageName: unknown + linkType: soft "read-cache@npm:^1.0.0": version: 1.0.0