1 hours ago
hono

v4.13.19

What's Changed

Full Changelog: https://github.com/honojs/hono/compare/v4.13.18...v4.13.19

1 hours ago
xgplayer

v3.0.28-rc.1

3.0.28-rc.1 (2026-11-16)

Features

  • remove Helvetica Neue font css (15bf4ac)
2 hours ago
xyflow

@xyflow/vue@2.0.0

Major Changes

  • #5891 ca9c2fb - ConnectionLineType and PanelPosition are now re-exported from @xyflow/system, matching @xyflow/react and @xyflow/svelte.

    • The value of ConnectionLineType.SimpleBezier changed from "simple-bezier" to "simplebezier". Using the enum is unaffected; update raw "simple-bezier" strings.
    • The PanelPosition enum and the PanelPositionType union are replaced by the PanelPosition string union (e.g. "top-left"). It also accepts "center-left" and "center-right".
  • #5891 ca9c2fb - Rename container classes to match @xyflow/react and @xyflow/svelte. Update custom CSS or DOM queries that use them:

    • .vue-flow__transformationpane → .vue-flow__viewport
    • .vue-flow__viewport → .vue-flow__renderer
    • .vue-flow__edge-labels → .vue-flow__edgelabel-renderer
  • #5891 ca9c2fb - Use the same CSS variables and stylesheets as @xyflow/react and @xyflow/svelte.

    • --vf-* variables are replaced by --xy-* variables, e.g. --vf-node-bg → --xy-node-background-color, --vf-node-text → --xy-node-color, --vf-handle → --xy-handle-background-color, --vf-edge-text → --xy-edge-label-color. Node border, box-shadow and handle color are now separate variables instead of one --vf-node-color.
    • theme-default.css is removed. Import style.css for the default theme, or base.css for the structural styles only.
    • The built-in input/output nodes no longer have blue/pink accents.
  • #5896 02607f9 - edgesReconnectable and elevateEdgesOnSelect now default to true.

    Edges are reconnectable by default (this only takes effect once you handle @reconnect), and selected edges are raised above their siblings. To keep the previous behavior, set :edges-reconnectable="false" and/or :elevate-edges-on-select="false" on <VueFlow>.

  • #5891 ca9c2fb - Align connection and reconnect event payloads with @xyflow/react and add a selectionChange event.

    • connectEnd / clickConnectEnd emit { event, connectionState } instead of the bare event.
    • reconnectStart emits { event, edge, handleType } and reconnectEnd emits { event, edge, handleType, connectionState }.
    • New selectionChange event (@selection-change / onSelectionChange) emits { nodes, edges } when the selection changes.
  • #5891 ca9c2fb - Rename fitViewOnInit to fitView and add a fitViewOptions prop for the initial fit. The nodeOrigin prop, which was previously ignored, is now applied.

  • #6114 dff4dad - Align the connection APIs across all frameworks on NodeConnection.

    • Remove getHandleConnections. Use getNodeConnections({ nodeId, type, handleId }) instead: id is renamed to handleId and type is optional.
    • Add getNodeConnections to useSvelteFlow.
    • HandleConnection type removed: use NodeConnection instead.
  • #5891 ca9c2fb - Align the package exports with @xyflow/react and @xyflow/svelte:

    • ESM types resolve from index.d.mts and CJS types from index.d.ts, fixing type resolution under node16/nodenext.
    • Stylesheets can be imported as @xyflow/vue/style.css, @xyflow/vue/base.css and @xyflow/vue/xy-theme.css.
    • The IIFE / browser-global build (vue-flow-core.iife.js) and the unpkg/jsdelivr fields are removed. CDN users should load the ESM build (e.g. via esm.sh).
  • #5891 ca9c2fb - Align core types with @xyflow/system. Node and Edge are now built on the system NodeBase/EdgeBase, and the store and its types take an EdgeType generic next to NodeType (useVueFlow<NodeType, EdgeType>()).

    Old New
    node.parentNode node.parentId
    node.computedPosition node.internals.positionAbsolute (+ node.internals.z)
    node.dimensions node.measured
    node.handleBounds node.internals.handleBounds
    node.isParent useVueFlowStore().parentLookup.get(node.id)?.size > 0
    node.label node.data.label
    NodeProps<MyData> NodeProps<Node<MyData, "myType">>
    EdgeProps<MyData> EdgeProps<Edge<MyData, "myType">>
    NodeDimensionChange.updateStyle NodeDimensionChange.setAttributes
    NodePositionChange.from NodePositionChange.positionAbsolute
    NodeAddChange.item: GraphNode / EdgeAddChange.item: GraphEdge Node / Edge
    EdgeRemoveChange.{source,target,sourceHandle,targetHandle} read the edge via getEdge(id)
    @pane-ready / onPaneReady @init / onInit
    <VueFlow v-model="elements"> <VueFlow v-model:nodes="nodes" v-model:edges="edges">
    setElements, getElements, getSelectedElements setNodes/setEdges, getNodes/getEdges, getSelectedNodes/getSelectedEdges
    addSelectedElements, removeSelectedElements addSelectedNodes/addSelectedEdges, removeSelectedNodes/removeSelectedEdges

    Custom node components now also receive selectable, deletable, draggable, isConnectable, positionAbsoluteX, positionAbsoluteY and parentId as props. NodeDragItem uses the system shape.

  • #6046 e0be409 - The <Background> pattern is now colored by the stylesheet rather than by an inline fill/stroke. Previously the color was resolved in JS from a hardcoded { lines: "#eee", dots: "#91919a" }.

    If you relied on those hardcoded light colors, pass them explicitly: <Background color="#91919a" /> for dots, <Background variant="lines" color="#eee" /> for lines.

  • #5890 72dbb75 - The nodes/edges binding now determines how changes are handled, and the applyDefault prop is removed.

    • v-model:nodes / v-model:edges (or no binding at all, when driving the flow through useVueFlow()/setupVueFlow()) is managed: Vue Flow applies changes to its store and mirrors them back to your ref.
    • A bare one-way :nodes / :edges is controlled: changes are delivered via @nodes-change / @edges-change and nothing is applied until you handle them (apply them and reassign your array).
  • #5891 ca9c2fb - Type the class property as ClassValue (string | Record<string, boolean> | ClassValue[], mirroring the Vue class-binding type) on Node, Edge and the connectionLineClass prop, replacing the looser string | string[] | Record<string, any>.

    The function form for class and style ((el) => value) is removed. It was never part of the public type — only a dead runtime branch in the node/edge wrappers — and passing a function produced a broken native render anyway. Pass a resolved ClassValue / style object instead (compute it in your own component if it needs to be dynamic).

  • #6117 dae45aa - onConnectEnd and onReconnectEnd now receive to in flow coordinates instead of screen coordinates

  • #6049 15da095 - The connectionLineOptions object of <VueFlow> is replaced by individual props.

    before after
    connectionLineOptions.type connectionLineType
    connectionLineOptions.style connectionLineStyle
    connectionLineOptions.class connectionLineClass
    connectionLineOptions.markerStart connectionLineMarkerStart
    connectionLineOptions.markerEnd connectionLineMarkerEnd

    The ConnectionLineOptions type is removed.

  • #5891 ca9c2fb - Custom connection lines (#connection-line slot) receive from*/to* props instead of source*/target* (sourceX → fromX, targetHandle → toHandle, …), matching @xyflow/react. markerStart/markerEnd are optional.

    The ElementData type is removed. Edge data now defaults to Record<string, unknown>.

  • #6049 15da095 - The connection status is now applied to the group of the connection line rather than its path.

  • #5891 ca9c2fb - Expose the raw pointer position during a connection:

    • Custom connection-line components (#connection-line) now receive a pointer prop — the unsnapped pointer position in flow coordinates, distinct from toX/toY (which snap to the hovered handle).
    • useConnection().pointer is now the raw pointer position. Previously it tracked the snapped end (it was aliased to connection.to); the snapped end is still available via to / toHandle.
  • #5898 903cd43 - The store now exposes the ongoing connection as a single connection object (ConnectionState), replacing the separate connectionStartHandle, connectionEndHandle, connectionPosition, and connectionStatus fields. Read connection.fromHandle, connection.toHandle, connection.pointer, and connection.isValid instead — this matches useConnection() and React/Svelte Flow.

  • #6050 bf75d26 - Rename the fitViewParams prop of <Controls> to fitViewOptions.

  • #5903 b507faa - isValidConnection now receives only the attempted connection, matching IsValidConnection in React and Svelte Flow. The extra second argument ({ nodes, edges, sourceNode, targetNode }) is removed, read those from useVueFlow() inside your handler if you need them.

  • #5893 825e6c2 - Removed the autoConnect prop and the Connector type. Handle new connections with @connect (or onConnect) and addEdge/addEdges instead:

    <VueFlow @connect="(connection) => (edges = addEdge(connection, edges))" />
  • #5906 b2ceddc - Removed the per-edge template option (edge.template). Use edge slots or map an edge type to a component via the edgeTypes prop instead.

  • #5901 4675bdd - Removed the internal initialized store flag. It only guarded a redundant empty commit during store construction and was always true by the time your code ran. Use nodesInitialized or viewportInitialized to check readiness.

  • #5891 ca9c2fb - Remove the redundant viewportHelper ComputedRef from the useVueFlow() instance. The viewport functions (setCenter, fitView, zoomIn, zoomOut, zoomTo, setViewport, getViewport, fitBounds, screenToFlowPosition, flowToScreenPosition) are already exposed flat on the instance so the nested viewportHelper was duplicate surface.

    • useVueFlow().viewportHelper.value.setCenter(…) → useVueFlow().setCenter(…) (and likewise for the other viewport functions).
    • The init flag moves to a flat viewportInitialized (ComputedRef<boolean>): useVueFlow().viewportHelper.value.viewportInitialized → useVueFlow().viewportInitialized.value.
  • #5895 0ddd0b3 - Removed the $destroy method from the Vue Flow instance. It was a no-op — the store is owned by its provider component and torn down automatically when that component unmounts.

  • #5891 ca9c2fb - Add the selectable class to edges. The edge <g> now carries a selectable class whenever the edge is selectable (its own selectable flag, or elementsSelectable when unset), and the CSS keys cursor: pointer and the focus edge-path stroke off .selectable. Previously cursor: pointer was applied to every edge unconditionally, so non-selectable edges no longer show the pointer cursor.

  • #5891 ca9c2fb - Edges are stored as your plain Edge objects and the edge, connection and viewport APIs are aligned with @xyflow/react and @xyflow/svelte.

    • GraphEdge and isGraphEdge are removed. getEdges/getEdge/v-model:edges return plain Edges, so edge.sourceNode, edge.targetNode and edge.sourceX are gone. Use useInternalNode(() => props.source) and the positions from EdgeProps.
    • In-place edge mutation is no longer reactive. Use updateEdge, updateEdgeData or setEdges.
    • EdgeProps drops sourceNode/targetNode, adds selectable/deletable and exposes sourceHandleId/targetHandleId.
    • useEdge().edge is now a ComputedRef.
    • defaultEdgeOptions are applied when rendering instead of being written onto stored edges.
    • useConnection() returns a ComputedRef<ConnectionState> (inProgress, isValid, from*, to*, pointer).
    • connectionMode defaults to strict. Set connection-mode="loose" for the old behavior.
    Old New
    findNode / findEdge getNode / getEdge
    screenToFlowCoordinate / flowToScreenCoordinate screenToFlowPosition / flowToScreenPosition
    project screenToFlowPosition
    updateEdge(oldEdge, connection) reconnectEdge(oldEdge, connection)
    @edge-update-start / @edge-update / @edge-update-end @reconnect-start / @reconnect / @reconnect-end
    edgeUpdaterRadius / edgesUpdatable / edge.updatable reconnectRadius / edgesReconnectable / edge.reconnectable
    EdgeUpdatable / EdgeUpdateEvent EdgeReconnectable / EdgeReconnectEvent

    New: updateEdge(id, edgeUpdate, { replace? }) for partial edge updates, and useInternalNode is exported.

  • #5914 5a8ed98 - Fix the useKeyPress preventDefault option, which was inverted. It now calls preventDefault() by default and only skips it when set to false — previously preventDefault: true was what disabled it. The default behavior is unchanged; if you explicitly set this option, flip the value.

  • #5927 69dc311 - Use 5% as new default padding for fitView, and fitBounds.

  • #5891 ca9c2fb - nodeLookup, parentLookup and edgeLookup are now reactive Maps instead of ComputedRefs. Read them from useVueFlowStore() without .value:

    - useVueFlow().nodeLookup.value.get(id)
    + useVueFlowStore().nodeLookup.get(id)
  • #5891 ca9c2fb - Remove the deprecated useHandleConnections composable. Use useNodeConnections instead: type → handleType, id → handleId and nodeId → id.

    // before
    useHandleConnections({ type: "target", id: "a", nodeId: "1" })
    // after
    useNodeConnections({ handleType: "target", handleId: "a", id: "1" })
  • #6048 022cbc3 - <MiniMap> now colors itself through --xy-minimap-*-props custom properties instead of inline attributes.

  • #5891 ca9c2fb - Remove the deprecated updateEdge util (use reconnectEdge) and useZoomPanHelper (use the viewport functions on useVueFlow()). addEdge now takes an edges array instead of mixed elements: addEdge(connection, edges).

  • #5891 ca9c2fb - Node events (click, mouse, context menu, drag, selection drag, minimap node events and nodesInitialized) now emit the user Node instead of the InternalNode. Use getInternalNode(node.id) to read internals or measured.

  • #5891 ca9c2fb - Align node extent typing with @xyflow/system:

    • Collapse the local CoordinateExtent type onto the one from @xyflow/system (they were identical) — it is now re-exported from @xyflow/system.
    • Remove CoordinateExtentRange and the per-node "clamp to parent with padding" extent form (extent: { range, padding }). node.extent and the nodeExtent prop now accept exactly what the system understands: "parent" | CoordinateExtent | null. Use extent: "parent" to clamp a child to its parent. This drops a vue-flow-only workaround that could not be cleanly typed against @xyflow/system; if padded clamping returns it will be a system-level feature. To inset from the parent in the meantime, apply the offset yourself.
  • #5891 ca9c2fb - Split nodes into the user-facing Node and the InternalNode (formerly GraphNode), matching @xyflow/react and @xyflow/svelte. v-model:nodes, getNodes, getNode and getSelectedNodes return the plain nodes you passed in. Read internals (absolute position, z-index, handle bounds) and measured via getInternalNode(id), useInternalNode(id) or nodeLookup.

    • In-place node mutation (node.position = …, node.data.x = …) is no longer reactive. Use updateNode, updateNodeData or setNodes.
    • Nodes are no longer filled with defaults: a node without data keeps data: undefined (previously {}), and selected/dragging stay undefined until set.
  • #6115 b1ad016 - Replace paneClickDistance with paneDragThreshold (default 1). Like nodeDragThreshold, the pane only starts panning or selecting once the pointer has moved further than the threshold; otherwise it counts as a click. Works with every mouse button.

  • #5891 ca9c2fb - toObject() no longer returns the deprecated position and zoom fields. Use viewport ({ x, y, zoom }) instead.

  • #5891 ca9c2fb - Remove useVueFlow().fromObject() and the FlowImportObject type.

    toObject() is unchanged. To restore a saved flow, set the elements and viewport yourself from onInit (or any time after mount):

    const { setNodes, setEdges, setViewport, onInit } = useVueFlow()
    
    onInit(() => {
      const flow = JSON.parse(localStorage.getItem("flow") ?? "null")
      if (!flow) {
        return
      }
    
      setNodes(flow.nodes)
      setEdges(flow.edges)
    
      if (flow.viewport) {
        setViewport(flow.viewport)
      }
    })
  • #5556 9fcddb8 - Remove nodeClickDistance. Whether a click on a node fires is now determined solely by whether a drag actually moved the node: clicks are suppressed only after a drag changed node positions. Use nodeDragThreshold (and snapGrid) to control this.

  • #6085 fc128ca - Removed getNodeTypes and getEdgeTypes from useVueFlow(). Node and edge components now resolve from the registered types directly; read nodeTypes/edgeTypes off useVueFlowStore() if you need the registered map.

  • #5891 ca9c2fb - Remove the vueFlowVersion field from the flow instance (useVueFlow().vueFlowVersion) and the build-time __VUE_FLOW_VERSION__ injection. It was exposed but never used internally and has no equivalent in xyflow/react; read your installed version from your package manager or @xyflow/vue/package.json instead.

  • #5987 615c5f6 - Rename the measured handle geometry type from Handle to HandleBounds so it no longer collides with the <Handle /> component.

  • #5911 0d330e0 - Renamed the $reset instance action to reset.

  • #5891 ca9c2fb - Remove the global flow registry. useVueFlow() no longer accepts an id or options. It returns the store of the nearest <VueFlow> or <VueFlowProvider> and throws outside of one.

    • useVueFlow({ nodes, edges, … }) → pass these as props to <VueFlow>.
    • useVueFlow("my-id") to access a flow from outside → wrap both in <VueFlowProvider> and call useVueFlow() inside it.

    The id prop is now only used as a label (aria/debug), not to look up a flow.

  • #5891 ca9c2fb - Add an explicit selectionOnDrag prop and drop the selectionKeyCode={true} overload.

    Drawing a selection box on a plain pane drag (no key held) used to be expressed by setting selectionKeyCode to true, which overloaded the key-code prop. It is now its own boolean prop:

    <!-- before -->
    <VueFlow :selection-key-code="true" :pan-on-drag="false" />
    <!-- after -->
    <VueFlow :selection-on-drag="true" :pan-on-drag="false" />

    selectionKeyCode is once again just the key you hold to select (default "Shift"). paneClick also fires while selecting on drag (it was previously swallowed by the d3-zoom click handling).

  • #5927 7b52b50 - Numbers passed to fitViewOptions.padding are interpreted as pixel values instead of legacy units. Use percentage values instead (0.1 ≈ 4.5%, 0.5 ≈ 16.7%, 1 ≈ 25%, 2 ≈ 33%)

  • #5891 ca9c2fb - Use the parent expansion of @xyflow/system for expandParent nodes when dragging, measuring and resizing, matching @xyflow/react:

    • A child dragged past the top/left edge of its parent now grows the parent up/left, and its siblings are offset so they stay in place.
    • node.origin is respected when a resize expands the parent.
    • Keyboard moves of nodes with an extent no longer stop a full node width/height short of the boundary.
  • #5887 1d34f03 - HandleElement is removed in favor of HandleBounds, and EdgePositions in favor of EdgePosition. The <Handle> props connectableStart/connectableEnd are renamed to isConnectableStart/isConnectableEnd, OnConnectStartParams fields are now nullable, and the deprecated Project type is no longer re-exported.

  • #6136 1262688 - updateNodeInternals(id) requires a node id or an array of ids; the no-argument form (which re-measured every node) is removed.

  • #5900 ec0405e - useNode now returns the user-facing Node instead of the enriched InternalNode — use useInternalNode for internals/measured. Its id argument also accepts a ref or getter, matching useInternalNode.

  • #5891 ca9c2fb - useHandle now uses XYHandle from @xyflow/system, so drag-to-connect (auto-pan, connection radius, closest-handle resolution, drag threshold) behaves like @xyflow/react and @xyflow/svelte. Its reconnect options are renamed: edgeUpdaterType → reconnectHandleType, onEdgeUpdate → onReconnect, onEdgeUpdateEnd → onReconnectEnd, and onReconnectStart is added.

  • #5891 ca9c2fb - - Rename the nodeId param to id (useNodeConnections({ nodeId }) → useNodeConnections({ id })). Like before, it is optional and falls back to the node id from the useNodeId context injection.

    • handleId now requires handleType to be set. Passing handleId on its own is a type error — handleId is meaningless at runtime without a handleType, and the type now points you at the fix. Runtime behavior is unchanged.
  • #5891 ca9c2fb - Split the store API. useVueFlow() now returns the flow instance (actions, computed getters and event hooks like onNodeClick or onConnect) and no longer exposes the raw reactive state. The state moved to useVueFlowStore(), with storeToRefs() to destructure it (Pinia-style).

    // before
    const { nodes, transform, nodeLookup, setViewport, onConnect } = useVueFlow()
    
    // after
    const { setViewport, onConnect } = useVueFlow()
    const store = useVueFlowStore()                  // reactive state (store.nodes, store.transform — no .value)
    const { nodes, transform } = storeToRefs(store)  // refs for destructuring
    const { nodeLookup } = useVueFlowStore()         // lookup Maps can be destructured directly
    • useVueFlowStore() returns the reactive state object, including the nodeLookup/parentLookup/edgeLookup/connectionLookup Maps. Reading it inside a computed, watch or template is tracked.
    • storeToRefs(store) turns the state fields into refs so destructuring stays reactive.
    • Computed getters (getNodes, getEdges, getSelectedNodes, getSelectedEdges, viewport) and all event hooks stay on useVueFlow().

    A <VueFlow> template ref now exposes the instance (VueFlowInstance). The VueFlowStore type is kept as an alias of VueFlowInstance.

  • #5891 ca9c2fb - Add ease and interpolate options to every viewport function. fitView, setViewport, setCenter, fitBounds, zoomTo, zoomIn and zoomOut now accept ease?: (t: number) => number and interpolate?: "smooth" | "linear" alongside duration to control the transition curve.

    The viewport option types now come from @xyflow/system:

    • FitViewParams → FitViewOptions (FitViewOptionsBase from @xyflow/system). Its nodes option takes node objects instead of ids — nodes?: string[] → nodes?: (Node | { id: string })[] — and the vestigial offset option is removed (superseded by padding).
    • TransitionOptions → ViewportHelperFunctionOptions.
  • #6052 1afef23 - Require Vue ^3.5.27 (peer dependency of vue and @vue/reactivity). The default flow id is now generated with useId(), and earlier 3.5 releases cannot resolve @xyflow/system types in defineProps (vuejs/core#14236).

  • #6077 f062cfb - Remove the array-based applyChanges, applyNodeChanges and applyEdgeChanges exports, and applyNodeChanges/applyEdgeChanges on the useVueFlow() instance. Use applyTo(elements) of the changeset instead.

Minor Changes

  • #5891 ca9c2fb - fitView and fitBounds now accept Padding from @xyflow/system: per-side values and px / % units in addition to a number. Padding, PaddingWithUnit and PaddingUnit are re-exported.

  • #5891 ca9c2fb - Add an ariaLabelConfig prop to customize the accessibility text. Pass a Partial<AriaLabelConfig> (merged over the defaults) to override any of the node/edge a11y descriptions, the aria-live "moved node" message, and the Controls / MiniMap / Handle aria labels. As part of this, the Controls buttons and Handle — which previously had no aria-label — now get accessible labels, the Controls panel gets a Control Panel label, and the MiniMap label default moves into the config. AriaLabelConfig is re-exported from the package root.

  • #5891 ca9c2fb - Allow theming arrowhead markers with the --xy-edge-stroke CSS variable. defaultMarkerColor now accepts null — pass it (or leave the color of a marker unset) and the arrowhead inherits --xy-edge-stroke instead of the hard-coded #b1b1b7, so markers can match themed edge colors. The marker polylines carry .arrow / .arrowclosed classes and only set an inline color when one is provided; the open arrow strokes only, the closed arrow strokes and fills. The default (#b1b1b7) is unchanged.

  • #5891 ca9c2fb - Add autoPanOnNodeFocus (default true), mirroring xyflow/react. When a node receives keyboard focus (Tab) and is not within the viewport, the viewport pans to center it — so keyboard navigation never lands on an off-screen node. Only reacts to keyboard focus (:focus-visible), not pointer/programmatic focus. Set auto-pan-on-node-focus="false" (or pass false) to disable.

  • #5891 ca9c2fb - Add an autoPanOnSelection prop. When true (the default), the viewport pans automatically as the cursor reaches the edge of the viewport while dragging a selection box, so you can select nodes beyond the visible area in one gesture. Set :auto-pan-on-selection="false" to keep the viewport fixed during selection.

  • #6046 e0be409 - Add bgColor and patternClassName props to <Background>. color and bgColor are applied as the --xy-background-pattern-color-props and --xy-background-color-props custom properties.

  • #6046 e0be409 - Add the cross background variant.

  • #5891 ca9c2fb - Add a dark theme. The flow follows the system color scheme by default. Use the forceColorMode prop ("light" | "dark") to pin it.

  • #5891 ca9c2fb - Add a connectionDragThreshold prop. It is the distance in pixels the pointer must move from a handle before a connection line starts to drag — useful to prevent accidental connections when you just click a handle. Defaults to 1; set it higher (e.g. connectionDragThreshold="25") to require a more deliberate drag, or 0 to start the connection immediately on pointer-down. Below the threshold, neither connectStart nor connectEnd fires.

  • #6049 15da095 - Add connectionLineContainerStyle prop, applied to the <svg> the connection line is drawn in.

  • #5891 ca9c2fb - Add a controlled viewport prop with v-model:viewport support, matching the controlled viewport of @xyflow/react and bind:viewport of @xyflow/svelte.

    <VueFlow v-model:viewport="viewport" />

    The bound value two-way binds to the viewport of the flow: setting it pans/zooms the flow (applied via syncViewport, so no extra pan/zoom events fire), and it updates as the user interacts (via update:viewport). defaultViewport remains the uncontrolled initial-viewport prop; use viewport when you want to own the viewport state.

  • #6048 022cbc3 - Add an orientation prop to <Controls> ("vertical" | "horizontal", default "vertical").

  • #5910 87108d3 - Added a debug prop. When true, Vue Flow logs its events to the console as they fire (high-frequency events like move/drag/hover are skipped) — useful for seeing which events run.

  • #5939 621f5d9 - Add changeParent to useReactFlow, useSvelteFlow and useVueFlow, to easily change the parent of a node without calculating a new position.

  • #5891 ca9c2fb - Discriminate the #node-<type> / #edge-<type> slot props by node/edge type. When nodes/edges are typed as a discriminated union (e.g. (MyNodeA | MyNodeB)[]), each #node-<type> / #edge-<type> slot now narrows its props to the NodeProps / EdgeProps of the matching variant, so a custom node/edge component can safely type its data without a cast. Generic Node[] / Edge[] flows are unchanged (props stay broad), and arbitrary slot names remain allowed (a broad node-${string} / edge-${string} fallback). Type-only.

  • #5905 a5753cd - Tightened the edge label type. Dropped the catch-all object from EdgeProps and EdgeTextProps so it matches the actual label type of edges (string | VNode | Component).

  • #6050 bf75d26 - Export ControlButtonProps and ControlButtonEmits types.

  • #6050 d61a36a - Export getEdgeCenter, along with the GetBezierPathParams, GetSmoothStepPathParams and GetStraightPathParams parameter types.

  • #5844 861a6be - Exported styles now live in @layer xyflow.

  • #5891 ca9c2fb - Move Background, Controls, MiniMap, NodeResizer, NodeResizeControl, and NodeToolbar components into core pkg.

  • #6048 022cbc3 - Add a bgColor prop to <MiniMap>, applied as the --xy-minimap-background-color-props custom property.

  • #5891 ca9c2fb - Add an autoScale prop to NodeResizer / NodeResizeControl. Handle controls already scale up by Math.max(1 / zoom, 1) so they do not shrink below their base size when zooming out; autoScale (default true) now lets you opt out, previously the prop existed but had no effect. The handle is also centered via the translate CSS property instead of transform, so the centering composes with the zoom scale and the handle stays pinned to the node corner at any zoom.

  • #6050 f94dad9 - Add a resizeDirection prop to <NodeResizeControl> ("horizontal" | "vertical"). When set, the control only resizes the node along that axis; left unset it resizes in any direction, as before.

  • #5891 ca9c2fb - Add the onBeforeDelete prop and the deleteElements action. deleteElements({ nodes, edges }) also removes child nodes and connected edges, and resolves to { deletedNodes, deletedEdges }. onBeforeDelete runs before the Delete key and deleteElements remove anything: return false to cancel, true to continue or { nodes, edges } to delete a subset.

  • #5993 901b0e4 - Add xy-theme.css stylesheet (@xyflow/<lib>/xy-theme.css) that ships the xyflow default theme on top of base.css.

  • #5891 ca9c2fb - Add a stepPosition option to smooth-step / step edges. Set pathOptions.stepPosition (0 = bend at source, 1 = at target, 0.5 = midpoint, the default) to control where the edge bends along its path. The path math comes from getSmoothStepPath from @xyflow/system; the SmoothStepEdge component now forwards the option to it.

  • #5891 ca9c2fb - ConnectionLineProps, RemoveNodes, RemoveEdges and IsNodeIntersecting now take the NodeType/EdgeType of the flow, so custom connection lines and updater functions get typed nodes and edges.

  • #5904 1e7fa6b - Tightened BaseEdgeProps.label from any to string | VNode | Component<EdgeTextProps>, matching the actual label type of edges.

  • #5882 3334af0 - Add nodesDelete, edgesDelete, and delete events, matching @xyflow/react (onNodesDelete/onEdgesDelete/onDelete) and @xyflow/svelte (ondelete). They fire from deleteElements (the choke point for both the delete key and programmatic deletion) after onBeforeDelete has resolved the removed set — edgesDelete with the removed edges, nodesDelete with the removed nodes (each only when non-empty), and delete with { nodes, edges } whenever anything was removed. Also exports the OnDelete handler type alongside OnBeforeDelete.

  • #5914 96bfd42 - <VueFlowProvider> now accepts the same options as setupVueFlow() to seed its store — pass nodes, edges, or any other VueFlowProps and they become the initial values of the store. The seed is read once when the store is created.

Patch Changes

  • #6046 e0be409 - Correct the pattern offset of <Background>, which was calculated as offset * zoom || 1 + gap / 2. That parses as offset * zoom || (1 + gap / 2), so with the default offset of 0 the pattern sat one pixel off.

  • #5891 ca9c2fb - Clear the visual nodes-selection box when no selected nodes remain. nodesSelectionActive only ever turns on via a user drag-select, but it could get stuck true after the selected nodes were removed (e.g. deleted) — so a later programmatic select would wrongly render the NodesSelection rect around an unrelated node. Re-adopting nodes now turns it back off whenever the selection is empty.

  • #6085 fc128ca - Improve rendering performance, especially while dragging large selections:

    • Node drag updates are batched to one per animation frame.
    • Nodes, edges and the <MiniMap> re-render less during drags.
    • removeSelectedNodes / removeSelectedEdges only emit changes for elements that are actually selected.
    • Built-in edges no longer render their props (source, sourceX, animated, …) as attributes on the <path>, and EdgeText no longer re-measures its label on every position change.
  • #5945 7e4c422 - EdgeWrapper now computes edge positions with getEdgePosition from @xyflow/system (as @xyflow/react and @xyflow/svelte do) instead of a hand-rolled copy. It returns null when a node is not initialized or a handle cannot be resolved, so an edge between nodes that render no <Handle> draws nothing instead of a phantom line to the bounding box of the node. This also aligns handle resolution across connection modes with the other packages.

  • #5914 a86e6e5 - Dev warnings now link to the matching entry in the error reference, e.g. Help: https://vueflow.dev/error#NODE_TYPE_MISSING.

  • #5891 ca9c2fb - Fix the includeHiddenNodes option of fitView being ignored.

  • #5891 ca9c2fb - Defer an imperative fitView() until the nodes are measured. A fitView() call made before the nodes settle — e.g. right after addNodes() — used to frame only the already-measured nodes (getFitViewNodes skips unmeasured ones) and ignore the new ones. It now waits for nodesInitialized before fitting, so the fit always frames the current nodes. An empty flow resolves immediately (nothing to wait for).

  • #5891 ca9c2fb - Fix isNodeIntersecting with partially: false when the area is fully contained in the node. Previously only a node fully inside the area counted, now containment in either direction does, matching getIntersectingNodes.

  • #5881 9d13542 - setEdges/addEdges no longer drop edges whose source or target node is not in the store. Previously validateEdges discarded any edge with a missing endpoint at commit time, which silently deleted edges and made the order of setNodes/setEdges matter — adding edges before their nodes lost them. Edges are now kept and EdgeWrapper skips drawing them (emitting the existing EDGE_SOURCE_MISSING/EDGE_TARGET_MISSING dev warning) until both nodes exist. The isValidConnection gate still runs whenever both endpoint nodes are resolvable.

  • #5887 81d4b63 - Multi-key useKeyPress combinations now match regardless of the order keys are pressed. The unused type-guard overload on useNodesData/useEdgesData is removed.

  • #6048 022cbc3 - The maskStrokeWidth of <MiniMap> is now scaled by the view scale of the minimap.

  • #6048 022cbc3 - MiniMapNodeFunc may now return undefined — its signature is (node) => string | undefined — so a per-node callback can fall back to the themed default for that node. An undefined nodeColor, nodeStrokeColor or nodeClassName no longer throws.

  • #6048 022cbc3 - The <svg> inside <MiniMap> now carries the vue-flow__minimap-svg class.

  • #5891 ca9c2fb - Fix the intermittent TS2589: Type instantiation is excessively deep error on updates like nodes.value = nodes.value.map(...). Nodes and edges are now excluded from the Vue UnwrapRef.

  • #5891 ca9c2fb - Honor width/height and initialWidth/initialHeight in the node visibility gate and inline size. The node wrapper previously gated visibility on measured alone, so a node sized via width/initialWidth stayed visibility: hidden until the ResizeObserver measured it, and in SSR (no ResizeObserver) it never became visible. Visibility now uses nodeHasDimensions from @xyflow/system (measured ?? width ?? initialWidth), and the inline size of the wrapper falls back through initialWidth/initialHeight before the node is measured (initialWidth/initialHeight are the SSR dimensions, since DOM cannot be measured server-side).

  • #5891 ca9c2fb - Keep the current selection on a pane click when elementsSelectable is false. Previously a pane click always cleared the selection; now a selection set before selection was disabled, or set programmatically, survives the click. The interactive reset is centralized in a new gated resetSelectedElements action (a no-op while elementsSelectable is false), distinct from removeSelectedNodes/removeSelectedEdges, which still clear unconditionally.

  • #6115 b1ad016 - Fire the pane context menu event when right-click panning is enabled (panOnDrag includes 2).

  • #5891 ca9c2fb - Export ResizeControlVariant as a value, not type-only. It is a runtime enum, but the bundled type declarations re-exported it through the NodeResizer barrel as export type, so ResizeControlVariant.Line / .Handle could not be used as a value in TypeScript consumers. It is now re-exported directly from the package root as a value.

  • #5891 ca9c2fb - A plain click on the pane no longer opens a selection box or fires selectionStart/selectionEnd. The selection (clearing the current selection + selectionStart) now begins only once the pointer moves past the click threshold (paneDragThreshold, or immediately while the selection key is held), and nodesSelectionActive / selectionEnd only update when a real selection drag happened — instead of resetting on every pointer-down and activating on every pointer-up.

  • #6064 de1e4c5 - Resolve the promises of animated viewport functions like fitView and setCenter with false when a user interaction or another viewport change interrupts the animation, instead of leaving them pending

  • #5891 ca9c2fb - Improve the return type of useNodesData. It now uses DistributivePick from @xyflow/system instead of a merged object type, so when you pass a union node type the result is a discriminated union — checking .type narrows .data:

    const node = useNodesData<MyNode>(id) // MyNode = TextNode | NumberNode
    if (node.value?.type === "text") {
      node.value.data.text // narrowed to TextNode data
    }

    For a single (non-union) node type the result is unchanged.

  • #6101 49a335e - Build the <Background> pattern element id as pattern-<flowId><id>

  • #6101 63d077b - Holding the selection key now starts a selection box even when the drag begins over a node or edge. The element underneath no longer starts a drag of its own. A child marked with nokey still opts out, and a secondary pointer no longer opens a box.

  • #6101 c62aee5 - Do not start a selection box on touch when panning is enabled. A panOnDrag button array only restricts mouse input, so a touch drag now pans, unless the selection key is held.

  • Updated dependencies [dff4dad, dae45aa, 13bf20a, 5d448e9, fbe2ba5, 96b196f, 69dc311, b872a5b, 1d9b9cd, b1ad016, de1e4c5, bf27626, 9fcddb8, 5161767, 615c5f6, de1e4c5, 8849014, 7b52b50, 885ac9e]:

    • @xyflow/system@1.0.0
2 hours ago
react-flow

@xyflow/vue@2.0.0

Major Changes

  • #5891 ca9c2fb - ConnectionLineType and PanelPosition are now re-exported from @xyflow/system, matching @xyflow/react and @xyflow/svelte.

    • The value of ConnectionLineType.SimpleBezier changed from "simple-bezier" to "simplebezier". Using the enum is unaffected; update raw "simple-bezier" strings.
    • The PanelPosition enum and the PanelPositionType union are replaced by the PanelPosition string union (e.g. "top-left"). It also accepts "center-left" and "center-right".
  • #5891 ca9c2fb - Rename container classes to match @xyflow/react and @xyflow/svelte. Update custom CSS or DOM queries that use them:

    • .vue-flow__transformationpane → .vue-flow__viewport
    • .vue-flow__viewport → .vue-flow__renderer
    • .vue-flow__edge-labels → .vue-flow__edgelabel-renderer
  • #5891 ca9c2fb - Use the same CSS variables and stylesheets as @xyflow/react and @xyflow/svelte.

    • --vf-* variables are replaced by --xy-* variables, e.g. --vf-node-bg → --xy-node-background-color, --vf-node-text → --xy-node-color, --vf-handle → --xy-handle-background-color, --vf-edge-text → --xy-edge-label-color. Node border, box-shadow and handle color are now separate variables instead of one --vf-node-color.
    • theme-default.css is removed. Import style.css for the default theme, or base.css for the structural styles only.
    • The built-in input/output nodes no longer have blue/pink accents.
  • #5896 02607f9 - edgesReconnectable and elevateEdgesOnSelect now default to true.

    Edges are reconnectable by default (this only takes effect once you handle @reconnect), and selected edges are raised above their siblings. To keep the previous behavior, set :edges-reconnectable="false" and/or :elevate-edges-on-select="false" on <VueFlow>.

  • #5891 ca9c2fb - Align connection and reconnect event payloads with @xyflow/react and add a selectionChange event.

    • connectEnd / clickConnectEnd emit { event, connectionState } instead of the bare event.
    • reconnectStart emits { event, edge, handleType } and reconnectEnd emits { event, edge, handleType, connectionState }.
    • New selectionChange event (@selection-change / onSelectionChange) emits { nodes, edges } when the selection changes.
  • #5891 ca9c2fb - Rename fitViewOnInit to fitView and add a fitViewOptions prop for the initial fit. The nodeOrigin prop, which was previously ignored, is now applied.

  • #6114 dff4dad - Align the connection APIs across all frameworks on NodeConnection.

    • Remove getHandleConnections. Use getNodeConnections({ nodeId, type, handleId }) instead: id is renamed to handleId and type is optional.
    • Add getNodeConnections to useSvelteFlow.
    • HandleConnection type removed: use NodeConnection instead.
  • #5891 ca9c2fb - Align the package exports with @xyflow/react and @xyflow/svelte:

    • ESM types resolve from index.d.mts and CJS types from index.d.ts, fixing type resolution under node16/nodenext.
    • Stylesheets can be imported as @xyflow/vue/style.css, @xyflow/vue/base.css and @xyflow/vue/xy-theme.css.
    • The IIFE / browser-global build (vue-flow-core.iife.js) and the unpkg/jsdelivr fields are removed. CDN users should load the ESM build (e.g. via esm.sh).
  • #5891 ca9c2fb - Align core types with @xyflow/system. Node and Edge are now built on the system NodeBase/EdgeBase, and the store and its types take an EdgeType generic next to NodeType (useVueFlow<NodeType, EdgeType>()).

    Old New
    node.parentNode node.parentId
    node.computedPosition node.internals.positionAbsolute (+ node.internals.z)
    node.dimensions node.measured
    node.handleBounds node.internals.handleBounds
    node.isParent useVueFlowStore().parentLookup.get(node.id)?.size > 0
    node.label node.data.label
    NodeProps<MyData> NodeProps<Node<MyData, "myType">>
    EdgeProps<MyData> EdgeProps<Edge<MyData, "myType">>
    NodeDimensionChange.updateStyle NodeDimensionChange.setAttributes
    NodePositionChange.from NodePositionChange.positionAbsolute
    NodeAddChange.item: GraphNode / EdgeAddChange.item: GraphEdge Node / Edge
    EdgeRemoveChange.{source,target,sourceHandle,targetHandle} read the edge via getEdge(id)
    @pane-ready / onPaneReady @init / onInit
    <VueFlow v-model="elements"> <VueFlow v-model:nodes="nodes" v-model:edges="edges">
    setElements, getElements, getSelectedElements setNodes/setEdges, getNodes/getEdges, getSelectedNodes/getSelectedEdges
    addSelectedElements, removeSelectedElements addSelectedNodes/addSelectedEdges, removeSelectedNodes/removeSelectedEdges

    Custom node components now also receive selectable, deletable, draggable, isConnectable, positionAbsoluteX, positionAbsoluteY and parentId as props. NodeDragItem uses the system shape.

  • #6046 e0be409 - The <Background> pattern is now colored by the stylesheet rather than by an inline fill/stroke. Previously the color was resolved in JS from a hardcoded { lines: "#eee", dots: "#91919a" }.

    If you relied on those hardcoded light colors, pass them explicitly: <Background color="#91919a" /> for dots, <Background variant="lines" color="#eee" /> for lines.

  • #5890 72dbb75 - The nodes/edges binding now determines how changes are handled, and the applyDefault prop is removed.

    • v-model:nodes / v-model:edges (or no binding at all, when driving the flow through useVueFlow()/setupVueFlow()) is managed: Vue Flow applies changes to its store and mirrors them back to your ref.
    • A bare one-way :nodes / :edges is controlled: changes are delivered via @nodes-change / @edges-change and nothing is applied until you handle them (apply them and reassign your array).
  • #5891 ca9c2fb - Type the class property as ClassValue (string | Record<string, boolean> | ClassValue[], mirroring the Vue class-binding type) on Node, Edge and the connectionLineClass prop, replacing the looser string | string[] | Record<string, any>.

    The function form for class and style ((el) => value) is removed. It was never part of the public type — only a dead runtime branch in the node/edge wrappers — and passing a function produced a broken native render anyway. Pass a resolved ClassValue / style object instead (compute it in your own component if it needs to be dynamic).

  • #6117 dae45aa - onConnectEnd and onReconnectEnd now receive to in flow coordinates instead of screen coordinates

  • #6049 15da095 - The connectionLineOptions object of <VueFlow> is replaced by individual props.

    before after
    connectionLineOptions.type connectionLineType
    connectionLineOptions.style connectionLineStyle
    connectionLineOptions.class connectionLineClass
    connectionLineOptions.markerStart connectionLineMarkerStart
    connectionLineOptions.markerEnd connectionLineMarkerEnd

    The ConnectionLineOptions type is removed.

  • #5891 ca9c2fb - Custom connection lines (#connection-line slot) receive from*/to* props instead of source*/target* (sourceX → fromX, targetHandle → toHandle, …), matching @xyflow/react. markerStart/markerEnd are optional.

    The ElementData type is removed. Edge data now defaults to Record<string, unknown>.

  • #6049 15da095 - The connection status is now applied to the group of the connection line rather than its path.

  • #5891 ca9c2fb - Expose the raw pointer position during a connection:

    • Custom connection-line components (#connection-line) now receive a pointer prop — the unsnapped pointer position in flow coordinates, distinct from toX/toY (which snap to the hovered handle).
    • useConnection().pointer is now the raw pointer position. Previously it tracked the snapped end (it was aliased to connection.to); the snapped end is still available via to / toHandle.
  • #5898 903cd43 - The store now exposes the ongoing connection as a single connection object (ConnectionState), replacing the separate connectionStartHandle, connectionEndHandle, connectionPosition, and connectionStatus fields. Read connection.fromHandle, connection.toHandle, connection.pointer, and connection.isValid instead — this matches useConnection() and React/Svelte Flow.

  • #6050 bf75d26 - Rename the fitViewParams prop of <Controls> to fitViewOptions.

  • #5903 b507faa - isValidConnection now receives only the attempted connection, matching IsValidConnection in React and Svelte Flow. The extra second argument ({ nodes, edges, sourceNode, targetNode }) is removed, read those from useVueFlow() inside your handler if you need them.

  • #5893 825e6c2 - Removed the autoConnect prop and the Connector type. Handle new connections with @connect (or onConnect) and addEdge/addEdges instead:

    <VueFlow @connect="(connection) => (edges = addEdge(connection, edges))" />
  • #5906 b2ceddc - Removed the per-edge template option (edge.template). Use edge slots or map an edge type to a component via the edgeTypes prop instead.

  • #5901 4675bdd - Removed the internal initialized store flag. It only guarded a redundant empty commit during store construction and was always true by the time your code ran. Use nodesInitialized or viewportInitialized to check readiness.

  • #5891 ca9c2fb - Remove the redundant viewportHelper ComputedRef from the useVueFlow() instance. The viewport functions (setCenter, fitView, zoomIn, zoomOut, zoomTo, setViewport, getViewport, fitBounds, screenToFlowPosition, flowToScreenPosition) are already exposed flat on the instance so the nested viewportHelper was duplicate surface.

    • useVueFlow().viewportHelper.value.setCenter(…) → useVueFlow().setCenter(…) (and likewise for the other viewport functions).
    • The init flag moves to a flat viewportInitialized (ComputedRef<boolean>): useVueFlow().viewportHelper.value.viewportInitialized → useVueFlow().viewportInitialized.value.
  • #5895 0ddd0b3 - Removed the $destroy method from the Vue Flow instance. It was a no-op — the store is owned by its provider component and torn down automatically when that component unmounts.

  • #5891 ca9c2fb - Add the selectable class to edges. The edge <g> now carries a selectable class whenever the edge is selectable (its own selectable flag, or elementsSelectable when unset), and the CSS keys cursor: pointer and the focus edge-path stroke off .selectable. Previously cursor: pointer was applied to every edge unconditionally, so non-selectable edges no longer show the pointer cursor.

  • #5891 ca9c2fb - Edges are stored as your plain Edge objects and the edge, connection and viewport APIs are aligned with @xyflow/react and @xyflow/svelte.

    • GraphEdge and isGraphEdge are removed. getEdges/getEdge/v-model:edges return plain Edges, so edge.sourceNode, edge.targetNode and edge.sourceX are gone. Use useInternalNode(() => props.source) and the positions from EdgeProps.
    • In-place edge mutation is no longer reactive. Use updateEdge, updateEdgeData or setEdges.
    • EdgeProps drops sourceNode/targetNode, adds selectable/deletable and exposes sourceHandleId/targetHandleId.
    • useEdge().edge is now a ComputedRef.
    • defaultEdgeOptions are applied when rendering instead of being written onto stored edges.
    • useConnection() returns a ComputedRef<ConnectionState> (inProgress, isValid, from*, to*, pointer).
    • connectionMode defaults to strict. Set connection-mode="loose" for the old behavior.
    Old New
    findNode / findEdge getNode / getEdge
    screenToFlowCoordinate / flowToScreenCoordinate screenToFlowPosition / flowToScreenPosition
    project screenToFlowPosition
    updateEdge(oldEdge, connection) reconnectEdge(oldEdge, connection)
    @edge-update-start / @edge-update / @edge-update-end @reconnect-start / @reconnect / @reconnect-end
    edgeUpdaterRadius / edgesUpdatable / edge.updatable reconnectRadius / edgesReconnectable / edge.reconnectable
    EdgeUpdatable / EdgeUpdateEvent EdgeReconnectable / EdgeReconnectEvent

    New: updateEdge(id, edgeUpdate, { replace? }) for partial edge updates, and useInternalNode is exported.

  • #5914 5a8ed98 - Fix the useKeyPress preventDefault option, which was inverted. It now calls preventDefault() by default and only skips it when set to false — previously preventDefault: true was what disabled it. The default behavior is unchanged; if you explicitly set this option, flip the value.

  • #5927 69dc311 - Use 5% as new default padding for fitView, and fitBounds.

  • #5891 ca9c2fb - nodeLookup, parentLookup and edgeLookup are now reactive Maps instead of ComputedRefs. Read them from useVueFlowStore() without .value:

    - useVueFlow().nodeLookup.value.get(id)
    + useVueFlowStore().nodeLookup.get(id)
  • #5891 ca9c2fb - Remove the deprecated useHandleConnections composable. Use useNodeConnections instead: type → handleType, id → handleId and nodeId → id.

    // before
    useHandleConnections({ type: "target", id: "a", nodeId: "1" })
    // after
    useNodeConnections({ handleType: "target", handleId: "a", id: "1" })
  • #6048 022cbc3 - <MiniMap> now colors itself through --xy-minimap-*-props custom properties instead of inline attributes.

  • #5891 ca9c2fb - Remove the deprecated updateEdge util (use reconnectEdge) and useZoomPanHelper (use the viewport functions on useVueFlow()). addEdge now takes an edges array instead of mixed elements: addEdge(connection, edges).

  • #5891 ca9c2fb - Node events (click, mouse, context menu, drag, selection drag, minimap node events and nodesInitialized) now emit the user Node instead of the InternalNode. Use getInternalNode(node.id) to read internals or measured.

  • #5891 ca9c2fb - Align node extent typing with @xyflow/system:

    • Collapse the local CoordinateExtent type onto the one from @xyflow/system (they were identical) — it is now re-exported from @xyflow/system.
    • Remove CoordinateExtentRange and the per-node "clamp to parent with padding" extent form (extent: { range, padding }). node.extent and the nodeExtent prop now accept exactly what the system understands: "parent" | CoordinateExtent | null. Use extent: "parent" to clamp a child to its parent. This drops a vue-flow-only workaround that could not be cleanly typed against @xyflow/system; if padded clamping returns it will be a system-level feature. To inset from the parent in the meantime, apply the offset yourself.
  • #5891 ca9c2fb - Split nodes into the user-facing Node and the InternalNode (formerly GraphNode), matching @xyflow/react and @xyflow/svelte. v-model:nodes, getNodes, getNode and getSelectedNodes return the plain nodes you passed in. Read internals (absolute position, z-index, handle bounds) and measured via getInternalNode(id), useInternalNode(id) or nodeLookup.

    • In-place node mutation (node.position = …, node.data.x = …) is no longer reactive. Use updateNode, updateNodeData or setNodes.
    • Nodes are no longer filled with defaults: a node without data keeps data: undefined (previously {}), and selected/dragging stay undefined until set.
  • #6115 b1ad016 - Replace paneClickDistance with paneDragThreshold (default 1). Like nodeDragThreshold, the pane only starts panning or selecting once the pointer has moved further than the threshold; otherwise it counts as a click. Works with every mouse button.

  • #5891 ca9c2fb - toObject() no longer returns the deprecated position and zoom fields. Use viewport ({ x, y, zoom }) instead.

  • #5891 ca9c2fb - Remove useVueFlow().fromObject() and the FlowImportObject type.

    toObject() is unchanged. To restore a saved flow, set the elements and viewport yourself from onInit (or any time after mount):

    const { setNodes, setEdges, setViewport, onInit } = useVueFlow()
    
    onInit(() => {
      const flow = JSON.parse(localStorage.getItem("flow") ?? "null")
      if (!flow) {
        return
      }
    
      setNodes(flow.nodes)
      setEdges(flow.edges)
    
      if (flow.viewport) {
        setViewport(flow.viewport)
      }
    })
  • #5556 9fcddb8 - Remove nodeClickDistance. Whether a click on a node fires is now determined solely by whether a drag actually moved the node: clicks are suppressed only after a drag changed node positions. Use nodeDragThreshold (and snapGrid) to control this.

  • #6085 fc128ca - Removed getNodeTypes and getEdgeTypes from useVueFlow(). Node and edge components now resolve from the registered types directly; read nodeTypes/edgeTypes off useVueFlowStore() if you need the registered map.

  • #5891 ca9c2fb - Remove the vueFlowVersion field from the flow instance (useVueFlow().vueFlowVersion) and the build-time __VUE_FLOW_VERSION__ injection. It was exposed but never used internally and has no equivalent in xyflow/react; read your installed version from your package manager or @xyflow/vue/package.json instead.

  • #5987 615c5f6 - Rename the measured handle geometry type from Handle to HandleBounds so it no longer collides with the <Handle /> component.

  • #5911 0d330e0 - Renamed the $reset instance action to reset.

  • #5891 ca9c2fb - Remove the global flow registry. useVueFlow() no longer accepts an id or options. It returns the store of the nearest <VueFlow> or <VueFlowProvider> and throws outside of one.

    • useVueFlow({ nodes, edges, … }) → pass these as props to <VueFlow>.
    • useVueFlow("my-id") to access a flow from outside → wrap both in <VueFlowProvider> and call useVueFlow() inside it.

    The id prop is now only used as a label (aria/debug), not to look up a flow.

  • #5891 ca9c2fb - Add an explicit selectionOnDrag prop and drop the selectionKeyCode={true} overload.

    Drawing a selection box on a plain pane drag (no key held) used to be expressed by setting selectionKeyCode to true, which overloaded the key-code prop. It is now its own boolean prop:

    <!-- before -->
    <VueFlow :selection-key-code="true" :pan-on-drag="false" />
    <!-- after -->
    <VueFlow :selection-on-drag="true" :pan-on-drag="false" />

    selectionKeyCode is once again just the key you hold to select (default "Shift"). paneClick also fires while selecting on drag (it was previously swallowed by the d3-zoom click handling).

  • #5927 7b52b50 - Numbers passed to fitViewOptions.padding are interpreted as pixel values instead of legacy units. Use percentage values instead (0.1 ≈ 4.5%, 0.5 ≈ 16.7%, 1 ≈ 25%, 2 ≈ 33%)

  • #5891 ca9c2fb - Use the parent expansion of @xyflow/system for expandParent nodes when dragging, measuring and resizing, matching @xyflow/react:

    • A child dragged past the top/left edge of its parent now grows the parent up/left, and its siblings are offset so they stay in place.
    • node.origin is respected when a resize expands the parent.
    • Keyboard moves of nodes with an extent no longer stop a full node width/height short of the boundary.
  • #5887 1d34f03 - HandleElement is removed in favor of HandleBounds, and EdgePositions in favor of EdgePosition. The <Handle> props connectableStart/connectableEnd are renamed to isConnectableStart/isConnectableEnd, OnConnectStartParams fields are now nullable, and the deprecated Project type is no longer re-exported.

  • #6136 1262688 - updateNodeInternals(id) requires a node id or an array of ids; the no-argument form (which re-measured every node) is removed.

  • #5900 ec0405e - useNode now returns the user-facing Node instead of the enriched InternalNode — use useInternalNode for internals/measured. Its id argument also accepts a ref or getter, matching useInternalNode.

  • #5891 ca9c2fb - useHandle now uses XYHandle from @xyflow/system, so drag-to-connect (auto-pan, connection radius, closest-handle resolution, drag threshold) behaves like @xyflow/react and @xyflow/svelte. Its reconnect options are renamed: edgeUpdaterType → reconnectHandleType, onEdgeUpdate → onReconnect, onEdgeUpdateEnd → onReconnectEnd, and onReconnectStart is added.

  • #5891 ca9c2fb - - Rename the nodeId param to id (useNodeConnections({ nodeId }) → useNodeConnections({ id })). Like before, it is optional and falls back to the node id from the useNodeId context injection.

    • handleId now requires handleType to be set. Passing handleId on its own is a type error — handleId is meaningless at runtime without a handleType, and the type now points you at the fix. Runtime behavior is unchanged.
  • #5891 ca9c2fb - Split the store API. useVueFlow() now returns the flow instance (actions, computed getters and event hooks like onNodeClick or onConnect) and no longer exposes the raw reactive state. The state moved to useVueFlowStore(), with storeToRefs() to destructure it (Pinia-style).

    // before
    const { nodes, transform, nodeLookup, setViewport, onConnect } = useVueFlow()
    
    // after
    const { setViewport, onConnect } = useVueFlow()
    const store = useVueFlowStore()                  // reactive state (store.nodes, store.transform — no .value)
    const { nodes, transform } = storeToRefs(store)  // refs for destructuring
    const { nodeLookup } = useVueFlowStore()         // lookup Maps can be destructured directly
    • useVueFlowStore() returns the reactive state object, including the nodeLookup/parentLookup/edgeLookup/connectionLookup Maps. Reading it inside a computed, watch or template is tracked.
    • storeToRefs(store) turns the state fields into refs so destructuring stays reactive.
    • Computed getters (getNodes, getEdges, getSelectedNodes, getSelectedEdges, viewport) and all event hooks stay on useVueFlow().

    A <VueFlow> template ref now exposes the instance (VueFlowInstance). The VueFlowStore type is kept as an alias of VueFlowInstance.

  • #5891 ca9c2fb - Add ease and interpolate options to every viewport function. fitView, setViewport, setCenter, fitBounds, zoomTo, zoomIn and zoomOut now accept ease?: (t: number) => number and interpolate?: "smooth" | "linear" alongside duration to control the transition curve.

    The viewport option types now come from @xyflow/system:

    • FitViewParams → FitViewOptions (FitViewOptionsBase from @xyflow/system). Its nodes option takes node objects instead of ids — nodes?: string[] → nodes?: (Node | { id: string })[] — and the vestigial offset option is removed (superseded by padding).
    • TransitionOptions → ViewportHelperFunctionOptions.
  • #6052 1afef23 - Require Vue ^3.5.27 (peer dependency of vue and @vue/reactivity). The default flow id is now generated with useId(), and earlier 3.5 releases cannot resolve @xyflow/system types in defineProps (vuejs/core#14236).

  • #6077 f062cfb - Remove the array-based applyChanges, applyNodeChanges and applyEdgeChanges exports, and applyNodeChanges/applyEdgeChanges on the useVueFlow() instance. Use applyTo(elements) of the changeset instead.

Minor Changes

  • #5891 ca9c2fb - fitView and fitBounds now accept Padding from @xyflow/system: per-side values and px / % units in addition to a number. Padding, PaddingWithUnit and PaddingUnit are re-exported.

  • #5891 ca9c2fb - Add an ariaLabelConfig prop to customize the accessibility text. Pass a Partial<AriaLabelConfig> (merged over the defaults) to override any of the node/edge a11y descriptions, the aria-live "moved node" message, and the Controls / MiniMap / Handle aria labels. As part of this, the Controls buttons and Handle — which previously had no aria-label — now get accessible labels, the Controls panel gets a Control Panel label, and the MiniMap label default moves into the config. AriaLabelConfig is re-exported from the package root.

  • #5891 ca9c2fb - Allow theming arrowhead markers with the --xy-edge-stroke CSS variable. defaultMarkerColor now accepts null — pass it (or leave the color of a marker unset) and the arrowhead inherits --xy-edge-stroke instead of the hard-coded #b1b1b7, so markers can match themed edge colors. The marker polylines carry .arrow / .arrowclosed classes and only set an inline color when one is provided; the open arrow strokes only, the closed arrow strokes and fills. The default (#b1b1b7) is unchanged.

  • #5891 ca9c2fb - Add autoPanOnNodeFocus (default true), mirroring xyflow/react. When a node receives keyboard focus (Tab) and is not within the viewport, the viewport pans to center it — so keyboard navigation never lands on an off-screen node. Only reacts to keyboard focus (:focus-visible), not pointer/programmatic focus. Set auto-pan-on-node-focus="false" (or pass false) to disable.

  • #5891 ca9c2fb - Add an autoPanOnSelection prop. When true (the default), the viewport pans automatically as the cursor reaches the edge of the viewport while dragging a selection box, so you can select nodes beyond the visible area in one gesture. Set :auto-pan-on-selection="false" to keep the viewport fixed during selection.

  • #6046 e0be409 - Add bgColor and patternClassName props to <Background>. color and bgColor are applied as the --xy-background-pattern-color-props and --xy-background-color-props custom properties.

  • #6046 e0be409 - Add the cross background variant.

  • #5891 ca9c2fb - Add a dark theme. The flow follows the system color scheme by default. Use the forceColorMode prop ("light" | "dark") to pin it.

  • #5891 ca9c2fb - Add a connectionDragThreshold prop. It is the distance in pixels the pointer must move from a handle before a connection line starts to drag — useful to prevent accidental connections when you just click a handle. Defaults to 1; set it higher (e.g. connectionDragThreshold="25") to require a more deliberate drag, or 0 to start the connection immediately on pointer-down. Below the threshold, neither connectStart nor connectEnd fires.

  • #6049 15da095 - Add connectionLineContainerStyle prop, applied to the <svg> the connection line is drawn in.

  • #5891 ca9c2fb - Add a controlled viewport prop with v-model:viewport support, matching the controlled viewport of @xyflow/react and bind:viewport of @xyflow/svelte.

    <VueFlow v-model:viewport="viewport" />

    The bound value two-way binds to the viewport of the flow: setting it pans/zooms the flow (applied via syncViewport, so no extra pan/zoom events fire), and it updates as the user interacts (via update:viewport). defaultViewport remains the uncontrolled initial-viewport prop; use viewport when you want to own the viewport state.

  • #6048 022cbc3 - Add an orientation prop to <Controls> ("vertical" | "horizontal", default "vertical").

  • #5910 87108d3 - Added a debug prop. When true, Vue Flow logs its events to the console as they fire (high-frequency events like move/drag/hover are skipped) — useful for seeing which events run.

  • #5939 621f5d9 - Add changeParent to useReactFlow, useSvelteFlow and useVueFlow, to easily change the parent of a node without calculating a new position.

  • #5891 ca9c2fb - Discriminate the #node-<type> / #edge-<type> slot props by node/edge type. When nodes/edges are typed as a discriminated union (e.g. (MyNodeA | MyNodeB)[]), each #node-<type> / #edge-<type> slot now narrows its props to the NodeProps / EdgeProps of the matching variant, so a custom node/edge component can safely type its data without a cast. Generic Node[] / Edge[] flows are unchanged (props stay broad), and arbitrary slot names remain allowed (a broad node-${string} / edge-${string} fallback). Type-only.

  • #5905 a5753cd - Tightened the edge label type. Dropped the catch-all object from EdgeProps and EdgeTextProps so it matches the actual label type of edges (string | VNode | Component).

  • #6050 bf75d26 - Export ControlButtonProps and ControlButtonEmits types.

  • #6050 d61a36a - Export getEdgeCenter, along with the GetBezierPathParams, GetSmoothStepPathParams and GetStraightPathParams parameter types.

  • #5844 861a6be - Exported styles now live in @layer xyflow.

  • #5891 ca9c2fb - Move Background, Controls, MiniMap, NodeResizer, NodeResizeControl, and NodeToolbar components into core pkg.

  • #6048 022cbc3 - Add a bgColor prop to <MiniMap>, applied as the --xy-minimap-background-color-props custom property.

  • #5891 ca9c2fb - Add an autoScale prop to NodeResizer / NodeResizeControl. Handle controls already scale up by Math.max(1 / zoom, 1) so they do not shrink below their base size when zooming out; autoScale (default true) now lets you opt out, previously the prop existed but had no effect. The handle is also centered via the translate CSS property instead of transform, so the centering composes with the zoom scale and the handle stays pinned to the node corner at any zoom.

  • #6050 f94dad9 - Add a resizeDirection prop to <NodeResizeControl> ("horizontal" | "vertical"). When set, the control only resizes the node along that axis; left unset it resizes in any direction, as before.

  • #5891 ca9c2fb - Add the onBeforeDelete prop and the deleteElements action. deleteElements({ nodes, edges }) also removes child nodes and connected edges, and resolves to { deletedNodes, deletedEdges }. onBeforeDelete runs before the Delete key and deleteElements remove anything: return false to cancel, true to continue or { nodes, edges } to delete a subset.

  • #5993 901b0e4 - Add xy-theme.css stylesheet (@xyflow/<lib>/xy-theme.css) that ships the xyflow default theme on top of base.css.

  • #5891 ca9c2fb - Add a stepPosition option to smooth-step / step edges. Set pathOptions.stepPosition (0 = bend at source, 1 = at target, 0.5 = midpoint, the default) to control where the edge bends along its path. The path math comes from getSmoothStepPath from @xyflow/system; the SmoothStepEdge component now forwards the option to it.

  • #5891 ca9c2fb - ConnectionLineProps, RemoveNodes, RemoveEdges and IsNodeIntersecting now take the NodeType/EdgeType of the flow, so custom connection lines and updater functions get typed nodes and edges.

  • #5904 1e7fa6b - Tightened BaseEdgeProps.label from any to string | VNode | Component<EdgeTextProps>, matching the actual label type of edges.

  • #5882 3334af0 - Add nodesDelete, edgesDelete, and delete events, matching @xyflow/react (onNodesDelete/onEdgesDelete/onDelete) and @xyflow/svelte (ondelete). They fire from deleteElements (the choke point for both the delete key and programmatic deletion) after onBeforeDelete has resolved the removed set — edgesDelete with the removed edges, nodesDelete with the removed nodes (each only when non-empty), and delete with { nodes, edges } whenever anything was removed. Also exports the OnDelete handler type alongside OnBeforeDelete.

  • #5914 96bfd42 - <VueFlowProvider> now accepts the same options as setupVueFlow() to seed its store — pass nodes, edges, or any other VueFlowProps and they become the initial values of the store. The seed is read once when the store is created.

Patch Changes

  • #6046 e0be409 - Correct the pattern offset of <Background>, which was calculated as offset * zoom || 1 + gap / 2. That parses as offset * zoom || (1 + gap / 2), so with the default offset of 0 the pattern sat one pixel off.

  • #5891 ca9c2fb - Clear the visual nodes-selection box when no selected nodes remain. nodesSelectionActive only ever turns on via a user drag-select, but it could get stuck true after the selected nodes were removed (e.g. deleted) — so a later programmatic select would wrongly render the NodesSelection rect around an unrelated node. Re-adopting nodes now turns it back off whenever the selection is empty.

  • #6085 fc128ca - Improve rendering performance, especially while dragging large selections:

    • Node drag updates are batched to one per animation frame.
    • Nodes, edges and the <MiniMap> re-render less during drags.
    • removeSelectedNodes / removeSelectedEdges only emit changes for elements that are actually selected.
    • Built-in edges no longer render their props (source, sourceX, animated, …) as attributes on the <path>, and EdgeText no longer re-measures its label on every position change.
  • #5945 7e4c422 - EdgeWrapper now computes edge positions with getEdgePosition from @xyflow/system (as @xyflow/react and @xyflow/svelte do) instead of a hand-rolled copy. It returns null when a node is not initialized or a handle cannot be resolved, so an edge between nodes that render no <Handle> draws nothing instead of a phantom line to the bounding box of the node. This also aligns handle resolution across connection modes with the other packages.

  • #5914 a86e6e5 - Dev warnings now link to the matching entry in the error reference, e.g. Help: https://vueflow.dev/error#NODE_TYPE_MISSING.

  • #5891 ca9c2fb - Fix the includeHiddenNodes option of fitView being ignored.

  • #5891 ca9c2fb - Defer an imperative fitView() until the nodes are measured. A fitView() call made before the nodes settle — e.g. right after addNodes() — used to frame only the already-measured nodes (getFitViewNodes skips unmeasured ones) and ignore the new ones. It now waits for nodesInitialized before fitting, so the fit always frames the current nodes. An empty flow resolves immediately (nothing to wait for).

  • #5891 ca9c2fb - Fix isNodeIntersecting with partially: false when the area is fully contained in the node. Previously only a node fully inside the area counted, now containment in either direction does, matching getIntersectingNodes.

  • #5881 9d13542 - setEdges/addEdges no longer drop edges whose source or target node is not in the store. Previously validateEdges discarded any edge with a missing endpoint at commit time, which silently deleted edges and made the order of setNodes/setEdges matter — adding edges before their nodes lost them. Edges are now kept and EdgeWrapper skips drawing them (emitting the existing EDGE_SOURCE_MISSING/EDGE_TARGET_MISSING dev warning) until both nodes exist. The isValidConnection gate still runs whenever both endpoint nodes are resolvable.

  • #5887 81d4b63 - Multi-key useKeyPress combinations now match regardless of the order keys are pressed. The unused type-guard overload on useNodesData/useEdgesData is removed.

  • #6048 022cbc3 - The maskStrokeWidth of <MiniMap> is now scaled by the view scale of the minimap.

  • #6048 022cbc3 - MiniMapNodeFunc may now return undefined — its signature is (node) => string | undefined — so a per-node callback can fall back to the themed default for that node. An undefined nodeColor, nodeStrokeColor or nodeClassName no longer throws.

  • #6048 022cbc3 - The <svg> inside <MiniMap> now carries the vue-flow__minimap-svg class.

  • #5891 ca9c2fb - Fix the intermittent TS2589: Type instantiation is excessively deep error on updates like nodes.value = nodes.value.map(...). Nodes and edges are now excluded from the Vue UnwrapRef.

  • #5891 ca9c2fb - Honor width/height and initialWidth/initialHeight in the node visibility gate and inline size. The node wrapper previously gated visibility on measured alone, so a node sized via width/initialWidth stayed visibility: hidden until the ResizeObserver measured it, and in SSR (no ResizeObserver) it never became visible. Visibility now uses nodeHasDimensions from @xyflow/system (measured ?? width ?? initialWidth), and the inline size of the wrapper falls back through initialWidth/initialHeight before the node is measured (initialWidth/initialHeight are the SSR dimensions, since DOM cannot be measured server-side).

  • #5891 ca9c2fb - Keep the current selection on a pane click when elementsSelectable is false. Previously a pane click always cleared the selection; now a selection set before selection was disabled, or set programmatically, survives the click. The interactive reset is centralized in a new gated resetSelectedElements action (a no-op while elementsSelectable is false), distinct from removeSelectedNodes/removeSelectedEdges, which still clear unconditionally.

  • #6115 b1ad016 - Fire the pane context menu event when right-click panning is enabled (panOnDrag includes 2).

  • #5891 ca9c2fb - Export ResizeControlVariant as a value, not type-only. It is a runtime enum, but the bundled type declarations re-exported it through the NodeResizer barrel as export type, so ResizeControlVariant.Line / .Handle could not be used as a value in TypeScript consumers. It is now re-exported directly from the package root as a value.

  • #5891 ca9c2fb - A plain click on the pane no longer opens a selection box or fires selectionStart/selectionEnd. The selection (clearing the current selection + selectionStart) now begins only once the pointer moves past the click threshold (paneDragThreshold, or immediately while the selection key is held), and nodesSelectionActive / selectionEnd only update when a real selection drag happened — instead of resetting on every pointer-down and activating on every pointer-up.

  • #6064 de1e4c5 - Resolve the promises of animated viewport functions like fitView and setCenter with false when a user interaction or another viewport change interrupts the animation, instead of leaving them pending

  • #5891 ca9c2fb - Improve the return type of useNodesData. It now uses DistributivePick from @xyflow/system instead of a merged object type, so when you pass a union node type the result is a discriminated union — checking .type narrows .data:

    const node = useNodesData<MyNode>(id) // MyNode = TextNode | NumberNode
    if (node.value?.type === "text") {
      node.value.data.text // narrowed to TextNode data
    }

    For a single (non-union) node type the result is unchanged.

  • #6101 49a335e - Build the <Background> pattern element id as pattern-<flowId><id>

  • #6101 63d077b - Holding the selection key now starts a selection box even when the drag begins over a node or edge. The element underneath no longer starts a drag of its own. A child marked with nokey still opts out, and a secondary pointer no longer opens a box.

  • #6101 c62aee5 - Do not start a selection box on touch when panning is enabled. A panOnDrag button array only restricts mouse input, so a touch drag now pans, unless the selection key is held.

  • Updated dependencies [dff4dad, dae45aa, 13bf20a, 5d448e9, fbe2ba5, 96b196f, 69dc311, b872a5b, 1d9b9cd, b1ad016, de1e4c5, bf27626, 9fcddb8, 5161767, 615c5f6, de1e4c5, 8849014, 7b52b50, 885ac9e]:

    • @xyflow/system@1.0.0
2 hours ago
xyflow

@xyflow/react@13.0.0

Major Changes

  • #6114 dff4dad - Align the connection APIs across all frameworks on NodeConnection.

    • Remove getHandleConnections. Use getNodeConnections({ nodeId, type, handleId }) instead: id is renamed to handleId and type is optional.
    • Add getNodeConnections to useSvelteFlow.
    • HandleConnection type removed: use NodeConnection instead.
  • #6117 dae45aa - onConnectEnd and onReconnectEnd now receive to in flow coordinates instead of screen coordinates

  • #5915 96b196f - Remove requirement of parent nodes to appear before child nodes in the nodes array

  • #5927 69dc311 - Use 5% as new default padding for fitView, and fitBounds.

  • #5866 479082d - Remove deprecated useHandleConnections hook.

  • #5800 7eca9fd - Replace useStore with useNodesStore, useEdgesStore, useViewportStore, useOptionsStore, useConnectionStore and useSelectionStore. They no longer accept an equality function, use useShallow instead.

  • #5996 885ac9e - Performance: Move options, nodes, edges, selections and connection into separate stores.

  • #6115 b1ad016 - Replace paneClickDistance with paneDragThreshold (default 1). Like nodeDragThreshold, the pane only starts panning or selecting once the pointer has moved further than the threshold; otherwise it counts as a click. Works with every mouse button.

  • #5843 9eb6929 - Use system color mode by default, add forceColorMode to opt-out.

  • #5556 9fcddb8 - Remove nodeClickDistance. Whether a click on a node fires is now determined solely by whether a drag actually moved the node: clicks are suppressed only after a drag changed node positions. Use nodeDragThreshold (and snapGrid) to control this.

  • #5987 615c5f6 - Rename the measured handle geometry type from Handle to HandleBounds so it no longer collides with the <Handle /> component.

  • #5996 eaf5a2d - Remove lib ("react") entry from store.

  • #5927 7b52b50 - Numbers passed to fitViewOptions.padding are interpreted as pixel values instead of legacy units. Use percentage values instead (0.1 ≈ 4.5%, 0.5 ≈ 16.7%, 1 ≈ 25%, 2 ≈ 33%)

  • #5866 0d1893a - Require React 18 as minimal supported version

  • #5944 5ff09ef - Pass NodeChangeset/EdgeChangeset class to onNodesChange/onEdgesChange or onnodeschange/onedgeschange.

  • #5866 1a77ebf - Remove UMD build.

Minor Changes

  • #5939 621f5d9 - Add changeParent to useReactFlow, useSvelteFlow and useVueFlow, to easily change the parent of a node without calculating a new position.

  • #5978 bf83263 - Elevate selected edges by default (elevateEdgesOnSelect now defaults to true), so overlapping edges can be reconnected by selecting them first.

  • #5844 861a6be - Exported styles now live in @layer xyflow.

  • #5996 885ac9e - Performance: Add fine grained reactivity when subscribing to specific nodes and edges.

  • #6029 b872a5b - Improve panning performance by avoiding a full style recalculation when the pane cursor changes.

  • #5866 1a77ebf - Add style import from @xyflow/react/style.css.

  • #5996 885ac9e - Performance: Add fine grained reactivity to handles when making a new connection

  • #5993 901b0e4 - Add xy-theme.css stylesheet (@xyflow/<lib>/xy-theme.css) that ships the xyflow default theme on top of base.css.

  • #5996 885ac9e - Performance: Compile library with React Compiler

  • #5939 846d686 - Add useNode and useEdge hooks for subscribing to changes to specific nodes & edges

  • #6099 66da96b - Add useEqualSelector hook

Patch Changes

  • #5866 7da73f2 - Include source maps and src folder in package. "Go to definition" now links to the source code instead of the generated types

  • #6084 1d9b9cd - Fix resizing nodes with a fixed extent & a non-default origin.

  • #6110 ebc2f5d - Avoid re-rendering useNodesData consumers when only the position, selection or measurements of a node change.

  • #5989 bf27626 - Prevent jumping nodes when origin node option is used

  • #6071 a3d15ed - Do not scan nodes and edges for selection changes while no onSelectionChange handler is registered.

  • #6064 de1e4c5 - Resolve the promises of animated viewport functions like fitView and setCenter with false when a user interaction or another viewport change interrupts the animation, instead of leaving them pending

  • #6131 8849014 - Narrow data by type when NodeProps receives a union of node types.

  • #6103 1cac28a - Fix missing edges when controlled node updates overlap with node measurement.

  • #5996 885ac9e - Performance: Optimize processing of nodes & edges

  • #6117 2e038ee - Fix useConnection re-rendering on every pointermove even when a selector is passed

  • Updated dependencies [dff4dad, dae45aa, 13bf20a, 5d448e9, fbe2ba5, 96b196f, 69dc311, b872a5b, 1d9b9cd, b1ad016, de1e4c5, bf27626, 9fcddb8, 5161767, 615c5f6, de1e4c5, 8849014, 7b52b50, 885ac9e]:

    • @xyflow/system@1.0.0
2 hours ago
xyflow

@xyflow/system@1.0.0

Major Changes

  • #6114 dff4dad - Align the connection APIs across all frameworks on NodeConnection.

    • Remove getHandleConnections. Use getNodeConnections({ nodeId, type, handleId }) instead: id is renamed to handleId and type is optional.
    • Add getNodeConnections to useSvelteFlow.
    • HandleConnection type removed: use NodeConnection instead.
  • #6117 dae45aa - onConnectEnd and onReconnectEnd now receive to in flow coordinates instead of screen coordinates

  • #6115 b1ad016 - Replace paneClickDistance with paneDragThreshold (default 1). Like nodeDragThreshold, the pane only starts panning or selecting once the pointer has moved further than the threshold; otherwise it counts as a click. Works with every mouse button.

  • #6064 de1e4c5 - Resolve PanZoomInstance.setViewport with true when the transition finishes and false when it gets interrupted.

  • #5556 9fcddb8 - Remove nodeClickDistance. Whether a click on a node fires is now determined solely by whether a drag actually moved the node: clicks are suppressed only after a drag changed node positions. Use nodeDragThreshold (and snapGrid) to control this.

  • #5987 615c5f6 - Rename the measured handle geometry type from Handle to HandleBounds so it no longer collides with the <Handle /> component.

Patch Changes

  • #6109 13bf20a - Call onConnect and onDisconnect of useNodeConnections reliably and keep its result up to date when edges are added, removed, reconnected or replaced.

  • #6074 5d448e9 - Improve deletion performance for large graphs.

  • #6119 fbe2ba5 - Respect panOnDrag when panning with the middle mouse button on nodes, edges and selections.

  • #5915 96b196f - Remove requirement of parent nodes to appear before child nodes in the nodes array

  • #5927 69dc311 - Use 5% as new default padding for fitView, and fitBounds.

  • #6029 b872a5b - Improve panning performance by avoiding a full style recalculation when the pane cursor changes.

  • #6084 1d9b9cd - Fix resizing nodes with a fixed extent & a non-default origin.

  • #5989 bf27626 - Prevent jumping nodes when origin node option is used

  • #6111 5161767 - Delete all descendants of a parent node, regardless of their order in nodes

  • #6064 de1e4c5 - Resolve the promises of animated viewport functions like fitView and setCenter with false when a user interaction or another viewport change interrupts the animation, instead of leaving them pending

  • #6131 8849014 - Narrow data by type when NodeProps receives a union of node types.

  • #5927 7b52b50 - Numbers passed to fitViewOptions.padding are interpreted as pixel values instead of legacy units. Use percentage values instead (0.1 ≈ 4.5%, 0.5 ≈ 16.7%, 1 ≈ 25%, 2 ≈ 33%)

  • #5996 885ac9e - Performance: Optimize processing of nodes & edges

2 hours ago
react-flow

@xyflow/react@13.0.0

Major Changes

  • #6114 dff4dad - Align the connection APIs across all frameworks on NodeConnection.

    • Remove getHandleConnections. Use getNodeConnections({ nodeId, type, handleId }) instead: id is renamed to handleId and type is optional.
    • Add getNodeConnections to useSvelteFlow.
    • HandleConnection type removed: use NodeConnection instead.
  • #6117 dae45aa - onConnectEnd and onReconnectEnd now receive to in flow coordinates instead of screen coordinates

  • #5915 96b196f - Remove requirement of parent nodes to appear before child nodes in the nodes array

  • #5927 69dc311 - Use 5% as new default padding for fitView, and fitBounds.

  • #5866 479082d - Remove deprecated useHandleConnections hook.

  • #5800 7eca9fd - Replace useStore with useNodesStore, useEdgesStore, useViewportStore, useOptionsStore, useConnectionStore and useSelectionStore. They no longer accept an equality function, use useShallow instead.

  • #5996 885ac9e - Performance: Move options, nodes, edges, selections and connection into separate stores.

  • #6115 b1ad016 - Replace paneClickDistance with paneDragThreshold (default 1). Like nodeDragThreshold, the pane only starts panning or selecting once the pointer has moved further than the threshold; otherwise it counts as a click. Works with every mouse button.

  • #5843 9eb6929 - Use system color mode by default, add forceColorMode to opt-out.

  • #5556 9fcddb8 - Remove nodeClickDistance. Whether a click on a node fires is now determined solely by whether a drag actually moved the node: clicks are suppressed only after a drag changed node positions. Use nodeDragThreshold (and snapGrid) to control this.

  • #5987 615c5f6 - Rename the measured handle geometry type from Handle to HandleBounds so it no longer collides with the <Handle /> component.

  • #5996 eaf5a2d - Remove lib ("react") entry from store.

  • #5927 7b52b50 - Numbers passed to fitViewOptions.padding are interpreted as pixel values instead of legacy units. Use percentage values instead (0.1 ≈ 4.5%, 0.5 ≈ 16.7%, 1 ≈ 25%, 2 ≈ 33%)

  • #5866 0d1893a - Require React 18 as minimal supported version

  • #5944 5ff09ef - Pass NodeChangeset/EdgeChangeset class to onNodesChange/onEdgesChange or onnodeschange/onedgeschange.

  • #5866 1a77ebf - Remove UMD build.

Minor Changes

  • #5939 621f5d9 - Add changeParent to useReactFlow, useSvelteFlow and useVueFlow, to easily change the parent of a node without calculating a new position.

  • #5978 bf83263 - Elevate selected edges by default (elevateEdgesOnSelect now defaults to true), so overlapping edges can be reconnected by selecting them first.

  • #5844 861a6be - Exported styles now live in @layer xyflow.

  • #5996 885ac9e - Performance: Add fine grained reactivity when subscribing to specific nodes and edges.

  • #6029 b872a5b - Improve panning performance by avoiding a full style recalculation when the pane cursor changes.

  • #5866 1a77ebf - Add style import from @xyflow/react/style.css.

  • #5996 885ac9e - Performance: Add fine grained reactivity to handles when making a new connection

  • #5993 901b0e4 - Add xy-theme.css stylesheet (@xyflow/<lib>/xy-theme.css) that ships the xyflow default theme on top of base.css.

  • #5996 885ac9e - Performance: Compile library with React Compiler

  • #5939 846d686 - Add useNode and useEdge hooks for subscribing to changes to specific nodes & edges

  • #6099 66da96b - Add useEqualSelector hook

Patch Changes

  • #5866 7da73f2 - Include source maps and src folder in package. "Go to definition" now links to the source code instead of the generated types

  • #6084 1d9b9cd - Fix resizing nodes with a fixed extent & a non-default origin.

  • #6110 ebc2f5d - Avoid re-rendering useNodesData consumers when only the position, selection or measurements of a node change.

  • #5989 bf27626 - Prevent jumping nodes when origin node option is used

  • #6071 a3d15ed - Do not scan nodes and edges for selection changes while no onSelectionChange handler is registered.

  • #6064 de1e4c5 - Resolve the promises of animated viewport functions like fitView and setCenter with false when a user interaction or another viewport change interrupts the animation, instead of leaving them pending

  • #6131 8849014 - Narrow data by type when NodeProps receives a union of node types.

  • #6103 1cac28a - Fix missing edges when controlled node updates overlap with node measurement.

  • #5996 885ac9e - Performance: Optimize processing of nodes & edges

  • #6117 2e038ee - Fix useConnection re-rendering on every pointermove even when a selector is passed

  • Updated dependencies [dff4dad, dae45aa, 13bf20a, 5d448e9, fbe2ba5, 96b196f, 69dc311, b872a5b, 1d9b9cd, b1ad016, de1e4c5, bf27626, 9fcddb8, 5161767, 615c5f6, de1e4c5, 8849014, 7b52b50, 885ac9e]:

    • @xyflow/system@1.0.0
2 hours ago
xyflow

@xyflow/svelte@2.0.0

Major Changes

  • #6114 dff4dad - Align the connection APIs across all frameworks on NodeConnection.

    • Remove getHandleConnections. Use getNodeConnections({ nodeId, type, handleId }) instead: id is renamed to handleId and type is optional.
    • Add getNodeConnections to useSvelteFlow.
    • HandleConnection type removed: use NodeConnection instead.
  • #6082 70615a3 - Removed setters from useNodes and useEdges in favor of better change handling via updateNode & updateEdge in useSvelteFlow.

  • #6117 dae45aa - onConnectEnd and onReconnectEnd now receive to in flow coordinates instead of screen coordinates

  • #5965 14093fa - Removed useColorMode hook.

  • #5915 96b196f - Remove requirement of parent nodes to appear before child nodes in the nodes array

  • #5927 69dc311 - Use 5% as new default padding for fitView, and fitBounds.

  • #6115 b1ad016 - Replace paneClickDistance with paneDragThreshold (default 1). Like nodeDragThreshold, the pane only starts panning or selecting once the pointer has moved further than the threshold; otherwise it counts as a click. Works with every mouse button.

  • #5843 9eb6929 - Use system color mode by default, add forceColorMode to opt-out.

  • #5556 9fcddb8 - Remove nodeClickDistance. Whether a click on a node fires is now determined solely by whether a drag actually moved the node: clicks are suppressed only after a drag changed node positions. Use nodeDragThreshold (and snapGrid) to control this.

  • #5987 615c5f6 - Rename the measured handle geometry type from Handle to HandleBounds so it no longer collides with the <Handle /> component.

  • #5927 7b52b50 - Numbers passed to fitViewOptions.padding are interpreted as pixel values instead of legacy units. Use percentage values instead (0.1 ≈ 4.5%, 0.5 ≈ 16.7%, 1 ≈ 25%, 2 ≈ 33%)

  • #5944 5ff09ef - Pass NodeChangeset/EdgeChangeset class to onNodesChange/onEdgesChange or onnodeschange/onedgeschange.

  • #5967 257d5d7 - Rename useStore to useSvelteFlowStore

  • #5842 968d801 - Hooks do not require to be $derived anymore and accept a function parameter instead.

Minor Changes

  • #5866 1a77ebf - Add style import from @xyflow/svelte/style.css.

  • #5939 621f5d9 - Add changeParent to useReactFlow, useSvelteFlow and useVueFlow, to easily change the parent of a node without calculating a new position.

  • #6082 4bdeda0 - Control and monitor any changes to your nodes & edges via onnodeschange & onedgeschange. Clearing a changeset with changes.clear() in onnodeschange prevents automatic application of changes. Use it to manually manage changes to nodes & edges.

  • #5844 861a6be - Exported styles now live in @layer xyflow.

  • #6029 b872a5b - Improve panning performance by avoiding a full style recalculation when the pane cursor changes.

  • #5993 901b0e4 - Add xy-theme.css stylesheet (@xyflow/<lib>/xy-theme.css) that ships the xyflow default theme on top of base.css.

  • #5939 846d686 - Add useNode and useEdge hooks for subscribing to changes to specific nodes & edges

Patch Changes

2 hours ago
react-flow

@xyflow/svelte@2.0.0

Major Changes

  • #6114 dff4dad - Align the connection APIs across all frameworks on NodeConnection.

    • Remove getHandleConnections. Use getNodeConnections({ nodeId, type, handleId }) instead: id is renamed to handleId and type is optional.
    • Add getNodeConnections to useSvelteFlow.
    • HandleConnection type removed: use NodeConnection instead.
  • #6082 70615a3 - Removed setters from useNodes and useEdges in favor of better change handling via updateNode & updateEdge in useSvelteFlow.

  • #6117 dae45aa - onConnectEnd and onReconnectEnd now receive to in flow coordinates instead of screen coordinates

  • #5965 14093fa - Removed useColorMode hook.

  • #5915 96b196f - Remove requirement of parent nodes to appear before child nodes in the nodes array

  • #5927 69dc311 - Use 5% as new default padding for fitView, and fitBounds.

  • #6115 b1ad016 - Replace paneClickDistance with paneDragThreshold (default 1). Like nodeDragThreshold, the pane only starts panning or selecting once the pointer has moved further than the threshold; otherwise it counts as a click. Works with every mouse button.

  • #5843 9eb6929 - Use system color mode by default, add forceColorMode to opt-out.

  • #5556 9fcddb8 - Remove nodeClickDistance. Whether a click on a node fires is now determined solely by whether a drag actually moved the node: clicks are suppressed only after a drag changed node positions. Use nodeDragThreshold (and snapGrid) to control this.

  • #5987 615c5f6 - Rename the measured handle geometry type from Handle to HandleBounds so it no longer collides with the <Handle /> component.

  • #5927 7b52b50 - Numbers passed to fitViewOptions.padding are interpreted as pixel values instead of legacy units. Use percentage values instead (0.1 ≈ 4.5%, 0.5 ≈ 16.7%, 1 ≈ 25%, 2 ≈ 33%)

  • #5944 5ff09ef - Pass NodeChangeset/EdgeChangeset class to onNodesChange/onEdgesChange or onnodeschange/onedgeschange.

  • #5967 257d5d7 - Rename useStore to useSvelteFlowStore

  • #5842 968d801 - Hooks do not require to be $derived anymore and accept a function parameter instead.

Minor Changes

  • #5866 1a77ebf - Add style import from @xyflow/svelte/style.css.

  • #5939 621f5d9 - Add changeParent to useReactFlow, useSvelteFlow and useVueFlow, to easily change the parent of a node without calculating a new position.

  • #6082 4bdeda0 - Control and monitor any changes to your nodes & edges via onnodeschange & onedgeschange. Clearing a changeset with changes.clear() in onnodeschange prevents automatic application of changes. Use it to manually manage changes to nodes & edges.

  • #5844 861a6be - Exported styles now live in @layer xyflow.

  • #6029 b872a5b - Improve panning performance by avoiding a full style recalculation when the pane cursor changes.

  • #5993 901b0e4 - Add xy-theme.css stylesheet (@xyflow/<lib>/xy-theme.css) that ships the xyflow default theme on top of base.css.

  • #5939 846d686 - Add useNode and useEdge hooks for subscribing to changes to specific nodes & edges

Patch Changes

2 hours ago
react-flow

@xyflow/system@1.0.0

Major Changes

  • #6114 dff4dad - Align the connection APIs across all frameworks on NodeConnection.

    • Remove getHandleConnections. Use getNodeConnections({ nodeId, type, handleId }) instead: id is renamed to handleId and type is optional.
    • Add getNodeConnections to useSvelteFlow.
    • HandleConnection type removed: use NodeConnection instead.
  • #6117 dae45aa - onConnectEnd and onReconnectEnd now receive to in flow coordinates instead of screen coordinates

  • #6115 b1ad016 - Replace paneClickDistance with paneDragThreshold (default 1). Like nodeDragThreshold, the pane only starts panning or selecting once the pointer has moved further than the threshold; otherwise it counts as a click. Works with every mouse button.

  • #6064 de1e4c5 - Resolve PanZoomInstance.setViewport with true when the transition finishes and false when it gets interrupted.

  • #5556 9fcddb8 - Remove nodeClickDistance. Whether a click on a node fires is now determined solely by whether a drag actually moved the node: clicks are suppressed only after a drag changed node positions. Use nodeDragThreshold (and snapGrid) to control this.

  • #5987 615c5f6 - Rename the measured handle geometry type from Handle to HandleBounds so it no longer collides with the <Handle /> component.

Patch Changes

  • #6109 13bf20a - Call onConnect and onDisconnect of useNodeConnections reliably and keep its result up to date when edges are added, removed, reconnected or replaced.

  • #6074 5d448e9 - Improve deletion performance for large graphs.

  • #6119 fbe2ba5 - Respect panOnDrag when panning with the middle mouse button on nodes, edges and selections.

  • #5915 96b196f - Remove requirement of parent nodes to appear before child nodes in the nodes array

  • #5927 69dc311 - Use 5% as new default padding for fitView, and fitBounds.

  • #6029 b872a5b - Improve panning performance by avoiding a full style recalculation when the pane cursor changes.

  • #6084 1d9b9cd - Fix resizing nodes with a fixed extent & a non-default origin.

  • #5989 bf27626 - Prevent jumping nodes when origin node option is used

  • #6111 5161767 - Delete all descendants of a parent node, regardless of their order in nodes

  • #6064 de1e4c5 - Resolve the promises of animated viewport functions like fitView and setCenter with false when a user interaction or another viewport change interrupts the animation, instead of leaving them pending

  • #6131 8849014 - Narrow data by type when NodeProps receives a union of node types.

  • #5927 7b52b50 - Numbers passed to fitViewOptions.padding are interpreted as pixel values instead of legacy units. Use percentage values instead (0.1 ≈ 4.5%, 0.5 ≈ 16.7%, 1 ≈ 25%, 2 ≈ 33%)

  • #5996 885ac9e - Performance: Optimize processing of nodes & edges