@codingame/monaco-vscode-acd79e2c-c7e3-5594-873a-427e3006b3d8-common 20.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/empty.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export {}
|
package/package.json
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
{
|
2
|
+
"name": "@codingame/monaco-vscode-acd79e2c-c7e3-5594-873a-427e3006b3d8-common",
|
3
|
+
"version": "20.0.0",
|
4
|
+
"private": false,
|
5
|
+
"description": "VSCode public API plugged on the monaco editor - common package (chat, interactive, keybindings, notebook, preferences, search, update)",
|
6
|
+
"keywords": [],
|
7
|
+
"author": {
|
8
|
+
"name": "CodinGame",
|
9
|
+
"url": "http://www.codingame.com"
|
10
|
+
},
|
11
|
+
"license": "MIT",
|
12
|
+
"repository": {
|
13
|
+
"type": "git",
|
14
|
+
"url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
|
15
|
+
},
|
16
|
+
"type": "module",
|
17
|
+
"dependencies": {
|
18
|
+
"@codingame/monaco-vscode-api": "20.0.0"
|
19
|
+
},
|
20
|
+
"exports": {
|
21
|
+
".": {
|
22
|
+
"default": "./empty.js"
|
23
|
+
},
|
24
|
+
"./vscode/*.css": {
|
25
|
+
"default": "./vscode/src/*.css"
|
26
|
+
},
|
27
|
+
"./vscode/*": {
|
28
|
+
"types": "./vscode/src/*.d.ts",
|
29
|
+
"default": "./vscode/src/*.js"
|
30
|
+
},
|
31
|
+
"./*": {
|
32
|
+
"types": "./*.d.ts",
|
33
|
+
"default": "./*.js"
|
34
|
+
}
|
35
|
+
},
|
36
|
+
"typesVersions": {
|
37
|
+
"*": {
|
38
|
+
"vscode/*": [
|
39
|
+
"./vscode/src/*.d.ts"
|
40
|
+
]
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
@@ -0,0 +1,257 @@
|
|
1
|
+
import { IStringDictionary } from "@codingame/monaco-vscode-api/vscode/vs/base/common/collections";
|
2
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
3
|
+
import { IMatch } from "@codingame/monaco-vscode-api/vscode/vs/base/common/filters";
|
4
|
+
import { IJSONSchema, IJSONSchemaMap } from "@codingame/monaco-vscode-api/vscode/vs/base/common/jsonSchema";
|
5
|
+
import { ResolvedKeybinding } from "@codingame/monaco-vscode-api/vscode/vs/base/common/keybindings";
|
6
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
7
|
+
import { IRange } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range";
|
8
|
+
import { IEditorContribution } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/editorCommon";
|
9
|
+
import { ConfigurationTarget } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration";
|
10
|
+
import { ConfigurationDefaultValueSource, ConfigurationScope, EditPresentationTypes, IExtensionInfo } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry";
|
11
|
+
import { IEditorOptions } from "@codingame/monaco-vscode-api/vscode/vs/platform/editor/common/editor";
|
12
|
+
import { IExtensionDescription } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
|
13
|
+
import { ResolvedKeybindingItem } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/resolvedKeybindingItem";
|
14
|
+
import { IEditorPane } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
15
|
+
export declare enum SettingValueType {
|
16
|
+
Null = "null",
|
17
|
+
Enum = "enum",
|
18
|
+
String = "string",
|
19
|
+
MultilineString = "multiline-string",
|
20
|
+
Integer = "integer",
|
21
|
+
Number = "number",
|
22
|
+
Boolean = "boolean",
|
23
|
+
Array = "array",
|
24
|
+
Exclude = "exclude",
|
25
|
+
Include = "include",
|
26
|
+
Complex = "complex",
|
27
|
+
NullableInteger = "nullable-integer",
|
28
|
+
NullableNumber = "nullable-number",
|
29
|
+
Object = "object",
|
30
|
+
BooleanObject = "boolean-object",
|
31
|
+
LanguageTag = "language-tag",
|
32
|
+
ExtensionToggle = "extension-toggle",
|
33
|
+
ComplexObject = "complex-object"
|
34
|
+
}
|
35
|
+
export interface ISettingsGroup {
|
36
|
+
id: string;
|
37
|
+
range: IRange;
|
38
|
+
title: string;
|
39
|
+
titleRange: IRange;
|
40
|
+
sections: ISettingsSection[];
|
41
|
+
order?: number;
|
42
|
+
extensionInfo?: IExtensionInfo;
|
43
|
+
}
|
44
|
+
export interface ISettingsSection {
|
45
|
+
titleRange?: IRange;
|
46
|
+
title?: string;
|
47
|
+
settings: ISetting[];
|
48
|
+
}
|
49
|
+
export interface ISetting {
|
50
|
+
range: IRange;
|
51
|
+
key: string;
|
52
|
+
keyRange: IRange;
|
53
|
+
value: any;
|
54
|
+
valueRange: IRange;
|
55
|
+
description: string[];
|
56
|
+
descriptionIsMarkdown?: boolean;
|
57
|
+
descriptionRanges: IRange[];
|
58
|
+
overrides?: ISetting[];
|
59
|
+
overrideOf?: ISetting;
|
60
|
+
deprecationMessage?: string;
|
61
|
+
deprecationMessageIsMarkdown?: boolean;
|
62
|
+
scope?: ConfigurationScope;
|
63
|
+
type?: string | string[];
|
64
|
+
order?: number;
|
65
|
+
arrayItemType?: string;
|
66
|
+
objectProperties?: IJSONSchemaMap;
|
67
|
+
objectPatternProperties?: IJSONSchemaMap;
|
68
|
+
objectAdditionalProperties?: boolean | IJSONSchema;
|
69
|
+
enum?: string[];
|
70
|
+
enumDescriptions?: string[];
|
71
|
+
enumDescriptionsAreMarkdown?: boolean;
|
72
|
+
uniqueItems?: boolean;
|
73
|
+
tags?: string[];
|
74
|
+
disallowSyncIgnore?: boolean;
|
75
|
+
restricted?: boolean;
|
76
|
+
extensionInfo?: IExtensionInfo;
|
77
|
+
validator?: (value: any) => string | null;
|
78
|
+
enumItemLabels?: string[];
|
79
|
+
editPresentation?: EditPresentationTypes;
|
80
|
+
nonLanguageSpecificDefaultValueSource?: ConfigurationDefaultValueSource;
|
81
|
+
isLanguageTagSetting?: boolean;
|
82
|
+
categoryLabel?: string;
|
83
|
+
allKeysAreBoolean?: boolean;
|
84
|
+
displayExtensionId?: string;
|
85
|
+
title?: string;
|
86
|
+
extensionGroupTitle?: string;
|
87
|
+
internalOrder?: number;
|
88
|
+
}
|
89
|
+
export interface IExtensionSetting extends ISetting {
|
90
|
+
extensionName?: string;
|
91
|
+
extensionPublisher?: string;
|
92
|
+
}
|
93
|
+
export interface ISearchResult {
|
94
|
+
filterMatches: ISettingMatch[];
|
95
|
+
exactMatch: boolean;
|
96
|
+
metadata?: IFilterMetadata;
|
97
|
+
}
|
98
|
+
export interface ISearchResultGroup {
|
99
|
+
id: string;
|
100
|
+
label: string;
|
101
|
+
result: ISearchResult;
|
102
|
+
order: number;
|
103
|
+
}
|
104
|
+
export interface IFilterResult {
|
105
|
+
query?: string;
|
106
|
+
filteredGroups: ISettingsGroup[];
|
107
|
+
allGroups: ISettingsGroup[];
|
108
|
+
matches: IRange[];
|
109
|
+
metadata?: IStringDictionary<IFilterMetadata>;
|
110
|
+
exactMatch?: boolean;
|
111
|
+
}
|
112
|
+
export declare enum SettingMatchType {
|
113
|
+
None = 0,
|
114
|
+
LanguageTagSettingMatch = 1,
|
115
|
+
RemoteMatch = 2,
|
116
|
+
NonContiguousQueryInSettingId = 4,
|
117
|
+
DescriptionOrValueMatch = 8,
|
118
|
+
NonContiguousWordsInSettingsLabel = 16,
|
119
|
+
ContiguousWordsInSettingsLabel = 32,
|
120
|
+
ContiguousQueryInSettingId = 64,
|
121
|
+
AllWordsInSettingsLabel = 128,
|
122
|
+
ExactMatch = 256
|
123
|
+
}
|
124
|
+
export declare const SettingKeyMatchTypes: number;
|
125
|
+
export interface ISettingMatch {
|
126
|
+
setting: ISetting;
|
127
|
+
matches: IRange[] | null;
|
128
|
+
matchType: SettingMatchType;
|
129
|
+
keyMatchScore: number;
|
130
|
+
score: number;
|
131
|
+
providerName?: string;
|
132
|
+
}
|
133
|
+
export interface IScoredResults {
|
134
|
+
[key: string]: IRemoteSetting;
|
135
|
+
}
|
136
|
+
export interface IRemoteSetting {
|
137
|
+
score: number;
|
138
|
+
key: string;
|
139
|
+
id: string;
|
140
|
+
defaultValue: string;
|
141
|
+
description: string;
|
142
|
+
packageId: string;
|
143
|
+
extensionName?: string;
|
144
|
+
extensionPublisher?: string;
|
145
|
+
}
|
146
|
+
export interface IFilterMetadata {
|
147
|
+
requestUrl: string;
|
148
|
+
requestBody: string;
|
149
|
+
timestamp: number;
|
150
|
+
duration: number;
|
151
|
+
scoredResults: IScoredResults;
|
152
|
+
requestCount?: number;
|
153
|
+
context: string;
|
154
|
+
}
|
155
|
+
export interface IPreferencesEditorModel<T> {
|
156
|
+
uri?: URI;
|
157
|
+
getPreference(key: string): T | undefined;
|
158
|
+
dispose(): void;
|
159
|
+
}
|
160
|
+
export type IGroupFilter = (group: ISettingsGroup) => boolean | null;
|
161
|
+
export type ISettingMatcher = (setting: ISetting, group: ISettingsGroup) => {
|
162
|
+
matches: IRange[];
|
163
|
+
matchType: SettingMatchType;
|
164
|
+
keyMatchScore: number;
|
165
|
+
score: number;
|
166
|
+
} | null;
|
167
|
+
export interface ISettingsEditorModel extends IPreferencesEditorModel<ISetting> {
|
168
|
+
readonly onDidChangeGroups: Event<void>;
|
169
|
+
settingsGroups: ISettingsGroup[];
|
170
|
+
filterSettings(filter: string, groupFilter: IGroupFilter, settingMatcher: ISettingMatcher): ISettingMatch[];
|
171
|
+
updateResultGroup(id: string, resultGroup: ISearchResultGroup | undefined): IFilterResult | undefined;
|
172
|
+
}
|
173
|
+
export interface ISettingsEditorOptions extends IEditorOptions {
|
174
|
+
target?: ConfigurationTarget;
|
175
|
+
folderUri?: URI;
|
176
|
+
query?: string;
|
177
|
+
revealSetting?: {
|
178
|
+
key: string;
|
179
|
+
edit?: boolean;
|
180
|
+
};
|
181
|
+
focusSearch?: boolean;
|
182
|
+
}
|
183
|
+
export interface IOpenSettingsOptions extends ISettingsEditorOptions {
|
184
|
+
jsonEditor?: boolean;
|
185
|
+
openToSide?: boolean;
|
186
|
+
groupId?: number;
|
187
|
+
}
|
188
|
+
export declare function validateSettingsEditorOptions(options: ISettingsEditorOptions): ISettingsEditorOptions;
|
189
|
+
export interface IKeybindingsEditorModel<T> extends IPreferencesEditorModel<T> {
|
190
|
+
}
|
191
|
+
export interface IKeybindingsEditorOptions extends IEditorOptions {
|
192
|
+
query?: string;
|
193
|
+
}
|
194
|
+
export interface IOpenKeybindingsEditorOptions extends IKeybindingsEditorOptions {
|
195
|
+
groupId?: number;
|
196
|
+
}
|
197
|
+
export interface KeybindingMatch {
|
198
|
+
ctrlKey?: boolean;
|
199
|
+
shiftKey?: boolean;
|
200
|
+
altKey?: boolean;
|
201
|
+
metaKey?: boolean;
|
202
|
+
keyCode?: boolean;
|
203
|
+
}
|
204
|
+
export interface KeybindingMatches {
|
205
|
+
firstPart: KeybindingMatch;
|
206
|
+
chordPart: KeybindingMatch;
|
207
|
+
}
|
208
|
+
export interface IKeybindingItemEntry {
|
209
|
+
id: string;
|
210
|
+
templateId: string;
|
211
|
+
keybindingItem: IKeybindingItem;
|
212
|
+
commandIdMatches?: IMatch[];
|
213
|
+
commandLabelMatches?: IMatch[];
|
214
|
+
commandDefaultLabelMatches?: IMatch[];
|
215
|
+
sourceMatches?: IMatch[];
|
216
|
+
extensionIdMatches?: IMatch[];
|
217
|
+
extensionLabelMatches?: IMatch[];
|
218
|
+
whenMatches?: IMatch[];
|
219
|
+
keybindingMatches?: KeybindingMatches;
|
220
|
+
}
|
221
|
+
export interface IKeybindingItem {
|
222
|
+
keybinding: ResolvedKeybinding;
|
223
|
+
keybindingItem: ResolvedKeybindingItem;
|
224
|
+
commandLabel: string;
|
225
|
+
commandDefaultLabel: string;
|
226
|
+
command: string;
|
227
|
+
source: string | IExtensionDescription;
|
228
|
+
when: string;
|
229
|
+
}
|
230
|
+
export interface IKeybindingsEditorPane extends IEditorPane {
|
231
|
+
readonly activeKeybindingEntry: IKeybindingItemEntry | null;
|
232
|
+
readonly onDefineWhenExpression: Event<IKeybindingItemEntry>;
|
233
|
+
readonly onLayout: Event<void>;
|
234
|
+
search(filter: string): void;
|
235
|
+
focusSearch(): void;
|
236
|
+
clearSearchResults(): void;
|
237
|
+
focusKeybindings(): void;
|
238
|
+
recordSearchKeys(): void;
|
239
|
+
toggleSortByPrecedence(): void;
|
240
|
+
selectKeybinding(keybindingEntry: IKeybindingItemEntry): void;
|
241
|
+
defineKeybinding(keybindingEntry: IKeybindingItemEntry, add: boolean): Promise<void>;
|
242
|
+
defineWhenExpression(keybindingEntry: IKeybindingItemEntry): void;
|
243
|
+
updateKeybinding(keybindingEntry: IKeybindingItemEntry, key: string, when: string | undefined): Promise<any>;
|
244
|
+
removeKeybinding(keybindingEntry: IKeybindingItemEntry): Promise<any>;
|
245
|
+
resetKeybinding(keybindingEntry: IKeybindingItemEntry): Promise<any>;
|
246
|
+
copyKeybinding(keybindingEntry: IKeybindingItemEntry): Promise<void>;
|
247
|
+
copyKeybindingCommand(keybindingEntry: IKeybindingItemEntry): Promise<void>;
|
248
|
+
showSimilarKeybindings(keybindingEntry: IKeybindingItemEntry): void;
|
249
|
+
}
|
250
|
+
export declare const DEFINE_KEYBINDING_EDITOR_CONTRIB_ID = "editor.contrib.defineKeybinding";
|
251
|
+
export interface IDefineKeybindingEditorContribution extends IEditorContribution {
|
252
|
+
showDefineKeybindingWidget(): void;
|
253
|
+
}
|
254
|
+
export declare const FOLDER_SETTINGS_PATH = ".vscode/settings.json";
|
255
|
+
export declare const DEFAULT_SETTINGS_EDITOR_SETTING = "workbench.settings.openDefaultSettings";
|
256
|
+
export declare const USE_SPLIT_JSON_SETTING = "workbench.settings.useSplitJSON";
|
257
|
+
export declare const SETTINGS_AUTHORITY = "settings";
|
@@ -0,0 +1,56 @@
|
|
1
|
+
|
2
|
+
import { DEFAULT_EDITOR_ASSOCIATION } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
3
|
+
|
4
|
+
var SettingValueType;
|
5
|
+
(function (SettingValueType) {
|
6
|
+
SettingValueType["Null"] = "null";
|
7
|
+
SettingValueType["Enum"] = "enum";
|
8
|
+
SettingValueType["String"] = "string";
|
9
|
+
SettingValueType["MultilineString"] = "multiline-string";
|
10
|
+
SettingValueType["Integer"] = "integer";
|
11
|
+
SettingValueType["Number"] = "number";
|
12
|
+
SettingValueType["Boolean"] = "boolean";
|
13
|
+
SettingValueType["Array"] = "array";
|
14
|
+
SettingValueType["Exclude"] = "exclude";
|
15
|
+
SettingValueType["Include"] = "include";
|
16
|
+
SettingValueType["Complex"] = "complex";
|
17
|
+
SettingValueType["NullableInteger"] = "nullable-integer";
|
18
|
+
SettingValueType["NullableNumber"] = "nullable-number";
|
19
|
+
SettingValueType["Object"] = "object";
|
20
|
+
SettingValueType["BooleanObject"] = "boolean-object";
|
21
|
+
SettingValueType["LanguageTag"] = "language-tag";
|
22
|
+
SettingValueType["ExtensionToggle"] = "extension-toggle";
|
23
|
+
SettingValueType["ComplexObject"] = "complex-object";
|
24
|
+
})(SettingValueType || (SettingValueType = {}));
|
25
|
+
var SettingMatchType;
|
26
|
+
(function (SettingMatchType) {
|
27
|
+
SettingMatchType[SettingMatchType["None"] = 0] = "None";
|
28
|
+
SettingMatchType[SettingMatchType["LanguageTagSettingMatch"] = 1] = "LanguageTagSettingMatch";
|
29
|
+
SettingMatchType[SettingMatchType["RemoteMatch"] = 2] = "RemoteMatch";
|
30
|
+
SettingMatchType[SettingMatchType["NonContiguousQueryInSettingId"] = 4] = "NonContiguousQueryInSettingId";
|
31
|
+
SettingMatchType[SettingMatchType["DescriptionOrValueMatch"] = 8] = "DescriptionOrValueMatch";
|
32
|
+
SettingMatchType[SettingMatchType["NonContiguousWordsInSettingsLabel"] = 16] = "NonContiguousWordsInSettingsLabel";
|
33
|
+
SettingMatchType[SettingMatchType["ContiguousWordsInSettingsLabel"] = 32] = "ContiguousWordsInSettingsLabel";
|
34
|
+
SettingMatchType[SettingMatchType["ContiguousQueryInSettingId"] = 64] = "ContiguousQueryInSettingId";
|
35
|
+
SettingMatchType[SettingMatchType["AllWordsInSettingsLabel"] = 128] = "AllWordsInSettingsLabel";
|
36
|
+
SettingMatchType[SettingMatchType["ExactMatch"] = 256] = "ExactMatch";
|
37
|
+
})(SettingMatchType || (SettingMatchType = {}));
|
38
|
+
const SettingKeyMatchTypes = (SettingMatchType.AllWordsInSettingsLabel
|
39
|
+
| SettingMatchType.ContiguousWordsInSettingsLabel
|
40
|
+
| SettingMatchType.NonContiguousWordsInSettingsLabel
|
41
|
+
| SettingMatchType.NonContiguousQueryInSettingId
|
42
|
+
| SettingMatchType.ContiguousQueryInSettingId);
|
43
|
+
function validateSettingsEditorOptions(options) {
|
44
|
+
return {
|
45
|
+
...options,
|
46
|
+
override: DEFAULT_EDITOR_ASSOCIATION.id,
|
47
|
+
pinned: true
|
48
|
+
};
|
49
|
+
}
|
50
|
+
const DEFINE_KEYBINDING_EDITOR_CONTRIB_ID = 'editor.contrib.defineKeybinding';
|
51
|
+
const FOLDER_SETTINGS_PATH = '.vscode/settings.json';
|
52
|
+
const DEFAULT_SETTINGS_EDITOR_SETTING = 'workbench.settings.openDefaultSettings';
|
53
|
+
const USE_SPLIT_JSON_SETTING = 'workbench.settings.useSplitJSON';
|
54
|
+
const SETTINGS_AUTHORITY = 'settings';
|
55
|
+
|
56
|
+
export { DEFAULT_SETTINGS_EDITOR_SETTING, DEFINE_KEYBINDING_EDITOR_CONTRIB_ID, FOLDER_SETTINGS_PATH, SETTINGS_AUTHORITY, SettingKeyMatchTypes, SettingMatchType, SettingValueType, USE_SPLIT_JSON_SETTING, validateSettingsEditorOptions };
|