@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 { getWindow, runAtThisOrScheduleAtNextAnimationFrame, trackFocus } from '../../base/browser/dom.js';
|
|
3
|
+
import { createElement, getWindow, runAtThisOrScheduleAtNextAnimationFrame, trackFocus } from '../../base/browser/dom.js';
|
|
4
4
|
import { createFastDomNode } from '../../base/browser/fastDomNode.js';
|
|
5
5
|
import { inputLatency } from '../../base/browser/performance.js';
|
|
6
6
|
import { BugIndicatingError, onUnexpectedError } from '../../base/common/errors.js';
|
|
@@ -65,7 +65,7 @@ let View = class View extends ViewEventHandler {
|
|
|
65
65
|
}));
|
|
66
66
|
this._selections = [( new Selection(1, 1, 1, 1))];
|
|
67
67
|
this._renderAnimationFrame = null;
|
|
68
|
-
this._overflowGuardContainer = createFastDomNode(
|
|
68
|
+
this._overflowGuardContainer = createFastDomNode(createElement('div'));
|
|
69
69
|
PartFingerprints.write(this._overflowGuardContainer, PartFingerprint.OverflowGuard);
|
|
70
70
|
this._overflowGuardContainer.setClassName('overflow-guard');
|
|
71
71
|
this._viewController = ( new ViewController(configuration, model, userInputEvents, commandDelegate));
|
|
@@ -76,10 +76,10 @@ let View = class View extends ViewEventHandler {
|
|
|
76
76
|
this._accessibilitySupport = this._context.configuration.options.get(EditorOption.accessibilitySupport);
|
|
77
77
|
this._editContext = this._instantiateEditContext();
|
|
78
78
|
this._viewParts.push(this._editContext);
|
|
79
|
-
this._linesContent = createFastDomNode(
|
|
79
|
+
this._linesContent = createFastDomNode(createElement('div'));
|
|
80
80
|
this._linesContent.setClassName('lines-content' + ' monaco-editor-background');
|
|
81
81
|
this._linesContent.setPosition('absolute');
|
|
82
|
-
this.domNode = createFastDomNode(
|
|
82
|
+
this.domNode = createFastDomNode(createElement('div'));
|
|
83
83
|
this.domNode.setClassName(this._getEditorClassName());
|
|
84
84
|
this.domNode.setAttribute('role', 'code');
|
|
85
85
|
if (this._context.configuration.options.get(EditorOption.experimentalGpuAcceleration) === 'on') {
|
|
@@ -4,6 +4,7 @@ import { createFastDomNode } from '../../../../base/browser/fastDomNode.js';
|
|
|
4
4
|
import * as blockDecorations from './blockDecorations.css';
|
|
5
5
|
import { ViewPart } from '../../view/viewPart.js';
|
|
6
6
|
import { EditorOption } from '../../../common/config/editorOptions.js';
|
|
7
|
+
import { createElement } from '../../../../base/browser/dom.js';
|
|
7
8
|
|
|
8
9
|
registerCss(blockDecorations);
|
|
9
10
|
class BlockDecorations extends ViewPart {
|
|
@@ -12,7 +13,7 @@ class BlockDecorations extends ViewPart {
|
|
|
12
13
|
this.blocks = [];
|
|
13
14
|
this.contentWidth = -1;
|
|
14
15
|
this.contentLeft = 0;
|
|
15
|
-
this.domNode = createFastDomNode(
|
|
16
|
+
this.domNode = createFastDomNode(createElement('div'));
|
|
16
17
|
this.domNode.setAttribute('role', 'presentation');
|
|
17
18
|
this.domNode.setAttribute('aria-hidden', 'true');
|
|
18
19
|
this.domNode.setClassName('blockDecorations-container');
|
|
@@ -60,7 +61,7 @@ class BlockDecorations extends ViewPart {
|
|
|
60
61
|
}
|
|
61
62
|
let block = this.blocks[count];
|
|
62
63
|
if (!block) {
|
|
63
|
-
block = this.blocks[count] = createFastDomNode(
|
|
64
|
+
block = this.blocks[count] = createFastDomNode(createElement('div'));
|
|
64
65
|
this.domNode.appendChild(block);
|
|
65
66
|
}
|
|
66
67
|
let top;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { getDomNodePagePosition, getClientArea, getActiveElement } from '../../../../base/browser/dom.js';
|
|
2
|
+
import { createElement, getDomNodePagePosition, getClientArea, getActiveElement } from '../../../../base/browser/dom.js';
|
|
3
3
|
import { createFastDomNode } from '../../../../base/browser/fastDomNode.js';
|
|
4
4
|
import { ContentWidgetPositionPreference } from '../../editorBrowser.js';
|
|
5
5
|
import { ViewPart, PartFingerprints, PartFingerprint } from '../../view/viewPart.js';
|
|
@@ -11,12 +11,12 @@ class ViewContentWidgets extends ViewPart {
|
|
|
11
11
|
super(context);
|
|
12
12
|
this._viewDomNode = viewDomNode;
|
|
13
13
|
this._widgets = {};
|
|
14
|
-
this.domNode = createFastDomNode(
|
|
14
|
+
this.domNode = createFastDomNode(createElement('div'));
|
|
15
15
|
PartFingerprints.write(this.domNode, PartFingerprint.ContentWidgets);
|
|
16
16
|
this.domNode.setClassName('contentWidgets');
|
|
17
17
|
this.domNode.setPosition('absolute');
|
|
18
18
|
this.domNode.setTop(0);
|
|
19
|
-
this.overflowingContentWidgetsDomNode = createFastDomNode(
|
|
19
|
+
this.overflowingContentWidgetsDomNode = createFastDomNode(createElement('div'));
|
|
20
20
|
PartFingerprints.write(this.overflowingContentWidgetsDomNode, PartFingerprint.OverflowingContentWidgets);
|
|
21
21
|
this.overflowingContentWidgetsDomNode.setClassName('overflowingContentWidgets');
|
|
22
22
|
}
|
|
@@ -9,6 +9,7 @@ import { EditorOption } from '../../../common/config/editorOptions.js';
|
|
|
9
9
|
import { Position } from '../../../common/core/position.js';
|
|
10
10
|
import { Range } from '../../../common/core/range.js';
|
|
11
11
|
import { GlyphMarginLane } from '../../../common/model.js';
|
|
12
|
+
import { createElement } from '../../../../base/browser/dom.js';
|
|
12
13
|
|
|
13
14
|
registerCss(glyphMargin);
|
|
14
15
|
class DecorationToRender {
|
|
@@ -88,7 +89,7 @@ class GlyphMarginWidgets extends ViewPart {
|
|
|
88
89
|
this._context = context;
|
|
89
90
|
const options = this._context.configuration.options;
|
|
90
91
|
const layoutInfo = options.get(EditorOption.layoutInfo);
|
|
91
|
-
this.domNode = createFastDomNode(
|
|
92
|
+
this.domNode = createFastDomNode(createElement('div'));
|
|
92
93
|
this.domNode.setClassName('glyph-margin-widgets');
|
|
93
94
|
this.domNode.setPosition('absolute');
|
|
94
95
|
this.domNode.setTop(0);
|
|
@@ -311,7 +312,7 @@ class GlyphMarginWidgets extends ViewPart {
|
|
|
311
312
|
domNode = this._managedDomNodes[i];
|
|
312
313
|
}
|
|
313
314
|
else {
|
|
314
|
-
domNode = createFastDomNode(
|
|
315
|
+
domNode = createFastDomNode(createElement('div'));
|
|
315
316
|
this._managedDomNodes.push(domNode);
|
|
316
317
|
this.domNode.appendChild(domNode);
|
|
317
318
|
}
|
|
@@ -4,6 +4,7 @@ import * as margin from './margin.css';
|
|
|
4
4
|
import { createFastDomNode } from '../../../../base/browser/fastDomNode.js';
|
|
5
5
|
import { ViewPart } from '../../view/viewPart.js';
|
|
6
6
|
import { EditorOption } from '../../../common/config/editorOptions.js';
|
|
7
|
+
import { createElement } from '../../../../base/browser/dom.js';
|
|
7
8
|
|
|
8
9
|
registerCss(margin);
|
|
9
10
|
class Margin extends ViewPart {
|
|
@@ -17,12 +18,12 @@ class Margin extends ViewPart {
|
|
|
17
18
|
this._contentLeft = layoutInfo.contentLeft;
|
|
18
19
|
this._glyphMarginLeft = layoutInfo.glyphMarginLeft;
|
|
19
20
|
this._glyphMarginWidth = layoutInfo.glyphMarginWidth;
|
|
20
|
-
this._domNode = createFastDomNode(
|
|
21
|
+
this._domNode = createFastDomNode(createElement('div'));
|
|
21
22
|
this._domNode.setClassName(Margin.OUTER_CLASS_NAME);
|
|
22
23
|
this._domNode.setPosition('absolute');
|
|
23
24
|
this._domNode.setAttribute('role', 'presentation');
|
|
24
25
|
this._domNode.setAttribute('aria-hidden', 'true');
|
|
25
|
-
this._glyphMarginBackgroundDomNode = createFastDomNode(
|
|
26
|
+
this._glyphMarginBackgroundDomNode = createFastDomNode(createElement('div'));
|
|
26
27
|
this._glyphMarginBackgroundDomNode.setClassName(Margin.CLASS_NAME);
|
|
27
28
|
this._domNode.appendChild(this._glyphMarginBackgroundDomNode);
|
|
28
29
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
3
3
|
import * as minimap from './minimap.css';
|
|
4
|
-
import { addStandardDisposableListener, EventType, getDomNodePagePosition, addDisposableListener } from '../../../../base/browser/dom.js';
|
|
4
|
+
import { createElement, addStandardDisposableListener, EventType, getDomNodePagePosition, addDisposableListener, isElement } from '../../../../base/browser/dom.js';
|
|
5
5
|
import { createFastDomNode } from '../../../../base/browser/fastDomNode.js';
|
|
6
6
|
import { GlobalPointerMoveMonitor } from '../../../../base/browser/globalPointerMoveMonitor.js';
|
|
7
7
|
import { CharCode } from '../../../../base/common/charCode.js';
|
|
@@ -880,31 +880,31 @@ class InnerMinimap extends Disposable {
|
|
|
880
880
|
this._lastRenderData = null;
|
|
881
881
|
this._buffers = null;
|
|
882
882
|
this._selectionColor = this._theme.getColor(minimapSelection);
|
|
883
|
-
this._domNode = createFastDomNode(
|
|
883
|
+
this._domNode = createFastDomNode(createElement('div'));
|
|
884
884
|
PartFingerprints.write(this._domNode, PartFingerprint.Minimap);
|
|
885
885
|
this._domNode.setClassName(this._getMinimapDomNodeClassName());
|
|
886
886
|
this._domNode.setPosition('absolute');
|
|
887
887
|
this._domNode.setAttribute('role', 'presentation');
|
|
888
888
|
this._domNode.setAttribute('aria-hidden', 'true');
|
|
889
|
-
this._shadow = createFastDomNode(
|
|
889
|
+
this._shadow = createFastDomNode(createElement('div'));
|
|
890
890
|
this._shadow.setClassName('minimap-shadow-hidden');
|
|
891
891
|
this._domNode.appendChild(this._shadow);
|
|
892
|
-
this._canvas = createFastDomNode(
|
|
892
|
+
this._canvas = createFastDomNode(createElement('canvas'));
|
|
893
893
|
this._canvas.setPosition('absolute');
|
|
894
894
|
this._canvas.setLeft(0);
|
|
895
895
|
this._domNode.appendChild(this._canvas);
|
|
896
|
-
this._decorationsCanvas = createFastDomNode(
|
|
896
|
+
this._decorationsCanvas = createFastDomNode(createElement('canvas'));
|
|
897
897
|
this._decorationsCanvas.setPosition('absolute');
|
|
898
898
|
this._decorationsCanvas.setClassName('minimap-decorations-layer');
|
|
899
899
|
this._decorationsCanvas.setLeft(0);
|
|
900
900
|
this._domNode.appendChild(this._decorationsCanvas);
|
|
901
|
-
this._slider = createFastDomNode(
|
|
901
|
+
this._slider = createFastDomNode(createElement('div'));
|
|
902
902
|
this._slider.setPosition('absolute');
|
|
903
903
|
this._slider.setClassName('minimap-slider');
|
|
904
904
|
this._slider.setLayerHinting(true);
|
|
905
905
|
this._slider.setContain('strict');
|
|
906
906
|
this._domNode.appendChild(this._slider);
|
|
907
|
-
this._sliderHorizontal = createFastDomNode(
|
|
907
|
+
this._sliderHorizontal = createFastDomNode(createElement('div'));
|
|
908
908
|
this._sliderHorizontal.setPosition('absolute');
|
|
909
909
|
this._sliderHorizontal.setClassName('minimap-slider-horizontal');
|
|
910
910
|
this._slider.appendChild(this._sliderHorizontal);
|
|
@@ -966,7 +966,7 @@ class InnerMinimap extends Disposable {
|
|
|
966
966
|
});
|
|
967
967
|
}
|
|
968
968
|
_startSliderDragging(e, initialPosY, initialSliderState) {
|
|
969
|
-
if (!e.target || !(e.target
|
|
969
|
+
if (!e.target || !isElement(e.target)) {
|
|
970
970
|
return;
|
|
971
971
|
}
|
|
972
972
|
const initialPosX = e.pageX;
|
|
@@ -3,6 +3,7 @@ import { MinimapCharRenderer } from './minimapCharRenderer.js';
|
|
|
3
3
|
import { Constants, allCharCodes } from './minimapCharSheet.js';
|
|
4
4
|
import { prebakedMiniMaps } from './minimapPreBaked.js';
|
|
5
5
|
import { toUint8 } from '../../../../base/common/uint.js';
|
|
6
|
+
import { createElement } from '../../../../base/browser/dom.js';
|
|
6
7
|
|
|
7
8
|
class MinimapCharRendererFactory {
|
|
8
9
|
static create(scale, fontFamily) {
|
|
@@ -21,7 +22,7 @@ class MinimapCharRendererFactory {
|
|
|
21
22
|
return factory;
|
|
22
23
|
}
|
|
23
24
|
static createSampleData(fontFamily) {
|
|
24
|
-
const canvas =
|
|
25
|
+
const canvas = createElement('canvas');
|
|
25
26
|
const ctx = canvas.getContext('2d');
|
|
26
27
|
canvas.style.height = `${Constants.SAMPLED_CHAR_HEIGHT}px`;
|
|
27
28
|
canvas.height = Constants.SAMPLED_CHAR_HEIGHT;
|
|
@@ -5,7 +5,7 @@ import { createFastDomNode } from '../../../../base/browser/fastDomNode.js';
|
|
|
5
5
|
import { OverlayWidgetPositionPreference } from '../../editorBrowser.js';
|
|
6
6
|
import { ViewPart, PartFingerprints, PartFingerprint } from '../../view/viewPart.js';
|
|
7
7
|
import { EditorOption } from '../../../common/config/editorOptions.js';
|
|
8
|
-
import { getDomNodePagePosition } from '../../../../base/browser/dom.js';
|
|
8
|
+
import { createElement, getDomNodePagePosition } from '../../../../base/browser/dom.js';
|
|
9
9
|
|
|
10
10
|
registerCss(overlayWidgets);
|
|
11
11
|
class ViewOverlayWidgets extends ViewPart {
|
|
@@ -21,10 +21,10 @@ class ViewOverlayWidgets extends ViewPart {
|
|
|
21
21
|
this._editorHeight = layoutInfo.height;
|
|
22
22
|
this._editorWidth = layoutInfo.width;
|
|
23
23
|
this._viewDomNodeRect = { top: 0, left: 0, width: 0, height: 0 };
|
|
24
|
-
this._domNode = createFastDomNode(
|
|
24
|
+
this._domNode = createFastDomNode(createElement('div'));
|
|
25
25
|
PartFingerprints.write(this._domNode, PartFingerprint.OverlayWidgets);
|
|
26
26
|
this._domNode.setClassName('overlayWidgets');
|
|
27
|
-
this.overflowingOverlayWidgetsDomNode = createFastDomNode(
|
|
27
|
+
this.overflowingOverlayWidgetsDomNode = createFastDomNode(createElement('div'));
|
|
28
28
|
PartFingerprints.write(this.overflowingOverlayWidgetsDomNode, PartFingerprint.OverflowingOverlayWidgets);
|
|
29
29
|
this.overflowingOverlayWidgetsDomNode.setClassName('overflowingOverlayWidgets');
|
|
30
30
|
}
|
|
@@ -8,6 +8,7 @@ import { editorOverviewRulerBorder, editorCursorForeground, editorMultiCursorPri
|
|
|
8
8
|
import { EditorOption } from '../../../common/config/editorOptions.js';
|
|
9
9
|
import { OverviewRulerDecorationsGroup } from '../../../common/viewModel.js';
|
|
10
10
|
import { equals } from '../../../../base/common/arrays.js';
|
|
11
|
+
import { createElement } from '../../../../base/browser/dom.js';
|
|
11
12
|
|
|
12
13
|
class Settings {
|
|
13
14
|
constructor(config, theme) {
|
|
@@ -185,7 +186,7 @@ class DecorationsOverviewRuler extends ViewPart {
|
|
|
185
186
|
this._actualShouldRender = ShouldRenderValue.NotNeeded;
|
|
186
187
|
this._renderedDecorations = [];
|
|
187
188
|
this._renderedCursorPositions = [];
|
|
188
|
-
this._domNode = createFastDomNode(
|
|
189
|
+
this._domNode = createFastDomNode(createElement('canvas'));
|
|
189
190
|
this._domNode.setClassName('decorationsOverviewRuler');
|
|
190
191
|
this._domNode.setPosition('absolute');
|
|
191
192
|
this._domNode.setLayerHinting(true);
|
|
@@ -3,13 +3,14 @@ import { createFastDomNode } from '../../../../base/browser/fastDomNode.js';
|
|
|
3
3
|
import { EditorOption } from '../../../common/config/editorOptions.js';
|
|
4
4
|
import { OverviewZoneManager } from '../../../common/viewModel/overviewZoneManager.js';
|
|
5
5
|
import { ViewEventHandler } from '../../../common/viewEventHandler.js';
|
|
6
|
+
import { createElement } from '../../../../base/browser/dom.js';
|
|
6
7
|
|
|
7
8
|
class OverviewRuler extends ViewEventHandler {
|
|
8
9
|
constructor(context, cssClassName) {
|
|
9
10
|
super();
|
|
10
11
|
this._context = context;
|
|
11
12
|
const options = this._context.configuration.options;
|
|
12
|
-
this._domNode = createFastDomNode(
|
|
13
|
+
this._domNode = createFastDomNode(createElement('canvas'));
|
|
13
14
|
this._domNode.setClassName(cssClassName);
|
|
14
15
|
this._domNode.setPosition('absolute');
|
|
15
16
|
this._domNode.setLayerHinting(true);
|
|
@@ -4,12 +4,13 @@ import * as rulers from './rulers.css';
|
|
|
4
4
|
import { createFastDomNode } from '../../../../base/browser/fastDomNode.js';
|
|
5
5
|
import { ViewPart } from '../../view/viewPart.js';
|
|
6
6
|
import { EditorOption } from '../../../common/config/editorOptions.js';
|
|
7
|
+
import { createElement } from '../../../../base/browser/dom.js';
|
|
7
8
|
|
|
8
9
|
registerCss(rulers);
|
|
9
10
|
class Rulers extends ViewPart {
|
|
10
11
|
constructor(context) {
|
|
11
12
|
super(context);
|
|
12
|
-
this.domNode = createFastDomNode(
|
|
13
|
+
this.domNode = createFastDomNode(createElement('div'));
|
|
13
14
|
this.domNode.setAttribute('role', 'presentation');
|
|
14
15
|
this.domNode.setAttribute('aria-hidden', 'true');
|
|
15
16
|
this.domNode.setClassName('view-rulers');
|
|
@@ -43,7 +44,7 @@ class Rulers extends ViewPart {
|
|
|
43
44
|
const rulerWidth = tabSize;
|
|
44
45
|
let addCount = desiredCount - currentCount;
|
|
45
46
|
while (addCount > 0) {
|
|
46
|
-
const node = createFastDomNode(
|
|
47
|
+
const node = createFastDomNode(createElement('div'));
|
|
47
48
|
node.setClassName('view-ruler');
|
|
48
49
|
node.setWidth(rulerWidth);
|
|
49
50
|
this.domNode.appendChild(node);
|
|
@@ -4,6 +4,7 @@ import * as scrollDecoration from './scrollDecoration.css';
|
|
|
4
4
|
import { createFastDomNode } from '../../../../base/browser/fastDomNode.js';
|
|
5
5
|
import { ViewPart } from '../../view/viewPart.js';
|
|
6
6
|
import { EditorOption } from '../../../common/config/editorOptions.js';
|
|
7
|
+
import { createElement } from '../../../../base/browser/dom.js';
|
|
7
8
|
|
|
8
9
|
registerCss(scrollDecoration);
|
|
9
10
|
class ScrollDecorationViewPart extends ViewPart {
|
|
@@ -16,7 +17,7 @@ class ScrollDecorationViewPart extends ViewPart {
|
|
|
16
17
|
const options = this._context.configuration.options;
|
|
17
18
|
const scrollbar = options.get(EditorOption.scrollbar);
|
|
18
19
|
this._useShadows = scrollbar.useShadows;
|
|
19
|
-
this._domNode = createFastDomNode(
|
|
20
|
+
this._domNode = createFastDomNode(createElement('div'));
|
|
20
21
|
this._domNode.setAttribute('role', 'presentation');
|
|
21
22
|
this._domNode.setAttribute('aria-hidden', 'true');
|
|
22
23
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { getWindow, computeScreenAwareSize } from '../../../../base/browser/dom.js';
|
|
2
|
+
import { createElement, getWindow, computeScreenAwareSize } from '../../../../base/browser/dom.js';
|
|
3
3
|
import { createFastDomNode } from '../../../../base/browser/fastDomNode.js';
|
|
4
4
|
import { getCharContainingOffset } from '../../../../base/common/strings.js';
|
|
5
5
|
import { applyFontInfo } from '../../config/domFontInfo.js';
|
|
@@ -34,7 +34,7 @@ class ViewCursor {
|
|
|
34
34
|
this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;
|
|
35
35
|
this._lineCursorWidth = Math.min(options.get(EditorOption.cursorWidth), this._typicalHalfwidthCharacterWidth);
|
|
36
36
|
this._isVisible = true;
|
|
37
|
-
this._domNode = createFastDomNode(
|
|
37
|
+
this._domNode = createFastDomNode(createElement('div'));
|
|
38
38
|
this._domNode.setClassName(`cursor ${MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`);
|
|
39
39
|
this._domNode.setHeight(this._context.viewLayout.getLineHeightForLineNumber(1));
|
|
40
40
|
this._domNode.setTop(0);
|
|
@@ -10,7 +10,7 @@ import { editorCursorBackground, editorCursorForeground, editorMultiCursorPrimar
|
|
|
10
10
|
import { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';
|
|
11
11
|
import { isHighContrast } from '../../../../platform/theme/common/theme.js';
|
|
12
12
|
import { CursorChangeReason } from '../../../common/cursorEvents.js';
|
|
13
|
-
import { WindowIntervalTimer, getWindow } from '../../../../base/browser/dom.js';
|
|
13
|
+
import { createElement, WindowIntervalTimer, getWindow } from '../../../../base/browser/dom.js';
|
|
14
14
|
|
|
15
15
|
registerCss(viewCursors);
|
|
16
16
|
class ViewCursors extends ViewPart {
|
|
@@ -29,7 +29,7 @@ class ViewCursors extends ViewPart {
|
|
|
29
29
|
this._primaryCursor = ( new ViewCursor(this._context, CursorPlurality.Single));
|
|
30
30
|
this._secondaryCursors = [];
|
|
31
31
|
this._renderData = [];
|
|
32
|
-
this._domNode = createFastDomNode(
|
|
32
|
+
this._domNode = createFastDomNode(createElement('div'));
|
|
33
33
|
this._domNode.setAttribute('role', 'presentation');
|
|
34
34
|
this._domNode.setAttribute('aria-hidden', 'true');
|
|
35
35
|
this._updateDomClassName();
|
|
@@ -17,6 +17,7 @@ import { Range } from '../../../common/core/range.js';
|
|
|
17
17
|
import { ScrollType } from '../../../common/editorCommon.js';
|
|
18
18
|
import { VerticalRevealType } from '../../../common/viewEvents.js';
|
|
19
19
|
import { ViewLineOptions } from './viewLineOptions.js';
|
|
20
|
+
import { createElement } from '../../../../base/browser/dom.js';
|
|
20
21
|
|
|
21
22
|
registerCss(viewLines);
|
|
22
23
|
class LastRenderedData {
|
|
@@ -80,7 +81,7 @@ class ViewLines extends ViewPart {
|
|
|
80
81
|
this._canUseLayerHinting = !options.get(EditorOption.disableLayerHinting);
|
|
81
82
|
this._viewLineOptions = ( new ViewLineOptions(conf, this._context.theme.type));
|
|
82
83
|
this._linesContent = linesContent;
|
|
83
|
-
this._textRangeRestingSpot =
|
|
84
|
+
this._textRangeRestingSpot = createElement('div');
|
|
84
85
|
this._visibleLines = ( new VisibleLinesCollection(this._context, {
|
|
85
86
|
createLine: () => ( new ViewLine(viewGpuContext, this._viewLineOptions)),
|
|
86
87
|
}));
|
|
@@ -4,6 +4,7 @@ import { onUnexpectedError } from '../../../../base/common/errors.js';
|
|
|
4
4
|
import { ViewPart } from '../../view/viewPart.js';
|
|
5
5
|
import { Position } from '../../../common/core/position.js';
|
|
6
6
|
import { EditorOption } from '../../../common/config/editorOptions.js';
|
|
7
|
+
import { createElement } from '../../../../base/browser/dom.js';
|
|
7
8
|
|
|
8
9
|
const invalidFunc = () => { throw ( new Error(`Invalid change accessor`)); };
|
|
9
10
|
class ViewZones extends ViewPart {
|
|
@@ -14,12 +15,12 @@ class ViewZones extends ViewPart {
|
|
|
14
15
|
this._lineHeight = options.get(EditorOption.lineHeight);
|
|
15
16
|
this._contentWidth = layoutInfo.contentWidth;
|
|
16
17
|
this._contentLeft = layoutInfo.contentLeft;
|
|
17
|
-
this.domNode = createFastDomNode(
|
|
18
|
+
this.domNode = createFastDomNode(createElement('div'));
|
|
18
19
|
this.domNode.setClassName('view-zones');
|
|
19
20
|
this.domNode.setPosition('absolute');
|
|
20
21
|
this.domNode.setAttribute('role', 'presentation');
|
|
21
22
|
this.domNode.setAttribute('aria-hidden', 'true');
|
|
22
|
-
this.marginDomNode = createFastDomNode(
|
|
23
|
+
this.marginDomNode = createFastDomNode(createElement('div'));
|
|
23
24
|
this.marginDomNode.setClassName('margin-view-zones');
|
|
24
25
|
this.marginDomNode.setPosition('absolute');
|
|
25
26
|
this.marginDomNode.setAttribute('role', 'presentation');
|
|
@@ -32,8 +32,10 @@ import { IThemeService } from "../../../../platform/theme/common/themeService.se
|
|
|
32
32
|
import { MenuId } from "../../../../platform/actions/common/actions.js";
|
|
33
33
|
import { TextModelEditReason } from "../../../common/textModelEditReason.js";
|
|
34
34
|
import { TextEdit } from "../../../common/core/edits/textEdit.js";
|
|
35
|
+
import { IKeybindingService } from "../../../../platform/keybinding/common/keybinding.service.js";
|
|
35
36
|
export declare class CodeEditorWidget extends Disposable implements editorBrowser.ICodeEditor {
|
|
36
37
|
private readonly languageConfigurationService;
|
|
38
|
+
private readonly keybindingService;
|
|
37
39
|
private static readonly dropIntoEditorDecorationOptions;
|
|
38
40
|
private readonly _deliveryQueue;
|
|
39
41
|
protected readonly _contributions: CodeEditorContributions;
|
|
@@ -156,7 +158,7 @@ export declare class CodeEditorWidget extends Disposable implements editorBrowse
|
|
|
156
158
|
private _bannerDomNode;
|
|
157
159
|
private _dropIntoEditorDecorations;
|
|
158
160
|
inComposition: boolean;
|
|
159
|
-
constructor(domElement: HTMLElement, _options: Readonly<IEditorConstructionOptions>, codeEditorWidgetOptions: ICodeEditorWidgetOptions, instantiationService: IInstantiationService, codeEditorService: ICodeEditorService, commandService: ICommandService, contextKeyService: IContextKeyService, themeService: IThemeService, notificationService: INotificationService, accessibilityService: IAccessibilityService, languageConfigurationService: ILanguageConfigurationService, languageFeaturesService: ILanguageFeaturesService);
|
|
161
|
+
constructor(domElement: HTMLElement, _options: Readonly<IEditorConstructionOptions>, codeEditorWidgetOptions: ICodeEditorWidgetOptions, instantiationService: IInstantiationService, codeEditorService: ICodeEditorService, commandService: ICommandService, contextKeyService: IContextKeyService, themeService: IThemeService, notificationService: INotificationService, accessibilityService: IAccessibilityService, languageConfigurationService: ILanguageConfigurationService, languageFeaturesService: ILanguageFeaturesService, keybindingService: IKeybindingService);
|
|
160
162
|
writeScreenReaderContent(reason: string): void;
|
|
161
163
|
protected _createConfiguration(isSimpleWidget: boolean, contextMenuId: MenuId, isStandaloneEditor: boolean, options: Readonly<IEditorConstructionOptions>, accessibilityService: IAccessibilityService): EditorConfiguration;
|
|
162
164
|
getId(): string;
|
|
@@ -61,6 +61,7 @@ import { registerThemingParticipant } from '../../../../platform/theme/common/th
|
|
|
61
61
|
import { IThemeService } from '../../../../platform/theme/common/themeService.service.js';
|
|
62
62
|
import { MenuId } from '../../../../platform/actions/common/actions.js';
|
|
63
63
|
import { TextModelEditReason, EditReasons } from '../../../common/textModelEditReason.js';
|
|
64
|
+
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.service.js';
|
|
64
65
|
import Severity$1 from '../../../../base/common/severity.js';
|
|
65
66
|
|
|
66
67
|
var CodeEditorWidget_1;
|
|
@@ -78,9 +79,10 @@ let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|
|
78
79
|
return this._configuration.contextMenuId;
|
|
79
80
|
}
|
|
80
81
|
get contextKeyService() { return this._contextKeyService; }
|
|
81
|
-
constructor(domElement, _options, codeEditorWidgetOptions, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService) {
|
|
82
|
+
constructor(domElement, _options, codeEditorWidgetOptions, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService, keybindingService) {
|
|
82
83
|
super();
|
|
83
84
|
this.languageConfigurationService = languageConfigurationService;
|
|
85
|
+
this.keybindingService = keybindingService;
|
|
84
86
|
this._deliveryQueue = createEventDeliveryQueue();
|
|
85
87
|
this._contributions = this._register(( new CodeEditorContributions()));
|
|
86
88
|
this._onDidDispose = this._register(( new Emitter()));
|
|
@@ -274,6 +276,9 @@ let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|
|
274
276
|
},
|
|
275
277
|
}));
|
|
276
278
|
this._codeEditorService.addCodeEditor(this);
|
|
279
|
+
if (!this.getOption(EditorOption.inDiffEditor)) {
|
|
280
|
+
this._register(this.keybindingService.registerContainer(this.getContainerDomNode()));
|
|
281
|
+
}
|
|
277
282
|
}
|
|
278
283
|
writeScreenReaderContent(reason) {
|
|
279
284
|
this._modelData?.view.writeScreenReaderContent(reason);
|
|
@@ -1611,7 +1616,8 @@ CodeEditorWidget = CodeEditorWidget_1 = ( __decorate([
|
|
|
1611
1616
|
( __param(8, INotificationService)),
|
|
1612
1617
|
( __param(9, IAccessibilityService)),
|
|
1613
1618
|
( __param(10, ILanguageConfigurationService)),
|
|
1614
|
-
( __param(11, ILanguageFeaturesService))
|
|
1619
|
+
( __param(11, ILanguageFeaturesService)),
|
|
1620
|
+
( __param(12, IKeybindingService))
|
|
1615
1621
|
], CodeEditorWidget));
|
|
1616
1622
|
let EDITOR_ID = 0;
|
|
1617
1623
|
class ModelData {
|
|
@@ -10,10 +10,11 @@ import { IContextKeyService } from "../../../../platform/contextkey/common/conte
|
|
|
10
10
|
import { IInstantiationService, ServicesAccessor } from "../../../../platform/instantiation/common/instantiation.js";
|
|
11
11
|
import { INotificationService } from "../../../../platform/notification/common/notification.service.js";
|
|
12
12
|
import { IThemeService } from "../../../../platform/theme/common/themeService.service.js";
|
|
13
|
+
import { IKeybindingService } from "../../../../platform/keybinding/common/keybinding.service.js";
|
|
13
14
|
export declare class EmbeddedCodeEditorWidget extends CodeEditorWidget {
|
|
14
15
|
private readonly _parentEditor;
|
|
15
16
|
private readonly _overwriteOptions;
|
|
16
|
-
constructor(domElement: HTMLElement, options: IEditorOptions, codeEditorWidgetOptions: ICodeEditorWidgetOptions, parentEditor: ICodeEditor, instantiationService: IInstantiationService, codeEditorService: ICodeEditorService, commandService: ICommandService, contextKeyService: IContextKeyService, themeService: IThemeService, notificationService: INotificationService, accessibilityService: IAccessibilityService, languageConfigurationService: ILanguageConfigurationService, languageFeaturesService: ILanguageFeaturesService);
|
|
17
|
+
constructor(domElement: HTMLElement, options: IEditorOptions, codeEditorWidgetOptions: ICodeEditorWidgetOptions, parentEditor: ICodeEditor, instantiationService: IInstantiationService, codeEditorService: ICodeEditorService, commandService: ICommandService, contextKeyService: IContextKeyService, themeService: IThemeService, notificationService: INotificationService, accessibilityService: IAccessibilityService, languageConfigurationService: ILanguageConfigurationService, languageFeaturesService: ILanguageFeaturesService, keybindingService: IKeybindingService);
|
|
17
18
|
getParentEditor(): ICodeEditor;
|
|
18
19
|
private _onParentConfigurationChanged;
|
|
19
20
|
updateOptions(newOptions: IEditorOptions): void;
|
|
@@ -11,10 +11,11 @@ import { IContextKeyService } from '../../../../platform/contextkey/common/conte
|
|
|
11
11
|
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
12
12
|
import { INotificationService } from '../../../../platform/notification/common/notification.service.js';
|
|
13
13
|
import { IThemeService } from '../../../../platform/theme/common/themeService.service.js';
|
|
14
|
+
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.service.js';
|
|
14
15
|
|
|
15
16
|
let EmbeddedCodeEditorWidget = class EmbeddedCodeEditorWidget extends CodeEditorWidget {
|
|
16
|
-
constructor(domElement, options, codeEditorWidgetOptions, parentEditor, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService) {
|
|
17
|
-
super(domElement, { ...parentEditor.getRawOptions(), overflowWidgetsDomNode: parentEditor.getOverflowWidgetsDomNode() }, codeEditorWidgetOptions, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService);
|
|
17
|
+
constructor(domElement, options, codeEditorWidgetOptions, parentEditor, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService, keybindingService) {
|
|
18
|
+
super(domElement, { ...parentEditor.getRawOptions(), overflowWidgetsDomNode: parentEditor.getOverflowWidgetsDomNode() }, codeEditorWidgetOptions, instantiationService, codeEditorService, commandService, contextKeyService, themeService, notificationService, accessibilityService, languageConfigurationService, languageFeaturesService, keybindingService);
|
|
18
19
|
this._parentEditor = parentEditor;
|
|
19
20
|
this._overwriteOptions = options;
|
|
20
21
|
super.updateOptions(this._overwriteOptions);
|
|
@@ -41,7 +42,8 @@ EmbeddedCodeEditorWidget = ( __decorate([
|
|
|
41
42
|
( __param(9, INotificationService)),
|
|
42
43
|
( __param(10, IAccessibilityService)),
|
|
43
44
|
( __param(11, ILanguageConfigurationService)),
|
|
44
|
-
( __param(12, ILanguageFeaturesService))
|
|
45
|
+
( __param(12, ILanguageFeaturesService)),
|
|
46
|
+
( __param(13, IKeybindingService))
|
|
45
47
|
], EmbeddedCodeEditorWidget));
|
|
46
48
|
function getOuterEditor(accessor) {
|
|
47
49
|
const editor = accessor.get(ICodeEditorService).getFocusedCodeEditor();
|
|
@@ -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 { reset, addStandardDisposableListener, addDisposableListener } from '../../../../../base/browser/dom.js';
|
|
4
|
+
import { createElement, reset, addStandardDisposableListener, addDisposableListener } from '../../../../../base/browser/dom.js';
|
|
5
5
|
import { createTrustedTypesPolicy } from '../../../../../base/browser/trustedTypes.js';
|
|
6
6
|
import { ActionBar } from '../../../../../base/browser/ui/actionbar/actionbar.js';
|
|
7
7
|
import { DomScrollableElement } from '../../../../../base/browser/ui/scrollbar/scrollableElement.js';
|
|
@@ -297,7 +297,7 @@ let View = class View extends Disposable {
|
|
|
297
297
|
this._languageService = _languageService;
|
|
298
298
|
this.domNode = this._element;
|
|
299
299
|
this.domNode.className = 'monaco-component diff-review monaco-editor-background';
|
|
300
|
-
const actionBarContainer =
|
|
300
|
+
const actionBarContainer = createElement('div');
|
|
301
301
|
actionBarContainer.className = 'diff-review-actions';
|
|
302
302
|
this._actionBar = this._register(( new ActionBar(actionBarContainer)));
|
|
303
303
|
this._register(autorun(reader => {
|
|
@@ -312,7 +312,7 @@ let View = class View extends Disposable {
|
|
|
312
312
|
}), { label: false, icon: true });
|
|
313
313
|
}
|
|
314
314
|
}));
|
|
315
|
-
this._content =
|
|
315
|
+
this._content = createElement('div');
|
|
316
316
|
this._content.className = 'diff-review-content';
|
|
317
317
|
this._content.setAttribute('role', 'code');
|
|
318
318
|
this._scrollbar = this._register(( new DomScrollableElement(this._content, {})));
|
|
@@ -359,7 +359,7 @@ let View = class View extends Disposable {
|
|
|
359
359
|
_render(store) {
|
|
360
360
|
const originalOptions = this._models.getOriginalOptions();
|
|
361
361
|
const modifiedOptions = this._models.getModifiedOptions();
|
|
362
|
-
const container =
|
|
362
|
+
const container = createElement('div');
|
|
363
363
|
container.className = 'diff-review-table';
|
|
364
364
|
container.setAttribute('role', 'list');
|
|
365
365
|
container.setAttribute('aria-label', ( localize(169, 'Accessible Diff Viewer. Use arrow up and down to navigate.')));
|
|
@@ -380,7 +380,7 @@ let View = class View extends Disposable {
|
|
|
380
380
|
}
|
|
381
381
|
let row;
|
|
382
382
|
if (viewItem.type === LineType.Header) {
|
|
383
|
-
const header =
|
|
383
|
+
const header = createElement('div');
|
|
384
384
|
header.className = 'diff-review-row';
|
|
385
385
|
header.setAttribute('role', 'listitem');
|
|
386
386
|
const r = group.range;
|
|
@@ -401,7 +401,7 @@ let View = class View extends Disposable {
|
|
|
401
401
|
r.modified.startLineNumber,
|
|
402
402
|
modifiedChangedLinesCntAria
|
|
403
403
|
)));
|
|
404
|
-
const cell =
|
|
404
|
+
const cell = createElement('div');
|
|
405
405
|
cell.className = 'diff-review-cell diff-review-summary';
|
|
406
406
|
cell.appendChild(document.createTextNode(`${diffIndex + 1}/${diffsLength}: @@ -${r.original.startLineNumber},${r.original.length} +${r.modified.startLineNumber},${r.modified.length} @@`));
|
|
407
407
|
header.appendChild(cell);
|
|
@@ -446,16 +446,16 @@ let View = class View extends Disposable {
|
|
|
446
446
|
spacerIcon = accessibleDiffViewerRemoveIcon;
|
|
447
447
|
break;
|
|
448
448
|
}
|
|
449
|
-
const row =
|
|
449
|
+
const row = createElement('div');
|
|
450
450
|
row.style.minWidth = width + 'px';
|
|
451
451
|
row.className = rowClassName;
|
|
452
452
|
row.setAttribute('role', 'listitem');
|
|
453
453
|
row.ariaLevel = '';
|
|
454
|
-
const cell =
|
|
454
|
+
const cell = createElement('div');
|
|
455
455
|
cell.className = 'diff-review-cell';
|
|
456
456
|
cell.style.height = `${lineHeight}px`;
|
|
457
457
|
row.appendChild(cell);
|
|
458
|
-
const originalLineNumber =
|
|
458
|
+
const originalLineNumber = createElement('span');
|
|
459
459
|
originalLineNumber.style.width = (originalLineNumbersWidth + 'px');
|
|
460
460
|
originalLineNumber.style.minWidth = (originalLineNumbersWidth + 'px');
|
|
461
461
|
originalLineNumber.className = 'diff-review-line-number' + lineNumbersExtraClassName;
|
|
@@ -466,7 +466,7 @@ let View = class View extends Disposable {
|
|
|
466
466
|
originalLineNumber.innerText = '\u00a0';
|
|
467
467
|
}
|
|
468
468
|
cell.appendChild(originalLineNumber);
|
|
469
|
-
const modifiedLineNumber =
|
|
469
|
+
const modifiedLineNumber = createElement('span');
|
|
470
470
|
modifiedLineNumber.style.width = (modifiedLineNumbersWidth + 'px');
|
|
471
471
|
modifiedLineNumber.style.minWidth = (modifiedLineNumbersWidth + 'px');
|
|
472
472
|
modifiedLineNumber.style.paddingRight = '10px';
|
|
@@ -478,10 +478,10 @@ let View = class View extends Disposable {
|
|
|
478
478
|
modifiedLineNumber.innerText = '\u00a0';
|
|
479
479
|
}
|
|
480
480
|
cell.appendChild(modifiedLineNumber);
|
|
481
|
-
const spacer =
|
|
481
|
+
const spacer = createElement('span');
|
|
482
482
|
spacer.className = spacerClassName;
|
|
483
483
|
if (spacerIcon) {
|
|
484
|
-
const spacerCodicon =
|
|
484
|
+
const spacerCodicon = createElement('span');
|
|
485
485
|
spacerCodicon.className = ThemeIcon.asClassName(spacerIcon);
|
|
486
486
|
spacerCodicon.innerText = '\u00a0\u00a0';
|
|
487
487
|
spacer.appendChild(spacerCodicon);
|