github remirror/remirror v1.0.0-next.40

3 years ago

Major Changes

  • 7c5778ed #700 Thanks @ifiokjr! - 🎉 Add support for position tracking to CommandsExtension.

    • New commands are available.
      • commands.addPositionTracker
      • commands.removePositionTracker.
      • commands.clearPositionTrackers.
    • New exports from @remirror/core including delayedCommand which is a building block for creating your own delayed commands.
    • BREAKING: 💥 Rename clearRangeSelection to emptySelection and fix a bug where it would always select the from rather than the anchor.
    • Add store property this.store.rawCommands for access to the original command functions which can sometimes come in handy. Also add it to the manager store and export new type named RawCommandsFromExtensions
    • Add initialState as a property of the BaseFramework.
    • BREAKING 💥 Require the Framework to be attached to the manager before any calls to getState are allowed. If you're using jest-remirror this change might break some of your tests that don't recreate the editor between tests.
    • commands.insertText now support delayed commands.
    • commands.insertText now supports adding marks to the added text.
    commands.insertText('Hello', {
      marks: {
        // The empty object `{}` represents the attributes being added.
        bold: {},
      },
    });
  • 227657ae #700 Thanks @ifiokjr! - BREAKING: 💥 Remove @remirror/position-tracker extension from the repository and remove remirror/extension/position-tracker as a potential import.

  • add65c90 #700 Thanks @ifiokjr! - BREAKING: 💥 Remove exports for flatten and emptyCommandFunction which are unused in the codebase and not very practical.

    Update API for findChildrenByAttribute to only support an object of attributeNames and literal value or predicate value.

    const mergedCells = findChildrenByAttribute({
      node: table,
      attrs: { colspan: 2, id: (_, exists) => exists },
    });

Minor Changes

  • 89bd1e86 #702 Thanks @ronnyroeller! - Visualize the amount of overlapping annotations

    The annotation-extension would allow to style individual annotations via a CSS class. This led to issues with overlapping annotations. For example, if an annotation with a red background and another with a green background were overlapping, the editor would show (more or less) randomly one of the two colors. Now, the annotation-extension allows users to style decorations based on all overlapping annotations within a given decoration. The default implementation visualizes overlapping annotations by showing a darker shade the more annotations are overlapping.

  • 07aab2e8 #700 Thanks @ifiokjr! - Improve style output and fix CSS output issues.

  • 643555cc #700 Thanks @ifiokjr! - Export createEditorView from @remirror/react.

Patch Changes

  • cbf15ec4 #698 Thanks @ifiokjr! - Fix bad setState() warning when rendering a controlled RemirrorProvider with child component. By wrapping the controlled state update within useLayoutEffect hook,updates now synchronously happen during the commit phase. useEffect caused errors in ProseMirror due to the asynchronous update.
  • cbf15ec4 #698 Thanks @ifiokjr! - Check EditorView has been added to framework before removing the focus and blur listeners.
  • 4b1d99a6 #700 Thanks @ifiokjr! - Fix type of RemirrorJSON attrs to support all Literal values.
  • 1808a9e9 #700 Thanks @ifiokjr! - Pass command through to onMentionChange to fix #701 and give users control over when they want to ensure the mention is created.
  • Updated dependencies [7c5778ed, cbf15ec4, add65c90, 89bd1e86, 4b1d99a6, cbf15ec4, fd694d61, 1808a9e9, 643555cc]:
    • @remirror/core@1.0.0-next.40
    • @remirror/react@1.0.0-next.40
    • @remirror/core-utils@1.0.0-next.40
    • @remirror/extension-annotation@1.0.0-next.40
    • @remirror/core-types@1.0.0-next.40
    • @remirror/pm@1.0.0-next.40
    • @remirror/react-social@1.0.0-next.40
    • @remirror/dom@1.0.0-next.40
    • @remirror/extension-auto-link@1.0.0-next.40
    • @remirror/extension-bidi@1.0.0-next.40
    • @remirror/extension-blockquote@1.0.0-next.40
    • @remirror/extension-bold@1.0.0-next.40
    • @remirror/extension-code@1.0.0-next.40
    • @remirror/extension-code-block@1.0.0-next.40
    • @remirror/extension-collaboration@1.0.0-next.40
    • @remirror/extension-diff@1.0.0-next.40
    • @remirror/extension-doc@1.0.0-next.40
    • @remirror/extension-drop-cursor@1.0.0-next.40
    • @remirror/extension-emoji@1.0.0-next.40
    • @remirror/extension-epic-mode@1.0.0-next.40
    • @remirror/extension-events@1.0.0-next.40
    • @remirror/extension-gap-cursor@1.0.0-next.40
    • @remirror/extension-hard-break@1.0.0-next.40
    • @remirror/extension-heading@1.0.0-next.40
    • @remirror/extension-history@1.0.0-next.40
    • @remirror/extension-horizontal-rule@1.0.0-next.40
    • @remirror/extension-image@1.0.0-next.40
    • @remirror/extension-italic@1.0.0-next.40
    • @remirror/extension-link@1.0.0-next.40
    • @remirror/extension-mention@1.0.0-next.40
    • @remirror/extension-mention-atom@1.0.0-next.40
    • @remirror/extension-paragraph@1.0.0-next.40
    • @remirror/extension-placeholder@1.0.0-next.40
    • @remirror/extension-positioner@1.0.0-next.40
    • @remirror/extension-react-component@1.0.0-next.40
    • @remirror/extension-react-ssr@1.0.0-next.40
    • @remirror/extension-search@1.0.0-next.40
    • @remirror/extension-strike@1.0.0-next.40
    • @remirror/extension-text@1.0.0-next.40
    • @remirror/extension-trailing-node@1.0.0-next.40
    • @remirror/extension-underline@1.0.0-next.40
    • @remirror/extension-yjs@1.0.0-next.40
    • @remirror/preset-core@1.0.0-next.40
    • @remirror/preset-embed@1.0.0-next.40
    • @remirror/preset-list@1.0.0-next.40
    • @remirror/preset-react@1.0.0-next.40
    • @remirror/preset-social@1.0.0-next.40
    • @remirror/preset-table@1.0.0-next.40
    • @remirror/preset-wysiwyg@1.0.0-next.40
    • @remirror/react-hooks@1.0.0-next.40
    • @remirror/react-wysiwyg@1.0.0-next.40
    • @remirror/core-helpers@1.0.0-next.40
    • @remirror/react-utils@1.0.0-next.40

Don't miss a new remirror release

NewReleases is sending notifications on new releases.