Skip to content

kit-1.0.0-alpha.0 & code-0.5.0-alpha.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@elbakerino elbakerino released this 28 Jun 22:47
· 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 the editorRef is updated for any useLayoutEffect/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 use editor directly via onViewLifecycle, onSetup or from useCodeMirror.
  • reworked useExtension to automatically add and reconfigure an extension, now can only be used together with useCodeMirror, must be called directly after it
  • CodeMirror replaced prop classNamesContent: string[] with classNameContent: string
  • removed useEditorClasses helper hook, now included in CodeMirror
  • changed internal effects and state flow, for performance and reliability
  • added onSetup prop to CodeMirror, reactively attach event listener without extra state overhead or needing to use the useCodeMirror hook
  • added Transaction.remote annotation to the default onExternalChange 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.