Skip to content

Releases: udecode/plate

@udecode/[email protected]

20 Dec 03:42
1015a36
Compare
Choose a tag to compare

Patch Changes

  • #3878 by @zbeyens – Additional breaking changes to v41:

    • Remove useDraggableState. Use const { isDragging, previewRef, handleRef } = useDraggable
    • Remove useDraggableGutter. Set contentEditable={false} to your gutter element
    • Remove props from useDropLine. Set contentEditable={false} to your drop line element
    • Remove withDraggable, useWithDraggable. Use DraggableAboveNodes instead

@udecode/[email protected]

20 Dec 03:41
1015a36
Compare
Choose a tag to compare

Patch Changes

  • #3878 by @zbeyens
    • Add useNodePath(node: TNode): memoized findPath (useMemo)
    • Add usePath(pluginKey?: string): memoized findPath (context)
    • PlateElementProps now includes path prop, also accessible using usePath

@udecode/[email protected]

20 Dec 03:41
1015a36
Compare
Choose a tag to compare

@udecode/[email protected]

19 Dec 03:44
bb183f8
Compare
Choose a tag to compare

Minor Changes

  • #3830 by @felixfeng33 – Add findNodePath - a traversal-based node path finder with O(n) complexity. This is the headless alternative to findPath from @udecode/slate-react, recommended for:

    • Non-React contexts
    • Plugin logic that doesn't require React dependencies
    • Non-performance-critical paths where O(n) traversal is acceptable

Patch Changes

@udecode/[email protected]

19 Dec 03:45
bb183f8
Compare
Choose a tag to compare

Patch Changes

@udecode/[email protected]

19 Dec 03:45
bb183f8
Compare
Choose a tag to compare

Major Changes

  • #3830 by @felixfeng33 – Rename findNodePath to findPath since the addition of findNodePath in the headless lib.

    We recommend using findPath mostly when subscribing to its value (e.g. in a React component) as it has O(path.length) complexity, compared to O(n) for the traversal-based findNodePath. This optimization is particularly important in:

    • Render functions of Plate components where using findNodePath would increase the initial render time by O(n²)
    • Key press handlers where using findNodePath would increase the handling time by O(n)

    where n is the number of nodes in the editor.

Patch Changes

@udecode/[email protected]

19 Dec 03:44
bb183f8
Compare
Choose a tag to compare

@udecode/[email protected]

19 Dec 03:45
bb183f8
Compare
Choose a tag to compare

@udecode/[email protected]

19 Dec 03:44
bb183f8
Compare
Choose a tag to compare

Patch Changes

@udecode/[email protected]

19 Dec 03:45
bb183f8
Compare
Choose a tag to compare