Skip to content

Commit

Permalink
Version Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 17, 2024
1 parent a326c25 commit 0a8b48b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 24 deletions.
12 changes: 0 additions & 12 deletions .changeset/dnd-major.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/dnd-minor.md

This file was deleted.

26 changes: 26 additions & 0 deletions packages/dnd/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# @udecode/plate-dnd

## 41.0.0

### Major Changes

- [#3861](https://github.com/udecode/plate/pull/3861) by [@zbeyens](https://github.com/zbeyens)

- Removed `useDndBlock`, `useDragBlock`, and `useDropBlock` hooks in favor of `useDndNode`, `useDragNode`, and `useDropNode`.
- Removed `DndProvider` and `useDraggableStore`. Drop line state is now managed by `DndPlugin` as a single state object `dropTarget` containing both `id` and `line`.
- `useDropNode`: removed `onChangeDropLine` and `dropLine` options

Migration steps:

- Remove `DndProvider` from your draggable component (e.g. `draggable.tsx`)
- Replace `useDraggableStore` with `useEditorPlugin(DndPlugin).useOption`

### Minor Changes

- [#3861](https://github.com/udecode/plate/pull/3861) by [@zbeyens](https://github.com/zbeyens)
- `useDndNode` now supports horizontal orientation. New option is `orientation?: 'horizontal' | 'vertical'`. Default is `vertical`.
- `useDraggableState`, `useDndNode`: add `canDropNode` 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 is `useElement().id`.
- Added `orientation` option to filter droplines by orientation (`'horizontal' | 'vertical'`). Default is `vertical`.
- 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

## 40.0.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/dnd/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@udecode/plate-dnd",
"version": "40.0.0",
"version": "41.0.0",
"description": "React drag and drop feature for Plate",
"keywords": [
"plate",
Expand Down

0 comments on commit 0a8b48b

Please sign in to comment.