@lvce-editor/text-search-worker 4.2.0 → 4.3.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.
@@ -1241,7 +1241,8 @@ const create = (uid, x, y, width, height, workspacePath, assetDir, itemHeight, v
1241
1241
  focusSource: User,
1242
1242
  flags: 0,
1243
1243
  platform,
1244
- searchInputErrorMessage: ''
1244
+ searchInputErrorMessage: '',
1245
+ history: []
1245
1246
  };
1246
1247
  set(uid, state, state);
1247
1248
  return state;
@@ -1730,7 +1731,7 @@ const focusSearchValueNext = state => {
1730
1731
  return focusMatchCase$1(state);
1731
1732
  };
1732
1733
 
1733
- const commandIds = ['clearSearchResults', 'collapseDetails', 'copy', 'dismissItem', 'expandDetails', 'focusFirst', 'focusIndex', 'focusLast', 'focusMatchCase', 'focusMatchCasePrevious', 'focusMatchWholeWord', 'focusNext', 'focusNextInput', 'focusNextPage', 'focusPreserveCasePrevious', 'focusPrevious', 'focusPreviousInput', 'focusPreviousPage', 'focusRegex', 'focusRegexNext', 'focusReplaceAll', 'focusReplaceValue', 'focusReplaceValueNext', 'focusReplaceValuePrevious', 'focusSearchValue', 'focusSearchValueNext', 'handleClick', 'handleClickAt', 'handleContextMenu', 'handleContextMenuKeyboard', 'handleContextMenuMouseAt', 'handleExcludeInput', 'handleFocusIn', 'handleHeaderClick', 'handleHeaderFocusIn', 'handleIconThemeChange', 'handleIconThemeChange', 'handleIncludeInput', 'handleInput', 'handleInput2', 'handleListBlur', 'handleListFocus', 'handleReplaceInput', 'handleScrollBarCaptureLost', 'handleScrollBarClick', 'handleScrollBarMove', 'handleScrollBarThumbPointerMove', 'handleTouchEnd', 'handleTouchMove', 'handleTouchStart', 'handleUpdate', 'handleWheel', 'refresh', 'replaceAll', 'scrollDown', 'selectIndex', 'submit', 'toggleMatchCase', 'toggleMatchWholeWord', 'togglePreserveCase', 'toggleReplace', 'toggleSearchDetails', 'toggleUseRegularExpression'];
1734
+ const commandIds = ['clearSearchResults', 'collapseDetails', 'copy', 'dismissItem', 'expandDetails', 'focusFirst', 'focusIndex', 'focusLast', 'focusMatchCase', 'focusMatchCasePrevious', 'focusMatchWholeWord', 'focusNext', 'focusNextInput', 'focusNextPage', 'focusPreserveCasePrevious', 'focusPrevious', 'focusPreviousInput', 'focusPreviousPage', 'focusRegex', 'focusRegexNext', 'focusReplaceAll', 'focusReplaceValue', 'focusReplaceValueNext', 'focusReplaceValuePrevious', 'focusSearchValue', 'focusSearchValueNext', 'handleClick', 'handleClickAt', 'handleContextMenu', 'handleContextMenuKeyboard', 'handleContextMenuMouseAt', 'handleExcludeInput', 'handleFocusIn', 'handleHeaderClick', 'handleHeaderFocusIn', 'handleIconThemeChange', 'handleIconThemeChange', 'handleIncludeInput', 'handleInput', 'handleInput2', 'handleListBlur', 'handleListFocus', 'handleReplaceInput', 'handleScrollBarCaptureLost', 'handleScrollBarClick', 'handleScrollBarMove', 'handleScrollBarThumbPointerMove', 'handleTouchEnd', 'handleTouchMove', 'handleTouchStart', 'handleUpdate', 'handleWheel', 'nextHistoryResult', 'previousHistoryResult', 'refresh', 'replaceAll', 'scrollDown', 'selectIndex', 'submit', 'toggleMatchCase', 'toggleMatchWholeWord', 'togglePreserveCase', 'toggleReplace', 'toggleSearchDetails', 'toggleUseRegularExpression'];
1734
1735
 
1735
1736
  const getCommandIds = () => {
1736
1737
  return commandIds;
@@ -1762,6 +1763,14 @@ const getKeyBindings = () => {
1762
1763
  key: Shift | Tab,
1763
1764
  command: 'Search.focusPreviousInput',
1764
1765
  when: FocusSearch
1766
+ }, {
1767
+ key: UpArrow,
1768
+ command: 'Search.previousHistoryResult',
1769
+ when: FocusSearch
1770
+ }, {
1771
+ key: DownArrow,
1772
+ command: 'Search.nextHistoryResult',
1773
+ when: FocusSearch
1765
1774
  }, {
1766
1775
  key: DownArrow,
1767
1776
  command: 'Search.focusNext',
@@ -2946,6 +2955,18 @@ const loadContent = async (state, savedState) => {
2946
2955
  };
2947
2956
  };
2948
2957
 
2958
+ const nextHistoryResult = async state => {
2959
+ return {
2960
+ ...state
2961
+ };
2962
+ };
2963
+
2964
+ const previousHistoryResult = async state => {
2965
+ return {
2966
+ ...state
2967
+ };
2968
+ };
2969
+
2949
2970
  const refresh = state => {
2950
2971
  return handleUpdate(state, {});
2951
2972
  };
@@ -4213,14 +4234,16 @@ const saveState = uid => {
4213
4234
  replacement,
4214
4235
  flags,
4215
4236
  includeValue,
4216
- excludeValue
4237
+ excludeValue,
4238
+ history
4217
4239
  } = newState;
4218
4240
  return {
4219
4241
  value,
4220
4242
  replacement,
4221
4243
  flags,
4222
4244
  includeValue,
4223
- excludeValue
4245
+ excludeValue,
4246
+ history
4224
4247
  };
4225
4248
  };
4226
4249
 
@@ -4441,6 +4464,8 @@ const commandMap = {
4441
4464
  'TextSearch.handleWheel': wrapCommand(handleWheel),
4442
4465
  'TextSearch.launchSearchProcess': wrapCommand(launchSearchProcess),
4443
4466
  'TextSearch.loadContent': wrapCommand(loadContent),
4467
+ 'TextSearch.nextHistoryResult': wrapCommand(nextHistoryResult),
4468
+ 'TextSearch.previousHistoryResult': wrapCommand(previousHistoryResult),
4444
4469
  'TextSearch.refresh': wrapCommand(refresh),
4445
4470
  'TextSearch.renderActions': renderActions,
4446
4471
  'TextSearch.replaceAll': wrapCommand(replaceAll),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/text-search-worker",
3
- "version": "4.2.0",
3
+ "version": "4.3.0",
4
4
  "description": "Text Search Worker",
5
5
  "keywords": [
6
6
  "text-search"