Releases: udecode/plate
Releases · udecode/plate
@udecode/[email protected]
@udecode/[email protected]
@udecode/[email protected]
@udecode/[email protected]
@udecode/[email protected]
@udecode/[email protected]
@udecode/[email protected]
@udecode/[email protected]
@udecode/[email protected]
Major Changes
-
- Removed
useDndBlock
,useDragBlock
, anduseDropBlock
hooks in favor ofuseDndNode
,useDragNode
, anduseDropNode
. - Removed
DndProvider
anduseDraggableStore
. Drop line state is now managed byDndPlugin
as a single state objectdropTarget
containing bothid
andline
. useDropNode
: removedonChangeDropLine
anddropLine
options
Migration steps:
- Remove
DndProvider
from your draggable component (e.g.draggable.tsx
) - Replace
useDraggableStore
withuseEditorPlugin(DndPlugin).useOption
- Removed
Minor Changes
- #3861 by @zbeyens –
useDndNode
now supports horizontal orientation. New option isorientation?: 'horizontal' | 'vertical'
. Default isvertical
.useDraggableState
,useDndNode
: addcanDropNode
callback option to query if a dragged node can be dropped onto a hovered node.useDropLine
:- Added
id
option to show dropline only for hovered element. Default isuseElement().id
. - Added
orientation
option 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
findNodePath
withfindPath