@codingame/monaco-vscode-keybindings-service-override 33.0.7 → 34.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.
@@ -51,39 +51,39 @@ import { EditorContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/editor
51
51
  var WorkbenchKeybindingService_1;
52
52
  function isValidContributedKeyBinding(keyBinding, rejects) {
53
53
  if (!keyBinding) {
54
- rejects.push(( localize(16886, "expected non-empty value.")));
54
+ rejects.push(( localize(17101, "expected non-empty value.")));
55
55
  return false;
56
56
  }
57
57
  if (typeof keyBinding.command !== "string") {
58
58
  rejects.push(( localize(
59
- 16887,
59
+ 17102,
60
60
  "property `{0}` is mandatory and must be of type `string`",
61
61
  "command"
62
62
  )));
63
63
  return false;
64
64
  }
65
65
  if (keyBinding.key && typeof keyBinding.key !== "string") {
66
- rejects.push(( localize(16888, "property `{0}` can be omitted or must be of type `string`", "key")));
66
+ rejects.push(( localize(17103, "property `{0}` can be omitted or must be of type `string`", "key")));
67
67
  return false;
68
68
  }
69
69
  if (keyBinding.when && typeof keyBinding.when !== "string") {
70
- rejects.push(( localize(16888, "property `{0}` can be omitted or must be of type `string`", "when")));
70
+ rejects.push(( localize(17103, "property `{0}` can be omitted or must be of type `string`", "when")));
71
71
  return false;
72
72
  }
73
73
  if (keyBinding.mac && typeof keyBinding.mac !== "string") {
74
- rejects.push(( localize(16888, "property `{0}` can be omitted or must be of type `string`", "mac")));
74
+ rejects.push(( localize(17103, "property `{0}` can be omitted or must be of type `string`", "mac")));
75
75
  return false;
76
76
  }
77
77
  if (keyBinding.linux && typeof keyBinding.linux !== "string") {
78
78
  rejects.push(( localize(
79
- 16888,
79
+ 17103,
80
80
  "property `{0}` can be omitted or must be of type `string`",
81
81
  "linux"
82
82
  )));
83
83
  return false;
84
84
  }
85
85
  if (keyBinding.win && typeof keyBinding.win !== "string") {
86
- rejects.push(( localize(16888, "property `{0}` can be omitted or must be of type `string`", "win")));
86
+ rejects.push(( localize(17103, "property `{0}` can be omitted or must be of type `string`", "win")));
87
87
  return false;
88
88
  }
89
89
  return true;
@@ -97,33 +97,33 @@ const keybindingType = {
97
97
  required: ["command", "key"],
98
98
  properties: {
99
99
  command: {
100
- description: ( localize(16889, "Identifier of the command to run when keybinding is triggered.")),
100
+ description: ( localize(17104, "Identifier of the command to run when keybinding is triggered.")),
101
101
  type: "string"
102
102
  },
103
103
  args: {
104
- description: ( localize(16890, "Arguments to pass to the command to execute."))
104
+ description: ( localize(17105, "Arguments to pass to the command to execute."))
105
105
  },
106
106
  key: {
107
107
  description: ( localize(
108
- 16891,
108
+ 17106,
109
109
  "Key or key sequence (separate keys with plus-sign and sequences with space, e.g. Ctrl+O and Ctrl+L L for a chord)."
110
110
  )),
111
111
  type: "string"
112
112
  },
113
113
  mac: {
114
- description: ( localize(16892, "Mac specific key or key sequence.")),
114
+ description: ( localize(17107, "Mac specific key or key sequence.")),
115
115
  type: "string"
116
116
  },
117
117
  linux: {
118
- description: ( localize(16893, "Linux specific key or key sequence.")),
118
+ description: ( localize(17108, "Linux specific key or key sequence.")),
119
119
  type: "string"
120
120
  },
121
121
  win: {
122
- description: ( localize(16894, "Windows specific key or key sequence.")),
122
+ description: ( localize(17109, "Windows specific key or key sequence.")),
123
123
  type: "string"
124
124
  },
125
125
  when: {
126
- description: ( localize(16895, "Condition when the key is active.")),
126
+ description: ( localize(17110, "Condition when the key is active.")),
127
127
  type: "string"
128
128
  }
129
129
  }
@@ -132,7 +132,7 @@ const keybindingsExtPoint = ExtensionsRegistry.registerExtensionPoint({
132
132
  extensionPoint: "keybindings",
133
133
  deps: [commandsExtensionPoint],
134
134
  jsonSchema: {
135
- description: ( localize(16896, "Contributes keybindings.")),
135
+ description: ( localize(17111, "Contributes keybindings.")),
136
136
  oneOf: [keybindingType, {
137
137
  type: "array",
138
138
  items: keybindingType
@@ -555,7 +555,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
555
555
  }
556
556
  if (rejects.length > 0) {
557
557
  collector.error(( localize(
558
- 16897,
558
+ 17112,
559
559
  "Invalid `contributes.{0}`: {1}",
560
560
  keybindingsExtPoint.name,
561
561
  rejects.join("\n")
@@ -643,7 +643,7 @@ let WorkbenchKeybindingService = WorkbenchKeybindingService_1 = class WorkbenchK
643
643
  static _getAllCommandsAsComment(boundCommands) {
644
644
  const unboundCommands = getAllUnboundCommands(boundCommands);
645
645
  const pretty = unboundCommands.sort().join("\n// - ");
646
- return "// " + ( localize(16898, "Here are other available commands: ")) + "\n// - " + pretty;
646
+ return "// " + ( localize(17113, "Here are other available commands: ")) + "\n// - " + pretty;
647
647
  }
648
648
  mightProducePrintableCharacter(event) {
649
649
  if (event.ctrlKey || event.metaKey || event.altKey) {
@@ -766,7 +766,7 @@ class KeybindingsJsonSchema {
766
766
  this.schema = {
767
767
  id: KeybindingsJsonSchema.schemaId,
768
768
  type: "array",
769
- title: ( localize(16899, "Keybindings configuration")),
769
+ title: ( localize(17114, "Keybindings configuration")),
770
770
  allowTrailingCommas: true,
771
771
  allowComments: true,
772
772
  definitions: {
@@ -790,7 +790,7 @@ class KeybindingsJsonSchema {
790
790
  "type": "string",
791
791
  "enum": this.commandsEnum,
792
792
  "enumDescriptions": this.commandsEnumDescriptions,
793
- "description": ( localize(16900, "Name of the command to execute"))
793
+ "description": ( localize(17115, "Name of the command to execute"))
794
794
  },
795
795
  "commandType": {
796
796
  "anyOf": [{
@@ -799,7 +799,7 @@ class KeybindingsJsonSchema {
799
799
  "type": "string",
800
800
  "enum": this.removalCommandsEnum,
801
801
  "enumDescriptions": this.commandsEnumDescriptions,
802
- "description": ( localize(16901, "Name of the command to remove keyboard shortcut for"))
802
+ "description": ( localize(17116, "Name of the command to remove keyboard shortcut for"))
803
803
  }, {
804
804
  "type": "string"
805
805
  }]
@@ -821,7 +821,7 @@ class KeybindingsJsonSchema {
821
821
  "properties": {
822
822
  "key": {
823
823
  "type": "string",
824
- "description": ( localize(16902, "Key or key sequence (separated by space)"))
824
+ "description": ( localize(17117, "Key or key sequence (separated by space)"))
825
825
  },
826
826
  "command": {
827
827
  "anyOf": [{
@@ -833,7 +833,7 @@ class KeybindingsJsonSchema {
833
833
  "type": "array"
834
834
  },
835
835
  "errorMessage": ( localize(
836
- 16903,
836
+ 17118,
837
837
  "Incorrect type. Expected \"{0}\". The field 'command' does not support running multiple commands. Use command 'runCommands' to pass it multiple commands to run.",
838
838
  "string"
839
839
  ))
@@ -847,10 +847,10 @@ class KeybindingsJsonSchema {
847
847
  },
848
848
  "when": {
849
849
  "type": "string",
850
- "description": ( localize(16904, "Condition when the key is active."))
850
+ "description": ( localize(17119, "Condition when the key is active."))
851
851
  },
852
852
  "args": {
853
- "description": ( localize(16905, "Arguments to pass to the command to execute."))
853
+ "description": ( localize(17120, "Arguments to pass to the command to execute."))
854
854
  }
855
855
  },
856
856
  "$ref": "#/definitions/commandsSchemas"
@@ -93,9 +93,13 @@ class BrowserKeyboardMapperFactoryBase extends Disposable {
93
93
  }
94
94
  removeKeyboardLayout(layout) {
95
95
  let index = this._mru.indexOf(layout);
96
- this._mru.splice(index, 1);
96
+ if (index !== -1) {
97
+ this._mru.splice(index, 1);
98
+ }
97
99
  index = this._keymapInfos.indexOf(layout);
98
- this._keymapInfos.splice(index, 1);
100
+ if (index !== -1) {
101
+ this._keymapInfos.splice(index, 1);
102
+ }
99
103
  }
100
104
  getMatchedKeymapInfo(keyMapping) {
101
105
  if (!keyMapping) {
@@ -476,12 +480,12 @@ const keyboardConfiguration = {
476
480
  "id": "keyboard",
477
481
  "order": 15,
478
482
  "type": "object",
479
- "title": ( localize(16906, "Keyboard")),
483
+ "title": ( localize(17121, "Keyboard")),
480
484
  "properties": {
481
485
  "keyboard.layout": {
482
486
  "type": "string",
483
487
  "default": "autodetect",
484
- "description": ( localize(16907, "Control the keyboard layout used in web."))
488
+ "description": ( localize(17122, "Control the keyboard layout used in web."))
485
489
  }
486
490
  }
487
491
  };