Skip to content

Releases: octet-stream/slate-to-react

0.9.1

07 May 13:13
Compare
Choose a tag to compare
0.9.1 Pre-release
Pre-release

Update

  • Update documentation reflecting transform properties changes

All changes: v0.9.0...v0.9.1

0.9.0

07 May 12:27
Compare
Choose a tag to compare
0.9.0 Pre-release
Pre-release

Update

  • BREAKING: Move key property from attributes to transform implementation's own properties. This means you have to pass key property to a component manually

    Before v0.9.0

    import {isLink, isText, createElementTransform, createLeafTransform} from "slate-to-react"
    
    export const Link = createElementTransform(
      isLink,
    
      ({attributes, element, children}) => (
        <a {...attributes} href={element.url}>
          {children}
        </a>
      )
    )
    
    export const Text = createLeafTransform(
      isText,
    
      ({children}) => <span>{children}</span>
    )

    Since v0.9.0

    import {isLink, isText, createElementTransform, createLeafTransform} from "slate-to-react"
    
    export const Link = createElementTransform(
      isLink,
    
      ({key, attributes, element, children}) => (
        <a {...attributes} href={element.url} key={key}>
          {children}
        </a>
      )
    )
    
    export const Text = createLeafTransform(
      isText,
    
      ({key, children}) => <span key={key}>{children}</span>
    )

All changes: v0.8.0...v0.9.0

0.8.0

24 Apr 18:10
Compare
Choose a tag to compare
0.8.0 Pre-release
Pre-release

Update

  • Fix documentation for types.

Add

  • Support disabling default transforms via defaultTransforms options. More info in TransformNodesOptions type documentation;
  • Introduce InvalidRootNodeTypeError class. It is thrown for invalid root node type instead of TypeError.

All changes: v0.7.5...v0.8.0

0.7.5

22 Apr 14:17
Compare
Choose a tag to compare
0.7.5 Pre-release
Pre-release

Update

  • Simplify transformNodes implementation;
  • Update slate and slate-react requirements in peerDependencies.

All changes: v0.7.4...v0.7.5

0.7.4

18 Apr 22:45
Compare
Choose a tag to compare
0.7.4 Pre-release
Pre-release

Update

  • Remove unnecessary Error.captureStackTrace call from NoMatcherError (See: #1)

All changes: v0.7.3...v0.7.4

0.7.3

18 Apr 20:50
Compare
Choose a tag to compare
0.7.3 Pre-release
Pre-release

Update

  • Improve error massage for NoMatcherError.

All changes: v0.7.2...v0.7.3

0.7.2

18 Apr 18:54
Compare
Choose a tag to compare
0.7.2 Pre-release
Pre-release

Update

  • Check if Error.captureStackTrace exists and only use it when it's available (See: #1 ).

All changes: v0.7.1...v0.7.2

0.7.1

17 Apr 06:28
Compare
Choose a tag to compare
0.7.1 Pre-release
Pre-release

Update

  • Simplify output for element and leaf transform props.

All changes: v0.7.0...v0.7.1

0.7.0 - Strict mode

15 Apr 01:32
Compare
Choose a tag to compare
0.7.0 - Strict mode Pre-release
Pre-release

Add

  • Introduce strict option for SlateVIew, useSlateToReact and transformNodes. When enabled, the id field is required on each node. If node without an id, the NodeNoIdFieldError will be thrown. Strict mode does not support custom ID generators;
  • Expose NoIdFieldError class
  • Expose TextNode type.

Important: In future releases strict mode will be enabled by default and might as well become the only option.


All changes: v0.6.0...v0.7.0

0.6.0

08 Apr 16:35
Compare
Choose a tag to compare
0.6.0 Pre-release
Pre-release

Add

  • Expose NoMatcherError class as part of public API.

Update

  • Change moduleResolution option in tsconfig.json to nodenext;
  • Update peerDependencies requirements.

All changes: v0.5.0...v0.6.0