@theia/search-in-workspace 1.45.0 → 1.46.0-next.72

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.
Files changed (58) hide show
  1. package/README.md +40 -40
  2. package/lib/browser/components/search-in-workspace-input.d.ts +39 -39
  3. package/lib/browser/components/search-in-workspace-input.js +123 -123
  4. package/lib/browser/components/search-in-workspace-textarea.d.ts +39 -39
  5. package/lib/browser/components/search-in-workspace-textarea.js +130 -130
  6. package/lib/browser/search-in-workspace-context-key-service.d.ts +23 -23
  7. package/lib/browser/search-in-workspace-context-key-service.js +90 -90
  8. package/lib/browser/search-in-workspace-factory.d.ts +10 -10
  9. package/lib/browser/search-in-workspace-factory.js +68 -68
  10. package/lib/browser/search-in-workspace-frontend-contribution.d.ts +57 -55
  11. package/lib/browser/search-in-workspace-frontend-contribution.d.ts.map +1 -1
  12. package/lib/browser/search-in-workspace-frontend-contribution.js +516 -482
  13. package/lib/browser/search-in-workspace-frontend-contribution.js.map +1 -1
  14. package/lib/browser/search-in-workspace-frontend-module.d.ts +6 -6
  15. package/lib/browser/search-in-workspace-frontend-module.js +71 -71
  16. package/lib/browser/search-in-workspace-label-provider.d.ts +9 -9
  17. package/lib/browser/search-in-workspace-label-provider.js +57 -57
  18. package/lib/browser/search-in-workspace-preferences.d.ts +17 -17
  19. package/lib/browser/search-in-workspace-preferences.js +87 -87
  20. package/lib/browser/search-in-workspace-result-tree-widget.d.ts +259 -255
  21. package/lib/browser/search-in-workspace-result-tree-widget.d.ts.map +1 -1
  22. package/lib/browser/search-in-workspace-result-tree-widget.js +1172 -1099
  23. package/lib/browser/search-in-workspace-result-tree-widget.js.map +1 -1
  24. package/lib/browser/search-in-workspace-service.d.ts +35 -35
  25. package/lib/browser/search-in-workspace-service.js +158 -158
  26. package/lib/browser/search-in-workspace-widget.d.ts +121 -121
  27. package/lib/browser/search-in-workspace-widget.js +629 -629
  28. package/lib/browser/search-layout-migrations.d.ts +5 -5
  29. package/lib/browser/search-layout-migrations.js +64 -64
  30. package/lib/common/search-in-workspace-interface.d.ts +116 -116
  31. package/lib/common/search-in-workspace-interface.js +35 -35
  32. package/lib/node/ripgrep-search-in-workspace-server.d.ts +94 -94
  33. package/lib/node/ripgrep-search-in-workspace-server.js +430 -430
  34. package/lib/node/ripgrep-search-in-workspace-server.js.map +1 -1
  35. package/lib/node/ripgrep-search-in-workspace-server.slow-spec.d.ts +1 -1
  36. package/lib/node/ripgrep-search-in-workspace-server.slow-spec.js +899 -899
  37. package/lib/node/ripgrep-search-in-workspace-server.slow-spec.js.map +1 -1
  38. package/lib/node/search-in-workspace-backend-module.d.ts +3 -3
  39. package/lib/node/search-in-workspace-backend-module.js +32 -32
  40. package/package.json +9 -9
  41. package/src/browser/components/search-in-workspace-input.tsx +139 -139
  42. package/src/browser/components/search-in-workspace-textarea.tsx +153 -153
  43. package/src/browser/search-in-workspace-context-key-service.ts +93 -93
  44. package/src/browser/search-in-workspace-factory.ts +59 -59
  45. package/src/browser/search-in-workspace-frontend-contribution.ts +510 -474
  46. package/src/browser/search-in-workspace-frontend-module.ts +83 -83
  47. package/src/browser/search-in-workspace-label-provider.ts +48 -48
  48. package/src/browser/search-in-workspace-preferences.ts +96 -96
  49. package/src/browser/search-in-workspace-result-tree-widget.tsx +1318 -1245
  50. package/src/browser/search-in-workspace-service.ts +152 -152
  51. package/src/browser/search-in-workspace-widget.tsx +727 -727
  52. package/src/browser/search-layout-migrations.ts +53 -53
  53. package/src/browser/styles/index.css +400 -400
  54. package/src/browser/styles/search.svg +6 -6
  55. package/src/common/search-in-workspace-interface.ts +153 -153
  56. package/src/node/ripgrep-search-in-workspace-server.slow-spec.ts +1073 -1073
  57. package/src/node/ripgrep-search-in-workspace-server.ts +490 -490
  58. package/src/node/search-in-workspace-backend-module.ts +33 -33
