Skip to content

Releases: riccardoperra/solid-codemirror

[email protected]

10 Dec 07:27
afb0a56
Compare
Choose a tag to compare

Patch Changes

  • e3daa5a: Fix type exports in package.json.

[email protected]

21 May 11:07
Compare
Choose a tag to compare

Breaking Changes

Warning This version could cause breaking changes due to @codemirror/state and @codemirror/view version update.
Updating @codemirror/state to ^6.2.0 and @codemirror/view to ^6.12.0 it's highly recommended

  • Update minimum version of @codemirror/view and @codemirror/state

Minor Changes

  • b0e6157: Add transaction dispatch events, update CodeMirror and peer dependency version #24

[email protected]

15 Mar 18:21
1c8a5d4
Compare
Choose a tag to compare

Patch Changes

[email protected]

13 Mar 19:56
2d1bfc9
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: https://github.com/riccardoperra/solid-codemirror/compare/[email protected]@2.2.2

[email protected]

30 Oct 21:12
0a96919
Compare
Choose a tag to compare

This version of solid-codemirror introduces a new helper: createLazyCompartmentExtension. This new helper will not introduce any magic at all, it will just provide a cleaner syntax to support extensions returning a Promise.

// ✅ 1. Remove the static import
// import { largeExtension } from './large-extension';
import { createLazyCompartmentExtension } from './createLazyCompartmentExtension';
import { Show } from 'solid-js';

function App() {
  const [code, setCode] = createSignal("console.log('hello world!')");
  const { ref, createExtension } = createCodeMirror({ onValueChange: setCode });

  // ✅ 2. Call the helper providing a Promise<Extension>
  // The extension will be configured only after the Promise resolves
  const largeExt = createLazyCompartmentExtension(
    () => import('./large-extension').then(res => res.largeExtension)
  );

  return (
    <div>
      <div ref={ref} />
      {/*✅ 3. You can read the pending state of the Promise*/}
      <Show when={largeExt.loading}>
        Loading...
      </Show>
    </div>
  )
}

Minor Changes

  • 06762fe: feat: add support for lazy compartment extensions

[email protected]

25 Oct 17:24
Compare
Choose a tag to compare

Breaking Change

What's Changed

Full Changelog: https://github.com/riccardoperra/solid-codemirror/compare/[email protected]@2.1.0

[email protected]

05 Jul 21:38
Compare
Choose a tag to compare

This version of solid-codemirror has many breaking changes due to the update to official v6 release and support for compartments. For more detailed informations about CodeMirror6 and extension/compartments, see the official documentation

What's Changed

  • Refactor createCodeMirror with extension modularity and compartments support
  • Allows to control editor value with createEditorControlledValue extension helper
  • Allows to observe and update focused state with createEditorFocus helper
  • Allows to update the readOnly state with createEditorReadonly helper

Breaking Changes

  • Remove CodeMirror component (BREAKING!!)

The createCodeMirror has been refactored removing the setOptions function which allowed to do a top-level reconfiguration. Instead, it has been relpaced with the createExtension function which create a compartment for the given extension/s.

Old

const {setOptions} = createCodeMirror();

setOptions({extensions: [
  basicSetup(),
  EditorView.theme([]),
  lineNumbers()
]})

New

const {createExtension} = createCodeMirror();

// Single-extension compartment
const reconfigurebasicSetup = createExtension(basicSetup());
const reconfigureTheme = createExtension(EditorView.theme([]);
const reconfigureLineNumbers = createExtension(lineNumbers());

// Multi-extension compartment
const configureExtensions = createExtension([
  basicSetup(),
  EditorView.theme([]),
  lineNumbers()
])

Full Changelog: https://github.com/riccardoperra/solid-codemirror/compare/[email protected]

v1.1.0

12 Jun 19:08
Compare
Choose a tag to compare

1.1.0 (2022-06-12)

Features

  • add support for CodeMirror 6.0.0 (b47dfad)

Full Changelog: v1.0.3...v1.1.0

v1.0.3

04 May 20:18
Compare
Choose a tag to compare

1.0.3 (2022-05-04)

Bug Fixes

v1.0.2

07 Feb 09:31
Compare
Choose a tag to compare

1.0.2 (2022-02-07)

Bug Fixes

  • update package.json build definitions (a4c0fa0)
  • update package.json meta (f263924)