Skip to content

Commit 9e7bab5

Browse files
committed
Merge branch 'refs/heads/master' into release/2.0.0
# Conflicts: # docs/src/guide/utils/graph.md # packages/core/src/utils/graph.ts
2 parents 450be60 + 67b652e commit 9e7bab5

File tree

129 files changed

+7159
-5107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+7159
-5107
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+15
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,21 @@ body:
4242
4. See error...
4343
validations:
4444
required: false
45+
- type: input
46+
id: link
47+
attributes:
48+
label: Minimal reproduction of the issue with CodeSandbox
49+
description: |
50+
Please provide a link to a CodeSandbox that shows the issue, this helps immensely in debugging.
51+
52+
You can use one of the following Vue Flow codesandbox starters:
53+
- js: https://new.vueflow.dev/js
54+
- ts: https://new.vueflow.dev/ts
55+
56+
Avoid too many dependencies in your example and try to reproduce the issue as minimal as possible.
57+
placeholder: https://codesandbox.io/s/...
58+
validations:
59+
required: false
4560
- type: textarea
4661
attributes:
4762
label: Relevant log output

.github/actions/install-dependencies/action.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ runs:
2626
uses: actions/cache@v4
2727
with:
2828
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
29-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
29+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
3030
restore-keys: |
3131
${{ runner.os }}-pnpm-store-
3232

.github/workflows/build-and-test.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/checkout@master
2727

2828
- name: Setup node env 🏗
29-
uses: actions/setup-node@v3
29+
uses: actions/setup-node@v4
3030
with:
3131
node-version: ${{ matrix.node }}
3232
check-latest: true
@@ -36,7 +36,7 @@ jobs:
3636

3737
- name: Setup Turbo cache 🏎️
3838
id: turbo-cache
39-
uses: actions/cache@v2
39+
uses: actions/cache@v4
4040
with:
4141
path: .turbo
4242
key: turbo-${{ runner.os }}-${{ github.sha }}
@@ -50,9 +50,7 @@ jobs:
5050
run: pnpm run build --cache-dir=.turbo
5151

5252
- name: Run tests 🧪
53-
uses: cypress-io/github-action@v5
53+
uses: cypress-io/github-action@v6
5454
with:
5555
install-command: pnpm cypress install
5656
command: pnpm run test --cache-dir=.turbo
57-
browser: chrome
58-
component: true

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: actions/checkout@master
2929

3030
- name: Setup node env 🏗
31-
uses: actions/setup-node@v3
31+
uses: actions/setup-node@v4
3232
with:
3333
node-version: ${{ matrix.node }}
3434
check-latest: true

CHANGELOG.md

