Releases: octet-stream/slate-to-react
Releases · octet-stream/slate-to-react
0.9.1
0.9.0
Update
-
BREAKING: Move
keyproperty fromattributesto transform implementation's own properties. This means you have to passkeyproperty to a component manuallyBefore
v0.9.0import {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.0import {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
defaultTransformsoptions. More info inTransformNodesOptionstype documentation; - Introduce
InvalidRootNodeTypeErrorclass. It is thrown for invalid root node type instead ofTypeError.
All changes: v0.7.5...v0.8.0
0.7.5
Update
- Simplify
transformNodesimplementation; - Update
slateandslate-reactrequirements 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.captureStackTraceexists 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
strictoption forSlateVIew,useSlateToReactandtransformNodes. When enabled, theidfield is required on each node. If node without anid, theNodeNoIdFieldErrorwill be thrown. Strict mode does not support custom ID generators; - Expose
NoIdFieldErrorclass - Expose
TextNodetype.
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
NoMatcherErrorclass as part of public API.
Update
- Change
moduleResolutionoption intsconfig.jsontonodenext; - Update
peerDependenciesrequirements.
All changes: v0.5.0...v0.6.0