56 KiB
@xyflow/svelte
1.4.2
Patch Changes
-
#5603
17a175791Thanks @peterkogo! - Fix onPaneClick always firing when moving the viewport -
#5615
8b35c77ebThanks @peterkogo! - Fix wrong positions when resizing nodes with a non-default node-origin -
#5578
00bcb9f5fThanks @peterkogo! - Pass current pointer position to connection -
Updated dependencies [
00bcb9f5f]:- @xyflow/system@0.0.73
1.4.1
Patch Changes
-
#5572
2a401ed67Thanks @peterkogo! - Fix showing selection box when no nodes are selected -
#5558
dca0a30f2Thanks @peterkogo! - RemoveedgeIdfromEdgeToolbarprops -
#5565
cbab3d8beThanks @0x0f0f0f! - Pass nodeId to MiniMapNode -
#5572
5ec0cac7fThanks @peterkogo! - Fix onPaneClick events being suppressed when selectionOnDrag=true -
#5572
9dccac89fThanks @peterkogo! - Remove focus outline from selection box -
Updated dependencies [
5ec0cac7f]:- @xyflow/system@0.0.72
1.4.0
Minor Changes
-
#5544
c17b49f4cThanks @0x0f0f0f! - AddEdgeToolbarcomponent -
#5550
6ffb9f790Thanks @peterkogo! - Prevent child nodes of different parents from overlapping -
#5551
6bb64b3edThanks @moklick! - Allow to start a selection above a node -
#5526
1b0bd9794Thanks @peterkogo! - AddresizeDirectionprop toResizeControls
Patch Changes
-
#5538
87a868958Thanks @peterkogo! - Suppresssvelte/prefer-svelte-reactivitywarnings -
#5529
da77772deThanks @peterkogo! - Fix selected set to false on every node and edge eagerly -
#5528
d50a963cdThanks @peterkogo! - LetNodeResizerprops change during ongoing resize -
#5546
8a9ee2d83Thanks @0x0f0f0f! - Do not crash mini map if all nodes are hidden -
#5547
1c8961207Thanks @moklick! - Always callonMoveEndwhenonMoveStartwas called -
Updated dependencies [
c17b49f4c,6ffb9f790,d50a963cd,6bb64b3ed,8a9ee2d83,1c8961207]:- @xyflow/system@0.0.71
1.3.1
Patch Changes
-
#5515
9b4e99029Thanks @peterkogo! - Fix id of static handles not being parsed -
#5512
70b672604Thanks @peterkogo! - Prevent native page zoom when pinch zooming on node with nowheel class -
Updated dependencies [
9b4e99029,70b672604]:- @xyflow/system@0.0.70
1.3.0
Minor Changes
- #5496
d23c3dfc5Thanks @printerscanner! - Pass a customnodeComponentto Svelteflow's Minimap
Patch Changes
-
#5480
f869808e3Thanks @peterkogo! - Prevent multi-touch events while making a new connection -
#5510
cdd671699Thanks @peterkogo! - Add missing props autoPanSpeed and panOnScrollSpeed -
#5482
56381ae54Thanks @peterkogo! - Make isNodeIntersecting behave the same as getIntersectingNodes -
#5509
b6ae4cc11Thanks @moklick! - Prevent calling onResizeEnd if node was not resized -
#5511
d891e5ff1Thanks @peterkogo! - Fix regression: elevate edges if connected nodes are selected -
#5497
eba087e8bThanks @peterkogo! - Skip eagerly rendering nodes when node dimensions and handles are predefined -
#5455
86e8b4913Thanks @Sec-ant! - Fix style attribute not being propagated to wrapper -
Updated dependencies [
f869808e3,2a35c65a0,b6ae4cc11,d891e5ff1,eba087e8b]:- @xyflow/system@0.0.69
1.2.4
Patch Changes
-
#5472
372c493aThanks @moklick! - Remove dangerouslySetInnerHTML from domAttributes -
#5459
2e7c89c6Thanks @0x0f0f0f! - Fix open arrow marker using fill color from edge instead of none -
#5468
100c95fdThanks @peterkogo! - Allow returning void, false and null from onbeforeconnect -
#5467
be45c9fbThanks @peterkogo! - Fix ondelete not getting called when using deleteElements -
Updated dependencies [
5ece6b36,53da1193]:- @xyflow/system@0.0.68
1.2.3
Patch Changes
-
#5444
9aca4839Thanks @paula-stacho! - Export MiniMapNode -
#5443
144f8febThanks @moklick! - Use 1 as the default for interactive Minimap zoom step -
#5428
f18e9856Thanks @Karl255! - Fix clicking on detached handle elements not initiating drawing of connections -
#5453
7a088817Thanks @moklick! - Snap selection instead of separate nodes when snap grid is enabled -
#5448
f5fe1d71Thanks @moklick! - Use correct HandleConnection type for Handle onConnect -
#5419
daa33fb3Thanks @0x0f0f0f! - Make arrow heads markers fallback to --xy-edge-stroke CSS variable when passing null as marker color -
Updated dependencies [
144f8feb,f18e9856,7a088817,6838df9d,fddbb7de,f5fe1d71,daa33fb3]:- @xyflow/system@0.0.67
1.2.2
Patch Changes
-
#5394
21db22d4Thanks @moklick! - Return intersections correctly of passed node is bigger than intersecting nodes -
#5376
f0ce2c87Thanks @kennyjwilli! - Add stepPosition param to step edge -
Updated dependencies [
864d4188,f0ce2c87]:- @xyflow/system@0.0.66
1.2.1
Patch Changes
- Updated dependencies [
26f2cdd7]:- @xyflow/system@0.0.65
1.2.0
Minor Changes
-
#5361
90e9247aThanks @peterkogo! - Render edges above nodes when they are within a subflow -
#5344
2441bf8dThanks @moklick! - Add connectionDragThreshold prop
Patch Changes
-
#5362
72dc1d60Thanks @moklick! - Remove pointer events from Panel via CSS while a selection gets dragged -
Updated dependencies [
72dc1d60,90e9247a,2441bf8d]:- @xyflow/system@0.0.64
1.1.1
Patch Changes
-
#5339
56ebde81Thanks @jrmajor! - Fixonmove,onmovestartandonmoveendevents not firing -
#5335
8474ba49Thanks @peterkogo! - Prevent proxying objects in the store -
#5336
d6db97c5Thanks @peterkogo! - FixuseNodeConnectionscallbacks firing only when returned signal is used -
#5333
3d7e8b6bThanks @peterkogo! - Add missing type exports -
Updated dependencies [
c4312d89,3d7e8b6b,9c61000c]:- @xyflow/system@0.0.63
1.1.0
Minor Changes
-
#5299
848b486bThanks @printerscanner! - AddariaRoleprop to nodes and edges -
#5276
6ce44a05Thanks @moklick! - Add aneaseandinterpolateoption to all function that alter the viewport -
#5277
f59730ceThanks @printerscanner! - AddariaLabelConfigprop for customizing UI text like aria labels and descriptions. -
#5317
09458f52Thanks @moklick! - AdddomAttributesoption for nodes and edges -
#5326
050b511cThanks @peterkogo! - Prevent NodeResizer controls to become too small when zooming out -
#5308
09fab679Thanks @printerscanner! - Focus nodes on tab if not within the viewport and add a new propautoPanOnNodeFocus
Patch Changes
-
#5327
75ed6decThanks @peterkogo! - Prevent selecting of edges when spacebar is pressed -
#5294
4a582e23Thanks @peterkogo! - Fix data inEdgePropsthat was not typed correctly -
#5327
d0c36fdbThanks @peterkogo! - Fix initial fitView for SSR -
#5275
a67bfc09Thanks @peterkogo! - Fix setting nodesInitialized multiple times -
#5271
5224a1a2Thanks @leejuyuu! - Change a11y description inline styles to classes -
#5327
d0c36fdbThanks @peterkogo! - FixViewportPortalnot working when used outside ofSvelteFlowcomponent -
#5295
93aefe71Thanks @peterkogo! - Export missing callback types -
#5327
d0c36fdbThanks @peterkogo! - Display nodes correctly in SSR output -
Updated dependencies [
848b486b,dba6faf2,6ce44a05,f59730ce,09458f52,050b511c]:- @xyflow/system@0.0.62
1.0.2
Patch Changes
-
#5266
77107453Thanks @peterkogo! - Fix connection snapping for handles larger than connectionRadius -
#5267
d9f0ffbeThanks @peterkogo! - Make Background, Panel, Minimap work outside of SvelteFlow component -
Updated dependencies [
77107453]:- @xyflow/system@0.0.61
1.0.1
Patch Changes
-
#5258
47f7a0b6Thanks @peterkogo! - Fix fitView not working when accessed through the SvelteFlowProvider -
#5259
77bf79c4Thanks @peterkogo! - Fix background-color css variable fallback. -
Updated dependencies [
77bf79c4]:- @xyflow/system@0.0.60
1.0.0
Yeah! Svelte Flow 1.0. is here 🚀 It is based on Svelte 5 and introduces a lot of new features and improvements. Please refer to the migration guide to see how to upgrade.
New features
- Reconnect edges: You can reconnect your edges by using the new
<EdgeReconnectAnchor />component. It can be used to add custom reconnection points on custom edges. - Keyboard navigation & A11y: We added support for keyboard navigation and improved accessibility for screen readers. You can now tab through nodes and edges and move nodes with the arrow keys. Can be disabled via disableKeyboardA11y
- Click connect: You can now create a new connection by clicking on a handle one by one.
- Enhanced ViewportPortal: You can now decide if you want to render something below or above the nodes & edges in the viewport.
- Improved fitView: We finetuned the
fitViewfunction to better work with dynamically added nodes. - colorModeSSR prop: You can pass a fallback color mode for server side rendering when colorMode is set to 'system'.
- elevateNodesOnSelect & elevateEdgesOnSelect: Control if nodes & edges should be elevated via z-index when selected.
- noDragClass, noWheelClass, noPanClass: You can now modify the class name used to disable dragging, panning and zooming.
- onselectionchange & useOnSelectionChange: You can now listen to selection changes via a callback
0.1.39
Patch Changes
- Updated dependencies [
a95f0e2f]:- @xyflow/system@0.0.59
0.1.38
Patch Changes
- Updated dependencies [
2a03213b]:- @xyflow/system@0.0.58
0.1.37
Patch Changes
0.1.36
Patch Changes
-
#5212
0f43b8eaThanks @moklick! - Add polyfill forPromise.withResolvers -
#5191
e5735b51Thanks @peterkogo! - Fix legacy padding being slightly larger than before -
Updated dependencies [
0f43b8ea,fc241253,98fe23c7,e5735b51]:- @xyflow/system@0.0.56
0.1.35
Patch Changes
-
#5158
06696060Thanks @dimaMachina! - Fix typo in TSDoc commentsReact Flow->Svelte Flow -
Updated dependencies [
02a3b746,cbe305e1,1f671bd4,aaebc462,6ec942fc]:- @xyflow/system@0.0.55
0.1.34
Patch Changes
-
#5139
89de9ca8Thanks @dimaMachina! - Usergbafor colors with opacity instead ofrgbforMiniMapmask color -
Updated dependencies [
f819005b,24a1bc89,36657cd6,89de9ca8,2ac6e155,f0f378e5]:- @xyflow/system@0.0.54
0.1.33
Patch Changes
- #5124
b76f7f9eThanks @bjornosal! - Export NodeConnection type
0.1.32
Patch Changes
-
#5059
065ff89dThanks @bcakmakoglu! - Prevent onPaneClick when connection is in progress. Closes #5057 -
#5067
cb685281Thanks @peterkogo! - Fix fitView not working immediately after adding new nodes -
#5093
65825e89Thanks @moklick! - Hidden nodes are not displayed in the mini map anymore -
Updated dependencies [
5d15b01b,cb685281,a79f30b3]:- @xyflow/system@0.0.53
0.1.31
Patch Changes
-
#5019
3e80317cThanks @dimaMachina! - Add"./package.json" to theexports` field so that users can import it -
Updated dependencies [
99dd7d35]:- @xyflow/system@0.0.52
0.1.30
Patch Changes
-
#5010
6c121d42Thanks @moklick! - Add more TSDocs to components, hooks, utils funcs and types -
Updated dependencies [
6c121d42,4947029c,e8e0d684]:- @xyflow/system@0.0.51
0.1.29
Patch Changes
-
#4957
fe843982Thanks @peterkogo! - Narrow properties selected, selectable, deletable, draggable of NodeProps type to be required. -
Updated dependencies [
fe843982,e73ef09f]:- @xyflow/system@0.0.50
0.1.28
Patch Changes
-
#4949
592c7eafThanks @peterkogo! - Fix useNodeConnection hook not returning all connected edges. -
Updated dependencies [
592c7eaf]:- @xyflow/system@0.0.49
0.1.27
Patch Changes
-
#4937
9d940300Thanks @jrmoynihan! - Expose props of Controls -
#4947
868aa3f3Thanks @moklick! - Export ResizeControlVariant correctly as a value. -
#4880
e2d849dcThanks @crimx! - Add type check for all event targets -
#4725
e10f53cfThanks @peterkogo! - Add useNodeConnections hook to track all connections to a node. Can be filtered by handleType and handleId. -
Updated dependencies [
e2d849dc,e10f53cf,4947f683]:- @xyflow/system@0.0.48
0.1.26
Patch Changes
- #4897
c6890512Thanks @peterkogo! - Freeze required @svelte-put/shortcut version to 3.1.1 to prevent breaking of key inputs.
0.1.25
Patch Changes
-
#4865
2c4acc2bThanks @moklick! - Add group node to BuiltInNode type. Thanks @sjdemartini! -
#4877
9a8309daThanks @peterkogo! - Fix intersections for nodes with origins other than [0,0]. Thanks @gmvrpw! -
Updated dependencies [
d60331e6]:- @xyflow/system@0.0.47
0.1.24
Patch Changes
-
#4790
2fa9a920Thanks @peterkogo! - Fix node dragging & resizing while zooming on flow that does not cover whole browser window. -
#4782
323e1b35Thanks @peterkogo! - Fix node intersections in nested flow. -
Updated dependencies [
2fa9a920,323e1b35]:- @xyflow/system@0.0.46
0.1.23
Patch Changes
-
#4772
7f670ab0Thanks @mistic! - Splits exports field in package.json to support an explicit resolution for browser, node and default to resolve issues with webpack esm module resolution. -
Updated dependencies [
7f670ab0]:- @xyflow/system@0.0.45
0.1.22
Patch Changes
-
#4730
2c590b90Thanks @peterkogo! - Fixed rare crash while dragging -
#4758
e555bd1bThanks @peterkogo! - Bump Svelte peer dependency to 5.0.0 -
Updated dependencies [
005ae1c0,2c590b90]:- @xyflow/system@0.0.44
0.1.21
Patch Changes
- #4718
51f08aacThanks @peterkogo! - Fixed hook useNodesData unexpectedly returning undefined
0.1.20
Patch Changes
-
#4670
b056564cThanks @peterkogo! - Fix initialfitViewnot working correctly fornodeOriginother than [0,0] -
#4670
b056564cThanks @peterkogo! - ImprovefitViewto respect clamped node positions based onnodeExtent -
#4653
02390f99Thanks @bcakmakoglu! - Calculate viewport dimensions infitViewinstead of using stored dimensions. Fixes #4652 -
Updated dependencies [
99ba64ac,b056564c]:- @xyflow/system@0.0.43
0.1.19
Patch Changes
-
#4477
d5592e75Thanks @peterkogo! - AddgetNodesBoundstouseReactFlow/useSvelteFlowhook as the new recommended way of determining node bounds. -
#4572
1445e148Thanks @peterkogo! - Add nodeExtent prop to<SvelteFlow />. You can now restrict nodes from leaving a specified extent. -
#4572
d9563505Thanks @peterkogo! - Improve handling of global and individualnodeExtents. Nodes will never render outside of specified extents. -
Updated dependencies [
d5592e75,d9563505]:- @xyflow/system@0.0.42
0.1.18
Patch Changes
-
#4611
2aaa709cThanks @moklick! - make onViewportChange a dynamic prop -
Updated dependencies [
2aaa709c]:- @xyflow/system@0.0.41
0.1.17
Patch Changes
-
#4574
b65aed19Thanks @bcakmakoglu! - AddgetHandleConnectionshelper touseReactFlow&useSvelteFlow -
Updated dependencies [
5138d90b,12dbe125]:- @xyflow/system@0.0.40
0.1.16
Patch Changes
-
#4568
c3e62782Thanks @peterkogo! - Only display grab cursor when panOnDrag is on left mouse button -
#4569
54bfb6d9Thanks @peterkogo! - Fix getIntersectingNodes for subflows -
Updated dependencies [
c3e62782]:- @xyflow/system@0.0.39
0.1.15
Patch Changes
-
#4510
12313a5bThanks @bcakmakoglu! - RenameisConnectableprop locally toisConnectablePropto avoid naming collision with derived value ofisConnectablein<Handle>component. -
#4517
085951bcThanks @ghostdevv! - fix: make svelte-preprocess a dev dep -
#4549
99733c01Thanks @moklick! - feat(onConnectEnd): pass connectionState param -
Updated dependencies [
b63a3734,24e87e39,692e6440,559d4926,4ecfd7e1,e7ef328f,99733c01]:- @xyflow/system@0.0.38
0.1.14
Patch Changes
- #4498
7a6e9e30Thanks @peterkogo! - fix(pane) only capture pointer after a valid selection has started, fixes #4492
0.1.13
Patch Changes
0.1.12
Patch Changes
-
#4446
80baf53bThanks @moklick! - fix(resizer): export types -
Updated dependencies [
80baf53b,4cccd06a]:- @xyflow/system@0.0.36
0.1.11
Patch Changes
-
#4434
1bda2451Thanks @moklick! - fix(selection): handle pointer capture for selectionOnDrag -
Updated dependencies [
d2da5765]:- @xyflow/system@0.0.35
0.1.10
- add
paneDistanceClickprop (max distance between mousedown/up that will trigger a click) - returned nodes in
on:nodedragstopare set todragging=false
0.1.9
- return Promises for
setViewport,fitView,fitBoundsandzoomToto be able to await viewport update
0.1.8
useConnectionreturnsConnectionStatewithtoNodeandtoHandle- node origin is part of position absolute
- refactor connection handling
0.1.7
- revise selection usability (capture while dragging out of the flow)
- only prevent shift scrolling when selection is actually in progress
- use correct end handle position when drawing a connection lines
- determine correct end positions for connection lines
0.1.6
- fix node origin bug
0.1.5
- prevent zooming on mobile if zoomOnPinch is false
- add straight edge to path built-in-types
- abort drag when multiple touches are detected
- fix merge_styles error
0.1.4
- add
selectable,deletableanddraggableto node and edge props - add
parentIdto node props - add
on:edgemouseenterandon:edgemouseleaveevent handler - fix deselection of edges
- remove pointer events from panel when user selection is active
- fix viewport initialization with user viewport
- fix parent node lookup in
evaluateAbsolutePosition- thanks @lcsfort
0.1.3
- fix
NodeToolbarfor subflows
0.1.2
- export
InternalNodetype
0.1.1
- export
useInternalNodehook
0.1.0
This is a bigger update for Svelte Flow to keep up with the latest changes we made for React Flow and the Svelte5 rewrite. The biggest change is the separation of user nodes (type Node) and internal nodes (type InternalNode), which includes a renaming of the node.computed attribute to node.measured. In the previous versions, we stored internals in node[internalsSymbol]. This doesn't exist anymore, but we only add it to our internal nodes in node.internals..
⚠️ Breaking
- rename
node.computedtonode.measured- this attribute only includeswidthandheightand nopositionAbsoluteanymore. For this we added the helpersgetInternalNodeanduseInternalNode - rename
node.parentNodetonode.parentId
More updates:
- add
isValidConnectionfor<Handle />component - add
fitViewOptionsfor<Controls />component - add
getInternalNodetouseSvelteFlow - add
useInternalNodehook - don't reset nodes and edges when svelte flow unmounts - thanks @darabos
- fix node event types - thanks @RedPhoenixQ
- make handleId and isTarget reactive - thanks @darabos
- fix MiniMap interaction for touch devices
- fix pane: pinch zoom on windows
- fix nodes: return user node in node event handlers
0.0.41
- fix: re-observe nodes when not initialized
0.0.40
- add
orientation('horizontal' or 'vertical'),styleandclassprop forControlscomponent - allow multiple keys for
deleteKey,selectionKey,multiSelectionKey,panActivationKeyandzoomActivationKey - fix node observe / unobserve
- fix edge and node types
- active context menu releases pressed keys to reset selection
0.0.39
⚠️ Breaking changes
on:nodedragstart,on:nodedragandon:nodedragstopare also getting fired if a selection bix is being dragged. We renamed thenodeparam totargetNodeand set it tonullif a selection is being dragged.
Patch changes
- export
EdgeLabelcomponent - add "connectionindicator" class for
Handlecomponent - address a11y warnings
0.0.38
⚠️ Breaking changes
NodePropsgeneric is a node and not only node data.type $$Props = NodeProps<AppNode>
Patch changes
- unify
EdgeandNodetype handling - fix safari: prevent selection of viewport
0.0.37
⚠️ Breaking changes
useNodesDatanot only returns data objects but also the type and the id of the node- status class names for Handle components are slightly different. It's now "connectingfrom" and "connectingto" instead of "connecting"
Patch changes
- better cursor defaults for the pane, nodes and edges
- add
initialWidthandinitialHeightnode attributes for specifying initial dimensions for ssr - always re-measure nodes when new nodes get passed
- fix
NodeResizerwhen used in combination withnodeOrigin
0.0.36
Patch changes
- a better NodeResizer (child nodes do not move when parent node gets resized)
- fix
on:panecontextmenu - add
role="button"to<EdgeLabel />to prevent a11y warnings - don't delete node when input is focused and user presses Backspace + Ctrl (or any other mod key)
useHandleConnections: use context node id when no node id is passed- don't trigger drag start / end when node is not draggable
0.0.35
Minor changes
- add
getNode,getNodes,getEdgeandgetEdgestouseSvelteFlow - add
useInitialized/useNNodesInitializedhooks andoninithandler
Patch changes
- selection box is not interrupted by selectionKey being let go
- Edge label has a default background and is clickable
- do not use fallback handle if a specific id is being used
- use correct id for
<Handle />data-id attribute - fix
getNodesBoundsand add second param for passing options
0.0.34
Minor changes
- add second option param to
screenToFlowPositionfor configuring ifsnapToGridshould be used - add slot to
Controls
Patch changes
- cleanup
ControlButtontypes - infer types for
getIncomers,getOutgoers,updateEdge,addEdgeandgetConnectedEdgesthanks @joeyballentine - refactor handles: prefix with flow id for handling nested flows
- add comments for types like
SvelteFlowPropsorNodefor a better developer experience
0.0.33
Bugfix
- fix
deleteElements - fix dragging when
draggable=false - add
ariaLabelprop for<Controls />
⚠️ Breaking
deleteElementsfunction now takes one object as an argument{ nodes: [], edges: [] }instead of two(nodes, edges)
0.0.32
Features
- add
NodeResizerandNodeResizeControlcomponents for resizing nodes
0.0.31
Bugfix
- fix edge rendering
0.0.30
Features
- add
onbeforedeletehandler to prevent/ manage deletions - TSDocs for hooks and some types
Patch changes
- new nodeDragThreshold default is 1
- refactor/simplify edge rendering
0.0.29
Another huge update for Svelte Flow 🙏 Handling data flows will be way easier with the new hooks and functions. You can now subscribe to connected nodes, receive data and update nodes more easily. We fix a big issue about the <Handle /> component. No more on:connect that only worked for target <Handle /> components but onconnect and ondisconnect that works for every <Handle />.
Features
- add
useHandleConnectionshook for receiving connected node and handle ids for a specific handle - add
useNodesData(ids: string | string[])hook for receiving data from other nodes - export
updateNodeandupdateNodeDatafromuseSvelteFlowto update a node or the data object - add
onedgecreatefunction for passing a certain id or other attributes to a newly created edge
⚠️ Breaking
- replace
on:connect,on:connectstartandon:connectendwithonconnect,onconnectstartandonconnectend, no need to forwardon:connect..anymore
Fixes and minor changes
onconnectandondisconnectcallback work for<Handle />component- don't delete a node when user presses Backspace inside an input/textarea/.nokey element
bgColorprop for Background didn't work- prefix css vars with "xy-"
- don't update nodes and edges on pane click if not necessary
- cleaner types for exported edges
- fix
getIntersectingNodesbug when passingRect
0.0.28
This is a huge update! We added a new <NodeToolbar /> component and a new colorMode ('light' | 'dark' | 'system') prop for toggling dark/light mode.
There are also some breaking changes again (sorry!) but we are very close to the final API for Svelte Flow 1.0.0. The biggest change is that we group node attriubutes (width, height, positionAbsolute) that are added by the library under node.computed. This makes it easier to understand, that this stuff comes from the library itself. node.width and node.height is still an optional node option and can be used to set certain dimensions for SSR or on the client.
- add
<NodeToolbar />component - add
on:selectionclickandon:selectioncontextmenuevent handlers - add
ondelete({ nodes, edges })handler - add
zoomActivationKeyprop - add
widthandheightprop to customNodePropstype - add
colorModeprop ('light' | 'dark' | 'system') - ⚠️ replace
xPosandyPoswithpositionAbsoluteprop to customNodePropstype - ⚠️
node.width/heightandnode.positionAbsolutecan now be found undernode.computed.width/height/positionAbsolute - ⚠️
node.width/heightis still optional an can be used for forcing certain dimensions and SSR - refactor keys: you can now disable keys by setting them to
null(e.g.selectionKey={null}) - performance optimization with internal node lookup
0.0.27
- add
selectionOnDragprop - can be used to create figma-like controls in combination withpanOnDrag={false}/panOnDrag={[1, 2]}+panOnScroll={true} - ⚠️ rename
screenToFlowCoordinatetoscreenToFlowPosition - ⚠️ rename
flowToScreenCoordinatetoflowToScreenPosition - ⚠️ rename
getTransformForBoundstogetViewportForBounds(return{ x: number, y: number, zoom: number }instead of[number, number, number]) - ⚠️ rename
getRectOfNodestogetNodesBounds - simplify handle default styles, so that it's easier to override them
- added e2e tests
0.0.26
- fixes broken version on npm
0.0.25
- add
toObjecttouseSvelteFlowhook - export
BezierEdge,StepEdgeandSmoothStepEdgecomponents - handle window resize (Minimap updates its viewport)
- fix wrongly selected nodes
- fix connection line z-index
- fix broken edges (
interactionWidthwas missing)
0.0.24
- update node automatically when
type,sourcePositionortargetPositionoption changes - prevent dev tool warnings when using built-in node types
- updates
useSvelteFlowhook: - add node type "group"
- add
classprop for BaseEdge - add
idprop for Background - add
selectedprop for MiniMap Node - rename Controls prop
showInteractivetoshowLock
0.0.23
- updates
useSvelteFlowhook:- add
screenToFlowCoordinateandflowToScreenCoordinate - add
getConnectedEdges,getIncomersandgetOutgoers - add
deleteElements - add
fitBounds - add
getIntersectingNodesandisNodeIntersecting
- add
- add
useConnectionhook - add
useNodeshook - add
useEdgeshook - add
viewportprop (writable viewport) - fix selection style
- fix Background component with lines variant
0.0.22
- add
connectionLineslot for rendering a custom connection line - add
connectionLineStyleandconnectionLineContainerStyleprops - add
useConnectionhook - add
nodeDragThresholdprop - add
fitViewOptionsprop - add
defaultEdgeOptionsprop - add
on:edgecontextmenuevent handler prop - add
connectionModeprop - add
attributionPositionprop
0.0.21
- add
on:nodedragstart,on:nodedragandon:nodedragstop - add
on:nodecontextmenu
0.0.20
- [breaking change] use same convention for all custom events: Always pass the original event if possible and additional data
- before:
on:nodeclick: CustomEvent<Node> - after:
on:nodeclick: CustomEvent<{event: MouseEvent, node: Node}>
- before:
- fix
on:connectstartandon:connectendhandlers - fix default styles for
<Controls />component - fix
dragHandlenode option - expose
styleprop for minimap
0.0.19
- make it possible to change edge type dynamically
- fix
hiddenoption for nodes and edges - add
useUpdateNodeInternalshook
0.0.18
- add
nodesDraggableprop - minimap: add default background
0.0.17
- export
useStoreto access internals
0.0.16
- center edge label by default
0.0.15
- fix wrongly displayed connectionline
0.0.14
- export css correctly
0.0.13
- [breaking change] from now on it's necessary to import the styles like
@xyflow/svelte/styles/style.cssor@xyflow/svelte/styles/base.css. This makes it easier to work with tailwind or overwrite styles with regular CSS.
0.0.7 ... 0.0.12
- fix event handlers and rename from
on:node:clicktoon:nodeclick - add
panActivationKeyprop - elevate nodes by default when selected
- use css vars internally and let users overwrite them
0.0.6
- use svelte 4
0.0.5
this release fixes the path bug introduced in 0.0.4
0.0.4
this version is broken because of a wrong path in the package.json
0.0.3
- add
snapGridprop - add
onlyRenderVisibleElementsprop - cleanup some exports and types
0.0.2
- add
connectionRadius
0.0.1
Svelte Flow alpha is here 🔥 You can expect some changes until we reach 1.0.0 but we try to stick as close as possible to the React Flow API. There are no docs yet, but we are working on it! For now the easiest way is to use the autocomplete of your IDE, lookup the props in the SvelteFlow component or check out the React Flow docs.
This very first release comes with lots of features already:
- pass
nodesandedgesas writables - draggable, selectable and deletable nodes
- support for custom
nodeTypesandedgeTypes - basic viewport settings like
fitView,minZoomandmaxZoom - additional components:
<MiniMap />,<Controls />&<Background />