@lvce-editor/find-widget-worker 1.12.0 → 1.13.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.
@@ -933,6 +933,9 @@ const create$2 = () => {
933
933
  }
934
934
  };
935
935
  };
936
+ const terminate = () => {
937
+ globalThis.close();
938
+ };
936
939
 
937
940
  const {
938
941
  get: get$1,
@@ -1008,8 +1011,19 @@ const RenderFocusContext = 14;
1008
1011
  const RenderFocus = 15;
1009
1012
  const RenderValue = 16;
1010
1013
 
1014
+ const Button = 1;
1015
+ const Div = 4;
1016
+ const Text = 12;
1017
+ const TextArea = 62;
1018
+
1019
+ const User = 1;
1011
1020
  const Script = 1;
1012
- const User = 2;
1021
+
1022
+ const EditorWorker$1 = 99;
1023
+
1024
+ const FocusSelector = 'Viewlet.focusSelector';
1025
+ const SetFocusContext = 'Viewlet.setFocusContext';
1026
+ const SetValueByName = 'Viewlet.setValueByName';
1013
1027
 
1014
1028
  const isEqual = (oldState, newState) => {
1015
1029
  return newState.inputSource === User || oldState.value === newState.value;
@@ -1061,17 +1075,6 @@ const focusCloseButton = state => {
1061
1075
  return setFindWidgetFocus(state, FocusFindWidgetCloseButton);
1062
1076
  };
1063
1077
 
1064
- const Button = 1;
1065
- const Div = 4;
1066
- const Text = 12;
1067
- const TextArea = 62;
1068
-
1069
- const EditorWorker$1 = 99;
1070
-
1071
- const FocusSelector = 'Viewlet.focusSelector';
1072
- const SetFocusContext = 'Viewlet.setFocusContext';
1073
- const SetValueByName = 'Viewlet.setValueByName';
1074
-
1075
1078
  const rpcs = Object.create(null);
1076
1079
  const set$2 = (id, rpc) => {
1077
1080
  rpcs[id] = rpc;
@@ -1341,7 +1344,7 @@ const getMatchCount = matches => {
1341
1344
  return matches.length / 2;
1342
1345
  };
1343
1346
 
1344
- const refresh$1 = (state, value) => {
1347
+ const refresh$1 = (state, value, inputSource) => {
1345
1348
  const {
1346
1349
  lines
1347
1350
  } = state;
@@ -1353,16 +1356,16 @@ const refresh$1 = (state, value) => {
1353
1356
  matchIndex: 0,
1354
1357
  matchCount,
1355
1358
  value,
1356
- inputSource: User
1359
+ inputSource
1357
1360
  };
1358
1361
  };
1359
1362
 
1360
- const refresh = (state, value = state.value) => {
1361
- return refresh$1(state, value);
1363
+ const refresh = (state, value = state.value, inputSource = User) => {
1364
+ return refresh$1(state, value, inputSource);
1362
1365
  };
1363
1366
 
1364
- const handleInput = (state, value) => {
1365
- return refresh(state, value);
1367
+ const handleInput = (state, value, inputSource = User) => {
1368
+ return refresh(state, value, inputSource);
1366
1369
  };
1367
1370
 
1368
1371
  const getFindWidgetHeight = replaceExpanded => {
@@ -1903,7 +1906,7 @@ const renderValue = (oldState, newState) => {
1903
1906
  uid,
1904
1907
  value
1905
1908
  } = newState;
1906
- return [/* method */SetValueByName, uid, SearchValue, value];
1909
+ return [SetValueByName, uid, SearchValue, value];
1907
1910
  };
1908
1911
 
1909
1912
  const getRenderer = diffType => {
@@ -1946,10 +1949,6 @@ const render2 = (uid, diffResult) => {
1946
1949
  return commands;
1947
1950
  };
1948
1951
 
1949
- const terminate = () => {
1950
- globalThis.close();
1951
- };
1952
-
1953
1952
  const commandMap = {
1954
1953
  'FindWidget.create': create$1,
1955
1954
  'FindWidget.diff2': diff2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/find-widget-worker",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "Web Worker for the find widget in Lvce Editor",
5
5
  "repository": {
6
6
  "type": "git",