@lvce-editor/find-widget-worker 3.7.0 → 3.7.2

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.
@@ -1088,6 +1088,7 @@ const create = (uid, x, y, width, height, parentUid) => {
1088
1088
  focus: 0,
1089
1089
  focused: false,
1090
1090
  focusSource: Unknown,
1091
+ focusVersion: 0,
1091
1092
  height: 0,
1092
1093
  history: [],
1093
1094
  inputBorderWidth: 1,
@@ -1135,7 +1136,7 @@ const isEqual$6 = (oldState, newState) => {
1135
1136
  };
1136
1137
 
1137
1138
  const isEqual$5 = (oldState, newState) => {
1138
- return oldState.focused === newState.focused && oldState.focus === newState.focus;
1139
+ return oldState.focused === newState.focused && oldState.focus === newState.focus && oldState.focusVersion === newState.focusVersion;
1139
1140
  };
1140
1141
 
1141
1142
  const isEqual$4 = (oldState, newState) => {
@@ -1216,6 +1217,14 @@ const focusCloseButton = state => {
1216
1217
  return setFindWidgetFocus(state, FocusFindWidgetCloseButton);
1217
1218
  };
1218
1219
 
1220
+ const focusFind = state => {
1221
+ const newState = setFindWidgetFocus(state, FocusSearchInput);
1222
+ return {
1223
+ ...newState,
1224
+ focusVersion: state.focusVersion + 1
1225
+ };
1226
+ };
1227
+
1219
1228
  const setSelections = async (editorUid, selections) => {
1220
1229
  // @ts-ignore
1221
1230
  await invoke('Editor.setSelections2', editorUid, selections);
@@ -2850,6 +2859,7 @@ const commandMap = {
2850
2859
  'FindWidget.dispose': dispose,
2851
2860
  'FindWidget.focusCloseButton': wrapCommand(focusCloseButton),
2852
2861
  'FindWidget.focusElement': wrapCommand(focusElement),
2862
+ 'FindWidget.focusFind': wrapCommand(focusFind),
2853
2863
  'FindWidget.focusFirst': wrapCommand(focusFirst),
2854
2864
  'FindWidget.focusIndex': wrapCommand(focusIndex),
2855
2865
  'FindWidget.focusLast': wrapCommand(focusLast),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/find-widget-worker",
3
- "version": "3.7.0",
3
+ "version": "3.7.2",
4
4
  "description": "Web Worker for the find widget in Lvce Editor",
5
5
  "repository": {
6
6
  "type": "git",