@lvce-editor/editor-worker 19.55.4 → 19.56.0

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.
@@ -5909,10 +5909,10 @@ const applyDocumentEdits$1 = (editor, edits) => {
5909
5909
  return scheduleDocumentAndCursorsSelections(editor, documentEdits);
5910
5910
  };
5911
5911
 
5912
- const applyEdit = async (editor, changes) => {
5912
+ const applyEdit = async (editor, changes, selectionChanges) => {
5913
5913
  object(editor);
5914
5914
  array(changes);
5915
- return scheduleDocumentAndCursorsSelections(editor, changes);
5915
+ return scheduleDocumentAndCursorsSelections(editor, changes, selectionChanges);
5916
5916
  };
5917
5917
 
5918
5918
  // TODO maybe use a separate worker for bulk edits and bulk edit history
@@ -6214,10 +6214,11 @@ const x = (editor, rowIndex, columnIndex) => {
6214
6214
  };
6215
6215
  const y = (editor, rowIndex) => {
6216
6216
  const {
6217
+ deltaY = 0,
6217
6218
  rowHeight,
6218
6219
  y
6219
6220
  } = editor;
6220
- const offsetY = (rowIndex + 1) * rowHeight + y;
6221
+ const offsetY = (rowIndex + 1) * rowHeight + y - deltaY;
6221
6222
  return offsetY;
6222
6223
  };
6223
6224
 
@@ -13343,9 +13344,9 @@ const closeWidget2 = async (editorUid, widgetId, widgetName, unsetAdditionalFocu
13343
13344
  const closeFind2 = async editorUid => {
13344
13345
  await closeWidget2(editorUid, Find, 'FindWidget', 0);
13345
13346
  };
13346
- const applyEdits2 = async (editorUid, edits) => {
13347
+ const applyEdits2 = async (editorUid, edits, selectionChanges) => {
13347
13348
  const editor = getEditor$1(editorUid);
13348
- const newEditor = await applyEdit(editor, edits);
13349
+ const newEditor = await applyEdit(editor, edits, selectionChanges);
13349
13350
  const newEditorWithDerivedState = await updateDerivedState(editor, newEditor);
13350
13351
  set$8(editorUid, editor, newEditorWithDerivedState);
13351
13352
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "19.55.4",
3
+ "version": "19.56.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"