chore(packages): adjust names
This commit is contained in:
@@ -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"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
@@ -5,4 +5,4 @@
|
|||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
- Updated dependencies []:
|
- Updated dependencies []:
|
||||||
- @react-flow/bundle@11.0.0-next.0
|
- reactflow@11.0.0-next.0
|
||||||
|
|||||||
@@ -5,19 +5,19 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"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",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint"
|
"lint": "next lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@preconstruct/next": "^4.0.0",
|
"@preconstruct/next": "^4.0.0",
|
||||||
"@react-flow/bundle": "workspace:*",
|
|
||||||
"dagre": "^0.8.5",
|
"dagre": "^0.8.5",
|
||||||
"localforage": "^1.10.0",
|
"localforage": "^1.10.0",
|
||||||
"next": "12.2.2",
|
"next": "12.2.2",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0"
|
"react-dom": "^18.2.0",
|
||||||
|
"reactflow": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/dagre": "^0.7.47",
|
"@types/dagre": "^0.7.47",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
Background,
|
Background,
|
||||||
BackgroundProps,
|
BackgroundProps,
|
||||||
BackgroundVariant,
|
BackgroundVariant,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import styles from './style.module.css';
|
import styles from './style.module.css';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { FC } from 'react';
|
import React, { FC } from 'react';
|
||||||
import { ConnectionLineComponentProps } from '@react-flow/bundle';
|
import { ConnectionLineComponentProps } from 'reactflow';
|
||||||
|
|
||||||
const ConnectionLine: FC<ConnectionLineComponentProps> = ({ fromX, fromY, toX, toY }) => {
|
const ConnectionLine: FC<ConnectionLineComponentProps> = ({ fromX, fromY, toX, toY }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
useEdgesState,
|
useEdgesState,
|
||||||
Background,
|
Background,
|
||||||
BackgroundVariant,
|
BackgroundVariant,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import ConnectionLine from './ConnectionLine';
|
import ConnectionLine from './ConnectionLine';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { memo, FC, CSSProperties, useCallback } from 'react';
|
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 targetHandleStyle: CSSProperties = { background: '#555' };
|
||||||
const sourceHandleStyleA: CSSProperties = { ...targetHandleStyle, top: 10 };
|
const sourceHandleStyleA: CSSProperties = { ...targetHandleStyle, top: 10 };
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
Connection,
|
Connection,
|
||||||
useNodesState,
|
useNodesState,
|
||||||
useEdgesState,
|
useEdgesState,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import ColorSelectorNode from './ColorSelectorNode';
|
import ColorSelectorNode from './ColorSelectorNode';
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {
|
import { ReactFlow, useReactFlow, Node, Edge, ReactFlowProvider, Background, BackgroundVariant } from 'reactflow';
|
||||||
ReactFlow,
|
|
||||||
useReactFlow,
|
|
||||||
Node,
|
|
||||||
Edge,
|
|
||||||
ReactFlowProvider,
|
|
||||||
Background,
|
|
||||||
BackgroundVariant,
|
|
||||||
} from '@react-flow/bundle';
|
|
||||||
|
|
||||||
const defaultNodes: Node[] = [
|
const defaultNodes: Node[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { memo, FC } from 'react';
|
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);
|
const onConnect = (params: Connection | Edge) => console.log('handle onConnect', params);
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
useEdgesState,
|
useEdgesState,
|
||||||
Controls,
|
Controls,
|
||||||
NodeOrigin,
|
NodeOrigin,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import Sidebar from './Sidebar';
|
import Sidebar from './Sidebar';
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
Edge,
|
Edge,
|
||||||
useNodesState,
|
useNodesState,
|
||||||
useEdgesState,
|
useEdgesState,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import { getElements } from './utils';
|
import { getElements } from './utils';
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Edge, Node, Position } from '@react-flow/bundle';
|
import { Edge, Node, Position } from 'reactflow';
|
||||||
|
|
||||||
const nodeWidth = 80;
|
const nodeWidth = 80;
|
||||||
const nodeGapWidth = nodeWidth * 2;
|
const nodeGapWidth = nodeWidth * 2;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { FC } from 'react';
|
import React, { FC } from 'react';
|
||||||
import { EdgeProps, getBezierPath } from '@react-flow/bundle';
|
import { EdgeProps, getBezierPath } from 'reactflow';
|
||||||
|
|
||||||
const CustomEdge: FC<EdgeProps> = ({
|
const CustomEdge: FC<EdgeProps> = ({
|
||||||
id,
|
id,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { FC } from 'react';
|
import React, { FC } from 'react';
|
||||||
import { EdgeProps, getBezierPath, EdgeText, getBezierEdgeCenter } from '@react-flow/bundle';
|
import { EdgeProps, getBezierPath, EdgeText, getBezierEdgeCenter } from 'reactflow';
|
||||||
|
|
||||||
const CustomEdge: FC<EdgeProps> = ({
|
const CustomEdge: FC<EdgeProps> = ({
|
||||||
id,
|
id,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
Node,
|
Node,
|
||||||
useEdgesState,
|
useEdgesState,
|
||||||
useNodesState,
|
useNodesState,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import CustomEdge from './CustomEdge';
|
import CustomEdge from './CustomEdge';
|
||||||
import CustomEdge2 from './CustomEdge2';
|
import CustomEdge2 from './CustomEdge2';
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
useNodesState,
|
useNodesState,
|
||||||
useEdgesState,
|
useEdgesState,
|
||||||
ReactFlowInstance,
|
ReactFlowInstance,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
const onInit = (reactFlowInstance: ReactFlowInstance) => console.log('flow loaded:', reactFlowInstance);
|
const onInit = (reactFlowInstance: ReactFlowInstance) => console.log('flow loaded:', reactFlowInstance);
|
||||||
const onNodeClick = (_: MouseEvent, node: Node) => console.log('click', node);
|
const onNodeClick = (_: MouseEvent, node: Node) => console.log('click', node);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { FC } from 'react';
|
import React, { FC } from 'react';
|
||||||
import { getBezierPath, ConnectionLineComponentProps, Node } from '@react-flow/bundle';
|
import { getBezierPath, ConnectionLineComponentProps, Node } from 'reactflow';
|
||||||
|
|
||||||
import { getEdgeParams } from './utils';
|
import { getEdgeParams } from './utils';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { FC, useMemo, CSSProperties } from 'react';
|
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';
|
import { getEdgeParams } from './utils';
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
Connection,
|
Connection,
|
||||||
useNodesState,
|
useNodesState,
|
||||||
useEdgesState,
|
useEdgesState,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import styles from './style.module.css';
|
import styles from './style.module.css';
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
// this helper function returns the intersection point
|
||||||
// of the line between the center of the intersectionNode and the target node
|
// of the line between the center of the intersectionNode and the target node
|
||||||
|
|||||||
@@ -1,16 +1,6 @@
|
|||||||
import React, { useState, useEffect, useCallback } from 'react';
|
import React, { useState, useEffect, useCallback } from 'react';
|
||||||
|
|
||||||
import {
|
import { ReactFlow, addEdge, Connection, Edge, Node, useNodesState, useEdgesState, MiniMap, Controls } from 'reactflow';
|
||||||
ReactFlow,
|
|
||||||
addEdge,
|
|
||||||
Connection,
|
|
||||||
Edge,
|
|
||||||
Node,
|
|
||||||
useNodesState,
|
|
||||||
useEdgesState,
|
|
||||||
MiniMap,
|
|
||||||
Controls,
|
|
||||||
} from '@react-flow/bundle';
|
|
||||||
|
|
||||||
const initialNodes: Node[] = [
|
const initialNodes: Node[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
useEdgesState,
|
useEdgesState,
|
||||||
Controls,
|
Controls,
|
||||||
MiniMap,
|
MiniMap,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
const initialNodes: Node[] = [
|
const initialNodes: Node[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
useEdgesState,
|
useEdgesState,
|
||||||
MarkerType,
|
MarkerType,
|
||||||
EdgeMarker,
|
EdgeMarker,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import dagre from 'dagre';
|
import dagre from 'dagre';
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
const position: XYPosition = { x: 0, y: 0 };
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
useNodesState,
|
useNodesState,
|
||||||
useEdgesState,
|
useEdgesState,
|
||||||
MarkerType,
|
MarkerType,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import styles from './multiflows.module.css';
|
import styles from './multiflows.module.css';
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
Edge,
|
Edge,
|
||||||
ReactFlowInstance,
|
ReactFlowInstance,
|
||||||
Connection,
|
Connection,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
const onNodeDragStop = (_: MouseEvent, node: Node) => console.log('drag stop', node);
|
const onNodeDragStop = (_: MouseEvent, node: Node) => console.log('drag stop', node);
|
||||||
const onNodeClick = (_: MouseEvent, node: Node) => console.log('click', node);
|
const onNodeClick = (_: MouseEvent, node: Node) => console.log('click', node);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { CSSProperties, useCallback } from 'react';
|
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[] = [
|
const initialNodes: Node[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
NodeTypes,
|
NodeTypes,
|
||||||
useNodesState,
|
useNodesState,
|
||||||
useEdgesState,
|
useEdgesState,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
const initialNodes: Node[] = [
|
const initialNodes: Node[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
Controls,
|
Controls,
|
||||||
Background,
|
Background,
|
||||||
MiniMap,
|
MiniMap,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
const onNodeDragStart = (_: ReactMouseEvent, node: Node, nodes: Node[]) => console.log('drag start', node, nodes);
|
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);
|
const onNodeDrag = (_: ReactMouseEvent, node: Node, nodes: Node[]) => console.log('drag', node, nodes);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useStore, useStoreApi } from '@react-flow/bundle';
|
import { useStore, useStoreApi } from 'reactflow';
|
||||||
|
|
||||||
import styles from './provider.module.css';
|
import styles from './provider.module.css';
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
useNodesState,
|
useNodesState,
|
||||||
useEdgesState,
|
useEdgesState,
|
||||||
ReactFlowInstance,
|
ReactFlowInstance,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import Sidebar from './Sidebar';
|
import Sidebar from './Sidebar';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { memo, useCallback, Dispatch, FC } from 'react';
|
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 localforage from 'localforage';
|
||||||
|
|
||||||
import styles from './save.module.css';
|
import styles from './save.module.css';
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import {
|
import { ReactFlow, ReactFlowProvider, Node, addEdge, Connection, Edge, useNodesState, useEdgesState } from 'reactflow';
|
||||||
ReactFlow,
|
|
||||||
ReactFlowProvider,
|
|
||||||
Node,
|
|
||||||
addEdge,
|
|
||||||
Connection,
|
|
||||||
Edge,
|
|
||||||
useNodesState,
|
|
||||||
useEdgesState,
|
|
||||||
} from '@react-flow/bundle';
|
|
||||||
import Controls from './Controls';
|
import Controls from './Controls';
|
||||||
|
|
||||||
const initialNodes: Node[] = [
|
const initialNodes: Node[] = [
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
Controls,
|
Controls,
|
||||||
Background,
|
Background,
|
||||||
MiniMap,
|
MiniMap,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import { getNodesAndEdges } from './utils';
|
import { getNodesAndEdges } from './utils';
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Node, Edge } from '@react-flow/bundle';
|
import { Node, Edge } from 'reactflow';
|
||||||
|
|
||||||
type ElementsCollection = {
|
type ElementsCollection = {
|
||||||
nodes: Node[];
|
nodes: Node[];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { memo, FC, CSSProperties } from 'react';
|
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 infoStyle: CSSProperties = { fontSize: 11 };
|
||||||
const idStyle: CSSProperties = {
|
const idStyle: CSSProperties = {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
Controls,
|
Controls,
|
||||||
MiniMap,
|
MiniMap,
|
||||||
Background,
|
Background,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import DebugNode from './DebugNode';
|
import DebugNode from './DebugNode';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { MouseEvent, useCallback } from 'react';
|
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 onNodeDragStop = (_: MouseEvent, node: Node) => console.log('drag stop', node);
|
||||||
const onNodeClick = (_: MouseEvent, node: Node) => console.log('click', node);
|
const onNodeClick = (_: MouseEvent, node: Node) => console.log('click', node);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useCallback } from 'react';
|
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';
|
import styles from './touch-device.module.css';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { memo, FC, CSSProperties } from 'react';
|
import React, { memo, FC, CSSProperties } from 'react';
|
||||||
|
|
||||||
import { Handle, Position, NodeProps } from '@react-flow/bundle';
|
import { Handle, Position, NodeProps } from 'reactflow';
|
||||||
|
|
||||||
const nodeStyles: CSSProperties = {
|
const nodeStyles: CSSProperties = {
|
||||||
padding: '10px 15px',
|
padding: '10px 15px',
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
updateEdge,
|
updateEdge,
|
||||||
useNodesState,
|
useNodesState,
|
||||||
useEdgesState,
|
useEdgesState,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
import CustomNode from './CustomNode';
|
import CustomNode from './CustomNode';
|
||||||
|
|
||||||
const initialNodes: Node[] = [
|
const initialNodes: Node[] = [
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
NodeChange,
|
NodeChange,
|
||||||
EdgeChange,
|
EdgeChange,
|
||||||
HandleType,
|
HandleType,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import { Controls } from '@react-flow/controls';
|
import { Controls } from '@react-flow/controls';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
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';
|
import styles from './updatenode.module.css';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useKeyPress } from '@react-flow/bundle';
|
import { useKeyPress } from 'reactflow';
|
||||||
|
|
||||||
const UseKeyPressComponent = () => {
|
const UseKeyPressComponent = () => {
|
||||||
const metaPressed = useKeyPress(['Meta']);
|
const metaPressed = useKeyPress(['Meta']);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
Edge,
|
Edge,
|
||||||
useNodesState,
|
useNodesState,
|
||||||
useEdgesState,
|
useEdgesState,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
const initialNodes: Node[] = [
|
const initialNodes: Node[] = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import React, { useState, memo, FC, useMemo, CSSProperties } from 'react';
|
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' };
|
const nodeStyles: CSSProperties = { padding: 10, border: '1px solid #ddd' };
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
Position,
|
Position,
|
||||||
useNodesState,
|
useNodesState,
|
||||||
useEdgesState,
|
useEdgesState,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import CustomNode from './CustomNode';
|
import CustomNode from './CustomNode';
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
useNodesState,
|
useNodesState,
|
||||||
useEdgesState,
|
useEdgesState,
|
||||||
OnConnectStartParams,
|
OnConnectStartParams,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
import styles from './validation.module.css';
|
import styles from './validation.module.css';
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
Node,
|
Node,
|
||||||
Edge,
|
Edge,
|
||||||
useReactFlow,
|
useReactFlow,
|
||||||
} from '@react-flow/bundle';
|
} from 'reactflow';
|
||||||
|
|
||||||
const onNodeDrag = (_: MouseEvent, node: Node) => console.log('drag', node);
|
const onNodeDrag = (_: MouseEvent, node: Node) => console.log('drag', node);
|
||||||
const onNodeDragStop = (_: MouseEvent, node: Node) => console.log('drag stop', node);
|
const onNodeDragStop = (_: MouseEvent, node: Node) => console.log('drag stop', node);
|
||||||
|
|||||||
@@ -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",
|
"description": "A highly customizable React library for building node-based editors and interactive flow charts",
|
||||||
"repository": "git@github.com:wbkd/react-flow.git",
|
"repository": "git@github.com:wbkd/react-flow.git",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# @react-flow/core
|
|
||||||
|
|
||||||
## 11.0.0-next.0
|
|
||||||
|
|
||||||
### Major Changes
|
|
||||||
|
|
||||||
- beta release for v11
|
|
||||||
@@ -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
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# @react-flow/bundle
|
# reactflow
|
||||||
|
|
||||||
Bundles:
|
Bundles:
|
||||||
|
|
||||||
@@ -11,6 +11,6 @@ Bundles:
|
|||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install @react-flow/bundle
|
npm install reactflow
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-flow/bundle",
|
"name": "reactflow",
|
||||||
"version": "11.0.0-next.0",
|
"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": [
|
"keywords": [
|
||||||
"react",
|
"react",
|
||||||
"node-based UI",
|
"node-based UI",
|
||||||
@@ -13,14 +13,14 @@
|
|||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"main": "dist/react-flow-bundle.cjs.js",
|
"main": "dist/reactflow.cjs.js",
|
||||||
"module": "dist/react-flow-bundle.esm.js",
|
"module": "dist/reactflow.esm.js",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/wbkd/react-flow.git",
|
"url": "https://github.com/wbkd/react-flow.git",
|
||||||
"directory": "packages/bundle"
|
"directory": "packages/reactflow"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "postcss src/*.css --config ../../postcss.config.json --dir dist"
|
"build": "postcss src/*.css --config ../../postcss.config.json --dir dist"
|
||||||
78
yarn.lock
78
yarn.lock
@@ -2295,6 +2295,7 @@ __metadata:
|
|||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "@react-flow/background@workspace:packages/background"
|
resolution: "@react-flow/background@workspace:packages/background"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
"@babel/runtime": ^7.18.9
|
||||||
"@react-flow/core": "workspace:*"
|
"@react-flow/core": "workspace:*"
|
||||||
classcat: ^5.0.3
|
classcat: ^5.0.3
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -2303,30 +2304,11 @@ __metadata:
|
|||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
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:
|
|
||||||
"@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":
|
"@react-flow/controls@workspace:*, @react-flow/controls@workspace:packages/controls":
|
||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "@react-flow/controls@workspace:packages/controls"
|
resolution: "@react-flow/controls@workspace:packages/controls"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
"@babel/runtime": ^7.18.9
|
||||||
"@react-flow/core": "workspace:*"
|
"@react-flow/core": "workspace:*"
|
||||||
autoprefixer: ^10.4.8
|
autoprefixer: ^10.4.8
|
||||||
classcat: ^5.0.3
|
classcat: ^5.0.3
|
||||||
@@ -2369,6 +2351,7 @@ __metadata:
|
|||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "@react-flow/minimap@workspace:packages/minimap"
|
resolution: "@react-flow/minimap@workspace:packages/minimap"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
"@babel/runtime": ^7.18.9
|
||||||
"@react-flow/core": "workspace:*"
|
"@react-flow/core": "workspace:*"
|
||||||
autoprefixer: ^10.4.8
|
autoprefixer: ^10.4.8
|
||||||
classcat: ^5.0.3
|
classcat: ^5.0.3
|
||||||
@@ -8165,7 +8148,6 @@ __metadata:
|
|||||||
resolution: "react-flow-examples@workspace:examples/nextjs"
|
resolution: "react-flow-examples@workspace:examples/nextjs"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@preconstruct/next": ^4.0.0
|
"@preconstruct/next": ^4.0.0
|
||||||
"@react-flow/bundle": "workspace:*"
|
|
||||||
"@types/dagre": ^0.7.47
|
"@types/dagre": ^0.7.47
|
||||||
dagre: ^0.8.5
|
dagre: ^0.8.5
|
||||||
eslint: ^8.22.0
|
eslint: ^8.22.0
|
||||||
@@ -8179,12 +8161,29 @@ __metadata:
|
|||||||
postcss-preset-env: ^7.7.2
|
postcss-preset-env: ^7.7.2
|
||||||
react: ^18.2.0
|
react: ^18.2.0
|
||||||
react-dom: ^18.2.0
|
react-dom: ^18.2.0
|
||||||
|
reactflow: "workspace:*"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
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
|
version: 0.0.0-use.local
|
||||||
resolution: "react-flow@workspace:."
|
resolution: "reactflow-monorepo@workspace:."
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/core": ^7.18.10
|
"@babel/core": ^7.18.10
|
||||||
"@babel/plugin-transform-runtime": ^7.18.10
|
"@babel/plugin-transform-runtime": ^7.18.10
|
||||||
@@ -8214,21 +8213,26 @@ __metadata:
|
|||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
"react-is@npm:^16.13.1":
|
"reactflow@workspace:*, reactflow@workspace:packages/reactflow":
|
||||||
version: 16.13.1
|
version: 0.0.0-use.local
|
||||||
resolution: "react-is@npm:16.13.1"
|
resolution: "reactflow@workspace:packages/reactflow"
|
||||||
checksum: f7a19ac3496de32ca9ae12aa030f00f14a3d45374f1ceca0af707c831b2a6098ef0d6bdae51bd437b0a306d7f01d4677fcc8de7c0d331eb47ad0f46130e53c5f
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"react@npm:^18.2.0":
|
|
||||||
version: 18.2.0
|
|
||||||
resolution: "react@npm:18.2.0"
|
|
||||||
dependencies:
|
dependencies:
|
||||||
loose-envify: ^1.1.0
|
"@babel/runtime": ^7.18.9
|
||||||
checksum: 88e38092da8839b830cda6feef2e8505dec8ace60579e46aa5490fc3dc9bba0bd50336507dc166f43e3afc1c42939c09fe33b25fae889d6f402721dcd78fca1b
|
"@react-flow/background": "workspace:*"
|
||||||
languageName: node
|
"@react-flow/controls": "workspace:*"
|
||||||
linkType: hard
|
"@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":
|
"read-cache@npm:^1.0.0":
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user