@codingame/monaco-vscode-api 19.0.1 → 19.1.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/README.md +26 -0
- package/css.js +15 -8
- package/package.json +8 -8
- package/services.js +3 -3
- package/vscode/src/vs/base/browser/dom.d.ts +11 -0
- package/vscode/src/vs/base/browser/dom.js +34 -21
- package/vscode/src/vs/base/browser/domStylesheets.js +12 -4
- package/vscode/src/vs/base/browser/formattedTextRenderer.js +7 -7
- package/vscode/src/vs/base/browser/keyboardEvent.js +8 -1
- package/vscode/src/vs/base/browser/pixelRatio.js +2 -2
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +3 -3
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +4 -4
- package/vscode/src/vs/base/browser/ui/aria/aria.js +4 -4
- package/vscode/src/vs/base/browser/ui/button/button.js +10 -10
- package/vscode/src/vs/base/browser/ui/contextview/contextview.js +2 -2
- package/vscode/src/vs/base/browser/ui/findinput/findInput.js +3 -3
- package/vscode/src/vs/base/browser/ui/findinput/replaceInput.js +3 -3
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.js +3 -3
- package/vscode/src/vs/base/browser/ui/list/listView.js +3 -3
- package/vscode/src/vs/base/browser/ui/menu/menu.js +2 -2
- package/vscode/src/vs/base/browser/ui/progressbar/progressbar.js +3 -3
- package/vscode/src/vs/base/browser/ui/resizable/resizable.js +2 -2
- package/vscode/src/vs/base/browser/ui/scrollbar/abstractScrollbar.js +4 -4
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollableElement.js +5 -5
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollbarArrow.js +4 -4
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +4 -4
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxNative.js +3 -3
- package/vscode/src/vs/base/browser/ui/splitview/splitview.js +2 -2
- package/vscode/src/vs/base/browser/ui/toggle/toggle.js +2 -2
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.js +2 -1
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +2 -2
- package/vscode/src/vs/base/browser/window.d.ts +3 -0
- package/vscode/src/vs/base/browser/window.js +1 -1
- package/vscode/src/vs/editor/browser/config/charWidthReader.js +7 -6
- package/vscode/src/vs/editor/browser/controller/editContext/native/nativeEditContext.js +3 -3
- package/vscode/src/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +3 -2
- package/vscode/src/vs/editor/browser/controller/mouseTarget.js +2 -2
- package/vscode/src/vs/editor/browser/gpu/viewGpuContext.js +2 -2
- package/vscode/src/vs/editor/browser/observableCodeEditor.js +2 -1
- package/vscode/src/vs/editor/browser/view/domLineBreaksComputer.js +2 -1
- package/vscode/src/vs/editor/browser/view/viewLayer.js +3 -2
- package/vscode/src/vs/editor/browser/view.js +4 -4
- package/vscode/src/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +3 -2
- package/vscode/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +3 -3
- package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +3 -2
- package/vscode/src/vs/editor/browser/viewParts/margin/margin.js +3 -2
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.js +8 -8
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimapCharRendererFactory.js +2 -1
- package/vscode/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +3 -3
- package/vscode/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +2 -1
- package/vscode/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +2 -1
- package/vscode/src/vs/editor/browser/viewParts/rulers/rulers.js +3 -2
- package/vscode/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +2 -1
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursor.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/viewCursors/viewCursors.js +2 -2
- package/vscode/src/vs/editor/browser/viewParts/viewLines/viewLines.js +2 -1
- package/vscode/src/vs/editor/browser/viewParts/viewZones/viewZones.js +3 -2
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.d.ts +3 -1
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +8 -2
- package/vscode/src/vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget.d.ts +2 -1
- package/vscode/src/vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget.js +5 -3
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +12 -12
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +9 -9
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.d.ts +3 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +6 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/embeddedDiffEditorWidget.d.ts +2 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/embeddedDiffEditorWidget.js +5 -3
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +6 -6
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +2 -1
- package/vscode/src/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js +3 -2
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensWidget.js +3 -3
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +3 -3
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +2 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerInsertButton.js +2 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerSaturationBox.js +3 -3
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerStrip.js +2 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerWidget.js +2 -2
- package/vscode/src/vs/editor/contrib/find/browser/findOptionsWidget.js +2 -2
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +9 -9
- package/vscode/src/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +13 -13
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsCustomView.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsLineReplacementView.js +2 -2
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +2 -2
- package/vscode/src/vs/editor/contrib/message/browser/messageController.js +5 -5
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +10 -10
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +9 -9
- package/vscode/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.js +4 -4
- package/vscode/src/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js +2 -2
- package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +2 -1
- package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditor.d.ts +1 -1
- package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditor.js +5 -4
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.d.ts +1 -0
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +24 -48
- package/vscode/src/vs/platform/actionWidget/browser/actionList.js +6 -6
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +4 -4
- package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.d.ts +1 -0
- package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +3 -0
- package/vscode/src/vs/platform/keybinding/common/keybinding.service.d.ts +1 -0
- package/vscode/src/vs/platform/product/common/product.js +1 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.d.ts +3 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +6 -2
- package/vscode/src/vs/workbench/browser/actions/developerActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +2 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +5 -3
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +3 -3
|
@@ -6,7 +6,7 @@ import '../../../platform/undoRedo/common/undoRedoService.js';
|
|
|
6
6
|
import '../../common/services/languageFeatureDebounce.js';
|
|
7
7
|
import '../../common/services/semanticTokensStylingService.js';
|
|
8
8
|
import { Emitter, Event, ValueWithChangeEvent } from '../../../base/common/event.js';
|
|
9
|
-
import { ImmortalReference, DisposableStore,
|
|
9
|
+
import { ImmortalReference, DisposableStore, toDisposable, combinedDisposable, Disposable } from '../../../base/common/lifecycle.js';
|
|
10
10
|
import '../../common/model.js';
|
|
11
11
|
import '../../../base/common/arrays.js';
|
|
12
12
|
import '../../../base/common/async.js';
|
|
@@ -63,7 +63,6 @@ import { ICodeEditorService } from '../../browser/services/codeEditorService.ser
|
|
|
63
63
|
import { ConsoleLogger, NullLoggerService } from '../../../platform/log/common/log.js';
|
|
64
64
|
import { ILogService, ILoggerService } from '../../../platform/log/common/log.service.js';
|
|
65
65
|
import { IWorkspaceTrustManagementService } from '../../../platform/workspace/common/workspaceTrust.service.js';
|
|
66
|
-
import { EditorOption } from '../../common/config/editorOptions.js';
|
|
67
66
|
import { IContextViewService, IContextMenuService } from '../../../platform/contextview/browser/contextView.service.js';
|
|
68
67
|
import { ContextViewService } from '../../../platform/contextview/browser/contextViewService.js';
|
|
69
68
|
import { LanguageService } from '../../common/services/languageService.js';
|
|
@@ -337,58 +336,35 @@ let StandaloneKeybindingService = class StandaloneKeybindingService extends Abst
|
|
|
337
336
|
this._cachedResolver = null;
|
|
338
337
|
this._dynamicKeybindings = [];
|
|
339
338
|
this._domNodeListeners = [];
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
339
|
+
}
|
|
340
|
+
registerContainer(container) {
|
|
341
|
+
const disposables = ( new DisposableStore());
|
|
342
|
+
disposables.add(addDisposableListener(container, EventType.KEY_DOWN, (e) => {
|
|
343
|
+
const keyEvent = ( new StandardKeyboardEvent(e));
|
|
344
|
+
const shouldPreventDefault = this._dispatch(keyEvent, keyEvent.target);
|
|
345
|
+
if (shouldPreventDefault) {
|
|
346
|
+
keyEvent.preventDefault();
|
|
347
|
+
keyEvent.stopPropagation();
|
|
348
|
+
}
|
|
349
|
+
}));
|
|
350
|
+
disposables.add(addDisposableListener(container, EventType.KEY_UP, (e) => {
|
|
351
|
+
const keyEvent = ( new StandardKeyboardEvent(e));
|
|
352
|
+
const shouldPreventDefault = this._singleModifierDispatch(keyEvent, keyEvent.target);
|
|
353
|
+
if (shouldPreventDefault) {
|
|
354
|
+
keyEvent.preventDefault();
|
|
355
|
+
}
|
|
356
|
+
}));
|
|
357
|
+
this._domNodeListeners.push(( new DomNodeListeners(container, disposables)));
|
|
358
|
+
disposables.add(toDisposable(() => {
|
|
360
359
|
for (let i = 0; i < this._domNodeListeners.length; i++) {
|
|
361
360
|
const domNodeListeners = this._domNodeListeners[i];
|
|
362
|
-
if (domNodeListeners.domNode ===
|
|
361
|
+
if (domNodeListeners.domNode === container) {
|
|
363
362
|
this._domNodeListeners.splice(i, 1);
|
|
364
363
|
domNodeListeners.dispose();
|
|
365
364
|
}
|
|
366
365
|
}
|
|
367
|
-
};
|
|
368
|
-
|
|
369
|
-
if (codeEditor.getOption(EditorOption.inDiffEditor)) {
|
|
370
|
-
return;
|
|
371
|
-
}
|
|
372
|
-
addContainer(codeEditor.getContainerDomNode());
|
|
373
|
-
};
|
|
374
|
-
const removeCodeEditor = (codeEditor) => {
|
|
375
|
-
if (codeEditor.getOption(EditorOption.inDiffEditor)) {
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
removeContainer(codeEditor.getContainerDomNode());
|
|
379
|
-
};
|
|
380
|
-
this._register(codeEditorService.onCodeEditorAdd(addCodeEditor));
|
|
381
|
-
this._register(codeEditorService.onCodeEditorRemove(removeCodeEditor));
|
|
382
|
-
codeEditorService.listCodeEditors().forEach(addCodeEditor);
|
|
383
|
-
const addDiffEditor = (diffEditor) => {
|
|
384
|
-
addContainer(diffEditor.getContainerDomNode());
|
|
385
|
-
};
|
|
386
|
-
const removeDiffEditor = (diffEditor) => {
|
|
387
|
-
removeContainer(diffEditor.getContainerDomNode());
|
|
388
|
-
};
|
|
389
|
-
this._register(codeEditorService.onDiffEditorAdd(addDiffEditor));
|
|
390
|
-
this._register(codeEditorService.onDiffEditorRemove(removeDiffEditor));
|
|
391
|
-
codeEditorService.listDiffEditors().forEach(addDiffEditor);
|
|
366
|
+
}));
|
|
367
|
+
return disposables;
|
|
392
368
|
}
|
|
393
369
|
addDynamicKeybinding(command, keybinding, handler, when) {
|
|
394
370
|
return combinedDisposable(CommandsRegistry.registerCommand(command, handler), this.addDynamicKeybindings([{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
3
|
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
4
|
-
import { setVisibility, getWindow } from '../../../base/browser/dom.js';
|
|
4
|
+
import { createElement, setVisibility, getWindow } from '../../../base/browser/dom.js';
|
|
5
5
|
import { KeybindingLabel } from '../../../base/browser/ui/keybindingLabel/keybindingLabel.js';
|
|
6
6
|
import { List } from '../../../base/browser/ui/list/listWidget.js';
|
|
7
7
|
import { CancellationTokenSource } from '../../../base/common/cancellation.js';
|
|
@@ -39,7 +39,7 @@ class HeaderRenderer {
|
|
|
39
39
|
get templateId() { return ActionListItemKind.Header; }
|
|
40
40
|
renderTemplate(container) {
|
|
41
41
|
container.classList.add('group-header');
|
|
42
|
-
const text =
|
|
42
|
+
const text = createElement('span');
|
|
43
43
|
container.append(text);
|
|
44
44
|
return { container, text };
|
|
45
45
|
}
|
|
@@ -57,13 +57,13 @@ let ActionItemRenderer = class ActionItemRenderer {
|
|
|
57
57
|
}
|
|
58
58
|
renderTemplate(container) {
|
|
59
59
|
container.classList.add(this.templateId);
|
|
60
|
-
const icon =
|
|
60
|
+
const icon = createElement('div');
|
|
61
61
|
icon.className = 'icon';
|
|
62
62
|
container.append(icon);
|
|
63
|
-
const text =
|
|
63
|
+
const text = createElement('span');
|
|
64
64
|
text.className = 'title';
|
|
65
65
|
container.append(text);
|
|
66
|
-
const description =
|
|
66
|
+
const description = createElement('span');
|
|
67
67
|
description.className = 'description';
|
|
68
68
|
container.append(description);
|
|
69
69
|
const keybinding = ( new KeybindingLabel(container, OS));
|
|
@@ -148,7 +148,7 @@ let ActionList = class ActionList extends Disposable {
|
|
|
148
148
|
this._actionLineHeight = 24;
|
|
149
149
|
this._headerLineHeight = 26;
|
|
150
150
|
this.cts = this._register(( new CancellationTokenSource()));
|
|
151
|
-
this.domNode =
|
|
151
|
+
this.domNode = createElement('div');
|
|
152
152
|
this.domNode.classList.add('actionList');
|
|
153
153
|
const virtualDelegate = {
|
|
154
154
|
getHeight: element => element.kind === ActionListItemKind.Header ? this._headerLineHeight : this._actionLineHeight,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
3
|
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
4
|
-
import { addDisposableListener, EventType, trackFocus, $ } from '../../../base/browser/dom.js';
|
|
4
|
+
import { createElement, addDisposableListener, EventType, trackFocus, $ } from '../../../base/browser/dom.js';
|
|
5
5
|
import { ActionBar } from '../../../base/browser/ui/actionbar/actionbar.js';
|
|
6
6
|
import { KeyMod as KeyMod$1, KeyCode } from '../../../base/common/keyCodes.js';
|
|
7
7
|
import { Disposable, MutableDisposable, DisposableStore } from '../../../base/common/lifecycle.js';
|
|
@@ -76,7 +76,7 @@ let ActionWidgetService = class ActionWidgetService extends Disposable {
|
|
|
76
76
|
this._list.clear();
|
|
77
77
|
}
|
|
78
78
|
_renderWidget(element, list, actionBarActions) {
|
|
79
|
-
const widget =
|
|
79
|
+
const widget = createElement('div');
|
|
80
80
|
widget.classList.add('action-widget');
|
|
81
81
|
element.appendChild(widget);
|
|
82
82
|
this._list.value = list;
|
|
@@ -87,11 +87,11 @@ let ActionWidgetService = class ActionWidgetService extends Disposable {
|
|
|
87
87
|
throw ( new Error('List has no value'));
|
|
88
88
|
}
|
|
89
89
|
const renderDisposables = ( new DisposableStore());
|
|
90
|
-
const menuBlock =
|
|
90
|
+
const menuBlock = createElement('div');
|
|
91
91
|
const block = element.appendChild(menuBlock);
|
|
92
92
|
block.classList.add('context-view-block');
|
|
93
93
|
renderDisposables.add(addDisposableListener(block, EventType.MOUSE_DOWN, e => e.stopPropagation()));
|
|
94
|
-
const pointerBlockDiv =
|
|
94
|
+
const pointerBlockDiv = createElement('div');
|
|
95
95
|
const pointerBlock = element.appendChild(pointerBlockDiv);
|
|
96
96
|
pointerBlock.classList.add('context-view-pointerBlock');
|
|
97
97
|
renderDisposables.add(addDisposableListener(pointerBlock, EventType.POINTER_MOVE, () => pointerBlock.remove()));
|
|
@@ -30,6 +30,7 @@ export declare abstract class AbstractKeybindingService extends Disposable imple
|
|
|
30
30
|
protected _logging: boolean;
|
|
31
31
|
get inChordMode(): boolean;
|
|
32
32
|
constructor(_contextKeyService: IContextKeyService, _commandService: ICommandService, _telemetryService: ITelemetryService, _notificationService: INotificationService, _logService: ILogService);
|
|
33
|
+
registerContainer(container: HTMLElement): IDisposable;
|
|
33
34
|
dispose(): void;
|
|
34
35
|
protected abstract _getResolver(): KeybindingResolver;
|
|
35
36
|
protected abstract _documentHasFocus(): boolean;
|
|
@@ -10,6 +10,7 @@ export declare const IKeybindingService: import("../../instantiation/common/inst
|
|
|
10
10
|
export interface IKeybindingService {
|
|
11
11
|
readonly _serviceBrand: undefined;
|
|
12
12
|
readonly inChordMode: boolean;
|
|
13
|
+
registerContainer(container: HTMLElement): IDisposable;
|
|
13
14
|
onDidUpdateKeybindings: Event<void>;
|
|
14
15
|
resolveKeybinding(keybinding: Keybinding): ResolvedKeybinding[];
|
|
15
16
|
resolveKeyboardEvent(keyboardEvent: IKeyboardEvent): ResolvedKeybinding;
|
|
@@ -8,11 +8,13 @@ import { ILayoutService } from "../../layout/browser/layoutService.service.js";
|
|
|
8
8
|
import { IInstantiationService } from "../../instantiation/common/instantiation.js";
|
|
9
9
|
import { IContextKeyService } from "../../contextkey/common/contextkey.service.js";
|
|
10
10
|
import { IStorageService } from "../../storage/common/storage.service.js";
|
|
11
|
+
import { IKeybindingService } from "../../keybinding/common/keybinding.service.js";
|
|
11
12
|
export declare class QuickInputController extends Disposable {
|
|
12
13
|
private options;
|
|
13
14
|
private readonly layoutService;
|
|
14
15
|
private readonly instantiationService;
|
|
15
16
|
private readonly storageService;
|
|
17
|
+
private readonly keybindingService;
|
|
16
18
|
private static readonly MAX_WIDTH;
|
|
17
19
|
private idPrefix;
|
|
18
20
|
private ui;
|
|
@@ -38,7 +40,7 @@ export declare class QuickInputController extends Disposable {
|
|
|
38
40
|
private readonly inQuickInputContext;
|
|
39
41
|
private readonly quickInputTypeContext;
|
|
40
42
|
private readonly endOfQuickInputBoxContext;
|
|
41
|
-
constructor(options: IQuickInputOptions, layoutService: ILayoutService, instantiationService: IInstantiationService, contextKeyService: IContextKeyService, storageService: IStorageService);
|
|
43
|
+
constructor(options: IQuickInputOptions, layoutService: ILayoutService, instantiationService: IInstantiationService, contextKeyService: IContextKeyService, storageService: IStorageService, keybindingService: IKeybindingService);
|
|
42
44
|
private registerKeyModsListeners;
|
|
43
45
|
private getUI;
|
|
44
46
|
private reparentUI;
|
|
@@ -32,6 +32,7 @@ import { getWindowControlsStyle, WindowControlsStyle } from '../../window/common
|
|
|
32
32
|
import { getZoomFactor } from '../../../base/browser/browser.js';
|
|
33
33
|
import { Checkbox } from '../../../base/browser/ui/toggle/toggle.js';
|
|
34
34
|
import { defaultCheckboxStyles } from '../../theme/browser/defaultStyles.js';
|
|
35
|
+
import { IKeybindingService } from '../../keybinding/common/keybinding.service.js';
|
|
35
36
|
import { autorun } from '../../../base/common/observableInternal/reactions/autorun.js';
|
|
36
37
|
import { observableValue } from '../../../base/common/observableInternal/observables/observableValue.js';
|
|
37
38
|
|
|
@@ -43,12 +44,13 @@ let QuickInputController = class QuickInputController extends Disposable {
|
|
|
43
44
|
static { this.MAX_WIDTH = 600; }
|
|
44
45
|
get currentQuickInput() { return this.controller ?? undefined; }
|
|
45
46
|
get container() { return this._container; }
|
|
46
|
-
constructor(options, layoutService, instantiationService, contextKeyService, storageService) {
|
|
47
|
+
constructor(options, layoutService, instantiationService, contextKeyService, storageService, keybindingService) {
|
|
47
48
|
super();
|
|
48
49
|
this.options = options;
|
|
49
50
|
this.layoutService = layoutService;
|
|
50
51
|
this.instantiationService = instantiationService;
|
|
51
52
|
this.storageService = storageService;
|
|
53
|
+
this.keybindingService = keybindingService;
|
|
52
54
|
this.enabled = true;
|
|
53
55
|
this.onDidAcceptEmitter = this._register(( new Emitter()));
|
|
54
56
|
this.onDidCustomEmitter = this._register(( new Emitter()));
|
|
@@ -95,6 +97,7 @@ let QuickInputController = class QuickInputController extends Disposable {
|
|
|
95
97
|
return this.ui;
|
|
96
98
|
}
|
|
97
99
|
const container = append(this._container, $('.quick-input-widget.show-file-icons'));
|
|
100
|
+
this._register(this.keybindingService.registerContainer(container));
|
|
98
101
|
container.tabIndex = -1;
|
|
99
102
|
container.style.display = 'none';
|
|
100
103
|
const styleSheet = createStyleSheet(container);
|
|
@@ -778,7 +781,8 @@ QuickInputController = QuickInputController_1 = ( __decorate([
|
|
|
778
781
|
( __param(1, ILayoutService)),
|
|
779
782
|
( __param(2, IInstantiationService)),
|
|
780
783
|
( __param(3, IContextKeyService)),
|
|
781
|
-
( __param(4, IStorageService))
|
|
784
|
+
( __param(4, IStorageService)),
|
|
785
|
+
( __param(5, IKeybindingService))
|
|
782
786
|
], QuickInputController));
|
|
783
787
|
let QuickInputDragAndDropController = class QuickInputDragAndDropController extends Disposable {
|
|
784
788
|
constructor(_container, _quickInputContainer, _quickInputDragAreas, initialViewState, _layoutService, contextKeyService, configurationService) {
|
|
@@ -7,7 +7,7 @@ import { DomEmitter } from '../../../base/browser/event.js';
|
|
|
7
7
|
import { Color } from '../../../base/common/color.js';
|
|
8
8
|
import { Event, Emitter } from '../../../base/common/event.js';
|
|
9
9
|
import { DisposableStore, toDisposable, dispose, DisposableTracker, setDisposableTracker } from '../../../base/common/lifecycle.js';
|
|
10
|
-
import { getActiveDocument, getDomNodePagePosition, append, $, getWindows, onDidRegisterWindow } from '../../../base/browser/dom.js';
|
|
10
|
+
import { createElement, getActiveDocument, getDomNodePagePosition, append, $, getWindows, onDidRegisterWindow } from '../../../base/browser/dom.js';
|
|
11
11
|
import { createStyleSheet, createCSSRule } from '../../../base/browser/domStylesheets.js';
|
|
12
12
|
import { IConfigurationService } from '../../../platform/configuration/common/configuration.service.js';
|
|
13
13
|
import { RawContextKey, ContextKeyExpr } from '../../../platform/contextkey/common/contextkey.js';
|
|
@@ -53,7 +53,7 @@ class InspectContextKeysAction extends Action2 {
|
|
|
53
53
|
const disposables = ( new DisposableStore());
|
|
54
54
|
const stylesheet = createStyleSheet(undefined, undefined, disposables);
|
|
55
55
|
createCSSRule('*', 'cursor: crosshair !important;', stylesheet);
|
|
56
|
-
const hoverFeedback =
|
|
56
|
+
const hoverFeedback = createElement('div');
|
|
57
57
|
const activeDocument = getActiveDocument();
|
|
58
58
|
activeDocument.body.appendChild(hoverFeedback);
|
|
59
59
|
disposables.add(toDisposable(() => hoverFeedback.remove()));
|
|
@@ -3,6 +3,7 @@ import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
|
3
3
|
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
4
4
|
import * as editorDictation from './editorDictation.css';
|
|
5
5
|
import { localize2, localize } from '../../../../../nls.js';
|
|
6
|
+
import { createElement } from '../../../../../base/browser/dom.js';
|
|
6
7
|
import { CancellationTokenSource } from '../../../../../base/common/cancellation.js';
|
|
7
8
|
import { Disposable, MutableDisposable, DisposableStore, toDisposable } from '../../../../../base/common/lifecycle.js';
|
|
8
9
|
import { ContentWidgetPositionPreference } from '../../../../../editor/browser/editorBrowser.js';
|
|
@@ -93,7 +94,7 @@ class DictationWidget extends Disposable {
|
|
|
93
94
|
this.editor = editor;
|
|
94
95
|
this.suppressMouseDown = true;
|
|
95
96
|
this.allowEditorOverflow = true;
|
|
96
|
-
this.domNode =
|
|
97
|
+
this.domNode = createElement('div');
|
|
97
98
|
const actionBar = this._register(( new ActionBar(this.domNode)));
|
|
98
99
|
const stopActionKeybinding = keybindingService.lookupKeybinding(EditorDictationStopAction.ID)?.getLabel();
|
|
99
100
|
actionBar.push(toAction({
|
|
@@ -14,6 +14,7 @@ import { ILanguageConfigurationService } from "../../../../editor/common/languag
|
|
|
14
14
|
import { ILanguageFeaturesService } from "../../../../editor/common/services/languageFeatures.service.js";
|
|
15
15
|
import { IConfigurationService } from "../../../../platform/configuration/common/configuration.service.js";
|
|
16
16
|
import { ICodeEditor } from "../../../../editor/browser/editorBrowser.js";
|
|
17
|
+
import { IKeybindingService } from "../../../../platform/keybinding/common/keybinding.service.js";
|
|
17
18
|
export declare const ctxCommentEditorFocused: RawContextKey<boolean>;
|
|
18
19
|
export declare const MIN_EDITOR_HEIGHT: number;
|
|
19
20
|
export declare const MAX_EDITOR_HEIGHT: number;
|
|
@@ -26,7 +27,7 @@ export declare class SimpleCommentEditor extends CodeEditorWidget {
|
|
|
26
27
|
private _parentThread;
|
|
27
28
|
private _commentEditorFocused;
|
|
28
29
|
private _commentEditorEmpty;
|
|
29
|
-
constructor(domElement: HTMLElement, options: IEditorOptions, scopedContextKeyService: IContextKeyService, parentThread: ICommentThreadWidget, instantiationService: IInstantiationService, codeEditorService: ICodeEditorService, commandService: ICommandService, themeService: IThemeService, notificationService: INotificationService, accessibilityService: IAccessibilityService, languageConfigurationService: ILanguageConfigurationService, languageFeaturesService: ILanguageFeaturesService);
|
|
30
|
+
constructor(domElement: HTMLElement, options: IEditorOptions, scopedContextKeyService: IContextKeyService, parentThread: ICommentThreadWidget, instantiationService: IInstantiationService, codeEditorService: ICodeEditorService, commandService: ICommandService, themeService: IThemeService, notificationService: INotificationService, accessibilityService: IAccessibilityService, languageConfigurationService: ILanguageConfigurationService, languageFeaturesService: ILanguageFeaturesService, keybindingService: IKeybindingService);
|
|
30
31
|
getParentThread(): ICommentThreadWidget;
|
|
31
32
|
protected _getActions(): Iterable<EditorAction>;
|
|
32
33
|
updateOptions(newOptions: Readonly<IEditorOptions> | undefined): void;
|
|
@@ -31,12 +31,13 @@ import { MenuId } from '../../../../platform/actions/common/actions.js';
|
|
|
31
31
|
import { ContentHoverController } from '../../../../editor/contrib/hover/browser/contentHoverController.js';
|
|
32
32
|
import { GlyphHoverController } from '../../../../editor/contrib/hover/browser/glyphHoverController.js';
|
|
33
33
|
import { PlaceholderTextContribution } from '../../../../editor/contrib/placeholderText/browser/placeholderTextContribution.js';
|
|
34
|
+
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.service.js';
|
|
34
35
|
|
|
35
36
|
const ctxCommentEditorFocused = ( new RawContextKey('commentEditorFocused', false));
|
|
36
37
|
const MIN_EDITOR_HEIGHT = 5 * 18;
|
|
37
38
|
const MAX_EDITOR_HEIGHT = 25 * 18;
|
|
38
39
|
let SimpleCommentEditor = class SimpleCommentEditor extends CodeEditorWidget {
|
|
39
|
-
constructor(domElement, options, scopedContextKeyService, parentThread, instantiationService, codeEditorService, commandService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService) {
|
|
40
|
+
constructor(domElement, options, scopedContextKeyService, parentThread, instantiationService, codeEditorService, commandService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService, keybindingService) {
|
|
40
41
|
const codeEditorWidgetOptions = {
|
|
41
42
|
contributions: [
|
|
42
43
|
{ id: MenuPreventer.ID, ctor: MenuPreventer, instantiation: EditorContributionInstantiation.BeforeFirstInteraction },
|
|
@@ -60,7 +61,7 @@ let SimpleCommentEditor = class SimpleCommentEditor extends CodeEditorWidget {
|
|
|
60
61
|
],
|
|
61
62
|
contextMenuId: MenuId.SimpleEditorContext
|
|
62
63
|
};
|
|
63
|
-
super(domElement, options, codeEditorWidgetOptions, instantiationService, codeEditorService, commandService, scopedContextKeyService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService);
|
|
64
|
+
super(domElement, options, codeEditorWidgetOptions, instantiationService, codeEditorService, commandService, scopedContextKeyService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService, keybindingService);
|
|
64
65
|
this._commentEditorFocused = ctxCommentEditorFocused.bindTo(scopedContextKeyService);
|
|
65
66
|
this._commentEditorEmpty = CommentContextKeys.commentIsEmpty.bindTo(scopedContextKeyService);
|
|
66
67
|
this._commentEditorEmpty.set(!this.getModel()?.getValueLength());
|
|
@@ -121,7 +122,8 @@ SimpleCommentEditor = ( __decorate([
|
|
|
121
122
|
( __param(8, INotificationService)),
|
|
122
123
|
( __param(9, IAccessibilityService)),
|
|
123
124
|
( __param(10, ILanguageConfigurationService)),
|
|
124
|
-
( __param(11, ILanguageFeaturesService))
|
|
125
|
+
( __param(11, ILanguageFeaturesService)),
|
|
126
|
+
( __param(12, IKeybindingService))
|
|
125
127
|
], SimpleCommentEditor));
|
|
126
128
|
function calculateEditorHeight(parentEditor, editor, currentHeight) {
|
|
127
129
|
const layoutInfo = editor.getLayoutInfo();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
-
import { clearNode, reset, addDisposableListener } from '../../../../base/browser/dom.js';
|
|
3
|
+
import { createElement, clearNode, reset, addDisposableListener } from '../../../../base/browser/dom.js';
|
|
4
4
|
import { CancellationTokenSource } from '../../../../base/common/cancellation.js';
|
|
5
5
|
import { KeyCode } from '../../../../base/common/keyCodes.js';
|
|
6
6
|
import { DisposableStore } from '../../../../base/common/lifecycle.js';
|
|
@@ -35,7 +35,7 @@ let InlayHintsAccessibility = class InlayHintsAccessibility {
|
|
|
35
35
|
this._accessibilitySignalService = _accessibilitySignalService;
|
|
36
36
|
this._instaService = _instaService;
|
|
37
37
|
this._sessionDispoosables = ( new DisposableStore());
|
|
38
|
-
this._ariaElement =
|
|
38
|
+
this._ariaElement = createElement('span');
|
|
39
39
|
this._ariaElement.style.position = 'fixed';
|
|
40
40
|
this._ariaElement.className = 'inlayhint-accessibility-element';
|
|
41
41
|
this._ariaElement.tabIndex = 0;
|
|
@@ -84,7 +84,7 @@ let InlayHintsAccessibility = class InlayHintsAccessibility {
|
|
|
84
84
|
tooLongToRead = true;
|
|
85
85
|
break;
|
|
86
86
|
}
|
|
87
|
-
const em =
|
|
87
|
+
const em = createElement('em');
|
|
88
88
|
const { label } = item.hint;
|
|
89
89
|
if (typeof label === 'string') {
|
|
90
90
|
em.innerText = label;
|