@lvce-editor/editor-worker 1.13.0 → 1.14.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.
@@ -3532,7 +3532,6 @@ const Alt = 2;
3532
3532
 
3533
3533
  // TODO first change cursor position, then run go to definition
3534
3534
  // cursor should appear at mousedown position immediately
3535
- // @ts-ignore
3536
3535
  const handleSingleClickWithAlt = async (editor, position) => {
3537
3536
  const {
3538
3537
  rowIndex,
@@ -3547,8 +3546,6 @@ const handleSingleClickWithAlt = async (editor, position) => {
3547
3546
  const newEditor2 = await goToDefinition(newEditor);
3548
3547
  return newEditor2;
3549
3548
  };
3550
-
3551
- // @ts-ignore
3552
3549
  const handleSingleClickWithCtrl = async (editor, position) => {
3553
3550
  const selections = editor.selections;
3554
3551
  for (let i = 0; i < selections.length; i += 4) {
@@ -3572,8 +3569,6 @@ const handleSingleClickWithCtrl = async (editor, position) => {
3572
3569
  newSelections[insertIndex + 3] = position.columnIndex;
3573
3570
  return scheduleSelections(editor, newSelections);
3574
3571
  };
3575
-
3576
- // @ts-ignore
3577
3572
  const handleSingleClickDefault = (editor, position) => {
3578
3573
  setPosition$1(position);
3579
3574
  return {
@@ -3582,8 +3577,6 @@ const handleSingleClickDefault = (editor, position) => {
3582
3577
  focused: true
3583
3578
  };
3584
3579
  };
3585
-
3586
- // @ts-ignore
3587
3580
  const getFn = modifier => {
3588
3581
  switch (modifier) {
3589
3582
  case Alt:
@@ -3594,8 +3587,6 @@ const getFn = modifier => {
3594
3587
  return handleSingleClickDefault;
3595
3588
  }
3596
3589
  };
3597
-
3598
- // @ts-ignore
3599
3590
  const handleSingleClick = async (editor, modifier, x, y) => {
3600
3591
  object(editor);
3601
3592
  number$1(modifier);
@@ -3647,7 +3638,6 @@ const handleTripleClick = (editor, modifier, x, y) => {
3647
3638
  };
3648
3639
  };
3649
3640
 
3650
- // @ts-ignore
3651
3641
  const handleMouseDown = (state, modifier, x, y, detail) => {
3652
3642
  switch (detail) {
3653
3643
  case Single:
@@ -7867,6 +7857,11 @@ const renderFocus = {
7867
7857
  return oldState.focused === newState.focused;
7868
7858
  },
7869
7859
  apply(oldState, newState) {
7860
+ // TODO avoid side effect
7861
+ if (newState.focused) {
7862
+ const FocusEditorText = 12;
7863
+ invoke$3('Focus.setFocus', FocusEditorText);
7864
+ }
7870
7865
  return [/* method */'setFocused', newState.focused];
7871
7866
  }
7872
7867
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "",
5
5
  "main": "dist/testWorkerMain.js",
6
6
  "type": "module",