chore: bump versions

This commit is contained in:
github-actions[bot]
2024-02-05 07:51:12 +01:00
committed by Braks
parent 05c4677002
commit fd4f0c8183
19 changed files with 157 additions and 196 deletions
-13
View File
@@ -1,13 +0,0 @@
---
"@vue-flow/core": minor
---
Add `useNodeId` composable
## 🧙 Example
```ts
const nodeId = useNodeId()
console.log('nodeId', nodeId) // '1'
```
-19
View File
@@ -1,19 +0,0 @@
---
"@vue-flow/core": minor
---
Add `updateNode` action
## 🧙 Example
```ts
const { updateNode } = useVueFlow()
updateNode('1', { position: { x: 100, y: 100 } })
// or using a function to update the node
updateNode('1', (node) => ({ ...node, position: { x: 100, y: 100 } }))
// passing options - `replace` will replace the node instead of merging it
updateNode('1', { id: '1', label: 'Node 1', position: { x: 100, y: 100 } }, { replace: true })
```
-5
View File
@@ -1,5 +0,0 @@
---
"@vue-flow/core": minor
---
Call `onNodesInitialized` whenever `areNodesInitialized` is true instead of only once
-5
View File
@@ -1,5 +0,0 @@
---
"@vue-flow/core": minor
---
Omit `events` in nodes and edges when returning them from `toObject`
-38
View File
@@ -1,38 +0,0 @@
---
"@vue-flow/core": minor
---
Add `useHandleConnections` composable
## 🧙 Example
```ts
const connections = useHandleConnections({
// type of the handle you are looking for - accepts a `MaybeRefOrGetter<string>`
type: 'source',
// the id of the handle you are looking for - accepts a `MaybeRefOrGetter<string | undefined> | undefined` [OPTIONAL]
id: 'a',
// if not provided, the node id from the NodeIdContext is used - accepts a `MaybeRefOrGetter<string | undefined> | undefined`
nodeId: '1',
// a cb that is called when a new connection is added
onConnect: (params) => {
console.log('onConnect', params)
},
// a cb that is called when a connection is removed
onDisconnect: (params) => {
console.log('onDisconnect', params)
},
})
watch(
connections,
(next) => {
console.log('connections', next)
},
{ immediate: true },
)
```
-5
View File
@@ -1,5 +0,0 @@
---
"@vue-flow/core": minor
---
Find handle by id regardless of number of handles that exist
-5
View File
@@ -1,5 +0,0 @@
---
"@vue-flow/core": minor
---
Add `connectionLookup` to state
-5
View File
@@ -1,5 +0,0 @@
---
"@vue-flow/core": minor
---
Add `onInit` hook and deprecate `onPaneReady`
-19
View File
@@ -1,19 +0,0 @@
---
"@vue-flow/core": minor
---
Add `updateNodeData` action
## 🧙 Example
```ts
const { updateNodeData } = useVueFlow()
updateNodeData('1', { foo: 'bar' })
// or using a function to update the data
updateNodeData('1', (data) => ({ ...data, foo: 'bar' }))
// passing options - `replace` will replace the data instead of merging it
updateNodeData('1', { foo: 'bar' }, { replace: true })
```
-5
View File
@@ -1,5 +0,0 @@
---
"@vue-flow/core": patch
---
When updating nodes or edges by overwriting the original array, update the nodes and edges in the state by using them as the target for `Object.assign`. This keeps reference in-tact and ensures reactivity when these objects are changed/updated
-46
View File
@@ -1,46 +0,0 @@
---
"@vue-flow/core": minor
---
Add `useNodesData` composable
## 🧙 Example
### Single node id
```ts
const nodeId = '1'
const data = useNodesData(nodeId)
console.log(data.value) // '[{ /* ... */ }]
```
### Array of node ids
```ts
const nodeIds = ['1', '2', '3']
const data = useNodesData(nodeIds)
console.log(data.value) // '[{ /* ... */ }]
```
### Asserting data type
```ts
import type { Node } from '@vue-flow/core'
interface Data {
foo: string;
bar: string;
}
type MyNode = Node<CustomNodeData>
const nodeId = '1'
const data = useNodesData([nodeId], (node): node is MyNode => {
return 'foo' in node.data && 'bar' in node.data
})
console.log(data.value) // '[{ /* foo: string; bar: string */ }]
```
-5
View File
@@ -1,5 +0,0 @@
---
"@vue-flow/core": minor
---
Call `fitViewOnInit` when initial node dimensions are available
-5
View File
@@ -1,5 +0,0 @@
---
"@vue-flow/core": minor
---
Deprecate `events` property on nodes and edges
-5
View File
@@ -1,5 +0,0 @@
---
"@vue-flow/core": minor
---
Add error args to `VueFlowError`
-5
View File
@@ -1,5 +0,0 @@
---
"@vue-flow/core": patch
---
Update node dimensions on next tick
-5
View File
@@ -1,5 +0,0 @@
---
"@vue-flow/core": minor
---
Replace `Array.forEach` loops with `for...of`
-5
View File
@@ -1,5 +0,0 @@
---
"@vue-flow/core": minor
---
Export `isErrorOfType` typeguard to narrow the type of a VueFlowError and infer it's args