-
-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix * fix * fix * fix * Create two-glasses-doubt.md * refactor * refactor * docs * docs --------- Co-authored-by: zbeyens <[email protected]>
- Loading branch information
Showing
69 changed files
with
726 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
'@udecode/plate-ui-dnd': major | ||
--- | ||
|
||
Unstyled logic has been moved to `@udecode/plate-dnd` | ||
```ts | ||
// before | ||
import { createDndPlugin } from '@udecode/plate-ui-dnd'; | ||
|
||
// after | ||
import { createDndPlugin } from '@udecode/plate-dnd'; | ||
``` | ||
Renamed: | ||
- `withDraggables` -> `withPlateDraggables`. In the second parameter, draggable props options have been moved under `draggableProps`: | ||
```tsx | ||
// before | ||
{ | ||
onRenderDragHandle: () => {} | ||
styles, | ||
} | ||
|
||
// after | ||
{ | ||
draggableProps: { | ||
onRenderDragHandle: () => {} | ||
styles, | ||
}, | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@udecode/plate-dnd': minor | ||
--- | ||
|
||
New package extracting unstyled logic from `@udecode/plate-ui-dnd` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@udecode/plate-core": patch | ||
|
||
--- | ||
|
||
`createHOC`: deep merge props |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
__tests__ | ||
__test-utils__ | ||
__mocks__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Plate drag & drop feature | ||
|
||
This package implements the drag & drop feature. It allows you to drag & | ||
drop blocks using a grabber. | ||
|
||
## Documentation | ||
|
||
Check out | ||
[Drag & Drop](https://plate.udecode.io/docs/components/dnd). | ||
|
||
## API | ||
|
||
See the [API documentation](https://plate-api.udecode.io/globals.html). | ||
|
||
## License | ||
|
||
[MIT](../../LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"name": "@udecode/plate-dnd", | ||
"version": "19.7.0", | ||
"description": "Drag & drop feature for Plate", | ||
"license": "MIT", | ||
"homepage": "https://plate.udecode.io", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/udecode/plate.git", | ||
"directory": "packages/dnd" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/udecode/plate/issues" | ||
}, | ||
"main": "dist/index.js", | ||
"module": "dist/index.es.js", | ||
"files": [ | ||
"dist" | ||
], | ||
"types": "dist/index.d.ts", | ||
"dependencies": { | ||
"@udecode/plate-core": "19.7.0", | ||
"raf": "^3.4.1" | ||
}, | ||
"peerDependencies": { | ||
"react": ">=16.8.0", | ||
"react-dnd": ">=14.0.0", | ||
"react-dnd-html5-backend": ">=14.0.0", | ||
"react-dom": ">=16.8.0", | ||
"slate": ">=0.87.0", | ||
"slate-history": ">=0.86.0", | ||
"slate-react": ">=0.88.0" | ||
}, | ||
"keywords": [ | ||
"plate", | ||
"plugin", | ||
"slate" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { | ||
createComponentAs, | ||
createElementAs, | ||
HTMLPropsAs, | ||
TElement, | ||
} from '@udecode/plate-core'; | ||
|
||
export type PlateDragHandleProps = { | ||
element: TElement; | ||
} & HTMLPropsAs<'button'>; | ||
|
||
export const usePlateDragHandleProps = ( | ||
props: PlateDragHandleProps | ||
): HTMLPropsAs<'button'> => { | ||
return { | ||
...props, | ||
onMouseDown: (e: any) => e.stopPropagation(), | ||
}; | ||
}; | ||
|
||
export const DragHandle = createComponentAs<PlateDragHandleProps>((props) => { | ||
const htmlProps = usePlateDragHandleProps(props); | ||
|
||
return createElementAs('button', htmlProps); | ||
}); |
Oops, something went wrong.
07ddae6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
plate – ./
plate-udecode.vercel.app
plate.udecode.io
plate-git-main-udecode.vercel.app
www.plate.udecode.io
07ddae6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
plate-examples – ./
plate-examples-git-main-udecode.vercel.app
plate-examples-udecode.vercel.app
plate-examples.vercel.app