@lvce-editor/editor-worker 11.2.0 → 12.0.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.
@@ -8503,6 +8503,9 @@ const createFn = (key, name, widgetId) => {
8503
8503
  };
8504
8504
  const fn = async (editor, ...args) => {
8505
8505
  const childIndex = editor.widgets.findIndex(isWidget);
8506
+ if (childIndex === -1) {
8507
+ return editor;
8508
+ }
8506
8509
  // TODO scroll up/down if necessary
8507
8510
  const childWidget = editor.widgets[childIndex];
8508
8511
  const state = childWidget.newState;
@@ -10345,13 +10348,13 @@ const renderFocusContext = {
10345
10348
  };
10346
10349
  const renderAdditionalFocusContext = {
10347
10350
  isEqual(oldState, newState) {
10348
- return newState.additionalFocus === newState.additionalFocus;
10351
+ return oldState.additionalFocus === newState.additionalFocus;
10349
10352
  },
10350
10353
  apply(oldState, newState) {
10351
10354
  if (newState.additionalFocus) {
10352
- return ['Focus.setAdditionalFocus', newState.uid, newState.additionalFocus];
10355
+ return ['Viewlet.setAdditionalFocus', newState.uid, newState.additionalFocus];
10353
10356
  }
10354
- return ['Focus.unsetAdditionalFocus', newState.uid, newState.additionalFocus];
10357
+ return ['viewlet.unsetAdditionalFocus', newState.uid, newState.additionalFocus];
10355
10358
  }
10356
10359
  };
10357
10360
  const renderDecorations = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "11.2.0",
3
+ "version": "12.0.0",
4
4
  "license": "MIT",
5
5
  "author": "Lvce Editor",
6
6
  "type": "module",