·
2585 commits
to main
since this release
Major Changes
-
- Removed
useDndBlock,useDragBlock, anduseDropBlockhooks in favor ofuseDndNode,useDragNode, anduseDropNode. - Removed
DndProvideranduseDraggableStore. Drop line state is now managed byDndPluginas a single state objectdropTargetcontaining bothidandline. useDropNode: removedonChangeDropLineanddropLineoptions
Migration steps:
- Remove
DndProviderfrom your draggable component (e.g.draggable.tsx) - Replace
useDraggableStorewithuseEditorPlugin(DndPlugin).useOption
- Removed
Minor Changes
- #3861 by @zbeyens –
useDndNodenow supports horizontal orientation. New option isorientation?: 'horizontal' | 'vertical'. Default isvertical.useDraggableState,useDndNode: addcanDropNodecallback option to query if a dragged node can be dropped onto a hovered node.useDropLine:- Added
idoption to show dropline only for hovered element. Default isuseElement().id. - Added
orientationoption to filter droplines by orientation ('horizontal' | 'vertical'). Default isvertical. - Returns empty dropline if orientation doesn't match (e.g., horizontal dropline in vertical orientation)
- Returns empty dropline if elementId doesn't match current hovered element
- Added
Patch Changes
- #3830 by @felixfeng33 – Replace
findNodePathwithfindPath