@codingame/monaco-vscode-quickaccess-service-override 11.1.2 → 12.0.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.
- package/index.d.ts +8 -1
- package/index.js +117 -1
- package/package.json +22 -7
- package/vscode/src/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.d.ts +12 -0
- package/vscode/src/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js +1 -0
- package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.d.ts +67 -0
- package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.js +37 -36
- package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.d.ts +21 -0
- package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.js +19 -20
- package/vscode/src/vs/workbench/browser/actions/quickAccessActions.d.ts +1 -0
- package/vscode/src/vs/workbench/browser/actions/quickAccessActions.js +33 -31
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +17 -14
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.d.ts +55 -0
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +53 -52
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +24 -25
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +35 -31
- package/vscode/src/vs/workbench/contrib/url/browser/externalUriResolver.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/url/browser/externalUriResolver.js +2 -1
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomainsFileSystemProvider.d.ts +29 -0
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomainsFileSystemProvider.js +9 -7
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomainsValidator.d.ts +31 -0
- package/vscode/src/vs/workbench/contrib/url/browser/trustedDomainsValidator.js +26 -25
- package/vscode/src/vs/workbench/contrib/url/browser/url.contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/url/browser/url.contribution.js +18 -13
- package/vscode/src/vs/workbench/services/quickinput/browser/quickInputService.d.ts +15 -0
- package/vscode/src/vs/workbench/services/quickinput/browser/quickInputService.js +4 -2
- package/quickaccess.js +0 -115
|
@@ -1,26 +1,29 @@
|
|
|
1
|
+
|
|
1
2
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
2
3
|
import { localize2, localize } from 'vscode/vscode/vs/nls';
|
|
3
4
|
import { Action2, registerAction2, MenuRegistry, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
4
5
|
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
6
|
+
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
5
7
|
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
6
8
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
7
9
|
import { IURLService } from 'vscode/vscode/vs/platform/url/common/url.service';
|
|
8
|
-
import { Extensions, registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
10
|
+
import { Extensions, registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
9
11
|
import { ExternalUriResolverContribution } from './externalUriResolver.js';
|
|
10
|
-
import { manageTrustedDomainSettingsCommand } from 'vscode/vscode/vs/workbench/contrib/url/browser/trustedDomains';
|
|
12
|
+
import { manageTrustedDomainSettingsCommand } from '@codingame/monaco-vscode-9a1a5840-af83-5d07-a156-ba32a36c5c4b-common/vscode/vs/workbench/contrib/url/browser/trustedDomains';
|
|
11
13
|
import { TrustedDomainsFileSystemProvider } from './trustedDomainsFileSystemProvider.js';
|
|
12
14
|
import { OpenerValidatorContributions } from './trustedDomainsValidator.js';
|
|
13
15
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
14
|
-
import { Extensions as Extensions$1 } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
16
|
+
import { Extensions as Extensions$1, ConfigurationScope } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
15
17
|
import { workbenchConfigurationNodeBase } from 'vscode/vscode/vs/workbench/common/configuration';
|
|
16
|
-
import 'vscode/vscode/vs/workbench/contrib/url/browser/trustedDomainService';
|
|
18
|
+
import '@codingame/monaco-vscode-9a1a5840-af83-5d07-a156-ba32a36c5c4b-common/vscode/vs/workbench/contrib/url/browser/trustedDomainService';
|
|
17
19
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
20
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
18
21
|
|
|
19
22
|
class OpenUrlAction extends Action2 {
|
|
20
23
|
constructor() {
|
|
21
24
|
super({
|
|
22
25
|
id: 'workbench.action.url.openUrl',
|
|
23
|
-
title: ( localize2(
|
|
26
|
+
title: ( localize2(10474, 'Open URL')),
|
|
24
27
|
category: Categories.Developer,
|
|
25
28
|
f1: true
|
|
26
29
|
});
|
|
@@ -28,9 +31,9 @@ class OpenUrlAction extends Action2 {
|
|
|
28
31
|
async run(accessor) {
|
|
29
32
|
const quickInputService = accessor.get(IQuickInputService);
|
|
30
33
|
const urlService = accessor.get(IURLService);
|
|
31
|
-
return quickInputService.input({ prompt: ( localize(
|
|
34
|
+
return quickInputService.input({ prompt: ( localize(10475, "URL to open")) }).then(input => {
|
|
32
35
|
if (input) {
|
|
33
|
-
const uri = (
|
|
36
|
+
const uri = ( URI.parse(input));
|
|
34
37
|
urlService.open(uri, { originalUrl: input });
|
|
35
38
|
}
|
|
36
39
|
});
|
|
@@ -44,19 +47,21 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|
|
44
47
|
title: manageTrustedDomainSettingsCommand.description.description
|
|
45
48
|
}
|
|
46
49
|
});
|
|
47
|
-
(
|
|
48
|
-
registerWorkbenchContribution2(TrustedDomainsFileSystemProvider.ID, TrustedDomainsFileSystemProvider,
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(OpenerValidatorContributions, LifecyclePhase.Restored);
|
|
51
|
+
registerWorkbenchContribution2(TrustedDomainsFileSystemProvider.ID, TrustedDomainsFileSystemProvider, WorkbenchPhase.BlockRestore
|
|
52
|
+
);
|
|
53
|
+
registerWorkbenchContribution2(ExternalUriResolverContribution.ID, ExternalUriResolverContribution, WorkbenchPhase.BlockRestore
|
|
54
|
+
);
|
|
55
|
+
const configurationRegistry = ( Registry.as(Extensions$1.Configuration));
|
|
51
56
|
configurationRegistry.registerConfiguration({
|
|
52
57
|
...workbenchConfigurationNodeBase,
|
|
53
58
|
properties: {
|
|
54
59
|
'workbench.trustedDomains.promptInTrustedWorkspace': {
|
|
55
|
-
scope:
|
|
60
|
+
scope: ConfigurationScope.APPLICATION,
|
|
56
61
|
type: 'boolean',
|
|
57
62
|
default: false,
|
|
58
63
|
description: ( localize(
|
|
59
|
-
|
|
64
|
+
10476,
|
|
60
65
|
"When enabled, trusted domain prompts will appear when opening links in trusted workspaces."
|
|
61
66
|
))
|
|
62
67
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ILayoutService } from "vscode/vscode/vs/platform/layout/browser/layoutService.service";
|
|
2
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
3
|
+
import { IThemeService } from "vscode/vscode/vs/platform/theme/common/themeService.service";
|
|
4
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
|
+
import { IContextKeyService } from "vscode/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
6
|
+
import { IKeybindingService } from "vscode/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
7
|
+
import { QuickInputController } from "vscode/vscode/vs/platform/quickinput/browser/quickInputController";
|
|
8
|
+
import { QuickInputService as BaseQuickInputService } from "vscode/vscode/vs/platform/quickinput/browser/quickInputService";
|
|
9
|
+
export declare class QuickInputService extends BaseQuickInputService {
|
|
10
|
+
private readonly keybindingService;
|
|
11
|
+
private readonly inQuickInputContext;
|
|
12
|
+
constructor(configurationService: IConfigurationService, instantiationService: IInstantiationService, keybindingService: IKeybindingService, contextKeyService: IContextKeyService, themeService: IThemeService, layoutService: ILayoutService);
|
|
13
|
+
private registerListeners;
|
|
14
|
+
protected createController(): QuickInputController;
|
|
15
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { ILayoutService } from 'vscode/vscode/vs/platform/layout/browser/layoutService.service';
|
|
3
4
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
4
5
|
import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
|
|
@@ -6,7 +7,8 @@ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/c
|
|
|
6
7
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
7
8
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
8
9
|
import { QuickInputService as QuickInputService$1 } from 'vscode/vscode/vs/platform/quickinput/browser/quickInputService';
|
|
9
|
-
import
|
|
10
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
11
|
+
import { InQuickPickContextKey } from '@codingame/monaco-vscode-56402b83-4a60-5b15-86f9-71fe99c32744-common/vscode/vs/workbench/browser/quickaccess';
|
|
10
12
|
|
|
11
13
|
let QuickInputService = class QuickInputService extends QuickInputService$1 {
|
|
12
14
|
constructor(configurationService, instantiationService, keybindingService, contextKeyService, themeService, layoutService) {
|
package/quickaccess.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
3
|
-
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
4
|
-
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
5
|
-
import { StandaloneQuickInputService } from 'vscode/vscode/vs/editor/standalone/browser/quickInput/standaloneQuickInputService';
|
|
6
|
-
import { StandaloneServices } from 'vscode/vscode/vs/editor/standalone/browser/standaloneServices';
|
|
7
|
-
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
|
-
import { QuickInputService } from './vscode/src/vs/workbench/services/quickinput/browser/quickInputService.js';
|
|
9
|
-
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
10
|
-
import { StandaloneCodeEditor } from 'vscode/vscode/vs/editor/standalone/browser/standaloneCodeEditor';
|
|
11
|
-
import { CommandsQuickAccessProvider } from './vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js';
|
|
12
|
-
import './vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js';
|
|
13
|
-
import 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess';
|
|
14
|
-
import './vscode/src/vs/workbench/browser/actions/quickAccessActions.js';
|
|
15
|
-
import './vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js';
|
|
16
|
-
import './vscode/src/vs/workbench/contrib/url/browser/url.contribution.js';
|
|
17
|
-
import 'vscode/vscode/vs/workbench/browser/workbench.contribution';
|
|
18
|
-
|
|
19
|
-
let isKeybindingConfigurationVisible = () => {
|
|
20
|
-
return false;
|
|
21
|
-
};
|
|
22
|
-
let shouldUseGlobalPicker = (_activeCodeEditor, _activeCodeEditorStandalone) => {
|
|
23
|
-
return false;
|
|
24
|
-
};
|
|
25
|
-
const original = CommandsQuickAccessProvider.prototype['getCommandPicks'];
|
|
26
|
-
CommandsQuickAccessProvider.prototype['getCommandPicks'] = async function (token) {
|
|
27
|
-
let result = await original.call(this, token);
|
|
28
|
-
if (!isKeybindingConfigurationVisible()) {
|
|
29
|
-
result = ( result.map((picks) => ({
|
|
30
|
-
...picks,
|
|
31
|
-
buttons: undefined
|
|
32
|
-
})));
|
|
33
|
-
}
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
let DelegateQuickInputService = class DelegateQuickInputService {
|
|
37
|
-
constructor(instantiationService) {
|
|
38
|
-
this.instantiationService = instantiationService;
|
|
39
|
-
this.workbenchQuickInputService = instantiationService.createInstance(QuickInputService);
|
|
40
|
-
}
|
|
41
|
-
get activeService() {
|
|
42
|
-
const activeCodeEditor = StandaloneServices.get(ICodeEditorService).getFocusedCodeEditor();
|
|
43
|
-
if (activeCodeEditor == null ||
|
|
44
|
-
shouldUseGlobalPicker(activeCodeEditor, activeCodeEditor instanceof StandaloneCodeEditor)) {
|
|
45
|
-
return this.workbenchQuickInputService;
|
|
46
|
-
}
|
|
47
|
-
this.standaloneQuickInputService ?? (this.standaloneQuickInputService = this.instantiationService.createInstance(StandaloneQuickInputService));
|
|
48
|
-
return this.standaloneQuickInputService;
|
|
49
|
-
}
|
|
50
|
-
get currentQuickInput() {
|
|
51
|
-
return this.activeService.currentQuickInput;
|
|
52
|
-
}
|
|
53
|
-
get quickAccess() {
|
|
54
|
-
return this.activeService.quickAccess;
|
|
55
|
-
}
|
|
56
|
-
get backButton() {
|
|
57
|
-
return this.activeService.backButton;
|
|
58
|
-
}
|
|
59
|
-
get onShow() {
|
|
60
|
-
return this.activeService.onShow;
|
|
61
|
-
}
|
|
62
|
-
get onHide() {
|
|
63
|
-
return this.activeService.onHide;
|
|
64
|
-
}
|
|
65
|
-
createQuickWidget() {
|
|
66
|
-
return this.activeService.createQuickWidget();
|
|
67
|
-
}
|
|
68
|
-
pick(picks, options = {}, token = CancellationToken.None) {
|
|
69
|
-
return this.activeService
|
|
70
|
-
.pick(picks, options, token);
|
|
71
|
-
}
|
|
72
|
-
input(options, token) {
|
|
73
|
-
return this.activeService.input(options, token);
|
|
74
|
-
}
|
|
75
|
-
createQuickPick(options = { useSeparators: false }) {
|
|
76
|
-
return this.activeService.createQuickPick(options);
|
|
77
|
-
}
|
|
78
|
-
createInputBox() {
|
|
79
|
-
return this.activeService.createInputBox();
|
|
80
|
-
}
|
|
81
|
-
focus() {
|
|
82
|
-
return this.activeService.focus();
|
|
83
|
-
}
|
|
84
|
-
toggle() {
|
|
85
|
-
return this.activeService.toggle();
|
|
86
|
-
}
|
|
87
|
-
navigate(next, quickNavigate) {
|
|
88
|
-
return this.activeService.navigate(next, quickNavigate);
|
|
89
|
-
}
|
|
90
|
-
accept() {
|
|
91
|
-
return this.activeService.accept();
|
|
92
|
-
}
|
|
93
|
-
back() {
|
|
94
|
-
return this.activeService.back();
|
|
95
|
-
}
|
|
96
|
-
cancel() {
|
|
97
|
-
return this.activeService.cancel();
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
DelegateQuickInputService = __decorate([
|
|
101
|
-
( __param(0, IInstantiationService))
|
|
102
|
-
], DelegateQuickInputService);
|
|
103
|
-
function getServiceOverride({ isKeybindingConfigurationVisible: _isKeybindingConfigurationVisible, shouldUseGlobalPicker: _shouldUseGlobalPicker } = {}) {
|
|
104
|
-
if (_isKeybindingConfigurationVisible != null) {
|
|
105
|
-
isKeybindingConfigurationVisible = _isKeybindingConfigurationVisible;
|
|
106
|
-
}
|
|
107
|
-
if (_shouldUseGlobalPicker != null) {
|
|
108
|
-
shouldUseGlobalPicker = _shouldUseGlobalPicker;
|
|
109
|
-
}
|
|
110
|
-
return {
|
|
111
|
-
[( IQuickInputService.toString())]: new SyncDescriptor(DelegateQuickInputService, [], true)
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export { getServiceOverride as default };
|