@codingame/monaco-vscode-search-service-override 11.1.2 → 12.0.1
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.
- package/index.d.ts +2 -1
- package/index.js +70 -1
- package/package.json +32 -8
- package/vscode/src/vs/workbench/contrib/search/browser/AISearch/aiSearchModel.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/search/browser/AISearch/aiSearchModel.js +3 -2
- package/vscode/src/vs/workbench/contrib/search/browser/media/searchview.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModel.d.ts +84 -0
- package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModel.js +7 -6
- package/vscode/src/vs/workbench/contrib/search/browser/patternInputWidget.d.ts +74 -0
- package/vscode/src/vs/workbench/contrib/search/browser/patternInputWidget.js +35 -32
- package/vscode/src/vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess.d.ts +43 -0
- package/vscode/src/vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess.js +29 -28
- package/vscode/src/vs/workbench/contrib/search/browser/replaceContributions.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/search/browser/replaceContributions.js +4 -2
- package/vscode/src/vs/workbench/contrib/search/browser/replaceService.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/search/browser/replaceService.js +36 -36
- package/vscode/src/vs/workbench/contrib/search/browser/search.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/search/browser/search.contribution.js +130 -128
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsCopy.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsCopy.js +22 -19
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsNav.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsNav.js +117 -96
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsRemoveReplace.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsRemoveReplace.js +48 -42
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsSymbol.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsSymbol.js +10 -6
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTextQuickAccess.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTextQuickAccess.js +5 -3
- package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchFindInput.js +4 -3
- package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.d.ts +7 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchMessage.js +7 -6
- package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.d.ts +124 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchResultsView.js +80 -73
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/fileMatch.d.ts +81 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/fileMatch.js +8 -6
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/folderMatch.d.ts +101 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/folderMatch.js +5 -4
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/match.d.ts +37 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/match.js +3 -2
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/rangeDecorations.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/rangeDecorations.js +4 -2
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/searchModel.d.ts +77 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/searchModel.js +6 -4
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/searchResult.d.ts +54 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/searchResult.js +6 -4
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/textSearchHeading.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/textSearchHeading.js +4 -3
- package/vscode/src/vs/workbench/contrib/search/browser/searchView.d.ts +237 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchView.js +205 -191
- package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.d.ts +148 -0
- package/vscode/src/vs/workbench/contrib/search/browser/searchWidget.js +90 -88
- package/vscode/src/vs/workbench/contrib/search/common/searchHistoryService.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/search/common/searchHistoryService.js +7 -5
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/media/searchEditor.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.d.ts +20 -0
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +73 -67
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.d.ts +120 -0
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.js +61 -59
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorActions.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorActions.js +4 -2
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.d.ts +83 -0
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.js +42 -40
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorModel.d.ts +33 -0
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorModel.js +2 -1
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditorSerialization.js +22 -21
- package/vscode/src/vs/workbench/services/search/browser/searchService.d.ts +41 -0
- package/vscode/src/vs/workbench/services/search/browser/searchService.js +18 -16
- package/vscode/src/vs/workbench/services/search/common/getFileResults.d.ts +6 -0
- package/vscode/src/vs/workbench/services/search/common/getFileResults.js +1 -0
- package/vscode/src/vs/workbench/services/search/common/localFileSearchWorkerTypes.d.ts +46 -0
- package/vscode/src/vs/workbench/services/search/common/localFileSearchWorkerTypes.js +2 -0
- package/vscode/src/vs/workbench/services/search/common/replace.d.ts +17 -0
- package/vscode/src/vs/workbench/services/search/common/replace.js +13 -11
- package/vscode/src/vs/workbench/services/search/common/searchHelpers.d.ts +4 -0
- package/vscode/src/vs/workbench/services/search/common/searchHelpers.js +1 -0
- package/vscode/src/vs/workbench/services/search/common/searchService.d.ts +51 -0
- package/vscode/src/vs/workbench/services/search/common/searchService.js +19 -18
- package/vscode/src/vs/workbench/services/search/worker/localFileSearch.d.ts +17 -0
- package/vscode/src/vs/workbench/services/search/worker/localFileSearch.js +3 -2
- package/vscode/src/vs/workbench/services/search/worker/localFileSearchMain.d.ts +1 -0
- package/vscode/src/vs/workbench/services/search/worker/localFileSearchMain.js +2 -1
- package/worker.js +2 -1
- package/workers/localFileSearch.worker.d.ts +1 -0
- package/search.js +0 -57
- package/workers/localFileSearch.worker.js +0 -1
package/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { IEditorOverrideServices } from "vscode/vscode/vs/editor/standalone/browser/standaloneServices";
|
|
2
|
+
export default function getServiceOverride(): IEditorOverrideServices;
|
package/index.js
CHANGED
|
@@ -1 +1,70 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
3
|
+
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
4
|
+
import { ISearchService } from 'vscode/vscode/vs/workbench/services/search/common/search.service';
|
|
5
|
+
import { SearchService } from './vscode/src/vs/workbench/services/search/common/searchService.js';
|
|
6
|
+
import { SearchViewModelWorkbenchService } from './vscode/src/vs/workbench/contrib/search/browser/searchTreeModel/searchModel.js';
|
|
7
|
+
import { ISearchViewModelWorkbenchService } from 'vscode/vscode/vs/workbench/contrib/search/browser/searchTreeModel/searchViewModelWorkbenchService.service';
|
|
8
|
+
import { SearchHistoryService } from './vscode/src/vs/workbench/contrib/search/common/searchHistoryService.js';
|
|
9
|
+
import { ISearchHistoryService } from 'vscode/vscode/vs/workbench/contrib/search/common/searchHistoryService.service';
|
|
10
|
+
import { IReplaceService } from 'vscode/vscode/vs/workbench/contrib/search/browser/replace.service';
|
|
11
|
+
import { ReplaceService } from './vscode/src/vs/workbench/contrib/search/browser/replaceService.js';
|
|
12
|
+
import { LocalFileSearchWorkerClient } from './vscode/src/vs/workbench/services/search/browser/searchService.js';
|
|
13
|
+
import './vscode/src/vs/workbench/contrib/search/browser/search.contribution.js';
|
|
14
|
+
import './vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js';
|
|
15
|
+
import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
16
|
+
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
17
|
+
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
18
|
+
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
19
|
+
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
20
|
+
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
21
|
+
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
22
|
+
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
23
|
+
import { SearchProviderType } from 'vscode/vscode/vs/workbench/services/search/common/search';
|
|
24
|
+
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
25
|
+
import 'vscode/vscode/vs/nls';
|
|
26
|
+
import 'vscode/vscode/vs/base/common/charCode';
|
|
27
|
+
import 'vscode/vscode/vs/base/common/marshallingIds';
|
|
28
|
+
import 'vscode/vscode/vs/base/common/path';
|
|
29
|
+
import 'vscode/vscode/vs/base/common/platform';
|
|
30
|
+
import 'vscode/vscode/vs/base/common/lifecycle';
|
|
31
|
+
import 'vscode/vscode/vs/base/common/event';
|
|
32
|
+
import 'vscode/vscode/vs/base/common/resources';
|
|
33
|
+
import 'vscode/vscode/vs/platform/files/common/files';
|
|
34
|
+
import 'vscode/vscode/vs/platform/files/browser/webFileSystemAccess';
|
|
35
|
+
import 'vscode/vscode/vs/platform/log/common/log';
|
|
36
|
+
|
|
37
|
+
function isHTMLFileSystemProvider(provider) {
|
|
38
|
+
return provider.directories != null;
|
|
39
|
+
}
|
|
40
|
+
let CustomSearchService = class CustomSearchService extends SearchService {
|
|
41
|
+
constructor(modelService, editorService, telemetryService, logService, extensionService, fileService, instantiationService, uriIdentityService) {
|
|
42
|
+
super(modelService, editorService, telemetryService, logService, extensionService, fileService, uriIdentityService);
|
|
43
|
+
this.instantiationService = instantiationService;
|
|
44
|
+
if (isHTMLFileSystemProvider(fileService.getProvider(Schemas.file))) {
|
|
45
|
+
const searchProvider = this.instantiationService.createInstance(LocalFileSearchWorkerClient);
|
|
46
|
+
this.registerSearchResultProvider(Schemas.file, SearchProviderType.file, searchProvider);
|
|
47
|
+
this.registerSearchResultProvider(Schemas.file, SearchProviderType.text, searchProvider);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
CustomSearchService = __decorate([
|
|
52
|
+
__param(0, IModelService),
|
|
53
|
+
__param(1, IEditorService),
|
|
54
|
+
__param(2, ITelemetryService),
|
|
55
|
+
__param(3, ILogService),
|
|
56
|
+
__param(4, IExtensionService),
|
|
57
|
+
__param(5, IFileService),
|
|
58
|
+
__param(6, IInstantiationService),
|
|
59
|
+
__param(7, IUriIdentityService)
|
|
60
|
+
], CustomSearchService);
|
|
61
|
+
function getServiceOverride() {
|
|
62
|
+
return {
|
|
63
|
+
[ISearchService.toString()]: new SyncDescriptor(CustomSearchService, [], true),
|
|
64
|
+
[ISearchViewModelWorkbenchService.toString()]: new SyncDescriptor(SearchViewModelWorkbenchService, [], true),
|
|
65
|
+
[ISearchHistoryService.toString()]: new SyncDescriptor(SearchHistoryService, [], true),
|
|
66
|
+
[IReplaceService.toString()]: new SyncDescriptor(ReplaceService, [], true)
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { getServiceOverride as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-search-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "VSCode public API plugged on the monaco editor - search service-override",
|
|
4
6
|
"keywords": [],
|
|
5
7
|
"author": {
|
|
6
8
|
"name": "CodinGame",
|
|
@@ -12,8 +14,29 @@
|
|
|
12
14
|
"url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
|
|
13
15
|
},
|
|
14
16
|
"type": "module",
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@codingame/monaco-vscode-1ae7d696-d960-5ac6-97a3-9fe7c8c3a793-common": "12.0.1",
|
|
19
|
+
"@codingame/monaco-vscode-219d9a5f-b446-507b-a188-1178a0867c75-common": "12.0.1",
|
|
20
|
+
"@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common": "12.0.1",
|
|
21
|
+
"@codingame/monaco-vscode-3cf6a388-482f-5484-a806-0525ad9ad8af-common": "12.0.1",
|
|
22
|
+
"@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common": "12.0.1",
|
|
23
|
+
"@codingame/monaco-vscode-45a408c6-90ed-5d8b-801d-f3f69c7a97f2-common": "12.0.1",
|
|
24
|
+
"@codingame/monaco-vscode-4ead9d5f-54da-5c5a-b093-32be4a84d711-common": "12.0.1",
|
|
25
|
+
"@codingame/monaco-vscode-523730aa-81e6-55d7-9916-87ad537fe087-common": "12.0.1",
|
|
26
|
+
"@codingame/monaco-vscode-56402b83-4a60-5b15-86f9-71fe99c32744-common": "12.0.1",
|
|
27
|
+
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "12.0.1",
|
|
28
|
+
"@codingame/monaco-vscode-695440c8-a687-5594-b476-bbc7b36bafe9-common": "12.0.1",
|
|
29
|
+
"@codingame/monaco-vscode-6f9bc782-77e0-5716-93bd-b05210c768c5-common": "12.0.1",
|
|
30
|
+
"@codingame/monaco-vscode-9e888134-1a6f-58d9-b0e6-0fc047448366-common": "12.0.1",
|
|
31
|
+
"@codingame/monaco-vscode-a4683c2b-a0d2-5112-96ba-eedc605346d2-common": "12.0.1",
|
|
32
|
+
"@codingame/monaco-vscode-cc9ccbec-e2a1-599d-84ae-46f5efc666e3-common": "12.0.1",
|
|
33
|
+
"@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common": "12.0.1",
|
|
34
|
+
"@codingame/monaco-vscode-e571cbbb-526b-5d8b-92c5-a0437d2dabb3-common": "12.0.1",
|
|
35
|
+
"@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common": "12.0.1",
|
|
36
|
+
"vscode": "npm:@codingame/monaco-vscode-api@12.0.1"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {},
|
|
39
|
+
"peerDependenciesMeta": {},
|
|
17
40
|
"main": "index.js",
|
|
18
41
|
"module": "index.js",
|
|
19
42
|
"types": "index.d.ts",
|
|
@@ -22,14 +45,15 @@
|
|
|
22
45
|
"default": "./index.js"
|
|
23
46
|
},
|
|
24
47
|
"./vscode/*": {
|
|
25
|
-
"default": "./vscode/src/*.js"
|
|
48
|
+
"default": "./vscode/src/*.js",
|
|
49
|
+
"types": "./vscode/src/*.d.ts"
|
|
26
50
|
},
|
|
27
51
|
"./worker": {
|
|
28
52
|
"default": "./worker.js"
|
|
53
|
+
},
|
|
54
|
+
"./*": {
|
|
55
|
+
"default": "./*.js",
|
|
56
|
+
"types": "./*.d.ts"
|
|
29
57
|
}
|
|
30
|
-
},
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"vscode": "npm:@codingame/monaco-vscode-api@11.1.2",
|
|
33
|
-
"@codingame/monaco-vscode-chat-interactive-notebook-search-common": "11.1.2"
|
|
34
58
|
}
|
|
35
59
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Emitter, Event } from "vscode/vscode/vs/base/common/event";
|
|
2
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { URI } from "vscode/vscode/vs/base/common/uri";
|
|
4
|
+
import { ITextModel } from "vscode/vscode/vs/editor/common/model";
|
|
5
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
|
+
import { ILabelService } from "vscode/vscode/vs/platform/label/common/label.service";
|
|
7
|
+
import { IUriIdentityService } from "vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
8
|
+
import { IAITextQuery, IFileMatch } from "vscode/vscode/vs/workbench/services/search/common/search";
|
|
9
|
+
import { NotebookEditorWidget } from "@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/notebookEditorWidget";
|
|
10
|
+
import { FileMatchImpl } from "../searchTreeModel/fileMatch.js";
|
|
11
|
+
import { ISearchResult, ISearchTreeFolderMatchWorkspaceRoot, ISearchTreeFolderMatch, ISearchTreeFolderMatchWithResource, ITextSearchHeading, IChangeEvent, ISearchModel, ISearchTreeFileMatch } from "@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common/vscode/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon";
|
|
12
|
+
import { TextSearchHeadingImpl } from "../searchTreeModel/textSearchHeading.js";
|
|
13
|
+
export declare class AITextSearchHeadingImpl extends TextSearchHeadingImpl<IAITextQuery> {
|
|
14
|
+
constructor(parent: ISearchResult, instantiationService: IInstantiationService, uriIdentityService: IUriIdentityService);
|
|
15
|
+
name(): string;
|
|
16
|
+
id(): string;
|
|
17
|
+
get isAIContributed(): boolean;
|
|
18
|
+
get query(): IAITextQuery | null;
|
|
19
|
+
set query(query: IAITextQuery | null);
|
|
20
|
+
private _createBaseFolderMatch;
|
|
21
|
+
private createWorkspaceRootWithResourceImpl;
|
|
22
|
+
}
|
|
23
|
+
export declare class AIFolderMatchWorkspaceRootImpl extends Disposable implements ISearchTreeFolderMatchWorkspaceRoot {
|
|
24
|
+
private _resource;
|
|
25
|
+
private _index;
|
|
26
|
+
private _query;
|
|
27
|
+
private _parent;
|
|
28
|
+
private instantiationService;
|
|
29
|
+
protected _onChange: Emitter<IChangeEvent>;
|
|
30
|
+
readonly onChange: Event<IChangeEvent>;
|
|
31
|
+
private _onDispose;
|
|
32
|
+
readonly onDispose: Event<void>;
|
|
33
|
+
private readonly _id;
|
|
34
|
+
private _name;
|
|
35
|
+
protected _unDisposedFileMatches: Map<string, ISearchTreeFileMatch>;
|
|
36
|
+
protected _fileMatches: Map<string, ISearchTreeFileMatch>;
|
|
37
|
+
constructor(_resource: URI, _id: string, _index: number, _query: IAITextQuery, _parent: ITextSearchHeading, instantiationService: IInstantiationService, labelService: ILabelService);
|
|
38
|
+
get resource(): URI;
|
|
39
|
+
id(): string;
|
|
40
|
+
index(): number;
|
|
41
|
+
name(): string;
|
|
42
|
+
count(): number;
|
|
43
|
+
doAddFile(fileMatch: ISearchTreeFileMatch): void;
|
|
44
|
+
private latestRank;
|
|
45
|
+
createAndConfigureFileMatch(rawFileMatch: IFileMatch<URI>, searchInstanceID: string): FileMatchImpl;
|
|
46
|
+
isAIContributed(): boolean;
|
|
47
|
+
private onFileChange;
|
|
48
|
+
get hasChildren(): boolean;
|
|
49
|
+
parent(): ISearchTreeFolderMatch | ITextSearchHeading;
|
|
50
|
+
matches(): (ISearchTreeFileMatch | ISearchTreeFolderMatchWithResource)[];
|
|
51
|
+
allDownstreamFileMatches(): ISearchTreeFileMatch[];
|
|
52
|
+
remove(matches: ISearchTreeFileMatch | ISearchTreeFolderMatchWithResource | (ISearchTreeFileMatch | ISearchTreeFolderMatchWithResource)[]): void;
|
|
53
|
+
addFileMatch(raw: IFileMatch[], silent: boolean, searchInstanceID: string): void;
|
|
54
|
+
isEmpty(): boolean;
|
|
55
|
+
clear(clearingAll?: boolean): void;
|
|
56
|
+
get showHighlights(): boolean;
|
|
57
|
+
get searchModel(): ISearchModel;
|
|
58
|
+
get _searchResult(): ISearchResult;
|
|
59
|
+
get query(): IAITextQuery | null;
|
|
60
|
+
getDownstreamFileMatch(uri: URI): ISearchTreeFileMatch | null;
|
|
61
|
+
replaceAll(): Promise<any>;
|
|
62
|
+
recursiveFileCount(): number;
|
|
63
|
+
doRemoveFile(fileMatches: ISearchTreeFileMatch[], dispose?: boolean, trigger?: boolean, keepReadonly?: boolean): void;
|
|
64
|
+
replace(match: ISearchTreeFileMatch): Promise<any>;
|
|
65
|
+
replacingAll: boolean;
|
|
66
|
+
bindModel(model: ITextModel): void;
|
|
67
|
+
unbindNotebookEditorWidget(editor: NotebookEditorWidget, resource: URI): void;
|
|
68
|
+
bindNotebookEditorWidget(editor: NotebookEditorWidget, resource: URI): Promise<void>;
|
|
69
|
+
hasOnlyReadOnlyMatches(): boolean;
|
|
70
|
+
fileMatchesIterator(): IterableIterator<ISearchTreeFileMatch>;
|
|
71
|
+
folderMatchesIterator(): IterableIterator<ISearchTreeFolderMatchWithResource>;
|
|
72
|
+
recursiveMatchCount(): number;
|
|
73
|
+
private disposeMatches;
|
|
74
|
+
dispose(): void;
|
|
75
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
3
4
|
import { Lazy } from 'vscode/vscode/vs/base/common/lazy';
|
|
4
5
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
@@ -9,7 +10,7 @@ import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/commo
|
|
|
9
10
|
import { resultIsMatch } from 'vscode/vscode/vs/workbench/services/search/common/search';
|
|
10
11
|
import { IReplaceService } from 'vscode/vscode/vs/workbench/contrib/search/browser/replace.service';
|
|
11
12
|
import { FileMatchImpl } from '../searchTreeModel/fileMatch.js';
|
|
12
|
-
import { TEXT_SEARCH_HEADING_PREFIX, AI_TEXT_SEARCH_RESULT_ID, FOLDER_MATCH_PREFIX, getFileMatches, FILE_MATCH_PREFIX } from 'vscode/vscode/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon';
|
|
13
|
+
import { TEXT_SEARCH_HEADING_PREFIX, AI_TEXT_SEARCH_RESULT_ID, FOLDER_MATCH_PREFIX, getFileMatches, FILE_MATCH_PREFIX } from '@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common/vscode/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon';
|
|
13
14
|
import { TextSearchHeadingImpl } from '../searchTreeModel/textSearchHeading.js';
|
|
14
15
|
import { Range } from 'vscode/vscode/vs/editor/common/core/range';
|
|
15
16
|
import { textSearchResultToMatches } from '../searchTreeModel/match.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css
|
|
1
|
+
import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css';
|
|
2
2
|
|
|
3
3
|
var css = ".search-view{display:flex;flex-direction:column;height:100%}.search-view .results{flex-grow:1;min-height:0}.search-view .search-widgets-container{margin:0 12px 0 2px;padding-bottom:6px;padding-top:6px}.search-view .search-widget .toggle-replace-button{align-items:center;background-color:unset;background-position:50%;background-repeat:no-repeat;box-sizing:border-box;color:inherit;cursor:pointer;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:16px}.monaco-workbench .search-view .search-widget .toggle-replace-button:hover{background-color:var(--vscode-toolbar-hoverBackground)}.monaco-workbench .search-view .search-widget .toggle-replace-button:active{background-color:var(--vscode-toolbar-activeBackground)}.search-view .search-widget .replace-container,.search-view .search-widget .search-container{margin-left:18px}.search-view .search-widget .monaco-inputbox>.ibwrapper{height:100%}.search-view .search-widget .monaco-inputbox>.ibwrapper>.mirror,.search-view .search-widget .monaco-inputbox>.ibwrapper>textarea.input{padding:3px 0 3px 6px}.search-view .search-widget .monaco-inputbox>.ibwrapper>textarea.input{height:26px;overflow:initial}.search-view .search-widget .monaco-findInput .monaco-scrollable-element .scrollbar{opacity:0}.search-view .monaco-inputbox>.ibwrapper>textarea.input{scrollbar-width:none}.search-view .monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.search-view .monaco-findInput{display:inline-block;vertical-align:middle;width:100%}.search-view .search-widget .replace-container{display:inline-flex;margin-top:6px;position:relative}.search-view .search-widget .replace-input{display:flex;position:relative;vertical-align:middle;width:auto!important}.search-view .search-widget .replace-input>.controls{position:absolute;right:2px;top:3px}.search-view .search-widget .replace-container.disabled{display:none}.search-view .search-widget .replace-container .monaco-action-bar{height:25px;margin-left:4px}.search-view .query-details{margin:0 0 0 18px;min-height:1em;position:relative}.search-view .query-details .more{color:inherit;cursor:pointer;height:16px;position:absolute;right:-2px;width:25px;z-index:2}.search-view .query-details .file-types{display:none}.search-view .query-details .file-types>.monaco-inputbox{height:25px;width:100%}.search-view .query-details.more .file-types{display:inherit}.search-view .query-details.more .file-types:last-child{padding-bottom:4px}.search-view .query-details.more h4{font-size:11px;font-weight:400;margin:0;overflow:hidden;padding:4px 0 0;text-overflow:ellipsis;white-space:nowrap}.search-view .messages{color:var(--vscode-search-resultsInfoForeground);cursor:default;margin-top:-5px}.search-view .message{overflow-wrap:break-word;padding:0 22px 8px}.search-view .message p:first-child{margin-bottom:0;margin-top:0;padding-bottom:4px;user-select:text;-webkit-user-select:text}.search-view .message a{color:var(--vscode-textLink-foreground)}.search-view .message a:active,.search-view .message a:hover{color:var(--vscode-textLink-activeForeground)}.search-view .filematch,.search-view .foldermatch,.search-view .textsearchresult{display:flex;height:100%;line-height:22px;padding:0;position:relative}.search-view .textsearchresult{font-weight:500}.search-view .textsearchresult .monaco-icon-label .codicon{font-size:12px;padding-right:3px;position:relative;top:1px}.pane-body:not(.wide) .search-view .filematch .monaco-icon-label,.pane-body:not(.wide) .search-view .foldermatch .monaco-icon-label,.pane-body:not(.wide) .search-view .monaco-list .monaco-list-row.focused .filematch .monaco-icon-label,.pane-body:not(.wide) .search-view .monaco-list .monaco-list-row.focused .foldermatch .monaco-icon-label,.pane-body:not(.wide) .search-view .monaco-list .monaco-list-row:hover:not(.highlighted) .filematch .monaco-icon-label,.pane-body:not(.wide) .search-view .monaco-list .monaco-list-row:hover:not(.highlighted) .foldermatch .monaco-icon-label{flex:1}.pane-body.wide .search-view .filematch .badge,.pane-body.wide .search-view .foldermatch .badge{margin-left:10px}.search-view .linematch{display:flex;line-height:22px;overflow:hidden;position:relative}.search-view .linematch>.match{overflow:hidden;text-overflow:ellipsis;white-space:pre}.search-view .linematch .matchLineNum{display:none;font-size:.9em;margin-left:7px;margin-right:4px;opacity:.7}.search-view .linematch .matchLineNum.show{display:block}.pane-body.wide .search-view .monaco-list .monaco-list-row .filematch .actionBarContainer,.pane-body.wide .search-view .monaco-list .monaco-list-row .foldermatch .actionBarContainer,.search-view .monaco-list .monaco-list-row .linematch .actionBarContainer{flex:1 0 auto}.pane-body:not(.wide) .search-view .monaco-list .monaco-list-row .filematch .actionBarContainer,.pane-body:not(.wide) .search-view .monaco-list .monaco-list-row .foldermatch .actionBarContainer{flex:0 0 auto}.pane-body:not(.wide) .search-view .monaco-list .monaco-list-row .linematch .actionBarContainer,.search-view.actions-right .monaco-list .monaco-list-row .filematch .actionBarContainer,.search-view.actions-right .monaco-list .monaco-list-row .foldermatch .actionBarContainer,.search-view.actions-right .monaco-list .monaco-list-row .linematch .actionBarContainer{text-align:right}.search-view .monaco-list .monaco-list-row .monaco-action-bar{display:none;line-height:1em;padding:0 .8em 0 .4em}.search-view .monaco-list .monaco-list-row .monaco-action-bar .action-item{margin:0}.search-view .monaco-list .monaco-list-row.focused .monaco-action-bar,.search-view .monaco-list .monaco-list-row.selected .monaco-action-bar,.search-view .monaco-list .monaco-list-row:hover:not(.highlighted) .monaco-action-bar{display:inline-block}.search-view .monaco-list .monaco-list-row .monaco-action-bar .action-item{margin-right:.2em}.search-view .monaco-list .monaco-list-row .monaco-action-bar .action-label{padding:2px}.monaco-workbench.hc-black .search-view .monaco-list .monaco-list-row .monaco-action-bar .action-label,.monaco-workbench.hc-light .search-view .monaco-list .monaco-list-row .monaco-action-bar .action-label{margin-top:2px}.search-view .monaco-count-badge{margin-right:12px}.pane-body:not(.wide) .search-view>.results>.monaco-list .monaco-list-row.focused .filematch .monaco-count-badge,.pane-body:not(.wide) .search-view>.results>.monaco-list .monaco-list-row.focused .foldermatch .monaco-count-badge,.pane-body:not(.wide) .search-view>.results>.monaco-list .monaco-list-row.focused .linematch .monaco-count-badge,.pane-body:not(.wide) .search-view>.results>.monaco-list .monaco-list-row:hover .filematch .monaco-count-badge,.pane-body:not(.wide) .search-view>.results>.monaco-list .monaco-list-row:hover .foldermatch .monaco-count-badge,.pane-body:not(.wide) .search-view>.results>.monaco-list .monaco-list-row:hover .linematch .monaco-count-badge{display:none}.search-view .replace.findInFileMatch{background-color:var(--vscode-diffEditor-removedTextBackground);border:1px solid var(--vscode-diffEditor-removedTextBackground);text-decoration:line-through}.monaco-workbench.hc-dark .search-view .replace.findInFileMatch,.monaco-workbench.hc-light .search-view .replace.findInFileMatch{border:1px dashed var(--vscode-diffEditor-removedTextBackground)}.search-view .findInFileMatch,.search-view .replaceMatch{white-space:pre}.search-view .findInFileMatch{background-color:var(--vscode-editor-findMatchHighlightBackground);border:1px solid var(--vscode-editor-findMatchHighlightBorder)}.monaco-workbench.hc-dark .search-view .findInFileMatch,.monaco-workbench.hc-light .search-view .findInFileMatch{border:1px dashed var(--vscode-editor-findMatchHighlightBorder)}.search-view .replaceMatch{background-color:var(--vscode-diffEditor-insertedTextBackground)}.monaco-workbench.hc-black .search-view .findInFileMatch,.monaco-workbench.hc-black .search-view .replaceMatch,.monaco-workbench.hc-light .search-view .findInFileMatch,.monaco-workbench.hc-light .search-view .replaceMatch{background:none!important;box-sizing:border-box}.search-view .replaceMatch:not(:empty){border:1px solid var(--vscode-diffEditor-insertedLineBackground)}.monaco-workbench.hc-dark .search-view .replaceMatch:not(:empty),.monaco-workbench.hc-light .search-view .replaceMatch:not(:empty){border:1px dashed var(--vscode-diffEditor-insertedLineBackground)}.monaco-workbench.hc-black .search-view .filematch,.monaco-workbench.hc-black .search-view .foldermatch,.monaco-workbench.hc-black .search-view .linematch,.monaco-workbench.hc-light .search-view .filematch,.monaco-workbench.hc-light .search-view .foldermatch,.monaco-workbench.hc-light .search-view .linematch{line-height:20px}.monaco-workbench.vs .search-panel .search-view .monaco-inputbox{border:1px solid transparent}.text-search-provider-messages .providerMessage{padding-top:4px}.text-search-provider-messages .providerMessage .codicon{padding-right:3px;position:relative;top:3px}.monaco-workbench .search-view .monaco-list.element-focused .monaco-list-row.focused.selected:not(.highlighted) .action-label:focus{outline-color:var(--vscode-list-activeSelectionForeground)}.monaco-workbench .search-container .monaco-custom-toggle.disabled{background-color:inherit!important;cursor:default;opacity:.3;pointer-events:none;user-select:none;-webkit-user-select:none}.monaco-workbench .search-container .find-filter-button{box-sizing:border-box;color:inherit;cursor:pointer;float:left;margin-left:2px;user-select:none;-webkit-user-select:none}";
|
|
4
4
|
n(css,{});
|
package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModel.d.ts
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { IModelService } from "vscode/vscode/vs/editor/common/services/model";
|
|
2
|
+
import { ILabelService } from "vscode/vscode/vs/platform/label/common/label.service";
|
|
3
|
+
import { ISearchRange, ITextSearchMatch, IPatternInfo, ITextSearchPreviewOptions, IFileMatch } from "vscode/vscode/vs/workbench/services/search/common/search";
|
|
4
|
+
import { ICellViewModel } from "@codingame/monaco-vscode-271a23cd-c7d7-5761-ae35-a923a42987b8-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
|
|
5
|
+
import { NotebookEditorWidget } from "@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/notebookEditorWidget";
|
|
6
|
+
import { INotebookEditorService } from "vscode/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service";
|
|
7
|
+
import { INotebookCellMatchNoModel } from "vscode/vscode/vs/workbench/contrib/search/common/searchNotebookHelpers";
|
|
8
|
+
import { INotebookCellMatchWithModel } from "@codingame/monaco-vscode-6f9bc782-77e0-5716-93bd-b05210c768c5-common/vscode/vs/workbench/contrib/search/browser/notebookSearch/searchNotebookHelpers";
|
|
9
|
+
import { ISearchTreeMatch, ISearchTreeFolderMatch, ISearchTreeFolderMatchWorkspaceRoot } from "@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common/vscode/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon";
|
|
10
|
+
import { IReplaceService } from "vscode/vscode/vs/workbench/contrib/search/browser/replace.service";
|
|
11
|
+
import { FileMatchImpl } from "../searchTreeModel/fileMatch.js";
|
|
12
|
+
import { ICellMatch, IMatchInNotebook, INotebookFileInstanceMatch } from "@codingame/monaco-vscode-45a408c6-90ed-5d8b-801d-f3f69c7a97f2-common/vscode/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModelBase";
|
|
13
|
+
import { MatchImpl } from "../searchTreeModel/match.js";
|
|
14
|
+
export declare class MatchInNotebook extends MatchImpl implements IMatchInNotebook {
|
|
15
|
+
private readonly _cellParent;
|
|
16
|
+
private _webviewIndex;
|
|
17
|
+
constructor(_cellParent: ICellMatch, _fullPreviewLines: string[], _fullPreviewRange: ISearchRange, _documentRange: ISearchRange, webviewIndex?: number);
|
|
18
|
+
parent(): INotebookFileInstanceMatch;
|
|
19
|
+
get cellParent(): ICellMatch;
|
|
20
|
+
private notebookMatchTypeString;
|
|
21
|
+
isWebviewMatch(): boolean;
|
|
22
|
+
get isReadonly(): boolean;
|
|
23
|
+
get cellIndex(): number;
|
|
24
|
+
get webviewIndex(): number | undefined;
|
|
25
|
+
get cell(): ICellViewModel | undefined;
|
|
26
|
+
}
|
|
27
|
+
export declare class CellMatch implements ICellMatch {
|
|
28
|
+
private readonly _parent;
|
|
29
|
+
private _cell;
|
|
30
|
+
private readonly _cellIndex;
|
|
31
|
+
private _contentMatches;
|
|
32
|
+
private _webviewMatches;
|
|
33
|
+
private _context;
|
|
34
|
+
constructor(_parent: INotebookFileInstanceMatch, _cell: ICellViewModel | undefined, _cellIndex: number);
|
|
35
|
+
hasCellViewModel(): boolean;
|
|
36
|
+
get context(): Map<number, string>;
|
|
37
|
+
matches(): MatchInNotebook[];
|
|
38
|
+
get contentMatches(): MatchInNotebook[];
|
|
39
|
+
get webviewMatches(): MatchInNotebook[];
|
|
40
|
+
remove(matches: MatchInNotebook | MatchInNotebook[]): void;
|
|
41
|
+
clearAllMatches(): void;
|
|
42
|
+
addContentMatches(textSearchMatches: ITextSearchMatch[]): void;
|
|
43
|
+
addContext(textSearchMatches: ITextSearchMatch[]): void;
|
|
44
|
+
addWebviewMatches(textSearchMatches: ITextSearchMatch[]): void;
|
|
45
|
+
setCellModel(cell: ICellViewModel): void;
|
|
46
|
+
get parent(): INotebookFileInstanceMatch;
|
|
47
|
+
get id(): string;
|
|
48
|
+
get cellIndex(): number;
|
|
49
|
+
get cell(): ICellViewModel | undefined;
|
|
50
|
+
}
|
|
51
|
+
export declare class NotebookCompatibleFileMatch extends FileMatchImpl implements INotebookFileInstanceMatch {
|
|
52
|
+
private readonly searchInstanceID;
|
|
53
|
+
private readonly notebookEditorService;
|
|
54
|
+
private _notebookEditorWidget;
|
|
55
|
+
private _editorWidgetListener;
|
|
56
|
+
private _notebookUpdateScheduler;
|
|
57
|
+
private _lastEditorWidgetIdForUpdate;
|
|
58
|
+
constructor(_query: IPatternInfo, _previewOptions: ITextSearchPreviewOptions | undefined, _maxResults: number | undefined, _parent: ISearchTreeFolderMatch, rawMatch: IFileMatch, _closestRoot: ISearchTreeFolderMatchWorkspaceRoot | null, searchInstanceID: string, modelService: IModelService, replaceService: IReplaceService, labelService: ILabelService, notebookEditorService: INotebookEditorService);
|
|
59
|
+
private _cellMatches;
|
|
60
|
+
get cellContext(): Map<string, Map<number, string>>;
|
|
61
|
+
getCellMatch(cellID: string): ICellMatch | undefined;
|
|
62
|
+
addCellMatch(rawCell: INotebookCellMatchNoModel | INotebookCellMatchWithModel): void;
|
|
63
|
+
addWebviewMatchesToCell(cellID: string, webviewMatches: ITextSearchMatch[]): void;
|
|
64
|
+
addContentMatchesToCell(cellID: string, contentMatches: ITextSearchMatch[]): void;
|
|
65
|
+
private revealCellRange;
|
|
66
|
+
bindNotebookEditorWidget(widget: NotebookEditorWidget): void;
|
|
67
|
+
unbindNotebookEditorWidget(widget?: NotebookEditorWidget): void;
|
|
68
|
+
updateNotebookHighlights(): void;
|
|
69
|
+
private _addNotebookHighlights;
|
|
70
|
+
private _removeNotebookHighlights;
|
|
71
|
+
private updateNotebookMatches;
|
|
72
|
+
private setNotebookFindMatchDecorationsUsingCellMatches;
|
|
73
|
+
updateMatchesForEditorWidget(): Promise<void>;
|
|
74
|
+
showMatch(match: MatchInNotebook): Promise<void>;
|
|
75
|
+
private highlightCurrentFindMatchDecoration;
|
|
76
|
+
matches(): ISearchTreeMatch[];
|
|
77
|
+
protected removeMatch(match: ISearchTreeMatch): void;
|
|
78
|
+
cellMatches(): ICellMatch[];
|
|
79
|
+
createMatches(): void;
|
|
80
|
+
get hasChildren(): boolean;
|
|
81
|
+
setSelectedMatch(match: ISearchTreeMatch | null): void;
|
|
82
|
+
dispose(): void;
|
|
83
|
+
}
|
|
84
|
+
export declare function textSearchMatchesToNotebookMatches(textSearchMatches: ITextSearchMatch[], cell: CellMatch): MatchInNotebook[];
|
package/vscode/src/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModel.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { coalesce } from 'vscode/vscode/vs/base/common/arrays';
|
|
3
4
|
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
4
5
|
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
@@ -7,17 +8,17 @@ import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
|
7
8
|
import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
|
|
8
9
|
import { resultIsMatch } from 'vscode/vscode/vs/workbench/services/search/common/search';
|
|
9
10
|
import { getTextSearchMatchWithModelContext } from '../../../../services/search/common/searchHelpers.js';
|
|
10
|
-
import { FindMatchDecorationModel } from '@codingame/monaco-vscode-
|
|
11
|
-
import { CellFindMatchModel } from '@codingame/monaco-vscode-
|
|
11
|
+
import { FindMatchDecorationModel } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/contrib/find/findMatchDecorationModel';
|
|
12
|
+
import { CellFindMatchModel } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/contrib/find/findModel';
|
|
12
13
|
import { INotebookEditorService } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
|
|
13
14
|
import { NotebookCellsChangeType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
14
15
|
import { CellSearchModel } from 'vscode/vscode/vs/workbench/contrib/search/common/cellSearchModel';
|
|
15
16
|
import { rawCellPrefix, isINotebookFileMatchNoModel } from 'vscode/vscode/vs/workbench/contrib/search/common/searchNotebookHelpers';
|
|
16
|
-
import { isINotebookCellMatchWithModel, contentMatchesToTextSearchMatches, webviewMatchesToTextSearchMatches, isINotebookFileMatchWithModel } from 'vscode/vscode/vs/workbench/contrib/search/browser/notebookSearch/searchNotebookHelpers';
|
|
17
|
-
import { MATCH_PREFIX } from 'vscode/vscode/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon';
|
|
17
|
+
import { isINotebookCellMatchWithModel, contentMatchesToTextSearchMatches, webviewMatchesToTextSearchMatches, isINotebookFileMatchWithModel } from '@codingame/monaco-vscode-6f9bc782-77e0-5716-93bd-b05210c768c5-common/vscode/vs/workbench/contrib/search/browser/notebookSearch/searchNotebookHelpers';
|
|
18
|
+
import { MATCH_PREFIX } from '@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common/vscode/vs/workbench/contrib/search/browser/searchTreeModel/searchTreeCommon';
|
|
18
19
|
import { IReplaceService } from 'vscode/vscode/vs/workbench/contrib/search/browser/replace.service';
|
|
19
20
|
import { FileMatchImpl } from '../searchTreeModel/fileMatch.js';
|
|
20
|
-
import { isIMatchInNotebook } from 'vscode/vscode/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModelBase';
|
|
21
|
+
import { isIMatchInNotebook } from '@codingame/monaco-vscode-45a408c6-90ed-5d8b-801d-f3f69c7a97f2-common/vscode/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchModelBase';
|
|
21
22
|
import { MatchImpl, textSearchResultToMatches } from '../searchTreeModel/match.js';
|
|
22
23
|
|
|
23
24
|
class MatchInNotebook extends MatchImpl {
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as dom from "vscode/vscode/vs/base/browser/dom";
|
|
2
|
+
import { IContextViewProvider } from "vscode/vscode/vs/base/browser/ui/contextview/contextview";
|
|
3
|
+
import { HistoryInputBox, IInputBoxStyles } from "vscode/vscode/vs/base/browser/ui/inputbox/inputBox";
|
|
4
|
+
import { Widget } from "vscode/vscode/vs/base/browser/ui/widget";
|
|
5
|
+
import { Event as CommonEvent } from "vscode/vscode/vs/base/common/event";
|
|
6
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
7
|
+
import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
8
|
+
import { IKeybindingService } from "vscode/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
9
|
+
export interface IOptions {
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
showPlaceholderOnFocus?: boolean;
|
|
12
|
+
tooltip?: string;
|
|
13
|
+
width?: number;
|
|
14
|
+
ariaLabel?: string;
|
|
15
|
+
history?: string[];
|
|
16
|
+
inputBoxStyles: IInputBoxStyles;
|
|
17
|
+
}
|
|
18
|
+
export declare class PatternInputWidget extends Widget {
|
|
19
|
+
private contextViewProvider;
|
|
20
|
+
private readonly contextKeyService;
|
|
21
|
+
protected readonly configurationService: IConfigurationService;
|
|
22
|
+
private readonly keybindingService;
|
|
23
|
+
static OPTION_CHANGE: string;
|
|
24
|
+
inputFocusTracker: dom.IFocusTracker;
|
|
25
|
+
private width;
|
|
26
|
+
private domNode;
|
|
27
|
+
protected inputBox: HistoryInputBox;
|
|
28
|
+
private _onSubmit;
|
|
29
|
+
onSubmit: CommonEvent<boolean>;
|
|
30
|
+
private _onCancel;
|
|
31
|
+
onCancel: CommonEvent<void>;
|
|
32
|
+
constructor(parent: HTMLElement, contextViewProvider: IContextViewProvider, options: IOptions, contextKeyService: IContextKeyService, configurationService: IConfigurationService, keybindingService: IKeybindingService);
|
|
33
|
+
dispose(): void;
|
|
34
|
+
setWidth(newWidth: number): void;
|
|
35
|
+
getValue(): string;
|
|
36
|
+
setValue(value: string): void;
|
|
37
|
+
select(): void;
|
|
38
|
+
focus(): void;
|
|
39
|
+
inputHasFocus(): boolean;
|
|
40
|
+
private setInputWidth;
|
|
41
|
+
protected getSubcontrolsWidth(): number;
|
|
42
|
+
getHistory(): string[];
|
|
43
|
+
clearHistory(): void;
|
|
44
|
+
prependHistory(history: string[]): void;
|
|
45
|
+
clear(): void;
|
|
46
|
+
onSearchSubmit(): void;
|
|
47
|
+
showNextTerm(): void;
|
|
48
|
+
showPreviousTerm(): void;
|
|
49
|
+
private render;
|
|
50
|
+
protected renderSubcontrols(_controlsDiv: HTMLDivElement): void;
|
|
51
|
+
private onInputKeyUp;
|
|
52
|
+
}
|
|
53
|
+
export declare class IncludePatternInputWidget extends PatternInputWidget {
|
|
54
|
+
private _onChangeSearchInEditorsBoxEmitter;
|
|
55
|
+
onChangeSearchInEditorsBox: CommonEvent<void>;
|
|
56
|
+
constructor(parent: HTMLElement, contextViewProvider: IContextViewProvider, options: IOptions, contextKeyService: IContextKeyService, configurationService: IConfigurationService, keybindingService: IKeybindingService);
|
|
57
|
+
private useSearchInEditorsBox;
|
|
58
|
+
dispose(): void;
|
|
59
|
+
onlySearchInOpenEditors(): boolean;
|
|
60
|
+
setOnlySearchInOpenEditors(value: boolean): void;
|
|
61
|
+
protected getSubcontrolsWidth(): number;
|
|
62
|
+
protected renderSubcontrols(controlsDiv: HTMLDivElement): void;
|
|
63
|
+
}
|
|
64
|
+
export declare class ExcludePatternInputWidget extends PatternInputWidget {
|
|
65
|
+
private _onChangeIgnoreBoxEmitter;
|
|
66
|
+
onChangeIgnoreBox: CommonEvent<void>;
|
|
67
|
+
constructor(parent: HTMLElement, contextViewProvider: IContextViewProvider, options: IOptions, contextKeyService: IContextKeyService, configurationService: IConfigurationService, keybindingService: IKeybindingService);
|
|
68
|
+
private useExcludesAndIgnoreFilesBox;
|
|
69
|
+
dispose(): void;
|
|
70
|
+
useExcludesAndIgnoreFiles(): boolean;
|
|
71
|
+
setUseExcludesAndIgnoreFiles(value: boolean): void;
|
|
72
|
+
protected getSubcontrolsWidth(): number;
|
|
73
|
+
protected renderSubcontrols(controlsDiv: HTMLDivElement): void;
|
|
74
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { trackFocus } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
4
|
import { Toggle } from 'vscode/vscode/vs/base/browser/ui/toggle/toggle';
|
|
4
5
|
import { Widget } from 'vscode/vscode/vs/base/browser/ui/widget';
|
|
5
6
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
6
7
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
8
|
+
import { KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
7
9
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
8
10
|
import { ContextScopedHistoryInputBox } from 'vscode/vscode/vs/platform/history/browser/contextScopedHistoryWidget';
|
|
9
11
|
import { showHistoryKeybindingHint } from 'vscode/vscode/vs/platform/history/browser/historyWidgetKeybindingHint';
|
|
@@ -21,13 +23,13 @@ let PatternInputWidget = class PatternInputWidget extends Widget {
|
|
|
21
23
|
this.contextKeyService = contextKeyService;
|
|
22
24
|
this.configurationService = configurationService;
|
|
23
25
|
this.keybindingService = keybindingService;
|
|
24
|
-
this._onSubmit = this._register((
|
|
26
|
+
this._onSubmit = this._register(( new Emitter()));
|
|
25
27
|
this.onSubmit = this._onSubmit.event;
|
|
26
|
-
this._onCancel = this._register((
|
|
28
|
+
this._onCancel = this._register(( new Emitter()));
|
|
27
29
|
this.onCancel = this._onCancel.event;
|
|
28
30
|
options = {
|
|
29
31
|
...{
|
|
30
|
-
ariaLabel: ( localize(
|
|
32
|
+
ariaLabel: ( localize(8575, "input"))
|
|
31
33
|
},
|
|
32
34
|
...options,
|
|
33
35
|
};
|
|
@@ -91,7 +93,8 @@ let PatternInputWidget = class PatternInputWidget extends Widget {
|
|
|
91
93
|
render(options) {
|
|
92
94
|
this.domNode = document.createElement('div');
|
|
93
95
|
this.domNode.classList.add('monaco-findInput');
|
|
94
|
-
|
|
96
|
+
const history = options.history || [];
|
|
97
|
+
this.inputBox = ( new ContextScopedHistoryInputBox(this.domNode, this.contextViewProvider, {
|
|
95
98
|
placeholder: options.placeholder,
|
|
96
99
|
showPlaceholderOnFocus: options.showPlaceholderOnFocus,
|
|
97
100
|
tooltip: options.tooltip,
|
|
@@ -99,10 +102,10 @@ let PatternInputWidget = class PatternInputWidget extends Widget {
|
|
|
99
102
|
validationOptions: {
|
|
100
103
|
validation: undefined
|
|
101
104
|
},
|
|
102
|
-
history:
|
|
105
|
+
history: ( new Set(history)),
|
|
103
106
|
showHistoryHint: () => showHistoryKeybindingHint(this.keybindingService),
|
|
104
107
|
inputBoxStyles: options.inputBoxStyles
|
|
105
|
-
}, this.contextKeyService))
|
|
108
|
+
}, this.contextKeyService));
|
|
106
109
|
this._register(this.inputBox.onDidChange(() => this._onSubmit.fire(true)));
|
|
107
110
|
this.inputFocusTracker = trackFocus(this.inputBox.inputElement);
|
|
108
111
|
this.onkeyup(this.inputBox.inputElement, (keyboardEvent) => this.onInputKeyUp(keyboardEvent));
|
|
@@ -116,25 +119,25 @@ let PatternInputWidget = class PatternInputWidget extends Widget {
|
|
|
116
119
|
}
|
|
117
120
|
onInputKeyUp(keyboardEvent) {
|
|
118
121
|
switch (keyboardEvent.keyCode) {
|
|
119
|
-
case
|
|
122
|
+
case KeyCode.Enter:
|
|
120
123
|
this.onSearchSubmit();
|
|
121
124
|
this._onSubmit.fire(false);
|
|
122
125
|
return;
|
|
123
|
-
case
|
|
126
|
+
case KeyCode.Escape:
|
|
124
127
|
this._onCancel.fire();
|
|
125
128
|
return;
|
|
126
129
|
}
|
|
127
130
|
}
|
|
128
131
|
};
|
|
129
|
-
PatternInputWidget = (
|
|
130
|
-
(
|
|
131
|
-
(
|
|
132
|
-
(
|
|
133
|
-
], PatternInputWidget))
|
|
132
|
+
PatternInputWidget = ( __decorate([
|
|
133
|
+
( __param(3, IContextKeyService)),
|
|
134
|
+
( __param(4, IConfigurationService)),
|
|
135
|
+
( __param(5, IKeybindingService))
|
|
136
|
+
], PatternInputWidget));
|
|
134
137
|
let IncludePatternInputWidget = class IncludePatternInputWidget extends PatternInputWidget {
|
|
135
138
|
constructor(parent, contextViewProvider, options, contextKeyService, configurationService, keybindingService) {
|
|
136
139
|
super(parent, contextViewProvider, options, contextKeyService, configurationService, keybindingService);
|
|
137
|
-
this._onChangeSearchInEditorsBoxEmitter = this._register((
|
|
140
|
+
this._onChangeSearchInEditorsBoxEmitter = this._register(( new Emitter()));
|
|
138
141
|
this.onChangeSearchInEditorsBox = this._onChangeSearchInEditorsBoxEmitter.event;
|
|
139
142
|
}
|
|
140
143
|
dispose() {
|
|
@@ -152,13 +155,13 @@ let IncludePatternInputWidget = class IncludePatternInputWidget extends PatternI
|
|
|
152
155
|
return super.getSubcontrolsWidth() + this.useSearchInEditorsBox.width();
|
|
153
156
|
}
|
|
154
157
|
renderSubcontrols(controlsDiv) {
|
|
155
|
-
this.useSearchInEditorsBox = this._register((
|
|
158
|
+
this.useSearchInEditorsBox = this._register(( new Toggle({
|
|
156
159
|
icon: Codicon.book,
|
|
157
|
-
title: ( localize(
|
|
160
|
+
title: ( localize(8576, "Search only in Open Editors")),
|
|
158
161
|
isChecked: false,
|
|
159
162
|
hoverDelegate: getDefaultHoverDelegate('element'),
|
|
160
163
|
...defaultToggleStyles
|
|
161
|
-
})))
|
|
164
|
+
})));
|
|
162
165
|
this._register(this.useSearchInEditorsBox.onChange(viaKeyboard => {
|
|
163
166
|
this._onChangeSearchInEditorsBoxEmitter.fire();
|
|
164
167
|
if (!viaKeyboard) {
|
|
@@ -169,15 +172,15 @@ let IncludePatternInputWidget = class IncludePatternInputWidget extends PatternI
|
|
|
169
172
|
super.renderSubcontrols(controlsDiv);
|
|
170
173
|
}
|
|
171
174
|
};
|
|
172
|
-
IncludePatternInputWidget = (
|
|
173
|
-
(
|
|
174
|
-
(
|
|
175
|
-
(
|
|
176
|
-
], IncludePatternInputWidget))
|
|
175
|
+
IncludePatternInputWidget = ( __decorate([
|
|
176
|
+
( __param(3, IContextKeyService)),
|
|
177
|
+
( __param(4, IConfigurationService)),
|
|
178
|
+
( __param(5, IKeybindingService))
|
|
179
|
+
], IncludePatternInputWidget));
|
|
177
180
|
let ExcludePatternInputWidget = class ExcludePatternInputWidget extends PatternInputWidget {
|
|
178
181
|
constructor(parent, contextViewProvider, options, contextKeyService, configurationService, keybindingService) {
|
|
179
182
|
super(parent, contextViewProvider, options, contextKeyService, configurationService, keybindingService);
|
|
180
|
-
this._onChangeIgnoreBoxEmitter = this._register((
|
|
183
|
+
this._onChangeIgnoreBoxEmitter = this._register(( new Emitter()));
|
|
181
184
|
this.onChangeIgnoreBox = this._onChangeIgnoreBoxEmitter.event;
|
|
182
185
|
}
|
|
183
186
|
dispose() {
|
|
@@ -195,14 +198,14 @@ let ExcludePatternInputWidget = class ExcludePatternInputWidget extends PatternI
|
|
|
195
198
|
return super.getSubcontrolsWidth() + this.useExcludesAndIgnoreFilesBox.width();
|
|
196
199
|
}
|
|
197
200
|
renderSubcontrols(controlsDiv) {
|
|
198
|
-
this.useExcludesAndIgnoreFilesBox = this._register((
|
|
201
|
+
this.useExcludesAndIgnoreFilesBox = this._register(( new Toggle({
|
|
199
202
|
icon: Codicon.exclude,
|
|
200
203
|
actionClassName: 'useExcludesAndIgnoreFiles',
|
|
201
|
-
title: ( localize(
|
|
204
|
+
title: ( localize(8577, "Use Exclude Settings and Ignore Files")),
|
|
202
205
|
isChecked: true,
|
|
203
206
|
hoverDelegate: getDefaultHoverDelegate('element'),
|
|
204
207
|
...defaultToggleStyles
|
|
205
|
-
})))
|
|
208
|
+
})));
|
|
206
209
|
this._register(this.useExcludesAndIgnoreFilesBox.onChange(viaKeyboard => {
|
|
207
210
|
this._onChangeIgnoreBoxEmitter.fire();
|
|
208
211
|
if (!viaKeyboard) {
|
|
@@ -213,10 +216,10 @@ let ExcludePatternInputWidget = class ExcludePatternInputWidget extends PatternI
|
|
|
213
216
|
super.renderSubcontrols(controlsDiv);
|
|
214
217
|
}
|
|
215
218
|
};
|
|
216
|
-
ExcludePatternInputWidget = (
|
|
217
|
-
(
|
|
218
|
-
(
|
|
219
|
-
(
|
|
220
|
-
], ExcludePatternInputWidget))
|
|
219
|
+
ExcludePatternInputWidget = ( __decorate([
|
|
220
|
+
( __param(3, IContextKeyService)),
|
|
221
|
+
( __param(4, IConfigurationService)),
|
|
222
|
+
( __param(5, IKeybindingService))
|
|
223
|
+
], ExcludePatternInputWidget));
|
|
221
224
|
|
|
222
225
|
export { ExcludePatternInputWidget, IncludePatternInputWidget, PatternInputWidget };
|