+168
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,174 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.42.1] - 2025-01-16
6+
7+
[5a5b2c1](5a5b2c15d76ac6173e616b947e227f6974bfe444)...[d7f5506](d7f5506882b4438ee04f8f08217547f38379366e)
8+
9+
### Bug Fixes
10+
11+
- Correct connection keys (#1749) ([424f6cf](424f6cf63c5c9a295ca9a3a901a96838846d0701))
12+
13+
### Miscellaneous Tasks
14+
15+
- Simplify animated layout example (#1747) ([e94611a](e94611a3b0e43517af8ef3ffa4ee30e3c22068d6))
16+
17+
## [1.42.0] - 2025-01-12
18+
19+
[549d5ce](549d5cee7f6a8be784924175e6ab280b9334dd67)...[5a5b2c1](5a5b2c15d76ac6173e616b947e227f6974bfe444)
20+
21+
### Bug Fixes
22+
23+
- Hide minimap node if graph node is hidden (#1739) ([0a0d8af](0a0d8af16c2c813ce028898ee07b1d52c75ca612))
24+
25+
### Features
26+
27+
- Add `useNodeConnections` composable (#1728) ([268ed0e](268ed0e84ee3d77aab6862ad3003da6e8356c879))
28+
29+
### Miscellaneous Tasks
30+
31+
- Update license ([dbd9330](dbd9330d91b8c7f687eac1dc3f80454528b2a4a3))
32+
- Add new sandbox links to docs ([46f3892](46f389269617f7f89872e114c3a0bac18d8a5c76))
33+
- Update issue template ([b9c9cd9](b9c9cd9e1c22f6bb01f90931cddb61d606051f97))
34+
- Open links in new tab ([a8f7e36](a8f7e36d9e5f5c32031614acf6791f682b9be531))
35+
- Cleanup card styles ([1c5caff](1c5caffaad54fd95afbb665c712fd5b7965eff8a))
36+
37+
### Refactor
38+
39+
- Allow setting handleId in useNodeConnections (#1732) ([3d1b85f](3d1b85fce23da9662d33f4f197933b8c65e393d6))
40+
- Use connection lookup to check for selected elements (#1737) ([6f3ed67](6f3ed6746303be317c5722ba9d93cf86f6f87912))
41+
- Inherit attrs on edge path el in `BaseEdge` (#1742) ([44b9232](44b9232b196259db4dc69be930ff9437355c6dc0))
42+
- Rename useNodeConnections params (#1743) ([f78c348](f78c348947b8fbcd4ea857f12f24dc2ece21dfc4))
43+
44+
## [1.41.7] - 2025-01-04
45+
46+
[265e03d](265e03d9f47b8030caaa4db6877af7fc63e33348)...[549d5ce](549d5cee7f6a8be784924175e6ab280b9334dd67)
47+
48+
### Bug Fixes
49+
50+
- Add missing import ([f438acb](f438acbc9f54b9f94839af6348e3919a3b770d05))
51+
- Use center position of handle as snapping point for connection lines (#1625) ([b33da47](b33da47a3a02577b8981a544b9252174ce2bc4ec))
52+
53+
### Documentation
54+
55+
- Add edge markers example ([fe239b5](fe239b5d8fc07dae429a59a0484b6d232a18286b))
56+
- Add docs section about v-modelling nodes and edges ([2231ee4](2231ee462604c950f3e7aba1999ec9a1e7b835b7))
57+
58+
### Miscellaneous Tasks
59+
60+
- Add ([041fd87](041fd871a12fb146faca62719ebce688865757d7))
61+
62+
## [1.41.6] - 2024-12-07
63+
64+
[d22a239](d22a2394d49318b01c1a384d73970db018caec5d)...[265e03d](265e03d9f47b8030caaa4db6877af7fc63e33348)
65+
66+
### Bug Fixes
67+
68+
- Prevent scrolling when using arrow keys to move nodes (#1698) ([04d1355](04d13551e373d7c4cce7b743a1a6e57f0e4be9e4))
69+
- Prevent scrolling when using arrow keys to move node selection (#1702) ([600d1a6](600d1a63fd3231e533781d2d4b1ee65999c4d439))
70+
- Update source/target node of updated edge (#1705) ([7a022c8](7a022c89c621a54c5d174647d8953b5163e7a939))
71+
- Allow control key as pan activation key code (#1707) ([f4f2494](f4f2494fd13baebe3df73e9e49c4dd7e71e566dc))
72+
73+
### Documentation
74+
75+
- Add loopback edge example (#1708) ([4d09783](4d0978343f457278fbd82e79cdf99bf645ff75da))
76+
77+
## [1.41.5] - 2024-11-13
78+
79+
[6bb195d](6bb195da0ce074f5d581f2d7a1a41779736ee124)...[d22a239](d22a2394d49318b01c1a384d73970db018caec5d)
80+
81+
### Bug Fixes
82+
83+
- Check if dragEnd event is UseDrag or MouseTouch event (#1680) ([5a028cf](5a028cf2d401e5fa6aa5a13fa3e5be51b9f9f5da))
84+
- Set default offset to `0` (#1692) ([129d543](129d543c4ed13396edec387ebeaa62a0217a932b))
85+
- Allow using + as a key in key combinations (#1693) ([2e2fa9a](2e2fa9a93c149ace318dc65e1cf683ba7fb20522))
86+
- Release key combination presses (#1696) ([4b8139d](4b8139da66753ad68bfe1bca345cd211433a7e53))
87+
- Escape node labels (#1695) ([f7a2664](f7a266415a162213e363d0397135950a00c2d76a))
88+
89+
### Documentation
90+
91+
- Add custom components to getting-started example (#1677) ([f3075bc](f3075bc246d9fc5e26940ba010e305b9f8e617f4))
92+
- Add simple layout example (#1678) ([61f4b0d](61f4b0d447fde0eff6324cb7d1f5ae00f9f397bd))
93+
94+
## [1.41.4] - 2024-11-01
95+
96+
[367f894](367f8947f2cf8adc8135c38d665f967f742a739b)...[6bb195d](6bb195da0ce074f5d581f2d7a1a41779736ee124)
97+
98+
### Bug Fixes
99+
100+
- If selection key code is true prevent pan on drag on left mouse btn (#1670) ([1e3acb1](1e3acb197994df60f3ac76f54dd9b8b9794a1aa5))
101+
102+
## [1.41.3] - 2024-11-01
103+
104+
[becb928](becb928c395cc5a7c2b4a883b10a26c8f9dc860f)...[367f894](367f8947f2cf8adc8135c38d665f967f742a739b)
105+
106+
### Bug Fixes
107+
108+
- Typo in SnappableConnectionLine.vue (#1638) ([a90010b](a90010b5c47cd1c5236611c8c420189ec3d480dd))
109+
- Allow pan on drag for non left-btn when selectionKeyCode is `true` (#1662) ([fe552fc](fe552fc5c5843a67e38da0054598f9451ef76d95))
110+
- Use all handle bounds in loose connection mode (#1665) ([cfc2332](cfc233237048c20b89c3aae294314788a0b8a1e0))
111+
- Start patterns at 0,0 (#1666) ([900850d](900850d3ae0dd8957745a6e8b265dda7337f8487))
112+
- Set `isPressed` to `true` on `blur` and `contextmenu` events if permant keypress is enabled (#1667) ([72e0e2e](72e0e2e97eff0c1b96b7fa32a5eca30f70dc4630))
113+
- Allow pan on drag for other mouse btns if left is disabled ([ecd21ce](ecd21ceebb605760294ecd4c668915ff96fc77a6))
114+
115+
### Miscellaneous Tasks
116+
117+
- Update deps (#1633) ([de6f042](de6f042826f0149153a06517dc8b00169d0d1f2d))
118+
119+
## [1.41.2] - 2024-09-16
120+
121+
[524d812](524d8129451edc7c40db5366ecd8113ad7dd99bd)...[becb928](becb928c395cc5a7c2b4a883b10a26c8f9dc860f)
122+
123+
### Bug Fixes
124+
125+
- Allow pointer events if mouse evt listeners exist (#1618) ([6338a9d](6338a9db067fcb7a8f6077a90450066812466875))
126+
- Calculate distance to trigger drag-click (#1624) ([6cc3042](6cc30429b54715650ccd7851287cd0f142daba44))
127+
128+
### Miscellaneous Tasks
129+
130+
- Correct prop name ([a1bfef8](a1bfef80162dbe9101c7eb8945ba816afd0e4d03))
131+
132+
## [1.41.1] - 2024-09-06
133+
134+
[c555dfd](c555dfd987b32f312c4003d3b53f094fa5bf71b9)...[524d812](524d8129451edc7c40db5366ecd8113ad7dd99bd)
135+
136+
### Bug Fixes
137+
138+
- Prevent overwriting size in node styles object (#1608) ([f4bde90](f4bde903028d07105b65d3aa8b95b88562349755))
139+
- Prevent drag click when multi selection is active (#1609) ([43ed0a8](43ed0a831801d507697ff8831ecee6cb44036ba4))
140+
141+
## [1.41.0] - 2024-08-30
142+
143+
[b3e457a](b3e457a35a33892915b4cb9d27c268770bef048b)...[c555dfd](c555dfd987b32f312c4003d3b53f094fa5bf71b9)
144+
145+
### Bug Fixes
146+
147+
- Don't set user selection flags on pointer down (#1600) ([eb12bdc](eb12bdc56ff107241fb88e1bd12eb49df93c9bd7))
148+
149+
### Documentation
150+
151+
- Add info on setting up vue project ([f4bffeb](f4bffebcb13dd894375a9ef340289ccb8005a9e4))
152+
- Add info on listening to events ([a7a9fd5](a7a9fd5d0aadec995147b69fce098972c0650cdf))
153+
154+
### Features
155+
156+
- Add getHandleConnections action (#1595) ([9c003d4](9c003d4353a4bbfe7d9a4d8ac7f8ed3e708c3c29))
157+
158+
### Miscellaneous Tasks
159+
160+
- Cleanup ([57e868d](57e868ddd8249460f7e2bb507e333ec294e93bca))
161+
- Remove old migration guide ([f24230a](f24230a01007fc08ff2b083aaa759718ed6272cf))
162+
- Update deps (#1598) ([564d593](564d5931a5045c8f7dd039ee157bdbf2cf28acda))
163+
- Update `useHandle` docs ([940b08e](940b08e080cd987fb226ee017a88603ec47c815c))
164+
165+
## [1.40.1] - 2024-08-20
166+
167+
[538b03e](538b03ef6b94d252410cca563428eb8288eba711)...[b3e457a](b3e457a35a33892915b4cb9d27c268770bef048b)
168+
169+
### Bug Fixes
170+
171+
- Inline event names (#1591) ([47281fd](47281fd66868da5ec389dff2990df7e77526c41a))
172+
5173
## [1.40.0] - 2024-08-19
6174

7175
[809a9a4](809a9a4e16ba4b8cae4159c259ec6a9da0f42954)...[538b03e](538b03ef6b94d252410cca563428eb8288eba711)

LICENSE

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Copyright (c) 2019-2024 webkid GmbH
2-
Copyright (c) 2021-2024 Burak Cakmakoglu
1+
Copyright (c) 2019-2025 webkid GmbH
2+
Copyright (c) 2021-2025 Burak Cakmakoglu
33

44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal

docs/examples/connection-radius/SnappableConnectionLine.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const props = defineProps({
2121
},
2222
targetPosition: {
2323
type: String,
24-
reuire: true,
24+
required: true,
2525
},
2626
sourcePosition: {
2727
type: String,

docs/examples/custom-node/OutputNode.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<script setup>
2-
import { Handle, Position, useHandleConnections, useNodesData } from '@vue-flow/core'
2+
import { Handle, Position, useNodeConnections, useNodesData } from '@vue-flow/core'
33
4-
const connections = useHandleConnections({
5-
type: 'target',
4+
const connections = useNodeConnections({
5+
handleType: 'target',
66
})
77
88
const nodesData = useNodesData(() => connections.value[0]?.source)

docs/examples/edge-markers/App.vue

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<script setup>
2+
import { ref } from 'vue'
3+
import { MarkerType, VueFlow } from '@vue-flow/core'
4+
import { Background } from '@vue-flow/background'
5+
import CustomEdge from './CustomEdge.vue'
6+
7+
const nodes = ref([
8+
{ id: '1', position: { x: 0, y: 0 }, data: { label: 'Select me for diamond markers' } },
9+
{ id: '2', position: { x: 0, y: 150 }, data: { label: 'Select me for circle markers' } },
10+
{ id: '3', position: { x: 200, y: 0 }, data: { label: 'Node 3' } },
11+
{ id: '4', position: { x: 200, y: 150 }, data: { label: 'Node 4' } },
12+
{ id: '5', position: { x: 400, y: 0 }, data: { label: 'Node 5' } },
13+
{ id: '6', position: { x: 400, y: 150 }, data: { label: 'Node 6' } },
14+
])
15+
16+
const edges = ref([
17+
// This edge uses a custom marker defined in CustomMarker.vue
18+
{ id: '1-2', source: '1', target: '2', type: 'custom' },
19+
{
20+
id: '3-4',
21+
source: '3',
22+
target: '4',
23+
label: 'Marker Arrow',
24+
// Use MarkerType enum to set the marker
25+
markerEnd: MarkerType.Arrow,
26+
markerStart: MarkerType.Arrow,
27+
},
28+
{
29+
id: '5-6',
30+
source: '5',
31+
target: '6',
32+
label: 'Marker ArrowClosed',
33+
// EdgeMarker object allows to customize the marker
34+
markerEnd: {
35+
type: MarkerType.ArrowClosed,
36+
color: '#ff0072',
37+
},
38+
markerStart: {
39+
type: MarkerType.ArrowClosed,
40+
color: '#ff0072',
41+
},
42+
},
43+
])
44+
</script>
45+
46+
<template>
47+
<VueFlow :nodes="nodes" :edges="edges" fit-view-on-init>
48+
<template #edge-custom="edgeProps">
49+
<CustomEdge v-bind="edgeProps" />
50+
</template>
51+
52+
<Background />
53+
</VueFlow>
54+
</template>

0 commit comments

Comments
 (0)