@@ -1,6 +1,6 @@
1
- <!--Copyright (c) Microsoft Corporation. All rights reserved.-->
2
- <!--Copyright (C) 2019 TypeFox and others.-->
3
- <!--Licensed under the MIT License. See License.txt in the project root for license information.-->
4
- <svg fill="#F6F6F6" height="28" viewBox="0 0 28 28" width="28" xmlns="http://www.w3.org/2000/svg">
5
- <path d="m17.1249 2c-4.9127 0-8.89701 3.98533-8.89701 8.899 0 1.807.54686 3.4801 1.47014 4.8853 0 0-5.562 5.5346-7.20564 7.2056-1.644662 1.6701 1.0156 4.1304 2.63997 2.4442 1.62538-1.6832 7.10824-7.1072 7.10824-7.1072 1.4042.9243 3.0793 1.4711 4.8843 1.4711 4.9157 0 8.9-3.9873 8.9-8.899.001-4.91469-3.9843-8.899-8.9-8.899zm0 15.2544c-3.5095 0-6.3565-2.8449-6.3565-6.3554 0-3.51049 2.846-6.35643 6.3565-6.35643 3.5125 0 6.3574 2.84493 6.3574 6.35643 0 3.5105-2.8449 6.3554-6.3574 6.3554z" fill="#F6F6F6" />
6
- </svg>
1
+ <!--Copyright (c) Microsoft Corporation. All rights reserved.-->
2
+ <!--Copyright (C) 2019 TypeFox and others.-->
3
+ <!--Licensed under the MIT License. See License.txt in the project root for license information.-->
4
+ <svg fill="#F6F6F6" height="28" viewBox="0 0 28 28" width="28" xmlns="http://www.w3.org/2000/svg">
5
+ <path d="m17.1249 2c-4.9127 0-8.89701 3.98533-8.89701 8.899 0 1.807.54686 3.4801 1.47014 4.8853 0 0-5.562 5.5346-7.20564 7.2056-1.644662 1.6701 1.0156 4.1304 2.63997 2.4442 1.62538-1.6832 7.10824-7.1072 7.10824-7.1072 1.4042.9243 3.0793 1.4711 4.8843 1.4711 4.9157 0 8.9-3.9873 8.9-8.899.001-4.91469-3.9843-8.899-8.9-8.899zm0 15.2544c-3.5095 0-6.3565-2.8449-6.3565-6.3554 0-3.51049 2.846-6.35643 6.3565-6.35643 3.5125 0 6.3574 2.84493 6.3574 6.35643 0 3.5105-2.8449 6.3554-6.3574 6.3554z" fill="#F6F6F6" />
6
+ </svg>
@@ -1,153 +1,153 @@
1
- // *****************************************************************************
2
- // Copyright (C) 2017-2018 Ericsson and others.
3
- //
4
- // This program and the accompanying materials are made available under the
5
- // terms of the Eclipse Public License v. 2.0 which is available at
6
- // http://www.eclipse.org/legal/epl-2.0.
7
- //
8
- // This Source Code may also be made available under the following Secondary
9
- // Licenses when the conditions for such availability set forth in the Eclipse
10
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- // with the GNU Classpath Exception which is available at
12
- // https://www.gnu.org/software/classpath/license.html.
13
- //
14
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- // *****************************************************************************
16
-
17
- import { RpcServer } from '@theia/core';
18
-
19
- export interface SearchInWorkspaceOptions {
20
- /**
21
- * Maximum number of results to return. Defaults to unlimited.
22
- */
23
- maxResults?: number;
24
- /**
25
- * accepts suffixes of K, M or G which correspond to kilobytes,
26
- * megabytes and gigabytes, respectively. If no suffix is provided the input is
27
- * treated as bytes.
28
- *
29
- * defaults to '20M'
30
- */
31
- maxFileSize?: string;
32
- /**
33
- * Search case sensitively if true.
34
- */
35
- matchCase?: boolean;
36
- /**
37
- * Search whole words only if true.
38
- */
39
- matchWholeWord?: boolean;
40
- /**
41
- * Use regular expressions for search if true.
42
- */
43
- useRegExp?: boolean;
44
- /**
45
- * Use multiline search if true.
46
- */
47
- multiline?: boolean;
48
- /**
49
- * Include all .gitignored and hidden files.
50
- */
51
- includeIgnored?: boolean;
52
- /**
53
- * Glob pattern for matching files and directories to include the search.
54
- */
55
- include?: string[];
56
- /**
57
- * Glob pattern for matching files and directories to exclude the search.
58
- */
59
- exclude?: string[];
60
- /**
61
- * Whether symlinks should be followed while searching.
62
- */
63
- followSymlinks?: boolean;
64
- }
65
-
66
- export interface SearchInWorkspaceResult {
67
- /**
68
- * The string uri to the root folder that the search was performed.
69
- */
70
- root: string;
71
-
72
- /**
73
- * The string uri to the file containing the result.
74
- */
75
- fileUri: string;
76
-
77
- /**
78
- * matches found in the file
79
- */
80
- matches: SearchMatch[];
81
- }
82
-
83
- export interface SearchMatch {
84
- /**
85
- * The (1-based) line number of the result.
86
- */
87
- line: number;
88
-
89
- /**
90
- * The (1-based) character number in the result line. For UTF-8 files,
91
- * one multi-byte character counts as one character.
92
- */
93
- character: number;
94
-
95
- /**
96
- * The length of the match, in characters. For UTF-8 files, one
97
- * multi-byte character counts as one character.
98
- */
99
- length: number;
100
-
101
- /**
102
- * The text of the line containing the result.
103
- */
104
- lineText: string | LinePreview;
105
-
106
- }
107
-
108
- export interface LinePreview {
109
- text: string;
110
- character: number;
111
- }
112
-
113
- export namespace SearchInWorkspaceResult {
114
- /**
115
- * Sort search in workspace results according to file, line, character position
116
- * and then length.
117
- */
118
- export function compare(a: SearchInWorkspaceResult, b: SearchInWorkspaceResult): number {
119
- if (a.fileUri !== b.fileUri) {
120
- return a.fileUri < b.fileUri ? -1 : 1;
121
- }
122
- return 0;
123
- }
124
- }
125
-
126
- export const SearchInWorkspaceClient = Symbol('SearchInWorkspaceClient');
127
- export interface SearchInWorkspaceClient {
128
- /**
129
- * Called by the server for every search match.
130
- */
131
- onResult(searchId: number, result: SearchInWorkspaceResult): void;
132
-
133
- /**
134
- * Called when no more search matches will come.
135
- */
136
- onDone(searchId: number, error?: string): void;
137
- }
138
-
139
- export const SIW_WS_PATH = '/services/search-in-workspace';
140
- export const SearchInWorkspaceServer = Symbol('SearchInWorkspaceServer');
141
- export interface SearchInWorkspaceServer extends RpcServer<SearchInWorkspaceClient> {
142
- /**
143
- * Start a search for WHAT in directories ROOTURIS. Return a unique search id.
144
- */
145
- search(what: string, rootUris: string[], opts?: SearchInWorkspaceOptions): Promise<number>;
146
-
147
- /**
148
- * Cancel an ongoing search.
149
- */
150
- cancel(searchId: number): Promise<void>;
151
-
152
- dispose(): void;
153
- }
1
+ // *****************************************************************************
2
+ // Copyright (C) 2017-2018 Ericsson and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { RpcServer } from '@theia/core';
18
+
19
+ export interface SearchInWorkspaceOptions {
20
+ /**
21
+ * Maximum number of results to return. Defaults to unlimited.
22
+ */
23
+ maxResults?: number;
24
+ /**
25
+ * accepts suffixes of K, M or G which correspond to kilobytes,
26
+ * megabytes and gigabytes, respectively. If no suffix is provided the input is
27
+ * treated as bytes.
28
+ *
29
+ * defaults to '20M'
30
+ */
31
+ maxFileSize?: string;
32
+ /**
33
+ * Search case sensitively if true.
34
+ */
35
+ matchCase?: boolean;
36
+ /**
37
+ * Search whole words only if true.
38
+ */
39
+ matchWholeWord?: boolean;
40
+ /**
41
+ * Use regular expressions for search if true.
42
+ */
43
+ useRegExp?: boolean;
44
+ /**
45
+ * Use multiline search if true.
46
+ */
47
+ multiline?: boolean;
48
+ /**
49
+ * Include all .gitignored and hidden files.
50
+ */
51
+ includeIgnored?: boolean;
52
+ /**
53
+ * Glob pattern for matching files and directories to include the search.
54
+ */
55
+ include?: string[];
56
+ /**
57
+ * Glob pattern for matching files and directories to exclude the search.
58
+ */
59
+ exclude?: string[];
60
+ /**
61
+ * Whether symlinks should be followed while searching.
62
+ */
63
+ followSymlinks?: boolean;
64
+ }
65
+
66
+ export interface SearchInWorkspaceResult {
67
+ /**
68
+ * The string uri to the root folder that the search was performed.
69
+ */
70
+ root: string;
71
+
72
+ /**
73
+ * The string uri to the file containing the result.
74
+ */
75
+ fileUri: string;
76
+
77
+ /**
78
+ * matches found in the file
79
+ */
80
+ matches: SearchMatch[];
81
+ }
82
+
83
+ export interface SearchMatch {
84
+ /**
85
+ * The (1-based) line number of the result.
86
+ */
87
+ line: number;
88
+
89
+ /**
90
+ * The (1-based) character number in the result line. For UTF-8 files,
91
+ * one multi-byte character counts as one character.
92
+ */
93
+ character: number;
94
+
95
+ /**
96
+ * The length of the match, in characters. For UTF-8 files, one
97
+ * multi-byte character counts as one character.
98
+ */
99
+ length: number;
100
+
101
+ /**
102
+ * The text of the line containing the result.
103
+ */
104
+ lineText: string | LinePreview;
105
+
106
+ }
107
+
108
+ export interface LinePreview {
109
+ text: string;
110
+ character: number;
111
+ }
112
+
113
+ export namespace SearchInWorkspaceResult {
114
+ /**
115
+ * Sort search in workspace results according to file, line, character position
116
+ * and then length.
117
+ */
118
+ export function compare(a: SearchInWorkspaceResult, b: SearchInWorkspaceResult): number {
119
+ if (a.fileUri !== b.fileUri) {
120
+ return a.fileUri < b.fileUri ? -1 : 1;
121
+ }
122
+ return 0;
123
+ }
124
+ }
125
+
126
+ export const SearchInWorkspaceClient = Symbol('SearchInWorkspaceClient');
127
+ export interface SearchInWorkspaceClient {
128
+ /**
129
+ * Called by the server for every search match.
130
+ */
131
+ onResult(searchId: number, result: SearchInWorkspaceResult): void;
132
+
133
+ /**
134
+ * Called when no more search matches will come.
135
+ */
136
+ onDone(searchId: number, error?: string): void;
137
+ }
138
+
139
+ export const SIW_WS_PATH = '/services/search-in-workspace';
140
+ export const SearchInWorkspaceServer = Symbol('SearchInWorkspaceServer');
141
+ export interface SearchInWorkspaceServer extends RpcServer<SearchInWorkspaceClient> {
142
+ /**
143
+ * Start a search for WHAT in directories ROOTURIS. Return a unique search id.
144
+ */
145
+ search(what: string, rootUris: string[], opts?: SearchInWorkspaceOptions): Promise<number>;
146
+
147
+ /**
148
+ * Cancel an ongoing search.
149
+ */
150
+ cancel(searchId: number): Promise<void>;
151
+
152
+ dispose(): void;
153
+ }