chore(packages): adjust names

This commit is contained in:
moklick
2022-08-29 10:35:25 +02:00
parent 7b8b368572
commit 37bf0c48d7
63 changed files with 101 additions and 205 deletions

View File

@@ -5,4 +5,4 @@
### Patch Changes
- Updated dependencies []:
- @react-flow/bundle@11.0.0-next.0
- reactflow@11.0.0-next.0

View File

@@ -5,19 +5,19 @@
"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"
},
"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",

View File

@@ -8,7 +8,7 @@ import {
Background,
BackgroundProps,
BackgroundVariant,
} from '@react-flow/bundle';
} from 'reactflow';
import styles from './style.module.css';

View File

@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { ConnectionLineComponentProps } from '@react-flow/bundle';
import { ConnectionLineComponentProps } from 'reactflow';
const ConnectionLine: FC<ConnectionLineComponentProps> = ({ fromX, fromY, toX, toY }) => {
return (

View File

@@ -9,7 +9,7 @@ import {
useEdgesState,
Background,
BackgroundVariant,
} from '@react-flow/bundle';
} from 'reactflow';
import ConnectionLine from './ConnectionLine';

View File

@@ -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 };

View File

@@ -11,7 +11,7 @@ import {
Connection,
useNodesState,
useEdgesState,
} from '@react-flow/bundle';
} from 'reactflow';
import ColorSelectorNode from './ColorSelectorNode';

View File

@@ -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[] = [
{

View File

@@ -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);

View File

@@ -11,7 +11,7 @@ import {
useEdgesState,
Controls,
NodeOrigin,
} from '@react-flow/bundle';
} from 'reactflow';
import Sidebar from './Sidebar';

View File

@@ -14,7 +14,7 @@ import {
Edge,
useNodesState,
useEdgesState,
} from '@react-flow/bundle';
} from 'reactflow';
import { getElements } from './utils';

View File

@@ -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;

View File

@@ -1,5 +1,5 @@
import React, { FC } from 'react';
import { EdgeProps, getBezierPath } from '@react-flow/bundle';
import { EdgeProps, getBezierPath } from 'reactflow';
const CustomEdge: FC<EdgeProps> = ({
id,

View File

@@ -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<EdgeProps> = ({
id,

View File

@@ -12,7 +12,7 @@ import {
Node,
useEdgesState,
useNodesState,
} from '@react-flow/bundle';
} from 'reactflow';
import CustomEdge from './CustomEdge';
import CustomEdge2 from './CustomEdge2';

View File

@@ -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);

View File

@@ -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';

View File

@@ -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';

View File

@@ -9,7 +9,7 @@ import {
Connection,
useNodesState,
useEdgesState,
} from '@react-flow/bundle';
} from 'reactflow';
import styles from './style.module.css';

View File

@@ -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

View File

@@ -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[] = [
{

View File

@@ -11,7 +11,7 @@ import {
useEdgesState,
Controls,
MiniMap,
} from '@react-flow/bundle';
} from 'reactflow';
const initialNodes: Node[] = [
{

View File

@@ -11,7 +11,7 @@ import {
useEdgesState,
MarkerType,
EdgeMarker,
} from '@react-flow/bundle';
} from 'reactflow';
import dagre from 'dagre';

View File

@@ -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 };

View File

@@ -11,7 +11,7 @@ import {
useNodesState,
useEdgesState,
MarkerType,
} from '@react-flow/bundle';
} from 'reactflow';
import styles from './multiflows.module.css';

View File

@@ -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);

View File

@@ -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[] = [
{

View File

@@ -11,7 +11,7 @@ import {
NodeTypes,
useNodesState,
useEdgesState,
} from '@react-flow/bundle';
} from 'reactflow';
const initialNodes: Node[] = [
{

View File

@@ -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);

View File

@@ -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';

View File

@@ -11,7 +11,7 @@ import {
useNodesState,
useEdgesState,
ReactFlowInstance,
} from '@react-flow/bundle';
} from 'reactflow';
import Sidebar from './Sidebar';

View File

@@ -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';

View File

@@ -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[] = [

View File

@@ -13,7 +13,7 @@ import {
Controls,
Background,
MiniMap,
} from '@react-flow/bundle';
} from 'reactflow';
import { getNodesAndEdges } from './utils';

View File

@@ -1,4 +1,4 @@
import { Node, Edge } from '@react-flow/bundle';
import { Node, Edge } from 'reactflow';
type ElementsCollection = {
nodes: Node[];

View File

@@ -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 = {

View File

@@ -12,7 +12,7 @@ import {
Controls,
MiniMap,
Background,
} from '@react-flow/bundle';
} from 'reactflow';
import DebugNode from './DebugNode';

View File

@@ -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);

View File

@@ -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';

View File

@@ -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',

View File

@@ -14,7 +14,7 @@ import {
updateEdge,
useNodesState,
useEdgesState,
} from '@react-flow/bundle';
} from 'reactflow';
import CustomNode from './CustomNode';
const initialNodes: Node[] = [

View File

@@ -12,7 +12,7 @@ import {
NodeChange,
EdgeChange,
HandleType,
} from '@react-flow/bundle';
} from 'reactflow';
import { Controls } from '@react-flow/controls';

View File

@@ -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';

View File

@@ -1,5 +1,5 @@
import React from 'react';
import { useKeyPress } from '@react-flow/bundle';
import { useKeyPress } from 'reactflow';
const UseKeyPressComponent = () => {
const metaPressed = useKeyPress(['Meta']);

View File

@@ -11,7 +11,7 @@ import {
Edge,
useNodesState,
useEdgesState,
} from '@react-flow/bundle';
} from 'reactflow';
const initialNodes: Node[] = [
{

View File

@@ -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' };

View File

@@ -11,7 +11,7 @@ import {
Position,
useNodesState,
useEdgesState,
} from '@react-flow/bundle';
} from 'reactflow';
import CustomNode from './CustomNode';

View File

@@ -12,7 +12,7 @@ import {
useNodesState,
useEdgesState,
OnConnectStartParams,
} from '@react-flow/bundle';
} from 'reactflow';
import styles from './validation.module.css';

View File

@@ -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);