kit-1.0.0-alpha.0 & code-0.5.0-alpha.0
Pre-release
Pre-release
·
12 commits
to main
since this release
This release is published under the
next
tag and won't be installed automatically. To use it, specify the version when installing or updating.
@ui-schema/kit-codemirror
>1.0.0-alpha.0
@ui-schema/material-code
>0.5.0-alpha.0
kit-1.0.0-alpha.0
Rewritten internals, now stateless with impoved performance and reliability. New extension hook. No longer destroys editor when reconfiguring.
Check the demo folder or the base CodeMirror
component for reference on how it now works.
Documentation was moved in this repository under docs.
- made
useCodeMirror
easier to reuse, now accepting an object of options and manages the editor in a stateless approach which only guarantees that theeditorRef
is updated for anyuseLayoutEffect
/useEffect` which is defined after the hook was called. it now manages extensions in a single compartment, keeping the editors state when extensions are reconfigured - removed
effects
prop and system, instead directly modify extensions or useeditor
directly viaonViewLifecycle
,onSetup
or fromuseCodeMirror
. - reworked
useExtension
to automatically add and reconfigure an extension, now can only be used together withuseCodeMirror
, must be called directly after it CodeMirror
replaced propclassNamesContent: string[]
withclassNameContent: string
- removed
useEditorClasses
helper hook, now included inCodeMirror
- changed internal effects and state flow, for performance and reliability
- added
onSetup
prop toCodeMirror
, reactively attach event listener without extra state overhead or needing to use theuseCodeMirror
hook - added
Transaction.remote
annotation to the defaultonExternalChange
handler - added
isRemoteChange
util to check for the remote annotation
code-0.5.0-alpha.0
- compatibility with
kit-codemirror@1.0.0-alpha.0
, new min. version - additional react19 compatibility
- additional mui v6/7 compatibility
Note that the @ui-schema
core and ds-material packages do not yet support the new dependency ranges, to use it you must use npm install
with either --force
or --legacy-peer-deps
.