chore: bump versions

This commit is contained in:
github-actions[bot]
2022-10-10 22:03:08 +02:00
committed by Braks
parent b8b325e316
commit d224d59b4d
11 changed files with 239 additions and 182 deletions
-64
View File
@@ -1,64 +0,0 @@
---
'@vue-flow/core': minor
---
# What's changed?
* Add `HandleConnectable` type
* Update `connectable` prop of `Handle` to `HandleConnectable` type
* Allow to specify if Handles are connectable
* any number of connections
* none
* single connection
* or a cb to determine whether the Handle is connectable
Example:
```html
<script lang="ts" setup>
import { Handle, HandleConnectable } from '@vue-flow/core'
const handleConnectable: HandleConnectable = (node, connectedEdges) => {
console.log(node, connectedEdges)
return true
}
</script>
<template>
<!-- single connection -->
<Handle type="target" position="left" connectable="single" />
<div>
Custom Node
</div>
<!-- cb -->
<Handle id="a" position="right" :connectable="handleConnectable" />
</template>
```
* Update `node.connectable` prop to `HandleConnectable`
For Example:
```js
const nodes = ref([
{
id: '1',
position: { x: 0, y: 0 },
connectable: 'single' // each handle is only connectable once (default node for example)
},
{
id: '2',
position: { x: 200, y: 0 },
connectable: (node, connectedEdges) => {
return true // will allow any number of connections
}
},
{
id: '3',
position: { x: 400, y: 0 },
connectable: true // will allow any number of connections
},
{
id: '4',
position: { x: 200, y: 0 },
connectable: false // will disable handles
}
])
```
-28
View File
@@ -1,28 +0,0 @@
---
'vueflow': major
'@vue-flow/additional-components': patch
'@vue-flow/core': patch
---
# What's changed?
- Add `vueflow` pkg that exports all features
```vue
<script setup>
// `vueflow` pkg exports all features, i.e. core + additional components
import { VueFlow, Background, MiniMap, Controls } from 'vueflow'
</script>
<template>
<VueFlow>
<Background />
<MiniMap />
<Controls />
</VueFlow>
</template>
```
### Chores
- Rename `core` pkg directory to `core` from `vue-flow`
- Rename bundle outputs
-20
View File
@@ -1,20 +0,0 @@
---
'@vue-flow/additional-components': minor
---
# What's changed?
* Add `Panel` component
* Wrap `MiniMap` and `Controls` with `Panel`
* Add `position` prop to `MiniMap` and `Controls`
Example:
```vue
<VueFlow v-model="elements">
<MiniMap position="top-right" />
<Controls position="top-left" />
</VueFlow>
```
# Bugfixes
* Fix `MiniMap` and `Controls` cancelling selections
-60
View File
@@ -1,60 +0,0 @@
---
'@vue-flow/core': patch
---
# What's changed?
- Simplify `useHandle` usage
- Pass props to the composable as possible refs
- Still returns onClick & onMouseDown handlers but only expects mouse event now
Before:
```vue
<script lang="ts" setup>
import { useHandle, NodeId } from '@vue-flow/core'
const nodeId = inject(NodeId)
const handleId = 'my-handle'
const type = 'source'
const isValidConnection = () => true
const { onMouseDown } = useHandle()
const onMouseDownHandler = (event: MouseEvent) => {
onMouseDown(event, handleId, nodeId, type === 'target', isValidConnection, undefined)
}
</script>
<template>
<div @mousedown="onMouseDownHandler" />
</template>
```
After:
```vue
<script lang="ts" setup>
import { useHandle, useNode } from '@vue-flow/core'
const { nodeId } = useNode()
const handleId = 'my-handle'
const type = 'source'
const isValidConnection = () => true
const { onMouseDown } = useHandle({
nodeId,
handleId,
isValidConnection,
type,
})
</script>
<template>
<div @mousedown="onMouseDown" />
</template>
```
-7
View File
@@ -1,7 +0,0 @@
---
'@vue-flow/core': patch
---
# Bugfixes
- Edges not returned by getter when `paneReady` event is triggered