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
nexttag 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
useCodeMirroreasier to reuse, now accepting an object of options and manages the editor in a stateless approach which only guarantees that theeditorRefis 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
effectsprop and system, instead directly modify extensions or useeditordirectly viaonViewLifecycle,onSetupor fromuseCodeMirror. - reworked
useExtensionto automatically add and reconfigure an extension, now can only be used together withuseCodeMirror, must be called directly after it CodeMirrorreplaced propclassNamesContent: string[]withclassNameContent: string- removed
useEditorClasseshelper hook, now included inCodeMirror - changed internal effects and state flow, for performance and reliability
- added
onSetupprop toCodeMirror, reactively attach event listener without extra state overhead or needing to use theuseCodeMirrorhook - added
Transaction.remoteannotation to the defaultonExternalChangehandler - added
isRemoteChangeutil to check for the remote annotation
code-0.5.0-alpha.0
- compatibility with
[email protected], 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.