@lvce-editor/text-search-worker 3.36.0 → 3.38.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.
@@ -3341,11 +3341,7 @@ const getFilteredResults = (results, collapsedPaths) => {
3341
3341
  for (const result of results) {
3342
3342
  if (result.type === File) {
3343
3343
  filteredResults.push(result);
3344
- if (collapsedPaths.includes(result.text)) {
3345
- isExcluded = true;
3346
- } else {
3347
- isExcluded = false;
3348
- }
3344
+ isExcluded = collapsedPaths.includes(result.text) ? true : false;
3349
3345
  }
3350
3346
  if (result.type === Match && !isExcluded) {
3351
3347
  filteredResults.push(result);
@@ -4263,6 +4259,10 @@ const submit = state => {
4263
4259
  });
4264
4260
  };
4265
4261
 
4262
+ const terminate = () => {
4263
+ globalThis.close();
4264
+ };
4265
+
4266
4266
  const Keyboard = -1;
4267
4267
 
4268
4268
  const show = async (x, y, id, ...args) => {
@@ -4277,8 +4277,12 @@ const show = async (x, y, id, ...args) => {
4277
4277
  const Search = 18;
4278
4278
 
4279
4279
  const handleContextMenuKeyboard = async state => {
4280
- const x = state.x; // TODO
4281
- const y = state.y; // TODO
4280
+ const {
4281
+ x
4282
+ } = state; // TODO
4283
+ const {
4284
+ y
4285
+ } = state; // TODO
4282
4286
  await show(x, y, Search);
4283
4287
  return state;
4284
4288
  };
@@ -4376,6 +4380,7 @@ const commandMap = {
4376
4380
  'TextSearch.render': doRender,
4377
4381
  'TextSearch.renderIncremental': renderIncremental,
4378
4382
  'TextSearch.saveState': saveState,
4383
+ 'TextSearch.terminate': terminate,
4379
4384
  // TODO needed?
4380
4385
  'TextSearch.textSearch': textSearch
4381
4386
  };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@lvce-editor/text-search-worker",
3
- "version": "3.36.0",
3
+ "version": "3.38.0",
4
4
  "description": "Text Search Worker",
5
- "main": "dist/textSearchWorkerMain.js",
6
- "type": "module",
7
5
  "keywords": [
8
6
  "text-search"
9
7
  ],
10
- "author": "Lvce Editor",
11
- "license": "MIT",
12
8
  "repository": {
13
9
  "type": "git",
14
10
  "url": "git+https://github.com/lvce-editor/text-search-worker.git"
15
- }
11
+ },
12
+ "license": "MIT",
13
+ "author": "Lvce Editor",
14
+ "type": "module",
15
+ "main": "dist/textSearchWorkerMain.js"
16
16
  }