@codingame/monaco-vscode-interactive-service-override 7.1.0 → 8.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/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactive.contribution.js +25 -32
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +4 -6
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.js +2 -3
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +3 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-interactive-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@8.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -14,7 +14,7 @@ import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
|
14
14
|
import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
15
15
|
import { peekViewBorder } from 'vscode/vscode/vs/editor/contrib/peekView/browser/peekView';
|
|
16
16
|
import { Context } from 'vscode/vscode/vs/editor/contrib/suggest/browser/suggest';
|
|
17
|
-
import {
|
|
17
|
+
import { localize2, localize } from 'vscode/vscode/vs/nls';
|
|
18
18
|
import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
19
19
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
20
20
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
@@ -68,8 +68,7 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
|
|
|
68
68
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
69
69
|
import { IWorkingCopyEditorService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService.service';
|
|
70
70
|
|
|
71
|
-
const
|
|
72
|
-
const interactiveWindowCategory = ( localize2WithPath(_moduleId, 0, "Interactive Window"));
|
|
71
|
+
const interactiveWindowCategory = ( localize2(1871, "Interactive Window"));
|
|
73
72
|
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(InteractiveEditor, INTERACTIVE_WINDOW_EDITOR_ID, 'Interactive Window'), [
|
|
74
73
|
( (new SyncDescriptor(InteractiveEditorInput)))
|
|
75
74
|
]);
|
|
@@ -258,11 +257,11 @@ registerAction2(class extends Action2 {
|
|
|
258
257
|
constructor() {
|
|
259
258
|
super({
|
|
260
259
|
id: '_interactive.open',
|
|
261
|
-
title: (
|
|
260
|
+
title: ( localize2(1872, 'Open Interactive Window')),
|
|
262
261
|
f1: false,
|
|
263
262
|
category: interactiveWindowCategory,
|
|
264
263
|
metadata: {
|
|
265
|
-
description: (
|
|
264
|
+
description: ( localize(1872, 'Open Interactive Window')),
|
|
266
265
|
args: [
|
|
267
266
|
{
|
|
268
267
|
name: 'showOptions',
|
|
@@ -366,7 +365,7 @@ registerAction2(class extends Action2 {
|
|
|
366
365
|
constructor() {
|
|
367
366
|
super({
|
|
368
367
|
id: 'interactive.configure',
|
|
369
|
-
title: (
|
|
368
|
+
title: ( localize2(1873, 'Configure input box behavior')),
|
|
370
369
|
category: interactiveWindowCategory,
|
|
371
370
|
f1: false,
|
|
372
371
|
icon: configIcon,
|
|
@@ -383,7 +382,7 @@ registerAction2(class extends Action2 {
|
|
|
383
382
|
constructor() {
|
|
384
383
|
super({
|
|
385
384
|
id: 'interactive.execute',
|
|
386
|
-
title: (
|
|
385
|
+
title: ( localize2(1874, 'Execute Code')),
|
|
387
386
|
category: interactiveWindowCategory,
|
|
388
387
|
keybinding: [{
|
|
389
388
|
when: ( (ContextKeyExpr.equals('activeEditor', 'workbench.editor.interactive'))),
|
|
@@ -504,7 +503,7 @@ registerAction2(class extends Action2 {
|
|
|
504
503
|
constructor() {
|
|
505
504
|
super({
|
|
506
505
|
id: 'interactive.input.clear',
|
|
507
|
-
title: (
|
|
506
|
+
title: ( localize2(1875, 'Clear the interactive window input editor contents')),
|
|
508
507
|
category: interactiveWindowCategory,
|
|
509
508
|
f1: false
|
|
510
509
|
});
|
|
@@ -526,7 +525,7 @@ registerAction2(class extends Action2 {
|
|
|
526
525
|
constructor() {
|
|
527
526
|
super({
|
|
528
527
|
id: 'interactive.history.previous',
|
|
529
|
-
title: (
|
|
528
|
+
title: ( localize2(1876, 'Previous value in history')),
|
|
530
529
|
category: interactiveWindowCategory,
|
|
531
530
|
f1: false,
|
|
532
531
|
keybinding: [{
|
|
@@ -570,7 +569,7 @@ registerAction2(class extends Action2 {
|
|
|
570
569
|
constructor() {
|
|
571
570
|
super({
|
|
572
571
|
id: 'interactive.history.next',
|
|
573
|
-
title: (
|
|
572
|
+
title: ( localize2(1877, 'Next value in history')),
|
|
574
573
|
category: interactiveWindowCategory,
|
|
575
574
|
f1: false,
|
|
576
575
|
keybinding: [{
|
|
@@ -614,7 +613,7 @@ registerAction2(class extends Action2 {
|
|
|
614
613
|
constructor() {
|
|
615
614
|
super({
|
|
616
615
|
id: 'interactive.scrollToTop',
|
|
617
|
-
title: (
|
|
616
|
+
title: ( localize(1878, 'Scroll to Top')),
|
|
618
617
|
keybinding: {
|
|
619
618
|
when: ( (ContextKeyExpr.equals('activeEditor', 'workbench.editor.interactive'))),
|
|
620
619
|
primary: KeyMod.CtrlCmd | KeyCode.Home,
|
|
@@ -639,7 +638,7 @@ registerAction2(class extends Action2 {
|
|
|
639
638
|
constructor() {
|
|
640
639
|
super({
|
|
641
640
|
id: 'interactive.scrollToBottom',
|
|
642
|
-
title: (
|
|
641
|
+
title: ( localize(1879, 'Scroll to Bottom')),
|
|
643
642
|
keybinding: {
|
|
644
643
|
when: ( (ContextKeyExpr.equals('activeEditor', 'workbench.editor.interactive'))),
|
|
645
644
|
primary: KeyMod.CtrlCmd | KeyCode.End,
|
|
@@ -665,7 +664,7 @@ registerAction2(class extends Action2 {
|
|
|
665
664
|
constructor() {
|
|
666
665
|
super({
|
|
667
666
|
id: 'interactive.input.focus',
|
|
668
|
-
title: (
|
|
667
|
+
title: ( localize2(1880, 'Focus Input Editor')),
|
|
669
668
|
category: interactiveWindowCategory,
|
|
670
669
|
menu: {
|
|
671
670
|
id: MenuId.CommandPalette,
|
|
@@ -699,7 +698,7 @@ registerAction2(class extends Action2 {
|
|
|
699
698
|
constructor() {
|
|
700
699
|
super({
|
|
701
700
|
id: 'interactive.history.focus',
|
|
702
|
-
title: (
|
|
701
|
+
title: ( localize2(1881, 'Focus History')),
|
|
703
702
|
category: interactiveWindowCategory,
|
|
704
703
|
menu: {
|
|
705
704
|
id: MenuId.CommandPalette,
|
|
@@ -721,9 +720,8 @@ registerColor('interactive.activeCodeBorder', {
|
|
|
721
720
|
light: ifDefinedThenElse(peekViewBorder, peekViewBorder, '#007acc'),
|
|
722
721
|
hcDark: contrastBorder,
|
|
723
722
|
hcLight: contrastBorder
|
|
724
|
-
}, (
|
|
725
|
-
|
|
726
|
-
11,
|
|
723
|
+
}, ( localize(
|
|
724
|
+
1882,
|
|
727
725
|
'The border color for the current interactive code cell when the editor has focus.'
|
|
728
726
|
)));
|
|
729
727
|
registerColor('interactive.inactiveCodeBorder', {
|
|
@@ -731,9 +729,8 @@ registerColor('interactive.inactiveCodeBorder', {
|
|
|
731
729
|
light: ifDefinedThenElse(listInactiveSelectionBackground, listInactiveSelectionBackground, '#E4E6F1'),
|
|
732
730
|
hcDark: PANEL_BORDER,
|
|
733
731
|
hcLight: PANEL_BORDER
|
|
734
|
-
}, (
|
|
735
|
-
|
|
736
|
-
12,
|
|
732
|
+
}, ( localize(
|
|
733
|
+
1883,
|
|
737
734
|
'The border color for the current interactive code cell when the editor does not have focus.'
|
|
738
735
|
)));
|
|
739
736
|
( (Registry.as(Extensions.Configuration))).registerConfiguration({
|
|
@@ -744,27 +741,24 @@ registerColor('interactive.inactiveCodeBorder', {
|
|
|
744
741
|
[InteractiveWindowSetting.interactiveWindowAlwaysScrollOnNewCell]: {
|
|
745
742
|
type: 'boolean',
|
|
746
743
|
default: true,
|
|
747
|
-
markdownDescription: (
|
|
748
|
-
|
|
749
|
-
13,
|
|
744
|
+
markdownDescription: ( localize(
|
|
745
|
+
1884,
|
|
750
746
|
"Automatically scroll the interactive window to show the output of the last statement executed. If this value is false, the window will only scroll if the last cell was already the one scrolled to."
|
|
751
747
|
))
|
|
752
748
|
},
|
|
753
749
|
[NotebookSetting.InteractiveWindowPromptToSave]: {
|
|
754
750
|
type: 'boolean',
|
|
755
751
|
default: false,
|
|
756
|
-
markdownDescription: (
|
|
757
|
-
|
|
758
|
-
14,
|
|
752
|
+
markdownDescription: ( localize(
|
|
753
|
+
1885,
|
|
759
754
|
"Prompt to save the interactive window when it is closed. Only new interactive windows will be affected by this setting change."
|
|
760
755
|
))
|
|
761
756
|
},
|
|
762
757
|
[InteractiveWindowSetting.executeWithShiftEnter]: {
|
|
763
758
|
type: 'boolean',
|
|
764
759
|
default: false,
|
|
765
|
-
markdownDescription: (
|
|
766
|
-
|
|
767
|
-
15,
|
|
760
|
+
markdownDescription: ( localize(
|
|
761
|
+
1886,
|
|
768
762
|
"Execute the Interactive Window (REPL) input box with shift+enter, so that enter can be used to create a newline."
|
|
769
763
|
)),
|
|
770
764
|
tags: ['replExecute']
|
|
@@ -772,9 +766,8 @@ registerColor('interactive.inactiveCodeBorder', {
|
|
|
772
766
|
[InteractiveWindowSetting.showExecutionHint]: {
|
|
773
767
|
type: 'boolean',
|
|
774
768
|
default: true,
|
|
775
|
-
markdownDescription: (
|
|
776
|
-
|
|
777
|
-
16,
|
|
769
|
+
markdownDescription: ( localize(
|
|
770
|
+
1887,
|
|
778
771
|
"Display a hint in the Interactive Window (REPL) input box to indicate how to execute code."
|
|
779
772
|
)),
|
|
780
773
|
tags: ['replExecute']
|
|
@@ -7,14 +7,13 @@ import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
|
7
7
|
import { OS } from 'vscode/vscode/vs/base/common/platform';
|
|
8
8
|
import { ContentWidgetPositionPreference } from 'vscode/vscode/vs/editor/browser/editorBrowser';
|
|
9
9
|
import { EditorOption } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
10
|
-
import {
|
|
10
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
11
11
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
12
12
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
13
13
|
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
14
14
|
import { InteractiveWindowSetting } from './interactiveCommon.js';
|
|
15
15
|
|
|
16
16
|
var ReplInputHintContentWidget_1;
|
|
17
|
-
const _moduleId = "vs/workbench/contrib/interactive/browser/replInputHintContentWidget";
|
|
18
17
|
let ReplInputHintContentWidget = class ReplInputHintContentWidget extends Disposable {
|
|
19
18
|
static { ReplInputHintContentWidget_1 = this; }
|
|
20
19
|
static { this.ID = 'replInput.widget.emptyHint'; }
|
|
@@ -77,7 +76,7 @@ let ReplInputHintContentWidget = class ReplInputHintContentWidget extends Dispos
|
|
|
77
76
|
const keybinding = this.getKeybinding();
|
|
78
77
|
const keybindingHintLabel = keybinding?.getLabel();
|
|
79
78
|
if (keybinding && keybindingHintLabel) {
|
|
80
|
-
const actionPart = (
|
|
79
|
+
const actionPart = ( localize(10095, 'Press {0} to execute. ', keybindingHintLabel));
|
|
81
80
|
const [before, after] = ( (actionPart.split(keybindingHintLabel).map((fragment) => {
|
|
82
81
|
const hintPart = $('span', undefined, fragment);
|
|
83
82
|
hintPart.style.fontStyle = 'italic';
|
|
@@ -90,9 +89,8 @@ let ReplInputHintContentWidget = class ReplInputHintContentWidget extends Dispos
|
|
|
90
89
|
label.element.style.display = 'inline';
|
|
91
90
|
hintElement.appendChild(after);
|
|
92
91
|
this.domNode.append(hintElement);
|
|
93
|
-
this.ariaLabel = actionPart.concat((
|
|
94
|
-
|
|
95
|
-
1,
|
|
92
|
+
this.ariaLabel = actionPart.concat(( localize(
|
|
93
|
+
10096,
|
|
96
94
|
' Toggle {0} in settings to disable this hint.',
|
|
97
95
|
AccessibilityVerbositySettingId.ReplInputHint
|
|
98
96
|
)));
|
|
@@ -16,7 +16,7 @@ import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extension
|
|
|
16
16
|
import { IWorkingCopyEditorService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService.service';
|
|
17
17
|
import { extname, isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
18
18
|
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
19
|
-
import {
|
|
19
|
+
import { localize2 } from 'vscode/vscode/vs/nls';
|
|
20
20
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
21
21
|
import { RegisteredEditorPriority } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
22
22
|
import { IEditorResolverService } from 'vscode/vscode/vs/workbench/services/editor/common/editorResolverService.service';
|
|
@@ -31,7 +31,6 @@ import { IInteractiveHistoryService } from 'vscode/vscode/vs/workbench/contrib/i
|
|
|
31
31
|
import { INotebookEditorService } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
|
|
32
32
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
33
33
|
|
|
34
|
-
const _moduleId = "vs/workbench/contrib/replNotebook/browser/repl.contribution";
|
|
35
34
|
class ReplEditorSerializer {
|
|
36
35
|
canSerialize(input) {
|
|
37
36
|
return input.typeId === ReplEditorInput.ID;
|
|
@@ -139,7 +138,7 @@ registerAction2(class extends Action2 {
|
|
|
139
138
|
constructor() {
|
|
140
139
|
super({
|
|
141
140
|
id: 'repl.newRepl',
|
|
142
|
-
title: (
|
|
141
|
+
title: ( localize2(5620, 'New REPL Editor')),
|
|
143
142
|
category: 'Create',
|
|
144
143
|
});
|
|
145
144
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import './media/interactive.css.js';
|
|
3
|
-
import {
|
|
3
|
+
import { localize } from 'vscode/vscode/vs/nls';
|
|
4
4
|
import { append, $, createStyleSheet, Dimension } from 'vscode/vscode/vs/base/browser/dom';
|
|
5
5
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
6
6
|
import { DisposableStore, MutableDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
@@ -64,7 +64,6 @@ import { deepClone } from 'vscode/vscode/vs/base/common/objects';
|
|
|
64
64
|
import { HoverController } from 'vscode/vscode/vs/editor/contrib/hover/browser/hoverController';
|
|
65
65
|
import { ReplEditorInput } from './replEditorInput.js';
|
|
66
66
|
|
|
67
|
-
const _moduleId = "vs/workbench/contrib/replNotebook/browser/replEditor";
|
|
68
67
|
const DECORATION_KEY = 'interactiveInputDecoration';
|
|
69
68
|
const INTERACTIVE_EDITOR_VIEW_STATE_PREFERENCE_KEY = 'InteractiveEditorViewState';
|
|
70
69
|
const INPUT_CELL_VERTICAL_PADDING = 8;
|
|
@@ -508,14 +507,8 @@ let ReplEditor = class ReplEditor extends EditorPane {
|
|
|
508
507
|
if (languageId !== 'plaintext') {
|
|
509
508
|
const keybinding = this._keybindingService.lookupKeybinding(EXECUTE_REPL_COMMAND_ID, this._contextKeyService)?.getLabel();
|
|
510
509
|
const text = keybinding ?
|
|
511
|
-
(
|
|
512
|
-
|
|
513
|
-
0,
|
|
514
|
-
"Type '{0}' code here and press {1} to run",
|
|
515
|
-
languageId,
|
|
516
|
-
keybinding
|
|
517
|
-
)) :
|
|
518
|
-
( localizeWithPath(_moduleId, 1, "Type '{0}' code here and click run", languageId));
|
|
510
|
+
( localize(5621, "Type '{0}' code here and press {1} to run", languageId, keybinding)) :
|
|
511
|
+
( localize(5622, "Type '{0}' code here and click run", languageId));
|
|
519
512
|
decorations.push({
|
|
520
513
|
range: {
|
|
521
514
|
startLineNumber: 0,
|