@codingame/monaco-vscode-api 1.79.2 → 1.79.3-next.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/dist/default-extensions/bat.js +2 -1
- package/dist/default-extensions/clojure.js +2 -1
- package/dist/default-extensions/coffeescript.js +2 -1
- package/dist/default-extensions/cpp.js +2 -1
- package/dist/default-extensions/csharp.js +2 -1
- package/dist/default-extensions/css.js +2 -1
- package/dist/default-extensions/dart.js +2 -1
- package/dist/default-extensions/diff.js +2 -1
- package/dist/default-extensions/docker.js +2 -1
- package/dist/default-extensions/fsharp.js +2 -1
- package/dist/default-extensions/go.js +2 -1
- package/dist/default-extensions/groovy.js +2 -1
- package/dist/default-extensions/handlebars.js +2 -1
- package/dist/default-extensions/hlsl.js +2 -1
- package/dist/default-extensions/html.js +2 -1
- package/dist/default-extensions/ini.js +4 -2
- package/dist/default-extensions/java.js +2 -1
- package/dist/default-extensions/javascript.js +4 -2
- package/dist/default-extensions/json.js +2 -1
- package/dist/default-extensions/julia.js +2 -1
- package/dist/default-extensions/latex.js +6 -3
- package/dist/default-extensions/less.js +2 -1
- package/dist/default-extensions/lua.js +2 -1
- package/dist/default-extensions/make.js +2 -1
- package/dist/default-extensions/markdown-basics.js +2 -1
- package/dist/default-extensions/objective-c.js +2 -1
- package/dist/default-extensions/perl.js +4 -2
- package/dist/default-extensions/php.js +2 -1
- package/dist/default-extensions/powershell.js +2 -1
- package/dist/default-extensions/pug.js +2 -1
- package/dist/default-extensions/python.js +2 -1
- package/dist/default-extensions/r.js +2 -1
- package/dist/default-extensions/razor.js +2 -1
- package/dist/default-extensions/ruby.js +2 -1
- package/dist/default-extensions/rust.js +2 -1
- package/dist/default-extensions/scss.js +2 -1
- package/dist/default-extensions/shaderlab.js +2 -1
- package/dist/default-extensions/shellscript.js +2 -1
- package/dist/default-extensions/sql.js +2 -1
- package/dist/default-extensions/swift.js +2 -1
- package/dist/default-extensions/typescript-basics.js +2 -1
- package/dist/default-extensions/vb.js +2 -1
- package/dist/default-extensions/xml.js +4 -2
- package/dist/default-extensions/yaml.js +2 -1
- package/dist/{extension-tools-3c2bf0a4.js → extension-tools-05ce2858.js} +10 -2
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.d2.ts +1 -1
- package/dist/extensionsRegistry.d.ts +1 -1
- package/dist/rollup-extension-directory-plugin.d.ts +10 -2
- package/dist/rollup-extension-directory-plugin.js +4 -4
- package/dist/rollup-vsix-plugin.d.ts +10 -2
- package/dist/rollup-vsix-plugin.js +9 -7
- package/dist/services.d.ts +1 -1
- package/dist/views.d.ts +1 -1
- package/dist/vscode/vs/workbench/browser/parts/compositeBar.js +4 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/search.contribution.js +6 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchActionsBase.js +30 -1
- package/dist/vscode/vs/workbench/contrib/search/browser/searchActionsCopy.js +204 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchActionsFind.js +355 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchActionsNav.js +461 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchActionsRemoveReplace.js +365 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchActionsSymbol.js +37 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchActionsTopBar.js +308 -0
- package/dist/vscode/vs/workbench/contrib/search/browser/searchIcons.js +9 -9
- package/dist/vscode/vs/workbench/contrib/search/browser/searchModel.js +33 -2
- package/dist/vscode/vs/workbench/contrib/search/common/constants.js +35 -1
- package/dist/vscode/vs/workbench/services/search/common/queryBuilder.js +44 -2
- package/dist/vscode-default-extensions/bat/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/clojure/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/coffeescript/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/cpp/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/csharp/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/css/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/dart/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/diff/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/docker/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/fsharp/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/go/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/groovy/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/handlebars/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/hlsl/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/html/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/ini/ini.language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/ini/properties.language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/java/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/javascript/javascript-language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/javascript/tags-language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/json/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/julia/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/latex/latex-cpp-embedded-language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/latex/latex-language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/latex/markdown-latex-combined-language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/less/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/lua/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/make/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/markdown-basics/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/objective-c/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/perl/perl.language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/perl/perl6.language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/php/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/powershell/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/pug/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/python/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/r/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/razor/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/ruby/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/rust/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/scss/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/shaderlab/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/shellscript/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/sql/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/swift/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/typescript-basics/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/vb/language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/xml/xml.language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/xml/xsl.language-configuration.json.extensionResource.js +2 -2
- package/dist/vscode-default-extensions/yaml/language-configuration.json.extensionResource.js +2 -2
- package/monaco-editor-treemending.patch +780 -780
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import manifest from '../vscode-default-extensions/swift/package.json.js';
|
|
2
2
|
import { registerExtension } from '../extensions.js';
|
|
3
|
+
import resource_0 from '../vscode-default-extensions/swift/language-configuration.json.extensionResource.js';
|
|
3
4
|
import { onExtHostInitialized } from '../vscode-services/extHost.js';
|
|
4
5
|
onExtHostInitialized(() => {
|
|
5
6
|
const { registerFile, registerSyncFile, runCode } = registerExtension(manifest);
|
|
6
7
|
registerFile('./syntaxes/swift.tmLanguage.json', async () => await import('../vscode-default-extensions/swift/syntaxes/swift.tmLanguage.json.extensionResource.js').then(module => module.default ?? module));
|
|
7
|
-
registerFile('./language-configuration.json', async () => await import('../vscode-default-extensions/swift/language-configuration.json.extensionResource.js').then(module => module.default ?? module));
|
|
8
8
|
registerFile('./snippets/swift.code-snippets', async () => await import('../vscode-default-extensions/swift/snippets/swift.code-snippets.extensionResource.js').then(module => module.default ?? module));
|
|
9
|
+
registerSyncFile('./language-configuration.json', resource_0, 'application/json');
|
|
9
10
|
runCode();
|
|
10
11
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import manifest from '../vscode-default-extensions/typescript-basics/package.json.js';
|
|
2
2
|
import { registerExtension } from '../extensions.js';
|
|
3
|
+
import resource_0 from '../vscode-default-extensions/typescript-basics/language-configuration.json.extensionResource.js';
|
|
3
4
|
import { onExtHostInitialized } from '../vscode-services/extHost.js';
|
|
4
5
|
onExtHostInitialized(() => {
|
|
5
6
|
const { registerFile, registerSyncFile, runCode } = registerExtension(manifest);
|
|
@@ -7,7 +8,7 @@ onExtHostInitialized(() => {
|
|
|
7
8
|
registerFile('./syntaxes/TypeScriptReact.tmLanguage.json', async () => await import('../vscode-default-extensions/typescript-basics/syntaxes/TypeScriptReact.tmLanguage.json.extensionResource.js').then(module => module.default ?? module));
|
|
8
9
|
registerFile('./syntaxes/jsdoc.ts.injection.tmLanguage.json', async () => await import('../vscode-default-extensions/typescript-basics/syntaxes/jsdoc.ts.injection.tmLanguage.json.extensionResource.js').then(module => module.default ?? module));
|
|
9
10
|
registerFile('./syntaxes/jsdoc.js.injection.tmLanguage.json', async () => await import('../vscode-default-extensions/typescript-basics/syntaxes/jsdoc.js.injection.tmLanguage.json.extensionResource.js').then(module => module.default ?? module));
|
|
10
|
-
registerFile('./language-configuration.json', async () => await import('../vscode-default-extensions/typescript-basics/language-configuration.json.extensionResource.js').then(module => module.default ?? module));
|
|
11
11
|
registerFile('./snippets/typescript.code-snippets', async () => await import('../vscode-default-extensions/typescript-basics/snippets/typescript.code-snippets.extensionResource.js').then(module => module.default ?? module));
|
|
12
|
+
registerSyncFile('./language-configuration.json', resource_0, 'application/json');
|
|
12
13
|
runCode();
|
|
13
14
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import manifest from '../vscode-default-extensions/vb/package.json.js';
|
|
2
2
|
import { registerExtension } from '../extensions.js';
|
|
3
|
+
import resource_0 from '../vscode-default-extensions/vb/language-configuration.json.extensionResource.js';
|
|
3
4
|
import { onExtHostInitialized } from '../vscode-services/extHost.js';
|
|
4
5
|
onExtHostInitialized(() => {
|
|
5
6
|
const { registerFile, registerSyncFile, runCode } = registerExtension(manifest);
|
|
6
7
|
registerFile('./syntaxes/asp-vb-net.tmlanguage.json', async () => await import('../vscode-default-extensions/vb/syntaxes/asp-vb-net.tmlanguage.json.extensionResource.js').then(module => module.default ?? module));
|
|
7
|
-
registerFile('./language-configuration.json', async () => await import('../vscode-default-extensions/vb/language-configuration.json.extensionResource.js').then(module => module.default ?? module));
|
|
8
8
|
registerFile('./snippets/vb.code-snippets', async () => await import('../vscode-default-extensions/vb/snippets/vb.code-snippets.extensionResource.js').then(module => module.default ?? module));
|
|
9
|
+
registerSyncFile('./language-configuration.json', resource_0, 'application/json');
|
|
9
10
|
runCode();
|
|
10
11
|
});
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import manifest from '../vscode-default-extensions/xml/package.json.js';
|
|
2
2
|
import { registerExtension } from '../extensions.js';
|
|
3
|
+
import resource_0 from '../vscode-default-extensions/xml/xml.language-configuration.json.extensionResource.js';
|
|
4
|
+
import resource_1 from '../vscode-default-extensions/xml/xsl.language-configuration.json.extensionResource.js';
|
|
3
5
|
import { onExtHostInitialized } from '../vscode-services/extHost.js';
|
|
4
6
|
onExtHostInitialized(() => {
|
|
5
7
|
const { registerFile, registerSyncFile, runCode } = registerExtension(manifest);
|
|
6
8
|
registerFile('./syntaxes/xml.tmLanguage.json', async () => await import('../vscode-default-extensions/xml/syntaxes/xml.tmLanguage.json.extensionResource.js').then(module => module.default ?? module));
|
|
7
9
|
registerFile('./syntaxes/xsl.tmLanguage.json', async () => await import('../vscode-default-extensions/xml/syntaxes/xsl.tmLanguage.json.extensionResource.js').then(module => module.default ?? module));
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
registerSyncFile('./xml.language-configuration.json', resource_0, 'application/json');
|
|
11
|
+
registerSyncFile('./xsl.language-configuration.json', resource_1, 'application/json');
|
|
10
12
|
runCode();
|
|
11
13
|
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import manifest from '../vscode-default-extensions/yaml/package.json.js';
|
|
2
2
|
import { registerExtension } from '../extensions.js';
|
|
3
|
+
import resource_0 from '../vscode-default-extensions/yaml/language-configuration.json.extensionResource.js';
|
|
3
4
|
import { onExtHostInitialized } from '../vscode-services/extHost.js';
|
|
4
5
|
onExtHostInitialized(() => {
|
|
5
6
|
const { registerFile, registerSyncFile, runCode } = registerExtension(manifest);
|
|
6
7
|
registerFile('./syntaxes/yaml.tmLanguage.json', async () => await import('../vscode-default-extensions/yaml/syntaxes/yaml.tmLanguage.json.extensionResource.js').then(module => module.default ?? module));
|
|
7
|
-
|
|
8
|
+
registerSyncFile('./language-configuration.json', resource_0, 'application/json');
|
|
8
9
|
runCode();
|
|
9
10
|
});
|
|
@@ -25826,10 +25826,10 @@ function extractGrammarResources(grammar) {
|
|
|
25826
25826
|
function extractLanguageResources(language) {
|
|
25827
25827
|
const paths = [];
|
|
25828
25828
|
if (language.icon != null) {
|
|
25829
|
-
paths.push({ path: language.icon.dark, sync:
|
|
25829
|
+
paths.push({ path: language.icon.dark, sync: true }, { path: language.icon.light, sync: true });
|
|
25830
25830
|
}
|
|
25831
25831
|
if (language.configuration != null) {
|
|
25832
|
-
paths.push({ path: language.configuration, sync:
|
|
25832
|
+
paths.push({ path: language.configuration, sync: true });
|
|
25833
25833
|
}
|
|
25834
25834
|
return paths;
|
|
25835
25835
|
}
|
|
@@ -25856,6 +25856,12 @@ async function extractThemeResources(theme, getFileContent) {
|
|
|
25856
25856
|
}
|
|
25857
25857
|
return paths;
|
|
25858
25858
|
}
|
|
25859
|
+
function extractViewsContainerResources(viewContainers) {
|
|
25860
|
+
return Object.values(viewContainers).flatMap(containers => containers.map(container => ({
|
|
25861
|
+
path: container.icon,
|
|
25862
|
+
sync: true
|
|
25863
|
+
})));
|
|
25864
|
+
}
|
|
25859
25865
|
async function extractResourcesFromExtensionManifestContribute(contribute, getFileContent) {
|
|
25860
25866
|
const resources = [];
|
|
25861
25867
|
if (contribute.commands != null)
|
|
@@ -25872,6 +25878,8 @@ async function extractResourcesFromExtensionManifestContribute(contribute, getFi
|
|
|
25872
25878
|
resources.push(...((await Promise.all(contribute.iconThemes.map(theme => extractThemeResources(theme, getFileContent), getFileContent))).flat()));
|
|
25873
25879
|
if (contribute.productIconThemes != null)
|
|
25874
25880
|
resources.push(...((await Promise.all(contribute.productIconThemes.map(theme => extractThemeResources(theme, getFileContent), getFileContent))).flat()));
|
|
25881
|
+
if (contribute.viewsContainers != null)
|
|
25882
|
+
resources.push(...extractViewsContainerResources(contribute.viewsContainers));
|
|
25875
25883
|
return resources.filter((resource, index, list) => !resource.path.startsWith('$(') && !list.slice(0, index).some(o => o.path === resource.path));
|
|
25876
25884
|
}
|
|
25877
25885
|
async function extractResourcesFromExtensionManifest(manifest, getFileContent) {
|
package/dist/extensions.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vscode from 'vscode';
|
|
2
|
-
import {
|
|
2
|
+
import { b as IExtensionDescription, I as IExtensionManifest } from './extensions.d2.ts';
|
|
3
3
|
export { c as IExtensionContributions } from './extensions.d2.ts';
|
|
4
4
|
import { I as IMessage } from './extensionsRegistry.js';
|
|
5
5
|
import { a as IDisposable } from './event.js';
|
package/dist/extensions.d2.ts
CHANGED
|
@@ -443,4 +443,4 @@ interface IRelaxedExtensionDescription extends IRelaxedExtensionManifest {
|
|
|
443
443
|
}
|
|
444
444
|
type IExtensionDescription = Readonly<IRelaxedExtensionDescription>;
|
|
445
445
|
|
|
446
|
-
export { ExtensionIdentifier as E,
|
|
446
|
+
export { ExtensionIdentifier as E, IExtensionManifest as I, TargetPlatform as T, ILocalizedString as a, IExtensionDescription as b, IExtensionContributions as c, ExtensionKind as d, ICommandAction as e, ICommandActionTitle as f, Icon as g, IEnvironmentService as h };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as ServiceIdentifier } from './instantiation.js';
|
|
2
|
-
import { E as ExtensionIdentifier,
|
|
2
|
+
import { E as ExtensionIdentifier, b as IExtensionDescription, c as IExtensionContributions, d as ExtensionKind } from './extensions.d2.ts';
|
|
3
3
|
import { E as Event } from './event.js';
|
|
4
4
|
import { S as Severity } from './severity.js';
|
|
5
5
|
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { FilterPattern } from '@rollup/pluginutils';
|
|
2
2
|
import { Plugin, InputPluginOption } from 'rollup';
|
|
3
|
+
import { I as IExtensionManifest } from './extensions.d2.ts';
|
|
4
|
+
import './uri.js';
|
|
5
|
+
import './contextkey.js';
|
|
6
|
+
import './instantiation.js';
|
|
7
|
+
import './event.js';
|
|
8
|
+
import 'vscode';
|
|
9
|
+
import './themables.js';
|
|
3
10
|
|
|
4
11
|
interface Options {
|
|
5
12
|
include?: FilterPattern;
|
|
6
13
|
exclude?: FilterPattern;
|
|
7
14
|
isDefaultExtension?: boolean;
|
|
8
15
|
withCode?: (extensionPath: string) => boolean;
|
|
9
|
-
rollupPlugins
|
|
16
|
+
rollupPlugins?: InputPluginOption[];
|
|
17
|
+
transformManifest?: (manifest: IExtensionManifest) => IExtensionManifest;
|
|
10
18
|
}
|
|
11
|
-
declare function plugin({ include, exclude, isDefaultExtension, withCode, rollupPlugins }: Options): Plugin;
|
|
19
|
+
declare function plugin({ include, exclude, isDefaultExtension, withCode, rollupPlugins, transformManifest }: Options): Plugin;
|
|
12
20
|
|
|
13
21
|
export { plugin as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createFilter, dataToEsm } from '@rollup/pluginutils';
|
|
2
|
-
import { p as parseJson, l as localizeManifest, b as buildExtensionCode, i as isBinaryFileSync_1, c as compressResource, e as extractResourcesFromExtensionManifest, m as mimeTypes } from './extension-tools-
|
|
2
|
+
import { p as parseJson, l as localizeManifest, b as buildExtensionCode, i as isBinaryFileSync_1, c as compressResource, e as extractResourcesFromExtensionManifest, m as mimeTypes } from './extension-tools-05ce2858.js';
|
|
3
3
|
import * as path from 'path';
|
|
4
4
|
import * as fsPromise from 'fs/promises';
|
|
5
5
|
import * as require$$0$1 from 'fs';
|
|
@@ -11,7 +11,7 @@ import 'node:crypto';
|
|
|
11
11
|
import 'node:fs/promises';
|
|
12
12
|
import 'tty';
|
|
13
13
|
|
|
14
|
-
function plugin({ include, exclude, isDefaultExtension = false, withCode = () => true, rollupPlugins }) {
|
|
14
|
+
function plugin({ include, exclude, isDefaultExtension = false, withCode = () => true, rollupPlugins = [], transformManifest = manifest => manifest }) {
|
|
15
15
|
const filter = createFilter(include, exclude);
|
|
16
16
|
return {
|
|
17
17
|
name: 'default-extensions-loader',
|
|
@@ -36,7 +36,7 @@ function plugin({ include, exclude, isDefaultExtension = false, withCode = () =>
|
|
|
36
36
|
parsed = localizeManifest(parsed, parseJson(id, (await fsPromise.readFile(nlsFile)).toString()));
|
|
37
37
|
}
|
|
38
38
|
return {
|
|
39
|
-
code: dataToEsm(parsed, {
|
|
39
|
+
code: dataToEsm(transformManifest(parsed), {
|
|
40
40
|
compact: true,
|
|
41
41
|
namedExports: false,
|
|
42
42
|
preferConst: false
|
|
@@ -72,7 +72,7 @@ function plugin({ include, exclude, isDefaultExtension = false, withCode = () =>
|
|
|
72
72
|
if (stat.isDirectory()) {
|
|
73
73
|
// Load the extension directory as a module importing the required files and registering the extension
|
|
74
74
|
const manifestPath = path.resolve(id, 'package.json');
|
|
75
|
-
const manifest =
|
|
75
|
+
const manifest = transformManifest(parseJson(id, (await fsPromise.readFile(manifestPath)).toString('utf8')));
|
|
76
76
|
try {
|
|
77
77
|
const extensionResources = await extractResourcesFromExtensionManifest(manifest, async (resourcePath) => {
|
|
78
78
|
return (await fsPromise.readFile(path.join(id, resourcePath)));
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { FilterPattern } from '@rollup/pluginutils';
|
|
2
2
|
import { Plugin, InputPluginOption } from 'rollup';
|
|
3
|
+
import { I as IExtensionManifest } from './extensions.d2.ts';
|
|
4
|
+
import './uri.js';
|
|
5
|
+
import './contextkey.js';
|
|
6
|
+
import './instantiation.js';
|
|
7
|
+
import './event.js';
|
|
8
|
+
import 'vscode';
|
|
9
|
+
import './themables.js';
|
|
3
10
|
|
|
4
11
|
interface Options {
|
|
5
12
|
include?: FilterPattern;
|
|
6
13
|
exclude?: FilterPattern;
|
|
7
14
|
withCode?: (extensionPath: string) => boolean;
|
|
8
|
-
rollupPlugins
|
|
15
|
+
rollupPlugins?: InputPluginOption[];
|
|
16
|
+
transformManifest?: (manifest: IExtensionManifest) => IExtensionManifest;
|
|
9
17
|
}
|
|
10
|
-
declare function plugin({ include, exclude, rollupPlugins, withCode }: Options): Plugin;
|
|
18
|
+
declare function plugin({ include, exclude, rollupPlugins, withCode, transformManifest }: Options): Plugin;
|
|
11
19
|
|
|
12
20
|
export { plugin as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createFilter, dataToEsm } from '@rollup/pluginutils';
|
|
2
2
|
import * as yauzl from 'yauzl';
|
|
3
|
-
import { b as buildExtensionCode, i as isBinaryFileSync_1, c as compressResource, p as parseJson, l as localizeManifest, e as extractResourcesFromExtensionManifest, m as mimeTypes } from './extension-tools-
|
|
3
|
+
import { b as buildExtensionCode, i as isBinaryFileSync_1, c as compressResource, p as parseJson, l as localizeManifest, e as extractResourcesFromExtensionManifest, m as mimeTypes } from './extension-tools-05ce2858.js';
|
|
4
4
|
import * as path from 'path';
|
|
5
5
|
import 'fs';
|
|
6
6
|
import 'util';
|
|
@@ -53,7 +53,7 @@ async function readVsix(file) {
|
|
|
53
53
|
function getVsixPath(file) {
|
|
54
54
|
return path.relative('/', path.resolve('/', file));
|
|
55
55
|
}
|
|
56
|
-
function plugin({ include = '**/*.vsix', exclude, rollupPlugins, withCode = () => true }) {
|
|
56
|
+
function plugin({ include = '**/*.vsix', exclude, rollupPlugins = [], withCode = () => true, transformManifest = manifest => manifest }) {
|
|
57
57
|
const filter = createFilter(include, exclude);
|
|
58
58
|
const vsixFiles = {};
|
|
59
59
|
return {
|
|
@@ -81,7 +81,7 @@ function plugin({ include = '**/*.vsix', exclude, rollupPlugins, withCode = () =
|
|
|
81
81
|
map: { mappings: '' }
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
const content = vsixFile[resourcePath];
|
|
84
|
+
const content = vsixFile[getVsixPath(resourcePath)];
|
|
85
85
|
if (isBinaryFileSync_1(content)) {
|
|
86
86
|
return {
|
|
87
87
|
code: `export default Uint8Array.from(window.atob(${JSON.stringify(content.toString('base64'))}), v => v.charCodeAt(0));`,
|
|
@@ -100,11 +100,13 @@ function plugin({ include = '**/*.vsix', exclude, rollupPlugins, withCode = () =
|
|
|
100
100
|
const file = match[2];
|
|
101
101
|
const vsixFile = vsixFiles[match[1]];
|
|
102
102
|
let parsed = parseJson(id, vsixFile[file].toString('utf8'));
|
|
103
|
-
if (file === 'package.json'
|
|
104
|
-
|
|
103
|
+
if (file === 'package.json') {
|
|
104
|
+
if ('package.nls.json' in vsixFile) {
|
|
105
|
+
parsed = localizeManifest(parsed, parseJson(id, vsixFile['package.nls.json'].toString()));
|
|
106
|
+
}
|
|
105
107
|
}
|
|
106
108
|
return {
|
|
107
|
-
code: dataToEsm(parsed, {
|
|
109
|
+
code: dataToEsm(transformManifest(parsed), {
|
|
108
110
|
compact: true,
|
|
109
111
|
namedExports: false,
|
|
110
112
|
preferConst: false
|
|
@@ -114,7 +116,7 @@ function plugin({ include = '**/*.vsix', exclude, rollupPlugins, withCode = () =
|
|
|
114
116
|
if (!filter(id))
|
|
115
117
|
return null;
|
|
116
118
|
const files = await readVsix(id);
|
|
117
|
-
const manifest = parseJson(id, files['package.json'].toString('utf8'));
|
|
119
|
+
const manifest = transformManifest(parseJson(id, files['package.json'].toString('utf8')));
|
|
118
120
|
const extensionResources = (await extractResourcesFromExtensionManifest(manifest, async (path) => {
|
|
119
121
|
return files[getVsixPath(path)];
|
|
120
122
|
})).filter(resource => getVsixPath(resource.path) in files);
|
package/dist/services.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { I as IconIdentifier, T as ThemeIcon } from './themables.js';
|
|
|
19
19
|
import { I as IJSONSchema, a as IJSONSchemaMap } from './jsonSchema.js';
|
|
20
20
|
import { I as IView$3, a as IViewDescriptorService, b as IViewPaneContainer, c as ViewContainer, d as IViewContainerModel, e as IViewDescriptor, f as IAddedViewDescriptorRef, g as IPaneComposite, V as ViewContainerLocation } from './views.js';
|
|
21
21
|
export { h as IViewsService } from './views.js';
|
|
22
|
-
import { e as ICommandAction, f as ICommandActionTitle, g as Icon, h as IEnvironmentService, E as ExtensionIdentifier, T as TargetPlatform,
|
|
22
|
+
import { e as ICommandAction, f as ICommandActionTitle, g as Icon, h as IEnvironmentService, E as ExtensionIdentifier, T as TargetPlatform, b as IExtensionDescription } from './extensions.d2.ts';
|
|
23
23
|
import { b as IProgress, c as IProgressStep, I as IComposite, d as ICompositeControl, a as IProgressIndicator } from './composite.js';
|
|
24
24
|
import { a as IContextKeyService, C as ContextKeyExpression } from './contextkey.js';
|
|
25
25
|
import { a as IExtensionService } from './extensionsRegistry.js';
|
package/dist/views.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { U as URI } from './uri.js';
|
|
|
3
3
|
import { E as Event } from './event.js';
|
|
4
4
|
import { T as ThemeIcon } from './themables.js';
|
|
5
5
|
import { C as ContextKeyExpression } from './contextkey.js';
|
|
6
|
-
import {
|
|
6
|
+
import { a as ILocalizedString, E as ExtensionIdentifier } from './extensions.d2.ts';
|
|
7
7
|
import { I as IComposite, a as IProgressIndicator } from './composite.js';
|
|
8
8
|
|
|
9
9
|
interface IKeybindings {
|
|
@@ -330,7 +330,11 @@ let CompositeBar = class CompositeBar extends Widget {
|
|
|
330
330
|
else {
|
|
331
331
|
const compositeSwitcherBar = this.compositeSwitcherBar;
|
|
332
332
|
if (compositeSwitcherBar && this.dimension && this.dimension.height !== 0 && this.dimension.width !== 0) {
|
|
333
|
+
const currentItemsLength = compositeSwitcherBar.viewItems.length;
|
|
333
334
|
compositeSwitcherBar.push(( items.map(composite => composite.activityAction)));
|
|
335
|
+
items.forEach((composite, index) => this.compositeSizeInBar.set(composite.id, this.options.orientation === 1
|
|
336
|
+
? compositeSwitcherBar.getHeight(currentItemsLength + index)
|
|
337
|
+
: compositeSwitcherBar.getWidth(currentItemsLength + index)));
|
|
334
338
|
items.forEach(() => compositeSwitcherBar.pull(compositeSwitcherBar.viewItems.length - 1));
|
|
335
339
|
}
|
|
336
340
|
}
|
|
@@ -21,6 +21,12 @@ import { CommandsRegistry } from 'monaco-editor/esm/vs/platform/commands/common/
|
|
|
21
21
|
import { assertType } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
22
22
|
import { getWorkspaceSymbols } from '../common/search.js';
|
|
23
23
|
import { ShowAllSymbolsActionId } from '../common/constants.js';
|
|
24
|
+
import './searchActionsCopy.js';
|
|
25
|
+
import './searchActionsFind.js';
|
|
26
|
+
import './searchActionsNav.js';
|
|
27
|
+
import './searchActionsRemoveReplace.js';
|
|
28
|
+
import './searchActionsSymbol.js';
|
|
29
|
+
import './searchActionsTopBar.js';
|
|
24
30
|
registerContributions();
|
|
25
31
|
registerContributions$1();
|
|
26
32
|
const SEARCH_MODE_CONFIG = 'search.mode';
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as dom from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
2
|
+
import * as nls from 'monaco-editor/esm/vs/nls.js';
|
|
3
|
+
import { searchComparer, FileMatch, Match, FolderMatch } from './searchModel.js';
|
|
2
4
|
import { VIEW_ID } from '../../../services/search/common/search.js';
|
|
5
|
+
const category = { value: ( nls.localize('search', "Search")), original: 'Search' };
|
|
3
6
|
function isSearchViewFocused(viewsService) {
|
|
4
7
|
const searchView = getSearchView(viewsService);
|
|
5
8
|
const activeElement = document.activeElement;
|
|
@@ -11,7 +14,33 @@ function appendKeyBindingLabel(label, inputKeyBinding) {
|
|
|
11
14
|
function getSearchView(viewsService) {
|
|
12
15
|
return viewsService.getActiveViewWithId(VIEW_ID);
|
|
13
16
|
}
|
|
17
|
+
function getElementsToOperateOn(viewer, currElement, sortConfig) {
|
|
18
|
+
let elements = viewer.getSelection().filter((x) => x !== null).sort((a, b) => searchComparer(a, b, sortConfig.sortOrder));
|
|
19
|
+
if (currElement && !(elements.length > 1 && elements.includes(currElement))) {
|
|
20
|
+
elements = [currElement];
|
|
21
|
+
}
|
|
22
|
+
return elements;
|
|
23
|
+
}
|
|
24
|
+
function shouldRefocus(elements, focusElement) {
|
|
25
|
+
if (!focusElement) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
return !focusElement || elements.includes(focusElement) || hasDownstreamMatch(elements, focusElement);
|
|
29
|
+
}
|
|
30
|
+
function hasDownstreamMatch(elements, focusElement) {
|
|
31
|
+
for (const elem of elements) {
|
|
32
|
+
if ((elem instanceof FileMatch && focusElement instanceof Match && elem.matches().includes(focusElement)) ||
|
|
33
|
+
(elem instanceof FolderMatch && ((focusElement instanceof FileMatch && elem.getDownstreamFileMatch(focusElement.resource)) ||
|
|
34
|
+
(focusElement instanceof Match && elem.getDownstreamFileMatch(focusElement.parent().resource))))) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
function openSearchView(viewsService, focus) {
|
|
41
|
+
return viewsService.openView(VIEW_ID, focus).then(view => (view ?? undefined));
|
|
42
|
+
}
|
|
14
43
|
function doAppendKeyBindingLabel(label, keyBinding) {
|
|
15
44
|
return keyBinding ? label + ' (' + keyBinding.getLabel() + ')' : label;
|
|
16
45
|
}
|
|
17
|
-
export { appendKeyBindingLabel, getSearchView, isSearchViewFocused };
|
|
46
|
+
export { appendKeyBindingLabel, category, getElementsToOperateOn, getSearchView, isSearchViewFocused, openSearchView, shouldRefocus };
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import * as nls from 'monaco-editor/esm/vs/nls.js';
|
|
2
|
+
import { IClipboardService } from 'monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js';
|
|
3
|
+
import { ILabelService } from 'monaco-editor/esm/vs/platform/label/common/label.js';
|
|
4
|
+
import { IViewsService } from '../../../common/views.js';
|
|
5
|
+
import { CopyMatchCommandId, FileMatchOrMatchFocusKey, CopyPathCommandId, FileMatchOrFolderMatchWithResourceFocusKey, CopyAllCommandId, HasSearchResults } from '../common/constants.js';
|
|
6
|
+
import { FileMatch, FolderMatchWithResource, Match, FolderMatch, searchMatchComparer } from './searchModel.js';
|
|
7
|
+
import { registerAction2, Action2, MenuId } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
8
|
+
import { category, getSearchView } from './searchActionsBase.js';
|
|
9
|
+
import { isWindows } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
10
|
+
registerAction2(class CopyMatchCommandAction extends Action2 {
|
|
11
|
+
constructor() {
|
|
12
|
+
super({
|
|
13
|
+
id: CopyMatchCommandId,
|
|
14
|
+
title: {
|
|
15
|
+
value: ( nls.localize('copyMatchLabel', "Copy")),
|
|
16
|
+
original: 'Copy'
|
|
17
|
+
},
|
|
18
|
+
category,
|
|
19
|
+
keybinding: {
|
|
20
|
+
weight: 200 ,
|
|
21
|
+
when: FileMatchOrMatchFocusKey,
|
|
22
|
+
primary: 2048 | 33 ,
|
|
23
|
+
},
|
|
24
|
+
menu: [{
|
|
25
|
+
id: MenuId.SearchContext,
|
|
26
|
+
when: FileMatchOrMatchFocusKey,
|
|
27
|
+
group: 'search_2',
|
|
28
|
+
order: 1
|
|
29
|
+
}]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
async run(accessor, match) {
|
|
33
|
+
await copyMatchCommand(accessor, match);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
registerAction2(class CopyPathCommandAction extends Action2 {
|
|
37
|
+
constructor() {
|
|
38
|
+
super({
|
|
39
|
+
id: CopyPathCommandId,
|
|
40
|
+
title: {
|
|
41
|
+
value: ( nls.localize('copyPathLabel', "Copy Path")),
|
|
42
|
+
original: 'Copy Path'
|
|
43
|
+
},
|
|
44
|
+
category,
|
|
45
|
+
keybinding: {
|
|
46
|
+
weight: 200 ,
|
|
47
|
+
when: FileMatchOrFolderMatchWithResourceFocusKey,
|
|
48
|
+
primary: 2048 | 512 | 33 ,
|
|
49
|
+
win: {
|
|
50
|
+
primary: 1024 | 512 | 33
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
menu: [{
|
|
54
|
+
id: MenuId.SearchContext,
|
|
55
|
+
when: FileMatchOrFolderMatchWithResourceFocusKey,
|
|
56
|
+
group: 'search_2',
|
|
57
|
+
order: 2
|
|
58
|
+
}]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
async run(accessor, fileMatch) {
|
|
62
|
+
await copyPathCommand(accessor, fileMatch);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
registerAction2(class CopyAllCommandAction extends Action2 {
|
|
66
|
+
constructor() {
|
|
67
|
+
super({
|
|
68
|
+
id: CopyAllCommandId,
|
|
69
|
+
title: {
|
|
70
|
+
value: ( nls.localize('copyAllLabel', "Copy All")),
|
|
71
|
+
original: 'Copy All'
|
|
72
|
+
},
|
|
73
|
+
category,
|
|
74
|
+
menu: [{
|
|
75
|
+
id: MenuId.SearchContext,
|
|
76
|
+
when: HasSearchResults,
|
|
77
|
+
group: 'search_2',
|
|
78
|
+
order: 3
|
|
79
|
+
}]
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
async run(accessor) {
|
|
83
|
+
await copyAllCommand(accessor);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
const lineDelimiter = isWindows ? '\r\n' : '\n';
|
|
87
|
+
async function copyPathCommand(accessor, fileMatch) {
|
|
88
|
+
if (!fileMatch) {
|
|
89
|
+
const selection = getSelectedRow(accessor);
|
|
90
|
+
if (!(selection instanceof FileMatch || selection instanceof FolderMatchWithResource)) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
fileMatch = selection;
|
|
94
|
+
}
|
|
95
|
+
const clipboardService = accessor.get(IClipboardService);
|
|
96
|
+
const labelService = accessor.get(ILabelService);
|
|
97
|
+
const text = labelService.getUriLabel(fileMatch.resource, { noPrefix: true });
|
|
98
|
+
await clipboardService.writeText(text);
|
|
99
|
+
}
|
|
100
|
+
async function copyMatchCommand(accessor, match) {
|
|
101
|
+
if (!match) {
|
|
102
|
+
const selection = getSelectedRow(accessor);
|
|
103
|
+
if (!selection) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
match = selection;
|
|
107
|
+
}
|
|
108
|
+
const clipboardService = accessor.get(IClipboardService);
|
|
109
|
+
const labelService = accessor.get(ILabelService);
|
|
110
|
+
let text;
|
|
111
|
+
if (match instanceof Match) {
|
|
112
|
+
text = matchToString(match);
|
|
113
|
+
}
|
|
114
|
+
else if (match instanceof FileMatch) {
|
|
115
|
+
text = fileMatchToString(match, labelService).text;
|
|
116
|
+
}
|
|
117
|
+
else if (match instanceof FolderMatch) {
|
|
118
|
+
text = folderMatchToString(match, labelService).text;
|
|
119
|
+
}
|
|
120
|
+
if (text) {
|
|
121
|
+
await clipboardService.writeText(text);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
async function copyAllCommand(accessor) {
|
|
125
|
+
const viewsService = accessor.get(IViewsService);
|
|
126
|
+
const clipboardService = accessor.get(IClipboardService);
|
|
127
|
+
const labelService = accessor.get(ILabelService);
|
|
128
|
+
const searchView = getSearchView(viewsService);
|
|
129
|
+
if (searchView) {
|
|
130
|
+
const root = searchView.searchResult;
|
|
131
|
+
const text = allFolderMatchesToString(root.folderMatches(), labelService);
|
|
132
|
+
await clipboardService.writeText(text);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function matchToString(match, indent = 0) {
|
|
136
|
+
const getFirstLinePrefix = () => `${match.range().startLineNumber},${match.range().startColumn}`;
|
|
137
|
+
const getOtherLinePrefix = (i) => match.range().startLineNumber + i + '';
|
|
138
|
+
const fullMatchLines = match.fullPreviewLines();
|
|
139
|
+
const largestPrefixSize = fullMatchLines.reduce((largest, _, i) => {
|
|
140
|
+
const thisSize = i === 0 ?
|
|
141
|
+
getFirstLinePrefix().length :
|
|
142
|
+
getOtherLinePrefix(i).length;
|
|
143
|
+
return Math.max(thisSize, largest);
|
|
144
|
+
}, 0);
|
|
145
|
+
const formattedLines = ( fullMatchLines
|
|
146
|
+
.map((line, i) => {
|
|
147
|
+
const prefix = i === 0 ?
|
|
148
|
+
getFirstLinePrefix() :
|
|
149
|
+
getOtherLinePrefix(i);
|
|
150
|
+
const paddingStr = ' '.repeat(largestPrefixSize - prefix.length);
|
|
151
|
+
const indentStr = ' '.repeat(indent);
|
|
152
|
+
return `${indentStr}${prefix}: ${paddingStr}${line}`;
|
|
153
|
+
}));
|
|
154
|
+
return formattedLines.join('\n');
|
|
155
|
+
}
|
|
156
|
+
function fileFolderMatchToString(match, labelService) {
|
|
157
|
+
if (match instanceof FileMatch) {
|
|
158
|
+
return fileMatchToString(match, labelService);
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
return folderMatchToString(match, labelService);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function fileMatchToString(fileMatch, labelService) {
|
|
165
|
+
const matchTextRows = ( fileMatch.matches()
|
|
166
|
+
.sort(searchMatchComparer)
|
|
167
|
+
.map(match => matchToString(match, 2)));
|
|
168
|
+
const uriString = labelService.getUriLabel(fileMatch.resource, { noPrefix: true });
|
|
169
|
+
return {
|
|
170
|
+
text: `${uriString}${lineDelimiter}${matchTextRows.join(lineDelimiter)}`,
|
|
171
|
+
count: matchTextRows.length
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function folderMatchToString(folderMatch, labelService) {
|
|
175
|
+
const results = [];
|
|
176
|
+
let numMatches = 0;
|
|
177
|
+
const matches = folderMatch.matches().sort(searchMatchComparer);
|
|
178
|
+
matches.forEach(match => {
|
|
179
|
+
const result = fileFolderMatchToString(match, labelService);
|
|
180
|
+
numMatches += result.count;
|
|
181
|
+
results.push(result.text);
|
|
182
|
+
});
|
|
183
|
+
return {
|
|
184
|
+
text: results.join(lineDelimiter + lineDelimiter),
|
|
185
|
+
count: numMatches
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
function allFolderMatchesToString(folderMatches, labelService) {
|
|
189
|
+
const folderResults = [];
|
|
190
|
+
folderMatches = folderMatches.sort(searchMatchComparer);
|
|
191
|
+
for (let i = 0; i < folderMatches.length; i++) {
|
|
192
|
+
const folderResult = folderMatchToString(folderMatches[i], labelService);
|
|
193
|
+
if (folderResult.count) {
|
|
194
|
+
folderResults.push(folderResult.text);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return folderResults.join(lineDelimiter + lineDelimiter);
|
|
198
|
+
}
|
|
199
|
+
function getSelectedRow(accessor) {
|
|
200
|
+
const viewsService = accessor.get(IViewsService);
|
|
201
|
+
const searchView = getSearchView(viewsService);
|
|
202
|
+
return searchView?.getControl().getSelection()[0];
|
|
203
|
+
}
|
|
204
|
+
export { lineDelimiter };
|