NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
[](https://vueflow.dev/)    and let viewport emit pane ctx menu.
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.48.0...v1.48.1
## What's Changed ### Minor Changes - #1978 `7acd6d7` Thanks @bcakmakoglu! - Separate flow import and export object shapes and interfaces. An export o
7acd6d7 Thanks @bcakmakoglu! - Separate flow import and export object shapes and interfaces. An export object has all fields as required, while an import object makes all fields optional.#1988 dd6a91f Thanks @bcakmakoglu! - Correctly unwrap disableKeyboardA11y ref when checking if a selection can be moved or not.
#1989 3f6e09a Thanks @bcakmakoglu! - Use position instead of computedPosition as updated position when moving a child node via keyboard.
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.47.0...v1.48.0
## What's Changed ### Minor Changes - #1967 `7828f4a` Thanks @bcakmakoglu! - Replace the existing offset option for fitView with a more expressive pad
7828f4a Thanks @bcakmakoglu! - Replace the existing offset option for fitView with a more expressive padding option allowing users to define padding per sides.Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.46.5...v1.47.0
## What's Changed ### Patch Changes - #1962 `34bcf36` Thanks @bcakmakoglu! - Unwrap connection line status ref in the connection line component to cor
34bcf36 Thanks @bcakmakoglu! - Unwrap connection line status ref in the connection line component to correctly append the class name.Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.46.4...v1.46.5
## What's Changed ### Patch Changes - #1954 `f4cfc50` Thanks @bcakmakoglu! - Remove border related styles from the required styles and move them into
f4cfc50 Thanks @bcakmakoglu! - Remove border related styles from the required styles and move them into the default theme stylesheetFull Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.46.3...v1.46.4
## What's Changed ### Patch Changes - #1942 `90cf6ff` Thanks @bcakmakoglu! - Add nullish operator to checkVisibility call Full Changelog: https://gith
90cf6ff Thanks @bcakmakoglu! - Add nullish operator to checkVisibility callFull Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.46.2...v1.46.3
## What's Changed ### Patch Changes - #1939 `f9a5231` Thanks @bcakmakoglu! - Only emit node position changes if a position change actually occurred. F
f9a5231 Thanks @bcakmakoglu! - Only emit node position changes if a position change actually occurred.Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.46.1...v1.46.2
## What's Changed ### Patch Changes - #1935 `ca54587` Thanks @bcakmakoglu! - Correctly check if an event listener was bound to the VueFlow component,
#1935 ca54587 Thanks @bcakmakoglu! - Correctly check if an event listener was bound to the VueFlow component, using for example @node-click or if a listener was bound using the exposed event hooks from useVueFlow when determening if a listener for an event exists at all.
#1932 3e0442a Thanks @bcakmakoglu! - Use toHandle from valid handle check as target handle in ongoing connections
#1938 fd785e2 Thanks @bcakmakoglu! - Prevent multi touch from aborting connections.
#1936 ff6b3d2 Thanks @bcakmakoglu! - Skip resize handler if node is not visible.
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.46.0...v1.46.1
## What's Changed ### Minor Changes - #1923 `18d103d` Thanks @bcakmakoglu! - Expose isMacOs utility - #1918 `0568ab7` Thanks @bcakmakoglu! - Expose wh
#1923 18d103d Thanks @bcakmakoglu! - Expose isMacOs utility
#1918 0568ab7 Thanks @bcakmakoglu! - Expose wheelDelta utility fn
#1919 6880409 Thanks @bcakmakoglu! - Use event target for <Handle> components to determine the "clicked" handle, avoiding calls to `getElementFromPoint and allowing "detached" handles
957d011 Thanks @bcakmakoglu! - Fetch the correct source and target nodes for isValidConnection.Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.45.1...v1.46.0
## What's Changed ### Patch Changes - #1914 `8f65028` Thanks @bcakmakoglu! - Calculate overlapping area in getNodeIntersections correctly. - #1913 `53
#1914 8f65028 Thanks @bcakmakoglu! - Calculate overlapping area in getNodeIntersections correctly.
#1913 5366b56 Thanks @bcakmakoglu! - Emit node drag-start, drag and drag-end events when a selection is dragged (selectionKeyCode).
#1882 742eb98 Thanks @bcakmakoglu! - Use correct handlesuffix for connection lookup in getHandleConnections action.
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.45.0...v1.45.1
type="button" to avoid form submissions (#1911) (#1912) (dfae661)## What's Changed ### Minor Changes - #1869 `4a2427d` Thanks @bcakmakoglu! - Add domAttributes prop to nodes / edges that allows passing any sort of d
4a2427d Thanks @bcakmakoglu! - Add domAttributes prop to nodes / edges that allows passing any sort of dom attributes to the node/edge wrappers (like aria attributes etc.).Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.44.0...v1.45.0
### Minor Changes - #1848 `f09952d` Thanks @bcakmakoglu! - Add ease option to viewport altering functions. - #1851 `0e6865b` Thanks @bcakmakoglu! - Ad
#1848 f09952d Thanks @bcakmakoglu! - Add ease option to viewport altering functions.
#1851 0e6865b Thanks @bcakmakoglu! - Add interpolate option to viewport transforming functions
## What's Changed ### Patch Changes - #1842 `dc66c85` Thanks @bcakmakoglu! - Allow multi-select when input is focused. - #1843 `6a2b7e5` Thanks @bcakm
#1842 dc66c85 Thanks @bcakmakoglu! - Allow multi-select when input is focused.
#1843 6a2b7e5 Thanks @bcakmakoglu! - Use whole handle area for snapping.
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.43.1...v1.43.2
## What's Changed ### Patch Changes - #1833 `8eccc19` Thanks @bcakmakoglu! - Add missing vue-flow\_\_container class to marker defs. Full Changelog: h
8eccc19 Thanks @bcakmakoglu! - Add missing vue-flow__container class to marker defs.Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.43.0...v1.43.1
## What's Changed ### Minor Changes - #1820 `2201cdd` Thanks @bcakmakoglu! - Allow passing null or undefined to useNodeConnections options ### Patch C
2201cdd Thanks @bcakmakoglu! - Allow passing null or undefined to useNodeConnections options#1829 a4ea4f7 Thanks @bcakmakoglu! - Subtract container bounds when calculating pointer position.
#1817 0cc4c99 Thanks @bcakmakoglu! - Add aria-hidden to markers
#1830 110acf1 Thanks @bcakmakoglu! - Fall back to using changedTouches when passing a touchend or touchcancel event to getEventPosition.
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.42.5...v1.43.0
## What's Changed ### Patch Changes - #1807 `60482cf` Thanks @bcakmakoglu! - Prevent keypress events from being swallowed when a button element is foc
60482cf Thanks @bcakmakoglu! - Prevent keypress events from being swallowed when a button element is focused.Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.42.4...v1.42.5
## What's Changed ### Patch Changes - #1794 `e0bb46e` Thanks @bcakmakoglu! - Use null as fallback id for edge source handle - #1796 `978b896` Thanks @
#1794 e0bb46e Thanks @bcakmakoglu! - Use null as fallback id for edge source handle
#1796 978b896 Thanks @bcakmakoglu! - Remove edgelookup update when updating connection lookup as edge lookup is computed already
#1796 a6a3000 Thanks @bcakmakoglu! - Reset drag items on drag end
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.42.3...v1.42.4
## What's Changed ### Patch Changes - #1789 `f4fc254` Thanks @bcakmakoglu! - Unwrap ref when checking if connection in progress. Full Changelog: https
f4fc254 Thanks @bcakmakoglu! - Unwrap ref when checking if connection in progress.Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.42.2...v1.42.3
## What's Changed ### Patch Changes - #1781 `a14d16d` Thanks @bcakmakoglu! - Prevent removal of handle bounds when is unmounted. - #1776 `41bed0c` Tha
#1781 a14d16d Thanks @bcakmakoglu! - Prevent removal of handle bounds when <Handle> is unmounted.
#1776 41bed0c Thanks @bcakmakoglu! - Prevent pane click event when connection is in progress.
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.42.1...v1.42.2
## What's Changed ### Patch Changes - #1749 `56eb94e` Thanks @bcakmakoglu! - Correct connection keys. Full Changelog: https://github.com/bcakmakoglu/v
56eb94e Thanks @bcakmakoglu! - Correct connection keys.Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.42.0...v1.42.1
## What's Changed ### Minor Changes - #1729 `8a832f1` Thanks @bcakmakoglu! - Use connection lookup to check what elements should be selected by a user
#1729 8a832f1 Thanks @bcakmakoglu! - Use connection lookup to check what elements should be selected by a user selection box.
#1729 d4a6910 Thanks @bcakmakoglu! - Add useNodeConnections composable
#1742 b1e2f57 Thanks @bcakmakoglu! - Inherit attributes on main edge path element in BaseEdge component.
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.41.7...v1.42.0
useNodeConnections composable (#1728) (268ed0e)## What's Changed ### Patch Changes - #1726 `763d122` Thanks @bcakmakoglu! - use center position of handle as snapping point for connection lines
763d122 Thanks @bcakmakoglu! - use center position of handle as snapping point for connection lines## What's Changed ### Patch Changes - #1705 `047ec99` Thanks @bcakmakoglu! - Update sourceNode and targetNode properties of edge when using updateEdge
#1705 047ec99 Thanks @bcakmakoglu! - Update sourceNode and targetNode properties of edge when using updateEdge.
#1698 7cc1c5a Thanks @bcakmakoglu! - Prevent default scrolling behavior when using arrow keys to move nodes or a selection.
#1707 4c9e517 Thanks @bcakmakoglu! - Allow Control key as pan activation key code.
#1707 4c9e517 Thanks @bcakmakoglu! - Check panOnDrag for allowed drag buttons in d3 filter
#1707 4c9e517 Thanks @bcakmakoglu! - Prevent browser context menu when triggering pane context menu event.
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.41.5...v1.41.6
## What's Changed ### Patch Changes - #1680 `b6c500d` Thanks @bcakmakoglu! - check if event on drag end is mouse/touch event or a usedrag event - #169
#1680 b6c500d Thanks @bcakmakoglu! - check if event on drag end is mouse/touch event or a usedrag event
#1696 249efce Thanks @bcakmakoglu! - Properly release key combinations when one of the keys is unpressed
#1693 f28ffba Thanks @bcakmakoglu! - Allow using the + key in key combinations
#1695 b09ad8e Thanks @bcakmakoglu! - Escape node labels and avoid rendering them as innerHTML
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.41.4...v1.41.5
0 (#1692) (129d543)## What's Changed ### Patch Changes - #1670 `4bc7658` Thanks @bcakmakoglu! - if selection key code is true prevent pan on drag on left mouse btn Full
4bc7658 Thanks @bcakmakoglu! - if selection key code is true prevent pan on drag on left mouse btnFull Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.41.3...v1.41.4
## What's Changed ### Patch Changes - #1662 `a41bd7b` Thanks @bcakmakoglu! - Reorder pane class names to allow dragging cursor when selection mode is
#1662 a41bd7b Thanks @bcakmakoglu! - Reorder pane class names to allow dragging cursor when selection mode is permanently enabled
#1667 e51f08c Thanks @bcakmakoglu! - Set isPressed to true if permanent keypress is enabled
#1662 a41bd7b Thanks @bcakmakoglu! - Allow pan on drag when selectionKeyCode is true but panOnDrag key is not left mouse btn
#1665 a6ec480 Thanks @bcakmakoglu! - Use all handle bounds when using loose connection mode during edge update
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.41.2...v1.41.3
true (#1662) (fe552fc)isPressed to true on blur and contextmenu events if permant keypress is enabled (#1667) (72e0e2e)## What's Changed ### Patch Changes - #1624 `6692072` Thanks @bcakmakoglu! - Use calculated drag distance to trigger drag-click. - #1618 `1fa90ac` Tha
#1624 6692072 Thanks @bcakmakoglu! - Use calculated drag distance to trigger drag-click.
#1618 1fa90ac Thanks @bcakmakoglu! - Allow node/edge pointer events if mouse event listeners (like nodeClick or edgeClick) exists.
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.41.1...v1.41.2
## What's Changed ### Patch Changes - #1608 `0581cd8` Thanks @bcakmakoglu! - Prevent overwriting width/height in node styles object with node.width/no
#1608 0581cd8 Thanks @bcakmakoglu! - Prevent overwriting width/height in node styles object with node.width/node.height if width/height already exist in the styles object.
Fixes NodeResizer not working when initial size was passed to a node through node.width/node.height.
#1609 81a81fa Thanks @bcakmakoglu! - Prevent drag-click handler when multi selection is active.
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.41.0...v1.41.1
## What's Changed ### Minor Changes - #1595 `9c18037` Thanks @bcakmakoglu! - Add getHandleConnections action to store. ### Patch Changes - #1600 `a3c7
9c18037 Thanks @bcakmakoglu! - Add getHandleConnections action to store.a3c72fe Thanks @bcakmakoglu! - Don't set user selection flags on pointer down, only setting them when pointer is moved to allow pane click events to occur when selectionKeyCode is true (i.e. selection on drag).Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.40.1...v1.41.0
## What's Changed ### Patch Changes - #1591 `5eb677b` Thanks @bcakmakoglu! - Inline event names Full Changelog: https://github.com/bcakmakoglu/vue-flo
5eb677b Thanks @bcakmakoglu! - Inline event namesFull Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.40.0...v1.40.1
## What's Changed ### Minor Changes - #1575 `7aa49f4` Thanks @bcakmakoglu! - Remove null as possible return type of data in useNodesData ### Patch Cha
7aa49f4 Thanks @bcakmakoglu! - Remove null as possible return type of data in useNodesData#1586 f2ed6a3 Thanks @bcakmakoglu! - Only display grab cursor when panOnDrag is on left mouse button
#1585 d7a51f8 Thanks @bcakmakoglu! - Simplify event emits definitions to avoid hitting complexity limit of TS.
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.39.3...v1.40.0
applyChanges with applyDefault (#1574) (876c198)useNodesData (#1575) (1d772af)## What's Changed ### Patch Changes - #1569 `f6b394f` Thanks @bcakmakoglu! - Push into dimensions changes array instead of using index access. Full Ch
f6b394f Thanks @bcakmakoglu! - Push into dimensions changes array instead of using index access.Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.39.2...v1.39.3
## What's Changed ### Patch Changes - #1565 `90f573a` Thanks @bcakmakoglu! - Only capture pointer when a valid selection has started Full Changelog: h
90f573a Thanks @bcakmakoglu! - Only capture pointer when a valid selection has startedFull Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.39.1...v1.39.2
## What's Changed ### Patch Changes - #1562 `e83b1ef` Thanks @bcakmakoglu! - Check if injected vue flow state matches options id, otherwise create new
#1562 e83b1ef Thanks @bcakmakoglu! - Check if injected vue flow state matches options id, otherwise create new state
#1562 e83b1ef Thanks @bcakmakoglu! - Prefer options id over scope id when finding vue flow internal state by id
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.39.0...v1.39.1
## What's Changed ### Minor Changes - #1542 `de75620` Thanks @bcakmakoglu! - Add paneClickDistance option. Allows specifying the distance between mous
#1542 de75620 Thanks @bcakmakoglu! - Add paneClickDistance option. Allows specifying the distance between mousedown and mouseup in which a click would still be registered (by default 0)
#1535 1a812f3 Thanks @bcakmakoglu! - Add autoPanSpeed prop. Allows specifying at what speed the pane moves when auto-panning via node-drag, selection-drag or connection-drag
#1536 235d564 Thanks @github-actions! - Dispatch click if drag move was attempted and threshold was not crossed, ignoring any movement that's too small to be considered a drag at all
#1545 2910992 Thanks @bcakmakoglu! - Prevent calling onSelectionEnd when clicking a selection
#1543 85c8d2d Thanks @bcakmakoglu! - Handle pointer capture for selection on drag
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.38.5...v1.39.0
## What's Changed ### Patch Changes - #1530 `e7bcca5` Thanks @bcakmakoglu! - ignore minor mouse movements when marking a node drag as aborted Full Cha
e7bcca5 Thanks @bcakmakoglu! - ignore minor mouse movements when marking a node drag as abortedFull Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.38.4...v1.38.5
## What's Changed ### Patch Changes - #1525 `e8427cf` Thanks @bcakmakoglu! - Prevent duplicate node click event by checking if drag was actually abort
e8427cf Thanks @bcakmakoglu! - Prevent duplicate node click event by checking if drag was actually aborted before emitting node-clickFull Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.38.3...v1.38.4
## What's Changed ### Patch Changes - #1522 `ccca803` Thanks @bcakmakoglu! - Emit nodeClick event when a node is dragged without exceeding the node dr
ccca803 Thanks @bcakmakoglu! - Emit nodeClick event when a node is dragged without exceeding the node drag threshold (i.e. no visible movement has happened)Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.38.2...v1.38.3
## What's Changed ### Patch Changes - #1517 `d2ec752` Thanks @bcakmakoglu! - Use post flush timing to re-observe node size when toggling node visibili
#1517 d2ec752 Thanks @bcakmakoglu! - Use post flush timing to re-observe node size when toggling node visibility
#1514 6a0813e Thanks @bcakmakoglu! - Avoid re-snapping to the same handle
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.38.1...v1.38.2
## What's Changed ### Patch Changes - #1510 `4643676` Thanks @bcakmakoglu! - Correct calculation of nodes inside selection rect Full Changelog: https:
4643676 Thanks @bcakmakoglu! - Correct calculation of nodes inside selection rectFull Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.38.0...v1.38.1
## What's Changed ### Minor Changes - #1492 `f85ea42` Thanks @bcakmakoglu! - Allow passing event target to useKeyPress - #1492 `f85ea42` Thanks @bcakm
#1492 f85ea42 Thanks @bcakmakoglu! - Allow passing event target to useKeyPress
#1492 f85ea42 Thanks @bcakmakoglu! - Use pointer events to capture interactions on Pane cmp and prevent selections from being cancelled when moving outside of the Pane while holding selection key
#1508 005b25b Thanks @bcakmakoglu! - Use correct end handle position in connection line component and store handle positions during connections.
#1502 30c81dc Thanks @bcakmakoglu! - Allow passing a Record<string, any> as class to node/edge objects
#1502 30c81dc Thanks @bcakmakoglu! - Allow passing an array of strings as class to node/edge objects
#1492 2dff0dd Thanks @bcakmakoglu! - Make useKeyPress public and export it
#1506 45e9d03 Thanks @bcakmakoglu! - Remove v-memo from EdgeRenderer so that edges get their correct z-index applied
#1494 09c32c5 Thanks @bcakmakoglu! - Calculate correct handle position in handle lookup
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.37.1...v1.38.0
useKeyPress public and export it (e435485)until watcher with onMounted in handle cmp (#1488) (cf32d59)useKeyPress (ea75f8a)## What's Changed ### Patch Changes - #1483 `6d4d2be` Thanks @bcakmakoglu! - Correct access of options id in useVueFlow Full Changelog: https://github
6d4d2be Thanks @bcakmakoglu! - Correct access of options id in useVueFlowFull Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.37.0...v1.37.1
## What's Changed ### Minor Changes - #1481 `192b154` Thanks @bcakmakoglu! - Add overloads to useVueFlow. Allows calling useVueFlow with an id string
#1481 192b154 Thanks @bcakmakoglu! - Add overloads to useVueFlow. Allows calling useVueFlow with an id string only while emitting a deprecation warning for using the options obj.
#1476 1b38c3f Thanks @bcakmakoglu! - Use empty array when determing whether to update all node internals
#1479 659ca6a Thanks @bcakmakoglu! - Add EdgePathParams type and export it
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.36.0...v1.37.0
useVueFlow docs (fe55415)## What's Changed ### Minor Changes - #1401 `ebf387e` Thanks @bcakmakoglu! - Remove initialized property from GraphNode type - #1401 `c94e175` Thanks
#1401 ebf387e Thanks @bcakmakoglu! - Remove initialized property from GraphNode type
#1401 c94e175 Thanks @bcakmakoglu! - Remove node intersections from drag event args
#1401 231673e Thanks @bcakmakoglu! - Add updateEdgeData action
#1401 bb6abed Thanks @bcakmakoglu! - Reduce node getBoundingClientRect calls by passing node-bounds directly to getHandleBounds
#1401 30e999a Thanks @bcakmakoglu! - Remove connectedEdges as arg from NodeMouseEvents
#1401 ba6e250 Thanks @bcakmakoglu! - Add useEdgesData composable
408dfea Thanks @bcakmakoglu! - Hide viewport until initial fit view is finishedFull Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.35.0...v1.36.0
useVueFlow options arg (#1465) (70b39cc)## What's Changed ### Minor Changes - #1447 `acd6069` Thanks @bcakmakoglu! - Return non-nullable edge from useEdge - #1447 `acd6069` Thanks @bcakmakog
#1447 acd6069 Thanks @bcakmakoglu! - Return non-nullable edge from useEdge
#1447 acd6069 Thanks @bcakmakoglu! - Use node/edge id as the only dependency to render nodes/edges.
#1446 d8bdac1 Thanks @bcakmakoglu! - Remove visibility (hidden) check from getNodes & getEdges
#1440 a02b9a4 Thanks @bcakmakoglu! - Remove auto-generated hanle-ids and use null as the default handle id.
If you were relying on handle-ids in your code but weren't assigning them explicitly, you'll might need to update your code to handle this change.
By default, if you don't provide a handle-id, it will be null and the first handle of the corresponding type will be used.
#1446 d8bdac1 Thanks @bcakmakoglu! - Render null if edge is hidden
#1433 7547ade Thanks @bcakmakoglu! - Add edgeId to handle connection objects returned by useHandleConnections
#1450 d64efc6 Thanks @bcakmakoglu! - Replace internally nodeIds/edgeIds array with nodeLookup/edgeLookup map
#1445 64a5162 Thanks @bcakmakoglu! - Render null if node is hidden but render whole list of nodes regardless of visibility
#1449 27ec132 Thanks @bcakmakoglu! - Disable pinch zoom on mobile if zoomToPinch is false
#1448 fe58110 Thanks @bcakmakoglu! - Disable dragging when using multi-touch
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.34.1...v1.35.0
vue-flow__marker on marker defs el (5d3f87f)getNodes & getEdges (cc0b8b6)## What's Changed ## 1.34.1 ### Patch Changes - #1426 `c997a80` Thanks @bcakmakoglu! - Replace array fns with for-loops - #1425 `220c290` Thanks @bcak
#1426 c997a80 Thanks @bcakmakoglu! - Replace array fns with for-loops
#1425 220c290 Thanks @bcakmakoglu! - Use separate prevConnections map in useHandleConnections composable to ensure comparison check is correct and callbacks are executed.
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.34.0...v1.34.1
## What's Changed ### Minor Changes - #1415 `bcb6c38` Thanks @bcakmakoglu! - Add warning when style imports are missing. - #1421 `69631f0` Thanks @bca
#1415 bcb6c38 Thanks @bcakmakoglu! - Add warning when style imports are missing.
#1421 69631f0 Thanks @bcakmakoglu! - Export PanelPositionType
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.33.6...v1.34.0
## What's Changed ### Patch Changes - #1404 `b636853` Thanks @bcakmakoglu! - Prevent auto-pan on connect when it's set to false. Full Changelog: https
b636853 Thanks @bcakmakoglu! - Prevent auto-pan on connect when it's set to false.Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.33.6...v1.33.8
## What's Changed ### Patch Changes - #1378 `58d1a36` Thanks @bcakmakoglu! - Allow wheel events to bubble up to the user if the event is not caught an
58d1a36 Thanks @bcakmakoglu! - Allow wheel events to bubble up to the user if the event is not caught and used by the viewportFull Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.33.6...v1.33.7
dagre with dagrejs/dagre (f1bd5b5)## What's Changed ### Patch Changes - #1375 `0754e79` Thanks @bcakmakoglu! - Pass pathOptions to edges - #1389 `f62f2ca` Thanks @bcakmakoglu! - Preven
#1375 0754e79 Thanks @bcakmakoglu! - Pass pathOptions to edges
#1389 f62f2ca Thanks @bcakmakoglu! - Prevent delete key action inside input field even if modifier is pressed.
#1373 a88cd9e Thanks @bcakmakoglu! - Set ltr on vue flow wrapper
#1374 2821c32 Thanks @bcakmakoglu! - Allow pinch-zoom if preventScrolling is disabled
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.33.5...v1.33.6
source.id with source (#1369) (11229e4)## What's Changed ### Patch Changes - #1356 `b5beac2` Thanks @bcakmakoglu! - Store current Storage instance on vue app to avoid hydration errors. Full
b5beac2 Thanks @bcakmakoglu! - Store current Storage instance on vue app to avoid hydration errors.Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.33.4...v1.33.5
## What's Changed ### Patch Changes - #1346 `376d0ac` Thanks @bcakmakoglu! - Revert extending FlowEmits from separate interfaces for nodes and edges a
376d0ac Thanks @bcakmakoglu! - Revert extending FlowEmits from separate interfaces for nodes and edges as it breaks event definitions for the actual component, causing warnings that the event was emitted by isn't defined.Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.32.1...v1.33.4
## What's Changed ### Patch Changes - #1343 `89b76a1` Thanks @bcakmakoglu! - Use separate interfaces for Edge- and NodeEvents and extend FlowEmit inte
89b76a1 Thanks @bcakmakoglu! - Use separate interfaces for Edge- and NodeEvents and extend FlowEmit interface from them. Fixes edge events overwriting node event definitions when types are created.Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.32.1...v1.33.3
## What's Changed ### Patch Changes - #1338 `f3c09ce` Thanks @bcakmakoglu! - Use nullish check to fallback to default center values in getSmoothstepPa
#1338 f3c09ce Thanks @bcakmakoglu! - Use nullish check to fallback to default center values in getSmoothstepPath
#1339 eb20a0f Thanks @bcakmakoglu! - Check if node dimensions exist in useNodesInitialized
#1335 ed5d104 Thanks @bcakmakoglu! - Remove ref prop from BaseEdge
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.32.1...v1.33.2
ref prop from BaseEdge (ba90a48)useNodesInitialized (3ed91a0)## What's Changed ### Patch Changes - #1329 `9b5d496` Thanks @bcakmakoglu! - Correct return type of useNodesData Full Changelog: https://github.com/bc
9b5d496 Thanks @bcakmakoglu! - Correct return type of useNodesDataFull Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.33.0...v1.33.1
⚠️This is a small breaking change from the previous implementation!
#1323 ed4ccf4 Thanks @bcakmakoglu! - Add node id and node type to return of useNodesData.
⚠️This is a small breaking change from the previous implementation!
Previously you would only receive the data object back, now you will receive an object with the data and the node id and type.
const nodesData = useNodesData(nodeIds);
// Previously
nodesData.forEach((data) => {
// ...
});
// Now
nodesData.forEach(({ id, type, data }) => {
// ...
});
#1326 78a604c Thanks @bcakmakoglu! - Use default cursor for nodes and use grab cursor if node is draggable
#1324 c964220 Thanks @bcakmakoglu! - Prevent esc keypress triggers when keyboard a11y is disabled
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.32.1...v1.33.0
useNodesData (68ba907)useNodesData tests (4666fec)## What's Changed ### Patch Changes - #1314 `14c4253` Thanks @bcakmakoglu! - Correct smoothstep edge pathing Full Changelog: https://github.com/bcakma
14c4253 Thanks @bcakmakoglu! - Correct smoothstep edge pathingFull Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.32.0...v1.32.1
@Lehoczky made their first contribution in https://github.com/bcakmakoglu/vue-flow/pull/1311
#1301 1c8d15e Thanks @github-actions! - Use data obj in default nodes to get label
#1307 290bca3 Thanks @bcakmakoglu! - Add edgeId to useHandleConnections return value
#1301 1c8d15e Thanks @github-actions! - Update composables jsdocs
#1313 ce98113 Thanks @bcakmakoglu! - Wrap edge marker urls with single quotes to allow for css vars as color
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.31.0...v1.32.0
useLayout composable (ce7333f)useNodesInitialized composable (f2165af)edgeId to useHandleConnections return (3a0dc0f)data obj for labels in default nodes (6c638b8)useNodesInitialized to emit nodesInitialized (ffdea45)useViewport to useViewportHelper (300c742)useNodesInitialized test (3fa7fde)```ts const nodeId = useNodeId();
#1271 1e60944 Thanks @github-actions! - Add useNodeId composable
const nodeId = useNodeId();
console.log("nodeId", nodeId); // '1'
#1271 299408f Thanks @github-actions! - Add updateNode action
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 }
);
#1271 eae2118 Thanks @github-actions! - Call onNodesInitialized whenever areNodesInitialized is true instead of only once
#1271 36ffa3f Thanks @github-actions! - Omit events in nodes and edges when returning them from toObject
#1271 85536ed Thanks @github-actions! - Add useHandleConnections composable
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 }
);
#1271 4bce8c9 Thanks @github-actions! - Find handle by id regardless of number of handles that exist
#1271 85536ed Thanks @github-actions! - Add connectionLookup to state
#1271 3b02809 Thanks @github-actions! - Add onInit hook and deprecate onPaneReady
#1271 299408f Thanks @github-actions! - Add updateNodeData action
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 });
#1271 823956e Thanks @github-actions! - Add useNodesData composable
const nodeId = "1";
const data = useNodesData(nodeId);
console.log(data.value); // '[{ /* ... */ }]
const nodeIds = ["1", "2", "3"];
const data = useNodesData(nodeIds);
console.log(data.value); // '[{ /* ... */ }]
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 */ }]
#1271 99fa4fd Thanks @github-actions! - Call fitViewOnInit when initial node dimensions are available
#1271 9f8607f Thanks @github-actions! - Deprecate events property on nodes and edges
#1278 ecff6f6 Thanks @bcakmakoglu! - Add error args to VueFlowError
#1271 3f60a80 Thanks @github-actions! - Replace Array.forEach loops with for...of
#1278 ecff6f6 Thanks @bcakmakoglu! - Export isErrorOfType typeguard to narrow the type of a VueFlowError and infer it's args
#1295 4a5aa14 Thanks @bcakmakoglu! - 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
#1271 bbee266 Thanks @github-actions! - Update node dimensions on next tick
Full Changelog: https://github.com/bcakmakoglu/vue-flow/compare/v1.30.1...v1.31.0
useVueFlow overwriting default state (04658b2)useNodeId composable (00a1f9d)useHandleConnections composable (064cfd8)init hook (fd84025)updateNode & updateNodeData actions to store (fe1d801)useNodesData composable (cecf9d4)useNodesData types (533e37e)empty example (f5b3d83)useNodeId (aab31f8)toObject (72cc175)useOnInitHandler to emit paneReady event (5798cc5)MaybeRefOrGetter to useNodesData (f4fb4d8)null instead of undefined as id for useHandleConnections (7161e9e)areNodesInitialized is true (584782b)fitViewOnInit when node dimensions are initially set (0544fbd)One column per quarter.