@lvce-editor/text-search-worker 5.15.0 → 5.17.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.
@@ -2227,7 +2227,7 @@ const isEqual$3 = (oldState, newState) => {
2227
2227
 
2228
2228
  const diffType$2 = RenderItems;
2229
2229
  const isEqual$2 = (oldState, newState) => {
2230
- return oldState.collapsedPaths === newState.collapsedPaths && oldState.deltaY === newState.deltaY && oldState.flags === newState.flags && oldState.focus === newState.focus && oldState.icons === newState.icons && oldState.items === newState.items && oldState.listFocused === newState.listFocused && oldState.listFocused === newState.listFocused && oldState.listFocusedIndex === newState.listFocusedIndex && oldState.loaded === newState.loaded && oldState.maxLineY === newState.maxLineY && oldState.message === newState.message && oldState.minLineY === newState.minLineY && oldState.replacement === newState.replacement && oldState.searchInputErrorMessage === newState.searchInputErrorMessage;
2230
+ return oldState.collapsedPaths === newState.collapsedPaths && oldState.deltaY === newState.deltaY && oldState.flags === newState.flags && oldState.focus === newState.focus && oldState.icons === newState.icons && oldState.items === newState.items && oldState.listFocused === newState.listFocused && oldState.listFocusedIndex === newState.listFocusedIndex && oldState.loaded === newState.loaded && oldState.maxLineY === newState.maxLineY && oldState.message === newState.message && oldState.minLineY === newState.minLineY && oldState.replacement === newState.replacement && oldState.searchInputErrorMessage === newState.searchInputErrorMessage;
2231
2231
  };
2232
2232
 
2233
2233
  const diffType$1 = RenderReplaceValue;
@@ -4300,7 +4300,7 @@ const getSearchDisplayResultFile = (results, fileIcons, i, setSize, collapsedPat
4300
4300
  const absolutePath = getRelativePath(path);
4301
4301
  const baseName = pathBaseName(path);
4302
4302
  const index = originalResults.indexOf(results[i]);
4303
- const matchCount = getMatchCount(results, index);
4303
+ const matchCount = getMatchCount(originalResults, index);
4304
4304
  const expanded = collapsedPaths.includes(path) ? Collapsed : Expanded;
4305
4305
  const badgeText = `${matchCount}`;
4306
4306
  return {
@@ -4357,7 +4357,6 @@ const getDisplayResult = (results, fileIcons, i, setSize, searchTermLength, repl
4357
4357
  };
4358
4358
 
4359
4359
  const getDisplayResults = (results, itemHeight, resultCount, searchTerm, minLineY, maxLineY, replacement, fileIcons, focusedIndex, collapsedPaths, originalResults) => {
4360
- // Filter out child items when parent files are collapsed
4361
4360
  const filteredResults = getFilteredResults(results, collapsedPaths);
4362
4361
  const displayResults = [];
4363
4362
  const setSize = resultCount;
@@ -5031,12 +5030,13 @@ const getSearchResultsVirtualDom = (visibleItems, focusOutline, scrollbarHeight,
5031
5030
  }, ...getTreeItemsVirtualDom(visibleItems, deltaY, itemHeight), ...getScrollBarVirtualDom(scrollbarHeight, scrollBarY, scrollBarValue)];
5032
5031
  };
5033
5032
 
5033
+ const className = mergeClassNames(Viewlet, Search$2);
5034
5034
  const getSearchVirtualDom = (visibleItems, flags, message, focusOutline, searchInputErrorMessage, scrollBarHeight, scrollBarY, scrollBarValue, deltaY, itemHeight, matchCount, limitHitWarning, focus = 0) => {
5035
5035
  const errorDom = getSearchInputErrorVirtualDom(searchInputErrorMessage);
5036
5036
  const childCount = 2 + (errorDom.length > 0 ? 1 : 0);
5037
5037
  return [{
5038
5038
  type: Div,
5039
- className: mergeClassNames(Viewlet, Search$2),
5039
+ className,
5040
5040
  childCount
5041
5041
  }, ...getSearchHeaderVirtualDom(flags, message, searchInputErrorMessage, matchCount, focus, limitHitWarning), ...errorDom, ...getSearchResultsVirtualDom(visibleItems, focusOutline, scrollBarHeight, scrollBarY, scrollBarValue, deltaY, itemHeight)];
5042
5042
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/text-search-worker",
3
- "version": "5.15.0",
3
+ "version": "5.17.0",
4
4
  "description": "Text Search Worker",
5
5
  "keywords": [
6
6
  "text-search"