Releases: octet-stream/slate-to-react
Releases · octet-stream/slate-to-react
0.9.1
0.9.0
Update
-
BREAKING: Move
key
property fromattributes
to transform implementation's own properties. This means you have to passkey
property to a component manuallyBefore
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
Update
- Fix documentation for types.
Add
- Support disabling default transforms via
defaultTransforms
options. More info inTransformNodesOptions
type documentation; - Introduce
InvalidRootNodeTypeError
class. It is thrown for invalid root node type instead ofTypeError
.
All changes: v0.7.5...v0.8.0
0.7.5
Update
- Simplify
transformNodes
implementation; - Update
slate
andslate-react
requirements inpeerDependencies
.
All changes: v0.7.4...v0.7.5
0.7.4
Update
- Remove unnecessary Error.captureStackTrace call from NoMatcherError (See: #1)
All changes: v0.7.3...v0.7.4
0.7.3
0.7.2
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
0.7.0 - Strict mode
Add
- Introduce
strict
option forSlateVIew
,useSlateToReact
andtransformNodes
. When enabled, theid
field is required on each node. If node without anid
, theNodeNoIdFieldError
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
Add
- Expose
NoMatcherError
class as part of public API.
Update
- Change
moduleResolution
option intsconfig.json
tonodenext
; - Update
peerDependencies
requirements.
All changes: v0.5.0...v0.6.0