@quadrats/react 0.7.5 → 0.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { __rest } from 'tslib';
2
2
  import isHotkey from 'is-hotkey';
3
- import { getAboveBlock, isNodeMatch, isSelectionAtBlockEdge, Path, Transforms, insertSoftBreak, PARAGRAPH_TYPE } from '@quadrats/core';
3
+ import { getAboveBlock, isNodeMatch, isSelectionAtBlockEdge, Path, Transforms, PARAGRAPH_TYPE } from '@quadrats/core';
4
4
 
5
5
  function createOnKeyDownBreak({ exitBreak, softBreak }) {
6
6
  return (event, editor, next) => {
@@ -35,7 +35,7 @@ function createOnKeyDownBreak({ exitBreak, softBreak }) {
35
35
  for (const { hotkey, match } of rules) {
36
36
  if (isHotkey(hotkey, event) && (!match || isNodeMatch(entry, match))) {
37
37
  event.preventDefault();
38
- insertSoftBreak(editor);
38
+ editor.insertText('\n');
39
39
  return;
40
40
  }
41
41
  }
@@ -39,7 +39,7 @@ function createOnKeyDownBreak({ exitBreak, softBreak }) {
39
39
  for (const { hotkey, match } of rules) {
40
40
  if (isHotkey(hotkey, event) && (!match || core.isNodeMatch(entry, match))) {
41
41
  event.preventDefault();
42
- core.insertSoftBreak(editor);
42
+ editor.insertText('\n');
43
43
  return;
44
44
  }
45
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quadrats/react",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "description": "",
5
5
  "author": "Rytass",
6
6
  "homepage": "https://github.com/Quadrats/quadrats#readme",