mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 11:47:54 +01:00
Revert "editor: update tiptap to v2.10.4 (#6872)"
This reverts commit 800f3ca5d3.
This commit is contained in:
769
packages/editor/package-lock.json
generated
769
packages/editor/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -35,33 +35,33 @@
|
||||
"@notesnook/theme": "file:../theme",
|
||||
"@notesnook/ui": "file:../ui",
|
||||
"@social-embed/lib": "^0.1.0-next.7",
|
||||
"@tiptap/core": "^2.10.4",
|
||||
"@tiptap/extension-blockquote": "2.10.4",
|
||||
"@tiptap/extension-bullet-list": "2.10.4",
|
||||
"@tiptap/extension-character-count": "2.10.4",
|
||||
"@tiptap/extension-code": "2.10.4",
|
||||
"@tiptap/extension-color": "2.10.4",
|
||||
"@tiptap/extension-font-family": "2.10.4",
|
||||
"@tiptap/extension-heading": "2.10.4",
|
||||
"@tiptap/extension-history": "2.10.4",
|
||||
"@tiptap/extension-horizontal-rule": "2.10.4",
|
||||
"@tiptap/extension-list-item": "2.10.4",
|
||||
"@tiptap/extension-list-keymap": "2.10.4",
|
||||
"@tiptap/extension-ordered-list": "2.10.4",
|
||||
"@tiptap/extension-placeholder": "2.10.4",
|
||||
"@tiptap/extension-subscript": "2.10.4",
|
||||
"@tiptap/extension-superscript": "2.10.4",
|
||||
"@tiptap/extension-table": "2.10.4",
|
||||
"@tiptap/extension-table-cell": "2.10.4",
|
||||
"@tiptap/extension-table-header": "2.10.4",
|
||||
"@tiptap/extension-table-row": "2.10.4",
|
||||
"@tiptap/extension-task-item": "2.10.4",
|
||||
"@tiptap/extension-task-list": "2.10.4",
|
||||
"@tiptap/extension-text-align": "2.10.4",
|
||||
"@tiptap/extension-text-style": "2.10.4",
|
||||
"@tiptap/extension-underline": "2.10.4",
|
||||
"@tiptap/pm": "2.10.4",
|
||||
"@tiptap/starter-kit": "2.10.4",
|
||||
"@tiptap/core": "2.6.6",
|
||||
"@tiptap/extension-blockquote": "^2.6.6",
|
||||
"@tiptap/extension-bullet-list": "^2.6.6",
|
||||
"@tiptap/extension-character-count": "2.6.6",
|
||||
"@tiptap/extension-code": "^2.6.6",
|
||||
"@tiptap/extension-color": "2.6.6",
|
||||
"@tiptap/extension-font-family": "2.6.6",
|
||||
"@tiptap/extension-heading": "^2.6.6",
|
||||
"@tiptap/extension-history": "2.6.6",
|
||||
"@tiptap/extension-horizontal-rule": "2.6.6",
|
||||
"@tiptap/extension-list-item": "^2.6.6",
|
||||
"@tiptap/extension-list-keymap": "2.6.6",
|
||||
"@tiptap/extension-ordered-list": "^2.6.6",
|
||||
"@tiptap/extension-placeholder": "2.6.6",
|
||||
"@tiptap/extension-subscript": "2.6.6",
|
||||
"@tiptap/extension-superscript": "2.6.6",
|
||||
"@tiptap/extension-table": "2.6.6",
|
||||
"@tiptap/extension-table-cell": "2.6.6",
|
||||
"@tiptap/extension-table-header": "2.6.6",
|
||||
"@tiptap/extension-table-row": "2.6.6",
|
||||
"@tiptap/extension-task-item": "2.6.6",
|
||||
"@tiptap/extension-task-list": "2.6.6",
|
||||
"@tiptap/extension-text-align": "2.6.6",
|
||||
"@tiptap/extension-text-style": "2.6.6",
|
||||
"@tiptap/extension-underline": "2.6.6",
|
||||
"@tiptap/pm": "2.6.6",
|
||||
"@tiptap/starter-kit": "2.6.6",
|
||||
"alfaaz": "^1.1.0",
|
||||
"async-mutex": "^0.5.0",
|
||||
"clipboard-polyfill": "4.1.0",
|
||||
@@ -73,7 +73,7 @@
|
||||
"nanoid": "^5.0.7",
|
||||
"prism-themes": "^1.9.0",
|
||||
"prosemirror-codemark": "^0.4.2",
|
||||
"prosemirror-view": "1.37.1",
|
||||
"prosemirror-view": "1.34.2",
|
||||
"re-resizable": "^6.9.18",
|
||||
"react-colorful": "^5.6.1",
|
||||
"redent": "^4.0.0",
|
||||
@@ -128,4 +128,4 @@
|
||||
"url": "git://github.com/streetwriters/notesnook.git",
|
||||
"directory": "packages/editor"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
522
packages/editor/patches/@tiptap+core+2.6.6.patch
Normal file
522
packages/editor/patches/@tiptap+core+2.6.6.patch
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,54 @@
|
||||
diff --git a/node_modules/@tiptap/extension-list-keymap/dist/index.cjs b/node_modules/@tiptap/extension-list-keymap/dist/index.cjs
|
||||
index 0f8ae36..adeee92 100644
|
||||
--- a/node_modules/@tiptap/extension-list-keymap/dist/index.cjs
|
||||
+++ b/node_modules/@tiptap/extension-list-keymap/dist/index.cjs
|
||||
@@ -82,7 +82,9 @@ const handleBackspace = (editor, name, parentListTypes) => {
|
||||
// the previous item is a list (orderedList or bulletList)
|
||||
// move the cursor into the list and delete the current item
|
||||
if (!core.isNodeActive(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) {
|
||||
- const { $anchor } = editor.state.selection;
|
||||
+ const { $anchor, empty } = editor.state.selection;
|
||||
+ if (!empty) return false;
|
||||
+
|
||||
const $listPos = editor.state.doc.resolve($anchor.before() - 1);
|
||||
const listDescendants = [];
|
||||
$listPos.node().descendants((node, pos) => {
|
||||
@@ -111,6 +113,11 @@ const handleBackspace = (editor, name, parentListTypes) => {
|
||||
if (!listItemPos) {
|
||||
return false;
|
||||
}
|
||||
+ // if the current position is not at the start of the list item
|
||||
+ // then join backward i.e. join within the list item
|
||||
+ if (listItemPos.$pos.parentOffset !== 0) {
|
||||
+ return editor.commands.joinBackward();
|
||||
+ }
|
||||
const $prev = editor.state.doc.resolve(listItemPos.$pos.pos - 2);
|
||||
const prevNode = $prev.node(listItemPos.depth);
|
||||
const previousListItemHasSubList = listItemHasSubList(name, editor.state, prevNode);
|
||||
diff --git a/node_modules/@tiptap/extension-list-keymap/dist/index.js b/node_modules/@tiptap/extension-list-keymap/dist/index.js
|
||||
index f7ab1e4..6ea03d5 100644
|
||||
--- a/node_modules/@tiptap/extension-list-keymap/dist/index.js
|
||||
+++ b/node_modules/@tiptap/extension-list-keymap/dist/index.js
|
||||
@@ -78,7 +78,9 @@ const handleBackspace = (editor, name, parentListTypes) => {
|
||||
// the previous item is a list (orderedList or bulletList)
|
||||
// move the cursor into the list and delete the current item
|
||||
if (!isNodeActive(editor.state, name) && hasListBefore(editor.state, name, parentListTypes)) {
|
||||
- const { $anchor } = editor.state.selection;
|
||||
+ const { $anchor, empty } = editor.state.selection;
|
||||
+ if (!empty) return false;
|
||||
+
|
||||
const $listPos = editor.state.doc.resolve($anchor.before() - 1);
|
||||
const listDescendants = [];
|
||||
$listPos.node().descendants((node, pos) => {
|
||||
@@ -107,6 +109,11 @@ const handleBackspace = (editor, name, parentListTypes) => {
|
||||
if (!listItemPos) {
|
||||
return false;
|
||||
}
|
||||
+ // if the current position is not at the start of the list item
|
||||
+ // then join backward i.e. join within the list item
|
||||
+ if (listItemPos.$pos.parentOffset !== 0) {
|
||||
+ return editor.commands.joinBackward();
|
||||
+ }
|
||||
const $prev = editor.state.doc.resolve(listItemPos.$pos.pos - 2);
|
||||
const prevNode = $prev.node(listItemPos.depth);
|
||||
const previousListItemHasSubList = listItemHasSubList(name, editor.state, prevNode);
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/node_modules/prosemirror-view/dist/index.cjs b/node_modules/prosemirror-view/dist/index.cjs
|
||||
index 5903e89..6a85c3d 100644
|
||||
index 8ea57c7..aeda01d 100644
|
||||
--- a/node_modules/prosemirror-view/dist/index.cjs
|
||||
+++ b/node_modules/prosemirror-view/dist/index.cjs
|
||||
@@ -3482,7 +3482,7 @@ editHandlers.drop = function (view, _event) {
|
||||
@@ -3456,7 +3456,7 @@ editHandlers.drop = function (view, _event) {
|
||||
});
|
||||
tr.setSelection(selectionBetween(view, $pos, tr.doc.resolve(end)));
|
||||
}
|
||||
@@ -12,10 +12,10 @@ index 5903e89..6a85c3d 100644
|
||||
};
|
||||
handlers.focus = function (view) {
|
||||
diff --git a/node_modules/prosemirror-view/dist/index.js b/node_modules/prosemirror-view/dist/index.js
|
||||
index d0c1f9d..f5b3f53 100644
|
||||
index 9583dc3..991bf0a 100644
|
||||
--- a/node_modules/prosemirror-view/dist/index.js
|
||||
+++ b/node_modules/prosemirror-view/dist/index.js
|
||||
@@ -3754,7 +3754,7 @@ editHandlers.drop = (view, _event) => {
|
||||
@@ -3731,7 +3731,7 @@ editHandlers.drop = (view, _event) => {
|
||||
tr.mapping.maps[tr.mapping.maps.length - 1].forEach((_from, _to, _newFrom, newTo) => end = newTo);
|
||||
tr.setSelection(selectionBetween(view, $pos, tr.doc.resolve(end)));
|
||||
}
|
||||
Reference in New Issue
Block a user