@theia/search-in-workspace 1.41.0 → 1.42.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.
Files changed (24) hide show
  1. package/lib/browser/components/search-in-workspace-textarea.d.ts +40 -0
  2. package/lib/browser/components/search-in-workspace-textarea.d.ts.map +1 -0
  3. package/lib/browser/components/search-in-workspace-textarea.js +131 -0
  4. package/lib/browser/components/search-in-workspace-textarea.js.map +1 -0
  5. package/lib/browser/search-in-workspace-result-tree-widget.d.ts +1 -0
  6. package/lib/browser/search-in-workspace-result-tree-widget.d.ts.map +1 -1
  7. package/lib/browser/search-in-workspace-result-tree-widget.js +43 -31
  8. package/lib/browser/search-in-workspace-result-tree-widget.js.map +1 -1
  9. package/lib/browser/search-in-workspace-widget.d.ts.map +1 -1
  10. package/lib/browser/search-in-workspace-widget.js +9 -3
  11. package/lib/browser/search-in-workspace-widget.js.map +1 -1
  12. package/lib/common/search-in-workspace-interface.d.ts +4 -0
  13. package/lib/common/search-in-workspace-interface.d.ts.map +1 -1
  14. package/lib/common/search-in-workspace-interface.js.map +1 -1
  15. package/lib/node/ripgrep-search-in-workspace-server.d.ts.map +1 -1
  16. package/lib/node/ripgrep-search-in-workspace-server.js +3 -0
  17. package/lib/node/ripgrep-search-in-workspace-server.js.map +1 -1
  18. package/package.json +11 -10
  19. package/src/browser/components/search-in-workspace-textarea.tsx +153 -0
  20. package/src/browser/search-in-workspace-result-tree-widget.tsx +53 -39
  21. package/src/browser/search-in-workspace-widget.tsx +10 -9
  22. package/src/browser/styles/index.css +30 -15
  23. package/src/common/search-in-workspace-interface.ts +4 -0
  24. package/src/node/ripgrep-search-in-workspace-server.ts +4 -0
@@ -36,9 +36,14 @@
36
36
  }
37
37
 
38
38
  .t-siw-search-container .theia-input {
39
+ box-sizing: border-box;
39
40
  flex: 1;
40
41
  line-height: var(--theia-content-line-height);
42
+ max-height: calc(2 * 3px + 7 * var(--theia-content-line-height));
43
+ min-width: 16px;
41
44
  padding: 3px 0 3px 4px;
45
+ resize: none;
46
+ width: 100%;
42
47
  }
43
48
 
44
49
  .t-siw-search-container #search-input-field:focus {
@@ -99,16 +104,17 @@
99
104
  }
100
105
 
101
106
  .t-siw-search-container .searchHeader .search-field .option-buttons {
102
- height: 23px;
103
- display: flex;
104
- align-items: center;
105
- background-color: none;
107
+ height: 23px;
108
+ display: flex;
109
+ align-items: center;
110
+ align-self: flex-start;
111
+ background-color: none;
112
+ margin: 2px;
106
113
  }
107
114
 
108
115
  .t-siw-search-container .searchHeader .search-field-container.tooManyResults {
109
116
  border-style: solid;
110
117
  border-width: var(--theia-border-width);
111
- margin: -1px;
112
118
  border-color: var(--theia-inputValidation-warningBorder);
113
119
  }
114
120
 
@@ -234,7 +240,6 @@
234
240
  }
235
241
 
236
242
  .t-siw-search-container .resultLine .match {
237
- line-height: normal;
238
243
  white-space: pre;
239
244
  background: var(--theia-editor-findMatchHighlightBackground);
240
245
  border: 1px solid var(--theia-editor-findMatchHighlightBorder);
@@ -257,13 +262,17 @@
257
262
  border-style: dashed;
258
263
  }
259
264
 
260
- .t-siw-search-container .noWrapInfo {
261
- width: 100%;
265
+ .t-siw-search-container .match-line-num {
266
+ font-size: .9em;
267
+ margin-left: 7px;
268
+ margin-right: 4px;
269
+ opacity: .7;
262
270
  }
263
271
 
264
272
  .t-siw-search-container .result-head-info {
265
- display: inline-flex;
266
273
  align-items: center;
274
+ display: inline-flex;
275
+ flex-grow: 1;
267
276
  }
268
277
 
269
278
  .search-in-workspace-editor-match {
@@ -294,13 +303,18 @@
294
303
  }
295
304
 
296
305
  .result-node-buttons > span {
297
- width: 15px;
298
- height: 15px;
306
+ width: 16px;
307
+ height: 16px;
299
308
  margin-left: 2.5px;
300
309
  margin-right: 0.5px;
301
310
  background-repeat: no-repeat;
302
311
  background-position: center;
303
312
  background-size: contain;
313
+ border-radius: 5px;
314
+ }
315
+
316
+ .result-node-buttons > span:hover {
317
+ background-color: var(--theia-toolbar-hoverBackground);
304
318
  }
305
319
 
306
320
  .search-and-replace-container {
@@ -346,10 +360,11 @@
346
360
  }
347
361
 
348
362
  .replace-all-button-container {
349
- width: 25px;
350
- display: flex;
351
- align-items: center;
352
- justify-content: center;
363
+ width: 25px;
364
+ display: flex;
365
+ align-items: start;
366
+ justify-content: center;
367
+ padding-top: 3px;
353
368
  }
354
369
 
355
370
  .result-node-buttons .replace-result {
@@ -41,6 +41,10 @@ export interface SearchInWorkspaceOptions {
41
41
  * Use regular expressions for search if true.
42
42
  */
43
43
  useRegExp?: boolean;
44
+ /**
45
+ * Use multiline search if true.
46
+ */
47
+ multiline?: boolean;
44
48
  /**
45
49
  * Include all .gitignored and hidden files.
46
50
  */
@@ -101,6 +101,10 @@ export class RipgrepSearchInWorkspaceServer implements SearchInWorkspaceServer {
101
101
  args.add('--hidden');
102
102
  args.add('--json');
103
103
 
104
+ if (options?.multiline) {
105
+ args.add('--multiline');
106
+ }
107
+
104
108
  if (options?.matchCase) {
105
109
  args.add('--case-sensitive');
106
110
  } else {