Comparing version 11.1.1 to 11.1.2
{ | ||
"name": "reactflow", | ||
"version": "11.1.1", | ||
"version": "11.1.2", | ||
"description": "A highly customizable React library for building node-based editors and interactive flow charts", | ||
@@ -30,6 +30,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@reactflow/background": "11.0.2", | ||
"@reactflow/controls": "11.0.2", | ||
"@reactflow/core": "11.1.1", | ||
"@reactflow/minimap": "11.0.2" | ||
"@reactflow/background": "11.0.3", | ||
"@reactflow/controls": "11.0.3", | ||
"@reactflow/core": "11.1.2", | ||
"@reactflow/minimap": "11.0.3" | ||
}, | ||
@@ -36,0 +36,0 @@ "peerDependencies": { |
@@ -27,8 +27,10 @@ ![readme-header](https://user-images.githubusercontent.com/3797215/156259138-fb9f59f8-52f2-474a-b78c-6570867e4ead.svg#gh-light-mode-only) | ||
## Commercial Usage / Attribution | ||
## Commercial Usage | ||
React Flow includes a small attribution that links to the React Flow website. **We expect companies who are using React Flow commercially to subscribe to [React Flow Pro](https://pro.reactflow.dev/pricing) if they want to remove the attribution.** By subscribing you get access to other exclusive services like advanced examples, individual support or prioritized bug reports. In non-commercial applications you may hide the attribution without subscribing but are welcome to [sponsor us on Github](https://github.com/sponsors/wbkd). | ||
**Are you using React Flow for a personal project?** Great! No sponsorship needed, you can support us by reporting any bugs you find, sending us screenshots of your projects, and starring us on Github 🌟 | ||
You can find more information in our [React Flow Pro FAQs](https://pro.reactflow.dev/faq). | ||
**Are you using React Flow at your organization and making money from it?** Awesome! We rely on your support to keep React Flow developed and maintained under an MIT License, just how we like it. You can do that on the [React Flow Pro website](https://pro.reactflow.dev) or through [Github Sponsors](https://github.com/sponsors/wbkd). | ||
You can find more information in our [React Flow Pro FAQs](https://pro.reactflow.dev/info). | ||
## Installation | ||
@@ -47,5 +49,27 @@ | ||
```jsx | ||
import ReactFlow, { MiniMap, Controls } from 'reactflow'; | ||
import { useCallback } from 'react'; | ||
import ReactFlow, { | ||
MiniMap, | ||
Controls, | ||
Background, | ||
useNodesState, | ||
useEdgesState, | ||
addEdge, | ||
} from 'reactflow'; | ||
function Flow({ nodes, edges, onNodesChange, onEdgesChange, onConnect }) { | ||
import 'reactflow/dist/style.css'; | ||
const initialNodes = [ | ||
{ id: '1', position: { x: 0, y: 0 }, data: { label: '1' } }, | ||
{ id: '2', position: { x: 0, y: 100 }, data: { label: '2' } }, | ||
]; | ||
const initialEdges = [{ id: 'e1-2', source: '1', target: '2' }]; | ||
function Flow() { | ||
const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes); | ||
const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges); | ||
const onConnect = useCallback((params) => setEdges((eds) => addEdge(params, eds)), [setEdges]); | ||
return ( | ||
@@ -61,2 +85,3 @@ <ReactFlow | ||
<Controls /> | ||
<Background /> | ||
</ReactFlow> | ||
@@ -63,0 +88,0 @@ ); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
158563
1091
129
+ Added@reactflow/background@11.0.3(transitive)
+ Added@reactflow/controls@11.0.3(transitive)
+ Added@reactflow/core@11.1.2(transitive)
+ Added@reactflow/minimap@11.0.3(transitive)
- Removed@reactflow/background@11.0.2(transitive)
- Removed@reactflow/controls@11.0.2(transitive)
- Removed@reactflow/core@11.1.1(transitive)
- Removed@reactflow/minimap@11.0.2(transitive)
Updated@reactflow/background@11.0.3
Updated@reactflow/controls@11.0.3
Updated@reactflow/core@11.1.2
Updated@reactflow/minimap@11.0.3