@codingame/monaco-vscode-api 19.0.2 → 19.1.1
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '../../../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
-
import { addDisposableListener, $ } from '../../../../../../base/browser/dom.js';
|
|
3
|
+
import { createElement, addDisposableListener, $ } from '../../../../../../base/browser/dom.js';
|
|
4
4
|
import { ArrayQueue } from '../../../../../../base/common/arrays.js';
|
|
5
5
|
import { RunOnceScheduler } from '../../../../../../base/common/async.js';
|
|
6
6
|
import { Codicon } from '../../../../../../base/common/codicons.js';
|
|
@@ -91,7 +91,7 @@ let DiffEditorViewZones = class DiffEditorViewZones extends Disposable {
|
|
|
91
91
|
return computeRangeAlignment(this._editors.original, this._editors.modified, mappings, this._origViewZonesToIgnore, this._modViewZonesToIgnore, true);
|
|
92
92
|
});
|
|
93
93
|
function createFakeLinesDiv() {
|
|
94
|
-
const r =
|
|
94
|
+
const r = createElement('div');
|
|
95
95
|
r.className = 'diagonal-fill';
|
|
96
96
|
return r;
|
|
97
97
|
}
|
|
@@ -105,7 +105,7 @@ let DiffEditorViewZones = class DiffEditorViewZones extends Disposable {
|
|
|
105
105
|
if (modifiedTopPaddingVal > 0) {
|
|
106
106
|
modViewZones.push({
|
|
107
107
|
afterLineNumber: 0,
|
|
108
|
-
domNode:
|
|
108
|
+
domNode: createElement('div'),
|
|
109
109
|
heightInPx: modifiedTopPaddingVal,
|
|
110
110
|
showInHiddenAreas: true,
|
|
111
111
|
suppressMouseDown: true,
|
|
@@ -115,7 +115,7 @@ let DiffEditorViewZones = class DiffEditorViewZones extends Disposable {
|
|
|
115
115
|
if (originalTopPaddingVal > 0) {
|
|
116
116
|
origViewZones.push({
|
|
117
117
|
afterLineNumber: 0,
|
|
118
|
-
domNode:
|
|
118
|
+
domNode: createElement('div'),
|
|
119
119
|
heightInPx: originalTopPaddingVal,
|
|
120
120
|
showInHiddenAreas: true,
|
|
121
121
|
suppressMouseDown: true,
|
|
@@ -147,7 +147,7 @@ let DiffEditorViewZones = class DiffEditorViewZones extends Disposable {
|
|
|
147
147
|
if (a.diff && !renderSideBySide && (!this._options.useTrueInlineDiffRendering.read(reader) || !allowsTrueInlineDiffRendering(a.diff))) {
|
|
148
148
|
if (!a.originalRange.isEmpty) {
|
|
149
149
|
originalModelTokenizationCompleted.read(reader);
|
|
150
|
-
const deletedCodeDomNode =
|
|
150
|
+
const deletedCodeDomNode = createElement('div');
|
|
151
151
|
deletedCodeDomNode.classList.add('view-lines', 'line-delete', 'monaco-mouse-cursor-text');
|
|
152
152
|
const originalModel = this._editors.original.getModel();
|
|
153
153
|
if (a.originalRange.endLineNumberExclusive - 1 > originalModel.getLineCount()) {
|
|
@@ -168,12 +168,12 @@ let DiffEditorViewZones = class DiffEditorViewZones extends Disposable {
|
|
|
168
168
|
)));
|
|
169
169
|
}
|
|
170
170
|
const result = renderLines(source, renderOptions, decorations, deletedCodeDomNode);
|
|
171
|
-
const marginDomNode =
|
|
171
|
+
const marginDomNode = createElement('div');
|
|
172
172
|
marginDomNode.className = 'inline-deleted-margin-view-zone';
|
|
173
173
|
applyFontInfo(marginDomNode, renderOptions.fontInfo);
|
|
174
174
|
if (this._options.renderIndicators.read(reader)) {
|
|
175
175
|
for (let i = 0; i < result.heightInLines; i++) {
|
|
176
|
-
const marginElement =
|
|
176
|
+
const marginElement = createElement('div');
|
|
177
177
|
marginElement.className = `delete-sign ${ThemeIcon.asClassName(diffRemoveIcon)}`;
|
|
178
178
|
marginElement.setAttribute('style', `position:absolute;top:${i * modLineHeight}px;width:${renderOptions.lineDecorationsWidth}px;height:${modLineHeight}px;right:0;`);
|
|
179
179
|
marginDomNode.appendChild(marginElement);
|
|
@@ -214,7 +214,7 @@ let DiffEditorViewZones = class DiffEditorViewZones extends Disposable {
|
|
|
214
214
|
suppressMouseDown: true,
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
|
-
const marginDomNode =
|
|
217
|
+
const marginDomNode = createElement('div');
|
|
218
218
|
marginDomNode.className = 'gutter-delete';
|
|
219
219
|
origViewZones.push({
|
|
220
220
|
afterLineNumber: a.originalRange.endLineNumberExclusive - 1,
|
|
@@ -244,7 +244,7 @@ let DiffEditorViewZones = class DiffEditorViewZones extends Disposable {
|
|
|
244
244
|
continue;
|
|
245
245
|
}
|
|
246
246
|
function createViewZoneMarginArrow() {
|
|
247
|
-
const arrow =
|
|
247
|
+
const arrow = createElement('div');
|
|
248
248
|
arrow.className = 'arrow-revert-change ' + ThemeIcon.asClassName(Codicon.arrowRight);
|
|
249
249
|
reader.store.add(addDisposableListener(arrow, 'mousedown', e => e.stopPropagation()));
|
|
250
250
|
reader.store.add(addDisposableListener(arrow, 'click', e => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { addStandardDisposableListener, getDomNodePagePosition } from '../../../../../../base/browser/dom.js';
|
|
2
|
+
import { createElement, addStandardDisposableListener, getDomNodePagePosition } from '../../../../../../base/browser/dom.js';
|
|
3
3
|
import { Action } from '../../../../../../base/common/actions.js';
|
|
4
4
|
import { Codicon } from '../../../../../../base/common/codicons.js';
|
|
5
5
|
import { Disposable } from '../../../../../../base/common/lifecycle.js';
|
|
@@ -33,7 +33,7 @@ class InlineDiffDeletedCodeMargin extends Disposable {
|
|
|
33
33
|
this._clipboardService = _clipboardService;
|
|
34
34
|
this._visibility = false;
|
|
35
35
|
this._marginDomNode.style.zIndex = '10';
|
|
36
|
-
this._diffActions =
|
|
36
|
+
this._diffActions = createElement('div');
|
|
37
37
|
this._diffActions.className = ThemeIcon.asClassName(Codicon.lightBulb) + ' lightbulb-glyph';
|
|
38
38
|
this._diffActions.style.position = 'absolute';
|
|
39
39
|
const lineHeight = this._modifiedEditor.getOption(EditorOption.lineHeight);
|
|
@@ -4,6 +4,7 @@ import { ITransaction } from "../../../../base/common/observable.js";
|
|
|
4
4
|
import { IAccessibilitySignalService } from "../../../../platform/accessibilitySignal/browser/accessibilitySignalService.service.js";
|
|
5
5
|
import { IContextKeyService } from "../../../../platform/contextkey/common/contextkey.service.js";
|
|
6
6
|
import { IInstantiationService } from "../../../../platform/instantiation/common/instantiation.js";
|
|
7
|
+
import { IKeybindingService } from "../../../../platform/keybinding/common/keybinding.service.js";
|
|
7
8
|
import { IEditorProgressService } from "../../../../platform/progress/common/progress.service.js";
|
|
8
9
|
import { IDiffEditorOptions } from "../../../common/config/editorOptions.js";
|
|
9
10
|
import { IDimension } from "../../../common/core/2d/dimension.js";
|
|
@@ -29,6 +30,7 @@ export declare class DiffEditorWidget extends DelegatingEditor implements IDiffE
|
|
|
29
30
|
private readonly _parentInstantiationService;
|
|
30
31
|
private readonly _accessibilitySignalService;
|
|
31
32
|
private readonly _editorProgressService;
|
|
33
|
+
private readonly keybindingService;
|
|
32
34
|
static ENTIRE_DIFF_OVERVIEW_WIDTH: number;
|
|
33
35
|
private readonly elements;
|
|
34
36
|
private readonly _diffModelSrc;
|
|
@@ -50,7 +52,7 @@ export declare class DiffEditorWidget extends DelegatingEditor implements IDiffE
|
|
|
50
52
|
private readonly _movedBlocksLinesPart;
|
|
51
53
|
private readonly _gutter;
|
|
52
54
|
get collapseUnchangedRegions(): boolean;
|
|
53
|
-
constructor(_domElement: HTMLElement, options: Readonly<IDiffEditorConstructionOptions>, codeEditorWidgetOptions: IDiffCodeEditorWidgetOptions, _parentContextKeyService: IContextKeyService, _parentInstantiationService: IInstantiationService, codeEditorService: ICodeEditorService, _accessibilitySignalService: IAccessibilitySignalService, _editorProgressService: IEditorProgressService);
|
|
55
|
+
constructor(_domElement: HTMLElement, options: Readonly<IDiffEditorConstructionOptions>, codeEditorWidgetOptions: IDiffCodeEditorWidgetOptions, _parentContextKeyService: IContextKeyService, _parentInstantiationService: IInstantiationService, codeEditorService: ICodeEditorService, _accessibilitySignalService: IAccessibilitySignalService, _editorProgressService: IEditorProgressService, keybindingService: IKeybindingService);
|
|
54
56
|
getViewWidth(): number;
|
|
55
57
|
getContentHeight(): number;
|
|
56
58
|
protected _createInnerEditor(instantiationService: IInstantiationService, container: HTMLElement, options: Readonly<IEditorConstructionOptions>, editorWidgetOptions: ICodeEditorWidgetOptions): CodeEditorWidget;
|
|
@@ -13,6 +13,7 @@ import { IAccessibilitySignalService } from '../../../../platform/accessibilityS
|
|
|
13
13
|
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
|
|
14
14
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
15
15
|
import { ServiceCollection } from '../../../../platform/instantiation/common/serviceCollection.js';
|
|
16
|
+
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.service.js';
|
|
16
17
|
import { bindContextKey } from '../../../../platform/observable/common/platformObservableUtils.js';
|
|
17
18
|
import { IEditorProgressService } from '../../../../platform/progress/common/progress.service.js';
|
|
18
19
|
import { Position } from '../../../common/core/position.js';
|
|
@@ -51,13 +52,14 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
|
51
52
|
static { this.ENTIRE_DIFF_OVERVIEW_WIDTH = OverviewRulerFeature.ENTIRE_DIFF_OVERVIEW_WIDTH; }
|
|
52
53
|
get onDidContentSizeChange() { return this._editors.onDidContentSizeChange; }
|
|
53
54
|
get collapseUnchangedRegions() { return this._options.hideUnchangedRegions.get(); }
|
|
54
|
-
constructor(_domElement, options, codeEditorWidgetOptions, _parentContextKeyService, _parentInstantiationService, codeEditorService, _accessibilitySignalService, _editorProgressService) {
|
|
55
|
+
constructor(_domElement, options, codeEditorWidgetOptions, _parentContextKeyService, _parentInstantiationService, codeEditorService, _accessibilitySignalService, _editorProgressService, keybindingService) {
|
|
55
56
|
super();
|
|
56
57
|
this._domElement = _domElement;
|
|
57
58
|
this._parentContextKeyService = _parentContextKeyService;
|
|
58
59
|
this._parentInstantiationService = _parentInstantiationService;
|
|
59
60
|
this._accessibilitySignalService = _accessibilitySignalService;
|
|
60
61
|
this._editorProgressService = _editorProgressService;
|
|
62
|
+
this.keybindingService = keybindingService;
|
|
61
63
|
this.elements = h('div.monaco-diff-editor.side-by-side', { style: { position: 'relative', height: '100%' } }, [
|
|
62
64
|
h('div.editor.original@original', { style: { position: 'absolute', height: '100%', } }),
|
|
63
65
|
h('div.editor.modified@modified', { style: { position: 'absolute', height: '100%', } }),
|
|
@@ -244,6 +246,7 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
|
|
|
244
246
|
this._register(autorun(reader => {
|
|
245
247
|
this._options.setModel(this._diffModel.read(reader));
|
|
246
248
|
}));
|
|
249
|
+
this._register(this.keybindingService.registerContainer(this.getContainerDomNode()));
|
|
247
250
|
}
|
|
248
251
|
getViewWidth() {
|
|
249
252
|
return this._rootSizeObserver.width.get();
|
|
@@ -516,7 +519,8 @@ DiffEditorWidget = ( __decorate([
|
|
|
516
519
|
( __param(4, IInstantiationService)),
|
|
517
520
|
( __param(5, ICodeEditorService)),
|
|
518
521
|
( __param(6, IAccessibilitySignalService)),
|
|
519
|
-
( __param(7, IEditorProgressService))
|
|
522
|
+
( __param(7, IEditorProgressService)),
|
|
523
|
+
( __param(8, IKeybindingService))
|
|
520
524
|
], DiffEditorWidget));
|
|
521
525
|
function toLineChanges(state) {
|
|
522
526
|
return ( state.mappings.map(x => {
|
|
@@ -6,10 +6,11 @@ import { IAccessibilitySignalService } from "../../../../platform/accessibilityS
|
|
|
6
6
|
import { IContextKeyService } from "../../../../platform/contextkey/common/contextkey.service.js";
|
|
7
7
|
import { IInstantiationService } from "../../../../platform/instantiation/common/instantiation.js";
|
|
8
8
|
import { IEditorProgressService } from "../../../../platform/progress/common/progress.service.js";
|
|
9
|
+
import { IKeybindingService } from "../../../../platform/keybinding/common/keybinding.service.js";
|
|
9
10
|
export declare class EmbeddedDiffEditorWidget extends DiffEditorWidget {
|
|
10
11
|
private readonly _parentEditor;
|
|
11
12
|
private readonly _overwriteOptions;
|
|
12
|
-
constructor(domElement: HTMLElement, options: Readonly<IDiffEditorConstructionOptions>, codeEditorWidgetOptions: IDiffCodeEditorWidgetOptions, parentEditor: ICodeEditor, contextKeyService: IContextKeyService, instantiationService: IInstantiationService, codeEditorService: ICodeEditorService, accessibilitySignalService: IAccessibilitySignalService, editorProgressService: IEditorProgressService);
|
|
13
|
+
constructor(domElement: HTMLElement, options: Readonly<IDiffEditorConstructionOptions>, codeEditorWidgetOptions: IDiffCodeEditorWidgetOptions, parentEditor: ICodeEditor, contextKeyService: IContextKeyService, instantiationService: IInstantiationService, codeEditorService: ICodeEditorService, accessibilitySignalService: IAccessibilitySignalService, editorProgressService: IEditorProgressService, keybindingService: IKeybindingService);
|
|
13
14
|
getParentEditor(): ICodeEditor;
|
|
14
15
|
private _onParentConfigurationChanged;
|
|
15
16
|
updateOptions(newOptions: IEditorOptions): void;
|
|
@@ -7,10 +7,11 @@ import { IAccessibilitySignalService } from '../../../../platform/accessibilityS
|
|
|
7
7
|
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
|
|
8
8
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
9
9
|
import { IEditorProgressService } from '../../../../platform/progress/common/progress.service.js';
|
|
10
|
+
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.service.js';
|
|
10
11
|
|
|
11
12
|
let EmbeddedDiffEditorWidget = class EmbeddedDiffEditorWidget extends DiffEditorWidget {
|
|
12
|
-
constructor(domElement, options, codeEditorWidgetOptions, parentEditor, contextKeyService, instantiationService, codeEditorService, accessibilitySignalService, editorProgressService) {
|
|
13
|
-
super(domElement, parentEditor.getRawOptions(), codeEditorWidgetOptions, contextKeyService, instantiationService, codeEditorService, accessibilitySignalService, editorProgressService);
|
|
13
|
+
constructor(domElement, options, codeEditorWidgetOptions, parentEditor, contextKeyService, instantiationService, codeEditorService, accessibilitySignalService, editorProgressService, keybindingService) {
|
|
14
|
+
super(domElement, parentEditor.getRawOptions(), codeEditorWidgetOptions, contextKeyService, instantiationService, codeEditorService, accessibilitySignalService, editorProgressService, keybindingService);
|
|
14
15
|
this._parentEditor = parentEditor;
|
|
15
16
|
this._overwriteOptions = options;
|
|
16
17
|
super.updateOptions(this._overwriteOptions);
|
|
@@ -33,7 +34,8 @@ EmbeddedDiffEditorWidget = ( __decorate([
|
|
|
33
34
|
( __param(5, IInstantiationService)),
|
|
34
35
|
( __param(6, ICodeEditorService)),
|
|
35
36
|
( __param(7, IAccessibilitySignalService)),
|
|
36
|
-
( __param(8, IEditorProgressService))
|
|
37
|
+
( __param(8, IEditorProgressService)),
|
|
38
|
+
( __param(9, IKeybindingService))
|
|
37
39
|
], EmbeddedDiffEditorWidget));
|
|
38
40
|
|
|
39
41
|
export { EmbeddedDiffEditorWidget };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { h } from '../../../../../base/browser/dom.js';
|
|
2
|
+
import { createElementNS, h } from '../../../../../base/browser/dom.js';
|
|
3
3
|
import { ActionBar } from '../../../../../base/browser/ui/actionbar/actionbar.js';
|
|
4
4
|
import { Action } from '../../../../../base/common/actions.js';
|
|
5
5
|
import { tieBreakComparators, compareBy, booleanComparator, numberComparator } from '../../../../../base/common/arrays.js';
|
|
@@ -82,19 +82,19 @@ class MovedBlocksLinesFeature extends Disposable {
|
|
|
82
82
|
const right = width;
|
|
83
83
|
const rectWidth = infoMod.glyphMarginWidth + infoMod.lineNumbersWidth;
|
|
84
84
|
const rectHeight = 18;
|
|
85
|
-
const rect =
|
|
85
|
+
const rect = createElementNS('http://www.w3.org/2000/svg', 'rect');
|
|
86
86
|
rect.classList.add('arrow-rectangle');
|
|
87
87
|
rect.setAttribute('x', `${right - rectWidth}`);
|
|
88
88
|
rect.setAttribute('y', `${line.to - rectHeight / 2}`);
|
|
89
89
|
rect.setAttribute('width', `${rectWidth}`);
|
|
90
90
|
rect.setAttribute('height', `${rectHeight}`);
|
|
91
91
|
this._element.appendChild(rect);
|
|
92
|
-
const g =
|
|
93
|
-
const path =
|
|
92
|
+
const g = createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
93
|
+
const path = createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
94
94
|
path.setAttribute('d', `M ${0} ${line.from} L ${verticalY} ${line.from} L ${verticalY} ${line.to} L ${right - arrowWidth} ${line.to}`);
|
|
95
95
|
path.setAttribute('fill', 'none');
|
|
96
96
|
g.appendChild(path);
|
|
97
|
-
const arrowRight =
|
|
97
|
+
const arrowRight = createElementNS('http://www.w3.org/2000/svg', 'polygon');
|
|
98
98
|
arrowRight.classList.add('arrow');
|
|
99
99
|
reader.store.add(autorun(reader => {
|
|
100
100
|
path.classList.toggle('currentMove', line.move === model.activeMovedText.read(reader));
|
|
@@ -107,7 +107,7 @@ class MovedBlocksLinesFeature extends Disposable {
|
|
|
107
107
|
}
|
|
108
108
|
this.width.set(lineAreaWidth, undefined);
|
|
109
109
|
});
|
|
110
|
-
this._element =
|
|
110
|
+
this._element = createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
111
111
|
this._element.setAttribute('class', 'moved-blocks-lines');
|
|
112
112
|
this._rootElement.appendChild(this._element);
|
|
113
113
|
this._register(toDisposable(() => this._element.remove()));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
3
|
-
import { h, addStandardDisposableListener, EventType, addDisposableListener } from '../../../../../base/browser/dom.js';
|
|
3
|
+
import { createElement, h, addStandardDisposableListener, EventType, addDisposableListener } from '../../../../../base/browser/dom.js';
|
|
4
4
|
import { createFastDomNode } from '../../../../../base/browser/fastDomNode.js';
|
|
5
5
|
import { ScrollbarState } from '../../../../../base/browser/ui/scrollbar/scrollbarState.js';
|
|
6
6
|
import { Disposable } from '../../../../../base/common/lifecycle.js';
|
|
@@ -48,7 +48,7 @@ let OverviewRulerFeature = class OverviewRulerFeature extends Disposable {
|
|
|
48
48
|
const removeColor = theme.getColor(diffOverviewRulerRemoved) || ( (theme.getColor(diffRemoved) || defaultRemoveColor).transparent(2));
|
|
49
49
|
return { insertColor, removeColor };
|
|
50
50
|
});
|
|
51
|
-
const viewportDomElement = createFastDomNode(
|
|
51
|
+
const viewportDomElement = createFastDomNode(createElement('div'));
|
|
52
52
|
viewportDomElement.setClassName('diffViewport');
|
|
53
53
|
viewportDomElement.setPosition('absolute');
|
|
54
54
|
const diffOverviewRoot = h('div.diffOverview', {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { h, reset } from '../../../../../base/browser/dom.js';
|
|
2
|
+
import { h, reset, createElement } from '../../../../../base/browser/dom.js';
|
|
3
3
|
import { Disposable, toDisposable } from '../../../../../base/common/lifecycle.js';
|
|
4
4
|
import '../../../../../base/common/observableInternal/index.js';
|
|
5
5
|
import { LineRange } from '../../../../common/core/ranges/lineRange.js';
|
|
@@ -66,7 +66,7 @@ class EditorGutter extends Disposable {
|
|
|
66
66
|
unusedIds.delete(gutterItem.id);
|
|
67
67
|
let view = this.views.get(gutterItem.id);
|
|
68
68
|
if (!view) {
|
|
69
|
-
const viewDomNode =
|
|
69
|
+
const viewDomNode = createElement('div');
|
|
70
70
|
this._domNode.appendChild(viewDomNode);
|
|
71
71
|
const gutterItemObs = observableValue('item', gutterItem);
|
|
72
72
|
const itemView = this.itemProvider.createView(gutterItemObs, viewDomNode);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
|
|
2
|
+
import { createElement } from '../../../../base/browser/dom.js';
|
|
2
3
|
import { findLast } from '../../../../base/common/arraysFind.js';
|
|
3
4
|
import { CancellationTokenSource } from '../../../../base/common/cancellation.js';
|
|
4
5
|
import { DisposableStore, toDisposable, Disposable } from '../../../../base/common/lifecycle.js';
|
|
@@ -163,7 +164,7 @@ class PlaceholderViewZone {
|
|
|
163
164
|
constructor(_afterLineNumber, heightInPx) {
|
|
164
165
|
this._afterLineNumber = _afterLineNumber;
|
|
165
166
|
this.heightInPx = heightInPx;
|
|
166
|
-
this.domNode =
|
|
167
|
+
this.domNode = createElement('div');
|
|
167
168
|
this._actualTop = observableValue(this, undefined);
|
|
168
169
|
this._actualHeight = observableValue(this, undefined);
|
|
169
170
|
this.actualTop = this._actualTop;
|
|
@@ -1,6 +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 { createElement } from '../../../../../base/browser/dom.js';
|
|
4
5
|
import { renderMarkdown } from '../../../../../base/browser/markdownRenderer.js';
|
|
5
6
|
import { createTrustedTypesPolicy } from '../../../../../base/browser/trustedTypes.js';
|
|
6
7
|
import { onUnexpectedError } from '../../../../../base/common/errors.js';
|
|
@@ -29,7 +30,7 @@ let MarkdownRenderer = class MarkdownRenderer {
|
|
|
29
30
|
}
|
|
30
31
|
render(markdown, options, markedOptions) {
|
|
31
32
|
if (!markdown) {
|
|
32
|
-
const element =
|
|
33
|
+
const element = createElement('span');
|
|
33
34
|
return { element, dispose: () => { } };
|
|
34
35
|
}
|
|
35
36
|
const disposables = ( new DisposableStore());
|
|
@@ -54,7 +55,7 @@ let MarkdownRenderer = class MarkdownRenderer {
|
|
|
54
55
|
languageId = PLAINTEXT_LANGUAGE_ID;
|
|
55
56
|
}
|
|
56
57
|
const html = await tokenizeToString(this._languageService, value, languageId);
|
|
57
|
-
const element =
|
|
58
|
+
const element = createElement('span');
|
|
58
59
|
element.innerHTML = (MarkdownRenderer_1._ttpTokenizer?.createHTML(html) ?? html);
|
|
59
60
|
if (this._options.editor) {
|
|
60
61
|
const fontInfo = this._options.editor.getOption(EditorOption.fontInfo);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
|
-
import { $, reset } from '../../../../base/browser/dom.js';
|
|
3
|
+
import { createElement, $, reset } from '../../../../base/browser/dom.js';
|
|
4
4
|
import { renderLabelWithIcons } from '../../../../base/browser/ui/iconLabel/iconLabels.js';
|
|
5
5
|
import { Constants } from '../../../../base/common/uint.js';
|
|
6
6
|
import * as codelensWidget from './codelensWidget.css';
|
|
@@ -16,7 +16,7 @@ class CodeLensViewZone {
|
|
|
16
16
|
this.heightInPx = heightInPx;
|
|
17
17
|
this._onHeight = onHeight;
|
|
18
18
|
this.suppressMouseDown = true;
|
|
19
|
-
this.domNode =
|
|
19
|
+
this.domNode = createElement('div');
|
|
20
20
|
}
|
|
21
21
|
onComputedHeight(height) {
|
|
22
22
|
if (this._lastHeight === undefined) {
|
|
@@ -42,7 +42,7 @@ class CodeLensContentWidget {
|
|
|
42
42
|
this._editor = editor;
|
|
43
43
|
this._id = `codelens.widget-${(CodeLensContentWidget._idPool++)}`;
|
|
44
44
|
this.updatePosition(line);
|
|
45
|
-
this._domNode =
|
|
45
|
+
this._domNode = createElement('span');
|
|
46
46
|
this._domNode.className = `codelens-decoration`;
|
|
47
47
|
}
|
|
48
48
|
withCommands(lenses, animate) {
|
package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
3
|
import * as colorPicker from '../colorPicker.css';
|
|
4
|
-
import { $ as $$1, append, addDisposableListener, EventType } from '../../../../../base/browser/dom.js';
|
|
4
|
+
import { $ as $$1, createElement, append, addDisposableListener, EventType } from '../../../../../base/browser/dom.js';
|
|
5
5
|
import { Disposable } from '../../../../../base/common/lifecycle.js';
|
|
6
6
|
import { localize } from '../../../../../nls.js';
|
|
7
7
|
import { Emitter } from '../../../../../base/common/event.js';
|
|
@@ -16,10 +16,10 @@ class CloseButton extends Disposable {
|
|
|
16
16
|
super();
|
|
17
17
|
this._onClicked = this._register(( new Emitter()));
|
|
18
18
|
this.onClicked = this._onClicked.event;
|
|
19
|
-
this._button =
|
|
19
|
+
this._button = createElement('div');
|
|
20
20
|
this._button.classList.add('close-button');
|
|
21
21
|
append(container, this._button);
|
|
22
|
-
const innerDiv =
|
|
22
|
+
const innerDiv = createElement('div');
|
|
23
23
|
innerDiv.classList.add('close-button-inner-div');
|
|
24
24
|
append(this._button, innerDiv);
|
|
25
25
|
const closeButton = append(innerDiv, $('.button' + ThemeIcon.asCSSSelector(registerIcon('color-picker-close', Codicon.close, ( localize(962, 'Icon to close the color picker'))))));
|
package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
3
|
import * as colorPicker from '../colorPicker.css';
|
|
4
|
-
import { $ as $$1, append, addDisposableListener, EventType } from '../../../../../base/browser/dom.js';
|
|
4
|
+
import { $ as $$1, append, createElement, addDisposableListener, EventType } from '../../../../../base/browser/dom.js';
|
|
5
5
|
import { Color } from '../../../../../base/common/color.js';
|
|
6
6
|
import { Disposable } from '../../../../../base/common/lifecycle.js';
|
|
7
7
|
import { localize } from '../../../../../nls.js';
|
|
@@ -31,7 +31,7 @@ class ColorPickerHeader extends Disposable {
|
|
|
31
31
|
append(container, this._domNode);
|
|
32
32
|
this._pickedColorNode = append(this._domNode, $('.picked-color'));
|
|
33
33
|
append(this._pickedColorNode, $('span.codicon.codicon-color-mode'));
|
|
34
|
-
this._pickedColorPresentation = append(this._pickedColorNode,
|
|
34
|
+
this._pickedColorPresentation = append(this._pickedColorNode, createElement('span'));
|
|
35
35
|
this._pickedColorPresentation.classList.add('picked-color-presentation');
|
|
36
36
|
const tooltip = ( localize(963, "Click to toggle color options (rgb/hsl/hex)"));
|
|
37
37
|
this._pickedColorNode.setAttribute('title', tooltip);
|
package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerInsertButton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
3
|
import * as colorPicker from '../colorPicker.css';
|
|
4
|
-
import { append, addDisposableListener, EventType } from '../../../../../base/browser/dom.js';
|
|
4
|
+
import { append, createElement, addDisposableListener, EventType } from '../../../../../base/browser/dom.js';
|
|
5
5
|
import { Emitter } from '../../../../../base/common/event.js';
|
|
6
6
|
import { Disposable } from '../../../../../base/common/lifecycle.js';
|
|
7
7
|
|
|
@@ -11,7 +11,7 @@ class InsertButton extends Disposable {
|
|
|
11
11
|
super();
|
|
12
12
|
this._onClicked = this._register(( new Emitter()));
|
|
13
13
|
this.onClicked = this._onClicked.event;
|
|
14
|
-
this._button = append(container,
|
|
14
|
+
this._button = append(container, createElement('button'));
|
|
15
15
|
this._button.classList.add('insert-button');
|
|
16
16
|
this._button.textContent = 'Insert';
|
|
17
17
|
this._register(addDisposableListener(this._button, EventType.CLICK, () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
3
|
import * as colorPicker from '../colorPicker.css';
|
|
4
|
-
import { $ as $$1, append, addDisposableListener, EventType, getDomNodePagePosition } from '../../../../../base/browser/dom.js';
|
|
4
|
+
import { $ as $$1, append, createElement, addDisposableListener, EventType, isElement, getDomNodePagePosition } from '../../../../../base/browser/dom.js';
|
|
5
5
|
import { GlobalPointerMoveMonitor } from '../../../../../base/browser/globalPointerMoveMonitor.js';
|
|
6
6
|
import { Color, HSVA } from '../../../../../base/common/color.js';
|
|
7
7
|
import { Emitter } from '../../../../../base/common/event.js';
|
|
@@ -20,7 +20,7 @@ class SaturationBox extends Disposable {
|
|
|
20
20
|
this.onColorFlushed = this._onColorFlushed.event;
|
|
21
21
|
this._domNode = $('.saturation-wrap');
|
|
22
22
|
append(container, this._domNode);
|
|
23
|
-
this._canvas =
|
|
23
|
+
this._canvas = createElement('canvas');
|
|
24
24
|
this._canvas.className = 'saturation-box';
|
|
25
25
|
append(this._domNode, this._canvas);
|
|
26
26
|
this.selection = $('.saturation-selection');
|
|
@@ -37,7 +37,7 @@ class SaturationBox extends Disposable {
|
|
|
37
37
|
return this._canvas;
|
|
38
38
|
}
|
|
39
39
|
onPointerDown(e) {
|
|
40
|
-
if (!e.target || !(e.target
|
|
40
|
+
if (!e.target || !isElement(e.target)) {
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
this.monitor = this._register(( new GlobalPointerMoveMonitor()));
|
package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerStrip.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
3
|
import * as colorPicker from '../colorPicker.css';
|
|
4
|
-
import { $ as $$1, append, addDisposableListener, EventType, getDomNodePagePosition } from '../../../../../base/browser/dom.js';
|
|
4
|
+
import { $ as $$1, append, addDisposableListener, EventType, isElement, getDomNodePagePosition } from '../../../../../base/browser/dom.js';
|
|
5
5
|
import { GlobalPointerMoveMonitor } from '../../../../../base/browser/globalPointerMoveMonitor.js';
|
|
6
6
|
import { Color, RGBA } from '../../../../../base/common/color.js';
|
|
7
7
|
import { Emitter } from '../../../../../base/common/event.js';
|
|
@@ -42,7 +42,7 @@ class Strip extends Disposable {
|
|
|
42
42
|
this.updateSliderPosition(value);
|
|
43
43
|
}
|
|
44
44
|
onPointerDown(e) {
|
|
45
|
-
if (!e.target || !(e.target
|
|
45
|
+
if (!e.target || !isElement(e.target)) {
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
48
|
const monitor = this._register(( new GlobalPointerMoveMonitor()));
|
|
@@ -14,7 +14,7 @@ import { ILanguageFeaturesService } from '../../../../common/services/languageFe
|
|
|
14
14
|
import { DefaultDocumentColorProvider } from '../defaultDocumentColorProvider.js';
|
|
15
15
|
import { IEditorWorkerService } from '../../../../common/services/editorWorker.service.js';
|
|
16
16
|
import { StandaloneColorPickerParticipant } from './standaloneColorPickerParticipant.js';
|
|
17
|
-
import { trackFocus } from '../../../../../base/browser/dom.js';
|
|
17
|
+
import { createElement, trackFocus } from '../../../../../base/browser/dom.js';
|
|
18
18
|
import { IHoverService } from '../../../../../platform/hover/browser/hover.service.js';
|
|
19
19
|
|
|
20
20
|
var StandaloneColorPickerWidget_1;
|
|
@@ -41,7 +41,7 @@ let StandaloneColorPickerWidget = class StandaloneColorPickerWidget extends Disp
|
|
|
41
41
|
this._hoverService = _hoverService;
|
|
42
42
|
this.allowEditorOverflow = true;
|
|
43
43
|
this._position = undefined;
|
|
44
|
-
this._body =
|
|
44
|
+
this._body = createElement('div');
|
|
45
45
|
this._colorHover = null;
|
|
46
46
|
this._selectionSetInEditor = false;
|
|
47
47
|
this._onResult = this._register(( new Emitter()));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
|
-
import { addDisposableListener, EventType } from '../../../../base/browser/dom.js';
|
|
3
|
+
import { createElement, addDisposableListener, EventType } from '../../../../base/browser/dom.js';
|
|
4
4
|
import * as findOptionsWidget from './findOptionsWidget.css';
|
|
5
5
|
import { CaseSensitiveToggle, WholeWordsToggle, RegexToggle } from '../../../../base/browser/ui/findinput/findInputToggles.js';
|
|
6
6
|
import { Widget } from '../../../../base/browser/ui/widget.js';
|
|
@@ -30,7 +30,7 @@ class FindOptionsWidget extends Widget {
|
|
|
30
30
|
this._editor = editor;
|
|
31
31
|
this._state = state;
|
|
32
32
|
this._keybindingService = keybindingService;
|
|
33
|
-
this._domNode =
|
|
33
|
+
this._domNode = createElement('div');
|
|
34
34
|
this._domNode.className = 'findOptionsWidget';
|
|
35
35
|
this._domNode.style.display = 'none';
|
|
36
36
|
this._domNode.style.top = '10px';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
|
-
import { trackFocus, getTotalWidth, getDomNodePagePosition, getTopLeftOffset, getComputedStyle } from '../../../../base/browser/dom.js';
|
|
3
|
+
import { createElement, trackFocus, getTotalWidth, getDomNodePagePosition, getTopLeftOffset, getComputedStyle } from '../../../../base/browser/dom.js';
|
|
4
4
|
import { alert } from '../../../../base/browser/ui/aria/aria.js';
|
|
5
5
|
import { Toggle } from '../../../../base/browser/ui/toggle/toggle.js';
|
|
6
6
|
import { Sash, Orientation } from '../../../../base/browser/ui/sash/sash.js';
|
|
@@ -78,7 +78,7 @@ class FindWidgetViewZone {
|
|
|
78
78
|
this.afterLineNumber = afterLineNumber;
|
|
79
79
|
this.heightInPx = FIND_INPUT_AREA_HEIGHT;
|
|
80
80
|
this.suppressMouseDown = false;
|
|
81
|
-
this.domNode =
|
|
81
|
+
this.domNode = createElement('div');
|
|
82
82
|
this.domNode.className = 'dock-find-viewzone';
|
|
83
83
|
}
|
|
84
84
|
}
|
|
@@ -801,7 +801,7 @@ class FindWidget extends Widget {
|
|
|
801
801
|
if (isLinux) {
|
|
802
802
|
this._register(this._findInput.onMouseDown((e) => this._onFindInputMouseDown(e)));
|
|
803
803
|
}
|
|
804
|
-
this._matchesCount =
|
|
804
|
+
this._matchesCount = createElement('div');
|
|
805
805
|
this._matchesCount.className = 'matchesCount';
|
|
806
806
|
this._updateMatchesCount();
|
|
807
807
|
const hoverDelegate = this._register(createInstantHoverDelegate());
|
|
@@ -821,10 +821,10 @@ class FindWidget extends Widget {
|
|
|
821
821
|
assertReturnsDefined(this._codeEditor.getAction(FIND_IDS.NextMatchFindAction)).run().then(undefined, onUnexpectedError);
|
|
822
822
|
}
|
|
823
823
|
}, this._hoverService)));
|
|
824
|
-
const findPart =
|
|
824
|
+
const findPart = createElement('div');
|
|
825
825
|
findPart.className = 'find-part';
|
|
826
826
|
findPart.appendChild(this._findInput.domNode);
|
|
827
|
-
const actionsContainer =
|
|
827
|
+
const actionsContainer = createElement('div');
|
|
828
828
|
actionsContainer.className = 'find-actions';
|
|
829
829
|
findPart.appendChild(actionsContainer);
|
|
830
830
|
actionsContainer.appendChild(this._matchesCount);
|
|
@@ -950,10 +950,10 @@ class FindWidget extends Widget {
|
|
|
950
950
|
this._controller.replaceAll();
|
|
951
951
|
}
|
|
952
952
|
}, this._hoverService)));
|
|
953
|
-
const replacePart =
|
|
953
|
+
const replacePart = createElement('div');
|
|
954
954
|
replacePart.className = 'replace-part';
|
|
955
955
|
replacePart.appendChild(this._replaceInput.domNode);
|
|
956
|
-
const replaceActionsContainer =
|
|
956
|
+
const replaceActionsContainer = createElement('div');
|
|
957
957
|
replaceActionsContainer.className = 'replace-actions';
|
|
958
958
|
replacePart.appendChild(replaceActionsContainer);
|
|
959
959
|
replaceActionsContainer.appendChild(this._replaceBtn.domNode);
|
|
@@ -971,7 +971,7 @@ class FindWidget extends Widget {
|
|
|
971
971
|
}
|
|
972
972
|
}, this._hoverService)));
|
|
973
973
|
this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);
|
|
974
|
-
this._domNode =
|
|
974
|
+
this._domNode = createElement('div');
|
|
975
975
|
this._domNode.className = 'editor-widget find-widget';
|
|
976
976
|
this._domNode.setAttribute('aria-hidden', 'true');
|
|
977
977
|
this._domNode.ariaLabel = NLS_FIND_DIALOG_LABEL;
|
|
@@ -1056,7 +1056,7 @@ class SimpleButton extends Widget {
|
|
|
1056
1056
|
if (this._opts.icon) {
|
|
1057
1057
|
className = className + ' ' + ThemeIcon.asClassName(this._opts.icon);
|
|
1058
1058
|
}
|
|
1059
|
-
this._domNode =
|
|
1059
|
+
this._domNode = createElement('div');
|
|
1060
1060
|
this._domNode.tabIndex = 0;
|
|
1061
1061
|
this._domNode.className = className;
|
|
1062
1062
|
this._domNode.setAttribute('role', 'button');
|