mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 18:32:56 +01:00
deploy: 83b3cf23ca
This commit is contained in:
parent
d17d444b11
commit
b86a4f9e56
1674 changed files with 61583 additions and 39675 deletions
3250
node_modules/monaco-editor-core/dev/bundleInfo.json
generated
vendored
3250
node_modules/monaco-editor-core/dev/bundleInfo.json
generated
vendored
File diff suppressed because it is too large
Load diff
1247
node_modules/monaco-editor-core/dev/nls.metadata.json
generated
vendored
1247
node_modules/monaco-editor-core/dev/nls.metadata.json
generated
vendored
File diff suppressed because it is too large
Load diff
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.de.js
generated
vendored
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.de.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.es.js
generated
vendored
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.es.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.fr.js
generated
vendored
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.fr.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.it.js
generated
vendored
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.it.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.ja.js
generated
vendored
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.ja.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.js
generated
vendored
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.ko.js
generated
vendored
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.ko.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.ru.js
generated
vendored
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.ru.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.zh-cn.js
generated
vendored
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.zh-cn.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.zh-tw.js
generated
vendored
2
node_modules/monaco-editor-core/dev/vs/base/common/worker/simpleWorker.nls.zh-tw.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
|
|||
3365
node_modules/monaco-editor-core/dev/vs/base/worker/workerMain.js
generated
vendored
3365
node_modules/monaco-editor-core/dev/vs/base/worker/workerMain.js
generated
vendored
File diff suppressed because it is too large
Load diff
2
node_modules/monaco-editor-core/dev/vs/base/worker/workerMain.js.map
generated
vendored
2
node_modules/monaco-editor-core/dev/vs/base/worker/workerMain.js.map
generated
vendored
File diff suppressed because one or more lines are too long
231
node_modules/monaco-editor-core/dev/vs/editor/editor.main.css
generated
vendored
231
node_modules/monaco-editor-core/dev/vs/editor/editor.main.css
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
@ -270,6 +270,44 @@
|
|||
color: inherit !important;
|
||||
}
|
||||
|
||||
/* default color styles - based on CSS variables */
|
||||
|
||||
.monaco-button.default-colors,
|
||||
.monaco-button-dropdown.default-colors > .monaco-button{
|
||||
color: var(--vscode-button-foreground);
|
||||
background-color: var(--vscode-button-background);
|
||||
}
|
||||
|
||||
.monaco-button.default-colors:hover,
|
||||
.monaco-button-dropdown.default-colors > .monaco-button:hover {
|
||||
background-color: var(--vscode-button-hoverBackground);
|
||||
}
|
||||
|
||||
.monaco-button.default-colors.secondary,
|
||||
.monaco-button-dropdown.default-colors > .monaco-button.secondary {
|
||||
color: var(--vscode-button-secondaryForeground);
|
||||
background-color: var(--vscode-button-secondaryBackground);
|
||||
}
|
||||
|
||||
.monaco-button.default-colors.secondary:hover,
|
||||
.monaco-button-dropdown.default-colors > .monaco-button.secondary:hover {
|
||||
background-color: var(--vscode-button-secondaryHoverBackground);
|
||||
}
|
||||
|
||||
.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator {
|
||||
background-color: var(--vscode-button-background);
|
||||
border-top: 1px solid var(--vscode-button-border);
|
||||
border-bottom: 1px solid var(--vscode-button-border);
|
||||
}
|
||||
|
||||
.monaco-button-dropdown.default-colors .monaco-button.secondary + .monaco-button-dropdown-separator {
|
||||
background-color: var(--vscode-button-secondaryBackground);
|
||||
}
|
||||
|
||||
.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator > div {
|
||||
background-color: var(--vscode-button-separator);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
|
@ -499,10 +537,9 @@
|
|||
cursor: default;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
z-index: 50;
|
||||
user-select: text;
|
||||
-webkit-user-select: text;
|
||||
box-sizing: initial;
|
||||
box-sizing: border-box;
|
||||
animation: fadein 100ms linear;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
|
@ -1904,10 +1941,23 @@
|
|||
Keeping name short for faster parsing.
|
||||
cgmr = core glyph margin rendering (div)
|
||||
*/
|
||||
.monaco-editor .margin-view-overlays .cgmr {
|
||||
.monaco-editor .glyph-margin-widgets .cgmr {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/*
|
||||
Ensure spinning icons are pixel-perfectly centered and avoid wobble.
|
||||
This is only applied to icons that spin to avoid unnecessary
|
||||
GPU layers and blurry subpixel AA.
|
||||
*/
|
||||
.monaco-editor .glyph-margin-widgets .cgmr.codicon-modifier-spin::before {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
|
|
@ -1920,14 +1970,6 @@
|
|||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.monaco-editor .lines-content .core-guide-indent {
|
||||
box-shadow: 1px 0 0 0 var(--vscode-editorIndentGuide-background) inset;
|
||||
}
|
||||
|
||||
.monaco-editor .lines-content .core-guide-indent-active {
|
||||
box-shadow: 1px 0 0 0 var(--vscode-editorIndentGuide-activeBackground, --vscode-editorIndentGuide-background) inset;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
|
@ -2303,6 +2345,110 @@
|
|||
color: var(--vscode-editorWhitespace-foreground) !important;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
.monaco-editor .diff-hidden-lines-widget {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.monaco-editor .diff-hidden-lines {
|
||||
height: 0px; /* The children each have a fixed height, the transform confuses the browser */
|
||||
transform: translate(0px, -10px);
|
||||
font-size: 13px;
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
.monaco-editor .diff-hidden-lines:not(.dragging) .top:hover, .diff-hidden-lines:not(.dragging) .bottom:hover, .diff-hidden-lines .top.dragging, .diff-hidden-lines .bottom.dragging {
|
||||
background-color: var(--vscode-focusBorder);
|
||||
}
|
||||
|
||||
.monaco-editor .diff-hidden-lines .top, .diff-hidden-lines .bottom {
|
||||
transition: background-color 0.1s ease-out;
|
||||
height: 4px;
|
||||
background-color: transparent;
|
||||
background-clip: padding-box;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-top: 4px solid transparent;
|
||||
cursor: ns-resize;
|
||||
}
|
||||
|
||||
.monaco-editor .diff-hidden-lines .top {
|
||||
transform: translate(0px, 4px);
|
||||
}
|
||||
|
||||
.monaco-editor .diff-hidden-lines .bottom {
|
||||
transform: translate(0px, -6px);
|
||||
}
|
||||
|
||||
.monaco-editor .diff-unchanged-lines {
|
||||
background: var(--vscode-diffEditor-unchangedCodeBackground);
|
||||
}
|
||||
|
||||
.monaco-editor .noModificationsOverlay {
|
||||
z-index: 1;
|
||||
background: var(--vscode-editor-background);
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.monaco-editor .diff-hidden-lines .center {
|
||||
background: var(--vscode-diffEditor-unchangedRegionBackground);
|
||||
color: var(--vscode-diffEditor-unchangedRegionForeground);
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.monaco-editor .diff-hidden-lines .center span.codicon {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.monaco-editor .diff-hidden-lines .center a:hover .codicon {
|
||||
cursor: pointer;
|
||||
color: var(--vscode-editorLink-activeForeground) !important;
|
||||
}
|
||||
|
||||
.monaco-editor .movedOriginal {
|
||||
border: 2px solid var(--vscode-diffEditor-move-border);
|
||||
}
|
||||
|
||||
.monaco-editor .movedModified {
|
||||
border: 2px solid var(--vscode-diffEditor-move-border);
|
||||
}
|
||||
|
||||
.monaco-diff-editor .moved-blocks-lines {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.monaco-diff-editor .moved-blocks-lines path {
|
||||
fill: none;
|
||||
stroke: var(--vscode-diffEditor-move-border);
|
||||
stroke-width: 2;
|
||||
}
|
||||
|
||||
.monaco-editor .char-delete.diff-range-empty {
|
||||
margin-left: -1px;
|
||||
border-left: solid var(--vscode-diffEditor-removedTextBackground) 3px;
|
||||
}
|
||||
|
||||
.monaco-editor .char-insert.diff-range-empty {
|
||||
border-left: solid var(--vscode-diffEditor-insertedTextBackground) 3px;
|
||||
}
|
||||
|
||||
.monaco-editor .fold-unchanged {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
|
@ -2459,6 +2605,7 @@
|
|||
position: absolute;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.monaco-diff-editor .diff-review-summary {
|
||||
|
|
@ -2499,6 +2646,7 @@
|
|||
position: absolute;
|
||||
right: 10px;
|
||||
top: 2px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.monaco-diff-editor .diff-review-actions .action-label {
|
||||
|
|
@ -2930,9 +3078,10 @@
|
|||
}
|
||||
|
||||
.colorpicker-body .insert-button {
|
||||
position: absolute;
|
||||
height: 20px;
|
||||
width: 58px;
|
||||
position: absolute;
|
||||
padding: 0px;
|
||||
right: 8px;
|
||||
bottom: 8px;
|
||||
background: var(--vscode-button-background);
|
||||
|
|
@ -3074,7 +3223,7 @@
|
|||
|
||||
.monaco-editor .find-widget > .find-part,
|
||||
.monaco-editor .find-widget > .replace-part {
|
||||
margin: 3px 0 0 17px;
|
||||
margin: 3px 25px 0 17px;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
}
|
||||
|
|
@ -3248,6 +3397,13 @@
|
|||
left: 2px;
|
||||
}
|
||||
|
||||
/* Close button position. */
|
||||
.monaco-editor .find-widget > .button.codicon-widget-close {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
right: 4px;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
|
@ -3714,10 +3870,23 @@
|
|||
}
|
||||
|
||||
.monaco-editor .monaco-editor-overlaymessage .message {
|
||||
padding: 1px 4px;
|
||||
color: var(--vscode-inputValidation-infoForeground);
|
||||
background-color: var(--vscode-inputValidation-infoBackground);
|
||||
padding: 2px 4px;
|
||||
color: var(--vscode-editorHoverWidget-foreground);
|
||||
background-color: var(--vscode-editorHoverWidget-background);
|
||||
border: 1px solid var(--vscode-inputValidation-infoBorder);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.monaco-editor .monaco-editor-overlaymessage .message p {
|
||||
margin-block: 0px;
|
||||
}
|
||||
|
||||
.monaco-editor .monaco-editor-overlaymessage .message a {
|
||||
color: var(--vscode-textLink-foreground);
|
||||
}
|
||||
|
||||
.monaco-editor .monaco-editor-overlaymessage .message a:hover {
|
||||
color: var(--vscode-textLink-activeForeground);
|
||||
}
|
||||
|
||||
.monaco-editor.hc-black .monaco-editor-overlaymessage .message,
|
||||
|
|
@ -3733,6 +3902,7 @@
|
|||
z-index: 1000;
|
||||
border-width: 8px;
|
||||
position: absolute;
|
||||
left: 2px;
|
||||
}
|
||||
|
||||
.monaco-editor .monaco-editor-overlaymessage .anchor.top {
|
||||
|
|
@ -4769,21 +4939,6 @@
|
|||
position: relative;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
.monaco-editor .accessibilityHelpWidget {
|
||||
padding: 10px;
|
||||
vertical-align: middle;
|
||||
overflow: scroll;
|
||||
color: var(--vscode-editorWidget-foreground);
|
||||
background-color: var(--vscode-editorWidget-background);
|
||||
box-shadow: 0 2px 8px var(--vscode-widget-shadow);
|
||||
border: 2px solid var(--vscode-contrastBorder);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
|
@ -5383,6 +5538,18 @@
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-icon {
|
||||
background-size: 16px;
|
||||
background-position: left center;
|
||||
background-repeat: no-repeat;
|
||||
padding-right: 6px;
|
||||
width: 16px;
|
||||
height: 22px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.quick-input-list .quick-input-list-rows {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
|
|
|||
28619
node_modules/monaco-editor-core/dev/vs/editor/editor.main.js
generated
vendored
28619
node_modules/monaco-editor-core/dev/vs/editor/editor.main.js
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/monaco-editor-core/dev/vs/editor/editor.main.js.map
generated
vendored
2
node_modules/monaco-editor-core/dev/vs/editor/editor.main.js.map
generated
vendored
File diff suppressed because one or more lines are too long
104
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.de.js
generated
vendored
104
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.de.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
@ -106,6 +106,10 @@ define("vs/editor/editor.main.nls.de", {
|
|||
"Die Anzahl der Cursor wurde auf {0} beschränkt. Erwägen Sie die Verwendung von [Suchen und Ersetzen](https://code.visualstudio.com/docs/editor/codebasics#_find-und-ersetzen) für größere Änderungen, oder erhöhen Sie die Multicursorbegrenzungseinstellung des Editors.",
|
||||
"Erhöhen des Grenzwerts für mehrere Cursor",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditor.contribution": [
|
||||
"Zum nächsten Unterschied wechseln",
|
||||
"Zum vorherigen Unterschied wechseln",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget": [
|
||||
"Zeilenformatierung für Einfügungen im Diff-Editor",
|
||||
"Zeilenformatierung für Entfernungen im Diff-Editor",
|
||||
|
|
@ -113,6 +117,41 @@ define("vs/editor/editor.main.nls.de", {
|
|||
"Kann die Dateien nicht vergleichen, da eine Datei zu groß ist.",
|
||||
"Klicken Sie, um die Änderung rückgängig zu machen",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/decorations": [
|
||||
"Zeilenformatierung für Einfügungen im Diff-Editor",
|
||||
"Zeilenformatierung für Entfernungen im Diff-Editor",
|
||||
"Klicken Sie, um die Änderung rückgängig zu machen",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors": [
|
||||
" verwenden Sie UMSCHALT+F7, um durch Änderungen zu navigieren.",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffReview": [
|
||||
"Symbol für \"Einfügen\" in der Diff-Überprüfung.",
|
||||
"Symbol für \"Entfernen\" in der Diff-Überprüfung.",
|
||||
"Symbol für \"Schließen\" in der Diff-Überprüfung.",
|
||||
"Schließen",
|
||||
"keine geänderten Zeilen",
|
||||
"1 Zeile geändert",
|
||||
"{0} Zeilen geändert",
|
||||
"Unterschied {0} von {1}: ursprüngliche Zeile {2}, {3}, geänderte Zeile {4}, {5}",
|
||||
"leer",
|
||||
"{0}: unveränderte Zeile {1}",
|
||||
"{0} ursprüngliche Zeile {1} geänderte Zeile {2}",
|
||||
"+ {0} geänderte Zeile(n) {1}",
|
||||
"– {0} Originalzeile {1}",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/inlineDiffDeletedCodeMargin": [
|
||||
"Gelöschte Zeilen kopieren",
|
||||
"Gelöschte Zeile kopieren",
|
||||
"Geänderte Zeilen kopieren",
|
||||
"Geänderte Zeile kopieren",
|
||||
"Gelöschte Zeile kopieren ({0})",
|
||||
"Geänderte Zeile ({0}) kopieren",
|
||||
"Diese Änderung rückgängig machen",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/unchangedRanges": [
|
||||
"Unveränderten Bereich falten",
|
||||
],
|
||||
"vs/editor/browser/widget/diffReview": [
|
||||
"Symbol für \"Einfügen\" in der Diff-Überprüfung.",
|
||||
"Symbol für \"Entfernen\" in der Diff-Überprüfung.",
|
||||
|
|
@ -127,8 +166,6 @@ define("vs/editor/editor.main.nls.de", {
|
|||
"{0} ursprüngliche Zeile {1} geänderte Zeile {2}",
|
||||
"+ {0} geänderte Zeile(n) {1}",
|
||||
"– {0} Originalzeile {1}",
|
||||
"Zum nächsten Unterschied wechseln",
|
||||
"Zum vorherigen Unterschied wechseln",
|
||||
],
|
||||
"vs/editor/browser/widget/inlineDiffMargin": [
|
||||
"Gelöschte Zeilen kopieren",
|
||||
|
|
@ -181,8 +218,10 @@ define("vs/editor/editor.main.nls.de", {
|
|||
"Zeilen werden gemäß der Einstellung „{0}“ umbrochen.",
|
||||
"Verwendet den Legacyvergleichsalgorithmus.",
|
||||
"Verwendet den erweiterten Vergleichsalgorithmus.",
|
||||
"Steuert, ob der Diff-Editor unveränderte Bereiche anzeigt. Funktioniert nur, wenn \"diffEditor.experimental.useVersion2\" festgelegt ist.",
|
||||
"Controls whether the diff editor shows unchanged regions. Only works when {0} is set.",
|
||||
"Controls whether the diff editor should show detected code moves. Only works when {0} is set.",
|
||||
"Steuert, ob der Diff-Editor die neue oder die alte Implementierung verwendet.",
|
||||
"Steuert, ob der diff-Editor leere Dekorationen anzeigt, um anzuzeigen, wo Zeichen eingefügt oder gelöscht wurden.",
|
||||
],
|
||||
"vs/editor/common/config/editorOptions": [
|
||||
"Plattform-APIs verwenden, um zu erkennen, wenn eine Sprachausgabe angefügt ist",
|
||||
|
|
@ -365,6 +404,7 @@ define("vs/editor/editor.main.nls.de", {
|
|||
"Wenn aktiviert, zeigt IntelliSense user-Vorschläge an.",
|
||||
"Wenn aktiviert, zeigt IntelliSense issues-Vorschläge an.",
|
||||
"Gibt an, ob führende und nachstehende Leerzeichen immer ausgewählt werden sollen.",
|
||||
"Gibt an, ob Unterwörter (z. B. \"foo\" in \"fooBar\" oder \"foo_bar\") ausgewählt werden sollen.",
|
||||
"Kein Einzug. Umbrochene Zeilen beginnen bei Spalte 1.",
|
||||
"Umbrochene Zeilen erhalten den gleichen Einzug wie das übergeordnete Element.",
|
||||
"Umbrochene Zeilen erhalten + 1 Einzug auf das übergeordnete Element.",
|
||||
|
|
@ -409,6 +449,10 @@ define("vs/editor/editor.main.nls.de", {
|
|||
"Steuert die Schriftfamilie für CodeLens.",
|
||||
"Steuert den Schriftgrad in Pixeln für CodeLens. Bei Festlegung auf „0, 90 % von „#editor.fontSize#“ verwendet.",
|
||||
"Steuert, ob der Editor die Inline-Farbdecorators und die Farbauswahl rendern soll.",
|
||||
"Farbauswahl sowohl beim Klicken als auch beim Daraufzeigen des Farbdekorators anzeigen",
|
||||
"Farbauswahl beim Draufzeigen auf den Farbdekorator anzeigen",
|
||||
"Farbauswahl beim Klicken auf den Farbdekorator anzeigen",
|
||||
"Steuert die Bedingung, damit eine Farbauswahl aus einem Farbdekorator angezeigt wird.",
|
||||
"Steuert die maximale Anzahl von Farb-Decorators, die in einem Editor gleichzeitig gerendert werden können.",
|
||||
"Zulassen, dass die Auswahl per Maus und Tasten die Spaltenauswahl durchführt.",
|
||||
"Steuert, ob Syntax-Highlighting in die Zwischenablage kopiert wird.",
|
||||
|
|
@ -531,9 +575,23 @@ define("vs/editor/editor.main.nls.de", {
|
|||
"Farbe des Cursors im Editor.",
|
||||
"Hintergrundfarbe vom Editor-Cursor. Erlaubt die Anpassung der Farbe von einem Zeichen, welches von einem Block-Cursor überdeckt wird.",
|
||||
"Farbe der Leerzeichen im Editor.",
|
||||
"Farbe der Führungslinien für Einzüge im Editor.",
|
||||
"Farbe der Führungslinien für Einzüge im aktiven Editor.",
|
||||
"Zeilennummernfarbe im Editor.",
|
||||
"Farbe der Führungslinien für Einzüge im Editor.",
|
||||
"\'editorIndentGuide.background\' is deprecated. Use \'editorIndentGuide.background1\' instead.",
|
||||
"Farbe der Führungslinien für Einzüge im aktiven Editor.",
|
||||
"\'editorIndentGuide.activeBackground\' is deprecated. Use \'editorIndentGuide.activeBackground1\' instead.",
|
||||
"Color of the editor indentation guides (1).",
|
||||
"Color of the editor indentation guides (2).",
|
||||
"Color of the editor indentation guides (3).",
|
||||
"Color of the editor indentation guides (4).",
|
||||
"Color of the editor indentation guides (5).",
|
||||
"Color of the editor indentation guides (6).",
|
||||
"Color of the active editor indentation guides (1).",
|
||||
"Color of the active editor indentation guides (2).",
|
||||
"Color of the active editor indentation guides (3).",
|
||||
"Color of the active editor indentation guides (4).",
|
||||
"Color of the active editor indentation guides (5).",
|
||||
"Color of the active editor indentation guides (6).",
|
||||
"Zeilennummernfarbe der aktiven Editorzeile.",
|
||||
"Die ID ist veraltet. Verwenden Sie stattdessen \"editorLineNumber.activeForeground\".",
|
||||
"Zeilennummernfarbe der aktiven Editorzeile.",
|
||||
|
|
@ -580,7 +638,7 @@ define("vs/editor/editor.main.nls.de", {
|
|||
"Gibt an, ob der Editor-Text den Fokus besitzt (Cursor blinkt).",
|
||||
"Gibt an, ob der Editor oder ein Editor-Widget den Fokus besitzt (z. B. ob der Fokus sich im Suchwidget befindet).",
|
||||
"Gibt an, ob ein Editor oder eine Rich-Text-Eingabe den Fokus besitzt (Cursor blinkt).",
|
||||
"Gibt an, ob der Editor schreibgeschützt ist.",
|
||||
"Gibt an, ob der Editor schreibgeschützt ist",
|
||||
"Gibt an, ob der Kontext ein Diff-Editor ist.",
|
||||
"Gibt an, ob der Kontext ein eingebetteter Diff-Editor ist.",
|
||||
"Gibt an, ob \"editor.columnSelection\" aktiviert ist.",
|
||||
|
|
@ -621,30 +679,6 @@ define("vs/editor/editor.main.nls.de", {
|
|||
"Eingabe",
|
||||
],
|
||||
"vs/editor/common/standaloneStrings": [
|
||||
"Keine Auswahl",
|
||||
"Zeile {0}, Spalte {1} ({2} ausgewählt)",
|
||||
"Zeile {0}, Spalte {1}",
|
||||
"{0} Auswahlen ({1} Zeichen ausgewählt)",
|
||||
"{0} Auswahlen",
|
||||
"Die Einstellung \"accessibilitySupport\" wird jetzt in \"on\" geändert.",
|
||||
"Die Dokumentationsseite zur Barrierefreiheit des Editors wird geöffnet.",
|
||||
" in einem schreibgeschützten Bereich eines Diff-Editors.",
|
||||
" in einem Bereich eines Diff-Editors.",
|
||||
" in einem schreibgeschützten Code-Editor",
|
||||
" in einem Code-Editor",
|
||||
"Drücken Sie BEFEHLSTASTE + E, um den Editor für eine optimierte Verwendung mit Sprachausgabe zu konfigurieren.",
|
||||
"Drücken Sie STRG + E, um den Editor für eine optimierte Verwendung mit Sprachausgabe zu konfigurieren.",
|
||||
"Der Editor ist auf eine optimale Verwendung mit Sprachausgabe konfiguriert.",
|
||||
"Der Editor ist so konfiguriert, dass er nie auf die Verwendung mit Sprachausgabe hin optimiert wird. Dies ist zu diesem Zeitpunkt nicht der Fall.",
|
||||
"Durch Drücken der TAB-TASTE im aktuellen Editor wird der Fokus in das nächste Element verschoben, das den Fokus erhalten kann. Schalten Sie dieses Verhalten um, indem Sie {0} drücken.",
|
||||
"Durch Drücken der TAB-TASTE im aktuellen Editor wird der Fokus in das nächste Element verschoben, das den Fokus erhalten kann. Der {0}-Befehl kann zurzeit nicht durch eine Tastenzuordnung ausgelöst werden.",
|
||||
"Durch Drücken der TAB-TASTE im aktuellen Editor wird das Tabstoppzeichen eingefügt. Schalten Sie dieses Verhalten um, indem Sie {0} drücken.",
|
||||
"Durch Drücken der TAB-TASTE im aktuellen Editor wird das Tabstoppzeichen eingefügt. Der {0}-Befehl kann zurzeit nicht durch eine Tastenzuordnung ausgelöst werden.",
|
||||
"Drücken Sie BEFEHLSTASTE + H, um ein Browserfenster mit weiteren Informationen zur Barrierefreiheit des Editors zu öffnen.",
|
||||
"Drücken Sie STRG + H, um ein Browserfenster mit weiteren Informationen zur Barrierefreiheit des Editors zu öffnen.",
|
||||
"Sie können diese QuickInfo schließen und durch Drücken von ESC oder UMSCHALT+ESC zum Editor zurückkehren.",
|
||||
"Hilfe zur Barrierefreiheit anzeigen",
|
||||
"Hilfe zur Barrierefreiheit",
|
||||
"Entwickler: Token überprüfen",
|
||||
"Gehe zu Zeile/Spalte...",
|
||||
"Alle Anbieter für den Schnellzugriff anzeigen",
|
||||
|
|
@ -853,6 +887,7 @@ define("vs/editor/editor.main.nls.de", {
|
|||
"Symbol für \"Alle ersetzen\" im Editor-Such-Widget.",
|
||||
"Symbol für \"Vorheriges Element suchen\" im Editor-Such-Widget.",
|
||||
"Symbol für \"Nächstes Element suchen\" im Editor-Such-Widget.",
|
||||
"Suchen/Ersetzen",
|
||||
"Suchen",
|
||||
"Suchen",
|
||||
"Vorherige Übereinstimmung",
|
||||
|
|
@ -1528,6 +1563,9 @@ define("vs/editor/editor.main.nls.de", {
|
|||
"Vergleichslinie eingefügt",
|
||||
"Vergleichslinie gelöscht",
|
||||
"Vergleichslinie geändert",
|
||||
"Chatanfrage gesendet",
|
||||
"Chatantwort empfangen",
|
||||
"Chatantwort ausstehend",
|
||||
],
|
||||
"vs/platform/configuration/common/configurationRegistry": [
|
||||
"Außerkraftsetzungen für die Standardsprachkonfiguration",
|
||||
|
|
@ -1767,7 +1805,9 @@ define("vs/editor/editor.main.nls.de", {
|
|||
"Konturfarbe für entfernten Text.",
|
||||
"Die Rahmenfarbe zwischen zwei Text-Editoren.",
|
||||
"Farbe der diagonalen Füllung des Vergleichs-Editors. Die diagonale Füllung wird in Ansichten mit parallelem Vergleich verwendet.",
|
||||
"Die Farbe von unveränderten Blöcken im Diff-Editor.",
|
||||
"Die Hintergrundfarbe von unveränderten Blöcken im Diff-Editor.",
|
||||
"Die Vordergrundfarbe von unveränderten Blöcken im Diff-Editor.",
|
||||
"Die Hintergrundfarbe des unveränderten Codes im Diff-Editor.",
|
||||
"Hintergrundfarbe der Liste/Struktur für das fokussierte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.",
|
||||
"Vordergrundfarbe der Liste/Struktur für das fokussierte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.",
|
||||
"Konturfarbe der Liste/Struktur für das fokussierte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.",
|
||||
|
|
|
|||
102
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.es.js
generated
vendored
102
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.es.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
@ -106,6 +106,10 @@ define("vs/editor/editor.main.nls.es", {
|
|||
"El número de cursores se ha limitado a {0}. Considere la posibilidad de usar [buscar y reemplazar](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) para realizar cambios mayores o aumentar la configuración del límite de varios cursores del editor.",
|
||||
"Aumentar el límite de varios cursores",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditor.contribution": [
|
||||
"Ir a la siguiente diferencia",
|
||||
"Ir a la diferencia anterior",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget": [
|
||||
"Decoración de línea para las inserciones en el editor de diferencias.",
|
||||
"Decoración de línea para las eliminaciones en el editor de diferencias.",
|
||||
|
|
@ -113,6 +117,41 @@ define("vs/editor/editor.main.nls.es", {
|
|||
"Los archivos no se pueden comparar porque uno de ellos es demasiado grande.",
|
||||
"Haga clic para revertir el cambio",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/decorations": [
|
||||
"Decoración de línea para las inserciones en el editor de diferencias.",
|
||||
"Decoración de línea para las eliminaciones en el editor de diferencias.",
|
||||
"Haga clic para revertir el cambio",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors": [
|
||||
" usar Mayús + F7 para navegar por los cambios",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffReview": [
|
||||
"Icono para \"Insertar\" en la revisión de diferencias.",
|
||||
"Icono para \"Quitar\" en la revisión de diferencias.",
|
||||
"Icono para \"Cerrar\" en la revisión de diferencias.",
|
||||
"Cerrar",
|
||||
"no se han cambiado líneas",
|
||||
"1 línea cambiada",
|
||||
"{0} líneas cambiadas",
|
||||
"Diferencia {0} de {1}: línea original {2}, {3}, línea modificada {4}, {5}",
|
||||
"Blanco",
|
||||
"{0} línea sin cambios {1}",
|
||||
"{0} línea original {1} línea modificada {2}",
|
||||
"+ {0} línea modificada {1}",
|
||||
"- {0} línea original {1}",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/inlineDiffDeletedCodeMargin": [
|
||||
"Copiar líneas eliminadas",
|
||||
"Copiar línea eliminada",
|
||||
"Copiar líneas cambiadas",
|
||||
"Copiar línea cambiada",
|
||||
"Copiar la línea eliminada ({0})",
|
||||
"Copiar línea cambiada ({0})",
|
||||
"Revertir este cambio",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/unchangedRanges": [
|
||||
"Plegar la región sin cambios",
|
||||
],
|
||||
"vs/editor/browser/widget/diffReview": [
|
||||
"Icono para \"Insertar\" en la revisión de diferencias.",
|
||||
"Icono para \"Quitar\" en la revisión de diferencias.",
|
||||
|
|
@ -127,8 +166,6 @@ define("vs/editor/editor.main.nls.es", {
|
|||
"{0} línea original {1} línea modificada {2}",
|
||||
"+ {0} línea modificada {1}",
|
||||
"- {0} línea original {1}",
|
||||
"Ir a la siguiente diferencia",
|
||||
"Ir a la diferencia anterior",
|
||||
],
|
||||
"vs/editor/browser/widget/inlineDiffMargin": [
|
||||
"Copiar líneas eliminadas",
|
||||
|
|
@ -181,8 +218,10 @@ define("vs/editor/editor.main.nls.es", {
|
|||
"Las líneas se ajustarán en función de la configuración de {0}.",
|
||||
"Usa el algoritmo de diferenciación heredado.",
|
||||
"Usa el algoritmo de diferenciación avanzada.",
|
||||
"Controla si el editor de diferencias muestra regiones sin cambios. Solo funciona cuando se establece \"diffEditor.experimental.useVersion2\".",
|
||||
"Controlar si el editor de diferencias muestra las regiones sin cambios. Solo funciona si {0}se establece.",
|
||||
"Controlar si el editor de diferencias debe mostrar los movimientos de código detectados. Solo funciona cuando {0} se establece.",
|
||||
"Controla si el editor de diferencias usa la implementación nueva o la anterior.",
|
||||
"Controla si el editor de diferencias muestra decoraciones vacías para ver dónde se insertan o eliminan los caracteres.",
|
||||
],
|
||||
"vs/editor/common/config/editorOptions": [
|
||||
"Usar las API de la plataforma para detectar cuándo se conecta un lector de pantalla",
|
||||
|
|
@ -365,6 +404,7 @@ define("vs/editor/editor.main.nls.es", {
|
|||
"Cuando está habilitado, IntelliSense muestra sugerencias del usuario.",
|
||||
"Cuando está habilitado IntelliSense muestra sugerencias para problemas.",
|
||||
"Indica si los espacios en blanco iniciales y finales deben seleccionarse siempre.",
|
||||
"Indica si se deben seleccionar las subpalabras (como \"foo\" en \"fooBar\" o \"foo_bar\").",
|
||||
"No hay sangría. Las líneas ajustadas comienzan en la columna 1.",
|
||||
"A las líneas ajustadas se les aplica la misma sangría que al elemento primario.",
|
||||
"A las líneas ajustadas se les aplica una sangría de +1 respecto al elemento primario.",
|
||||
|
|
@ -409,6 +449,10 @@ define("vs/editor/editor.main.nls.es", {
|
|||
"Controla la familia de fuentes para CodeLens.",
|
||||
"Controla el tamaño de fuente de CodeLens en píxeles. Cuando se establece en 0, se usa el 90 % de \"#editor.fontSize#\".",
|
||||
"Controla si el editor debe representar el Selector de colores y los elementos Decorator de color en línea.",
|
||||
"Hacer que el selector de colores aparezca tanto al hacer clic como al mantener el puntero sobre el decorador de color",
|
||||
"Hacer que el selector de colores aparezca al pasar el puntero sobre el decorador de color",
|
||||
"Hacer que el selector de colores aparezca al hacer clic en el decorador de color",
|
||||
"Controla la condición para que un selector de colores aparezca de un decorador de color",
|
||||
"Controla el número máximo de decoradores de color que se pueden representar en un editor a la vez.",
|
||||
"Habilite que la selección con el mouse y las teclas esté realizando la selección de columnas.",
|
||||
"Controla si el resaltado de sintaxis debe ser copiado al portapapeles.",
|
||||
|
|
@ -531,9 +575,23 @@ define("vs/editor/editor.main.nls.es", {
|
|||
"Color del cursor del editor.",
|
||||
"Color de fondo del cursor de edición. Permite personalizar el color del caracter solapado por el bloque del cursor.",
|
||||
"Color de los caracteres de espacio en blanco del editor.",
|
||||
"Color de las guías de sangría del editor.",
|
||||
"Color de las guías de sangría activas del editor.",
|
||||
"Color de números de línea del editor.",
|
||||
"Color de las guías de sangría del editor.",
|
||||
"\'editorIndentGuide.background\' is deprecated. Use \'editorIndentGuide.background1\' instead.",
|
||||
"Color de las guías de sangría activas del editor.",
|
||||
"\'editorIndentGuide.activeBackground\' is deprecated. Use \'editorIndentGuide.activeBackground1\' instead.",
|
||||
"Color of the editor indentation guides (1).",
|
||||
"Color of the editor indentation guides (2).",
|
||||
"Color of the editor indentation guides (3).",
|
||||
"Color of the editor indentation guides (4).",
|
||||
"Color of the editor indentation guides (5).",
|
||||
"Color of the editor indentation guides (6).",
|
||||
"Color of the active editor indentation guides (1).",
|
||||
"Color of the active editor indentation guides (2).",
|
||||
"Color of the active editor indentation guides (3).",
|
||||
"Color of the active editor indentation guides (4).",
|
||||
"Color of the active editor indentation guides (5).",
|
||||
"Color of the active editor indentation guides (6).",
|
||||
"Color del número de línea activa en el editor",
|
||||
"ID es obsoleto. Usar en lugar \'editorLineNumber.activeForeground\'. ",
|
||||
"Color del número de línea activa en el editor",
|
||||
|
|
@ -621,30 +679,6 @@ define("vs/editor/editor.main.nls.es", {
|
|||
"Escribiendo",
|
||||
],
|
||||
"vs/editor/common/standaloneStrings": [
|
||||
"Sin selección",
|
||||
"Línea {0}, columna {1} ({2} seleccionadas)",
|
||||
"Línea {0}, columna {1}",
|
||||
"{0} selecciones ({1} caracteres seleccionados)",
|
||||
"{0} selecciones",
|
||||
"Se cambiará ahora el valor \"accessibilitySupport\" a \"activado\".",
|
||||
"Se abrirá ahora la página de documentación de accesibilidad del editor.",
|
||||
"en un panel de solo lectura de un editor de diferencias.",
|
||||
"en un panel de un editor de diferencias.",
|
||||
"en un editor de código de solo lectura",
|
||||
" en un editor de código",
|
||||
"Para configurar el editor de forma que se optimice su uso con un lector de pantalla, presione ahora Comando+E.",
|
||||
"Para configurar el editor de forma que se optimice su uso con un lector de pantalla, presione ahora Control+E.",
|
||||
"El editor está configurado para optimizarse para su uso con un lector de pantalla.",
|
||||
"El editor está configurado para que no se optimice nunca su uso con un lector de pantalla, que en este momento no es el caso.",
|
||||
"Al presionar TAB en el editor actual, el foco se mueve al siguiente elemento activable. Presione {0} para activar o desactivar este comportamiento.",
|
||||
"Al presionar TAB en el editor actual, el foco se mueve al siguiente elemento activable. El comando {0} no se puede desencadenar actualmente mediante un enlace de teclado.",
|
||||
"Al presionar TAB en el editor actual, se insertará el carácter de tabulación. Presione {0} para activar o desactivar este comportamiento.",
|
||||
"Al presionar TAB en el editor actual, se insertará el carácter de tabulación. El comando {0} no se puede desencadenar actualmente mediante un enlace de teclado.",
|
||||
"Presione ahora Comando+H para abrir una ventana del explorador con más información relacionada con la accesibilidad del editor.",
|
||||
"Presione ahora Control+H para abrir una ventana del explorador con más información relacionada con la accesibilidad del editor.",
|
||||
"Para descartar esta información sobre herramientas y volver al editor, presione Esc o Mayús+Escape.",
|
||||
"Mostrar ayuda de accesibilidad",
|
||||
"Ayuda de accesibilidad",
|
||||
"Desarrollador: inspeccionar tokens",
|
||||
"Vaya a Línea/Columna...",
|
||||
"Mostrar todos los proveedores de acceso rápido",
|
||||
|
|
@ -853,6 +887,7 @@ define("vs/editor/editor.main.nls.es", {
|
|||
"Icono para \"Reemplazar todo\" en el widget de búsqueda del editor.",
|
||||
"Icono para \"Buscar anterior\" en el widget de búsqueda del editor.",
|
||||
"Icono para \"Buscar siguiente\" en el widget de búsqueda del editor.",
|
||||
"Buscar y reemplazar",
|
||||
"Buscar",
|
||||
"Buscar",
|
||||
"Coincidencia anterior",
|
||||
|
|
@ -1528,6 +1563,9 @@ define("vs/editor/editor.main.nls.es", {
|
|||
"Línea de diferencia insertada",
|
||||
"Línea de diferencia eliminada",
|
||||
"Línea de diferencia modificada",
|
||||
"Se envió una solicitud de chat",
|
||||
"Respuesta de chat recibida",
|
||||
"Respuesta de chat pendiente",
|
||||
],
|
||||
"vs/platform/configuration/common/configurationRegistry": [
|
||||
"La configuración del lenguaje predeterminada se reemplaza",
|
||||
|
|
@ -1767,7 +1805,9 @@ define("vs/editor/editor.main.nls.es", {
|
|||
"Color de contorno para el texto quitado.",
|
||||
"Color del borde entre ambos editores de texto.",
|
||||
"Color de relleno diagonal del editor de diferencias. El relleno diagonal se usa en las vistas de diferencias en paralelo.",
|
||||
"Color de los bloques sin modificar en el editor de diferencias.",
|
||||
"Color de fondo de los bloques sin modificar en el editor de diferencias.",
|
||||
"Color de primer plano de los bloques sin modificar en el editor de diferencias.",
|
||||
"Color de fondo del código sin modificar en el editor de diferencias.",
|
||||
"Color de fondo de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.",
|
||||
"Color de primer plano de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.",
|
||||
"Color de contorno de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, pero no cuando están inactivos.",
|
||||
|
|
|
|||
104
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.fr.js
generated
vendored
104
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.fr.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
@ -106,6 +106,10 @@ define("vs/editor/editor.main.nls.fr", {
|
|||
"Le nombre de curseurs a été limité à {0}. Envisagez d’utiliser [rechercher et remplacer](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) pour les modifications plus importantes ou augmentez la limite du nombre de curseurs multiples du paramètre.",
|
||||
"Augmenter la limite de curseurs multiples",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditor.contribution": [
|
||||
"Accéder à la différence suivante",
|
||||
"Accéder la différence précédente",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget": [
|
||||
"Élément décoratif de ligne pour les insertions dans l\'éditeur de différences.",
|
||||
"Élément décoratif de ligne pour les suppressions dans l\'éditeur de différences.",
|
||||
|
|
@ -113,6 +117,41 @@ define("vs/editor/editor.main.nls.fr", {
|
|||
"Impossible de comparer les fichiers car l\'un d\'eux est trop volumineux.",
|
||||
"Cliquez pour rétablir la modification",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/decorations": [
|
||||
"Élément décoratif de ligne pour les insertions dans l\'éditeur de différences.",
|
||||
"Élément décoratif de ligne pour les suppressions dans l\'éditeur de différences.",
|
||||
"Cliquez pour rétablir la modification",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors": [
|
||||
" utiliser Maj + F7 pour parcourir les modifications",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffReview": [
|
||||
"Icône de l\'option Insérer dans la revue des différences.",
|
||||
"Icône de l\'option Supprimer dans la revue des différences.",
|
||||
"Icône de l\'option Fermer dans la revue des différences.",
|
||||
"Fermer",
|
||||
"aucune ligne changée",
|
||||
"1 ligne changée",
|
||||
"{0} lignes changées",
|
||||
"Différence {0} sur {1} : ligne d\'origine {2}, {3}, ligne modifiée {4}, {5}",
|
||||
"vide",
|
||||
"{0} ligne inchangée {1}",
|
||||
"{0} ligne d\'origine {1} ligne modifiée {2}",
|
||||
"+ {0} ligne modifiée {1}",
|
||||
"- {0} ligne d\'origine {1}",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/inlineDiffDeletedCodeMargin": [
|
||||
"Copier les lignes supprimées",
|
||||
"Copier la ligne supprimée",
|
||||
"Copier les lignes modifiées",
|
||||
"Copier la ligne modifiée",
|
||||
"Copier la ligne supprimée ({0})",
|
||||
"Copier la ligne modifiée ({0})",
|
||||
"Annuler la modification",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/unchangedRanges": [
|
||||
"Replier la région inchangée",
|
||||
],
|
||||
"vs/editor/browser/widget/diffReview": [
|
||||
"Icône de l\'option Insérer dans la revue des différences.",
|
||||
"Icône de l\'option Supprimer dans la revue des différences.",
|
||||
|
|
@ -127,8 +166,6 @@ define("vs/editor/editor.main.nls.fr", {
|
|||
"{0} ligne d\'origine {1} ligne modifiée {2}",
|
||||
"+ {0} ligne modifiée {1}",
|
||||
"- {0} ligne d\'origine {1}",
|
||||
"Accéder à la différence suivante",
|
||||
"Accéder la différence précédente",
|
||||
],
|
||||
"vs/editor/browser/widget/inlineDiffMargin": [
|
||||
"Copier les lignes supprimées",
|
||||
|
|
@ -181,8 +218,10 @@ define("vs/editor/editor.main.nls.fr", {
|
|||
"Le retour automatique à la ligne dépend du paramètre {0}.",
|
||||
"Utilise l’algorithme de comparaison hérité.",
|
||||
"Utilise l’algorithme de comparaison avancé.",
|
||||
"Contrôle si l’éditeur de différences affiche les régions inchangées. Fonctionne uniquement lorsque \'diffEditor.experimental.useVersion2\' est défini.",
|
||||
"Contrôle si l’éditeur de différences affiche les régions inchangées. Fonctionne uniquement lorsque {0} est défini.",
|
||||
"Contrôle si l’éditeur de différences doit afficher les déplacements de code détectés. Ne fonctionne que si {0} est activé.",
|
||||
"Contrôle si l’éditeur de différences utilise la nouvelle ou l’ancienne implémentation.",
|
||||
"Contrôle si l’éditeur de différences affiche des décorations vides pour voir où les caractères ont été insérés ou supprimés.",
|
||||
],
|
||||
"vs/editor/common/config/editorOptions": [
|
||||
"Utiliser les API de la plateforme pour détecter si un lecteur d\'écran est attaché",
|
||||
|
|
@ -365,6 +404,7 @@ define("vs/editor/editor.main.nls.fr", {
|
|||
"Si activé, IntelliSense montre des suggestions de type \'utilisateur\'.",
|
||||
"Si activé, IntelliSense montre des suggestions de type \'problèmes\'.",
|
||||
"Indique si les espaces blancs de début et de fin doivent toujours être sélectionnés.",
|
||||
"Indique si les sous-mots (tels que « foo » dans « fooBar » ou « foo_bar ») doivent être sélectionnés.",
|
||||
"Aucune mise en retrait. Les lignes enveloppées commencent à la colonne 1.",
|
||||
"Les lignes enveloppées obtiennent la même mise en retrait que le parent.",
|
||||
"Les lignes justifiées obtiennent une mise en retrait +1 vers le parent.",
|
||||
|
|
@ -409,6 +449,10 @@ define("vs/editor/editor.main.nls.fr", {
|
|||
"Contrôle la famille de polices pour CodeLens.",
|
||||
"Contrôle la taille de police en pixels pour CodeLens. Quand la valeur est 0, 90 % de \'#editor.fontSize#\' est utilisé.",
|
||||
"Contrôle si l\'éditeur doit afficher les éléments décoratifs de couleurs inline et le sélecteur de couleurs.",
|
||||
"Faire apparaître le sélecteur de couleurs au clic et au pointage de l’élément décoratif de couleurs",
|
||||
"Faire apparaître le sélecteur de couleurs en survolant l’élément décoratif de couleurs",
|
||||
"Faire apparaître le sélecteur de couleurs en cliquant sur l’élément décoratif de couleurs",
|
||||
"Contrôle la condition pour faire apparaître un sélecteur de couleurs à partir d’un élément décoratif de couleurs",
|
||||
"Contrôle le nombre maximal d’éléments décoratifs de couleur qui peuvent être rendus simultanément dans un éditeur.",
|
||||
"Autoriser l\'utilisation de la souris et des touches pour sélectionner des colonnes.",
|
||||
"Contrôle si la coloration syntaxique doit être copiée dans le presse-papiers.",
|
||||
|
|
@ -531,9 +575,23 @@ define("vs/editor/editor.main.nls.fr", {
|
|||
"Couleur du curseur de l\'éditeur.",
|
||||
"La couleur de fond du curseur de l\'éditeur. Permet de personnaliser la couleur d\'un caractère survolé par un curseur de bloc.",
|
||||
"Couleur des espaces blancs dans l\'éditeur.",
|
||||
"Couleur des repères de retrait de l\'éditeur.",
|
||||
"Couleur des guides d\'indentation de l\'éditeur actif",
|
||||
"Couleur des numéros de ligne de l\'éditeur.",
|
||||
"Couleur des repères de retrait de l\'éditeur.",
|
||||
"\'editorIndentGuide.background\' is deprecated. Use \'editorIndentGuide.background1\' instead.",
|
||||
"Couleur des guides d\'indentation de l\'éditeur actif",
|
||||
"\'editorIndentGuide.activeBackground\' is deprecated. Use \'editorIndentGuide.activeBackground1\' instead.",
|
||||
"Color of the editor indentation guides (1).",
|
||||
"Color of the editor indentation guides (2).",
|
||||
"Color of the editor indentation guides (3).",
|
||||
"Color of the editor indentation guides (4).",
|
||||
"Color of the editor indentation guides (5).",
|
||||
"Color of the editor indentation guides (6).",
|
||||
"Color of the active editor indentation guides (1).",
|
||||
"Color of the active editor indentation guides (2).",
|
||||
"Color of the active editor indentation guides (3).",
|
||||
"Color of the active editor indentation guides (4).",
|
||||
"Color of the active editor indentation guides (5).",
|
||||
"Color of the active editor indentation guides (6).",
|
||||
"Couleur des numéros de lignes actives de l\'éditeur",
|
||||
"L’ID est déprécié. Utilisez à la place \'editorLineNumber.activeForeground\'.",
|
||||
"Couleur des numéros de lignes actives de l\'éditeur",
|
||||
|
|
@ -580,7 +638,7 @@ define("vs/editor/editor.main.nls.fr", {
|
|||
"Indique si le texte de l\'éditeur a le focus (le curseur clignote)",
|
||||
"Indique si l\'éditeur ou un widget de l\'éditeur a le focus (par exemple, le focus se trouve sur le widget de recherche)",
|
||||
"Indique si un éditeur ou une entrée de texte mis en forme a le focus (le curseur clignote)",
|
||||
"Indique si l\'éditeur est en lecture seule",
|
||||
"Indique si l’éditeur est en lecture seule",
|
||||
"Indique si le contexte est celui d\'un éditeur de différences",
|
||||
"Indique si le contexte est celui d’un éditeur de différences intégré",
|
||||
"Indique si \'editor.columnSelection\' est activé",
|
||||
|
|
@ -621,30 +679,6 @@ define("vs/editor/editor.main.nls.fr", {
|
|||
"Frappe en cours",
|
||||
],
|
||||
"vs/editor/common/standaloneStrings": [
|
||||
"Aucune sélection",
|
||||
"Ligne {0}, colonne {1} ({2} sélectionné)",
|
||||
"Ligne {0}, colonne {1}",
|
||||
"{0} sélections ({1} caractères sélectionnés)",
|
||||
"{0} sélections",
|
||||
"Remplacement du paramètre \'accessibilitySupport\' par \'on\'.",
|
||||
"Ouverture de la page de documentation sur l\'accessibilité de l\'éditeur.",
|
||||
"dans un volet en lecture seule d\'un éditeur de différences.",
|
||||
"dans un volet d\'un éditeur de différences.",
|
||||
" dans un éditeur de code en lecture seule",
|
||||
" dans un éditeur de code",
|
||||
"Pour configurer l\'éditeur de manière à être optimisé en cas d\'utilisation d\'un lecteur d\'écran, appuyez sur Commande+E maintenant.",
|
||||
"Pour configurer l\'éditeur de manière à être optimisé en cas d\'utilisation d\'un lecteur d\'écran, appuyez sur Contrôle+E maintenant.",
|
||||
"L\'éditeur est configuré pour être optimisé en cas d\'utilisation avec un lecteur d\'écran.",
|
||||
"L\'éditeur est configuré pour ne jamais être optimisé en cas d\'utilisation avec un lecteur d\'écran, ce qui n\'est pas le cas pour le moment.",
|
||||
"Appuyez sur Tab dans l\'éditeur pour déplacer le focus vers le prochain élément pouvant être désigné comme élément actif. Activez ou désactivez ce comportement en appuyant sur {0}.",
|
||||
"Appuyez sur Tab dans l\'éditeur pour déplacer le focus vers le prochain élément pouvant être désigné comme élément actif. La commande {0} ne peut pas être déclenchée par une combinaison de touches.",
|
||||
"Appuyez sur Tab dans l\'éditeur pour insérer le caractère de tabulation. Activez ou désactivez ce comportement en appuyant sur {0}.",
|
||||
"Appuyez sur Tab dans l\'éditeur pour insérer le caractère de tabulation. La commande {0} ne peut pas être déclenchée par une combinaison de touches.",
|
||||
"Appuyez sur Commande+H maintenant pour ouvrir une fenêtre de navigateur avec plus d\'informations sur l\'accessibilité de l\'éditeur.",
|
||||
"Appuyez sur Contrôle+H maintenant pour ouvrir une fenêtre de navigateur avec plus d\'informations sur l\'accessibilité de l\'éditeur.",
|
||||
"Vous pouvez masquer cette info-bulle et revenir à l\'éditeur en appuyant sur Échap ou Maj+Échap.",
|
||||
"Afficher l\'aide sur l\'accessibilité",
|
||||
"Aide sur l’accessibilité",
|
||||
"Développeur : Inspecter les jetons",
|
||||
"Accéder à la ligne/colonne...",
|
||||
"Afficher tous les fournisseurs d\'accès rapide",
|
||||
|
|
@ -853,6 +887,7 @@ define("vs/editor/editor.main.nls.fr", {
|
|||
"Icône de l\'option Tout remplacer dans le widget de recherche de l\'éditeur.",
|
||||
"Icône de l\'option Rechercher précédent dans le widget de recherche de l\'éditeur.",
|
||||
"Icône de l\'option Rechercher suivant dans le widget de recherche de l\'éditeur.",
|
||||
"Rechercher/remplacer",
|
||||
"Rechercher",
|
||||
"Rechercher",
|
||||
"Correspondance précédente",
|
||||
|
|
@ -1528,6 +1563,9 @@ define("vs/editor/editor.main.nls.fr", {
|
|||
"Ligne de diffusion insérée",
|
||||
"Ligne de diffusion supprimée",
|
||||
"Ligne diff modifiée",
|
||||
"Demande de conversation envoyée",
|
||||
"Réponse de conversation reçue",
|
||||
"Réponse de conversation en attente",
|
||||
],
|
||||
"vs/platform/configuration/common/configurationRegistry": [
|
||||
"Substitutions de configuration du langage par défaut",
|
||||
|
|
@ -1767,7 +1805,9 @@ define("vs/editor/editor.main.nls.fr", {
|
|||
"Couleur de contour du texte supprimé.",
|
||||
"Couleur de bordure entre les deux éditeurs de texte.",
|
||||
"Couleur du remplissage diagonal de l\'éditeur de différences. Le remplissage diagonal est utilisé dans les vues de différences côte à côte.",
|
||||
"Couleur des blocs inchangés dans l’éditeur de différences.",
|
||||
"Couleur d’arrière-plan des blocs inchangés dans l’éditeur de différences.",
|
||||
"Couleur de premier plan des blocs inchangés dans l’éditeur de différences.",
|
||||
"Couleur d’arrière-plan du code inchangé dans l’éditeur de différences.",
|
||||
"Couleur d\'arrière-plan de la liste/l\'arborescence pour l\'élément ayant le focus quand la liste/l\'arborescence est active. Une liste/arborescence active peut être sélectionnée au clavier, elle ne l\'est pas quand elle est inactive.",
|
||||
"Couleur de premier plan de la liste/l\'arborescence pour l\'élément ayant le focus quand la liste/l\'arborescence est active. Une liste/arborescence active peut être sélectionnée au clavier, elle ne l\'est pas quand elle est inactive.",
|
||||
"Couleur de contour de la liste/l\'arborescence pour l\'élément ayant le focus quand la liste/l\'arborescence est active. Une liste/arborescence active a le focus clavier, contrairement à une liste/arborescence inactive.",
|
||||
|
|
|
|||
102
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.it.js
generated
vendored
102
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.it.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
@ -106,6 +106,10 @@ define("vs/editor/editor.main.nls.it", {
|
|||
"Il numero di cursori è stato limitato a {0}. Provare a usare [Trova e sostituisci](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) per modifiche di dimensioni maggiori o aumentare l\'impostazione del limite di più cursori dell\'editor.",
|
||||
"Aumentare limite multi-cursore",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditor.contribution": [
|
||||
"Vai alla differenza successiva",
|
||||
"Vai alla differenza precedente",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget": [
|
||||
"Effetto di riga per gli inserimenti nell\'editor diff.",
|
||||
"Effetto di riga per le rimozioni nell\'editor diff.",
|
||||
|
|
@ -113,6 +117,41 @@ define("vs/editor/editor.main.nls.it", {
|
|||
"Non è possibile confrontare i file perché uno è troppo grande.",
|
||||
"Fare clic per annullare la modifica",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/decorations": [
|
||||
"Effetto di riga per gli inserimenti nell\'editor diff.",
|
||||
"Effetto di riga per le rimozioni nell\'editor diff.",
|
||||
"Fare clic per annullare la modifica",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors": [
|
||||
" usa MAIUSC +F7 per esplorare le modifiche",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffReview": [
|
||||
"Icona per \'Inserisci\' nella revisione diff.",
|
||||
"Icona per \'Rimuovi\' nella revisione diff.",
|
||||
"Icona per \'Chiudi\' nella revisione diff.",
|
||||
"Chiudi",
|
||||
"nessuna riga modificata",
|
||||
"1 riga modificata",
|
||||
"{0} righe modificate",
|
||||
"Differenza {0} di {1}: riga originale {2}, {3}, riga modificata {4}, {5}",
|
||||
"vuota",
|
||||
"{0} riga non modificata {1}",
|
||||
"{0} riga originale {1} riga modificata {2}",
|
||||
"+ {0} riga modificata {1}",
|
||||
"- {0} riga originale {1}",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/inlineDiffDeletedCodeMargin": [
|
||||
"Copia le righe eliminate",
|
||||
"Copia la riga eliminata",
|
||||
"Copia righe modificate",
|
||||
"Copia riga modificata",
|
||||
"Copia la riga eliminata ({0})",
|
||||
"Copia riga modificata ({0})",
|
||||
"Ripristina questa modifica",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/unchangedRanges": [
|
||||
"Ridurre area non modificata",
|
||||
],
|
||||
"vs/editor/browser/widget/diffReview": [
|
||||
"Icona per \'Inserisci\' nella revisione diff.",
|
||||
"Icona per \'Rimuovi\' nella revisione diff.",
|
||||
|
|
@ -127,8 +166,6 @@ define("vs/editor/editor.main.nls.it", {
|
|||
"{0} riga originale {1} riga modificata {2}",
|
||||
"+ {0} riga modificata {1}",
|
||||
"- {0} riga originale {1}",
|
||||
"Vai alla differenza successiva",
|
||||
"Vai alla differenza precedente",
|
||||
],
|
||||
"vs/editor/browser/widget/inlineDiffMargin": [
|
||||
"Copia le righe eliminate",
|
||||
|
|
@ -181,8 +218,10 @@ define("vs/editor/editor.main.nls.it", {
|
|||
"Le righe andranno a capo in base all\'impostazione {0}.",
|
||||
"Usare l\'algoritmo diffing legacy.",
|
||||
"Usare l\'algoritmo diffing avanzato.",
|
||||
"Controlla se l\'editor diff mostra aree non modificate. Funziona solo quando \'diffEditor.experimental.useVersion2\' è impostato.",
|
||||
"Controlla se l\'editor diff mostra aree non modificate. Funziona solo quando è impostato {0}.",
|
||||
"Controlla se l\'editor diff debba mostrare gli spostamenti di codice rilevati. Funziona solo quando è impostato {0}.",
|
||||
"Controlla se l\'editor diff usa la nuova o la precedente implementazione.",
|
||||
"Controlla se l\'editor diff mostra decorazioni vuote per vedere dove sono stati inseriti o eliminati caratteri.",
|
||||
],
|
||||
"vs/editor/common/config/editorOptions": [
|
||||
"Usare le API della piattaforma per rilevare quando viene collegata un\'utilità per la lettura dello schermo",
|
||||
|
|
@ -365,6 +404,7 @@ define("vs/editor/editor.main.nls.it", {
|
|||
"Se è abilitata, IntelliSense mostra i suggerimenti relativi a `user`.",
|
||||
"Se è abilitata, IntelliSense mostra i suggerimenti relativi a `issues`.",
|
||||
"Indica se gli spazi vuoti iniziali e finali devono essere sempre selezionati.",
|
||||
"Indica se è necessario selezionare le sottoparole ( come \'foo\' in \'fooBar\' o \'foo_bar\').",
|
||||
"Nessun rientro. Le righe con ritorno a capo iniziano dalla colonna 1. ",
|
||||
"Le righe con ritorno a capo hanno lo stesso rientro della riga padre.",
|
||||
"Le righe con ritorno a capo hanno un rientro di +1 rispetto alla riga padre.",
|
||||
|
|
@ -409,6 +449,10 @@ define("vs/editor/editor.main.nls.it", {
|
|||
"Controlla la famiglia di caratteri per CodeLens.",
|
||||
"Controlla le dimensioni del carattere in pixel per CodeLens. Quando è impostata su 0, viene usato il 90% del valore di \'#editor.fontSize#\'.",
|
||||
"Controlla se l\'editor deve eseguire il rendering della selezione colori e degli elementi Decorator di tipo colore inline.",
|
||||
"Fare in modo che la selezione colori venga visualizzata sia al clic che al passaggio del mouse sull’elemento Decorator colore",
|
||||
"Fare in modo che la selezione colori venga visualizzata al passaggio del mouse sull\'elemento Decorator colore",
|
||||
"Fare in modo che la selezione colori venga visualizzata quando si fa clic sull\'elemento Decorator colore",
|
||||
"Controlla la condizione in modo che venga visualizzata la selezione colori da un elemento Decorator colore.",
|
||||
"Controlla il numero massimo di elementi Decorator a colori di cui è possibile eseguire il rendering in un editor contemporaneamente.",
|
||||
"Abilita l\'uso di mouse e tasti per la selezione delle colonne.",
|
||||
"Controlla se l\'evidenziazione della sintassi deve essere copiata negli Appunti.",
|
||||
|
|
@ -531,9 +575,23 @@ define("vs/editor/editor.main.nls.it", {
|
|||
"Colore del cursore dell\'editor.",
|
||||
"Colore di sfondo del cursore editor. Permette di personalizzare il colore di un carattere quando sovrapposto da un blocco cursore.",
|
||||
"Colore dei caratteri di spazio vuoto nell\'editor.",
|
||||
"Colore delle guide per i rientri dell\'editor.",
|
||||
"Colore delle guide di indentazione dell\'editor attivo",
|
||||
"Colore dei numeri di riga dell\'editor.",
|
||||
"Colore delle guide per i rientri dell\'editor.",
|
||||
"\'editorIndentGuide.background\' is deprecated. Use \'editorIndentGuide.background1\' instead.",
|
||||
"Colore delle guide di indentazione dell\'editor attivo",
|
||||
"\'editorIndentGuide.activeBackground\' is deprecated. Use \'editorIndentGuide.activeBackground1\' instead.",
|
||||
"Color of the editor indentation guides (1).",
|
||||
"Color of the editor indentation guides (2).",
|
||||
"Color of the editor indentation guides (3).",
|
||||
"Color of the editor indentation guides (4).",
|
||||
"Color of the editor indentation guides (5).",
|
||||
"Color of the editor indentation guides (6).",
|
||||
"Color of the active editor indentation guides (1).",
|
||||
"Color of the active editor indentation guides (2).",
|
||||
"Color of the active editor indentation guides (3).",
|
||||
"Color of the active editor indentation guides (4).",
|
||||
"Color of the active editor indentation guides (5).",
|
||||
"Color of the active editor indentation guides (6).",
|
||||
"Colore del numero di riga attivo dell\'editor",
|
||||
"Id è deprecato. In alternativa usare \'editorLineNumber.activeForeground\'.",
|
||||
"Colore del numero di riga attivo dell\'editor",
|
||||
|
|
@ -621,30 +679,6 @@ define("vs/editor/editor.main.nls.it", {
|
|||
"Digitazione",
|
||||
],
|
||||
"vs/editor/common/standaloneStrings": [
|
||||
"Nessuna selezione",
|
||||
"Riga {0}, colonna {1} ({2} selezionate)",
|
||||
"Riga {0}, colonna {1}",
|
||||
"{0} selezioni ({1} caratteri selezionati)",
|
||||
"{0} selezioni",
|
||||
"Modifica dell\'impostazione `accessibilitySupport` in `on`.",
|
||||
"Apertura della pagina di documentazione sull\'accessibilità dell\'editor.",
|
||||
"in un riquadro di sola lettura di un editor diff.",
|
||||
"in un riquadro di un editor diff.",
|
||||
" in un editor di codice di sola lettura",
|
||||
" in un editor di codice",
|
||||
"Per configurare l\'editor da ottimizzare per l\'utilizzo con un\'utilità per la lettura dello schermo, premere Comando+E.",
|
||||
"Per configurare l\'editor da ottimizzare per l\'utilizzo con un\'utilità per la lettura dello schermo, premere CTRL+E.",
|
||||
"L\'editor è configurato per essere ottimizzato per l\'utilizzo con un\'utilità per la lettura dello schermo.",
|
||||
"L\'editor è configurato per non essere ottimizzato per l\'utilizzo con un\'utilità per la lettura dello schermo, che non viene usata in questo momento.",
|
||||
"Premere TAB nell\'editor corrente per spostare lo stato attivo sull\'elemento con stato attivabile successivo. Per attivare/disattivare questo comportamento, premere {0}.",
|
||||
"Premere TAB nell\'editor corrente per spostare lo stato attivo sull\'elemento con stato attivabile successivo. Il comando {0} non può essere attualmente attivato con un tasto di scelta rapida.",
|
||||
"Premere TAB nell\'editor corrente per inserire il carattere di tabulazione. Per attivare/disattivare questo comportamento, premere {0}.",
|
||||
"Premere TAB nell\'editor corrente per inserire il carattere di tabulazione. Il comando {0} non può essere attualmente attivato con un tasto di scelta rapida.",
|
||||
"Premere Comando+H per aprire una finestra del browser contenente maggiori informazioni correlate all\'accessibilità dell\'editor.",
|
||||
"Premere CTRL+H per aprire una finestra del browser contenente maggiori informazioni correlate all\'accessibilità dell\'editor.",
|
||||
"Per chiudere questa descrizione comando e tornare all\'editor, premere ESC o MAIUSC+ESC.",
|
||||
"Visualizza la Guida sull\'accessibilità",
|
||||
"Guida sull\'accessibilità",
|
||||
"Sviluppatore: Controlla token",
|
||||
"Vai a Riga/Colonna...",
|
||||
"Mostra tutti i provider di accesso rapido",
|
||||
|
|
@ -853,6 +887,7 @@ define("vs/editor/editor.main.nls.it", {
|
|||
"Icona per \'Sostituisci tutto\' nel widget di ricerca dell\'editor.",
|
||||
"Icona per \'Trova precedente\' nel widget di ricerca dell\'editor.",
|
||||
"Icona per \'Trova successivo\' nel widget di ricerca dell\'editor.",
|
||||
"Trova/Sostituisci",
|
||||
"Trova",
|
||||
"Trova",
|
||||
"Risultato precedente",
|
||||
|
|
@ -1528,6 +1563,9 @@ define("vs/editor/editor.main.nls.it", {
|
|||
"Riga diff inserita",
|
||||
"Riga diff eliminata",
|
||||
"Riga diff modificata",
|
||||
"Richiesta chat inviata",
|
||||
"Risposta chat ricevuta",
|
||||
"Risposta chat in sospeso",
|
||||
],
|
||||
"vs/platform/configuration/common/configurationRegistry": [
|
||||
"Override configurazione predefinita del linguaggio",
|
||||
|
|
@ -1767,7 +1805,9 @@ define("vs/editor/editor.main.nls.it", {
|
|||
"Colore del contorno del testo che è stato rimosso.",
|
||||
"Colore del bordo tra due editor di testo.",
|
||||
"Colore del riempimento diagonale dell\'editor diff. Il riempimento diagonale viene usato nelle visualizzazioni diff affiancate.",
|
||||
"Colore dei blocchi non modificati nell\'editor diff.",
|
||||
"Colore di sfondo dei blocchi non modificati nell\'editor diff.",
|
||||
"Colore di primo piano dei blocchi non modificati nell\'editor diff.",
|
||||
"Colore di sfondo del codice non modificato nell\'editor diff.",
|
||||
"Colore di sfondo dell\'elenco/albero per l\'elemento con lo stato attivo quando l\'elenco/albero è attivo. Un elenco/albero attivo ha lo stato attivo della tastiera, a differenza di uno inattivo.",
|
||||
"Colore primo piano dell\'elenco/albero per l\'elemento con lo stato attivo quando l\'elenco/albero è attivo. Un elenco/albero attivo ha lo stato attivo della tastiera, a differenza di uno inattivo.",
|
||||
"Colore del contorno dell\'elenco/albero per l\'elemento con lo stato attivo quando l\'elenco/albero è attivo. Un elenco/albero attivo ha lo stato attivo della tastiera, a differenza di uno inattivo.",
|
||||
|
|
|
|||
102
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.ja.js
generated
vendored
102
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.ja.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
@ -106,6 +106,10 @@ define("vs/editor/editor.main.nls.ja", {
|
|||
"カーソルの数は {0} に制限されています。大きな変更を行う場合は、[検索と置換](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) を使用することを検討してください。",
|
||||
"マルチ カーソルの上限を増やす",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditor.contribution": [
|
||||
"次の差分に移動",
|
||||
"前の差分に移動",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget": [
|
||||
"差分エディターで挿入を示す行の装飾。",
|
||||
"差分エディターで削除を示す行の装飾。",
|
||||
|
|
@ -113,6 +117,41 @@ define("vs/editor/editor.main.nls.ja", {
|
|||
"一方のファイルが大きすぎるため、ファイルを比較できません。",
|
||||
"クリックして変更を元に戻す",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/decorations": [
|
||||
"差分エディターで挿入を示す行の装飾。",
|
||||
"差分エディターで削除を示す行の装飾。",
|
||||
"クリックして変更を元に戻す",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors": [
|
||||
" Shift + F7 を使用して変更を移動する",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffReview": [
|
||||
"差分レビューでの \'挿入\' のアイコン。",
|
||||
"差分レビューでの \'削除\' のアイコン。",
|
||||
"差分レビューでの \'閉じる\' のアイコン。",
|
||||
"閉じる",
|
||||
"変更された行はありません",
|
||||
"1 行が変更されました",
|
||||
"{0} 行が変更されました",
|
||||
"相違 {0}/{1}: 元の行 {2}、{3}。変更された行 {4}、{5}",
|
||||
"空白",
|
||||
"{0} 変更されていない行 {1}",
|
||||
"{0} 元の行 {1} 変更された行 {2}",
|
||||
"+ {0} 変更された行 {1}",
|
||||
"- {0} 元の行 {1}",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/inlineDiffDeletedCodeMargin": [
|
||||
"削除された行のコピー",
|
||||
"削除された行のコピー",
|
||||
"変更された行のコピー",
|
||||
"変更された行のコピー",
|
||||
"削除された行のコピー ({0})",
|
||||
"変更された行のコピー ({0})",
|
||||
"この変更を元に戻す",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/unchangedRanges": [
|
||||
"変更されていない領域を折りたたむ",
|
||||
],
|
||||
"vs/editor/browser/widget/diffReview": [
|
||||
"差分レビューでの \'挿入\' のアイコン。",
|
||||
"差分レビューでの \'削除\' のアイコン。",
|
||||
|
|
@ -127,8 +166,6 @@ define("vs/editor/editor.main.nls.ja", {
|
|||
"{0} 元の行 {1} 変更された行 {2}",
|
||||
"+ {0} 変更された行 {1}",
|
||||
"- {0} 元の行 {1}",
|
||||
"次の差分に移動",
|
||||
"前の差分に移動",
|
||||
],
|
||||
"vs/editor/browser/widget/inlineDiffMargin": [
|
||||
"削除された行のコピー",
|
||||
|
|
@ -181,8 +218,10 @@ define("vs/editor/editor.main.nls.ja", {
|
|||
"行は、{0} の設定に従って折り返されます。",
|
||||
"従来の差分アルゴリズムを使用します。",
|
||||
"高度な差分アルゴリズムを使用します。",
|
||||
"差分エディターで変更されていない領域を表示するかどうかを制御します。\'diffEditor.experimental.useVersion2\' が設定されている場合にのみ機能します。",
|
||||
"差分エディターで変更されていない領域を表示するかどうかを制御します。{0} が設定されている場合にのみ機能します。",
|
||||
"差分エディターで検出されたコードの移動を表示するかどうかを制御します。{0} が設定されている場合にのみ機能します。",
|
||||
"差分エディターで新しい実装と古い実装のどちらを使用するかを制御します。",
|
||||
"文字が挿入または削除された場所を確認するために、差分エディターに空の装飾を表示するかどうかを制御します。",
|
||||
],
|
||||
"vs/editor/common/config/editorOptions": [
|
||||
"プラットフォーム API を使用して、スクリーン リーダーがいつ接続されたかを検出する",
|
||||
|
|
@ -365,6 +404,7 @@ define("vs/editor/editor.main.nls.ja", {
|
|||
"有効な場合、IntelliSense によって \'ユーザー\' 候補が示されます。",
|
||||
"有効にすると、IntelliSense によって \'問題\' 候補が示されます。",
|
||||
"先頭と末尾の空白を常に選択するかどうか。",
|
||||
"サブワード (\'fooBar\' の \'foo\' または \'foo_bar\' など) を選択する必要があるかどうか。",
|
||||
"インデントしません。 折り返し行は列 1 から始まります。",
|
||||
"折り返し行は、親と同じインデントになります。",
|
||||
"折り返し行は、親 +1 のインデントになります。",
|
||||
|
|
@ -409,6 +449,10 @@ define("vs/editor/editor.main.nls.ja", {
|
|||
"CodeLens のフォント ファミリを制御します。",
|
||||
"CodeLens のフォント サイズをピクセル単位で制御します。0 に設定すると、`#editor.fontSize#` の 90% が使用されます。",
|
||||
"エディターでインライン カラー デコレーターと色の選択を表示する必要があるかどうかを制御します。",
|
||||
"カラー デコレーターのクリック時とポイント時の両方にカラー ピッカーを表示する",
|
||||
"カラー デコレーターのポイント時にカラー ピッカーを表示する",
|
||||
"カラー デコレーターのクリック時にカラー ピッカーを表示する",
|
||||
"カラー デコレーターからカラー ピッカーを表示する条件を制御します",
|
||||
"エディターで一度にレンダリングできるカラー デコレーターの最大数を制御します。",
|
||||
"マウスとキーでの選択により列の選択を実行できるようにします。",
|
||||
"構文ハイライトをクリップボードにコピーするかどうかを制御します。",
|
||||
|
|
@ -531,9 +575,23 @@ define("vs/editor/editor.main.nls.ja", {
|
|||
"エディターのカーソルの色。",
|
||||
"選択された文字列の背景色です。選択された文字列の背景色をカスタマイズ出来ます。",
|
||||
"エディターのスペース文字の色。",
|
||||
"エディター インデント ガイドの色。",
|
||||
"アクティブなエディターのインデント ガイドの色。",
|
||||
"エディターの行番号の色。",
|
||||
"エディター インデント ガイドの色。",
|
||||
"\'editorIndentGuide.background\' is deprecated. Use \'editorIndentGuide.background1\' instead.",
|
||||
"アクティブなエディターのインデント ガイドの色。",
|
||||
"\'editorIndentGuide.activeBackground\' is deprecated. Use \'editorIndentGuide.activeBackground1\' instead.",
|
||||
"Color of the editor indentation guides (1).",
|
||||
"Color of the editor indentation guides (2).",
|
||||
"Color of the editor indentation guides (3).",
|
||||
"Color of the editor indentation guides (4).",
|
||||
"Color of the editor indentation guides (5).",
|
||||
"Color of the editor indentation guides (6).",
|
||||
"Color of the active editor indentation guides (1).",
|
||||
"Color of the active editor indentation guides (2).",
|
||||
"Color of the active editor indentation guides (3).",
|
||||
"Color of the active editor indentation guides (4).",
|
||||
"Color of the active editor indentation guides (5).",
|
||||
"Color of the active editor indentation guides (6).",
|
||||
"エディターのアクティブ行番号の色",
|
||||
"id は使用しないでください。代わりに \'EditorLineNumber.activeForeground\' を使用してください。",
|
||||
"エディターのアクティブ行番号の色",
|
||||
|
|
@ -621,30 +679,6 @@ define("vs/editor/editor.main.nls.ja", {
|
|||
"入力しています",
|
||||
],
|
||||
"vs/editor/common/standaloneStrings": [
|
||||
"選択されていません",
|
||||
"行 {0}、列 {1} ({2} 個選択済み)",
|
||||
"行 {0}、列 {1}",
|
||||
"{0} 個の選択項目 ({1} 文字を選択)",
|
||||
"{0} 個の選択項目",
|
||||
"`accessibilitySupport` 設定を \'on\' に変更しています。",
|
||||
"エディターのアクセシビリティに関連するドキュメント ページを開いています。",
|
||||
"差分エディターの読み取り専用ウィンドウ内。",
|
||||
"差分エディターのウィンドウ内。",
|
||||
"読み取り専用コード エディター内",
|
||||
"コード エディター内",
|
||||
"エディターを構成してスクリーン エディターで使用するように最適化するには、Command+E を押してください。",
|
||||
"エディターを構成してスクリーン リーダーで使用するように最適化するには、Control+E を押します。",
|
||||
"エディターは、スクリーン リーダーで使用するよう最適化されるように構成されています。",
|
||||
"エディターは、スクリーン リーダーで使用するよう最適化されないように構成されていますが、現時点でこの設定は当てはまりません。",
|
||||
"現在のエディターで Tab キーを押すと、次のフォーカス可能な要素にフォーカスを移動します。{0} を押すと、この動作が切り替わります。",
|
||||
"現在のエディターで Tab キーを押すと、次のフォーカス可能な要素にフォーカスを移動します。コマンド {0} は、キー バインドでは現在トリガーできません。",
|
||||
"現在のエディターで Tab キーを押すと、タブ文字が挿入されます。{0} を押すと、この動作が切り替わります。",
|
||||
"現在のエディターで Tab キーを押すと、タブ文字が挿入されます。コマンド {0} は、キー バインドでは現在トリガーできません。",
|
||||
"エディターのアクセシビリティに関する詳細情報が記されたブラウザー ウィンドウを開くには、Command+H を押してください。",
|
||||
"エディターのアクセシビリティに関する詳細情報が記されたブラウザー ウィンドウを開くには、Control+H を押してください。",
|
||||
"Esc キー か Shift+Esc を押すと、ヒントを消してエディターに戻ることができます。",
|
||||
"アクセシビリティのヘルプを表示します",
|
||||
"アクセシビリティのヘルプ",
|
||||
"開発者: トークンの検査",
|
||||
"行/列に移動する...",
|
||||
"すべてのクイック アクセス プロバイダーを表示",
|
||||
|
|
@ -853,6 +887,7 @@ define("vs/editor/editor.main.nls.ja", {
|
|||
"エディターの検索ウィジェット内の \'すべて置換\' のアイコン。",
|
||||
"エディターの検索ウィジェット内の \'前を検索\' のアイコン。",
|
||||
"エディターの検索ウィジェット内の \'次を検索\' のアイコン。",
|
||||
"検索/置換",
|
||||
"検索",
|
||||
"検索",
|
||||
"前の一致項目",
|
||||
|
|
@ -1528,6 +1563,9 @@ define("vs/editor/editor.main.nls.ja", {
|
|||
"差分行が挿入されました",
|
||||
"差分行が削除されました",
|
||||
"変更された差分行",
|
||||
"チャット要求が送信されました",
|
||||
"チャット応答を受信しました",
|
||||
"チャットの応答を保留中",
|
||||
],
|
||||
"vs/platform/configuration/common/configurationRegistry": [
|
||||
"既定の言語構成のオーバーライド",
|
||||
|
|
@ -1767,7 +1805,9 @@ define("vs/editor/editor.main.nls.ja", {
|
|||
"削除されたテキストの輪郭の色。",
|
||||
"2 つのテキスト エディターの間の境界線の色。",
|
||||
"差分エディターの対角線の塗りつぶし色。対角線の塗りつぶしは、横に並べて比較するビューで使用されます。",
|
||||
"差分エディター内の変更されていないブロックの色。",
|
||||
"差分エディター内の変更されていないブロックの背景色。",
|
||||
"差分エディター内の変更されていないブロックの前景色。",
|
||||
"差分エディター内の変更されていないコードの背景色。",
|
||||
"ツリーリストがアクティブのとき、フォーカスされた項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。",
|
||||
"ツリーリストがアクティブのとき、フォーカスされた項目のツリーリスト前景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。",
|
||||
"リストやツリーがアクティブな場合の、フォーカスされた項目のリストやツリーのアウトライン色。アクティブなリストやツリーにはキーボード フォーカスがあり、非アクティブにはこれがありません。",
|
||||
|
|
|
|||
110
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.js
generated
vendored
110
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
@ -109,6 +109,10 @@ define("vs/editor/editor.main.nls", {
|
|||
"The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.",
|
||||
"Increase Multi Cursor Limit"
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditor.contribution": [
|
||||
"Go to Next Difference",
|
||||
"Go to Previous Difference"
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget": [
|
||||
"Line decoration for inserts in the diff editor.",
|
||||
"Line decoration for removals in the diff editor.",
|
||||
|
|
@ -116,6 +120,41 @@ define("vs/editor/editor.main.nls", {
|
|||
"Cannot compare files because one file is too large.",
|
||||
"Click to revert change"
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/decorations": [
|
||||
"Line decoration for inserts in the diff editor.",
|
||||
"Line decoration for removals in the diff editor.",
|
||||
"Click to revert change"
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors": [
|
||||
" use Shift + F7 to navigate changes"
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffReview": [
|
||||
"Icon for 'Insert' in diff review.",
|
||||
"Icon for 'Remove' in diff review.",
|
||||
"Icon for 'Close' in diff review.",
|
||||
"Close",
|
||||
"no lines changed",
|
||||
"1 line changed",
|
||||
"{0} lines changed",
|
||||
"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",
|
||||
"blank",
|
||||
"{0} unchanged line {1}",
|
||||
"{0} original line {1} modified line {2}",
|
||||
"+ {0} modified line {1}",
|
||||
"- {0} original line {1}"
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/inlineDiffDeletedCodeMargin": [
|
||||
"Copy deleted lines",
|
||||
"Copy deleted line",
|
||||
"Copy changed lines",
|
||||
"Copy changed line",
|
||||
"Copy deleted line ({0})",
|
||||
"Copy changed line ({0})",
|
||||
"Revert this change"
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/unchangedRanges": [
|
||||
"Fold Unchanged Region"
|
||||
],
|
||||
"vs/editor/browser/widget/diffReview": [
|
||||
"Icon for 'Insert' in diff review.",
|
||||
"Icon for 'Remove' in diff review.",
|
||||
|
|
@ -129,9 +168,7 @@ define("vs/editor/editor.main.nls", {
|
|||
"{0} unchanged line {1}",
|
||||
"{0} original line {1} modified line {2}",
|
||||
"+ {0} modified line {1}",
|
||||
"- {0} original line {1}",
|
||||
"Go to Next Difference",
|
||||
"Go to Previous Difference"
|
||||
"- {0} original line {1}"
|
||||
],
|
||||
"vs/editor/browser/widget/inlineDiffMargin": [
|
||||
"Copy deleted lines",
|
||||
|
|
@ -184,8 +221,10 @@ define("vs/editor/editor.main.nls", {
|
|||
"Lines will wrap according to the {0} setting.",
|
||||
"Uses the legacy diffing algorithm.",
|
||||
"Uses the advanced diffing algorithm.",
|
||||
"Controls whether the diff editor shows unchanged regions. Only works when 'diffEditor.experimental.useVersion2' is set.",
|
||||
"Controls whether the diff editor uses the new or the old implementation."
|
||||
"Controls whether the diff editor shows unchanged regions. Only works when {0} is set.",
|
||||
"Controls whether the diff editor should show detected code moves. Only works when {0} is set.",
|
||||
"Controls whether the diff editor uses the new or the old implementation.",
|
||||
"Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted."
|
||||
],
|
||||
"vs/editor/common/config/editorOptions": [
|
||||
"Use platform APIs to detect when a Screen Reader is attached",
|
||||
|
|
@ -368,6 +407,7 @@ define("vs/editor/editor.main.nls", {
|
|||
"When enabled IntelliSense shows `user`-suggestions.",
|
||||
"When enabled IntelliSense shows `issues`-suggestions.",
|
||||
"Whether leading and trailing whitespace should always be selected.",
|
||||
"Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected.",
|
||||
"No indentation. Wrapped lines begin at column 1.",
|
||||
"Wrapped lines get the same indentation as the parent.",
|
||||
"Wrapped lines get +1 indentation toward the parent.",
|
||||
|
|
@ -412,6 +452,10 @@ define("vs/editor/editor.main.nls", {
|
|||
"Controls the font family for CodeLens.",
|
||||
"Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.",
|
||||
"Controls whether the editor should render the inline color decorators and color picker.",
|
||||
"Make the color picker appear both on click and hover of the color decorator",
|
||||
"Make the color picker appear on hover of the color decorator",
|
||||
"Make the color picker appear on click of the color decorator",
|
||||
"Controls the condition to make a color picker appear from a color decorator",
|
||||
"Controls the max number of color decorators that can be rendered in an editor at once.",
|
||||
"Enable that the selection with the mouse and keys is doing column selection.",
|
||||
"Controls whether syntax highlighting should be copied into the clipboard.",
|
||||
|
|
@ -534,9 +578,23 @@ define("vs/editor/editor.main.nls", {
|
|||
"Color of the editor cursor.",
|
||||
"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.",
|
||||
"Color of whitespace characters in the editor.",
|
||||
"Color of the editor indentation guides.",
|
||||
"Color of the active editor indentation guides.",
|
||||
"Color of editor line numbers.",
|
||||
"Color of the editor indentation guides.",
|
||||
"'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.",
|
||||
"Color of the active editor indentation guides.",
|
||||
"'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.",
|
||||
"Color of the editor indentation guides (1).",
|
||||
"Color of the editor indentation guides (2).",
|
||||
"Color of the editor indentation guides (3).",
|
||||
"Color of the editor indentation guides (4).",
|
||||
"Color of the editor indentation guides (5).",
|
||||
"Color of the editor indentation guides (6).",
|
||||
"Color of the active editor indentation guides (1).",
|
||||
"Color of the active editor indentation guides (2).",
|
||||
"Color of the active editor indentation guides (3).",
|
||||
"Color of the active editor indentation guides (4).",
|
||||
"Color of the active editor indentation guides (5).",
|
||||
"Color of the active editor indentation guides (6).",
|
||||
"Color of editor active line number",
|
||||
"Id is deprecated. Use 'editorLineNumber.activeForeground' instead.",
|
||||
"Color of editor active line number",
|
||||
|
|
@ -583,7 +641,7 @@ define("vs/editor/editor.main.nls", {
|
|||
"Whether the editor text has focus (cursor is blinking)",
|
||||
"Whether the editor or an editor widget has focus (e.g. focus is in the find widget)",
|
||||
"Whether an editor or a rich text input has focus (cursor is blinking)",
|
||||
"Whether the editor is read only",
|
||||
"Whether the editor is read-only",
|
||||
"Whether the context is a diff editor",
|
||||
"Whether the context is an embedded diff editor",
|
||||
"Whether `editor.columnSelection` is enabled",
|
||||
|
|
@ -624,30 +682,6 @@ define("vs/editor/editor.main.nls", {
|
|||
"Typing"
|
||||
],
|
||||
"vs/editor/common/standaloneStrings": [
|
||||
"No selection",
|
||||
"Line {0}, Column {1} ({2} selected)",
|
||||
"Line {0}, Column {1}",
|
||||
"{0} selections ({1} characters selected)",
|
||||
"{0} selections",
|
||||
"Now changing the setting `accessibilitySupport` to 'on'.",
|
||||
"Now opening the Editor Accessibility documentation page.",
|
||||
" in a read-only pane of a diff editor.",
|
||||
" in a pane of a diff editor.",
|
||||
" in a read-only code editor",
|
||||
" in a code editor",
|
||||
"To configure the editor to be optimized for usage with a Screen Reader press Command+E now.",
|
||||
"To configure the editor to be optimized for usage with a Screen Reader press Control+E now.",
|
||||
"The editor is configured to be optimized for usage with a Screen Reader.",
|
||||
"The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time.",
|
||||
"Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}.",
|
||||
"Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding.",
|
||||
"Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}.",
|
||||
"Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding.",
|
||||
"Press Command+H now to open a browser window with more information related to editor accessibility.",
|
||||
"Press Control+H now to open a browser window with more information related to editor accessibility.",
|
||||
"You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape.",
|
||||
"Show Accessibility Help",
|
||||
"Accessibility Help",
|
||||
"Developer: Inspect Tokens",
|
||||
"Go to Line/Column...",
|
||||
"Show all Quick Access Providers",
|
||||
|
|
@ -856,6 +890,7 @@ define("vs/editor/editor.main.nls", {
|
|||
"Icon for 'Replace All' in the editor find widget.",
|
||||
"Icon for 'Find Previous' in the editor find widget.",
|
||||
"Icon for 'Find Next' in the editor find widget.",
|
||||
"Find / Replace",
|
||||
"Find",
|
||||
"Find",
|
||||
"Previous Match",
|
||||
|
|
@ -1530,7 +1565,10 @@ define("vs/editor/editor.main.nls", {
|
|||
"Notebook Cell Failed",
|
||||
"Diff Line Inserted",
|
||||
"Diff Line Deleted",
|
||||
"Diff Line Modified"
|
||||
"Diff Line Modified",
|
||||
"Chat Request Sent",
|
||||
"Chat Response Received",
|
||||
"Chat Response Pending"
|
||||
],
|
||||
"vs/platform/configuration/common/configurationRegistry": [
|
||||
"Default Language Configuration Overrides",
|
||||
|
|
@ -1770,7 +1808,9 @@ define("vs/editor/editor.main.nls", {
|
|||
"Outline color for text that got removed.",
|
||||
"Border color between the two text editors.",
|
||||
"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.",
|
||||
"The color of unchanged blocks in diff editor.",
|
||||
"The background color of unchanged blocks in the diff editor.",
|
||||
"The foreground color of unchanged blocks in the diff editor.",
|
||||
"The background color of unchanged code in the diff editor.",
|
||||
"List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.",
|
||||
"List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.",
|
||||
"List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.",
|
||||
|
|
|
|||
102
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.ko.js
generated
vendored
102
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.ko.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
@ -106,6 +106,10 @@ define("vs/editor/editor.main.nls.ko", {
|
|||
"커서 수를 {0}개로 제한했습니다. 더 큰 변경 내용을 위해서는 [찾아서 교체](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace)를 사용하거나 편집기 다중 커서 제한 설정을 늘리는 것이 좋습니다.",
|
||||
"다중 커서 제한 늘리기",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditor.contribution": [
|
||||
"다음 다른 항목으로 이동",
|
||||
"다음 다른 항목으로 이동",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget": [
|
||||
"diff 편집기의 삽입에 대한 줄 데코레이션입니다.",
|
||||
"diff 편집기의 제거에 대한 줄 데코레이션입니다.",
|
||||
|
|
@ -113,6 +117,41 @@ define("vs/editor/editor.main.nls.ko", {
|
|||
"파일 1개가 너무 커서 파일을 비교할 수 없습니다.",
|
||||
"변경 내용을 되돌리려면 클릭",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/decorations": [
|
||||
"diff 편집기의 삽입에 대한 줄 데코레이션입니다.",
|
||||
"diff 편집기의 제거에 대한 줄 데코레이션입니다.",
|
||||
"변경 내용을 되돌리려면 클릭",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors": [
|
||||
" Shift + F7을 사용하여 변경 내용 탐색",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffReview": [
|
||||
"Diff 검토에서 \'삽입\'의 아이콘입니다.",
|
||||
"Diff 검토에서 \'제거\'의 아이콘입니다.",
|
||||
"Diff 검토에서 \'닫기\'의 아이콘입니다.",
|
||||
"닫기",
|
||||
"변경된 줄 없음",
|
||||
"선 1개 변경됨",
|
||||
"줄 {0}개 변경됨",
|
||||
"차이 {0}/{1}: 원래 줄 {2}, {3}, 수정된 줄 {4}, {5}",
|
||||
"비어 있음",
|
||||
"{0} 변경되지 않은 줄 {1}",
|
||||
"{0} 원래 줄 {1} 수정된 줄 {2}",
|
||||
"+ {0} 수정된 줄 {1}",
|
||||
"- {0} 원래 줄 {1}",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/inlineDiffDeletedCodeMargin": [
|
||||
"삭제된 줄 복사",
|
||||
"삭제된 줄 복사",
|
||||
"변경된 줄 복사",
|
||||
"변경된 줄 복사",
|
||||
"삭제된 줄 복사({0})",
|
||||
"변경된 줄({0}) 복사",
|
||||
"이 변경 내용 되돌리기",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/unchangedRanges": [
|
||||
"변경되지 않은 영역 접기",
|
||||
],
|
||||
"vs/editor/browser/widget/diffReview": [
|
||||
"Diff 검토에서 \'삽입\'의 아이콘입니다.",
|
||||
"Diff 검토에서 \'제거\'의 아이콘입니다.",
|
||||
|
|
@ -127,8 +166,6 @@ define("vs/editor/editor.main.nls.ko", {
|
|||
"{0} 원래 줄 {1} 수정된 줄 {2}",
|
||||
"+ {0} 수정된 줄 {1}",
|
||||
"- {0} 원래 줄 {1}",
|
||||
"다음 다른 항목으로 이동",
|
||||
"다음 다른 항목으로 이동",
|
||||
],
|
||||
"vs/editor/browser/widget/inlineDiffMargin": [
|
||||
"삭제된 줄 복사",
|
||||
|
|
@ -181,8 +218,10 @@ define("vs/editor/editor.main.nls.ko", {
|
|||
"줄은 {0} 설정에 따라 줄 바꿈됩니다.",
|
||||
"레거시 비교 알고리즘을 사용합니다.",
|
||||
"고급 비교 알고리즘을 사용합니다.",
|
||||
"Diff 편집기에 변경되지 않은 영역이 표시되는지 여부를 제어합니다. \'diffEditor.experimental.useVersion2\'가 설정된 경우에만 작동합니다.",
|
||||
"diff 편집기가 변경되지 않은 영역을 표시할지 여부를 제어합니다. {0}이(가) 설정된 경우에만 작동합니다.",
|
||||
"diff 편집기가 감지된 코드 이동을 표시할지 여부를 제어합니다. {0}이(가) 설정된 경우에만 작동합니다.",
|
||||
"diff 편집기에서 새 구현을 사용하는지 또는 이전 구현을 사용하는지 여부를 제어합니다.",
|
||||
"문자가 삽입되거나 삭제된 위치를 볼 수 있도록 diff 편집기에 빈 장식적 요소를 표시할지 여부를 제어합니다.",
|
||||
],
|
||||
"vs/editor/common/config/editorOptions": [
|
||||
"플랫폼 API를 사용하여 화면 읽기 프로그램이 연결된 경우 감지",
|
||||
|
|
@ -365,6 +404,7 @@ define("vs/editor/editor.main.nls.ko", {
|
|||
"IntelliSense를 사용하도록 설정하면 `user`-제안이 표시됩니다.",
|
||||
"IntelliSense를 사용하도록 설정한 경우 `issues`-제안을 표시합니다.",
|
||||
"선행 및 후행 공백을 항상 선택해야 하는지 여부입니다.",
|
||||
"하위 단어(예: \'fooBar\'의 \'foo\' 또는 \'foo_bar\')를 선택해야 하는지 여부입니다.",
|
||||
"들여쓰기가 없습니다. 줄 바꿈 행이 열 1에서 시작됩니다.",
|
||||
"줄 바꿈 행의 들여쓰기가 부모와 동일합니다.",
|
||||
"줄 바꿈 행이 부모 쪽으로 +1만큼 들여쓰기됩니다.",
|
||||
|
|
@ -409,6 +449,10 @@ define("vs/editor/editor.main.nls.ko", {
|
|||
"CodeLens의 글꼴 패밀리를 제어합니다.",
|
||||
"CodeLens의 글꼴 크기(픽셀)를 제어합니다. 0으로 설정하면 `#editor.fontSize#`의 90%가 사용됩니다.",
|
||||
"편집기에서 인라인 색 데코레이터 및 색 선택을 렌더링할지를 제어합니다.",
|
||||
"색 데코레이터를 클릭하고 마우스로 가리킬 때 색 선택기를 표시합니다.",
|
||||
"색 데코레이터를 마우스로 가리키면 색 선택기가 표시되도록 설정",
|
||||
"색 데코레이터를 클릭할 때 색 선택기를 표시합니다.",
|
||||
"색 데코레이터에서 색 선택기를 표시하도록 조건을 제어합니다.",
|
||||
"편집기에서 한 번에 렌더링할 수 있는 최대 색 데코레이터 수를 제어합니다.",
|
||||
"마우스와 키로 선택한 영역에서 열을 선택하도록 설정합니다.",
|
||||
"구문 강조 표시를 클립보드로 복사할지 여부를 제어합니다.",
|
||||
|
|
@ -531,9 +575,23 @@ define("vs/editor/editor.main.nls.ko", {
|
|||
"편집기 커서 색입니다.",
|
||||
"편집기 커서의 배경색입니다. 블록 커서와 겹치는 글자의 색상을 사용자 정의할 수 있습니다.",
|
||||
"편집기의 공백 문자 색입니다.",
|
||||
"편집기 들여쓰기 안내선 색입니다.",
|
||||
"활성 편집기 들여쓰기 안내선 색입니다.",
|
||||
"편집기 줄 번호 색입니다.",
|
||||
"편집기 들여쓰기 안내선 색입니다.",
|
||||
"\'editorIndentGuide.background\' is deprecated. Use \'editorIndentGuide.background1\' instead.",
|
||||
"활성 편집기 들여쓰기 안내선 색입니다.",
|
||||
"\'editorIndentGuide.activeBackground\' is deprecated. Use \'editorIndentGuide.activeBackground1\' instead.",
|
||||
"Color of the editor indentation guides (1).",
|
||||
"Color of the editor indentation guides (2).",
|
||||
"Color of the editor indentation guides (3).",
|
||||
"Color of the editor indentation guides (4).",
|
||||
"Color of the editor indentation guides (5).",
|
||||
"Color of the editor indentation guides (6).",
|
||||
"Color of the active editor indentation guides (1).",
|
||||
"Color of the active editor indentation guides (2).",
|
||||
"Color of the active editor indentation guides (3).",
|
||||
"Color of the active editor indentation guides (4).",
|
||||
"Color of the active editor indentation guides (5).",
|
||||
"Color of the active editor indentation guides (6).",
|
||||
"편집기 활성 영역 줄번호 색상",
|
||||
"ID는 사용되지 않습니다. 대신 \'editorLineNumber.activeForeground\'를 사용하세요.",
|
||||
"편집기 활성 영역 줄번호 색상",
|
||||
|
|
@ -621,30 +679,6 @@ define("vs/editor/editor.main.nls.ko", {
|
|||
"입력하는 중",
|
||||
],
|
||||
"vs/editor/common/standaloneStrings": [
|
||||
"없음 선택",
|
||||
"줄 {0}, 열 {1}({2} 선택됨)입니다.",
|
||||
"행 {0}, 열 {1}",
|
||||
"{0} 선택 항목({1}자 선택됨)",
|
||||
"{0} 선택 항목",
|
||||
"이제 \'accessibilitySupport\' 설정을 \'on\'으로 변경합니다.",
|
||||
"지금 편집기 접근성 문서 페이지를 여세요.",
|
||||
"차이 편집기의 읽기 전용 창에서.",
|
||||
"diff 편집기 창에서.",
|
||||
" 읽기 전용 코드 편집기에서",
|
||||
" 코드 편집기에서",
|
||||
"화면 판독기 사용에 최적화되도록 편집기를 구성하려면 지금 Command+E를 누르세요.",
|
||||
"화면 판독기에 사용할 수 있도록 편집기를 최적화하려면 지금 Ctrl+E를 누르세요.",
|
||||
"에디터를 화면 판독기와 함께 사용하기에 적합하도록 구성했습니다.",
|
||||
"편집기는 화면 판독기 사용을 위해 절대로 최적화되지 않도록 구성됩니다. 현재로서는 그렇지 않습니다.",
|
||||
"현재 편집기에서 <Tab> 키를 누르면 포커스가 다음 포커스 가능한 요소로 이동합니다. {0}을(를) 눌러서 이 동작을 설정/해제합니다.",
|
||||
"현재 편집기에서 <Tab> 키를 누르면 포커스가 다음 포커스 가능한 요소로 이동합니다. {0} 명령은 현재 키 바인딩으로 트리거할 수 없습니다.",
|
||||
"현재 편집기에서 <Tab> 키를 누르면 탭 문자가 삽입됩니다. {0}을(를) 눌러서 이 동작을 설정/해제합니다.",
|
||||
"현재 편집기에서 <Tab> 키를 누르면 탭 문자가 삽입됩니다. {0} 명령은 현재 키 바인딩으로 트리거할 수 없습니다.",
|
||||
"Command+H를 눌러 편집기 접근성과 관련된 자세한 정보가 있는 브라우저 창을 여세요.",
|
||||
"Ctrl+H를 눌러 편집기 접근성과 관련된 자세한 정보가 있는 브라우저 창을 엽니다.",
|
||||
"이 도구 설명을 해제하고 Esc 키 또는 Shift+Esc를 눌러서 편집기로 돌아갈 수 있습니다.",
|
||||
"접근성 도움말 표시",
|
||||
"접근성 도움말",
|
||||
"개발자: 검사 토큰",
|
||||
"줄/열로 이동...",
|
||||
"빠른 액세스 공급자 모두 표시",
|
||||
|
|
@ -853,6 +887,7 @@ define("vs/editor/editor.main.nls.ko", {
|
|||
"편집기 찾기 위젯에서 \'모두 바꾸기\'의 아이콘입니다.",
|
||||
"편집기 찾기 위젯에서 \'이전 찾기\'의 아이콘입니다.",
|
||||
"편집기 찾기 위젯에서 \'다음 찾기\'의 아이콘입니다.",
|
||||
"찾기/바꾸기",
|
||||
"찾기",
|
||||
"찾기",
|
||||
"이전 검색 결과",
|
||||
|
|
@ -1528,6 +1563,9 @@ define("vs/editor/editor.main.nls.ko", {
|
|||
"Diff 줄 삽입됨",
|
||||
"Diff 줄 삭제됨",
|
||||
"Diff 줄 수정됨",
|
||||
"채팅 요청 전송됨",
|
||||
"채팅 응답 수신됨",
|
||||
"채팅 응답 대기 중",
|
||||
],
|
||||
"vs/platform/configuration/common/configurationRegistry": [
|
||||
"기본 언어 구성 재정의",
|
||||
|
|
@ -1767,7 +1805,9 @@ define("vs/editor/editor.main.nls.ko", {
|
|||
"제거된 텍스트의 윤곽선 색입니다.",
|
||||
"두 텍스트 편집기 사이의 테두리 색입니다.",
|
||||
"diff 편집기의 대각선 채우기 색입니다. 대각선 채우기는 diff 나란히 보기에서 사용됩니다.",
|
||||
"diff 편집기에서 변경되지 않은 블록의 색입니다.",
|
||||
"diff 편집기에서 변경되지 않은 블록의 배경색입니다.",
|
||||
"diff 편집기에서 변경되지 않은 블록의 전경색입니다.",
|
||||
"diff 편집기에서 변경되지 않은 코드의 배경색입니다.",
|
||||
"목록/트리가 활성 상태인 경우 포커스가 있는 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.",
|
||||
"목록/트리가 활성 상태인 경우 포커스가 있는 항목의 목록/트리 전경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.",
|
||||
"목록/트리가 활성 상태인 경우 포커스가 있는 항목의 목록/트리 윤곽선 색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.",
|
||||
|
|
|
|||
104
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.ru.js
generated
vendored
104
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.ru.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
@ -106,6 +106,10 @@ define("vs/editor/editor.main.nls.ru", {
|
|||
"Число курсоров ограничено {0}. Для проведения крупных изменений рекомендуется использовать [поиск и замену](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) или увеличить значение параметра ограничения нескольких курсоров в редакторе.",
|
||||
"Увеличить значение ограничения нескольких курсоров",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditor.contribution": [
|
||||
"Перейти к следующему различию",
|
||||
"Перейти к предыдущему различию",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget": [
|
||||
"Оформление строки для вставок в редакторе несовпадений.",
|
||||
"Оформление строки для удалений в редакторе несовпадений.",
|
||||
|
|
@ -113,6 +117,41 @@ define("vs/editor/editor.main.nls.ru", {
|
|||
"Нельзя сравнить файлы, потому что один из файлов слишком большой.",
|
||||
"Выберите, чтобы отменить изменение",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/decorations": [
|
||||
"Оформление строки для вставок в редакторе несовпадений.",
|
||||
"Оформление строки для удалений в редакторе несовпадений.",
|
||||
"Выберите, чтобы отменить изменение",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors": [
|
||||
" используйте SHIFT + F7 для навигации по изменениям",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffReview": [
|
||||
"Значок для кнопки \"Вставить\" в окне проверки несовпадений.",
|
||||
"Значок для кнопки \"Удалить\" в окне проверки несовпадений.",
|
||||
"Значок для кнопки \"Закрыть\" в окне проверки несовпадений.",
|
||||
"Закрыть",
|
||||
"строки не изменены",
|
||||
"1 строка изменена",
|
||||
"{0} строк изменено",
|
||||
"Различие {0} из {1}: исходная строка {2}, {3}, измененная строка {4}, {5}",
|
||||
"пустой",
|
||||
"{0} неизмененная строка {1}",
|
||||
"{0} исходная строка {1} измененная строка {2}",
|
||||
"+ {0} измененная строка {1}",
|
||||
"- {0} исходная строка {1}",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/inlineDiffDeletedCodeMargin": [
|
||||
"Копировать удаленные строки",
|
||||
"Копировать удаленную строку",
|
||||
"Копировать измененные строки",
|
||||
"Копировать измененную строку",
|
||||
"Копировать удаленную строку ({0})",
|
||||
"Копировать измененную строку ({0})",
|
||||
"Отменить это изменение",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/unchangedRanges": [
|
||||
"Свернуть неизмененную область",
|
||||
],
|
||||
"vs/editor/browser/widget/diffReview": [
|
||||
"Значок для кнопки \"Вставить\" в окне проверки несовпадений.",
|
||||
"Значок для кнопки \"Удалить\" в окне проверки несовпадений.",
|
||||
|
|
@ -127,8 +166,6 @@ define("vs/editor/editor.main.nls.ru", {
|
|||
"{0} исходная строка {1} измененная строка {2}",
|
||||
"+ {0} измененная строка {1}",
|
||||
"- {0} исходная строка {1}",
|
||||
"Перейти к следующему различию",
|
||||
"Перейти к предыдущему различию",
|
||||
],
|
||||
"vs/editor/browser/widget/inlineDiffMargin": [
|
||||
"Копировать удаленные строки",
|
||||
|
|
@ -181,8 +218,10 @@ define("vs/editor/editor.main.nls.ru", {
|
|||
"Строки будут переноситься в соответствии с настройкой {0}.",
|
||||
"Использует устаревший алгоритм сравнения.",
|
||||
"Использует расширенный алгоритм сравнения.",
|
||||
"Определяет, отображает ли редактор несовпадений неизмененные регионы. Работает только при настройке параметра \"diffEditor.experimental.useVersion2\".",
|
||||
"Определяет, отображает ли редактор несовпадений неизмененные регионы. Работает только при настройке параметра {0}.",
|
||||
"Определяет, должен ли редактор несовпадений показывать обнаруженные перемещения кода. Работает только при настройке параметра {0}.",
|
||||
"Определяет реализацию, используемую редактором несовпадений (новая или старая реализация).",
|
||||
"Определяет, отображает ли редактор несовпадений пустые элементы оформления, чтобы увидеть, где вставлены или удалены символы.",
|
||||
],
|
||||
"vs/editor/common/config/editorOptions": [
|
||||
"Использовать API-интерфейсы платформы, чтобы определять, подключено ли средство чтения с экрана",
|
||||
|
|
@ -365,6 +404,7 @@ define("vs/editor/editor.main.nls.ru", {
|
|||
"Во включенном состоянии IntelliSense показывает предложения типа \"пользователи\".",
|
||||
"Во включенном состоянии IntelliSense отображает предложения типа \"проблемы\".",
|
||||
"Должны ли всегда быть выбраны начальный и конечный пробелы.",
|
||||
"Следует ли выбирать вложенные слова (например, \"foo\" в \"fooBar\" или \"foo_bar\").",
|
||||
"Без отступа. Перенос строк начинается со столбца 1.",
|
||||
"Перенесенные строки получат тот же отступ, что и родительская строка.",
|
||||
"Перенесенные строки получат отступ, увеличенный на единицу по сравнению с родительской строкой. ",
|
||||
|
|
@ -409,6 +449,10 @@ define("vs/editor/editor.main.nls.ru", {
|
|||
"Управляет семейством шрифтов для CodeLens.",
|
||||
"Определяет размер шрифта в пикселях для CodeLens. Если задано значение 0, то используется 90% от размера #editor.fontSize#.",
|
||||
"Определяет, должны ли в редакторе отображаться внутренние декораторы цвета и средство выбора цвета.",
|
||||
"Показывать палитру при щелчке и при наведении указателя на декоратор цвета",
|
||||
"Показывать палитру при наведении указателя на декоратор цвета",
|
||||
"Показывать палитру при щелчке декоратора цвета",
|
||||
"Управляет условием отображения палитры в декораторе цвета",
|
||||
"Управляет максимальным количеством цветовых декораторов, которые можно отрисовать в редакторе одновременно.",
|
||||
"Включение того, что выбор с помощью клавиатуры и мыши приводит к выбору столбца.",
|
||||
"Определяет, будет ли текст скопирован в буфер обмена с подсветкой синтаксиса.",
|
||||
|
|
@ -531,9 +575,23 @@ define("vs/editor/editor.main.nls.ru", {
|
|||
"Цвет курсора редактора.",
|
||||
"Цвет фона курсора редактора. Позволяет настраивать цвет символа, перекрываемого прямоугольным курсором.",
|
||||
"Цвет пробелов в редакторе.",
|
||||
"Цвет направляющих для отступов редактора.",
|
||||
"Цвет активных направляющих для отступов редактора.",
|
||||
"Цвет номеров строк редактора.",
|
||||
"Цвет направляющих для отступов редактора.",
|
||||
"\'editorIndentGuide.background\' is deprecated. Use \'editorIndentGuide.background1\' instead.",
|
||||
"Цвет активных направляющих для отступов редактора.",
|
||||
"\'editorIndentGuide.activeBackground\' is deprecated. Use \'editorIndentGuide.activeBackground1\' instead.",
|
||||
"Color of the editor indentation guides (1).",
|
||||
"Color of the editor indentation guides (2).",
|
||||
"Color of the editor indentation guides (3).",
|
||||
"Color of the editor indentation guides (4).",
|
||||
"Color of the editor indentation guides (5).",
|
||||
"Color of the editor indentation guides (6).",
|
||||
"Color of the active editor indentation guides (1).",
|
||||
"Color of the active editor indentation guides (2).",
|
||||
"Color of the active editor indentation guides (3).",
|
||||
"Color of the active editor indentation guides (4).",
|
||||
"Color of the active editor indentation guides (5).",
|
||||
"Color of the active editor indentation guides (6).",
|
||||
"Цвет номера активной строки редактора",
|
||||
"Параметр \'Id\' является устаревшим. Используйте вместо него параметр \'editorLineNumber.activeForeground\'.",
|
||||
"Цвет номера активной строки редактора",
|
||||
|
|
@ -580,7 +638,7 @@ define("vs/editor/editor.main.nls.ru", {
|
|||
"Находится ли фокус на тексте в редакторе (курсор мигает)",
|
||||
"Находится ли фокус на редакторе или на мини-приложении редактора (например, фокус находится на мини-приложении поиска)",
|
||||
"Находится ли фокус на редакторе или на поле ввода форматированного текста (курсор мигает)",
|
||||
"Доступен ли редактор только для чтения",
|
||||
"Является ли редактор доступным только для чтения",
|
||||
"Является ли контекст редактором несовпадений",
|
||||
"Является ли контекст внедренным редактором несовпадений",
|
||||
"Включен ли параметр \"editor.columnSelection\"",
|
||||
|
|
@ -621,30 +679,6 @@ define("vs/editor/editor.main.nls.ru", {
|
|||
"Ввод",
|
||||
],
|
||||
"vs/editor/common/standaloneStrings": [
|
||||
"Ничего не выбрано",
|
||||
"Строка {0}, столбец {1} (выбрано: {2})",
|
||||
"Строка {0}, столбец {1}",
|
||||
"Выделений: {0} (выделено символов: {1})",
|
||||
"Выделений: {0}",
|
||||
"Теперь для параметра \"accessibilitySupport\" устанавливается значение \"вкл\".",
|
||||
"Открывается страница документации о специальных возможностях редактора.",
|
||||
"в панели только для чтения редактора несовпадений.",
|
||||
"на панели редактора несовпадений.",
|
||||
" в редакторе кода только для чтения",
|
||||
" в редакторе кода",
|
||||
"Чтобы оптимизировать редактор для использования со средством чтения с экрана, нажмите COMMAND+E.",
|
||||
"Чтобы оптимизировать редактор для использования со средством чтения с экрана, нажмите CTRL+E.",
|
||||
"Редактор настроен для оптимальной работы со средством чтения с экрана.",
|
||||
"Редактор настроен без оптимизации для использования средства чтения с экрана, что не подходит в данной ситуации.",
|
||||
"При нажатии клавиши TAB в текущем редакторе фокус ввода переместится на следующий элемент, способный его принять. Чтобы изменить это поведение, нажмите клавишу {0}.",
|
||||
"При нажатии клавиши TAB в текущем редакторе фокус ввода переместится на следующий элемент, способный его принять. Команду {0} сейчас невозможно выполнить с помощью настраиваемого сочетания клавиш.",
|
||||
"При нажатии клавиши TAB в текущем редакторе будет вставлен символ табуляции. Чтобы изменить это поведение, нажмите клавишу {0}.",
|
||||
"При нажатии клавиши TAB в текущем редакторе будет вставлен символ табуляции. Команду {0} сейчас невозможно выполнить с помощью настраиваемого сочетания клавиш.",
|
||||
"Нажмите COMMAND+H, чтобы открыть окно браузера с дополнительной информацией о специальных возможностях редактора.",
|
||||
"Нажмите CTRL+H, чтобы открыть окно браузера с дополнительной информацией о специальных возможностях редактора.",
|
||||
"Вы можете закрыть эту подсказку и вернуться в редактор, нажав клавиши ESCAPE или SHIFT+ESCAPE.",
|
||||
"Показать справку по специальным возможностям",
|
||||
"Справка по специальным возможностям",
|
||||
"Разработчик: проверить токены",
|
||||
"Перейти к строке/столбцу...",
|
||||
"Показать всех поставщиков быстрого доступа",
|
||||
|
|
@ -853,6 +887,7 @@ define("vs/editor/editor.main.nls.ru", {
|
|||
"Значок для кнопки \"Заменить все\" в мини-приложении поиска в редакторе.",
|
||||
"Значок для кнопки \"Найти ранее\" в мини-приложении поиска в редакторе.",
|
||||
"Значок для кнопки \"Найти далее\" в мини-приложении поиска в редакторе.",
|
||||
"Поиск и замена",
|
||||
"Найти",
|
||||
"Найти",
|
||||
"Предыдущее совпадение",
|
||||
|
|
@ -1528,6 +1563,9 @@ define("vs/editor/editor.main.nls.ru", {
|
|||
"Вставлена разностная строка",
|
||||
"Удалена разностная строка",
|
||||
"Изменена строка различий",
|
||||
"Отправлен запрос на чат",
|
||||
"Получен ответ чата",
|
||||
"Ожидание ответа чата",
|
||||
],
|
||||
"vs/platform/configuration/common/configurationRegistry": [
|
||||
"Переопределения конфигурации языка по умолчанию",
|
||||
|
|
@ -1767,7 +1805,9 @@ define("vs/editor/editor.main.nls.ru", {
|
|||
"Цвет контура для удаленных строк.",
|
||||
"Цвет границы между двумя текстовыми редакторами.",
|
||||
"Цвет диагональной заливки для редактора несовпадений. Диагональная заливка используется в размещаемых рядом представлениях несовпадений.",
|
||||
"Цвет неизмененных блоков в редакторе несовпадений.",
|
||||
"Цвет фона неизмененных блоков в редакторе несовпадений.",
|
||||
"Цвет переднего плана неизмененных блоков в редакторе несовпадений.",
|
||||
"Цвет фона неизмененного кода в редакторе несовпадений.",
|
||||
"Фоновый цвет находящегося в фокусе элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.",
|
||||
"Цвет переднего плана находящегося в фокусе элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.",
|
||||
"Цвет контура находящегося в фокусе элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.",
|
||||
|
|
|
|||
102
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.zh-cn.js
generated
vendored
102
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.zh-cn.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
@ -106,6 +106,10 @@ define("vs/editor/editor.main.nls.zh-cn", {
|
|||
"已将光标数限制为 {0}。请考虑使用 [查找和替换](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace)进行较大的更改或增加编辑器多光标限制设置。",
|
||||
"增加多光标限制",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditor.contribution": [
|
||||
"转至下一个差异",
|
||||
"转至上一个差异",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget": [
|
||||
"差异编辑器中插入项的线条修饰。",
|
||||
"差异编辑器中删除项的线条修饰。",
|
||||
|
|
@ -113,6 +117,41 @@ define("vs/editor/editor.main.nls.zh-cn", {
|
|||
"文件过大,无法比较。",
|
||||
"单击以还原更改",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/decorations": [
|
||||
"差异编辑器中插入项的线条修饰。",
|
||||
"差异编辑器中删除项的线条修饰。",
|
||||
"单击以还原更改",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors": [
|
||||
" 使用 Shift + F7 导航更改",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffReview": [
|
||||
"差异评审中的“插入”图标。",
|
||||
"差异评审中的“删除”图标。",
|
||||
"差异评审中的“关闭”图标。",
|
||||
"关闭",
|
||||
"未更改行",
|
||||
"更改了 1 行",
|
||||
"更改了 {0} 行",
|
||||
"差异 {0}/ {1}: 原始行 {2},{3},修改后的行 {4},{5}",
|
||||
"空白",
|
||||
"{0} 未更改的行 {1}",
|
||||
"{0}原始行{1}修改的行{2}",
|
||||
"+ {0}修改的行{1}",
|
||||
"- {0}原始行{1}",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/inlineDiffDeletedCodeMargin": [
|
||||
"复制已删除的行",
|
||||
"复制已删除的行",
|
||||
"复制更改的行",
|
||||
"复制更改的行",
|
||||
"复制已删除的行({0})",
|
||||
"复制更改的行({0})",
|
||||
"还原此更改",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/unchangedRanges": [
|
||||
"折叠未更改的区域",
|
||||
],
|
||||
"vs/editor/browser/widget/diffReview": [
|
||||
"差异评审中的“插入”图标。",
|
||||
"差异评审中的“删除”图标。",
|
||||
|
|
@ -127,8 +166,6 @@ define("vs/editor/editor.main.nls.zh-cn", {
|
|||
"{0}原始行{1}修改的行{2}",
|
||||
"+ {0}修改的行{1}",
|
||||
"- {0}原始行{1}",
|
||||
"转至下一个差异",
|
||||
"转至上一个差异",
|
||||
],
|
||||
"vs/editor/browser/widget/inlineDiffMargin": [
|
||||
"复制已删除的行",
|
||||
|
|
@ -181,8 +218,10 @@ define("vs/editor/editor.main.nls.zh-cn", {
|
|||
"行将根据 {0} 设置进行换行。",
|
||||
"使用旧差异算法。",
|
||||
"使用高级差异算法。",
|
||||
"控制差异编辑器是否显示未更改的区域。仅当设置了 \"diffEditor.experimental.useVersion2\" 时才有效。",
|
||||
"控制差异编辑器是否显示未更改的区域。仅当设置了 {0} 时才有效。",
|
||||
"控制差异编辑器是否应显示检测到的代码移动情况。仅当设置了 {0} 时才有效。",
|
||||
"控制差异编辑器是使用新实现还是旧实现。",
|
||||
"控制差异编辑器是否显示空修饰,以查看插入或删除字符的位置。",
|
||||
],
|
||||
"vs/editor/common/config/editorOptions": [
|
||||
"连接屏幕阅读器后使用平台 API 进行检测",
|
||||
|
|
@ -365,6 +404,7 @@ define("vs/editor/editor.main.nls.zh-cn", {
|
|||
"启用后,IntelliSense 将显示\"用户\"建议。",
|
||||
"启用后,IntelliSense 将显示\"问题\"建议。",
|
||||
"是否应始终选择前导和尾随空格。",
|
||||
"是否应选择子字(如“fooBar”或“foo_bar”中的“foo”)。",
|
||||
"没有缩进。折行从第 1 列开始。",
|
||||
"折行的缩进量与其父级相同。",
|
||||
"折行的缩进量比其父级多 1。",
|
||||
|
|
@ -409,6 +449,10 @@ define("vs/editor/editor.main.nls.zh-cn", {
|
|||
"控制 CodeLens 的字体系列。",
|
||||
"控制 CodeLens 的字号(以像素为单位)。设置为 0 时,将使用 90% 的 `#editor.fontSize#`。",
|
||||
"控制编辑器是否显示内联颜色修饰器和颜色选取器。",
|
||||
"在颜色修饰器单击和悬停时使颜色选取器同时显示",
|
||||
"使颜色选取器在颜色修饰器悬停时显示",
|
||||
"单击颜色修饰器时显示颜色选取器",
|
||||
"控制从颜色修饰器显示颜色选取器的条件",
|
||||
"控制可一次性在编辑器中呈现的最大颜色修饰器数。",
|
||||
"启用使用鼠标和键进行列选择。",
|
||||
"控制在复制时是否同时复制语法高亮。",
|
||||
|
|
@ -531,9 +575,23 @@ define("vs/editor/editor.main.nls.zh-cn", {
|
|||
"编辑器光标颜色。",
|
||||
"编辑器光标的背景色。可以自定义块型光标覆盖字符的颜色。",
|
||||
"编辑器中空白字符的颜色。",
|
||||
"编辑器缩进参考线的颜色。",
|
||||
"编辑器活动缩进参考线的颜色。",
|
||||
"编辑器行号的颜色。",
|
||||
"编辑器缩进参考线的颜色。",
|
||||
"\'editorIndentGuide.background\' is deprecated. Use \'editorIndentGuide.background1\' instead.",
|
||||
"编辑器活动缩进参考线的颜色。",
|
||||
"\'editorIndentGuide.activeBackground\' is deprecated. Use \'editorIndentGuide.activeBackground1\' instead.",
|
||||
"Color of the editor indentation guides (1).",
|
||||
"Color of the editor indentation guides (2).",
|
||||
"Color of the editor indentation guides (3).",
|
||||
"Color of the editor indentation guides (4).",
|
||||
"Color of the editor indentation guides (5).",
|
||||
"Color of the editor indentation guides (6).",
|
||||
"Color of the active editor indentation guides (1).",
|
||||
"Color of the active editor indentation guides (2).",
|
||||
"Color of the active editor indentation guides (3).",
|
||||
"Color of the active editor indentation guides (4).",
|
||||
"Color of the active editor indentation guides (5).",
|
||||
"Color of the active editor indentation guides (6).",
|
||||
"编辑器活动行号的颜色",
|
||||
"\"Id\" 已被弃用,请改用 \"editorLineNumber.activeForeground\"。",
|
||||
"编辑器活动行号的颜色",
|
||||
|
|
@ -621,30 +679,6 @@ define("vs/editor/editor.main.nls.zh-cn", {
|
|||
"输入",
|
||||
],
|
||||
"vs/editor/common/standaloneStrings": [
|
||||
"无选择",
|
||||
"行 {0}, 列 {1} (选中 {2})",
|
||||
"行 {0}, 列 {1}",
|
||||
"{0} 选择(已选择 {1} 个字符)",
|
||||
"{0} 选择",
|
||||
"现在将 \"辅助功能支持\" 设置更改为 \"打开\"。",
|
||||
"现在正在打开“编辑器辅助功能”文档页。",
|
||||
"在差异编辑器的只读窗格中。",
|
||||
"在一个差异编辑器的窗格中。",
|
||||
"在只读代码编辑器中",
|
||||
"在代码编辑器中",
|
||||
"若要配置编辑器,将其进行优化以最好地配合屏幕阅读器的使用,请立即按 Command+E。",
|
||||
"若要配置编辑器,将其进行优化以最高效地配合屏幕阅读器的使用,按下 Ctrl+E。",
|
||||
"配置编辑器,将其进行优化以最好地配合屏幕读取器的使用。",
|
||||
"编辑器被配置为永远不进行优化以配合屏幕读取器的使用, 而当前不是这种情况。",
|
||||
"在当前编辑器中按 Tab 会将焦点移动到下一个可聚焦的元素。通过按 {0} 切换此行为。",
|
||||
"在当前编辑器中按 Tab 会将焦点移动到下一个可聚焦的元素。当前无法通过按键绑定触发命令 {0}。",
|
||||
"在当前编辑器中按 Tab 将插入制表符。通过按 {0} 切换此行为。",
|
||||
"在当前编辑器中按 Tab 会插入制表符。当前无法通过键绑定触发命令 {0}。",
|
||||
"现在按 Command+H 打开一个浏览器窗口, 其中包含有关编辑器辅助功能的详细信息。",
|
||||
"现在按 Ctrl+H 打开一个浏览器窗口, 其中包含有关编辑器辅助功能的更多信息。",
|
||||
"你可以按 Esc 或 Shift+Esc 消除此工具提示并返回到编辑器。",
|
||||
"显示辅助功能帮助",
|
||||
"辅助功能帮助",
|
||||
"开发人员: 检查令牌",
|
||||
"转到行/列...",
|
||||
"显示所有快速访问提供程序",
|
||||
|
|
@ -853,6 +887,7 @@ define("vs/editor/editor.main.nls.zh-cn", {
|
|||
"编辑器查找小组件中的“全部替换”图标。",
|
||||
"编辑器查找小组件中的“查找上一个”图标。",
|
||||
"编辑器查找小组件中的“查找下一个”图标。",
|
||||
"查找/替换",
|
||||
"查找",
|
||||
"查找",
|
||||
"上一个匹配项",
|
||||
|
|
@ -1528,6 +1563,9 @@ define("vs/editor/editor.main.nls.zh-cn", {
|
|||
"已插入差异线",
|
||||
"已删除差异行",
|
||||
"差异行已修改",
|
||||
"已发送聊天请求",
|
||||
"已收到聊天响应",
|
||||
"聊天响应挂起",
|
||||
],
|
||||
"vs/platform/configuration/common/configurationRegistry": [
|
||||
"默认语言配置替代",
|
||||
|
|
@ -1767,7 +1805,9 @@ define("vs/editor/editor.main.nls.zh-cn", {
|
|||
"被删除文本的轮廓颜色。",
|
||||
"两个文本编辑器之间的边框颜色。",
|
||||
"差异编辑器的对角线填充颜色。对角线填充用于并排差异视图。",
|
||||
"差异编辑器中未更改块的颜色。",
|
||||
"差异编辑器中未更改块的背景色。",
|
||||
"差异编辑器中未更改块的前景色。",
|
||||
"差异编辑器中未更改代码的背景色。",
|
||||
"焦点项在列表或树活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。",
|
||||
"焦点项在列表或树活动时的前景颜色。活动的列表或树具有键盘焦点,非活动的没有。",
|
||||
"列表/树活动时,焦点项目的列表/树边框色。活动的列表/树具有键盘焦点,非活动的没有。",
|
||||
|
|
|
|||
102
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.zh-tw.js
generated
vendored
102
node_modules/monaco-editor-core/dev/vs/editor/editor.main.nls.zh-tw.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
@ -106,6 +106,10 @@ define("vs/editor/editor.main.nls.zh-tw", {
|
|||
"游標數目已限制為 {0}。請考慮使用 [尋找和取代](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) 進行較大型的變更,或增加編輯器的多重游標限制設定。",
|
||||
"增加多重游標限制",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditor.contribution": [
|
||||
"移至下一個差異",
|
||||
"移至上一個差異",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget": [
|
||||
"Diff 編輯器中用於插入的線條裝飾。",
|
||||
"Diff 編輯器中用於移除的線條裝飾。",
|
||||
|
|
@ -113,6 +117,41 @@ define("vs/editor/editor.main.nls.zh-tw", {
|
|||
"因其中一個檔案過大而無法比較。",
|
||||
"按一下以還原變更",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/decorations": [
|
||||
"Diff 編輯器中用於插入的線條裝飾。",
|
||||
"Diff 編輯器中用於移除的線條裝飾。",
|
||||
"按一下以還原變更",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors": [
|
||||
" 使用 Shift + F7 瀏覽變更",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/diffReview": [
|
||||
"Diff 檢閱中 [插入] 的圖示。",
|
||||
"Diff 檢閱中 [移除] 的圖示。",
|
||||
"Diff 檢閱中 [關閉] 的圖示。",
|
||||
"關閉",
|
||||
"未變更任一行",
|
||||
"已變更 1 行",
|
||||
"已變更 {0} 行",
|
||||
"{1} 項差異中的第 {0} 項: 原始行 {2}、{3},修改行 {4}、{5}",
|
||||
"空白",
|
||||
"{0} 未變更行 {1}",
|
||||
"{0} 原始行 {1} 修改的行 {2}",
|
||||
"+ {0} 修改行 {1}",
|
||||
"- {0} 原始行 {1}",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/inlineDiffDeletedCodeMargin": [
|
||||
"複製刪除的行",
|
||||
"複製刪除的行",
|
||||
"複製變更的行",
|
||||
"複製變更的行",
|
||||
"複製刪除的行 ({0})",
|
||||
"複製變更的行 ({0})",
|
||||
"還原此變更",
|
||||
],
|
||||
"vs/editor/browser/widget/diffEditorWidget2/unchangedRanges": [
|
||||
"摺疊未變更的區域",
|
||||
],
|
||||
"vs/editor/browser/widget/diffReview": [
|
||||
"Diff 檢閱中 [插入] 的圖示。",
|
||||
"Diff 檢閱中 [移除] 的圖示。",
|
||||
|
|
@ -127,8 +166,6 @@ define("vs/editor/editor.main.nls.zh-tw", {
|
|||
"{0} 原始行 {1} 修改的行 {2}",
|
||||
"+ {0} 修改行 {1}",
|
||||
"- {0} 原始行 {1}",
|
||||
"移至下一個差異",
|
||||
"移至上一個差異",
|
||||
],
|
||||
"vs/editor/browser/widget/inlineDiffMargin": [
|
||||
"複製已刪除的行",
|
||||
|
|
@ -181,8 +218,10 @@ define("vs/editor/editor.main.nls.zh-tw", {
|
|||
"將依據 {0} 設定自動換行。",
|
||||
"使用舊版差異演算法。",
|
||||
"使用進階版差異演算法。",
|
||||
"控制 diff 編輯器是否顯示未變更的區域。只有在設定 \'diffEditor.experimental.useVersion2\' 時才有效。",
|
||||
"控制差異編輯器是否顯示未變更的區域。只有在設定了 {0} 時才有效。",
|
||||
"控制差異編輯器是否應該顯示偵測到的程式碼移動。只有在設定了 {0} 時才有作用。",
|
||||
"控制 Diff 編輯器使用新的或舊的實作。",
|
||||
"控制差異編輯器是否顯示空白裝飾項目,以查看插入或刪除字元的位置。",
|
||||
],
|
||||
"vs/editor/common/config/editorOptions": [
|
||||
"使用平台 API 以偵測螢幕助讀程式附加",
|
||||
|
|
@ -365,6 +404,7 @@ define("vs/editor/editor.main.nls.zh-tw", {
|
|||
"啟用之後,IntelliSense 會顯示 `user`-suggestions。",
|
||||
"啟用時,IntelliSense 會顯示 `issues`-suggestions。",
|
||||
"是否應一律選取前置和後置的空白字元。",
|
||||
"是否應該選取子詞 (例如 \'fooBar\' 或 \'foo_bar\' 中的 \'foo\')。",
|
||||
"無縮排。換行從第 1 列開始。",
|
||||
"換行的縮排會與父行相同。",
|
||||
"換行的縮排為父行 +1。",
|
||||
|
|
@ -409,6 +449,10 @@ define("vs/editor/editor.main.nls.zh-tw", {
|
|||
"控制 CodeLens 的字型家族。",
|
||||
"控制 CodeLens 的字型大小 (像素)。設定為 0 時,會使用 90% 的 `#editor.fontSize#`。",
|
||||
"控制編輯器是否應轉譯內嵌色彩裝飾項目與色彩選擇器。",
|
||||
"讓色彩選擇器在按一下和停駐色彩在裝飾項目上時出現",
|
||||
"讓色彩選擇器在停駐色彩裝飾項目時出現",
|
||||
"讓色彩選擇器在按一下色彩裝飾項目時出現",
|
||||
"控制條件,讓色彩選擇器從色彩裝飾項目出現",
|
||||
"控制一次可在編輯器中呈現的色彩裝飾項目最大數目。",
|
||||
"啟用即可以滑鼠與按鍵選取進行資料行選取。",
|
||||
"控制語法醒目提示是否應複製到剪貼簿。",
|
||||
|
|
@ -531,9 +575,23 @@ define("vs/editor/editor.main.nls.zh-tw", {
|
|||
"編輯器游標的色彩。",
|
||||
"編輯器游標的背景色彩。允許自訂區塊游標重疊的字元色彩。",
|
||||
"編輯器中空白字元的色彩。",
|
||||
"編輯器縮排輔助線的色彩。",
|
||||
"使用中編輯器縮排輔助線的色彩。",
|
||||
"編輯器行號的色彩。",
|
||||
"編輯器縮排輔助線的色彩。",
|
||||
"\'editorIndentGuide.background\' is deprecated. Use \'editorIndentGuide.background1\' instead.",
|
||||
"使用中編輯器縮排輔助線的色彩。",
|
||||
"\'editorIndentGuide.activeBackground\' is deprecated. Use \'editorIndentGuide.activeBackground1\' instead.",
|
||||
"Color of the editor indentation guides (1).",
|
||||
"Color of the editor indentation guides (2).",
|
||||
"Color of the editor indentation guides (3).",
|
||||
"Color of the editor indentation guides (4).",
|
||||
"Color of the editor indentation guides (5).",
|
||||
"Color of the editor indentation guides (6).",
|
||||
"Color of the active editor indentation guides (1).",
|
||||
"Color of the active editor indentation guides (2).",
|
||||
"Color of the active editor indentation guides (3).",
|
||||
"Color of the active editor indentation guides (4).",
|
||||
"Color of the active editor indentation guides (5).",
|
||||
"Color of the active editor indentation guides (6).",
|
||||
"編輯器使用中行號的色彩",
|
||||
"Id 已取代。請改用 \'editorLineNumber.activeForeground\' 。",
|
||||
"編輯器使用中行號的色彩",
|
||||
|
|
@ -621,30 +679,6 @@ define("vs/editor/editor.main.nls.zh-tw", {
|
|||
"正在鍵入",
|
||||
],
|
||||
"vs/editor/common/standaloneStrings": [
|
||||
"無選取項目",
|
||||
"第 {0} 行,第 {1} 欄 (已選取 {2})",
|
||||
"第 {0} 行,第 {1} 欄",
|
||||
"{0} 個選取項目 (已選取 {1} 個字元)",
|
||||
"{0} 個選取項目",
|
||||
"立即將設定 `accessibilitySupport` 變更為 \'on’。",
|
||||
"立即開啟編輯器協助工具文件頁面。",
|
||||
"在 Diff 編輯器的唯讀窗格中。",
|
||||
"在 Diff 編輯器的窗格中。",
|
||||
"在唯讀程式碼編輯器中",
|
||||
"在程式碼編輯器中",
|
||||
"若要為編輯器進行最能搭配螢幕助讀程式使用的設定,請立即按 Command+E。",
|
||||
"若要將編輯器設定為針對搭配螢幕助讀程式使用最佳化,請立即按 Control+E。",
|
||||
"編輯器已設定為針對搭配螢幕助讀程式使用最佳化。",
|
||||
"已將此編輯器設定為永遠不針對搭配螢幕助讀程式使用最佳化,但目前不是此情況。",
|
||||
"在目前的編輯器中按 Tab 鍵會將焦點移至下一個可設定焦點的元素。按 {0} 可切換此行為。",
|
||||
"在目前的編輯器中按 Tab 鍵會將焦點移至下一個可設定焦點的元素。命令 {0} 目前無法由按鍵繫結關係觸發。",
|
||||
"在目前的編輯器中按 Tab 鍵會插入定位字元。按 {0} 可切換此行為。",
|
||||
"在目前的編輯器中按 Tab 鍵會插入定位字元。命令 {0} 目前無法由按鍵繫結關係觸發。",
|
||||
"立即按 Command+H,以開啟提供編輯器協助工具相關詳細資訊的瀏覽器視窗。",
|
||||
"立即按 Control+H,以開啟提供編輯器協助工具相關詳細資訊的瀏覽器視窗。",
|
||||
"您可以按 Esc 鍵或 Shift+Esc 鍵來解除此工具提示並返回編輯器。",
|
||||
"顯示協助工具說明",
|
||||
"協助工具說明",
|
||||
"開發人員: 檢查權杖",
|
||||
"前往行/欄...",
|
||||
"顯示所有快速存取提供者",
|
||||
|
|
@ -853,6 +887,7 @@ define("vs/editor/editor.main.nls.zh-tw", {
|
|||
"編輯器尋找小工具中 [全部取代] 的圖示。",
|
||||
"編輯器尋找小工具中 [尋找上一個] 的圖示。",
|
||||
"編輯器尋找小工具中 [尋找下一個] 的圖示。",
|
||||
"尋找/取代",
|
||||
"尋找",
|
||||
"尋找",
|
||||
"上一個相符項目",
|
||||
|
|
@ -1528,6 +1563,9 @@ define("vs/editor/editor.main.nls.zh-tw", {
|
|||
"差異行已插入",
|
||||
"差異行已刪除",
|
||||
"差異行已修改",
|
||||
"聊天要求已傳送",
|
||||
"聊天回應已接收",
|
||||
"聊天回應擱置中",
|
||||
],
|
||||
"vs/platform/configuration/common/configurationRegistry": [
|
||||
"預設語言組態覆寫",
|
||||
|
|
@ -1767,7 +1805,9 @@ define("vs/editor/editor.main.nls.zh-tw", {
|
|||
"移除的文字外框色彩。",
|
||||
"兩個文字編輯器之間的框線色彩。",
|
||||
"Diff 編輯器的斜紋填滿色彩。斜紋填滿用於並排 Diff 檢視。",
|
||||
"diff 編輯器中未變更區塊的色彩。",
|
||||
"Diff 編輯器中未變更區塊的背景色彩。",
|
||||
"Diff 編輯器中未變更區塊的前景色彩。",
|
||||
"Diff 編輯器中未變更程式碼的背景色彩。",
|
||||
"當清單/樹狀為使用中狀態時,焦點項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。",
|
||||
"當清單/樹狀為使用中狀態時,焦點項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。",
|
||||
"當清單/樹狀目錄為使用中狀態時,焦點項目的清單/樹狀目錄外框色彩。使用中的清單/樹狀目錄有鍵盤焦點,非使用中者則沒有。",
|
||||
|
|
|
|||
8
node_modules/monaco-editor-core/dev/vs/loader.js
generated
vendored
8
node_modules/monaco-editor-core/dev/vs/loader.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Version: 0.39.0-rc2(5f70e6fc720a698ae440ccf5a1d25dceff14dacd)
|
||||
* Version: 0.40.0-dev.20230707(9aba8f774cd0515ecbd15bb095374410226f2349)
|
||||
* Released under the MIT license
|
||||
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
|
||||
*-----------------------------------------------------------*/
|
||||
|
|
@ -663,7 +663,8 @@ var AMDLoader;
|
|||
try {
|
||||
const func = (trustedTypesPolicy
|
||||
? self.eval(trustedTypesPolicy.createScript('', 'true'))
|
||||
: new Function('true'));
|
||||
: new Function('true') // CodeQL [SM01632] the loader is responsible with loading code, fetch + eval is used on the web worker instead of importScripts if possible because importScripts is synchronous and we observed deadlocks on Safari
|
||||
);
|
||||
func.call(self);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -712,7 +713,8 @@ var AMDLoader;
|
|||
text = `${text}\n//# sourceURL=${scriptSrc}`;
|
||||
const func = (trustedTypesPolicy
|
||||
? self.eval(trustedTypesPolicy.createScript('', text))
|
||||
: new Function(text));
|
||||
: new Function(text) // CodeQL [SM01632] the loader is responsible with loading code, fetch + eval is used on the web worker instead of importScripts if possible because importScripts is synchronous and we observed deadlocks on Safari
|
||||
);
|
||||
func.call(self);
|
||||
callback();
|
||||
}).then(undefined, errorback);
|
||||
|
|
|
|||
16
node_modules/monaco-editor-core/esm/vs/base/browser/ui/aria/aria.js
generated
vendored
16
node_modules/monaco-editor-core/esm/vs/base/browser/ui/aria/aria.js
generated
vendored
|
|
@ -3,7 +3,6 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as dom from '../../dom.js';
|
||||
import { isMacintosh } from '../../../common/platform.js';
|
||||
import './aria.css';
|
||||
// Use a max length since we are inserting the whole msg in the DOM and that can cause browsers to freeze for long messages #94233
|
||||
const MAX_MESSAGE_LENGTH = 20000;
|
||||
|
|
@ -62,18 +61,13 @@ export function status(msg) {
|
|||
if (!ariaContainer) {
|
||||
return;
|
||||
}
|
||||
if (isMacintosh) {
|
||||
alert(msg); // VoiceOver does not seem to support status role
|
||||
if (statusContainer.textContent !== msg) {
|
||||
dom.clearNode(statusContainer2);
|
||||
insertMessage(statusContainer, msg);
|
||||
}
|
||||
else {
|
||||
if (statusContainer.textContent !== msg) {
|
||||
dom.clearNode(statusContainer2);
|
||||
insertMessage(statusContainer, msg);
|
||||
}
|
||||
else {
|
||||
dom.clearNode(statusContainer);
|
||||
insertMessage(statusContainer2, msg);
|
||||
}
|
||||
dom.clearNode(statusContainer);
|
||||
insertMessage(statusContainer2, msg);
|
||||
}
|
||||
}
|
||||
function insertMessage(target, msg) {
|
||||
|
|
|
|||
38
node_modules/monaco-editor-core/esm/vs/base/browser/ui/button/button.css
generated
vendored
38
node_modules/monaco-editor-core/esm/vs/base/browser/ui/button/button.css
generated
vendored
|
|
@ -132,3 +132,41 @@
|
|||
margin: 0 0.2em;
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
/* default color styles - based on CSS variables */
|
||||
|
||||
.monaco-button.default-colors,
|
||||
.monaco-button-dropdown.default-colors > .monaco-button{
|
||||
color: var(--vscode-button-foreground);
|
||||
background-color: var(--vscode-button-background);
|
||||
}
|
||||
|
||||
.monaco-button.default-colors:hover,
|
||||
.monaco-button-dropdown.default-colors > .monaco-button:hover {
|
||||
background-color: var(--vscode-button-hoverBackground);
|
||||
}
|
||||
|
||||
.monaco-button.default-colors.secondary,
|
||||
.monaco-button-dropdown.default-colors > .monaco-button.secondary {
|
||||
color: var(--vscode-button-secondaryForeground);
|
||||
background-color: var(--vscode-button-secondaryBackground);
|
||||
}
|
||||
|
||||
.monaco-button.default-colors.secondary:hover,
|
||||
.monaco-button-dropdown.default-colors > .monaco-button.secondary:hover {
|
||||
background-color: var(--vscode-button-secondaryHoverBackground);
|
||||
}
|
||||
|
||||
.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator {
|
||||
background-color: var(--vscode-button-background);
|
||||
border-top: 1px solid var(--vscode-button-border);
|
||||
border-bottom: 1px solid var(--vscode-button-border);
|
||||
}
|
||||
|
||||
.monaco-button-dropdown.default-colors .monaco-button.secondary + .monaco-button-dropdown-separator {
|
||||
background-color: var(--vscode-button-secondaryBackground);
|
||||
}
|
||||
|
||||
.monaco-button-dropdown.default-colors .monaco-button-dropdown-separator > div {
|
||||
background-color: var(--vscode-button-separator);
|
||||
}
|
||||
|
|
|
|||
5
node_modules/monaco-editor-core/esm/vs/base/browser/ui/button/button.js
generated
vendored
5
node_modules/monaco-editor-core/esm/vs/base/browser/ui/button/button.js
generated
vendored
|
|
@ -30,6 +30,7 @@ export class Button extends Disposable {
|
|||
this._element.classList.add('monaco-button');
|
||||
this._element.tabIndex = 0;
|
||||
this._element.setAttribute('role', 'button');
|
||||
this._element.classList.toggle('secondary', !!options.secondary);
|
||||
const background = options.secondary ? options.buttonSecondaryBackground : options.buttonBackground;
|
||||
const foreground = options.secondary ? options.buttonSecondaryForeground : options.buttonForeground;
|
||||
this._element.style.color = foreground || '';
|
||||
|
|
@ -86,6 +87,10 @@ export class Button extends Disposable {
|
|||
this.updateBackground(false);
|
||||
} }));
|
||||
}
|
||||
dispose() {
|
||||
super.dispose();
|
||||
this._element.remove();
|
||||
}
|
||||
getContentElements(content) {
|
||||
const elements = [];
|
||||
for (let segment of renderLabelWithIcons(content)) {
|
||||
|
|
|
|||
22
node_modules/monaco-editor-core/esm/vs/base/browser/ui/dropdown/dropdown.js
generated
vendored
22
node_modules/monaco-editor-core/esm/vs/base/browser/ui/dropdown/dropdown.js
generated
vendored
|
|
@ -91,14 +91,11 @@ class BaseDropdown extends ActionRunner {
|
|||
}
|
||||
}
|
||||
export class DropdownMenu extends BaseDropdown {
|
||||
constructor(container, options) {
|
||||
super(container, options);
|
||||
constructor(container, _options) {
|
||||
super(container, _options);
|
||||
this._options = _options;
|
||||
this._actions = [];
|
||||
this._contextMenuProvider = options.contextMenuProvider;
|
||||
this.actions = options.actions || [];
|
||||
this.actionProvider = options.actionProvider;
|
||||
this.menuClassName = options.menuClassName || '';
|
||||
this.menuAsChild = !!options.menuAsChild;
|
||||
this.actions = _options.actions || [];
|
||||
}
|
||||
set menuOptions(options) {
|
||||
this._menuOptions = options;
|
||||
|
|
@ -107,8 +104,8 @@ export class DropdownMenu extends BaseDropdown {
|
|||
return this._menuOptions;
|
||||
}
|
||||
get actions() {
|
||||
if (this.actionProvider) {
|
||||
return this.actionProvider.getActions();
|
||||
if (this._options.actionProvider) {
|
||||
return this._options.actionProvider.getActions();
|
||||
}
|
||||
return this._actions;
|
||||
}
|
||||
|
|
@ -118,17 +115,18 @@ export class DropdownMenu extends BaseDropdown {
|
|||
show() {
|
||||
super.show();
|
||||
this.element.classList.add('active');
|
||||
this._contextMenuProvider.showContextMenu({
|
||||
this._options.contextMenuProvider.showContextMenu({
|
||||
getAnchor: () => this.element,
|
||||
getActions: () => this.actions,
|
||||
getActionsContext: () => this.menuOptions ? this.menuOptions.context : null,
|
||||
getActionViewItem: (action, options) => this.menuOptions && this.menuOptions.actionViewItemProvider ? this.menuOptions.actionViewItemProvider(action, options) : undefined,
|
||||
getKeyBinding: action => this.menuOptions && this.menuOptions.getKeyBinding ? this.menuOptions.getKeyBinding(action) : undefined,
|
||||
getMenuClassName: () => this.menuClassName,
|
||||
getMenuClassName: () => this._options.menuClassName || '',
|
||||
onHide: () => this.onHide(),
|
||||
actionRunner: this.menuOptions ? this.menuOptions.actionRunner : undefined,
|
||||
anchorAlignment: this.menuOptions ? this.menuOptions.anchorAlignment : 0 /* AnchorAlignment.LEFT */,
|
||||
domForShadowRoot: this.menuAsChild ? this.element : undefined
|
||||
domForShadowRoot: this._options.menuAsChild ? this.element : undefined,
|
||||
skipTelemetry: this._options.skipTelemetry
|
||||
});
|
||||
}
|
||||
hide() {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ export class DropdownMenuActionViewItem extends BaseActionViewItem {
|
|||
labelRenderer: labelRenderer,
|
||||
menuAsChild: this.options.menuAsChild,
|
||||
actions: isActionsArray ? this.menuActionsOrProvider : undefined,
|
||||
actionProvider: isActionsArray ? undefined : this.menuActionsOrProvider
|
||||
actionProvider: isActionsArray ? undefined : this.menuActionsOrProvider,
|
||||
skipTelemetry: this.options.skipTelemetry
|
||||
};
|
||||
this.dropdownMenu = this._register(new DropdownMenu(container, options));
|
||||
this._register(this.dropdownMenu.onDidChangeVisibility(visible => {
|
||||
|
|
|
|||
3
node_modules/monaco-editor-core/esm/vs/base/browser/ui/hover/hover.css
generated
vendored
3
node_modules/monaco-editor-core/esm/vs/base/browser/ui/hover/hover.css
generated
vendored
|
|
@ -7,10 +7,9 @@
|
|||
cursor: default;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
z-index: 50;
|
||||
user-select: text;
|
||||
-webkit-user-select: text;
|
||||
box-sizing: initial;
|
||||
box-sizing: border-box;
|
||||
animation: fadein 100ms linear;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
|
|
|||
26
node_modules/monaco-editor-core/esm/vs/base/browser/ui/list/listWidget.js
generated
vendored
26
node_modules/monaco-editor-core/esm/vs/base/browser/ui/list/listWidget.js
generated
vendored
|
|
@ -108,11 +108,19 @@ class Trait {
|
|||
deleteCount = Math.max(0, Math.min(deleteCount, this.length - start));
|
||||
const diff = elements.length - deleteCount;
|
||||
const end = start + deleteCount;
|
||||
const sortedIndexes = [
|
||||
...this.sortedIndexes.filter(i => i < start),
|
||||
...elements.map((hasTrait, i) => hasTrait ? i + start : -1).filter(i => i !== -1),
|
||||
...this.sortedIndexes.filter(i => i >= end).map(i => i + diff)
|
||||
];
|
||||
const sortedIndexes = [];
|
||||
let i = 0;
|
||||
while (i < this.sortedIndexes.length && this.sortedIndexes[i] < start) {
|
||||
sortedIndexes.push(this.sortedIndexes[i++]);
|
||||
}
|
||||
for (let j = 0; j < elements.length; j++) {
|
||||
if (elements[j]) {
|
||||
sortedIndexes.push(j + start);
|
||||
}
|
||||
}
|
||||
while (i < this.sortedIndexes.length && this.sortedIndexes[i] >= end) {
|
||||
sortedIndexes.push(this.sortedIndexes[i++] + diff);
|
||||
}
|
||||
const length = this.length + diff;
|
||||
if (this.sortedIndexes.length > 0 && sortedIndexes.length === 0 && length > 0) {
|
||||
const first = (_a = this.sortedIndexes.find(index => index >= start)) !== null && _a !== void 0 ? _a : length - 1;
|
||||
|
|
@ -190,10 +198,14 @@ class TraitSpliceable {
|
|||
}
|
||||
splice(start, deleteCount, elements) {
|
||||
if (!this.identityProvider) {
|
||||
return this.trait.splice(start, deleteCount, elements.map(() => false));
|
||||
return this.trait.splice(start, deleteCount, new Array(elements.length).fill(false));
|
||||
}
|
||||
const pastElementsWithTrait = this.trait.get().map(i => this.identityProvider.getId(this.view.element(i)).toString());
|
||||
const elementsWithTrait = elements.map(e => pastElementsWithTrait.indexOf(this.identityProvider.getId(e).toString()) > -1);
|
||||
if (pastElementsWithTrait.length === 0) {
|
||||
return this.trait.splice(start, deleteCount, new Array(elements.length).fill(false));
|
||||
}
|
||||
const pastElementsWithTraitSet = new Set(pastElementsWithTrait);
|
||||
const elementsWithTrait = elements.map(e => pastElementsWithTraitSet.has(this.identityProvider.getId(e).toString()));
|
||||
this.trait.splice(start, deleteCount, elementsWithTrait);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
6
node_modules/monaco-editor-core/esm/vs/base/browser/ui/sash/sash.js
generated
vendored
6
node_modules/monaco-editor-core/esm/vs/base/browser/ui/sash/sash.js
generated
vendored
|
|
@ -135,6 +135,9 @@ export class Sash extends Disposable {
|
|||
* The start of a vertical sash is its top-most position.
|
||||
*/
|
||||
set orthogonalStartSash(sash) {
|
||||
if (this._orthogonalStartSash === sash) {
|
||||
return;
|
||||
}
|
||||
this.orthogonalStartDragHandleDisposables.clear();
|
||||
this.orthogonalStartSashDisposables.clear();
|
||||
if (sash) {
|
||||
|
|
@ -161,6 +164,9 @@ export class Sash extends Disposable {
|
|||
* The end of a vertical sash is its bottom-most position.
|
||||
*/
|
||||
set orthogonalEndSash(sash) {
|
||||
if (this._orthogonalEndSash === sash) {
|
||||
return;
|
||||
}
|
||||
this.orthogonalEndDragHandleDisposables.clear();
|
||||
this.orthogonalEndSashDisposables.clear();
|
||||
if (sash) {
|
||||
|
|
|
|||
|
|
@ -276,6 +276,10 @@ export class AbstractScrollableElement extends Widget {
|
|||
}
|
||||
}
|
||||
_onMouseWheel(e) {
|
||||
var _a;
|
||||
if ((_a = e.browserEvent) === null || _a === void 0 ? void 0 : _a.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
const classifier = MouseWheelClassifier.INSTANCE;
|
||||
if (SCROLL_WHEEL_SMOOTH_SCROLL_ENABLED) {
|
||||
classifier.acceptStandardWheelEvent(e);
|
||||
|
|
|
|||
41
node_modules/monaco-editor-core/esm/vs/base/browser/ui/splitview/splitview.js
generated
vendored
41
node_modules/monaco-editor-core/esm/vs/base/browser/ui/splitview/splitview.js
generated
vendored
|
|
@ -107,6 +107,12 @@ export var Sizing;
|
|||
*/
|
||||
function Split(index) { return { type: 'split', index }; }
|
||||
Sizing.Split = Split;
|
||||
/**
|
||||
* When adding a view, use DistributeSizing when all pre-existing views are
|
||||
* distributed evenly, otherwise use SplitSizing.
|
||||
*/
|
||||
function Auto(index) { return { type: 'auto', index }; }
|
||||
Sizing.Auto = Auto;
|
||||
/**
|
||||
* When adding or removing views, assume the view is invisible.
|
||||
*/
|
||||
|
|
@ -515,14 +521,24 @@ export class SplitView extends Disposable {
|
|||
if (typeof size === 'number') {
|
||||
viewSize = size;
|
||||
}
|
||||
else if (size.type === 'split') {
|
||||
viewSize = this.getViewSize(size.index) / 2;
|
||||
}
|
||||
else if (size.type === 'invisible') {
|
||||
viewSize = { cachedVisibleSize: size.cachedVisibleSize };
|
||||
}
|
||||
else {
|
||||
viewSize = view.minimumSize;
|
||||
if (size.type === 'auto') {
|
||||
if (this.areViewsDistributed()) {
|
||||
size = { type: 'distribute' };
|
||||
}
|
||||
else {
|
||||
size = { type: 'split', index: size.index };
|
||||
}
|
||||
}
|
||||
if (size.type === 'split') {
|
||||
viewSize = this.getViewSize(size.index) / 2;
|
||||
}
|
||||
else if (size.type === 'invisible') {
|
||||
viewSize = { cachedVisibleSize: size.cachedVisibleSize };
|
||||
}
|
||||
else {
|
||||
viewSize = view.minimumSize;
|
||||
}
|
||||
}
|
||||
const item = this.orientation === 0 /* Orientation.VERTICAL */
|
||||
? new VerticalViewItem(container, view, viewSize, disposable)
|
||||
|
|
@ -771,6 +787,17 @@ export class SplitView extends Disposable {
|
|||
}
|
||||
return undefined;
|
||||
}
|
||||
areViewsDistributed() {
|
||||
let min = undefined, max = undefined;
|
||||
for (const view of this.viewItems) {
|
||||
min = min === undefined ? view.size : Math.min(min, view.size);
|
||||
max = max === undefined ? view.size : Math.max(max, view.size);
|
||||
if (max - min > 2) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
dispose() {
|
||||
var _a;
|
||||
(_a = this.sashDragState) === null || _a === void 0 ? void 0 : _a.disposable.dispose();
|
||||
|
|
|
|||
6
node_modules/monaco-editor-core/esm/vs/base/browser/ui/toolbar/toolbar.js
generated
vendored
6
node_modules/monaco-editor-core/esm/vs/base/browser/ui/toolbar/toolbar.js
generated
vendored
|
|
@ -52,7 +52,8 @@ export class ToolBar extends Disposable {
|
|||
keybindingProvider: this.options.getKeyBinding,
|
||||
classNames: ThemeIcon.asClassNameArray((_a = options.moreIcon) !== null && _a !== void 0 ? _a : Codicon.toolBarMore),
|
||||
anchorAlignmentProvider: this.options.anchorAlignmentProvider,
|
||||
menuAsChild: !!this.options.renderDropdownAsChildElement
|
||||
menuAsChild: !!this.options.renderDropdownAsChildElement,
|
||||
skipTelemetry: this.options.skipTelemetry
|
||||
});
|
||||
this.toggleMenuActionViewItem.setActionContext(this.actionBar.context);
|
||||
this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility));
|
||||
|
|
@ -71,7 +72,8 @@ export class ToolBar extends Disposable {
|
|||
keybindingProvider: this.options.getKeyBinding,
|
||||
classNames: action.class,
|
||||
anchorAlignmentProvider: this.options.anchorAlignmentProvider,
|
||||
menuAsChild: !!this.options.renderDropdownAsChildElement
|
||||
menuAsChild: !!this.options.renderDropdownAsChildElement,
|
||||
skipTelemetry: this.options.skipTelemetry
|
||||
});
|
||||
result.setActionContext(this.actionBar.context);
|
||||
this.submenuActionViewItems.push(result);
|
||||
|
|
|
|||
12
node_modules/monaco-editor-core/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js
generated
vendored
12
node_modules/monaco-editor-core/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js
generated
vendored
|
|
@ -4,6 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
import { ObjectTreeModel } from './objectTreeModel.js';
|
||||
import { TreeError, WeakMapper } from './tree.js';
|
||||
import { equals } from '../../../common/arrays.js';
|
||||
import { Event } from '../../../common/event.js';
|
||||
import { Iterable } from '../../../common/iterator.js';
|
||||
function noCompress(element) {
|
||||
|
|
@ -93,7 +94,7 @@ export class CompressedObjectTreeModel {
|
|||
this.identityProvider = options.identityProvider;
|
||||
}
|
||||
setChildren(element, children = Iterable.empty(), options) {
|
||||
// Diffs must be deem, since the compression can affect nested elements.
|
||||
// Diffs must be deep, since the compression can affect nested elements.
|
||||
// @see https://github.com/microsoft/vscode/pull/114237#issuecomment-759425034
|
||||
const diffIdentityProvider = options.diffIdentityProvider && wrapIdentityProvider(options.diffIdentityProvider);
|
||||
if (element === null) {
|
||||
|
|
@ -111,6 +112,15 @@ export class CompressedObjectTreeModel {
|
|||
const decompressedElement = decompress(node);
|
||||
const splicedElement = splice(decompressedElement, element, children);
|
||||
const recompressedElement = (this.enabled ? compress : noCompress)(splicedElement);
|
||||
// If the recompressed node is identical to the original, just set its children.
|
||||
// Saves work and churn diffing the parent element.
|
||||
const elementComparator = options.diffIdentityProvider
|
||||
? ((a, b) => options.diffIdentityProvider.getId(a) === options.diffIdentityProvider.getId(b))
|
||||
: undefined;
|
||||
if (equals(recompressedElement.element.elements, node.element.elements, elementComparator)) {
|
||||
this._setChildren(compressedNode, recompressedElement.children || Iterable.empty(), { diffIdentityProvider, diffDepth: 1 });
|
||||
return;
|
||||
}
|
||||
const parentChildren = parent.children
|
||||
.map(child => child === node ? recompressedElement : child);
|
||||
this._setChildren(parent.element, parentChildren, {
|
||||
|
|
|
|||
11
node_modules/monaco-editor-core/esm/vs/base/common/async.js
generated
vendored
11
node_modules/monaco-editor-core/esm/vs/base/common/async.js
generated
vendored
|
|
@ -98,16 +98,23 @@ export function raceCancellation(promise, token, defaultValue) {
|
|||
*/
|
||||
export class Throttler {
|
||||
constructor() {
|
||||
this.isDisposed = false;
|
||||
this.activePromise = null;
|
||||
this.queuedPromise = null;
|
||||
this.queuedPromiseFactory = null;
|
||||
}
|
||||
queue(promiseFactory) {
|
||||
if (this.isDisposed) {
|
||||
throw new Error('Throttler is disposed');
|
||||
}
|
||||
if (this.activePromise) {
|
||||
this.queuedPromiseFactory = promiseFactory;
|
||||
if (!this.queuedPromise) {
|
||||
const onComplete = () => {
|
||||
this.queuedPromise = null;
|
||||
if (this.isDisposed) {
|
||||
return;
|
||||
}
|
||||
const result = this.queue(this.queuedPromiseFactory);
|
||||
this.queuedPromiseFactory = null;
|
||||
return result;
|
||||
|
|
@ -131,6 +138,9 @@ export class Throttler {
|
|||
});
|
||||
});
|
||||
}
|
||||
dispose() {
|
||||
this.isDisposed = true;
|
||||
}
|
||||
}
|
||||
const timeoutDeferred = (timeout, fn) => {
|
||||
let scheduled = true;
|
||||
|
|
@ -260,6 +270,7 @@ export class ThrottledDelayer {
|
|||
}
|
||||
dispose() {
|
||||
this.delayer.dispose();
|
||||
this.throttler.dispose();
|
||||
}
|
||||
}
|
||||
export function timeout(millis, token) {
|
||||
|
|
|
|||
321
node_modules/monaco-editor-core/esm/vs/base/common/event.js
generated
vendored
321
node_modules/monaco-editor-core/esm/vs/base/common/event.js
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
import { onUnexpectedError } from './errors.js';
|
||||
import { once as onceFn } from './functional.js';
|
||||
import { combinedDisposable, Disposable, DisposableStore, SafeDisposable, toDisposable } from './lifecycle.js';
|
||||
import { combinedDisposable, Disposable, DisposableStore, toDisposable } from './lifecycle.js';
|
||||
import { LinkedList } from './linkedList.js';
|
||||
import { StopWatch } from './stopwatch.js';
|
||||
// -----------------------------------------------------------------------------------------------------------------------
|
||||
|
|
@ -566,7 +566,7 @@ export class EventProfiling {
|
|||
EventProfiling.all.add(this);
|
||||
}
|
||||
start(listenerCount) {
|
||||
this._stopWatch = new StopWatch(true);
|
||||
this._stopWatch = new StopWatch();
|
||||
this.listenerCount = listenerCount;
|
||||
}
|
||||
stop() {
|
||||
|
|
@ -637,17 +637,25 @@ class Stacktrace {
|
|||
console.warn(this.value.split('\n').slice(2).join('\n'));
|
||||
}
|
||||
}
|
||||
class Listener {
|
||||
constructor(callback, callbackThis, stack) {
|
||||
this.callback = callback;
|
||||
this.callbackThis = callbackThis;
|
||||
this.stack = stack;
|
||||
this.subscription = new SafeDisposable();
|
||||
}
|
||||
invoke(e) {
|
||||
this.callback.call(this.callbackThis, e);
|
||||
class UniqueContainer {
|
||||
constructor(value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
const compactionThreshold = 2;
|
||||
const forEachListener = (listeners, fn) => {
|
||||
if (listeners instanceof UniqueContainer) {
|
||||
fn(listeners);
|
||||
}
|
||||
else {
|
||||
for (let i = 0; i < listeners.length; i++) {
|
||||
const l = listeners[i];
|
||||
if (l) {
|
||||
fn(l);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
/**
|
||||
* The Emitter can be used to expose an Event to the public
|
||||
* to fire it from the insides.
|
||||
|
|
@ -672,7 +680,7 @@ class Listener {
|
|||
export class Emitter {
|
||||
constructor(options) {
|
||||
var _a, _b, _c, _d, _e;
|
||||
this._disposed = false;
|
||||
this._size = 0;
|
||||
this._options = options;
|
||||
this._leakageMon = _globalLeakWarningThreshold > 0 || ((_a = this._options) === null || _a === void 0 ? void 0 : _a.leakWarningThreshold) ? new LeakageMonitor((_c = (_b = this._options) === null || _b === void 0 ? void 0 : _b.leakWarningThreshold) !== null && _c !== void 0 ? _c : _globalLeakWarningThreshold) : undefined;
|
||||
this._perfMon = ((_d = this._options) === null || _d === void 0 ? void 0 : _d._profName) ? new EventProfiling(this._options._profName) : undefined;
|
||||
|
|
@ -691,22 +699,19 @@ export class Emitter {
|
|||
// this._disposables.add(someModel.onDidChange(() => { ... }); // (2) subscribe and register model-event listener
|
||||
// ...later...
|
||||
// this._disposables.dispose(); disposes (1) then (2): don't warn after (1) but after the "overall dispose" is done
|
||||
if (((_a = this._deliveryQueue) === null || _a === void 0 ? void 0 : _a.current) === this) {
|
||||
this._deliveryQueue.reset();
|
||||
}
|
||||
if (this._listeners) {
|
||||
if (_enableDisposeWithListenerWarning) {
|
||||
const listeners = Array.from(this._listeners);
|
||||
const listeners = this._listeners;
|
||||
queueMicrotask(() => {
|
||||
var _a;
|
||||
for (const listener of listeners) {
|
||||
if (listener.subscription.isset()) {
|
||||
listener.subscription.unset();
|
||||
(_a = listener.stack) === null || _a === void 0 ? void 0 : _a.print();
|
||||
}
|
||||
}
|
||||
forEachListener(listeners, l => { var _a; return (_a = l.stack) === null || _a === void 0 ? void 0 : _a.print(); });
|
||||
});
|
||||
}
|
||||
this._listeners.clear();
|
||||
this._listeners = undefined;
|
||||
this._size = 0;
|
||||
}
|
||||
(_a = this._deliveryQueue) === null || _a === void 0 ? void 0 : _a.clear(this);
|
||||
(_c = (_b = this._options) === null || _b === void 0 ? void 0 : _b.onDidRemoveLastListener) === null || _c === void 0 ? void 0 : _c.call(_b);
|
||||
(_d = this._leakageMon) === null || _d === void 0 ? void 0 : _d.dispose();
|
||||
}
|
||||
|
|
@ -716,139 +721,171 @@ export class Emitter {
|
|||
* to events from this Emitter
|
||||
*/
|
||||
get event() {
|
||||
if (!this._event) {
|
||||
this._event = (callback, thisArgs, disposables) => {
|
||||
var _a, _b, _c;
|
||||
if (!this._listeners) {
|
||||
this._listeners = new LinkedList();
|
||||
}
|
||||
if (this._leakageMon && this._listeners.size > this._leakageMon.threshold * 3) {
|
||||
console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`);
|
||||
return Disposable.None;
|
||||
}
|
||||
const firstListener = this._listeners.isEmpty();
|
||||
if (firstListener && ((_a = this._options) === null || _a === void 0 ? void 0 : _a.onWillAddFirstListener)) {
|
||||
this._options.onWillAddFirstListener(this);
|
||||
}
|
||||
let removeMonitor;
|
||||
let stack;
|
||||
if (this._leakageMon && this._listeners.size >= Math.ceil(this._leakageMon.threshold * 0.2)) {
|
||||
// check and record this emitter for potential leakage
|
||||
stack = Stacktrace.create();
|
||||
removeMonitor = this._leakageMon.check(stack, this._listeners.size + 1);
|
||||
}
|
||||
if (_enableDisposeWithListenerWarning) {
|
||||
stack = stack !== null && stack !== void 0 ? stack : Stacktrace.create();
|
||||
}
|
||||
const listener = new Listener(callback, thisArgs, stack);
|
||||
const removeListener = this._listeners.push(listener);
|
||||
if (firstListener && ((_b = this._options) === null || _b === void 0 ? void 0 : _b.onDidAddFirstListener)) {
|
||||
this._options.onDidAddFirstListener(this);
|
||||
}
|
||||
if ((_c = this._options) === null || _c === void 0 ? void 0 : _c.onDidAddListener) {
|
||||
this._options.onDidAddListener(this, callback, thisArgs);
|
||||
}
|
||||
const result = listener.subscription.set(() => {
|
||||
var _a, _b;
|
||||
removeMonitor === null || removeMonitor === void 0 ? void 0 : removeMonitor();
|
||||
if (!this._disposed) {
|
||||
(_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.onWillRemoveListener) === null || _b === void 0 ? void 0 : _b.call(_a, this);
|
||||
removeListener();
|
||||
if (this._options && this._options.onDidRemoveLastListener) {
|
||||
const hasListeners = (this._listeners && !this._listeners.isEmpty());
|
||||
if (!hasListeners) {
|
||||
this._options.onDidRemoveLastListener(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
if (disposables instanceof DisposableStore) {
|
||||
disposables.add(result);
|
||||
}
|
||||
else if (Array.isArray(disposables)) {
|
||||
disposables.push(result);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
var _a;
|
||||
(_a = this._event) !== null && _a !== void 0 ? _a : (this._event = (callback, thisArgs, disposables) => {
|
||||
var _a, _b, _c, _d, _e;
|
||||
if (this._leakageMon && this._size > this._leakageMon.threshold * 3) {
|
||||
console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`);
|
||||
return Disposable.None;
|
||||
}
|
||||
if (this._disposed) {
|
||||
// todo: should we warn if a listener is added to a disposed emitter? This happens often
|
||||
return Disposable.None;
|
||||
}
|
||||
if (thisArgs) {
|
||||
callback = callback.bind(thisArgs);
|
||||
}
|
||||
const contained = new UniqueContainer(callback);
|
||||
let removeMonitor;
|
||||
let stack;
|
||||
if (this._leakageMon && this._size >= Math.ceil(this._leakageMon.threshold * 0.2)) {
|
||||
// check and record this emitter for potential leakage
|
||||
contained.stack = Stacktrace.create();
|
||||
removeMonitor = this._leakageMon.check(contained.stack, this._size + 1);
|
||||
}
|
||||
if (_enableDisposeWithListenerWarning) {
|
||||
contained.stack = stack !== null && stack !== void 0 ? stack : Stacktrace.create();
|
||||
}
|
||||
if (!this._listeners) {
|
||||
(_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.onWillAddFirstListener) === null || _b === void 0 ? void 0 : _b.call(_a, this);
|
||||
this._listeners = contained;
|
||||
(_d = (_c = this._options) === null || _c === void 0 ? void 0 : _c.onDidAddFirstListener) === null || _d === void 0 ? void 0 : _d.call(_c, this);
|
||||
}
|
||||
else if (this._listeners instanceof UniqueContainer) {
|
||||
(_e = this._deliveryQueue) !== null && _e !== void 0 ? _e : (this._deliveryQueue = new EventDeliveryQueuePrivate());
|
||||
this._listeners = [this._listeners, contained];
|
||||
}
|
||||
else {
|
||||
this._listeners.push(contained);
|
||||
}
|
||||
this._size++;
|
||||
const result = toDisposable(() => { removeMonitor === null || removeMonitor === void 0 ? void 0 : removeMonitor(); this._removeListener(contained); });
|
||||
if (disposables instanceof DisposableStore) {
|
||||
disposables.add(result);
|
||||
}
|
||||
else if (Array.isArray(disposables)) {
|
||||
disposables.push(result);
|
||||
}
|
||||
return result;
|
||||
});
|
||||
return this._event;
|
||||
}
|
||||
_removeListener(listener) {
|
||||
var _a, _b, _c, _d;
|
||||
(_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.onWillRemoveListener) === null || _b === void 0 ? void 0 : _b.call(_a, this);
|
||||
if (!this._listeners) {
|
||||
return; // expected if a listener gets disposed
|
||||
}
|
||||
if (this._size === 1) {
|
||||
this._listeners = undefined;
|
||||
(_d = (_c = this._options) === null || _c === void 0 ? void 0 : _c.onDidRemoveLastListener) === null || _d === void 0 ? void 0 : _d.call(_c, this);
|
||||
this._size = 0;
|
||||
return;
|
||||
}
|
||||
// size > 1 which requires that listeners be a list:
|
||||
const listeners = this._listeners;
|
||||
const index = listeners.indexOf(listener);
|
||||
if (index === -1) {
|
||||
console.log('disposed?', this._disposed);
|
||||
console.log('size?', this._size);
|
||||
console.log('arr?', JSON.stringify(this._listeners));
|
||||
throw new Error('Attempted to dispose unknown listener');
|
||||
}
|
||||
this._size--;
|
||||
listeners[index] = undefined;
|
||||
const adjustDeliveryQueue = this._deliveryQueue.current === this;
|
||||
if (this._size * compactionThreshold <= listeners.length) {
|
||||
let n = 0;
|
||||
for (let i = 0; i < listeners.length; i++) {
|
||||
if (listeners[i]) {
|
||||
listeners[n++] = listeners[i];
|
||||
}
|
||||
else if (adjustDeliveryQueue) {
|
||||
this._deliveryQueue.end--;
|
||||
if (n < this._deliveryQueue.i) {
|
||||
this._deliveryQueue.i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
listeners.length = n;
|
||||
}
|
||||
}
|
||||
_deliver(listener, value) {
|
||||
var _a;
|
||||
if (!listener) {
|
||||
return;
|
||||
}
|
||||
const errorHandler = ((_a = this._options) === null || _a === void 0 ? void 0 : _a.onListenerError) || onUnexpectedError;
|
||||
if (!errorHandler) {
|
||||
listener.value(value);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
listener.value(value);
|
||||
}
|
||||
catch (e) {
|
||||
errorHandler(e);
|
||||
}
|
||||
}
|
||||
/** Delivers items in the queue. Assumes the queue is ready to go. */
|
||||
_deliverQueue(dq) {
|
||||
const listeners = dq.current._listeners;
|
||||
while (dq.i < dq.end) {
|
||||
// important: dq.i is incremented before calling deliver() because it might reenter deliverQueue()
|
||||
this._deliver(listeners[dq.i++], dq.value);
|
||||
}
|
||||
dq.reset();
|
||||
}
|
||||
/**
|
||||
* To be kept private to fire an event to
|
||||
* subscribers
|
||||
*/
|
||||
fire(event) {
|
||||
var _a, _b, _c;
|
||||
if (this._listeners) {
|
||||
// put all [listener,event]-pairs into delivery queue
|
||||
// then emit all event. an inner/nested event might be
|
||||
// the driver of this
|
||||
if (!this._deliveryQueue) {
|
||||
this._deliveryQueue = new PrivateEventDeliveryQueue((_a = this._options) === null || _a === void 0 ? void 0 : _a.onListenerError);
|
||||
}
|
||||
for (const listener of this._listeners) {
|
||||
this._deliveryQueue.push(this, listener, event);
|
||||
}
|
||||
// start/stop performance insight collection
|
||||
(_b = this._perfMon) === null || _b === void 0 ? void 0 : _b.start(this._deliveryQueue.size);
|
||||
this._deliveryQueue.deliver();
|
||||
(_c = this._perfMon) === null || _c === void 0 ? void 0 : _c.stop();
|
||||
var _a, _b, _c, _d;
|
||||
if ((_a = this._deliveryQueue) === null || _a === void 0 ? void 0 : _a.current) {
|
||||
this._deliverQueue(this._deliveryQueue);
|
||||
(_b = this._perfMon) === null || _b === void 0 ? void 0 : _b.stop(); // last fire() will have starting perfmon, stop it before starting the next dispatch
|
||||
}
|
||||
(_c = this._perfMon) === null || _c === void 0 ? void 0 : _c.start(this._size);
|
||||
if (!this._listeners) {
|
||||
// no-op
|
||||
}
|
||||
else if (this._listeners instanceof UniqueContainer) {
|
||||
this._deliver(this._listeners, event);
|
||||
}
|
||||
else {
|
||||
const dq = this._deliveryQueue;
|
||||
dq.enqueue(this, event, this._listeners.length);
|
||||
this._deliverQueue(dq);
|
||||
}
|
||||
(_d = this._perfMon) === null || _d === void 0 ? void 0 : _d.stop();
|
||||
}
|
||||
hasListeners() {
|
||||
if (!this._listeners) {
|
||||
return false;
|
||||
}
|
||||
return !this._listeners.isEmpty();
|
||||
return this._size > 0;
|
||||
}
|
||||
}
|
||||
export class EventDeliveryQueue {
|
||||
constructor(_onListenerError = onUnexpectedError) {
|
||||
this._onListenerError = _onListenerError;
|
||||
this._queue = new LinkedList();
|
||||
export const createEventDeliveryQueue = () => new EventDeliveryQueuePrivate();
|
||||
class EventDeliveryQueuePrivate {
|
||||
constructor() {
|
||||
/**
|
||||
* Index in current's listener list.
|
||||
*/
|
||||
this.i = -1;
|
||||
/**
|
||||
* The last index in the listener's list to deliver.
|
||||
*/
|
||||
this.end = 0;
|
||||
}
|
||||
get size() {
|
||||
return this._queue.size;
|
||||
enqueue(emitter, value, end) {
|
||||
this.i = 0;
|
||||
this.end = end;
|
||||
this.current = emitter;
|
||||
this.value = value;
|
||||
}
|
||||
push(emitter, listener, event) {
|
||||
this._queue.push(new EventDeliveryQueueElement(emitter, listener, event));
|
||||
}
|
||||
clear(emitter) {
|
||||
const newQueue = new LinkedList();
|
||||
for (const element of this._queue) {
|
||||
if (element.emitter !== emitter) {
|
||||
newQueue.push(element);
|
||||
}
|
||||
}
|
||||
this._queue = newQueue;
|
||||
}
|
||||
deliver() {
|
||||
while (this._queue.size > 0) {
|
||||
const element = this._queue.shift();
|
||||
try {
|
||||
element.listener.invoke(element.event);
|
||||
}
|
||||
catch (e) {
|
||||
this._onListenerError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* An `EventDeliveryQueue` that is guaranteed to be used by a single `Emitter`.
|
||||
*/
|
||||
class PrivateEventDeliveryQueue extends EventDeliveryQueue {
|
||||
clear(emitter) {
|
||||
// Here we can just clear the entire linked list because
|
||||
// all elements are guaranteed to belong to this emitter
|
||||
this._queue.clear();
|
||||
}
|
||||
}
|
||||
class EventDeliveryQueueElement {
|
||||
constructor(emitter, listener, event) {
|
||||
this.emitter = emitter;
|
||||
this.listener = listener;
|
||||
this.event = event;
|
||||
reset() {
|
||||
this.i = this.end; // force any current emission loop to stop, mainly for during dispose
|
||||
this.current = undefined;
|
||||
this.value = undefined;
|
||||
}
|
||||
}
|
||||
export class PauseableEmitter extends Emitter {
|
||||
|
|
@ -882,7 +919,7 @@ export class PauseableEmitter extends Emitter {
|
|||
}
|
||||
}
|
||||
fire(event) {
|
||||
if (this._listeners) {
|
||||
if (this._size) {
|
||||
if (this._isPaused !== 0) {
|
||||
this._eventQueue.push(event);
|
||||
}
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/esm/vs/base/common/htmlContent.js
generated
vendored
2
node_modules/monaco-editor-core/esm/vs/base/common/htmlContent.js
generated
vendored
|
|
@ -106,7 +106,7 @@ export function markdownStringEqual(a, b) {
|
|||
}
|
||||
export function escapeMarkdownSyntaxTokens(text) {
|
||||
// escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
|
||||
return text.replace(/[\\`*_{}[\]()#+\-!~]/g, '\\$&');
|
||||
return text.replace(/[\\`*_{}[\]()#+\-!~]/g, '\\$&'); // CodeQL [SM02383] Backslash is escaped in the character class
|
||||
}
|
||||
export function escapeDoubleQuotes(input) {
|
||||
return input.replace(/"/g, '"');
|
||||
|
|
|
|||
27
node_modules/monaco-editor-core/esm/vs/base/common/lifecycle.js
generated
vendored
27
node_modules/monaco-editor-core/esm/vs/base/common/lifecycle.js
generated
vendored
|
|
@ -118,6 +118,8 @@ export function combinedDisposable(...disposables) {
|
|||
}
|
||||
/**
|
||||
* Turn a function that implements dispose into an {@link IDisposable}.
|
||||
*
|
||||
* @param fn Clean up function, guaranteed to be called only **once**.
|
||||
*/
|
||||
export function toDisposable(fn) {
|
||||
const self = trackDisposable({
|
||||
|
|
@ -283,31 +285,6 @@ export class RefCountedDisposable {
|
|||
return this;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A safe disposable can be `unset` so that a leaked reference (listener)
|
||||
* can be cut-off.
|
||||
*/
|
||||
export class SafeDisposable {
|
||||
constructor() {
|
||||
this.dispose = () => { };
|
||||
this.unset = () => { };
|
||||
this.isset = () => false;
|
||||
trackDisposable(this);
|
||||
}
|
||||
set(fn) {
|
||||
let callback = fn;
|
||||
this.unset = () => callback = undefined;
|
||||
this.isset = () => callback !== undefined;
|
||||
this.dispose = () => {
|
||||
if (callback) {
|
||||
callback();
|
||||
callback = undefined;
|
||||
markAsDisposed(this);
|
||||
}
|
||||
};
|
||||
return this;
|
||||
}
|
||||
}
|
||||
export class ImmortalReference {
|
||||
constructor(object) {
|
||||
this.object = object;
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/esm/vs/base/common/network.js
generated
vendored
2
node_modules/monaco-editor-core/esm/vs/base/common/network.js
generated
vendored
|
|
@ -37,12 +37,12 @@ export var Schemas;
|
|||
Schemas.command = 'command';
|
||||
Schemas.vscodeRemote = 'vscode-remote';
|
||||
Schemas.vscodeRemoteResource = 'vscode-remote-resource';
|
||||
Schemas.vscodeManagedRemoteResource = 'vscode-managed-remote-resource';
|
||||
Schemas.vscodeUserData = 'vscode-userdata';
|
||||
Schemas.vscodeCustomEditor = 'vscode-custom-editor';
|
||||
Schemas.vscodeNotebookCell = 'vscode-notebook-cell';
|
||||
Schemas.vscodeNotebookCellMetadata = 'vscode-notebook-cell-metadata';
|
||||
Schemas.vscodeNotebookCellOutput = 'vscode-notebook-cell-output';
|
||||
Schemas.vscodeInteractive = 'vscode-interactive';
|
||||
Schemas.vscodeInteractiveInput = 'vscode-interactive-input';
|
||||
Schemas.vscodeSettings = 'vscode-settings';
|
||||
Schemas.vscodeWorkspaceTrust = 'vscode-workspace-trust';
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/esm/vs/base/common/observable.js
generated
vendored
2
node_modules/monaco-editor-core/esm/vs/base/common/observable.js
generated
vendored
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
export { observableValue, transaction } from './observableImpl/base';
|
||||
export { derived } from './observableImpl/derived';
|
||||
export { autorun, autorunWithStore } from './observableImpl/autorun';
|
||||
export { autorun, autorunHandleChanges, autorunWithStore } from './observableImpl/autorun';
|
||||
export * from './observableImpl/utils.js';
|
||||
import { ConsoleObservableLogger, setLogger } from './observableImpl/logging.js';
|
||||
const enableLogging = false;
|
||||
|
|
|
|||
3
node_modules/monaco-editor-core/esm/vs/base/common/observableImpl/autorun.js
generated
vendored
3
node_modules/monaco-editor-core/esm/vs/base/common/observableImpl/autorun.js
generated
vendored
|
|
@ -8,6 +8,9 @@ import { getLogger } from './logging.js';
|
|||
export function autorun(debugName, fn) {
|
||||
return new AutorunObserver(debugName, fn, undefined, undefined);
|
||||
}
|
||||
export function autorunHandleChanges(debugName, options, fn) {
|
||||
return new AutorunObserver(debugName, fn, options.createEmptyChangeSummary, options.handleChange);
|
||||
}
|
||||
// TODO@hediet rename to autorunWithStore
|
||||
export function autorunWithStore2(debugName, fn) {
|
||||
return autorunWithStore(fn, debugName);
|
||||
|
|
|
|||
17
node_modules/monaco-editor-core/esm/vs/base/common/observableImpl/derived.js
generated
vendored
17
node_modules/monaco-editor-core/esm/vs/base/common/observableImpl/derived.js
generated
vendored
|
|
@ -3,26 +3,35 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { BugIndicatingError } from '../errors.js';
|
||||
import { DisposableStore } from '../lifecycle.js';
|
||||
import { BaseObservable, _setDerived } from './base.js';
|
||||
import { getLogger } from './logging.js';
|
||||
export function derived(debugName, computeFn) {
|
||||
return new Derived(debugName, computeFn, undefined, undefined);
|
||||
return new Derived(debugName, computeFn, undefined, undefined, undefined);
|
||||
}
|
||||
export function derivedHandleChanges(debugName, options, computeFn) {
|
||||
return new Derived(debugName, computeFn, options.createEmptyChangeSummary, options.handleChange);
|
||||
return new Derived(debugName, computeFn, options.createEmptyChangeSummary, options.handleChange, undefined);
|
||||
}
|
||||
export function derivedWithStore(name, computeFn) {
|
||||
const store = new DisposableStore();
|
||||
return new Derived(name, r => {
|
||||
store.clear();
|
||||
return computeFn(r, store);
|
||||
}, undefined, undefined, () => store.dispose());
|
||||
}
|
||||
_setDerived(derived);
|
||||
export class Derived extends BaseObservable {
|
||||
get debugName() {
|
||||
return typeof this._debugName === 'function' ? this._debugName() : this._debugName;
|
||||
}
|
||||
constructor(_debugName, computeFn, createChangeSummary, _handleChange) {
|
||||
constructor(_debugName, computeFn, createChangeSummary, _handleChange, _handleLastObserverRemoved = undefined) {
|
||||
var _a, _b;
|
||||
super();
|
||||
this._debugName = _debugName;
|
||||
this.computeFn = computeFn;
|
||||
this.createChangeSummary = createChangeSummary;
|
||||
this._handleChange = _handleChange;
|
||||
this._handleLastObserverRemoved = _handleLastObserverRemoved;
|
||||
this.state = 0 /* DerivedState.initial */;
|
||||
this.value = undefined;
|
||||
this.updateCount = 0;
|
||||
|
|
@ -33,6 +42,7 @@ export class Derived extends BaseObservable {
|
|||
(_b = getLogger()) === null || _b === void 0 ? void 0 : _b.handleDerivedCreated(this);
|
||||
}
|
||||
onLastObserverRemoved() {
|
||||
var _a;
|
||||
/**
|
||||
* We are not tracking changes anymore, thus we have to assume
|
||||
* that our cache is invalid.
|
||||
|
|
@ -43,6 +53,7 @@ export class Derived extends BaseObservable {
|
|||
d.removeObserver(this);
|
||||
}
|
||||
this.dependencies.clear();
|
||||
(_a = this._handleLastObserverRemoved) === null || _a === void 0 ? void 0 : _a.call(this);
|
||||
}
|
||||
get() {
|
||||
var _a;
|
||||
|
|
|
|||
25
node_modules/monaco-editor-core/esm/vs/base/common/observableImpl/utils.js
generated
vendored
25
node_modules/monaco-editor-core/esm/vs/base/common/observableImpl/utils.js
generated
vendored
|
|
@ -3,7 +3,8 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { toDisposable } from '../lifecycle.js';
|
||||
import { BaseObservable, transaction, ConvenientObservable, getFunctionName } from './base.js';
|
||||
import { autorun } from './autorun.js';
|
||||
import { BaseObservable, ConvenientObservable, getFunctionName, transaction } from './base.js';
|
||||
import { getLogger } from './logging.js';
|
||||
export function constObservable(value) {
|
||||
return new ConstObservable(value);
|
||||
|
|
@ -29,6 +30,28 @@ class ConstObservable extends ConvenientObservable {
|
|||
return `Const: ${this.value}`;
|
||||
}
|
||||
}
|
||||
export function waitForState(observable, predicate) {
|
||||
return new Promise(resolve => {
|
||||
let didRun = false;
|
||||
let shouldDispose = false;
|
||||
const d = autorun('waitForState', reader => {
|
||||
const currentState = observable.read(reader);
|
||||
if (predicate(currentState)) {
|
||||
if (!didRun) {
|
||||
shouldDispose = true;
|
||||
}
|
||||
else {
|
||||
d.dispose();
|
||||
}
|
||||
resolve(currentState);
|
||||
}
|
||||
});
|
||||
didRun = true;
|
||||
if (shouldDispose) {
|
||||
d.dispose();
|
||||
}
|
||||
});
|
||||
}
|
||||
export function observableFromEvent(event, getValue) {
|
||||
return new FromEventObservable(event, getValue);
|
||||
}
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/esm/vs/base/common/process.js
generated
vendored
2
node_modules/monaco-editor-core/esm/vs/base/common/process.js
generated
vendored
|
|
@ -39,6 +39,8 @@ else {
|
|||
* environments.
|
||||
*
|
||||
* Note: in web, this property is hardcoded to be `/`.
|
||||
*
|
||||
* @skipMangle
|
||||
*/
|
||||
export const cwd = safeProcess.cwd;
|
||||
/**
|
||||
|
|
|
|||
10
node_modules/monaco-editor-core/esm/vs/base/common/stopwatch.js
generated
vendored
10
node_modules/monaco-editor-core/esm/vs/base/common/stopwatch.js
generated
vendored
|
|
@ -2,14 +2,13 @@
|
|||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { globals } from './platform.js';
|
||||
const hasPerformanceNow = (globals.performance && typeof globals.performance.now === 'function');
|
||||
const hasPerformanceNow = (globalThis.performance && typeof globalThis.performance.now === 'function');
|
||||
export class StopWatch {
|
||||
static create(highResolution = true) {
|
||||
static create(highResolution) {
|
||||
return new StopWatch(highResolution);
|
||||
}
|
||||
constructor(highResolution) {
|
||||
this._highResolution = hasPerformanceNow && highResolution;
|
||||
this._now = hasPerformanceNow && highResolution === false ? Date.now : globalThis.performance.now.bind(globalThis.performance);
|
||||
this._startTime = this._now();
|
||||
this._stopTime = -1;
|
||||
}
|
||||
|
|
@ -22,7 +21,4 @@ export class StopWatch {
|
|||
}
|
||||
return this._now() - this._startTime;
|
||||
}
|
||||
_now() {
|
||||
return this._highResolution ? globals.performance.now() : Date.now();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1
node_modules/monaco-editor-core/esm/vs/base/common/worker/simpleWorker.js
generated
vendored
1
node_modules/monaco-editor-core/esm/vs/base/common/worker/simpleWorker.js
generated
vendored
|
|
@ -434,6 +434,7 @@ export class SimpleWorkerServer {
|
|||
}
|
||||
/**
|
||||
* Called on the worker side
|
||||
* @skipMangle
|
||||
*/
|
||||
export function create(postMessage) {
|
||||
return new SimpleWorkerServer(postMessage, null);
|
||||
|
|
|
|||
34
node_modules/monaco-editor-core/esm/vs/base/parts/storage/common/storage.js
generated
vendored
34
node_modules/monaco-editor-core/esm/vs/base/parts/storage/common/storage.js
generated
vendored
|
|
@ -12,7 +12,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||
});
|
||||
};
|
||||
import { ThrottledDelayer } from '../../../common/async.js';
|
||||
import { Emitter, Event } from '../../../common/event.js';
|
||||
import { Event, PauseableEmitter } from '../../../common/event.js';
|
||||
import { Disposable } from '../../../common/lifecycle.js';
|
||||
import { stringify } from '../../../common/marshalling.js';
|
||||
import { isObject, isUndefinedOrNull } from '../../../common/types.js';
|
||||
|
|
@ -38,7 +38,7 @@ export class Storage extends Disposable {
|
|||
super();
|
||||
this.database = database;
|
||||
this.options = options;
|
||||
this._onDidChangeStorage = this._register(new Emitter());
|
||||
this._onDidChangeStorage = this._register(new PauseableEmitter());
|
||||
this.onDidChangeStorage = this._onDidChangeStorage.event;
|
||||
this.state = StorageState.None;
|
||||
this.cache = new Map();
|
||||
|
|
@ -53,13 +53,19 @@ export class Storage extends Disposable {
|
|||
}
|
||||
onDidChangeItemsExternal(e) {
|
||||
var _a, _b;
|
||||
// items that change external require us to update our
|
||||
// caches with the values. we just accept the value and
|
||||
// emit an event if there is a change.
|
||||
(_a = e.changed) === null || _a === void 0 ? void 0 : _a.forEach((value, key) => this.accept(key, value));
|
||||
(_b = e.deleted) === null || _b === void 0 ? void 0 : _b.forEach(key => this.accept(key, undefined));
|
||||
this._onDidChangeStorage.pause();
|
||||
try {
|
||||
// items that change external require us to update our
|
||||
// caches with the values. we just accept the value and
|
||||
// emit an event if there is a change.
|
||||
(_a = e.changed) === null || _a === void 0 ? void 0 : _a.forEach((value, key) => this.acceptExternal(key, value));
|
||||
(_b = e.deleted) === null || _b === void 0 ? void 0 : _b.forEach(key => this.acceptExternal(key, undefined));
|
||||
}
|
||||
finally {
|
||||
this._onDidChangeStorage.resume();
|
||||
}
|
||||
}
|
||||
accept(key, value) {
|
||||
acceptExternal(key, value) {
|
||||
if (this.state === StorageState.Closed) {
|
||||
return; // Return early if we are already closed
|
||||
}
|
||||
|
|
@ -78,7 +84,7 @@ export class Storage extends Disposable {
|
|||
}
|
||||
// Signal to outside listeners
|
||||
if (changed) {
|
||||
this._onDidChangeStorage.fire(key);
|
||||
this._onDidChangeStorage.fire({ key, external: true });
|
||||
}
|
||||
}
|
||||
get(key, fallbackValue) {
|
||||
|
|
@ -102,14 +108,14 @@ export class Storage extends Disposable {
|
|||
}
|
||||
return parseInt(value, 10);
|
||||
}
|
||||
set(key, value) {
|
||||
set(key, value, external = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (this.state === StorageState.Closed) {
|
||||
return; // Return early if we are already closed
|
||||
}
|
||||
// We remove the key for undefined/null values
|
||||
if (isUndefinedOrNull(value)) {
|
||||
return this.delete(key);
|
||||
return this.delete(key, external);
|
||||
}
|
||||
// Otherwise, convert to String and store
|
||||
const valueStr = isObject(value) || Array.isArray(value) ? stringify(value) : String(value);
|
||||
|
|
@ -123,12 +129,12 @@ export class Storage extends Disposable {
|
|||
this.pendingInserts.set(key, valueStr);
|
||||
this.pendingDeletes.delete(key);
|
||||
// Event
|
||||
this._onDidChangeStorage.fire(key);
|
||||
this._onDidChangeStorage.fire({ key, external });
|
||||
// Accumulate work by scheduling after timeout
|
||||
return this.doFlush();
|
||||
});
|
||||
}
|
||||
delete(key) {
|
||||
delete(key, external = false) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (this.state === StorageState.Closed) {
|
||||
return; // Return early if we are already closed
|
||||
|
|
@ -143,7 +149,7 @@ export class Storage extends Disposable {
|
|||
}
|
||||
this.pendingInserts.delete(key);
|
||||
// Event
|
||||
this._onDidChangeStorage.fire(key);
|
||||
this._onDidChangeStorage.fire({ key, external });
|
||||
// Accumulate work by scheduling after timeout
|
||||
return this.doFlush();
|
||||
});
|
||||
|
|
|
|||
12
node_modules/monaco-editor-core/esm/vs/editor/browser/controller/mouseHandler.js
generated
vendored
12
node_modules/monaco-editor-core/esm/vs/editor/browser/controller/mouseHandler.js
generated
vendored
|
|
@ -23,7 +23,7 @@ export class MouseHandler extends ViewEventHandler {
|
|||
this.mouseTargetFactory = new MouseTargetFactory(this._context, viewHelper);
|
||||
this._mouseDownOperation = this._register(new MouseDownOperation(this._context, this.viewController, this.viewHelper, this.mouseTargetFactory, (e, testEventTarget) => this._createMouseTarget(e, testEventTarget), (e) => this._getMouseColumn(e)));
|
||||
this.lastMouseLeaveTime = -1;
|
||||
this._height = this._context.configuration.options.get(140 /* EditorOption.layoutInfo */).height;
|
||||
this._height = this._context.configuration.options.get(141 /* EditorOption.layoutInfo */).height;
|
||||
const mouseEvents = new EditorMouseEventFactory(this.viewHelper.viewDomNode);
|
||||
this._register(mouseEvents.onContextMenu(this.viewHelper.viewDomNode, (e) => this._onContextMenu(e, true)));
|
||||
this._register(mouseEvents.onMouseMove(this.viewHelper.viewDomNode, (e) => {
|
||||
|
|
@ -125,9 +125,9 @@ export class MouseHandler extends ViewEventHandler {
|
|||
}
|
||||
// --- begin event handlers
|
||||
onConfigurationChanged(e) {
|
||||
if (e.hasChanged(140 /* EditorOption.layoutInfo */)) {
|
||||
if (e.hasChanged(141 /* EditorOption.layoutInfo */)) {
|
||||
// layout change
|
||||
const height = this._context.configuration.options.get(140 /* EditorOption.layoutInfo */).height;
|
||||
const height = this._context.configuration.options.get(141 /* EditorOption.layoutInfo */).height;
|
||||
if (this._height !== height) {
|
||||
this._height = height;
|
||||
this._mouseDownOperation.onHeightChanged();
|
||||
|
|
@ -213,7 +213,7 @@ export class MouseHandler extends ViewEventHandler {
|
|||
const targetIsContent = (t.type === 6 /* MouseTargetType.CONTENT_TEXT */ || t.type === 7 /* MouseTargetType.CONTENT_EMPTY */);
|
||||
const targetIsGutter = (t.type === 2 /* MouseTargetType.GUTTER_GLYPH_MARGIN */ || t.type === 3 /* MouseTargetType.GUTTER_LINE_NUMBERS */ || t.type === 4 /* MouseTargetType.GUTTER_LINE_DECORATIONS */);
|
||||
const targetIsLineNumbers = (t.type === 3 /* MouseTargetType.GUTTER_LINE_NUMBERS */);
|
||||
const selectOnLineNumbers = this._context.configuration.options.get(105 /* EditorOption.selectOnLineNumbers */);
|
||||
const selectOnLineNumbers = this._context.configuration.options.get(106 /* EditorOption.selectOnLineNumbers */);
|
||||
const targetIsViewZone = (t.type === 8 /* MouseTargetType.CONTENT_VIEW_ZONE */ || t.type === 5 /* MouseTargetType.GUTTER_VIEW_ZONE */);
|
||||
const targetIsWidget = (t.type === 9 /* MouseTargetType.CONTENT_WIDGET */);
|
||||
let shouldHandle = e.leftButton || e.middleButton;
|
||||
|
|
@ -515,7 +515,7 @@ class TopBottomDragScrollingOperation extends Disposable {
|
|||
*/
|
||||
_getScrollSpeed() {
|
||||
const lineHeight = this._context.configuration.options.get(64 /* EditorOption.lineHeight */);
|
||||
const viewportInLines = this._context.configuration.options.get(140 /* EditorOption.layoutInfo */).height / lineHeight;
|
||||
const viewportInLines = this._context.configuration.options.get(141 /* EditorOption.layoutInfo */).height / lineHeight;
|
||||
const outsideDistanceInLines = this._position.outsideDistance / lineHeight;
|
||||
if (outsideDistanceInLines <= 1.5) {
|
||||
return Math.max(30, viewportInLines * (1 + outsideDistanceInLines));
|
||||
|
|
@ -539,7 +539,7 @@ class TopBottomDragScrollingOperation extends Disposable {
|
|||
let mouseTarget;
|
||||
{
|
||||
const editorPos = createEditorPagePosition(this._viewHelper.viewDomNode);
|
||||
const horizontalScrollbarHeight = this._context.configuration.options.get(140 /* EditorOption.layoutInfo */).horizontalScrollbarHeight;
|
||||
const horizontalScrollbarHeight = this._context.configuration.options.get(141 /* EditorOption.layoutInfo */).horizontalScrollbarHeight;
|
||||
const pos = new PageCoordinates(this._mouseEvent.pos.x, editorPos.y + editorPos.height - horizontalScrollbarHeight - 0.1);
|
||||
const relativePos = createCoordinatesRelativeToEditor(this._viewHelper.viewDomNode, editorPos, pos);
|
||||
mouseTarget = this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(), editorPos, pos, relativePos, null);
|
||||
|
|
|
|||
6
node_modules/monaco-editor-core/esm/vs/editor/browser/controller/mouseTarget.js
generated
vendored
6
node_modules/monaco-editor-core/esm/vs/editor/browser/controller/mouseTarget.js
generated
vendored
|
|
@ -166,10 +166,10 @@ export class HitTestContext {
|
|||
constructor(context, viewHelper, lastRenderData) {
|
||||
this.viewModel = context.viewModel;
|
||||
const options = context.configuration.options;
|
||||
this.layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
this.layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this.viewDomNode = viewHelper.viewDomNode;
|
||||
this.lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this.stickyTabStops = options.get(112 /* EditorOption.stickyTabStops */);
|
||||
this.stickyTabStops = options.get(113 /* EditorOption.stickyTabStops */);
|
||||
this.typicalHalfwidthCharacterWidth = options.get(48 /* EditorOption.fontInfo */).typicalHalfwidthCharacterWidth;
|
||||
this.lastRenderData = lastRenderData;
|
||||
this._context = context;
|
||||
|
|
@ -602,7 +602,7 @@ export class MouseTargetFactory {
|
|||
}
|
||||
getMouseColumn(relativePos) {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
const mouseContentHorizontalOffset = this._context.viewLayout.getCurrentScrollLeft() + relativePos.x - layoutInfo.contentLeft;
|
||||
return MouseTargetFactory._getMouseColumn(mouseContentHorizontalOffset, options.get(48 /* EditorOption.fontInfo */).typicalHalfwidthCharacterWidth);
|
||||
}
|
||||
|
|
|
|||
19
node_modules/monaco-editor-core/esm/vs/editor/browser/controller/textAreaHandler.js
generated
vendored
19
node_modules/monaco-editor-core/esm/vs/editor/browser/controller/textAreaHandler.js
generated
vendored
|
|
@ -88,7 +88,7 @@ export class TextAreaHandler extends ViewPart {
|
|||
this._scrollLeft = 0;
|
||||
this._scrollTop = 0;
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._setAccessibilityOptions(options);
|
||||
this._contentLeft = layoutInfo.contentLeft;
|
||||
this._contentWidth = layoutInfo.contentWidth;
|
||||
|
|
@ -113,7 +113,7 @@ export class TextAreaHandler extends ViewPart {
|
|||
this.textArea.setAttribute('autocomplete', 'off');
|
||||
this.textArea.setAttribute('spellcheck', 'false');
|
||||
this.textArea.setAttribute('aria-label', this._getAriaLabel(options));
|
||||
this.textArea.setAttribute('tabindex', String(options.get(120 /* EditorOption.tabIndex */)));
|
||||
this.textArea.setAttribute('tabindex', String(options.get(121 /* EditorOption.tabIndex */)));
|
||||
this.textArea.setAttribute('role', 'textbox');
|
||||
this.textArea.setAttribute('aria-roledescription', nls.localize('editor', "editor"));
|
||||
this.textArea.setAttribute('aria-multiline', 'true');
|
||||
|
|
@ -219,7 +219,12 @@ export class TextAreaHandler extends ViewPart {
|
|||
}
|
||||
};
|
||||
const textAreaWrapper = this._register(new TextAreaWrapper(this.textArea.domNode));
|
||||
this._textAreaInput = this._register(new TextAreaInput(textAreaInputHost, textAreaWrapper, platform.OS, browser));
|
||||
this._textAreaInput = this._register(new TextAreaInput(textAreaInputHost, textAreaWrapper, platform.OS, {
|
||||
isAndroid: browser.isAndroid,
|
||||
isChrome: browser.isChrome,
|
||||
isFirefox: browser.isFirefox,
|
||||
isSafari: browser.isSafari,
|
||||
}));
|
||||
this._register(this._textAreaInput.onKeyDown((e) => {
|
||||
this._viewController.emitKeyDown(e);
|
||||
}));
|
||||
|
|
@ -393,7 +398,7 @@ export class TextAreaHandler extends ViewPart {
|
|||
}
|
||||
_getWordBeforePosition(position) {
|
||||
const lineContent = this._context.viewModel.getLineContent(position.lineNumber);
|
||||
const wordSeparators = getMapForWordSeparators(this._context.configuration.options.get(126 /* EditorOption.wordSeparators */));
|
||||
const wordSeparators = getMapForWordSeparators(this._context.configuration.options.get(127 /* EditorOption.wordSeparators */));
|
||||
let column = position.column;
|
||||
let distance = 0;
|
||||
while (column > 1) {
|
||||
|
|
@ -438,7 +443,7 @@ export class TextAreaHandler extends ViewPart {
|
|||
// we will size the textarea to match the width used for wrapping points computation (see `domLineBreaksComputer.ts`).
|
||||
// This is because screen readers will read the text in the textarea and we'd like that the
|
||||
// wrapping points in the textarea match the wrapping points in the editor.
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
const wrappingColumn = layoutInfo.wrappingColumn;
|
||||
if (wrappingColumn !== -1 && this._accessibilitySupport !== 1 /* AccessibilitySupport.Disabled */) {
|
||||
const fontInfo = options.get(48 /* EditorOption.fontInfo */);
|
||||
|
|
@ -453,7 +458,7 @@ export class TextAreaHandler extends ViewPart {
|
|||
// --- begin event handlers
|
||||
onConfigurationChanged(e) {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._setAccessibilityOptions(options);
|
||||
this._contentLeft = layoutInfo.contentLeft;
|
||||
this._contentWidth = layoutInfo.contentWidth;
|
||||
|
|
@ -466,7 +471,7 @@ export class TextAreaHandler extends ViewPart {
|
|||
const { tabSize } = this._context.viewModel.model.getOptions();
|
||||
this.textArea.domNode.style.tabSize = `${tabSize * this._fontInfo.spaceWidth}px`;
|
||||
this.textArea.setAttribute('aria-label', this._getAriaLabel(options));
|
||||
this.textArea.setAttribute('tabindex', String(options.get(120 /* EditorOption.tabIndex */)));
|
||||
this.textArea.setAttribute('tabindex', String(options.get(121 /* EditorOption.tabIndex */)));
|
||||
if (e.hasChanged(32 /* EditorOption.domReadOnly */) || e.hasChanged(88 /* EditorOption.readOnly */)) {
|
||||
this._ensureReadOnlyAttribute();
|
||||
}
|
||||
|
|
|
|||
12
node_modules/monaco-editor-core/esm/vs/editor/browser/editorExtensions.js
generated
vendored
12
node_modules/monaco-editor-core/esm/vs/editor/browser/editorExtensions.js
generated
vendored
|
|
@ -86,8 +86,8 @@ export class MultiCommand extends Command {
|
|||
/**
|
||||
* A higher priority gets to be looked at first
|
||||
*/
|
||||
addImplementation(priority, name, implementation) {
|
||||
this._implementations.push({ priority, name, implementation });
|
||||
addImplementation(priority, name, implementation, when) {
|
||||
this._implementations.push({ priority, name, implementation, when });
|
||||
this._implementations.sort((a, b) => b.priority - a.priority);
|
||||
return {
|
||||
dispose: () => {
|
||||
|
|
@ -102,8 +102,16 @@ export class MultiCommand extends Command {
|
|||
}
|
||||
runCommand(accessor, args) {
|
||||
const logService = accessor.get(ILogService);
|
||||
const contextKeyService = accessor.get(IContextKeyService);
|
||||
logService.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);
|
||||
for (const impl of this._implementations) {
|
||||
if (impl.when) {
|
||||
const context = contextKeyService.getContext(document.activeElement);
|
||||
const value = impl.when.evaluate(context);
|
||||
if (!value) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
const result = impl.implementation(accessor, args);
|
||||
if (result) {
|
||||
logService.trace(`Command '${this.id}' was handled by '${impl.name}'.`);
|
||||
|
|
|
|||
16
node_modules/monaco-editor-core/esm/vs/editor/browser/services/editorWorkerService.js
generated
vendored
16
node_modules/monaco-editor-core/esm/vs/editor/browser/services/editorWorkerService.js
generated
vendored
|
|
@ -35,7 +35,7 @@ import { ILogService } from '../../../platform/log/common/log.js';
|
|||
import { StopWatch } from '../../../base/common/stopwatch.js';
|
||||
import { canceled } from '../../../base/common/errors.js';
|
||||
import { ILanguageFeaturesService } from '../../common/services/languageFeatures.js';
|
||||
import { LineRangeMapping, RangeMapping } from '../../common/diff/linesDiffComputer.js';
|
||||
import { LineRangeMapping, MovedText, RangeMapping, SimpleLineRangeMapping } from '../../common/diff/linesDiffComputer.js';
|
||||
import { LineRange } from '../../common/core/lineRange.js';
|
||||
/**
|
||||
* Stop syncing a model to the worker if it was not needed for 1 min.
|
||||
|
|
@ -93,12 +93,16 @@ export let EditorWorkerService = class EditorWorkerService extends Disposable {
|
|||
const diff = {
|
||||
identical: result.identical,
|
||||
quitEarly: result.quitEarly,
|
||||
changes: result.changes.map((c) => {
|
||||
var _a;
|
||||
return new LineRangeMapping(new LineRange(c[0], c[1]), new LineRange(c[2], c[3]), (_a = c[4]) === null || _a === void 0 ? void 0 : _a.map((c) => new RangeMapping(new Range(c[0], c[1], c[2], c[3]), new Range(c[4], c[5], c[6], c[7]))));
|
||||
}),
|
||||
changes: toLineRangeMappings(result.changes),
|
||||
moves: result.moves.map(m => new MovedText(new SimpleLineRangeMapping(new LineRange(m[0], m[1]), new LineRange(m[2], m[3])), toLineRangeMappings(m[4])))
|
||||
};
|
||||
return diff;
|
||||
function toLineRangeMappings(changes) {
|
||||
return changes.map((c) => {
|
||||
var _a;
|
||||
return new LineRangeMapping(new LineRange(c[0], c[1]), new LineRange(c[2], c[3]), (_a = c[4]) === null || _a === void 0 ? void 0 : _a.map((c) => new RangeMapping(new Range(c[0], c[1], c[2], c[3]), new Range(c[4], c[5], c[6], c[7]))));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
computeMoreMinimalEdits(resource, edits, pretty = false) {
|
||||
|
|
@ -106,7 +110,7 @@ export let EditorWorkerService = class EditorWorkerService extends Disposable {
|
|||
if (!canSyncModel(this._modelService, resource)) {
|
||||
return Promise.resolve(edits); // File too large
|
||||
}
|
||||
const sw = StopWatch.create(true);
|
||||
const sw = StopWatch.create();
|
||||
const result = this._workerManager.withWorker().then(client => client.computeMoreMinimalEdits(resource, edits, pretty));
|
||||
result.finally(() => this._logService.trace('FORMAT#computeMoreMinimalEdits', resource.toString(true), sw.elapsed()));
|
||||
return Promise.race([result, timeout(1000).then(() => edits)]);
|
||||
|
|
|
|||
87
node_modules/monaco-editor-core/esm/vs/editor/browser/view.js
generated
vendored
87
node_modules/monaco-editor-core/esm/vs/editor/browser/view.js
generated
vendored
|
|
@ -4,6 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as dom from '../../base/browser/dom.js';
|
||||
import { Selection } from '../common/core/selection.js';
|
||||
import { Range } from '../common/core/range.js';
|
||||
import { createFastDomNode } from '../../base/browser/fastDomNode.js';
|
||||
import { onUnexpectedError } from '../../base/common/errors.js';
|
||||
import { PointerHandler } from './controller/pointerHandler.js';
|
||||
|
|
@ -16,7 +17,6 @@ import { ViewContentWidgets } from './viewParts/contentWidgets/contentWidgets.js
|
|||
import { CurrentLineHighlightOverlay, CurrentLineMarginHighlightOverlay } from './viewParts/currentLineHighlight/currentLineHighlight.js';
|
||||
import { DecorationsOverlay } from './viewParts/decorations/decorations.js';
|
||||
import { EditorScrollbar } from './viewParts/editorScrollbar/editorScrollbar.js';
|
||||
import { GlyphMarginOverlay } from './viewParts/glyphMargin/glyphMargin.js';
|
||||
import { IndentGuidesOverlay } from './viewParts/indentGuides/indentGuides.js';
|
||||
import { LineNumbersOverlay } from './viewParts/lineNumbers/lineNumbers.js';
|
||||
import { ViewLines } from './viewParts/lines/viewLines.js';
|
||||
|
|
@ -42,9 +42,13 @@ import { PointerHandlerLastRenderData } from './controller/mouseTarget.js';
|
|||
import { BlockDecorations } from './viewParts/blockDecorations/blockDecorations.js';
|
||||
import { inputLatency } from '../../base/browser/performance.js';
|
||||
import { WhitespaceOverlay } from './viewParts/whitespace/whitespace.js';
|
||||
import { GlyphMarginWidgets } from './viewParts/glyphMargin/glyphMargin.js';
|
||||
import { GlyphMarginLane } from '../common/model.js';
|
||||
export class View extends ViewEventHandler {
|
||||
constructor(commandDelegate, configuration, colorTheme, model, userInputEvents, overflowWidgetsDomNode) {
|
||||
super();
|
||||
// Actual mutable state
|
||||
this._shouldRecomputeGlyphMarginLanes = false;
|
||||
this._selections = [new Selection(1, 1, 1, 1)];
|
||||
this._renderAnimationFrame = null;
|
||||
const viewController = new ViewController(configuration, model, userInputEvents, commandDelegate);
|
||||
|
|
@ -89,13 +93,16 @@ export class View extends ViewEventHandler {
|
|||
const marginViewOverlays = new MarginViewOverlays(this._context);
|
||||
this._viewParts.push(marginViewOverlays);
|
||||
marginViewOverlays.addDynamicOverlay(new CurrentLineMarginHighlightOverlay(this._context));
|
||||
marginViewOverlays.addDynamicOverlay(new GlyphMarginOverlay(this._context));
|
||||
marginViewOverlays.addDynamicOverlay(new MarginViewLineDecorationsOverlay(this._context));
|
||||
marginViewOverlays.addDynamicOverlay(new LinesDecorationsOverlay(this._context));
|
||||
marginViewOverlays.addDynamicOverlay(new LineNumbersOverlay(this._context));
|
||||
// Glyph margin widgets
|
||||
this._glyphMarginWidgets = new GlyphMarginWidgets(this._context);
|
||||
this._viewParts.push(this._glyphMarginWidgets);
|
||||
const margin = new Margin(this._context);
|
||||
margin.getDomNode().appendChild(this._viewZones.marginDomNode);
|
||||
margin.getDomNode().appendChild(marginViewOverlays.getDomNode());
|
||||
margin.getDomNode().appendChild(this._glyphMarginWidgets.domNode);
|
||||
this._viewParts.push(margin);
|
||||
// Content widgets
|
||||
this._contentWidgets = new ViewContentWidgets(this._context, this.domNode);
|
||||
|
|
@ -142,9 +149,57 @@ export class View extends ViewEventHandler {
|
|||
this._pointerHandler = this._register(new PointerHandler(this._context, viewController, this._createPointerHandlerHelper()));
|
||||
}
|
||||
_flushAccumulatedAndRenderNow() {
|
||||
if (this._shouldRecomputeGlyphMarginLanes) {
|
||||
this._shouldRecomputeGlyphMarginLanes = false;
|
||||
this._context.configuration.setGlyphMarginDecorationLaneCount(this._computeGlyphMarginLaneCount());
|
||||
}
|
||||
inputLatency.onRenderStart();
|
||||
this._renderNow();
|
||||
}
|
||||
_computeGlyphMarginLaneCount() {
|
||||
const model = this._context.viewModel.model;
|
||||
let glyphs = [];
|
||||
// Add all margin decorations
|
||||
glyphs = glyphs.concat(model.getAllMarginDecorations().map((decoration) => {
|
||||
var _a, _b;
|
||||
const lane = (_b = (_a = decoration.options.glyphMargin) === null || _a === void 0 ? void 0 : _a.position) !== null && _b !== void 0 ? _b : GlyphMarginLane.Left;
|
||||
return { range: decoration.range, lane };
|
||||
}));
|
||||
// Add all glyph margin widgets
|
||||
glyphs = glyphs.concat(this._glyphMarginWidgets.getWidgets().map((widget) => {
|
||||
const range = model.validateRange(widget.preference.range);
|
||||
return { range, lane: widget.preference.lane };
|
||||
}));
|
||||
// Sorted by their start position
|
||||
glyphs.sort((a, b) => Range.compareRangesUsingStarts(a.range, b.range));
|
||||
let leftDecRange = null;
|
||||
let rightDecRange = null;
|
||||
for (const decoration of glyphs) {
|
||||
if (decoration.lane === GlyphMarginLane.Left && (!leftDecRange || Range.compareRangesUsingEnds(leftDecRange, decoration.range) < 0)) {
|
||||
// assign only if the range of `decoration` ends after, which means it has a higher chance to overlap with the other lane
|
||||
leftDecRange = decoration.range;
|
||||
}
|
||||
if (decoration.lane === GlyphMarginLane.Right && (!rightDecRange || Range.compareRangesUsingEnds(rightDecRange, decoration.range) < 0)) {
|
||||
// assign only if the range of `decoration` ends after, which means it has a higher chance to overlap with the other lane
|
||||
rightDecRange = decoration.range;
|
||||
}
|
||||
if (leftDecRange && rightDecRange) {
|
||||
if (leftDecRange.endLineNumber < rightDecRange.startLineNumber) {
|
||||
// there's no chance for `leftDecRange` to ever intersect something going further
|
||||
leftDecRange = null;
|
||||
continue;
|
||||
}
|
||||
if (rightDecRange.endLineNumber < leftDecRange.startLineNumber) {
|
||||
// there's no chance for `rightDecRange` to ever intersect something going further
|
||||
rightDecRange = null;
|
||||
continue;
|
||||
}
|
||||
// leftDecRange and rightDecRange are intersecting or touching => we need two lanes
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
_createPointerHandlerHelper() {
|
||||
return {
|
||||
viewDomNode: this.domNode.domNode,
|
||||
|
|
@ -194,7 +249,7 @@ export class View extends ViewEventHandler {
|
|||
}
|
||||
_applyLayout() {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this.domNode.setWidth(layoutInfo.width);
|
||||
this.domNode.setHeight(layoutInfo.height);
|
||||
this._overflowGuardContainer.setWidth(layoutInfo.width);
|
||||
|
|
@ -204,7 +259,7 @@ export class View extends ViewEventHandler {
|
|||
}
|
||||
_getEditorClassName() {
|
||||
const focused = this._textAreaHandler.isFocused() ? ' focused' : '';
|
||||
return this._context.configuration.options.get(137 /* EditorOption.editorClassName */) + ' ' + getThemeTypeSelector(this._context.theme.type) + focused;
|
||||
return this._context.configuration.options.get(138 /* EditorOption.editorClassName */) + ' ' + getThemeTypeSelector(this._context.theme.type) + focused;
|
||||
}
|
||||
// --- begin event handlers
|
||||
handleEvents(events) {
|
||||
|
|
@ -220,6 +275,12 @@ export class View extends ViewEventHandler {
|
|||
this._selections = e.selections;
|
||||
return false;
|
||||
}
|
||||
onDecorationsChanged(e) {
|
||||
if (e.affectsGlyphMargin) {
|
||||
this._shouldRecomputeGlyphMarginLanes = true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
onFocusChanged(e) {
|
||||
this.domNode.setClassName(this._getEditorClassName());
|
||||
return false;
|
||||
|
|
@ -396,6 +457,24 @@ export class View extends ViewEventHandler {
|
|||
this._overlayWidgets.removeWidget(widgetData.widget);
|
||||
this._scheduleRender();
|
||||
}
|
||||
addGlyphMarginWidget(widgetData) {
|
||||
this._glyphMarginWidgets.addWidget(widgetData.widget);
|
||||
this._shouldRecomputeGlyphMarginLanes = true;
|
||||
this._scheduleRender();
|
||||
}
|
||||
layoutGlyphMarginWidget(widgetData) {
|
||||
const newPreference = widgetData.position;
|
||||
const shouldRender = this._glyphMarginWidgets.setWidgetPosition(widgetData.widget, newPreference);
|
||||
if (shouldRender) {
|
||||
this._shouldRecomputeGlyphMarginLanes = true;
|
||||
this._scheduleRender();
|
||||
}
|
||||
}
|
||||
removeGlyphMarginWidget(widgetData) {
|
||||
this._glyphMarginWidgets.removeWidget(widgetData.widget);
|
||||
this._shouldRecomputeGlyphMarginLanes = true;
|
||||
this._scheduleRender();
|
||||
}
|
||||
}
|
||||
function safeInvokeNoArg(func) {
|
||||
try {
|
||||
|
|
|
|||
7
node_modules/monaco-editor-core/esm/vs/editor/browser/view/renderingContext.js
generated
vendored
7
node_modules/monaco-editor-core/esm/vs/editor/browser/view/renderingContext.js
generated
vendored
|
|
@ -44,10 +44,15 @@ export class RenderingContext extends RestrictedRenderingContext {
|
|||
}
|
||||
}
|
||||
export class LineVisibleRanges {
|
||||
constructor(outsideRenderedLine, lineNumber, ranges) {
|
||||
constructor(outsideRenderedLine, lineNumber, ranges,
|
||||
/**
|
||||
* Indicates if the requested range does not end in this line, but continues on the next line.
|
||||
*/
|
||||
continuesOnNextLine) {
|
||||
this.outsideRenderedLine = outsideRenderedLine;
|
||||
this.lineNumber = lineNumber;
|
||||
this.ranges = ranges;
|
||||
this.continuesOnNextLine = continuesOnNextLine;
|
||||
}
|
||||
}
|
||||
export class HorizontalRange {
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/esm/vs/editor/browser/view/viewController.js
generated
vendored
2
node_modules/monaco-editor-core/esm/vs/editor/browser/view/viewController.js
generated
vendored
|
|
@ -69,7 +69,7 @@ export class ViewController {
|
|||
}
|
||||
dispatchMouse(data) {
|
||||
const options = this.configuration.options;
|
||||
const selectionClipboardIsOn = (platform.isLinux && options.get(103 /* EditorOption.selectionClipboard */));
|
||||
const selectionClipboardIsOn = (platform.isLinux && options.get(104 /* EditorOption.selectionClipboard */));
|
||||
const columnSelection = options.get(20 /* EditorOption.columnSelection */);
|
||||
if (data.middleButton && !selectionClipboardIsOn) {
|
||||
this._columnSelect(data.position, data.mouseColumn, data.inSelectionMode);
|
||||
|
|
|
|||
2
node_modules/monaco-editor-core/esm/vs/editor/browser/view/viewLayer.js
generated
vendored
2
node_modules/monaco-editor-core/esm/vs/editor/browser/view/viewLayer.js
generated
vendored
|
|
@ -192,7 +192,7 @@ export class VisibleLinesCollection {
|
|||
}
|
||||
// ---- begin view event handlers
|
||||
onConfigurationChanged(e) {
|
||||
if (e.hasChanged(140 /* EditorOption.layoutInfo */)) {
|
||||
if (e.hasChanged(141 /* EditorOption.layoutInfo */)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
8
node_modules/monaco-editor-core/esm/vs/editor/browser/view/viewOverlays.js
generated
vendored
8
node_modules/monaco-editor-core/esm/vs/editor/browser/view/viewOverlays.js
generated
vendored
|
|
@ -163,14 +163,14 @@ export class ContentViewOverlays extends ViewOverlays {
|
|||
constructor(context) {
|
||||
super(context);
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._contentWidth = layoutInfo.contentWidth;
|
||||
this.domNode.setHeight(0);
|
||||
}
|
||||
// --- begin event handlers
|
||||
onConfigurationChanged(e) {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._contentWidth = layoutInfo.contentWidth;
|
||||
return super.onConfigurationChanged(e) || true;
|
||||
}
|
||||
|
|
@ -187,7 +187,7 @@ export class MarginViewOverlays extends ViewOverlays {
|
|||
constructor(context) {
|
||||
super(context);
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._contentLeft = layoutInfo.contentLeft;
|
||||
this.domNode.setClassName('margin-view-overlays');
|
||||
this.domNode.setWidth(1);
|
||||
|
|
@ -196,7 +196,7 @@ export class MarginViewOverlays extends ViewOverlays {
|
|||
onConfigurationChanged(e) {
|
||||
const options = this._context.configuration.options;
|
||||
applyFontInfo(this.domNode, options.get(48 /* EditorOption.fontInfo */));
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._contentLeft = layoutInfo.contentLeft;
|
||||
return super.onConfigurationChanged(e) || true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export class BlockDecorations extends ViewPart {
|
|||
update() {
|
||||
let didChange = false;
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
const newContentWidth = layoutInfo.contentWidth - layoutInfo.verticalScrollbarWidth;
|
||||
if (this.contentWidth !== newContentWidth) {
|
||||
this.contentWidth = newContentWidth;
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class Widget {
|
|||
this.allowEditorOverflow = this._actual.allowEditorOverflow || false;
|
||||
this.suppressMouseDown = this._actual.suppressMouseDown || false;
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._fixedOverflowWidgets = options.get(40 /* EditorOption.fixedOverflowWidgets */);
|
||||
this._contentWidth = layoutInfo.contentWidth;
|
||||
this._contentLeft = layoutInfo.contentLeft;
|
||||
|
|
@ -152,8 +152,8 @@ class Widget {
|
|||
onConfigurationChanged(e) {
|
||||
const options = this._context.configuration.options;
|
||||
this._lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
if (e.hasChanged(140 /* EditorOption.layoutInfo */)) {
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
if (e.hasChanged(141 /* EditorOption.layoutInfo */)) {
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._contentLeft = layoutInfo.contentLeft;
|
||||
this._contentWidth = layoutInfo.contentWidth;
|
||||
this._maxWidth = this._getMaxWidth();
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ export class AbstractLineHighlightOverlay extends DynamicViewOverlay {
|
|||
super();
|
||||
this._context = context;
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this._renderLineHighlight = options.get(92 /* EditorOption.renderLineHighlight */);
|
||||
this._renderLineHighlightOnlyWhenFocus = options.get(93 /* EditorOption.renderLineHighlightOnlyWhenFocus */);
|
||||
this._renderLineHighlight = options.get(93 /* EditorOption.renderLineHighlight */);
|
||||
this._renderLineHighlightOnlyWhenFocus = options.get(94 /* EditorOption.renderLineHighlightOnlyWhenFocus */);
|
||||
this._contentLeft = layoutInfo.contentLeft;
|
||||
this._contentWidth = layoutInfo.contentWidth;
|
||||
this._selectionIsEmpty = true;
|
||||
|
|
@ -52,10 +52,10 @@ export class AbstractLineHighlightOverlay extends DynamicViewOverlay {
|
|||
}
|
||||
onConfigurationChanged(e) {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this._renderLineHighlight = options.get(92 /* EditorOption.renderLineHighlight */);
|
||||
this._renderLineHighlightOnlyWhenFocus = options.get(93 /* EditorOption.renderLineHighlightOnlyWhenFocus */);
|
||||
this._renderLineHighlight = options.get(93 /* EditorOption.renderLineHighlight */);
|
||||
this._renderLineHighlightOnlyWhenFocus = options.get(94 /* EditorOption.renderLineHighlightOnlyWhenFocus */);
|
||||
this._contentLeft = layoutInfo.contentLeft;
|
||||
this._contentWidth = layoutInfo.contentWidth;
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
import './decorations.css';
|
||||
import { DynamicViewOverlay } from '../../view/dynamicViewOverlay.js';
|
||||
import { Range } from '../../../common/core/range.js';
|
||||
import { HorizontalRange } from '../../view/renderingContext.js';
|
||||
import { Range } from '../../../common/core/range.js';
|
||||
export class DecorationsOverlay extends DynamicViewOverlay {
|
||||
constructor(context) {
|
||||
super();
|
||||
|
|
@ -114,11 +114,13 @@ export class DecorationsOverlay extends DynamicViewOverlay {
|
|||
}
|
||||
}
|
||||
_renderNormalDecorations(ctx, decorations, output) {
|
||||
var _a;
|
||||
const lineHeight = String(this._lineHeight);
|
||||
const visibleStartLineNumber = ctx.visibleRange.startLineNumber;
|
||||
let prevClassName = null;
|
||||
let prevShowIfCollapsed = false;
|
||||
let prevRange = null;
|
||||
let prevShouldFillLineOnLineBreak = false;
|
||||
for (let i = 0, lenI = decorations.length; i < lenI; i++) {
|
||||
const d = decorations[i];
|
||||
if (d.options.isWholeLine) {
|
||||
|
|
@ -137,17 +139,18 @@ export class DecorationsOverlay extends DynamicViewOverlay {
|
|||
}
|
||||
// flush previous decoration
|
||||
if (prevClassName !== null) {
|
||||
this._renderNormalDecoration(ctx, prevRange, prevClassName, prevShowIfCollapsed, lineHeight, visibleStartLineNumber, output);
|
||||
this._renderNormalDecoration(ctx, prevRange, prevClassName, prevShouldFillLineOnLineBreak, prevShowIfCollapsed, lineHeight, visibleStartLineNumber, output);
|
||||
}
|
||||
prevClassName = className;
|
||||
prevShowIfCollapsed = showIfCollapsed;
|
||||
prevRange = range;
|
||||
prevShouldFillLineOnLineBreak = (_a = d.options.shouldFillLineOnLineBreak) !== null && _a !== void 0 ? _a : false;
|
||||
}
|
||||
if (prevClassName !== null) {
|
||||
this._renderNormalDecoration(ctx, prevRange, prevClassName, prevShowIfCollapsed, lineHeight, visibleStartLineNumber, output);
|
||||
this._renderNormalDecoration(ctx, prevRange, prevClassName, prevShouldFillLineOnLineBreak, prevShowIfCollapsed, lineHeight, visibleStartLineNumber, output);
|
||||
}
|
||||
}
|
||||
_renderNormalDecoration(ctx, range, className, showIfCollapsed, lineHeight, visibleStartLineNumber, output) {
|
||||
_renderNormalDecoration(ctx, range, className, shouldFillLineOnLineBreak, showIfCollapsed, lineHeight, visibleStartLineNumber, output) {
|
||||
const linesVisibleRanges = ctx.linesVisibleRangesForRange(range, /*TODO@Alex*/ className === 'findMatch');
|
||||
if (!linesVisibleRanges) {
|
||||
return;
|
||||
|
|
@ -169,14 +172,15 @@ export class DecorationsOverlay extends DynamicViewOverlay {
|
|||
}
|
||||
}
|
||||
for (let k = 0, lenK = lineVisibleRanges.ranges.length; k < lenK; k++) {
|
||||
const expandToLeft = shouldFillLineOnLineBreak && lineVisibleRanges.continuesOnNextLine && lenK === 1;
|
||||
const visibleRange = lineVisibleRanges.ranges[k];
|
||||
const decorationOutput = ('<div class="cdr '
|
||||
+ className
|
||||
+ '" style="left:'
|
||||
+ String(visibleRange.left)
|
||||
+ 'px;width:'
|
||||
+ String(visibleRange.width)
|
||||
+ 'px;height:'
|
||||
+ (expandToLeft ?
|
||||
'px;width:100%;height:' :
|
||||
('px;width:' + String(visibleRange.width) + 'px;height:'))
|
||||
+ lineHeight
|
||||
+ 'px;"></div>');
|
||||
output[lineIndex] += decorationOutput;
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ export class EditorScrollbar extends ViewPart {
|
|||
constructor(context, linesContent, viewDomNode, overflowGuardDomNode) {
|
||||
super(context);
|
||||
const options = this._context.configuration.options;
|
||||
const scrollbar = options.get(99 /* EditorOption.scrollbar */);
|
||||
const scrollbar = options.get(100 /* EditorOption.scrollbar */);
|
||||
const mouseWheelScrollSensitivity = options.get(72 /* EditorOption.mouseWheelScrollSensitivity */);
|
||||
const fastScrollSensitivity = options.get(38 /* EditorOption.fastScrollSensitivity */);
|
||||
const scrollPredominantAxis = options.get(102 /* EditorOption.scrollPredominantAxis */);
|
||||
const scrollPredominantAxis = options.get(103 /* EditorOption.scrollPredominantAxis */);
|
||||
const scrollbarOptions = {
|
||||
listenOnDomNode: viewDomNode.domNode,
|
||||
className: 'editor-scrollable' + ' ' + getThemeTypeSelector(context.theme.type),
|
||||
|
|
@ -73,7 +73,7 @@ export class EditorScrollbar extends ViewPart {
|
|||
}
|
||||
_setLayout() {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this.scrollbarDomNode.setLeft(layoutInfo.contentLeft);
|
||||
const minimap = options.get(70 /* EditorOption.minimap */);
|
||||
const side = minimap.side;
|
||||
|
|
@ -99,14 +99,14 @@ export class EditorScrollbar extends ViewPart {
|
|||
}
|
||||
// --- begin event handlers
|
||||
onConfigurationChanged(e) {
|
||||
if (e.hasChanged(99 /* EditorOption.scrollbar */)
|
||||
if (e.hasChanged(100 /* EditorOption.scrollbar */)
|
||||
|| e.hasChanged(72 /* EditorOption.mouseWheelScrollSensitivity */)
|
||||
|| e.hasChanged(38 /* EditorOption.fastScrollSensitivity */)) {
|
||||
const options = this._context.configuration.options;
|
||||
const scrollbar = options.get(99 /* EditorOption.scrollbar */);
|
||||
const scrollbar = options.get(100 /* EditorOption.scrollbar */);
|
||||
const mouseWheelScrollSensitivity = options.get(72 /* EditorOption.mouseWheelScrollSensitivity */);
|
||||
const fastScrollSensitivity = options.get(38 /* EditorOption.fastScrollSensitivity */);
|
||||
const scrollPredominantAxis = options.get(102 /* EditorOption.scrollPredominantAxis */);
|
||||
const scrollPredominantAxis = options.get(103 /* EditorOption.scrollPredominantAxis */);
|
||||
const newOpts = {
|
||||
vertical: scrollbar.vertical,
|
||||
horizontal: scrollbar.horizontal,
|
||||
|
|
@ -120,7 +120,7 @@ export class EditorScrollbar extends ViewPart {
|
|||
};
|
||||
this.scrollbar.updateOptions(newOpts);
|
||||
}
|
||||
if (e.hasChanged(140 /* EditorOption.layoutInfo */)) {
|
||||
if (e.hasChanged(141 /* EditorOption.layoutInfo */)) {
|
||||
this._setLayout();
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -12,8 +12,21 @@
|
|||
Keeping name short for faster parsing.
|
||||
cgmr = core glyph margin rendering (div)
|
||||
*/
|
||||
.monaco-editor .margin-view-overlays .cgmr {
|
||||
.monaco-editor .glyph-margin-widgets .cgmr {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/*
|
||||
Ensure spinning icons are pixel-perfectly centered and avoid wobble.
|
||||
This is only applied to icons that spin to avoid unnecessary
|
||||
GPU layers and blurry subpixel AA.
|
||||
*/
|
||||
.monaco-editor .glyph-margin-widgets .cgmr.codicon-modifier-spin::before {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
|
|
|||
369
node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js
generated
vendored
369
node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js
generated
vendored
|
|
@ -2,59 +2,62 @@
|
|||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { createFastDomNode } from '../../../../base/browser/fastDomNode.js';
|
||||
import { ArrayQueue } from '../../../../base/common/arrays.js';
|
||||
import './glyphMargin.css';
|
||||
import { DynamicViewOverlay } from '../../view/dynamicViewOverlay.js';
|
||||
import { ViewPart } from '../../view/viewPart.js';
|
||||
import { Range } from '../../../common/core/range.js';
|
||||
/**
|
||||
* Represents a decoration that should be shown along the lines from `startLineNumber` to `endLineNumber`.
|
||||
* This can end up producing multiple `LineDecorationToRender`.
|
||||
*/
|
||||
export class DecorationToRender {
|
||||
constructor(startLineNumber, endLineNumber, className, zIndex, decorationLane) {
|
||||
constructor(startLineNumber, endLineNumber, className, zIndex) {
|
||||
this._decorationToRenderBrand = undefined;
|
||||
this.startLineNumber = +startLineNumber;
|
||||
this.endLineNumber = +endLineNumber;
|
||||
this.className = String(className);
|
||||
this.zIndex = zIndex !== null && zIndex !== void 0 ? zIndex : 0;
|
||||
this.decorationLane = decorationLane !== null && decorationLane !== void 0 ? decorationLane : 1;
|
||||
}
|
||||
}
|
||||
export class RenderedDecoration {
|
||||
/**
|
||||
* A decoration that should be shown along a line.
|
||||
*/
|
||||
export class LineDecorationToRender {
|
||||
constructor(className, zIndex) {
|
||||
this.className = className;
|
||||
this.zIndex = zIndex;
|
||||
}
|
||||
}
|
||||
export class LineRenderedDecorations {
|
||||
/**
|
||||
* Decorations to render on a visible line.
|
||||
*/
|
||||
export class VisibleLineDecorationsToRender {
|
||||
constructor() {
|
||||
this.lanes = [];
|
||||
this.decorations = [];
|
||||
}
|
||||
add(lane, decoration) {
|
||||
while (lane >= this.lanes.length) {
|
||||
this.lanes.push([]);
|
||||
}
|
||||
this.lanes[lane].push(decoration);
|
||||
add(decoration) {
|
||||
this.decorations.push(decoration);
|
||||
}
|
||||
getLaneDecorations(laneIndex) {
|
||||
if (laneIndex < this.lanes.length) {
|
||||
return this.lanes[laneIndex];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
isEmpty() {
|
||||
for (const lane of this.lanes) {
|
||||
if (lane.length > 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
getDecorations() {
|
||||
return this.decorations;
|
||||
}
|
||||
}
|
||||
export class DedupOverlay extends DynamicViewOverlay {
|
||||
_render(visibleStartLineNumber, visibleEndLineNumber, decorations, decorationLaneCount) {
|
||||
/**
|
||||
* Returns an array with an element for each visible line number.
|
||||
*/
|
||||
_render(visibleStartLineNumber, visibleEndLineNumber, decorations) {
|
||||
const output = [];
|
||||
for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {
|
||||
const lineIndex = lineNumber - visibleStartLineNumber;
|
||||
output[lineIndex] = new LineRenderedDecorations();
|
||||
output[lineIndex] = new VisibleLineDecorationsToRender();
|
||||
}
|
||||
if (decorations.length === 0) {
|
||||
return output;
|
||||
}
|
||||
// Sort decorations by className, then by startLineNumber and then by endLineNumber
|
||||
decorations.sort((a, b) => {
|
||||
if (a.className === b.className) {
|
||||
if (a.startLineNumber === b.startLineNumber) {
|
||||
|
|
@ -72,8 +75,8 @@ export class DedupOverlay extends DynamicViewOverlay {
|
|||
const zIndex = d.zIndex;
|
||||
let startLineIndex = Math.max(d.startLineNumber, visibleStartLineNumber) - visibleStartLineNumber;
|
||||
const endLineIndex = Math.min(d.endLineNumber, visibleEndLineNumber) - visibleStartLineNumber;
|
||||
const lane = Math.min(d.decorationLane, decorationLaneCount);
|
||||
if (prevClassName === className) {
|
||||
// Here we avoid rendering the same className multiple times on the same line
|
||||
startLineIndex = Math.max(prevEndLineIndex + 1, startLineIndex);
|
||||
prevEndLineIndex = Math.max(prevEndLineIndex, endLineIndex);
|
||||
}
|
||||
|
|
@ -82,35 +85,44 @@ export class DedupOverlay extends DynamicViewOverlay {
|
|||
prevEndLineIndex = endLineIndex;
|
||||
}
|
||||
for (let i = startLineIndex; i <= prevEndLineIndex; i++) {
|
||||
output[i].add(lane, new RenderedDecoration(className, zIndex));
|
||||
output[i].add(new LineDecorationToRender(className, zIndex));
|
||||
}
|
||||
}
|
||||
return output;
|
||||
}
|
||||
}
|
||||
export class GlyphMarginOverlay extends DedupOverlay {
|
||||
export class GlyphMarginWidgets extends ViewPart {
|
||||
constructor(context) {
|
||||
super();
|
||||
super(context);
|
||||
this._widgets = {};
|
||||
this._context = context;
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this.domNode = createFastDomNode(document.createElement('div'));
|
||||
this.domNode.setClassName('glyph-margin-widgets');
|
||||
this.domNode.setPosition('absolute');
|
||||
this.domNode.setTop(0);
|
||||
this._lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this._glyphMargin = options.get(55 /* EditorOption.glyphMargin */);
|
||||
this._glyphMarginLeft = layoutInfo.glyphMarginLeft;
|
||||
this._glyphMarginWidth = layoutInfo.glyphMarginWidth;
|
||||
this._glyphMarginDecorationLaneCount = layoutInfo.glyphMarginDecorationLaneCount;
|
||||
this._renderResult = null;
|
||||
this._context.addEventHandler(this);
|
||||
this._managedDomNodes = [];
|
||||
this._decorationGlyphsToRender = [];
|
||||
}
|
||||
dispose() {
|
||||
this._context.removeEventHandler(this);
|
||||
this._renderResult = null;
|
||||
this._managedDomNodes = [];
|
||||
this._decorationGlyphsToRender = [];
|
||||
this._widgets = {};
|
||||
super.dispose();
|
||||
}
|
||||
getWidgets() {
|
||||
return Object.values(this._widgets);
|
||||
}
|
||||
// --- begin event handlers
|
||||
onConfigurationChanged(e) {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this._glyphMargin = options.get(55 /* EditorOption.glyphMargin */);
|
||||
this._glyphMarginLeft = layoutInfo.glyphMarginLeft;
|
||||
|
|
@ -140,78 +152,241 @@ export class GlyphMarginOverlay extends DedupOverlay {
|
|||
return true;
|
||||
}
|
||||
// --- end event handlers
|
||||
_getDecorations(ctx) {
|
||||
var _a;
|
||||
const decorations = ctx.getDecorationsInViewport();
|
||||
const r = [];
|
||||
let rLen = 0;
|
||||
for (let i = 0, len = decorations.length; i < len; i++) {
|
||||
const d = decorations[i];
|
||||
const glyphMarginClassName = d.options.glyphMarginClassName;
|
||||
const zIndex = d.options.zIndex;
|
||||
const lane = (_a = d.options.glyphMargin) === null || _a === void 0 ? void 0 : _a.position;
|
||||
if (glyphMarginClassName) {
|
||||
r[rLen++] = new DecorationToRender(d.range.startLineNumber, d.range.endLineNumber, glyphMarginClassName, zIndex, lane);
|
||||
}
|
||||
}
|
||||
return r;
|
||||
// --- begin widget management
|
||||
addWidget(widget) {
|
||||
const domNode = createFastDomNode(widget.getDomNode());
|
||||
this._widgets[widget.getId()] = {
|
||||
widget: widget,
|
||||
preference: widget.getPosition(),
|
||||
domNode: domNode,
|
||||
renderInfo: null
|
||||
};
|
||||
domNode.setPosition('absolute');
|
||||
domNode.setDisplay('none');
|
||||
domNode.setAttribute('widgetId', widget.getId());
|
||||
this.domNode.appendChild(domNode);
|
||||
this.setShouldRender();
|
||||
}
|
||||
prepareRender(ctx) {
|
||||
if (!this._glyphMargin) {
|
||||
this._renderResult = null;
|
||||
return;
|
||||
setWidgetPosition(widget, preference) {
|
||||
const myWidget = this._widgets[widget.getId()];
|
||||
if (myWidget.preference.lane === preference.lane
|
||||
&& myWidget.preference.zIndex === preference.zIndex
|
||||
&& Range.equalsRange(myWidget.preference.range, preference.range)) {
|
||||
return false;
|
||||
}
|
||||
myWidget.preference = preference;
|
||||
this.setShouldRender();
|
||||
return true;
|
||||
}
|
||||
removeWidget(widget) {
|
||||
var _a;
|
||||
const widgetId = widget.getId();
|
||||
if (this._widgets[widgetId]) {
|
||||
const widgetData = this._widgets[widgetId];
|
||||
const domNode = widgetData.domNode.domNode;
|
||||
delete this._widgets[widgetId];
|
||||
(_a = domNode.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(domNode);
|
||||
this.setShouldRender();
|
||||
}
|
||||
}
|
||||
// --- end widget management
|
||||
_collectDecorationBasedGlyphRenderRequest(ctx, requests) {
|
||||
var _a, _b, _c;
|
||||
const visibleStartLineNumber = ctx.visibleRange.startLineNumber;
|
||||
const visibleEndLineNumber = ctx.visibleRange.endLineNumber;
|
||||
const decorationsToRender = this._getDecorations(ctx);
|
||||
const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, decorationsToRender, this._glyphMarginDecorationLaneCount);
|
||||
const lineHeight = this._lineHeight.toString();
|
||||
const width = (Math.round(this._glyphMarginWidth / this._glyphMarginDecorationLaneCount)).toString();
|
||||
const common = '" style="width:' + width + 'px' + ';height:' + lineHeight + 'px;';
|
||||
const output = [];
|
||||
for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {
|
||||
const lineIndex = lineNumber - visibleStartLineNumber;
|
||||
const renderInfo = toRender[lineIndex];
|
||||
if (renderInfo.isEmpty()) {
|
||||
output[lineIndex] = '';
|
||||
const decorations = ctx.getDecorationsInViewport();
|
||||
for (const d of decorations) {
|
||||
const glyphMarginClassName = d.options.glyphMarginClassName;
|
||||
if (!glyphMarginClassName) {
|
||||
continue;
|
||||
}
|
||||
const startLineNumber = Math.max(d.range.startLineNumber, visibleStartLineNumber);
|
||||
const endLineNumber = Math.min(d.range.endLineNumber, visibleEndLineNumber);
|
||||
const lane = Math.min((_b = (_a = d.options.glyphMargin) === null || _a === void 0 ? void 0 : _a.position) !== null && _b !== void 0 ? _b : 1, this._glyphMarginDecorationLaneCount);
|
||||
const zIndex = (_c = d.options.zIndex) !== null && _c !== void 0 ? _c : 0;
|
||||
for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) {
|
||||
requests.push(new DecorationBasedGlyphRenderRequest(lineNumber, lane, zIndex, glyphMarginClassName));
|
||||
}
|
||||
}
|
||||
}
|
||||
_collectWidgetBasedGlyphRenderRequest(ctx, requests) {
|
||||
const visibleStartLineNumber = ctx.visibleRange.startLineNumber;
|
||||
const visibleEndLineNumber = ctx.visibleRange.endLineNumber;
|
||||
for (const widget of Object.values(this._widgets)) {
|
||||
const range = widget.preference.range;
|
||||
if (range.endLineNumber < visibleStartLineNumber || range.startLineNumber > visibleEndLineNumber) {
|
||||
// The widget is not in the viewport
|
||||
continue;
|
||||
}
|
||||
// The widget is in the viewport, find a good line for it
|
||||
const widgetLineNumber = Math.max(range.startLineNumber, visibleStartLineNumber);
|
||||
const lane = Math.min(widget.preference.lane, this._glyphMarginDecorationLaneCount);
|
||||
requests.push(new WidgetBasedGlyphRenderRequest(widgetLineNumber, lane, widget.preference.zIndex, widget));
|
||||
}
|
||||
}
|
||||
_collectSortedGlyphRenderRequests(ctx) {
|
||||
const requests = [];
|
||||
this._collectDecorationBasedGlyphRenderRequest(ctx, requests);
|
||||
this._collectWidgetBasedGlyphRenderRequest(ctx, requests);
|
||||
// sort requests by lineNumber ASC, lane ASC, zIndex DESC, type DESC (widgets first), className ASC
|
||||
// don't change this sort unless you understand `prepareRender` below.
|
||||
requests.sort((a, b) => {
|
||||
if (a.lineNumber === b.lineNumber) {
|
||||
if (a.lane === b.lane) {
|
||||
if (a.zIndex === b.zIndex) {
|
||||
if (b.type === a.type) {
|
||||
if (a.type === 0 /* GlyphRenderRequestType.Decoration */ && b.type === 0 /* GlyphRenderRequestType.Decoration */) {
|
||||
return (a.className < b.className ? -1 : 1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return b.type - a.type;
|
||||
}
|
||||
return b.zIndex - a.zIndex;
|
||||
}
|
||||
return a.lane - b.lane;
|
||||
}
|
||||
return a.lineNumber - b.lineNumber;
|
||||
});
|
||||
return requests;
|
||||
}
|
||||
/**
|
||||
* Will store render information in each widget's renderInfo and in `_decorationGlyphsToRender`.
|
||||
*/
|
||||
prepareRender(ctx) {
|
||||
if (!this._glyphMargin) {
|
||||
this._decorationGlyphsToRender = [];
|
||||
return;
|
||||
}
|
||||
for (const widget of Object.values(this._widgets)) {
|
||||
widget.renderInfo = null;
|
||||
}
|
||||
const requests = new ArrayQueue(this._collectSortedGlyphRenderRequests(ctx));
|
||||
const decorationGlyphsToRender = [];
|
||||
while (requests.length > 0) {
|
||||
const first = requests.peek();
|
||||
if (!first) {
|
||||
// not possible
|
||||
break;
|
||||
}
|
||||
// Requests are sorted by lineNumber and lane, so we read all requests for this particular location
|
||||
const requestsAtLocation = requests.takeWhile((el) => el.lineNumber === first.lineNumber && el.lane === first.lane);
|
||||
if (!requestsAtLocation || requestsAtLocation.length === 0) {
|
||||
// not possible
|
||||
break;
|
||||
}
|
||||
const winner = requestsAtLocation[0];
|
||||
if (winner.type === 0 /* GlyphRenderRequestType.Decoration */) {
|
||||
// combine all decorations with the same z-index
|
||||
const classNames = [];
|
||||
// requests are sorted by zIndex, type, and className so we can dedup className by looking at the previous one
|
||||
for (const request of requestsAtLocation) {
|
||||
if (request.zIndex !== winner.zIndex || request.type !== winner.type) {
|
||||
break;
|
||||
}
|
||||
if (classNames.length === 0 || classNames[classNames.length - 1] !== request.className) {
|
||||
classNames.push(request.className);
|
||||
}
|
||||
}
|
||||
decorationGlyphsToRender.push(winner.accept(classNames.join(' '))); // TODO@joyceerhl Implement overflow for remaining decorations
|
||||
}
|
||||
else {
|
||||
let css = '';
|
||||
for (let lane = 1; lane <= this._glyphMarginDecorationLaneCount; lane += 1) {
|
||||
const decorations = renderInfo.getLaneDecorations(lane);
|
||||
if (decorations.length === 0) {
|
||||
continue;
|
||||
}
|
||||
decorations.sort((a, b) => b.zIndex - a.zIndex);
|
||||
// Render winning decorations with the same zIndex together
|
||||
const winningDecoration = decorations[0];
|
||||
const winningDecorationClassNames = [winningDecoration.className];
|
||||
for (let i = 1; i < decorations.length; i += 1) {
|
||||
const decoration = decorations[i];
|
||||
if (decoration.zIndex !== winningDecoration.zIndex) {
|
||||
break;
|
||||
}
|
||||
winningDecorationClassNames.push(decoration.className);
|
||||
}
|
||||
const left = (this._glyphMarginLeft + (lane - 1) * this._lineHeight).toString();
|
||||
css += ('<div class="cgmr codicon '
|
||||
+ winningDecorationClassNames.join(' ') // TODO@joyceerhl Implement overflow for remaining decorations
|
||||
+ common
|
||||
+ 'left:' + left + 'px;"></div>');
|
||||
}
|
||||
output[lineIndex] = css;
|
||||
// widgets cannot be combined
|
||||
winner.widget.renderInfo = {
|
||||
lineNumber: winner.lineNumber,
|
||||
lane: winner.lane,
|
||||
};
|
||||
}
|
||||
}
|
||||
this._renderResult = output;
|
||||
this._decorationGlyphsToRender = decorationGlyphsToRender;
|
||||
}
|
||||
render(startLineNumber, lineNumber) {
|
||||
if (!this._renderResult) {
|
||||
return '';
|
||||
render(ctx) {
|
||||
if (!this._glyphMargin) {
|
||||
for (const widget of Object.values(this._widgets)) {
|
||||
widget.domNode.setDisplay('none');
|
||||
}
|
||||
while (this._managedDomNodes.length > 0) {
|
||||
const domNode = this._managedDomNodes.pop();
|
||||
domNode === null || domNode === void 0 ? void 0 : domNode.domNode.remove();
|
||||
}
|
||||
return;
|
||||
}
|
||||
const lineIndex = lineNumber - startLineNumber;
|
||||
if (lineIndex < 0 || lineIndex >= this._renderResult.length) {
|
||||
return '';
|
||||
const width = (Math.round(this._glyphMarginWidth / this._glyphMarginDecorationLaneCount));
|
||||
// Render widgets
|
||||
for (const widget of Object.values(this._widgets)) {
|
||||
if (!widget.renderInfo) {
|
||||
// this widget is not visible
|
||||
widget.domNode.setDisplay('none');
|
||||
}
|
||||
else {
|
||||
const top = ctx.viewportData.relativeVerticalOffset[widget.renderInfo.lineNumber - ctx.viewportData.startLineNumber];
|
||||
const left = this._glyphMarginLeft + (widget.renderInfo.lane - 1) * this._lineHeight;
|
||||
widget.domNode.setDisplay('block');
|
||||
widget.domNode.setTop(top);
|
||||
widget.domNode.setLeft(left);
|
||||
widget.domNode.setWidth(width);
|
||||
widget.domNode.setHeight(this._lineHeight);
|
||||
}
|
||||
}
|
||||
// Render decorations, reusing previous dom nodes as possible
|
||||
for (let i = 0; i < this._decorationGlyphsToRender.length; i++) {
|
||||
const dec = this._decorationGlyphsToRender[i];
|
||||
const top = ctx.viewportData.relativeVerticalOffset[dec.lineNumber - ctx.viewportData.startLineNumber];
|
||||
const left = this._glyphMarginLeft + (dec.lane - 1) * this._lineHeight;
|
||||
let domNode;
|
||||
if (i < this._managedDomNodes.length) {
|
||||
domNode = this._managedDomNodes[i];
|
||||
}
|
||||
else {
|
||||
domNode = createFastDomNode(document.createElement('div'));
|
||||
this._managedDomNodes.push(domNode);
|
||||
this.domNode.appendChild(domNode);
|
||||
}
|
||||
domNode.setClassName(`cgmr codicon ` + dec.combinedClassName);
|
||||
domNode.setPosition(`absolute`);
|
||||
domNode.setTop(top);
|
||||
domNode.setLeft(left);
|
||||
domNode.setWidth(width);
|
||||
domNode.setHeight(this._lineHeight);
|
||||
}
|
||||
// remove extra dom nodes
|
||||
while (this._managedDomNodes.length > this._decorationGlyphsToRender.length) {
|
||||
const domNode = this._managedDomNodes.pop();
|
||||
domNode === null || domNode === void 0 ? void 0 : domNode.domNode.remove();
|
||||
}
|
||||
return this._renderResult[lineIndex];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A request to render a decoration in the glyph margin at a certain location.
|
||||
*/
|
||||
class DecorationBasedGlyphRenderRequest {
|
||||
constructor(lineNumber, lane, zIndex, className) {
|
||||
this.lineNumber = lineNumber;
|
||||
this.lane = lane;
|
||||
this.zIndex = zIndex;
|
||||
this.className = className;
|
||||
this.type = 0 /* GlyphRenderRequestType.Decoration */;
|
||||
}
|
||||
accept(combinedClassName) {
|
||||
return new DecorationBasedGlyph(this.lineNumber, this.lane, combinedClassName);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* A request to render a widget in the glyph margin at a certain location.
|
||||
*/
|
||||
class WidgetBasedGlyphRenderRequest {
|
||||
constructor(lineNumber, lane, zIndex, widget) {
|
||||
this.lineNumber = lineNumber;
|
||||
this.lane = lane;
|
||||
this.zIndex = zIndex;
|
||||
this.widget = widget;
|
||||
this.type = 1 /* GlyphRenderRequestType.Widget */;
|
||||
}
|
||||
}
|
||||
class DecorationBasedGlyph {
|
||||
constructor(lineNumber, lane, combinedClassName) {
|
||||
this.lineNumber = lineNumber;
|
||||
this.lane = lane;
|
||||
this.combinedClassName = combinedClassName;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,11 +7,3 @@
|
|||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.monaco-editor .lines-content .core-guide-indent {
|
||||
box-shadow: 1px 0 0 0 var(--vscode-editorIndentGuide-background) inset;
|
||||
}
|
||||
|
||||
.monaco-editor .lines-content .core-guide-indent-active {
|
||||
box-shadow: 1px 0 0 0 var(--vscode-editorIndentGuide-activeBackground, --vscode-editorIndentGuide-background) inset;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
import './indentGuides.css';
|
||||
import { DynamicViewOverlay } from '../../view/dynamicViewOverlay.js';
|
||||
import { editorBracketHighlightingForeground1, editorBracketHighlightingForeground2, editorBracketHighlightingForeground3, editorBracketHighlightingForeground4, editorBracketHighlightingForeground5, editorBracketHighlightingForeground6, editorBracketPairGuideActiveBackground1, editorBracketPairGuideActiveBackground2, editorBracketPairGuideActiveBackground3, editorBracketPairGuideActiveBackground4, editorBracketPairGuideActiveBackground5, editorBracketPairGuideActiveBackground6, editorBracketPairGuideBackground1, editorBracketPairGuideBackground2, editorBracketPairGuideBackground3, editorBracketPairGuideBackground4, editorBracketPairGuideBackground5, editorBracketPairGuideBackground6 } from '../../../common/core/editorColorRegistry.js';
|
||||
import { editorBracketHighlightingForeground1, editorBracketHighlightingForeground2, editorBracketHighlightingForeground3, editorBracketHighlightingForeground4, editorBracketHighlightingForeground5, editorBracketHighlightingForeground6, editorBracketPairGuideActiveBackground1, editorBracketPairGuideActiveBackground2, editorBracketPairGuideActiveBackground3, editorBracketPairGuideActiveBackground4, editorBracketPairGuideActiveBackground5, editorBracketPairGuideActiveBackground6, editorBracketPairGuideBackground1, editorBracketPairGuideBackground2, editorBracketPairGuideBackground3, editorBracketPairGuideBackground4, editorBracketPairGuideBackground5, editorBracketPairGuideBackground6, editorIndentGuide1, editorIndentGuide2, editorIndentGuide3, editorIndentGuide4, editorIndentGuide5, editorIndentGuide6, editorActiveIndentGuide1, editorActiveIndentGuide2, editorActiveIndentGuide3, editorActiveIndentGuide4, editorActiveIndentGuide5, editorActiveIndentGuide6 } from '../../../common/core/editorColorRegistry.js';
|
||||
import { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';
|
||||
import { Position } from '../../../common/core/position.js';
|
||||
import { ArrayQueue } from '../../../../base/common/arrays.js';
|
||||
|
|
@ -17,7 +17,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay {
|
|||
this._context = context;
|
||||
this._primaryPosition = null;
|
||||
const options = this._context.configuration.options;
|
||||
const wrappingInfo = options.get(141 /* EditorOption.wrappingInfo */);
|
||||
const wrappingInfo = options.get(142 /* EditorOption.wrappingInfo */);
|
||||
const fontInfo = options.get(48 /* EditorOption.fontInfo */);
|
||||
this._lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this._spaceWidth = fontInfo.spaceWidth;
|
||||
|
|
@ -34,7 +34,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay {
|
|||
// --- begin event handlers
|
||||
onConfigurationChanged(e) {
|
||||
const options = this._context.configuration.options;
|
||||
const wrappingInfo = options.get(141 /* EditorOption.wrappingInfo */);
|
||||
const wrappingInfo = options.get(142 /* EditorOption.wrappingInfo */);
|
||||
const fontInfo = options.get(48 /* EditorOption.fontInfo */);
|
||||
this._lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this._spaceWidth = fontInfo.spaceWidth;
|
||||
|
|
@ -156,7 +156,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay {
|
|||
lineGuides.push(...bracketGuidesInLineQueue.takeWhile(g => g.visibleColumn < indentGuide) || []);
|
||||
const peeked = bracketGuidesInLineQueue.peek();
|
||||
if (!peeked || peeked.visibleColumn !== indentGuide || peeked.horizontalLine) {
|
||||
lineGuides.push(new IndentGuide(indentGuide, -1, isActive ? 'core-guide-indent-active' : 'core-guide-indent', null, -1, -1));
|
||||
lineGuides.push(new IndentGuide(indentGuide, -1, `core-guide-indent lvl-${(indentLvl - 1) % 30}` + (isActive ? ' indent-active' : ''), null, -1, -1));
|
||||
}
|
||||
}
|
||||
lineGuides.push(...bracketGuidesInLineQueue.takeWhile(g => true) || []);
|
||||
|
|
@ -190,6 +190,14 @@ registerThemingParticipant((theme, collector) => {
|
|||
{ bracketColor: editorBracketHighlightingForeground6, guideColor: editorBracketPairGuideBackground6, guideColorActive: editorBracketPairGuideActiveBackground6 }
|
||||
];
|
||||
const colorProvider = new BracketPairGuidesClassNames();
|
||||
const indentColors = [
|
||||
{ indentColor: editorIndentGuide1, indentColorActive: editorActiveIndentGuide1 },
|
||||
{ indentColor: editorIndentGuide2, indentColorActive: editorActiveIndentGuide2 },
|
||||
{ indentColor: editorIndentGuide3, indentColorActive: editorActiveIndentGuide3 },
|
||||
{ indentColor: editorIndentGuide4, indentColorActive: editorActiveIndentGuide4 },
|
||||
{ indentColor: editorIndentGuide5, indentColorActive: editorActiveIndentGuide5 },
|
||||
{ indentColor: editorIndentGuide6, indentColorActive: editorActiveIndentGuide6 },
|
||||
];
|
||||
const colorValues = colors
|
||||
.map(c => {
|
||||
var _a, _b;
|
||||
|
|
@ -207,6 +215,21 @@ registerThemingParticipant((theme, collector) => {
|
|||
};
|
||||
})
|
||||
.filter(isDefined);
|
||||
const indentColorValues = indentColors
|
||||
.map(c => {
|
||||
const indentColor = theme.getColor(c.indentColor);
|
||||
const indentColorActive = theme.getColor(c.indentColorActive);
|
||||
const effectiveIndentColor = transparentToUndefined(indentColor);
|
||||
const effectiveIndentColorActive = transparentToUndefined(indentColorActive);
|
||||
if (!effectiveIndentColor || !effectiveIndentColorActive) {
|
||||
return undefined;
|
||||
}
|
||||
return {
|
||||
indentColor: effectiveIndentColor,
|
||||
indentColorActive: effectiveIndentColorActive,
|
||||
};
|
||||
})
|
||||
.filter(isDefined);
|
||||
if (colorValues.length > 0) {
|
||||
for (let level = 0; level < 30; level++) {
|
||||
const colors = colorValues[level % colorValues.length];
|
||||
|
|
@ -219,4 +242,12 @@ registerThemingParticipant((theme, collector) => {
|
|||
collector.addRule(`.monaco-editor .horizontal-top.${colorProvider.activeClassName} { border-top: 1px solid var(--guide-color-active); }`);
|
||||
collector.addRule(`.monaco-editor .horizontal-bottom.${colorProvider.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`);
|
||||
}
|
||||
if (indentColorValues.length > 0) {
|
||||
for (let level = 0; level < 30; level++) {
|
||||
const colors = indentColorValues[level % indentColorValues.length];
|
||||
collector.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${level} { --indent-color: ${colors.indentColor}; --indent-color-active: ${colors.indentColorActive}; }`);
|
||||
}
|
||||
collector.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }`);
|
||||
collector.addRule(`.monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }`);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ export class LineNumbersOverlay extends DynamicViewOverlay {
|
|||
const lineNumbers = options.get(65 /* EditorOption.lineNumbers */);
|
||||
this._renderLineNumbers = lineNumbers.renderType;
|
||||
this._renderCustomLineNumbers = lineNumbers.renderFn;
|
||||
this._renderFinalNewline = options.get(91 /* EditorOption.renderFinalNewline */);
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
this._renderFinalNewline = options.get(92 /* EditorOption.renderFinalNewline */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._lineNumbersLeft = layoutInfo.lineNumbersLeft;
|
||||
this._lineNumbersWidth = layoutInfo.lineNumbersWidth;
|
||||
}
|
||||
|
|
|
|||
6
node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/lines/viewLine.js
generated
vendored
6
node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/lines/viewLine.js
generated
vendored
|
|
@ -40,13 +40,13 @@ export class ViewLineOptions {
|
|||
const fontInfo = options.get(48 /* EditorOption.fontInfo */);
|
||||
const experimentalWhitespaceRendering = options.get(36 /* EditorOption.experimentalWhitespaceRendering */);
|
||||
if (experimentalWhitespaceRendering === 'off') {
|
||||
this.renderWhitespace = options.get(95 /* EditorOption.renderWhitespace */);
|
||||
this.renderWhitespace = options.get(96 /* EditorOption.renderWhitespace */);
|
||||
}
|
||||
else {
|
||||
// whitespace is rendered in a different layer
|
||||
this.renderWhitespace = 'none';
|
||||
}
|
||||
this.renderControlCharacters = options.get(90 /* EditorOption.renderControlCharacters */);
|
||||
this.renderControlCharacters = options.get(91 /* EditorOption.renderControlCharacters */);
|
||||
this.spaceWidth = fontInfo.spaceWidth;
|
||||
this.middotWidth = fontInfo.middotWidth;
|
||||
this.wsmiddotWidth = fontInfo.wsmiddotWidth;
|
||||
|
|
@ -54,7 +54,7 @@ export class ViewLineOptions {
|
|||
&& !options.get(31 /* EditorOption.disableMonospaceOptimizations */));
|
||||
this.canUseHalfwidthRightwardsArrow = fontInfo.canUseHalfwidthRightwardsArrow;
|
||||
this.lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this.stopRenderingLineAfter = options.get(113 /* EditorOption.stopRenderingLineAfter */);
|
||||
this.stopRenderingLineAfter = options.get(114 /* EditorOption.stopRenderingLineAfter */);
|
||||
this.fontLigatures = options.get(49 /* EditorOption.fontLigatures */);
|
||||
}
|
||||
equals(other) {
|
||||
|
|
|
|||
37
node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/lines/viewLines.js
generated
vendored
37
node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/lines/viewLines.js
generated
vendored
|
|
@ -2,18 +2,18 @@
|
|||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import './viewLines.css';
|
||||
import * as platform from '../../../../base/common/platform.js';
|
||||
import { MOUSE_CURSOR_TEXT_CSS_CLASS_NAME } from '../../../../base/browser/ui/mouseCursor/mouseCursor.js';
|
||||
import { RunOnceScheduler } from '../../../../base/common/async.js';
|
||||
import * as platform from '../../../../base/common/platform.js';
|
||||
import './viewLines.css';
|
||||
import { applyFontInfo } from '../../config/domFontInfo.js';
|
||||
import { HorizontalPosition, HorizontalRange, LineVisibleRanges } from '../../view/renderingContext.js';
|
||||
import { VisibleLinesCollection } from '../../view/viewLayer.js';
|
||||
import { PartFingerprints, ViewPart } from '../../view/viewPart.js';
|
||||
import { DomReadingContext } from './domReadingContext.js';
|
||||
import { ViewLine, ViewLineOptions } from './viewLine.js';
|
||||
import { Position } from '../../../common/core/position.js';
|
||||
import { Range } from '../../../common/core/range.js';
|
||||
import { LineVisibleRanges, HorizontalPosition, HorizontalRange } from '../../view/renderingContext.js';
|
||||
import { MOUSE_CURSOR_TEXT_CSS_CLASS_NAME } from '../../../../base/browser/ui/mouseCursor/mouseCursor.js';
|
||||
import { DomReadingContext } from './domReadingContext.js';
|
||||
class LastRenderedData {
|
||||
constructor() {
|
||||
this._currentVisibleRange = new Range(1, 1, 1, 1);
|
||||
|
|
@ -68,11 +68,11 @@ export class ViewLines extends ViewPart {
|
|||
const conf = this._context.configuration;
|
||||
const options = this._context.configuration.options;
|
||||
const fontInfo = options.get(48 /* EditorOption.fontInfo */);
|
||||
const wrappingInfo = options.get(141 /* EditorOption.wrappingInfo */);
|
||||
const wrappingInfo = options.get(142 /* EditorOption.wrappingInfo */);
|
||||
this._lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;
|
||||
this._isViewportWrapping = wrappingInfo.isViewportWrapping;
|
||||
this._revealHorizontalRightPadding = options.get(96 /* EditorOption.revealHorizontalRightPadding */);
|
||||
this._revealHorizontalRightPadding = options.get(97 /* EditorOption.revealHorizontalRightPadding */);
|
||||
this._cursorSurroundingLines = options.get(27 /* EditorOption.cursorSurroundingLines */);
|
||||
this._cursorSurroundingLinesStyle = options.get(28 /* EditorOption.cursorSurroundingLinesStyle */);
|
||||
this._canUseLayerHinting = !options.get(30 /* EditorOption.disableLayerHinting */);
|
||||
|
|
@ -91,8 +91,8 @@ export class ViewLines extends ViewPart {
|
|||
this._lastRenderedData = new LastRenderedData();
|
||||
this._horizontalRevealRequest = null;
|
||||
// sticky scroll widget
|
||||
this._stickyScrollEnabled = options.get(111 /* EditorOption.stickyScroll */).enabled;
|
||||
this._maxNumberStickyLines = options.get(111 /* EditorOption.stickyScroll */).maxLineCount;
|
||||
this._stickyScrollEnabled = options.get(112 /* EditorOption.stickyScroll */).enabled;
|
||||
this._maxNumberStickyLines = options.get(112 /* EditorOption.stickyScroll */).maxLineCount;
|
||||
}
|
||||
dispose() {
|
||||
this._asyncUpdateLineWidths.dispose();
|
||||
|
|
@ -110,25 +110,25 @@ export class ViewLines extends ViewPart {
|
|||
// ---- begin view event handlers
|
||||
onConfigurationChanged(e) {
|
||||
this._visibleLines.onConfigurationChanged(e);
|
||||
if (e.hasChanged(141 /* EditorOption.wrappingInfo */)) {
|
||||
if (e.hasChanged(142 /* EditorOption.wrappingInfo */)) {
|
||||
this._maxLineWidth = 0;
|
||||
}
|
||||
const options = this._context.configuration.options;
|
||||
const fontInfo = options.get(48 /* EditorOption.fontInfo */);
|
||||
const wrappingInfo = options.get(141 /* EditorOption.wrappingInfo */);
|
||||
const wrappingInfo = options.get(142 /* EditorOption.wrappingInfo */);
|
||||
this._lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this._typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;
|
||||
this._isViewportWrapping = wrappingInfo.isViewportWrapping;
|
||||
this._revealHorizontalRightPadding = options.get(96 /* EditorOption.revealHorizontalRightPadding */);
|
||||
this._revealHorizontalRightPadding = options.get(97 /* EditorOption.revealHorizontalRightPadding */);
|
||||
this._cursorSurroundingLines = options.get(27 /* EditorOption.cursorSurroundingLines */);
|
||||
this._cursorSurroundingLinesStyle = options.get(28 /* EditorOption.cursorSurroundingLinesStyle */);
|
||||
this._canUseLayerHinting = !options.get(30 /* EditorOption.disableLayerHinting */);
|
||||
// sticky scroll
|
||||
this._stickyScrollEnabled = options.get(111 /* EditorOption.stickyScroll */).enabled;
|
||||
this._maxNumberStickyLines = options.get(111 /* EditorOption.stickyScroll */).maxLineCount;
|
||||
this._stickyScrollEnabled = options.get(112 /* EditorOption.stickyScroll */).enabled;
|
||||
this._maxNumberStickyLines = options.get(112 /* EditorOption.stickyScroll */).maxLineCount;
|
||||
applyFontInfo(this.domNode, fontInfo);
|
||||
this._onOptionsMaybeChanged();
|
||||
if (e.hasChanged(140 /* EditorOption.layoutInfo */)) {
|
||||
if (e.hasChanged(141 /* EditorOption.layoutInfo */)) {
|
||||
this._maxLineWidth = 0;
|
||||
}
|
||||
return true;
|
||||
|
|
@ -335,7 +335,8 @@ export class ViewLines extends ViewPart {
|
|||
continue;
|
||||
}
|
||||
const startColumn = lineNumber === range.startLineNumber ? range.startColumn : 1;
|
||||
const endColumn = lineNumber === range.endLineNumber ? range.endColumn : this._context.viewModel.getLineMaxColumn(lineNumber);
|
||||
const continuesInNextLine = lineNumber !== range.endLineNumber;
|
||||
const endColumn = continuesInNextLine ? this._context.viewModel.getLineMaxColumn(lineNumber) : range.endColumn;
|
||||
const visibleRangesForLine = this._visibleLines.getVisibleLine(lineNumber).getVisibleRangesForRange(lineNumber, startColumn, endColumn, domReadingContext);
|
||||
if (!visibleRangesForLine) {
|
||||
continue;
|
||||
|
|
@ -347,7 +348,7 @@ export class ViewLines extends ViewPart {
|
|||
visibleRangesForLine.ranges[visibleRangesForLine.ranges.length - 1].width += this._typicalHalfwidthCharacterWidth;
|
||||
}
|
||||
}
|
||||
visibleRanges[visibleRangesLen++] = new LineVisibleRanges(visibleRangesForLine.outsideRenderedLine, lineNumber, HorizontalRange.from(visibleRangesForLine.ranges));
|
||||
visibleRanges[visibleRangesLen++] = new LineVisibleRanges(visibleRangesForLine.outsideRenderedLine, lineNumber, HorizontalRange.from(visibleRangesForLine.ranges), continuesInNextLine);
|
||||
}
|
||||
this._updateLineWidthsSlowIfDomDidLayout(domReadingContext);
|
||||
if (visibleRangesLen === 0) {
|
||||
|
|
@ -618,7 +619,7 @@ export class ViewLines extends ViewPart {
|
|||
}
|
||||
_computeScrollLeftToReveal(horizontalRevealRequest) {
|
||||
const viewport = this._context.viewLayout.getCurrentViewport();
|
||||
const layoutInfo = this._context.configuration.options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = this._context.configuration.options.get(141 /* EditorOption.layoutInfo */);
|
||||
const viewportStartX = viewport.left;
|
||||
const viewportEndX = viewportStartX + viewport.width - layoutInfo.verticalScrollbarWidth;
|
||||
let boxStartX = 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export class LinesDecorationsOverlay extends DedupOverlay {
|
|||
super();
|
||||
this._context = context;
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._decorationsLeft = layoutInfo.decorationsLeft;
|
||||
this._decorationsWidth = layoutInfo.decorationsWidth;
|
||||
this._renderResult = null;
|
||||
|
|
@ -23,7 +23,7 @@ export class LinesDecorationsOverlay extends DedupOverlay {
|
|||
// --- begin event handlers
|
||||
onConfigurationChanged(e) {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._decorationsLeft = layoutInfo.decorationsLeft;
|
||||
this._decorationsWidth = layoutInfo.decorationsWidth;
|
||||
return true;
|
||||
|
|
@ -71,14 +71,14 @@ export class LinesDecorationsOverlay extends DedupOverlay {
|
|||
prepareRender(ctx) {
|
||||
const visibleStartLineNumber = ctx.visibleRange.startLineNumber;
|
||||
const visibleEndLineNumber = ctx.visibleRange.endLineNumber;
|
||||
const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx), 1);
|
||||
const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));
|
||||
const left = this._decorationsLeft.toString();
|
||||
const width = this._decorationsWidth.toString();
|
||||
const common = '" style="left:' + left + 'px;width:' + width + 'px;"></div>';
|
||||
const output = [];
|
||||
for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {
|
||||
const lineIndex = lineNumber - visibleStartLineNumber;
|
||||
const decorations = toRender[lineIndex].getLaneDecorations(1); // there is only one lane, see _render call above
|
||||
const decorations = toRender[lineIndex].getDecorations();
|
||||
let lineOutput = '';
|
||||
for (const decoration of decorations) {
|
||||
lineOutput += '<div class="cldr ' + decoration.className + common;
|
||||
|
|
|
|||
4
node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/margin/margin.js
generated
vendored
4
node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/margin/margin.js
generated
vendored
|
|
@ -9,7 +9,7 @@ export class Margin extends ViewPart {
|
|||
constructor(context) {
|
||||
super(context);
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._canUseLayerHinting = !options.get(30 /* EditorOption.disableLayerHinting */);
|
||||
this._contentLeft = layoutInfo.contentLeft;
|
||||
this._glyphMarginLeft = layoutInfo.glyphMarginLeft;
|
||||
|
|
@ -32,7 +32,7 @@ export class Margin extends ViewPart {
|
|||
// --- begin event handlers
|
||||
onConfigurationChanged(e) {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._canUseLayerHinting = !options.get(30 /* EditorOption.disableLayerHinting */);
|
||||
this._contentLeft = layoutInfo.contentLeft;
|
||||
this._glyphMarginLeft = layoutInfo.glyphMarginLeft;
|
||||
|
|
|
|||
|
|
@ -59,11 +59,11 @@ export class MarginViewLineDecorationsOverlay extends DedupOverlay {
|
|||
prepareRender(ctx) {
|
||||
const visibleStartLineNumber = ctx.visibleRange.startLineNumber;
|
||||
const visibleEndLineNumber = ctx.visibleRange.endLineNumber;
|
||||
const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx), 1);
|
||||
const toRender = this._render(visibleStartLineNumber, visibleEndLineNumber, this._getDecorations(ctx));
|
||||
const output = [];
|
||||
for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) {
|
||||
const lineIndex = lineNumber - visibleStartLineNumber;
|
||||
const decorations = toRender[lineIndex].getLaneDecorations(1); // there is only one lane, see _render call above
|
||||
const decorations = toRender[lineIndex].getDecorations();
|
||||
let lineOutput = '';
|
||||
for (const decoration of decorations) {
|
||||
lineOutput += '<div class="cmdr ' + decoration.className + '" style=""></div>';
|
||||
|
|
|
|||
6
node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/minimap/minimap.js
generated
vendored
6
node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/minimap/minimap.js
generated
vendored
|
|
@ -30,15 +30,15 @@ const GUTTER_DECORATION_WIDTH = 2;
|
|||
class MinimapOptions {
|
||||
constructor(configuration, theme, tokensColorTracker) {
|
||||
const options = configuration.options;
|
||||
const pixelRatio = options.get(138 /* EditorOption.pixelRatio */);
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const pixelRatio = options.get(139 /* EditorOption.pixelRatio */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
const minimapLayout = layoutInfo.minimap;
|
||||
const fontInfo = options.get(48 /* EditorOption.fontInfo */);
|
||||
const minimapOpts = options.get(70 /* EditorOption.minimap */);
|
||||
this.renderMinimap = minimapLayout.renderMinimap;
|
||||
this.size = minimapOpts.size;
|
||||
this.minimapHeightIsEditorHeight = minimapLayout.minimapHeightIsEditorHeight;
|
||||
this.scrollBeyondLastLine = options.get(101 /* EditorOption.scrollBeyondLastLine */);
|
||||
this.scrollBeyondLastLine = options.get(102 /* EditorOption.scrollBeyondLastLine */);
|
||||
this.paddingTop = options.get(81 /* EditorOption.padding */).top;
|
||||
this.paddingBottom = options.get(81 /* EditorOption.padding */).bottom;
|
||||
this.showSlider = minimapOpts.showSlider;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export class ViewOverlayWidgets extends ViewPart {
|
|||
constructor(context) {
|
||||
super(context);
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._widgets = {};
|
||||
this._verticalScrollbarWidth = layoutInfo.verticalScrollbarWidth;
|
||||
this._minimapWidth = layoutInfo.minimap.minimapWidth;
|
||||
|
|
@ -30,7 +30,7 @@ export class ViewOverlayWidgets extends ViewPart {
|
|||
// ---- begin view event handlers
|
||||
onConfigurationChanged(e) {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._verticalScrollbarWidth = layoutInfo.verticalScrollbarWidth;
|
||||
this._minimapWidth = layoutInfo.minimap.minimapWidth;
|
||||
this._horizontalScrollbarHeight = layoutInfo.horizontalScrollbarHeight;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class Settings {
|
|||
constructor(config, theme) {
|
||||
const options = config.options;
|
||||
this.lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this.pixelRatio = options.get(138 /* EditorOption.pixelRatio */);
|
||||
this.pixelRatio = options.get(139 /* EditorOption.pixelRatio */);
|
||||
this.overviewRulerLanes = options.get(80 /* EditorOption.overviewRulerLanes */);
|
||||
this.renderBorder = options.get(79 /* EditorOption.overviewRulerBorder */);
|
||||
const borderColor = theme.getColor(editorOverviewRulerBorder);
|
||||
|
|
@ -36,7 +36,7 @@ class Settings {
|
|||
else {
|
||||
this.backgroundColor = null;
|
||||
}
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
const position = layoutInfo.overviewRuler;
|
||||
this.top = position.top;
|
||||
this.right = position.right;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export class OverviewRuler extends ViewEventHandler {
|
|||
this._zoneManager.setDOMHeight(0);
|
||||
this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight());
|
||||
this._zoneManager.setLineHeight(options.get(64 /* EditorOption.lineHeight */));
|
||||
this._zoneManager.setPixelRatio(options.get(138 /* EditorOption.pixelRatio */));
|
||||
this._zoneManager.setPixelRatio(options.get(139 /* EditorOption.pixelRatio */));
|
||||
this._context.addEventHandler(this);
|
||||
}
|
||||
dispose() {
|
||||
|
|
@ -34,8 +34,8 @@ export class OverviewRuler extends ViewEventHandler {
|
|||
this._zoneManager.setLineHeight(options.get(64 /* EditorOption.lineHeight */));
|
||||
this._render();
|
||||
}
|
||||
if (e.hasChanged(138 /* EditorOption.pixelRatio */)) {
|
||||
this._zoneManager.setPixelRatio(options.get(138 /* EditorOption.pixelRatio */));
|
||||
if (e.hasChanged(139 /* EditorOption.pixelRatio */)) {
|
||||
this._zoneManager.setPixelRatio(options.get(139 /* EditorOption.pixelRatio */));
|
||||
this._domNode.setWidth(this._zoneManager.getDOMWidth());
|
||||
this._domNode.setHeight(this._zoneManager.getDOMHeight());
|
||||
this._domNode.domNode.width = this._zoneManager.getCanvasWidth();
|
||||
|
|
|
|||
4
node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/rulers/rulers.js
generated
vendored
4
node_modules/monaco-editor-core/esm/vs/editor/browser/viewParts/rulers/rulers.js
generated
vendored
|
|
@ -14,7 +14,7 @@ export class Rulers extends ViewPart {
|
|||
this.domNode.setClassName('view-rulers');
|
||||
this._renderedRulers = [];
|
||||
const options = this._context.configuration.options;
|
||||
this._rulers = options.get(98 /* EditorOption.rulers */);
|
||||
this._rulers = options.get(99 /* EditorOption.rulers */);
|
||||
this._typicalHalfwidthCharacterWidth = options.get(48 /* EditorOption.fontInfo */).typicalHalfwidthCharacterWidth;
|
||||
}
|
||||
dispose() {
|
||||
|
|
@ -23,7 +23,7 @@ export class Rulers extends ViewPart {
|
|||
// --- begin event handlers
|
||||
onConfigurationChanged(e) {
|
||||
const options = this._context.configuration.options;
|
||||
this._rulers = options.get(98 /* EditorOption.rulers */);
|
||||
this._rulers = options.get(99 /* EditorOption.rulers */);
|
||||
this._typicalHalfwidthCharacterWidth = options.get(48 /* EditorOption.fontInfo */).typicalHalfwidthCharacterWidth;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export class ScrollDecorationViewPart extends ViewPart {
|
|||
this._updateWidth();
|
||||
this._shouldShow = false;
|
||||
const options = this._context.configuration.options;
|
||||
const scrollbar = options.get(99 /* EditorOption.scrollbar */);
|
||||
const scrollbar = options.get(100 /* EditorOption.scrollbar */);
|
||||
this._useShadows = scrollbar.useShadows;
|
||||
this._domNode = createFastDomNode(document.createElement('div'));
|
||||
this._domNode.setAttribute('role', 'presentation');
|
||||
|
|
@ -35,7 +35,7 @@ export class ScrollDecorationViewPart extends ViewPart {
|
|||
}
|
||||
_updateWidth() {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
if (layoutInfo.minimap.renderMinimap === 0 || (layoutInfo.minimap.minimapWidth > 0 && layoutInfo.minimap.minimapLeft === 0)) {
|
||||
this._width = layoutInfo.width;
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ export class ScrollDecorationViewPart extends ViewPart {
|
|||
// --- begin event handlers
|
||||
onConfigurationChanged(e) {
|
||||
const options = this._context.configuration.options;
|
||||
const scrollbar = options.get(99 /* EditorOption.scrollbar */);
|
||||
const scrollbar = options.get(100 /* EditorOption.scrollbar */);
|
||||
this._useShadows = scrollbar.useShadows;
|
||||
this._updateWidth();
|
||||
this._updateShouldShow();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export class SelectionsOverlay extends DynamicViewOverlay {
|
|||
this._context = context;
|
||||
const options = this._context.configuration.options;
|
||||
this._lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this._roundedSelection = options.get(97 /* EditorOption.roundedSelection */);
|
||||
this._roundedSelection = options.get(98 /* EditorOption.roundedSelection */);
|
||||
this._typicalHalfwidthCharacterWidth = options.get(48 /* EditorOption.fontInfo */).typicalHalfwidthCharacterWidth;
|
||||
this._selections = [];
|
||||
this._renderResult = null;
|
||||
|
|
@ -48,7 +48,7 @@ export class SelectionsOverlay extends DynamicViewOverlay {
|
|||
onConfigurationChanged(e) {
|
||||
const options = this._context.configuration.options;
|
||||
this._lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this._roundedSelection = options.get(97 /* EditorOption.roundedSelection */);
|
||||
this._roundedSelection = options.get(98 /* EditorOption.roundedSelection */);
|
||||
this._typicalHalfwidthCharacterWidth = options.get(48 /* EditorOption.fontInfo */).typicalHalfwidthCharacterWidth;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export class ViewZones extends ViewPart {
|
|||
constructor(context) {
|
||||
super(context);
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this._contentWidth = layoutInfo.contentWidth;
|
||||
this._contentLeft = layoutInfo.contentLeft;
|
||||
|
|
@ -58,7 +58,7 @@ export class ViewZones extends ViewPart {
|
|||
}
|
||||
onConfigurationChanged(e) {
|
||||
const options = this._context.configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this._contentWidth = layoutInfo.contentWidth;
|
||||
this._contentLeft = layoutInfo.contentLeft;
|
||||
|
|
@ -123,7 +123,7 @@ export class ViewZones extends ViewPart {
|
|||
column: zoneAfterModelPosition.column + 1
|
||||
});
|
||||
}
|
||||
const viewPosition = this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(zoneAfterModelPosition, zone.afterColumnAffinity);
|
||||
const viewPosition = this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(zoneAfterModelPosition, zone.afterColumnAffinity, true);
|
||||
const isVisible = zone.showInHiddenAreas || this._context.viewModel.coordinatesConverter.modelPositionIsVisible(zoneBeforeModelPosition);
|
||||
return {
|
||||
isInHiddenArea: !isVisible,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export class WhitespaceOverlay extends DynamicViewOverlay {
|
|||
onConfigurationChanged(e) {
|
||||
const newOptions = new WhitespaceOptions(this._context.configuration);
|
||||
if (this._options.equals(newOptions)) {
|
||||
return e.hasChanged(140 /* EditorOption.layoutInfo */);
|
||||
return e.hasChanged(141 /* EditorOption.layoutInfo */);
|
||||
}
|
||||
this._options = newOptions;
|
||||
return true;
|
||||
|
|
@ -241,11 +241,11 @@ class WhitespaceOptions {
|
|||
this.renderWithSVG = false;
|
||||
}
|
||||
else if (experimentalWhitespaceRendering === 'svg') {
|
||||
this.renderWhitespace = options.get(95 /* EditorOption.renderWhitespace */);
|
||||
this.renderWhitespace = options.get(96 /* EditorOption.renderWhitespace */);
|
||||
this.renderWithSVG = true;
|
||||
}
|
||||
else {
|
||||
this.renderWhitespace = options.get(95 /* EditorOption.renderWhitespace */);
|
||||
this.renderWhitespace = options.get(96 /* EditorOption.renderWhitespace */);
|
||||
this.renderWithSVG = false;
|
||||
}
|
||||
this.spaceWidth = fontInfo.spaceWidth;
|
||||
|
|
@ -253,7 +253,7 @@ class WhitespaceOptions {
|
|||
this.wsmiddotWidth = fontInfo.wsmiddotWidth;
|
||||
this.canUseHalfwidthRightwardsArrow = fontInfo.canUseHalfwidthRightwardsArrow;
|
||||
this.lineHeight = options.get(64 /* EditorOption.lineHeight */);
|
||||
this.stopRenderingLineAfter = options.get(113 /* EditorOption.stopRenderingLineAfter */);
|
||||
this.stopRenderingLineAfter = options.get(114 /* EditorOption.stopRenderingLineAfter */);
|
||||
}
|
||||
equals(other) {
|
||||
return (this.renderWhitespace === other.renderWhitespace
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
import { runWhenIdle } from '../../../base/common/async.js';
|
||||
import { onUnexpectedError } from '../../../base/common/errors.js';
|
||||
import { Disposable, DisposableMap } from '../../../base/common/lifecycle.js';
|
||||
import './diffEditor.contribution.js';
|
||||
export class CodeEditorContributions extends Disposable {
|
||||
constructor() {
|
||||
super();
|
||||
|
|
|
|||
56
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/codeEditorWidget.js
generated
vendored
56
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/codeEditorWidget.js
generated
vendored
|
|
@ -25,7 +25,7 @@ import './media/editor.css';
|
|||
import * as nls from '../../../nls.js';
|
||||
import * as dom from '../../../base/browser/dom.js';
|
||||
import { onUnexpectedError } from '../../../base/common/errors.js';
|
||||
import { Emitter, EventDeliveryQueue } from '../../../base/common/event.js';
|
||||
import { Emitter, createEventDeliveryQueue } from '../../../base/common/event.js';
|
||||
import { Disposable, dispose } from '../../../base/common/lifecycle.js';
|
||||
import { Schemas } from '../../../base/common/network.js';
|
||||
import { EditorConfiguration } from '../config/editorConfiguration.js';
|
||||
|
|
@ -89,7 +89,7 @@ export let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|||
super();
|
||||
this.languageConfigurationService = languageConfigurationService;
|
||||
//#region Eventing
|
||||
this._deliveryQueue = new EventDeliveryQueue();
|
||||
this._deliveryQueue = createEventDeliveryQueue();
|
||||
this._contributions = this._register(new CodeEditorContributions());
|
||||
this._onDidDispose = this._register(new Emitter());
|
||||
this.onDidDispose = this._onDidDispose.event;
|
||||
|
|
@ -181,8 +181,8 @@ export let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|||
this._register(this._configuration.onDidChange((e) => {
|
||||
this._onDidChangeConfiguration.fire(e);
|
||||
const options = this._configuration.options;
|
||||
if (e.hasChanged(140 /* EditorOption.layoutInfo */)) {
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
if (e.hasChanged(141 /* EditorOption.layoutInfo */)) {
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
this._onDidLayoutChange.fire(layoutInfo);
|
||||
}
|
||||
}));
|
||||
|
|
@ -201,6 +201,7 @@ export let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|||
}));
|
||||
this._contentWidgets = {};
|
||||
this._overlayWidgets = {};
|
||||
this._glyphMarginWidgets = {};
|
||||
let contributions;
|
||||
if (Array.isArray(codeEditorWidgetOptions.contributions)) {
|
||||
contributions = codeEditorWidgetOptions.contributions;
|
||||
|
|
@ -304,7 +305,7 @@ export let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|||
if (!this._modelData) {
|
||||
return null;
|
||||
}
|
||||
return WordOperations.getWordAtPosition(this._modelData.model, this._configuration.options.get(126 /* EditorOption.wordSeparators */), position);
|
||||
return WordOperations.getWordAtPosition(this._modelData.model, this._configuration.options.get(127 /* EditorOption.wordSeparators */), position);
|
||||
}
|
||||
getValue(options = null) {
|
||||
if (!this._modelData) {
|
||||
|
|
@ -945,7 +946,7 @@ export let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|||
}
|
||||
getLayoutInfo() {
|
||||
const options = this._configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
return layoutInfo;
|
||||
}
|
||||
createOverviewRuler(cssClassName) {
|
||||
|
|
@ -1060,6 +1061,39 @@ export let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|||
}
|
||||
}
|
||||
}
|
||||
addGlyphMarginWidget(widget) {
|
||||
const widgetData = {
|
||||
widget: widget,
|
||||
position: widget.getPosition()
|
||||
};
|
||||
if (this._glyphMarginWidgets.hasOwnProperty(widget.getId())) {
|
||||
console.warn('Overwriting a glyph margin widget with the same id.');
|
||||
}
|
||||
this._glyphMarginWidgets[widget.getId()] = widgetData;
|
||||
if (this._modelData && this._modelData.hasRealView) {
|
||||
this._modelData.view.addGlyphMarginWidget(widgetData);
|
||||
}
|
||||
}
|
||||
layoutGlyphMarginWidget(widget) {
|
||||
const widgetId = widget.getId();
|
||||
if (this._glyphMarginWidgets.hasOwnProperty(widgetId)) {
|
||||
const widgetData = this._glyphMarginWidgets[widgetId];
|
||||
widgetData.position = widget.getPosition();
|
||||
if (this._modelData && this._modelData.hasRealView) {
|
||||
this._modelData.view.layoutGlyphMarginWidget(widgetData);
|
||||
}
|
||||
}
|
||||
}
|
||||
removeGlyphMarginWidget(widget) {
|
||||
const widgetId = widget.getId();
|
||||
if (this._glyphMarginWidgets.hasOwnProperty(widgetId)) {
|
||||
const widgetData = this._glyphMarginWidgets[widgetId];
|
||||
delete this._glyphMarginWidgets[widgetId];
|
||||
if (this._modelData && this._modelData.hasRealView) {
|
||||
this._modelData.view.removeGlyphMarginWidget(widgetData);
|
||||
}
|
||||
}
|
||||
}
|
||||
changeViewZones(callback) {
|
||||
if (!this._modelData || !this._modelData.hasRealView) {
|
||||
return;
|
||||
|
|
@ -1078,7 +1112,7 @@ export let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|||
}
|
||||
const position = this._modelData.model.validatePosition(rawPosition);
|
||||
const options = this._configuration.options;
|
||||
const layoutInfo = options.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = options.get(141 /* EditorOption.layoutInfo */);
|
||||
const top = CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, position.lineNumber, position.column) - this.getScrollTop();
|
||||
const left = this._modelData.view.getOffsetForColumn(position.lineNumber, position.column) + layoutInfo.glyphMarginWidth + layoutInfo.lineNumbersWidth + layoutInfo.decorationsWidth - this.getScrollLeft();
|
||||
return {
|
||||
|
|
@ -1229,6 +1263,11 @@ export let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|||
const widgetId = keys[i];
|
||||
view.addOverlayWidget(this._overlayWidgets[widgetId]);
|
||||
}
|
||||
keys = Object.keys(this._glyphMarginWidgets);
|
||||
for (let i = 0, len = keys.length; i < len; i++) {
|
||||
const widgetId = keys[i];
|
||||
view.addGlyphMarginWidget(this._glyphMarginWidgets[widgetId]);
|
||||
}
|
||||
view.render(false, true);
|
||||
view.domNode.domNode.setAttribute('data-uri', model.uri.toString());
|
||||
}
|
||||
|
|
@ -1343,6 +1382,9 @@ export let CodeEditorWidget = class CodeEditorWidget extends Disposable {
|
|||
removeDropIndicator() {
|
||||
this._dropIntoEditorDecorations.clear();
|
||||
}
|
||||
setContextValue(key, value) {
|
||||
this._contextKeyService.createKey(key, value);
|
||||
}
|
||||
};
|
||||
CodeEditorWidget.dropIntoEditorDecorationOptions = ModelDecorationOptions.register({
|
||||
description: 'workbench-dnd-target',
|
||||
|
|
|
|||
64
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditor.contribution.js
generated
vendored
Normal file
64
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditor.contribution.js
generated
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { EditorAction, registerEditorAction } from '../editorExtensions.js';
|
||||
import { ICodeEditorService } from '../services/codeEditorService.js';
|
||||
import { localize } from '../../../nls.js';
|
||||
import { ContextKeyExpr } from '../../../platform/contextkey/common/contextkey.js';
|
||||
class DiffReviewNext extends EditorAction {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'editor.action.diffReview.next',
|
||||
label: localize('editor.action.diffReview.next', "Go to Next Difference"),
|
||||
alias: 'Go to Next Difference',
|
||||
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
||||
kbOpts: {
|
||||
kbExpr: null,
|
||||
primary: 65 /* KeyCode.F7 */,
|
||||
weight: 100 /* KeybindingWeight.EditorContrib */
|
||||
}
|
||||
});
|
||||
}
|
||||
run(accessor, editor) {
|
||||
const diffEditor = findFocusedDiffEditor(accessor);
|
||||
diffEditor === null || diffEditor === void 0 ? void 0 : diffEditor.diffReviewNext();
|
||||
}
|
||||
}
|
||||
class DiffReviewPrev extends EditorAction {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'editor.action.diffReview.prev',
|
||||
label: localize('editor.action.diffReview.prev', "Go to Previous Difference"),
|
||||
alias: 'Go to Previous Difference',
|
||||
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
||||
kbOpts: {
|
||||
kbExpr: null,
|
||||
primary: 1024 /* KeyMod.Shift */ | 65 /* KeyCode.F7 */,
|
||||
weight: 100 /* KeybindingWeight.EditorContrib */
|
||||
}
|
||||
});
|
||||
}
|
||||
run(accessor, editor) {
|
||||
const diffEditor = findFocusedDiffEditor(accessor);
|
||||
diffEditor === null || diffEditor === void 0 ? void 0 : diffEditor.diffReviewPrev();
|
||||
}
|
||||
}
|
||||
function findFocusedDiffEditor(accessor) {
|
||||
var _a;
|
||||
const codeEditorService = accessor.get(ICodeEditorService);
|
||||
const diffEditors = codeEditorService.listDiffEditors();
|
||||
const activeCodeEditor = (_a = codeEditorService.getFocusedCodeEditor()) !== null && _a !== void 0 ? _a : codeEditorService.getActiveCodeEditor();
|
||||
if (!activeCodeEditor) {
|
||||
return null;
|
||||
}
|
||||
for (let i = 0, len = diffEditors.length; i < len; i++) {
|
||||
const diffEditor = diffEditors[i];
|
||||
if (diffEditor.getModifiedEditor().getId() === activeCodeEditor.getId() || diffEditor.getOriginalEditor().getId() === activeCodeEditor.getId()) {
|
||||
return diffEditor;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
registerEditorAction(DiffReviewNext);
|
||||
registerEditorAction(DiffReviewPrev);
|
||||
125
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget.js
generated
vendored
125
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget.js
generated
vendored
|
|
@ -11,6 +11,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
import * as dom from '../../../base/browser/dom.js';
|
||||
import { createFastDomNode } from '../../../base/browser/fastDomNode.js';
|
||||
import { createTrustedTypesPolicy } from '../../../base/browser/trustedTypes.js';
|
||||
|
|
@ -102,6 +111,7 @@ class VisualEditorState {
|
|||
for (let i = 0, length = newDecorations.zones.length; i < length; i++) {
|
||||
const viewZone = newDecorations.zones[i];
|
||||
viewZone.suppressMouseDown = true;
|
||||
viewZone.showInHiddenAreas = true;
|
||||
const zoneId = viewChangeAccessor.addZone(viewZone);
|
||||
this._zones.push(zoneId);
|
||||
this._zonesMap[String(zoneId)] = true;
|
||||
|
|
@ -126,7 +136,7 @@ class VisualEditorState {
|
|||
let DIFF_EDITOR_ID = 0;
|
||||
const diffInsertIcon = registerIcon('diff-insert', Codicon.add, nls.localize('diffInsertIcon', 'Line decoration for inserts in the diff editor.'));
|
||||
const diffRemoveIcon = registerIcon('diff-remove', Codicon.remove, nls.localize('diffRemoveIcon', 'Line decoration for removals in the diff editor.'));
|
||||
const ttPolicy = createTrustedTypesPolicy('diffEditorWidget', { createHTML: value => value });
|
||||
export const diffEditorWidgetTtPolicy = createTrustedTypesPolicy('diffEditorWidget', { createHTML: value => value });
|
||||
const ariaNavigationTip = nls.localize('diff-aria-navigation-tip', ' use Shift + F7 to navigate changes');
|
||||
export let DiffEditorWidget = class DiffEditorWidget extends Disposable {
|
||||
constructor(domElement, options, codeEditorWidgetOptions, clipboardService, contextKeyService, instantiationService, codeEditorService, themeService, notificationService, contextMenuService, _editorProgressService) {
|
||||
|
|
@ -173,6 +183,7 @@ export let DiffEditorWidget = class DiffEditorWidget extends Disposable {
|
|||
experimental: {
|
||||
collapseUnchangedRegions: false,
|
||||
},
|
||||
isInEmbeddedEditor: false,
|
||||
});
|
||||
this.isEmbeddedDiffEditorKey = EditorContextKeys.isEmbeddedDiffEditor.bindTo(this._contextKeyService);
|
||||
this.isEmbeddedDiffEditorKey.set(typeof options.isInEmbeddedEditor !== 'undefined' ? options.isInEmbeddedEditor : false);
|
||||
|
|
@ -335,7 +346,7 @@ export let DiffEditorWidget = class DiffEditorWidget extends Disposable {
|
|||
if (e.hasChanged(48 /* EditorOption.fontInfo */)) {
|
||||
this._updateDecorationsRunner.schedule();
|
||||
}
|
||||
if (e.hasChanged(141 /* EditorOption.wrappingInfo */)) {
|
||||
if (e.hasChanged(142 /* EditorOption.wrappingInfo */)) {
|
||||
this._updateDecorationsRunner.cancel();
|
||||
this._updateDecorations();
|
||||
}
|
||||
|
|
@ -391,7 +402,7 @@ export let DiffEditorWidget = class DiffEditorWidget extends Disposable {
|
|||
if (e.hasChanged(48 /* EditorOption.fontInfo */)) {
|
||||
this._updateDecorationsRunner.schedule();
|
||||
}
|
||||
if (e.hasChanged(141 /* EditorOption.wrappingInfo */)) {
|
||||
if (e.hasChanged(142 /* EditorOption.wrappingInfo */)) {
|
||||
this._updateDecorationsRunner.cancel();
|
||||
this._updateDecorations();
|
||||
}
|
||||
|
|
@ -591,7 +602,20 @@ export let DiffEditorWidget = class DiffEditorWidget extends Disposable {
|
|||
modified: this._modifiedEditor.getModel()
|
||||
};
|
||||
}
|
||||
createViewModel(model) {
|
||||
return {
|
||||
model,
|
||||
waitForDiff() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// noop
|
||||
});
|
||||
},
|
||||
};
|
||||
}
|
||||
setModel(model) {
|
||||
if (model && 'model' in model) {
|
||||
model = model.model;
|
||||
}
|
||||
// Guard us against partial null model
|
||||
if (model && (!model.original || !model.modified)) {
|
||||
throw new Error(!model.original ? 'DiffEditorWidget.setModel: Original model is null' : 'DiffEditorWidget.setModel: Modified model is null');
|
||||
|
|
@ -725,7 +749,7 @@ export let DiffEditorWidget = class DiffEditorWidget extends Disposable {
|
|||
const modifiedViewState = this._modifiedEditor.saveViewState();
|
||||
return {
|
||||
original: originalViewState,
|
||||
modified: modifiedViewState
|
||||
modified: modifiedViewState,
|
||||
};
|
||||
}
|
||||
restoreViewState(s) {
|
||||
|
|
@ -833,6 +857,7 @@ export let DiffEditorWidget = class DiffEditorWidget extends Disposable {
|
|||
this._documentDiffProvider.computeDiff(currentOriginalModel, currentModifiedModel, {
|
||||
ignoreTrimWhitespace: this._options.ignoreTrimWhitespace,
|
||||
maxComputationTimeMs: this._options.maxComputationTime,
|
||||
computeMoves: false,
|
||||
}).then(result => {
|
||||
if (currentToken === this._diffComputationToken
|
||||
&& currentOriginalModel === this._originalEditor.getModel()
|
||||
|
|
@ -944,6 +969,7 @@ export let DiffEditorWidget = class DiffEditorWidget extends Disposable {
|
|||
// never wrap hidden editor
|
||||
result.wordWrapOverride1 = 'off';
|
||||
result.wordWrapOverride2 = 'off';
|
||||
result.stickyScroll = { enabled: false };
|
||||
}
|
||||
else {
|
||||
result.wordWrapOverride1 = this._options.diffWordWrap;
|
||||
|
|
@ -1082,80 +1108,6 @@ export let DiffEditorWidget = class DiffEditorWidget extends Disposable {
|
|||
// Just do a layout, the strategy might need it
|
||||
this._doLayout();
|
||||
}
|
||||
_getLineChangeAtOrBeforeLineNumber(lineNumber, startLineNumberExtractor) {
|
||||
const lineChanges = (this._diffComputationResult ? this._diffComputationResult.changes : []);
|
||||
if (lineChanges.length === 0 || lineNumber < startLineNumberExtractor(lineChanges[0])) {
|
||||
// There are no changes or `lineNumber` is before the first change
|
||||
return null;
|
||||
}
|
||||
let min = 0;
|
||||
let max = lineChanges.length - 1;
|
||||
while (min < max) {
|
||||
const mid = Math.floor((min + max) / 2);
|
||||
const midStart = startLineNumberExtractor(lineChanges[mid]);
|
||||
const midEnd = (mid + 1 <= max ? startLineNumberExtractor(lineChanges[mid + 1]) : 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */);
|
||||
if (lineNumber < midStart) {
|
||||
max = mid - 1;
|
||||
}
|
||||
else if (lineNumber >= midEnd) {
|
||||
min = mid + 1;
|
||||
}
|
||||
else {
|
||||
// HIT!
|
||||
min = mid;
|
||||
max = mid;
|
||||
}
|
||||
}
|
||||
return lineChanges[min];
|
||||
}
|
||||
_getEquivalentLineForOriginalLineNumber(lineNumber) {
|
||||
const lineChange = this._getLineChangeAtOrBeforeLineNumber(lineNumber, (lineChange) => lineChange.originalStartLineNumber);
|
||||
if (!lineChange) {
|
||||
return lineNumber;
|
||||
}
|
||||
const originalEquivalentLineNumber = lineChange.originalStartLineNumber + (lineChange.originalEndLineNumber > 0 ? -1 : 0);
|
||||
const modifiedEquivalentLineNumber = lineChange.modifiedStartLineNumber + (lineChange.modifiedEndLineNumber > 0 ? -1 : 0);
|
||||
const lineChangeOriginalLength = (lineChange.originalEndLineNumber > 0 ? (lineChange.originalEndLineNumber - lineChange.originalStartLineNumber + 1) : 0);
|
||||
const lineChangeModifiedLength = (lineChange.modifiedEndLineNumber > 0 ? (lineChange.modifiedEndLineNumber - lineChange.modifiedStartLineNumber + 1) : 0);
|
||||
const delta = lineNumber - originalEquivalentLineNumber;
|
||||
if (delta <= lineChangeOriginalLength) {
|
||||
return modifiedEquivalentLineNumber + Math.min(delta, lineChangeModifiedLength);
|
||||
}
|
||||
return modifiedEquivalentLineNumber + lineChangeModifiedLength - lineChangeOriginalLength + delta;
|
||||
}
|
||||
_getEquivalentLineForModifiedLineNumber(lineNumber) {
|
||||
const lineChange = this._getLineChangeAtOrBeforeLineNumber(lineNumber, (lineChange) => lineChange.modifiedStartLineNumber);
|
||||
if (!lineChange) {
|
||||
return lineNumber;
|
||||
}
|
||||
const originalEquivalentLineNumber = lineChange.originalStartLineNumber + (lineChange.originalEndLineNumber > 0 ? -1 : 0);
|
||||
const modifiedEquivalentLineNumber = lineChange.modifiedStartLineNumber + (lineChange.modifiedEndLineNumber > 0 ? -1 : 0);
|
||||
const lineChangeOriginalLength = (lineChange.originalEndLineNumber > 0 ? (lineChange.originalEndLineNumber - lineChange.originalStartLineNumber + 1) : 0);
|
||||
const lineChangeModifiedLength = (lineChange.modifiedEndLineNumber > 0 ? (lineChange.modifiedEndLineNumber - lineChange.modifiedStartLineNumber + 1) : 0);
|
||||
const delta = lineNumber - modifiedEquivalentLineNumber;
|
||||
if (delta <= lineChangeModifiedLength) {
|
||||
return originalEquivalentLineNumber + Math.min(delta, lineChangeOriginalLength);
|
||||
}
|
||||
return originalEquivalentLineNumber + lineChangeOriginalLength - lineChangeModifiedLength + delta;
|
||||
}
|
||||
getDiffLineInformationForOriginal(lineNumber) {
|
||||
if (!this._diffComputationResult) {
|
||||
// Cannot answer that which I don't know
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
equivalentLineNumber: this._getEquivalentLineForOriginalLineNumber(lineNumber)
|
||||
};
|
||||
}
|
||||
getDiffLineInformationForModified(lineNumber) {
|
||||
if (!this._diffComputationResult) {
|
||||
// Cannot answer that which I don't know
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
equivalentLineNumber: this._getEquivalentLineForModifiedLineNumber(lineNumber)
|
||||
};
|
||||
}
|
||||
};
|
||||
DiffEditorWidget.ONE_OVERVIEW_WIDTH = 15;
|
||||
DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH = 30;
|
||||
|
|
@ -1251,8 +1203,8 @@ class ViewZonesComputer {
|
|||
getViewZones() {
|
||||
const originalLineHeight = this._originalEditor.getOption(64 /* EditorOption.lineHeight */);
|
||||
const modifiedLineHeight = this._modifiedEditor.getOption(64 /* EditorOption.lineHeight */);
|
||||
const originalHasWrapping = (this._originalEditor.getOption(141 /* EditorOption.wrappingInfo */).wrappingColumn !== -1);
|
||||
const modifiedHasWrapping = (this._modifiedEditor.getOption(141 /* EditorOption.wrappingInfo */).wrappingColumn !== -1);
|
||||
const originalHasWrapping = (this._originalEditor.getOption(142 /* EditorOption.wrappingInfo */).wrappingColumn !== -1);
|
||||
const modifiedHasWrapping = (this._modifiedEditor.getOption(142 /* EditorOption.wrappingInfo */).wrappingColumn !== -1);
|
||||
const hasWrapping = (originalHasWrapping || modifiedHasWrapping);
|
||||
const originalModel = this._originalEditor.getModel();
|
||||
const originalCoordinatesConverter = this._originalEditor._getViewModel().coordinatesConverter;
|
||||
|
|
@ -1941,15 +1893,15 @@ class InlineViewZonesComputer extends ViewZonesComputer {
|
|||
const fontInfo = modifiedEditorOptions.get(48 /* EditorOption.fontInfo */);
|
||||
const disableMonospaceOptimizations = modifiedEditorOptions.get(31 /* EditorOption.disableMonospaceOptimizations */);
|
||||
const typicalHalfwidthCharacterWidth = fontInfo.typicalHalfwidthCharacterWidth;
|
||||
const scrollBeyondLastColumn = modifiedEditorOptions.get(100 /* EditorOption.scrollBeyondLastColumn */);
|
||||
const scrollBeyondLastColumn = modifiedEditorOptions.get(101 /* EditorOption.scrollBeyondLastColumn */);
|
||||
const mightContainNonBasicASCII = this._originalModel.mightContainNonBasicASCII();
|
||||
const mightContainRTL = this._originalModel.mightContainRTL();
|
||||
const lineHeight = modifiedEditorOptions.get(64 /* EditorOption.lineHeight */);
|
||||
const layoutInfo = modifiedEditorOptions.get(140 /* EditorOption.layoutInfo */);
|
||||
const layoutInfo = modifiedEditorOptions.get(141 /* EditorOption.layoutInfo */);
|
||||
const lineDecorationsWidth = layoutInfo.decorationsWidth;
|
||||
const stopRenderingLineAfter = modifiedEditorOptions.get(113 /* EditorOption.stopRenderingLineAfter */);
|
||||
const renderWhitespace = modifiedEditorOptions.get(95 /* EditorOption.renderWhitespace */);
|
||||
const renderControlCharacters = modifiedEditorOptions.get(90 /* EditorOption.renderControlCharacters */);
|
||||
const stopRenderingLineAfter = modifiedEditorOptions.get(114 /* EditorOption.stopRenderingLineAfter */);
|
||||
const renderWhitespace = modifiedEditorOptions.get(96 /* EditorOption.renderWhitespace */);
|
||||
const renderControlCharacters = modifiedEditorOptions.get(91 /* EditorOption.renderControlCharacters */);
|
||||
const fontLigatures = modifiedEditorOptions.get(49 /* EditorOption.fontLigatures */);
|
||||
const lineBreaks = this._lineBreaksComputer.finalize();
|
||||
let lineBreakIndex = 0;
|
||||
|
|
@ -2012,7 +1964,7 @@ class InlineViewZonesComputer extends ViewZonesComputer {
|
|||
}
|
||||
maxCharsPerLine += scrollBeyondLastColumn;
|
||||
const html = sb.build();
|
||||
const trustedhtml = ttPolicy ? ttPolicy.createHTML(html) : html;
|
||||
const trustedhtml = diffEditorWidgetTtPolicy ? diffEditorWidgetTtPolicy.createHTML(html) : html;
|
||||
domNode.innerHTML = trustedhtml;
|
||||
viewZone.minWidthInPx = (maxCharsPerLine * typicalHalfwidthCharacterWidth);
|
||||
if (viewLineCounts) {
|
||||
|
|
@ -2107,6 +2059,7 @@ function validateDiffEditorOptions(options, defaults) {
|
|||
experimental: {
|
||||
collapseUnchangedRegions: false,
|
||||
},
|
||||
isInEmbeddedEditor: validateBooleanOption(options.isInEmbeddedEditor, defaults.isInEmbeddedEditor),
|
||||
};
|
||||
}
|
||||
function changedDiffEditorOptions(a, b) {
|
||||
|
|
|
|||
72
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/decorations.js
generated
vendored
Normal file
72
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/decorations.js
generated
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { Codicon } from '../../../../base/common/codicons.js';
|
||||
import { MarkdownString } from '../../../../base/common/htmlContent.js';
|
||||
import { ThemeIcon } from '../../../../base/common/themables.js';
|
||||
import { ModelDecorationOptions } from '../../../common/model/textModel.js';
|
||||
import { localize } from '../../../../nls.js';
|
||||
import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
|
||||
export const diffInsertIcon = registerIcon('diff-insert', Codicon.add, localize('diffInsertIcon', 'Line decoration for inserts in the diff editor.'));
|
||||
export const diffRemoveIcon = registerIcon('diff-remove', Codicon.remove, localize('diffRemoveIcon', 'Line decoration for removals in the diff editor.'));
|
||||
export const diffLineAddDecorationBackgroundWithIndicator = ModelDecorationOptions.register({
|
||||
className: 'line-insert',
|
||||
description: 'line-insert',
|
||||
isWholeLine: true,
|
||||
linesDecorationsClassName: 'insert-sign ' + ThemeIcon.asClassName(diffInsertIcon),
|
||||
marginClassName: 'gutter-insert',
|
||||
});
|
||||
export const diffLineDeleteDecorationBackgroundWithIndicator = ModelDecorationOptions.register({
|
||||
className: 'line-delete',
|
||||
description: 'line-delete',
|
||||
isWholeLine: true,
|
||||
linesDecorationsClassName: 'delete-sign ' + ThemeIcon.asClassName(diffRemoveIcon),
|
||||
marginClassName: 'gutter-delete',
|
||||
});
|
||||
export const diffLineAddDecorationBackground = ModelDecorationOptions.register({
|
||||
className: 'line-insert',
|
||||
description: 'line-insert',
|
||||
isWholeLine: true,
|
||||
marginClassName: 'gutter-insert',
|
||||
});
|
||||
export const diffLineDeleteDecorationBackground = ModelDecorationOptions.register({
|
||||
className: 'line-delete',
|
||||
description: 'line-delete',
|
||||
isWholeLine: true,
|
||||
marginClassName: 'gutter-delete',
|
||||
});
|
||||
export const diffAddDecoration = ModelDecorationOptions.register({
|
||||
className: 'char-insert',
|
||||
description: 'char-insert',
|
||||
shouldFillLineOnLineBreak: true,
|
||||
});
|
||||
export const diffWholeLineAddDecoration = ModelDecorationOptions.register({
|
||||
className: 'char-insert',
|
||||
description: 'char-insert',
|
||||
isWholeLine: true,
|
||||
});
|
||||
export const diffAddDecorationEmpty = ModelDecorationOptions.register({
|
||||
className: 'char-insert diff-range-empty',
|
||||
description: 'char-insert diff-range-empty',
|
||||
});
|
||||
export const diffDeleteDecoration = ModelDecorationOptions.register({
|
||||
className: 'char-delete',
|
||||
description: 'char-delete',
|
||||
shouldFillLineOnLineBreak: true,
|
||||
});
|
||||
export const diffWholeLineDeleteDecoration = ModelDecorationOptions.register({
|
||||
className: 'char-delete',
|
||||
description: 'char-delete',
|
||||
isWholeLine: true,
|
||||
});
|
||||
export const diffDeleteDecorationEmpty = ModelDecorationOptions.register({
|
||||
className: 'char-delete diff-range-empty',
|
||||
description: 'char-delete diff-range-empty',
|
||||
});
|
||||
export const arrowRevertChange = ModelDecorationOptions.register({
|
||||
description: 'diff-editor-arrow-revert-change',
|
||||
glyphMarginHoverMessage: new MarkdownString(undefined, { isTrusted: true, supportThemeIcons: true }).appendMarkdown(localize('revertChangeHoverMessage', 'Click to revert change')),
|
||||
glyphMarginClassName: 'arrow-revert-change ' + ThemeIcon.asClassName(Codicon.arrowRight),
|
||||
zIndex: 10001,
|
||||
});
|
||||
108
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/delegatingEditorImpl.js
generated
vendored
Normal file
108
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/delegatingEditorImpl.js
generated
vendored
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { Emitter } from '../../../../base/common/event.js';
|
||||
import { Disposable } from '../../../../base/common/lifecycle.js';
|
||||
export class DelegatingEditor extends Disposable {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this._id = ++DelegatingEditor.idCounter;
|
||||
this._onDidDispose = this._register(new Emitter());
|
||||
this.onDidDispose = this._onDidDispose.event;
|
||||
// #endregion
|
||||
}
|
||||
getId() { return this.getEditorType() + ':v2:' + this._id; }
|
||||
// #region editorBrowser.IDiffEditor: Delegating to modified Editor
|
||||
getVisibleColumnFromPosition(position) {
|
||||
return this._targetEditor.getVisibleColumnFromPosition(position);
|
||||
}
|
||||
getPosition() {
|
||||
return this._targetEditor.getPosition();
|
||||
}
|
||||
setPosition(position, source = 'api') {
|
||||
this._targetEditor.setPosition(position, source);
|
||||
}
|
||||
revealLine(lineNumber, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealLine(lineNumber, scrollType);
|
||||
}
|
||||
revealLineInCenter(lineNumber, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealLineInCenter(lineNumber, scrollType);
|
||||
}
|
||||
revealLineInCenterIfOutsideViewport(lineNumber, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealLineInCenterIfOutsideViewport(lineNumber, scrollType);
|
||||
}
|
||||
revealLineNearTop(lineNumber, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealLineNearTop(lineNumber, scrollType);
|
||||
}
|
||||
revealPosition(position, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealPosition(position, scrollType);
|
||||
}
|
||||
revealPositionInCenter(position, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealPositionInCenter(position, scrollType);
|
||||
}
|
||||
revealPositionInCenterIfOutsideViewport(position, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealPositionInCenterIfOutsideViewport(position, scrollType);
|
||||
}
|
||||
revealPositionNearTop(position, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealPositionNearTop(position, scrollType);
|
||||
}
|
||||
getSelection() {
|
||||
return this._targetEditor.getSelection();
|
||||
}
|
||||
getSelections() {
|
||||
return this._targetEditor.getSelections();
|
||||
}
|
||||
setSelection(something, source = 'api') {
|
||||
this._targetEditor.setSelection(something, source);
|
||||
}
|
||||
setSelections(ranges, source = 'api') {
|
||||
this._targetEditor.setSelections(ranges, source);
|
||||
}
|
||||
revealLines(startLineNumber, endLineNumber, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealLines(startLineNumber, endLineNumber, scrollType);
|
||||
}
|
||||
revealLinesInCenter(startLineNumber, endLineNumber, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealLinesInCenter(startLineNumber, endLineNumber, scrollType);
|
||||
}
|
||||
revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealLinesInCenterIfOutsideViewport(startLineNumber, endLineNumber, scrollType);
|
||||
}
|
||||
revealLinesNearTop(startLineNumber, endLineNumber, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealLinesNearTop(startLineNumber, endLineNumber, scrollType);
|
||||
}
|
||||
revealRange(range, scrollType = 0 /* ScrollType.Smooth */, revealVerticalInCenter = false, revealHorizontal = true) {
|
||||
this._targetEditor.revealRange(range, scrollType, revealVerticalInCenter, revealHorizontal);
|
||||
}
|
||||
revealRangeInCenter(range, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealRangeInCenter(range, scrollType);
|
||||
}
|
||||
revealRangeInCenterIfOutsideViewport(range, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealRangeInCenterIfOutsideViewport(range, scrollType);
|
||||
}
|
||||
revealRangeNearTop(range, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealRangeNearTop(range, scrollType);
|
||||
}
|
||||
revealRangeNearTopIfOutsideViewport(range, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealRangeNearTopIfOutsideViewport(range, scrollType);
|
||||
}
|
||||
revealRangeAtTop(range, scrollType = 0 /* ScrollType.Smooth */) {
|
||||
this._targetEditor.revealRangeAtTop(range, scrollType);
|
||||
}
|
||||
getSupportedActions() {
|
||||
return this._targetEditor.getSupportedActions();
|
||||
}
|
||||
focus() {
|
||||
this._targetEditor.focus();
|
||||
}
|
||||
trigger(source, handlerId, payload) {
|
||||
this._targetEditor.trigger(source, handlerId, payload);
|
||||
}
|
||||
createDecorationsCollection(decorations) {
|
||||
return this._targetEditor.createDecorationsCollection(decorations);
|
||||
}
|
||||
changeDecorations(callback) {
|
||||
return this._targetEditor.changeDecorations(callback);
|
||||
}
|
||||
}
|
||||
DelegatingEditor.idCounter = 0;
|
||||
97
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorDecorations.js
generated
vendored
Normal file
97
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorDecorations.js
generated
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { Disposable } from '../../../../base/common/lifecycle.js';
|
||||
import { derived } from '../../../../base/common/observable.js';
|
||||
import { isDefined } from '../../../../base/common/types.js';
|
||||
import { arrowRevertChange, diffAddDecoration, diffAddDecorationEmpty, diffDeleteDecoration, diffDeleteDecorationEmpty, diffLineAddDecorationBackground, diffLineAddDecorationBackgroundWithIndicator, diffLineDeleteDecorationBackground, diffLineDeleteDecorationBackgroundWithIndicator } from './decorations.js';
|
||||
import { MovedBlocksLinesPart } from './movedBlocksLines.js';
|
||||
import { applyObservableDecorations } from './utils.js';
|
||||
import { LineRange } from '../../../common/core/lineRange.js';
|
||||
import { Position } from '../../../common/core/position.js';
|
||||
import { Range } from '../../../common/core/range.js';
|
||||
export class DiffEditorDecorations extends Disposable {
|
||||
constructor(_editors, _diffModel, _options) {
|
||||
super();
|
||||
this._editors = _editors;
|
||||
this._diffModel = _diffModel;
|
||||
this._options = _options;
|
||||
this._decorations = derived('decorations', (reader) => {
|
||||
var _a;
|
||||
const diff = (_a = this._diffModel.read(reader)) === null || _a === void 0 ? void 0 : _a.diff.read(reader);
|
||||
if (!diff) {
|
||||
return null;
|
||||
}
|
||||
const currentMove = this._diffModel.read(reader).syncedMovedTexts.read(reader);
|
||||
const renderIndicators = this._options.renderIndicators.read(reader);
|
||||
const showEmptyDecorations = this._options.showEmptyDecorations.read(reader);
|
||||
const originalDecorations = [];
|
||||
const modifiedDecorations = [];
|
||||
for (const m of diff.mappings) {
|
||||
const fullRangeOriginal = LineRange.subtract(m.lineRangeMapping.originalRange, currentMove === null || currentMove === void 0 ? void 0 : currentMove.lineRangeMapping.originalRange)
|
||||
.map(i => i.toInclusiveRange()).filter(isDefined);
|
||||
for (const range of fullRangeOriginal) {
|
||||
originalDecorations.push({ range, options: renderIndicators ? diffLineDeleteDecorationBackgroundWithIndicator : diffLineDeleteDecorationBackground });
|
||||
}
|
||||
const fullRangeModified = LineRange.subtract(m.lineRangeMapping.modifiedRange, currentMove === null || currentMove === void 0 ? void 0 : currentMove.lineRangeMapping.modifiedRange)
|
||||
.map(i => i.toInclusiveRange()).filter(isDefined);
|
||||
for (const range of fullRangeModified) {
|
||||
modifiedDecorations.push({ range, options: renderIndicators ? diffLineAddDecorationBackgroundWithIndicator : diffLineAddDecorationBackground });
|
||||
}
|
||||
for (const i of m.lineRangeMapping.innerChanges || []) {
|
||||
if (currentMove
|
||||
&& (currentMove.lineRangeMapping.originalRange.intersect(new LineRange(i.originalRange.startLineNumber, i.originalRange.endLineNumber))
|
||||
|| currentMove.lineRangeMapping.modifiedRange.intersect(new LineRange(i.modifiedRange.startLineNumber, i.modifiedRange.endLineNumber)))) {
|
||||
continue;
|
||||
}
|
||||
// Don't show empty markers outside the line range
|
||||
if (m.lineRangeMapping.originalRange.contains(i.originalRange.startLineNumber)) {
|
||||
originalDecorations.push({ range: i.originalRange, options: (i.originalRange.isEmpty() && showEmptyDecorations) ? diffDeleteDecorationEmpty : diffDeleteDecoration });
|
||||
}
|
||||
if (m.lineRangeMapping.modifiedRange.contains(i.modifiedRange.startLineNumber)) {
|
||||
modifiedDecorations.push({ range: i.modifiedRange, options: (i.modifiedRange.isEmpty() && showEmptyDecorations) ? diffAddDecorationEmpty : diffAddDecoration });
|
||||
}
|
||||
}
|
||||
if (!m.lineRangeMapping.modifiedRange.isEmpty && this._options.shouldRenderRevertArrows.read(reader) && !currentMove) {
|
||||
modifiedDecorations.push({ range: Range.fromPositions(new Position(m.lineRangeMapping.modifiedRange.startLineNumber, 1)), options: arrowRevertChange });
|
||||
}
|
||||
}
|
||||
if (currentMove) {
|
||||
for (const m of currentMove.changes) {
|
||||
const fullRangeOriginal = m.originalRange.toInclusiveRange();
|
||||
if (fullRangeOriginal) {
|
||||
originalDecorations.push({ range: fullRangeOriginal, options: renderIndicators ? diffLineDeleteDecorationBackgroundWithIndicator : diffLineDeleteDecorationBackground });
|
||||
}
|
||||
const fullRangeModified = m.modifiedRange.toInclusiveRange();
|
||||
if (fullRangeModified) {
|
||||
modifiedDecorations.push({ range: fullRangeModified, options: renderIndicators ? diffLineAddDecorationBackgroundWithIndicator : diffLineAddDecorationBackground });
|
||||
}
|
||||
for (const i of m.innerChanges || []) {
|
||||
originalDecorations.push({ range: i.originalRange, options: diffDeleteDecoration });
|
||||
modifiedDecorations.push({ range: i.modifiedRange, options: diffAddDecoration });
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const m of diff.movedTexts) {
|
||||
originalDecorations.push({
|
||||
range: m.lineRangeMapping.originalRange.toInclusiveRange(), options: {
|
||||
description: 'moved',
|
||||
blockClassName: 'movedOriginal',
|
||||
blockPadding: [MovedBlocksLinesPart.movedCodeBlockPadding, 0, MovedBlocksLinesPart.movedCodeBlockPadding, MovedBlocksLinesPart.movedCodeBlockPadding],
|
||||
}
|
||||
});
|
||||
modifiedDecorations.push({
|
||||
range: m.lineRangeMapping.modifiedRange.toInclusiveRange(), options: {
|
||||
description: 'moved',
|
||||
blockClassName: 'movedModified',
|
||||
blockPadding: [4, 0, 4, 4],
|
||||
}
|
||||
});
|
||||
}
|
||||
return { originalDecorations, modifiedDecorations };
|
||||
});
|
||||
this._register(applyObservableDecorations(this._editors.original, this._decorations.map(d => (d === null || d === void 0 ? void 0 : d.originalDecorations) || [])));
|
||||
this._register(applyObservableDecorations(this._editors.modified, this._decorations.map(d => (d === null || d === void 0 ? void 0 : d.modifiedDecorations) || [])));
|
||||
}
|
||||
}
|
||||
144
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors.js
generated
vendored
Normal file
144
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorEditors.js
generated
vendored
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { Emitter } from '../../../../base/common/event.js';
|
||||
import { Disposable } from '../../../../base/common/lifecycle.js';
|
||||
import { autorunHandleChanges } from '../../../../base/common/observableImpl/autorun.js';
|
||||
import { OverviewRulerPart } from './overviewRulerPart.js';
|
||||
import { EditorOptions } from '../../../common/config/editorOptions.js';
|
||||
import { localize } from '../../../../nls.js';
|
||||
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
||||
export let DiffEditorEditors = class DiffEditorEditors extends Disposable {
|
||||
constructor(originalEditorElement, modifiedEditorElement, _options, codeEditorWidgetOptions, _createInnerEditor, _modifiedReadOnlyOverride, _instantiationService) {
|
||||
super();
|
||||
this.originalEditorElement = originalEditorElement;
|
||||
this.modifiedEditorElement = modifiedEditorElement;
|
||||
this._options = _options;
|
||||
this._createInnerEditor = _createInnerEditor;
|
||||
this._modifiedReadOnlyOverride = _modifiedReadOnlyOverride;
|
||||
this._instantiationService = _instantiationService;
|
||||
this._onDidContentSizeChange = this._register(new Emitter());
|
||||
this.original = this._createLeftHandSideEditor(_options.editorOptions.get(), codeEditorWidgetOptions.originalEditor || {});
|
||||
this.modified = this._createRightHandSideEditor(_options.editorOptions.get(), codeEditorWidgetOptions.modifiedEditor || {});
|
||||
this._register(autorunHandleChanges('update editor options', {
|
||||
createEmptyChangeSummary: () => ({}),
|
||||
handleChange: (ctx, changeSummary) => {
|
||||
if (ctx.didChange(_options.editorOptions)) {
|
||||
Object.assign(changeSummary, ctx.change.changedOptions);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}, (reader, changeSummary) => {
|
||||
_options.editorOptions.read(reader);
|
||||
this.modified.updateOptions(this._adjustOptionsForRightHandSide(reader, changeSummary));
|
||||
this.original.updateOptions(this._adjustOptionsForLeftHandSide(reader, changeSummary));
|
||||
}));
|
||||
}
|
||||
_createLeftHandSideEditor(options, codeEditorWidgetOptions) {
|
||||
const leftHandSideOptions = this._adjustOptionsForLeftHandSide(undefined, options);
|
||||
const editor = this._constructInnerEditor(this._instantiationService, this.originalEditorElement, leftHandSideOptions, codeEditorWidgetOptions);
|
||||
editor.setContextValue('isInDiffLeftEditor', true);
|
||||
return editor;
|
||||
}
|
||||
_createRightHandSideEditor(options, codeEditorWidgetOptions) {
|
||||
const rightHandSideOptions = this._adjustOptionsForRightHandSide(undefined, options);
|
||||
const editor = this._constructInnerEditor(this._instantiationService, this.modifiedEditorElement, rightHandSideOptions, codeEditorWidgetOptions);
|
||||
editor.setContextValue('isInDiffRightEditor', true);
|
||||
return editor;
|
||||
}
|
||||
_constructInnerEditor(instantiationService, container, options, editorWidgetOptions) {
|
||||
const editor = this._createInnerEditor(instantiationService, container, options, editorWidgetOptions);
|
||||
this._register(editor.onDidContentSizeChange(e => {
|
||||
const width = this.original.getContentWidth() + this.modified.getContentWidth() + OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH;
|
||||
const height = Math.max(this.modified.getContentHeight(), this.original.getContentHeight());
|
||||
this._onDidContentSizeChange.fire({
|
||||
contentHeight: height,
|
||||
contentWidth: width,
|
||||
contentHeightChanged: e.contentHeightChanged,
|
||||
contentWidthChanged: e.contentWidthChanged
|
||||
});
|
||||
}));
|
||||
return editor;
|
||||
}
|
||||
_adjustOptionsForLeftHandSide(_reader, changedOptions) {
|
||||
const result = this._adjustOptionsForSubEditor(changedOptions);
|
||||
if (!this._options.renderSideBySide.get()) {
|
||||
// never wrap hidden editor
|
||||
result.wordWrapOverride1 = 'off';
|
||||
result.wordWrapOverride2 = 'off';
|
||||
result.stickyScroll = { enabled: false };
|
||||
}
|
||||
else {
|
||||
result.wordWrapOverride1 = this._options.diffWordWrap.get();
|
||||
}
|
||||
if (changedOptions.originalAriaLabel) {
|
||||
result.ariaLabel = changedOptions.originalAriaLabel;
|
||||
}
|
||||
result.ariaLabel = this._updateAriaLabel(result.ariaLabel);
|
||||
result.readOnly = !this._options.originalEditable.get();
|
||||
result.dropIntoEditor = { enabled: !result.readOnly };
|
||||
result.extraEditorClassName = 'original-in-monaco-diff-editor';
|
||||
return result;
|
||||
}
|
||||
_adjustOptionsForRightHandSide(reader, changedOptions) {
|
||||
const result = this._adjustOptionsForSubEditor(changedOptions);
|
||||
if (changedOptions.modifiedAriaLabel) {
|
||||
result.ariaLabel = changedOptions.modifiedAriaLabel;
|
||||
}
|
||||
result.ariaLabel = this._updateAriaLabel(result.ariaLabel);
|
||||
result.wordWrapOverride1 = this._options.diffWordWrap.get();
|
||||
result.revealHorizontalRightPadding = EditorOptions.revealHorizontalRightPadding.defaultValue + OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH;
|
||||
result.scrollbar.verticalHasArrows = false;
|
||||
result.extraEditorClassName = 'modified-in-monaco-diff-editor';
|
||||
result.readOnly = this._modifiedReadOnlyOverride.read(reader) || this._options.editorOptions.get().readOnly;
|
||||
return result;
|
||||
}
|
||||
_adjustOptionsForSubEditor(options) {
|
||||
const clonedOptions = Object.assign(Object.assign({}, options), { dimension: {
|
||||
height: 0,
|
||||
width: 0
|
||||
} });
|
||||
clonedOptions.inDiffEditor = true;
|
||||
clonedOptions.automaticLayout = false;
|
||||
// Clone scrollbar options before changing them
|
||||
clonedOptions.scrollbar = Object.assign({}, (clonedOptions.scrollbar || {}));
|
||||
clonedOptions.scrollbar.vertical = 'visible';
|
||||
clonedOptions.folding = false;
|
||||
clonedOptions.codeLens = this._options.diffCodeLens.get();
|
||||
clonedOptions.fixedOverflowWidgets = true;
|
||||
// clonedOptions.lineDecorationsWidth = '2ch';
|
||||
// Clone minimap options before changing them
|
||||
clonedOptions.minimap = Object.assign({}, (clonedOptions.minimap || {}));
|
||||
clonedOptions.minimap.enabled = false;
|
||||
if (this._options.collapseUnchangedRegions.get()) {
|
||||
clonedOptions.stickyScroll = { enabled: false };
|
||||
}
|
||||
else {
|
||||
clonedOptions.stickyScroll = this._options.editorOptions.get().stickyScroll;
|
||||
}
|
||||
return clonedOptions;
|
||||
}
|
||||
_updateAriaLabel(ariaLabel) {
|
||||
const ariaNavigationTip = localize('diff-aria-navigation-tip', ' use Shift + F7 to navigate changes');
|
||||
if (this._options.accessibilityVerbose.get()) {
|
||||
return ariaLabel + ariaNavigationTip;
|
||||
}
|
||||
else if (ariaLabel) {
|
||||
return ariaLabel.replaceAll(ariaNavigationTip, '');
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
DiffEditorEditors = __decorate([
|
||||
__param(6, IInstantiationService)
|
||||
], DiffEditorEditors);
|
||||
97
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorOptions.js
generated
vendored
Normal file
97
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorOptions.js
generated
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { derived, observableValue } from '../../../../base/common/observable.js';
|
||||
import { clampedFloat, clampedInt, boolean as validateBooleanOption, stringSet as validateStringSetOption } from '../../../common/config/editorOptions.js';
|
||||
export class DiffEditorOptions {
|
||||
get editorOptions() { return this._options; }
|
||||
constructor(options) {
|
||||
this.renderOverviewRuler = derived('renderOverviewRuler', reader => this._options.read(reader).renderOverviewRuler);
|
||||
this.renderSideBySide = derived('renderSideBySide', reader => this._options.read(reader).renderSideBySide);
|
||||
this.readOnly = derived('readOnly', reader => this._options.read(reader).readOnly);
|
||||
this.shouldRenderRevertArrows = derived('shouldRenderRevertArrows', (reader) => {
|
||||
if (!this._options.read(reader).renderMarginRevertIcon) {
|
||||
return false;
|
||||
}
|
||||
if (!this.renderSideBySide.read(reader)) {
|
||||
return false;
|
||||
}
|
||||
if (this.readOnly.read(reader)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
this.renderIndicators = derived('renderIndicators', reader => this._options.read(reader).renderIndicators);
|
||||
this.enableSplitViewResizing = derived('enableSplitViewResizing', reader => this._options.read(reader).enableSplitViewResizing);
|
||||
this.collapseUnchangedRegions = derived('hideUnchangedRegions', reader => this._options.read(reader).experimental.collapseUnchangedRegions);
|
||||
this.splitViewDefaultRatio = derived('splitViewDefaultRatio', reader => this._options.read(reader).splitViewDefaultRatio);
|
||||
this.ignoreTrimWhitespace = derived('ignoreTrimWhitespace', reader => this._options.read(reader).ignoreTrimWhitespace);
|
||||
this.maxComputationTimeMs = derived('maxComputationTime', reader => this._options.read(reader).maxComputationTime);
|
||||
this.showMoves = derived('showMoves', reader => {
|
||||
const o = this._options.read(reader);
|
||||
return o.experimental.showMoves && o.renderSideBySide;
|
||||
});
|
||||
this.isInEmbeddedEditor = derived('isInEmbeddedEditor', reader => this._options.read(reader).isInEmbeddedEditor);
|
||||
this.diffWordWrap = derived('diffWordWrap', reader => this._options.read(reader).diffWordWrap);
|
||||
this.originalEditable = derived('originalEditable', reader => this._options.read(reader).originalEditable);
|
||||
this.diffCodeLens = derived('diffCodeLens', reader => this._options.read(reader).diffCodeLens);
|
||||
this.accessibilityVerbose = derived('accessibilityVerbose', reader => this._options.read(reader).accessibilityVerbose);
|
||||
this.diffAlgorithm = derived('diffAlgorithm', reader => this._options.read(reader).diffAlgorithm);
|
||||
this.showEmptyDecorations = derived('showEmptyDecorations', reader => this._options.read(reader).experimental.showEmptyDecorations);
|
||||
const optionsCopy = Object.assign(Object.assign({}, options), validateDiffEditorOptions(options, diffEditorDefaultOptions));
|
||||
this._options = observableValue('options', optionsCopy);
|
||||
}
|
||||
updateOptions(changedOptions) {
|
||||
const newDiffEditorOptions = validateDiffEditorOptions(changedOptions, this._options.get());
|
||||
const newOptions = Object.assign(Object.assign(Object.assign({}, this._options.get()), changedOptions), newDiffEditorOptions);
|
||||
this._options.set(newOptions, undefined, { changedOptions: changedOptions });
|
||||
}
|
||||
}
|
||||
const diffEditorDefaultOptions = {
|
||||
enableSplitViewResizing: true,
|
||||
splitViewDefaultRatio: 0.5,
|
||||
renderSideBySide: true,
|
||||
renderMarginRevertIcon: true,
|
||||
maxComputationTime: 5000,
|
||||
maxFileSize: 50,
|
||||
ignoreTrimWhitespace: true,
|
||||
renderIndicators: true,
|
||||
originalEditable: false,
|
||||
diffCodeLens: false,
|
||||
renderOverviewRuler: true,
|
||||
diffWordWrap: 'inherit',
|
||||
diffAlgorithm: 'advanced',
|
||||
accessibilityVerbose: false,
|
||||
experimental: {
|
||||
collapseUnchangedRegions: false,
|
||||
showMoves: false,
|
||||
showEmptyDecorations: true,
|
||||
},
|
||||
isInEmbeddedEditor: false,
|
||||
};
|
||||
function validateDiffEditorOptions(options, defaults) {
|
||||
var _a, _b, _c;
|
||||
return {
|
||||
enableSplitViewResizing: validateBooleanOption(options.enableSplitViewResizing, defaults.enableSplitViewResizing),
|
||||
splitViewDefaultRatio: clampedFloat(options.splitViewDefaultRatio, 0.5, 0.1, 0.9),
|
||||
renderSideBySide: validateBooleanOption(options.renderSideBySide, defaults.renderSideBySide),
|
||||
renderMarginRevertIcon: validateBooleanOption(options.renderMarginRevertIcon, defaults.renderMarginRevertIcon),
|
||||
maxComputationTime: clampedInt(options.maxComputationTime, defaults.maxComputationTime, 0, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */),
|
||||
maxFileSize: clampedInt(options.maxFileSize, defaults.maxFileSize, 0, 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */),
|
||||
ignoreTrimWhitespace: validateBooleanOption(options.ignoreTrimWhitespace, defaults.ignoreTrimWhitespace),
|
||||
renderIndicators: validateBooleanOption(options.renderIndicators, defaults.renderIndicators),
|
||||
originalEditable: validateBooleanOption(options.originalEditable, defaults.originalEditable),
|
||||
diffCodeLens: validateBooleanOption(options.diffCodeLens, defaults.diffCodeLens),
|
||||
renderOverviewRuler: validateBooleanOption(options.renderOverviewRuler, defaults.renderOverviewRuler),
|
||||
diffWordWrap: validateStringSetOption(options.diffWordWrap, defaults.diffWordWrap, ['off', 'on', 'inherit']),
|
||||
diffAlgorithm: validateStringSetOption(options.diffAlgorithm, defaults.diffAlgorithm, ['legacy', 'advanced'], { 'smart': 'legacy', 'experimental': 'advanced' }),
|
||||
accessibilityVerbose: validateBooleanOption(options.accessibilityVerbose, defaults.accessibilityVerbose),
|
||||
experimental: {
|
||||
collapseUnchangedRegions: validateBooleanOption((_a = options.experimental) === null || _a === void 0 ? void 0 : _a.collapseUnchangedRegions, defaults.experimental.collapseUnchangedRegions),
|
||||
showMoves: validateBooleanOption((_b = options.experimental) === null || _b === void 0 ? void 0 : _b.showMoves, defaults.experimental.showMoves),
|
||||
showEmptyDecorations: validateBooleanOption((_c = options.experimental) === null || _c === void 0 ? void 0 : _c.showEmptyDecorations, defaults.experimental.showEmptyDecorations),
|
||||
},
|
||||
isInEmbeddedEditor: validateBooleanOption(options.isInEmbeddedEditor, defaults.isInEmbeddedEditor),
|
||||
};
|
||||
}
|
||||
62
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorSash.js
generated
vendored
Normal file
62
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorSash.js
generated
vendored
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { Sash } from '../../../../base/browser/ui/sash/sash.js';
|
||||
import { Disposable } from '../../../../base/common/lifecycle.js';
|
||||
import { autorun, derived, observableValue } from '../../../../base/common/observable.js';
|
||||
export class DiffEditorSash extends Disposable {
|
||||
constructor(_options, _domNode, _dimensions) {
|
||||
super();
|
||||
this._options = _options;
|
||||
this._domNode = _domNode;
|
||||
this._dimensions = _dimensions;
|
||||
this._sashRatio = observableValue('sashRatio', undefined);
|
||||
this.sashLeft = derived('sashLeft', reader => {
|
||||
var _a;
|
||||
const ratio = (_a = this._sashRatio.read(reader)) !== null && _a !== void 0 ? _a : this._options.splitViewDefaultRatio.read(reader);
|
||||
return this._computeSashLeft(ratio, reader);
|
||||
});
|
||||
this._sash = this._register(new Sash(this._domNode, {
|
||||
getVerticalSashTop: (_sash) => 0,
|
||||
getVerticalSashLeft: (_sash) => this.sashLeft.get(),
|
||||
getVerticalSashHeight: (_sash) => this._dimensions.height.get(),
|
||||
}, { orientation: 0 /* Orientation.VERTICAL */ }));
|
||||
this._startSashPosition = undefined;
|
||||
this._register(this._sash.onDidStart(() => {
|
||||
this._startSashPosition = this.sashLeft.get();
|
||||
}));
|
||||
this._register(this._sash.onDidChange((e) => {
|
||||
const contentWidth = this._dimensions.width.get();
|
||||
const sashPosition = this._computeSashLeft((this._startSashPosition + (e.currentX - e.startX)) / contentWidth, undefined);
|
||||
this._sashRatio.set(sashPosition / contentWidth, undefined);
|
||||
}));
|
||||
this._register(this._sash.onDidEnd(() => this._sash.layout()));
|
||||
this._register(this._sash.onDidReset(() => this._sashRatio.set(undefined, undefined)));
|
||||
this._register(autorun('update sash layout', (reader) => {
|
||||
const enabled = this._options.enableSplitViewResizing.read(reader);
|
||||
this._sash.state = enabled ? 3 /* SashState.Enabled */ : 0 /* SashState.Disabled */;
|
||||
this.sashLeft.read(reader);
|
||||
this._sash.layout();
|
||||
}));
|
||||
}
|
||||
setBoundarySashes(sashes) {
|
||||
this._sash.orthogonalEndSash = sashes.bottom;
|
||||
}
|
||||
_computeSashLeft(desiredRatio, reader) {
|
||||
const contentWidth = this._dimensions.width.read(reader);
|
||||
const midPoint = Math.floor(this._options.splitViewDefaultRatio.read(reader) * contentWidth);
|
||||
const sashLeft = this._options.enableSplitViewResizing.read(reader) ? Math.floor(desiredRatio * contentWidth) : midPoint;
|
||||
const MINIMUM_EDITOR_WIDTH = 100;
|
||||
if (contentWidth <= MINIMUM_EDITOR_WIDTH * 2) {
|
||||
return midPoint;
|
||||
}
|
||||
if (sashLeft < MINIMUM_EDITOR_WIDTH) {
|
||||
return MINIMUM_EDITOR_WIDTH;
|
||||
}
|
||||
if (sashLeft > contentWidth - MINIMUM_EDITOR_WIDTH) {
|
||||
return contentWidth - MINIMUM_EDITOR_WIDTH;
|
||||
}
|
||||
return sashLeft;
|
||||
}
|
||||
}
|
||||
409
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorViewModel.js
generated
vendored
Normal file
409
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorViewModel.js
generated
vendored
Normal file
|
|
@ -0,0 +1,409 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
import { RunOnceScheduler } from '../../../../base/common/async.js';
|
||||
import { Disposable } from '../../../../base/common/lifecycle.js';
|
||||
import { derived, observableSignal, observableSignalFromEvent, observableValue, transaction, waitForState } from '../../../../base/common/observable.js';
|
||||
import { autorunWithStore2 } from '../../../../base/common/observableImpl/autorun.js';
|
||||
import { isDefined } from '../../../../base/common/types.js';
|
||||
import { LineRange } from '../../../common/core/lineRange.js';
|
||||
import { Range } from '../../../common/core/range.js';
|
||||
import { LineRangeMapping, MovedText, RangeMapping, SimpleLineRangeMapping } from '../../../common/diff/linesDiffComputer.js';
|
||||
import { lineRangeMappingFromRangeMappings } from '../../../common/diff/standardLinesDiffComputer.js';
|
||||
import { TextEditInfo } from '../../../common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper.js';
|
||||
import { combineTextEditInfos } from '../../../common/model/bracketPairsTextModelPart/bracketPairsTree/combineTextEditInfos.js';
|
||||
import { lengthAdd, lengthDiffNonNegative, lengthGetLineCount, lengthOfRange, lengthToPosition, lengthZero, positionToLength } from '../../../common/model/bracketPairsTextModelPart/bracketPairsTree/length.js';
|
||||
export class DiffEditorViewModel extends Disposable {
|
||||
constructor(model, _options, documentDiffProvider) {
|
||||
super();
|
||||
this.model = model;
|
||||
this._options = _options;
|
||||
this._isDiffUpToDate = observableValue('isDiffUpToDate', false);
|
||||
this.isDiffUpToDate = this._isDiffUpToDate;
|
||||
this._diff = observableValue('diff', undefined);
|
||||
this.diff = this._diff;
|
||||
this._unchangedRegions = observableValue('unchangedRegion', { regions: [], originalDecorationIds: [], modifiedDecorationIds: [] });
|
||||
this.unchangedRegions = derived('unchangedRegions', r => {
|
||||
if (this._options.collapseUnchangedRegions.read(r)) {
|
||||
return this._unchangedRegions.read(r).regions;
|
||||
}
|
||||
else {
|
||||
// Reset state
|
||||
transaction(tx => {
|
||||
for (const r of this._unchangedRegions.get().regions) {
|
||||
r.setState(0, 0, tx);
|
||||
}
|
||||
});
|
||||
return [];
|
||||
}
|
||||
});
|
||||
this.syncedMovedTexts = observableValue('syncedMovedText', undefined);
|
||||
const contentChangedSignal = observableSignal('contentChangedSignal');
|
||||
const debouncer = this._register(new RunOnceScheduler(() => contentChangedSignal.trigger(undefined), 200));
|
||||
this._register(model.modified.onDidChangeContent((e) => {
|
||||
const diff = this._diff.get();
|
||||
if (!diff) {
|
||||
return;
|
||||
}
|
||||
const textEdits = TextEditInfo.fromModelContentChanges(e.changes);
|
||||
const result = applyModifiedEdits(this._lastDiff, textEdits, model.original, model.modified);
|
||||
if (result) {
|
||||
this._lastDiff = result;
|
||||
this._diff.set(DiffState.fromDiffResult(this._lastDiff), undefined);
|
||||
const currentSyncedMovedText = this.syncedMovedTexts.get();
|
||||
this.syncedMovedTexts.set(currentSyncedMovedText ? this._lastDiff.moves.find(m => m.lineRangeMapping.modifiedRange.intersect(currentSyncedMovedText.lineRangeMapping.modifiedRange)) : undefined, undefined);
|
||||
}
|
||||
debouncer.schedule();
|
||||
}));
|
||||
this._register(model.original.onDidChangeContent((e) => {
|
||||
const diff = this._diff.get();
|
||||
if (!diff) {
|
||||
return;
|
||||
}
|
||||
const textEdits = TextEditInfo.fromModelContentChanges(e.changes);
|
||||
const result = applyOriginalEdits(this._lastDiff, textEdits, model.original, model.modified);
|
||||
if (result) {
|
||||
this._lastDiff = result;
|
||||
this._diff.set(DiffState.fromDiffResult(this._lastDiff), undefined);
|
||||
const currentSyncedMovedText = this.syncedMovedTexts.get();
|
||||
this.syncedMovedTexts.set(currentSyncedMovedText ? this._lastDiff.moves.find(m => m.lineRangeMapping.modifiedRange.intersect(currentSyncedMovedText.lineRangeMapping.modifiedRange)) : undefined, undefined);
|
||||
}
|
||||
debouncer.schedule();
|
||||
}));
|
||||
const documentDiffProviderOptionChanged = observableSignalFromEvent('documentDiffProviderOptionChanged', documentDiffProvider.onDidChange);
|
||||
this._register(autorunWithStore2('compute diff', (reader, store) => __awaiter(this, void 0, void 0, function* () {
|
||||
var _a, _b;
|
||||
debouncer.cancel();
|
||||
contentChangedSignal.read(reader);
|
||||
documentDiffProviderOptionChanged.read(reader);
|
||||
this._isDiffUpToDate.set(false, undefined);
|
||||
let originalTextEditInfos = [];
|
||||
store.add(model.original.onDidChangeContent((e) => {
|
||||
const edits = TextEditInfo.fromModelContentChanges(e.changes);
|
||||
originalTextEditInfos = combineTextEditInfos(originalTextEditInfos, edits);
|
||||
}));
|
||||
let modifiedTextEditInfos = [];
|
||||
store.add(model.modified.onDidChangeContent((e) => {
|
||||
const edits = TextEditInfo.fromModelContentChanges(e.changes);
|
||||
modifiedTextEditInfos = combineTextEditInfos(modifiedTextEditInfos, edits);
|
||||
}));
|
||||
let result = yield documentDiffProvider.computeDiff(model.original, model.modified, {
|
||||
ignoreTrimWhitespace: this._options.ignoreTrimWhitespace.read(reader),
|
||||
maxComputationTimeMs: this._options.maxComputationTimeMs.read(reader),
|
||||
computeMoves: this._options.showMoves.read(reader),
|
||||
});
|
||||
result = (_a = applyOriginalEdits(result, originalTextEditInfos, model.original, model.modified)) !== null && _a !== void 0 ? _a : result;
|
||||
result = (_b = applyModifiedEdits(result, modifiedTextEditInfos, model.original, model.modified)) !== null && _b !== void 0 ? _b : result;
|
||||
const newUnchangedRegions = UnchangedRegion.fromDiffs(result.changes, model.original.getLineCount(), model.modified.getLineCount());
|
||||
// Transfer state from cur state
|
||||
const lastUnchangedRegions = this._unchangedRegions.get();
|
||||
const lastUnchangedRegionsOrigRanges = lastUnchangedRegions.originalDecorationIds
|
||||
.map(id => model.original.getDecorationRange(id))
|
||||
.filter(r => !!r)
|
||||
.map(r => LineRange.fromRange(r));
|
||||
const lastUnchangedRegionsModRanges = lastUnchangedRegions.modifiedDecorationIds
|
||||
.map(id => model.modified.getDecorationRange(id))
|
||||
.filter(r => !!r)
|
||||
.map(r => LineRange.fromRange(r));
|
||||
const originalDecorationIds = model.original.deltaDecorations(lastUnchangedRegions.originalDecorationIds, newUnchangedRegions.map(r => ({ range: r.originalRange.toInclusiveRange(), options: { description: 'unchanged' } })));
|
||||
const modifiedDecorationIds = model.modified.deltaDecorations(lastUnchangedRegions.modifiedDecorationIds, newUnchangedRegions.map(r => ({ range: r.modifiedRange.toInclusiveRange(), options: { description: 'unchanged' } })));
|
||||
transaction(tx => {
|
||||
for (const r of newUnchangedRegions) {
|
||||
for (let i = 0; i < lastUnchangedRegions.regions.length; i++) {
|
||||
if (r.originalRange.intersectsStrict(lastUnchangedRegionsOrigRanges[i])
|
||||
&& r.modifiedRange.intersectsStrict(lastUnchangedRegionsModRanges[i])) {
|
||||
r.setHiddenModifiedRange(lastUnchangedRegions.regions[i].getHiddenModifiedRange(undefined), tx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
this._lastDiff = result;
|
||||
const state = DiffState.fromDiffResult(result);
|
||||
this._diff.set(state, tx);
|
||||
this._isDiffUpToDate.set(true, tx);
|
||||
const currentSyncedMovedText = this.syncedMovedTexts.get();
|
||||
this.syncedMovedTexts.set(currentSyncedMovedText ? this._lastDiff.moves.find(m => m.lineRangeMapping.modifiedRange.intersect(currentSyncedMovedText.lineRangeMapping.modifiedRange)) : undefined, tx);
|
||||
this._unchangedRegions.set({
|
||||
regions: newUnchangedRegions,
|
||||
originalDecorationIds,
|
||||
modifiedDecorationIds
|
||||
}, tx);
|
||||
});
|
||||
})));
|
||||
}
|
||||
ensureModifiedLineIsVisible(lineNumber, tx) {
|
||||
var _a;
|
||||
if (((_a = this.diff.get()) === null || _a === void 0 ? void 0 : _a.mappings.length) === 0) {
|
||||
return;
|
||||
}
|
||||
const unchangedRegions = this._unchangedRegions.get().regions;
|
||||
for (const r of unchangedRegions) {
|
||||
if (r.getHiddenModifiedRange(undefined).contains(lineNumber)) {
|
||||
r.showAll(tx); // TODO only unhide what is needed
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
ensureOriginalLineIsVisible(lineNumber, tx) {
|
||||
var _a;
|
||||
if (((_a = this.diff.get()) === null || _a === void 0 ? void 0 : _a.mappings.length) === 0) {
|
||||
return;
|
||||
}
|
||||
const unchangedRegions = this._unchangedRegions.get().regions;
|
||||
for (const r of unchangedRegions) {
|
||||
if (r.getHiddenOriginalRange(undefined).contains(lineNumber)) {
|
||||
r.showAll(tx); // TODO only unhide what is needed
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
waitForDiff() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield waitForState(this.isDiffUpToDate, s => s);
|
||||
});
|
||||
}
|
||||
serializeState() {
|
||||
const regions = this._unchangedRegions.get();
|
||||
return {
|
||||
collapsedRegions: regions.regions.map(r => ({ range: r.getHiddenModifiedRange(undefined).serialize() }))
|
||||
};
|
||||
}
|
||||
restoreSerializedState(state) {
|
||||
const ranges = state.collapsedRegions.map(r => LineRange.deserialize(r.range));
|
||||
const regions = this._unchangedRegions.get();
|
||||
transaction(tx => {
|
||||
for (const r of regions.regions) {
|
||||
for (const range of ranges) {
|
||||
if (r.modifiedRange.intersect(range)) {
|
||||
r.setHiddenModifiedRange(range, tx);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
export class DiffState {
|
||||
static fromDiffResult(result) {
|
||||
return new DiffState(result.changes.map(c => new DiffMapping(c)), result.moves || [], result.identical, result.quitEarly);
|
||||
}
|
||||
constructor(mappings, movedTexts, identical, quitEarly) {
|
||||
this.mappings = mappings;
|
||||
this.movedTexts = movedTexts;
|
||||
this.identical = identical;
|
||||
this.quitEarly = quitEarly;
|
||||
}
|
||||
}
|
||||
export class DiffMapping {
|
||||
constructor(lineRangeMapping) {
|
||||
this.lineRangeMapping = lineRangeMapping;
|
||||
/*
|
||||
readonly movedTo: MovedText | undefined,
|
||||
readonly movedFrom: MovedText | undefined,
|
||||
|
||||
if (movedTo) {
|
||||
assertFn(() =>
|
||||
movedTo.lineRangeMapping.modifiedRange.equals(lineRangeMapping.modifiedRange)
|
||||
&& lineRangeMapping.originalRange.isEmpty
|
||||
&& !movedFrom
|
||||
);
|
||||
} else if (movedFrom) {
|
||||
assertFn(() =>
|
||||
movedFrom.lineRangeMapping.originalRange.equals(lineRangeMapping.originalRange)
|
||||
&& lineRangeMapping.modifiedRange.isEmpty
|
||||
&& !movedTo
|
||||
);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
export class UnchangedRegion {
|
||||
static fromDiffs(changes, originalLineCount, modifiedLineCount) {
|
||||
const inversedMappings = LineRangeMapping.inverse(changes, originalLineCount, modifiedLineCount);
|
||||
const result = [];
|
||||
const minHiddenLineCount = 3;
|
||||
const minContext = 3;
|
||||
for (const mapping of inversedMappings) {
|
||||
let origStart = mapping.originalRange.startLineNumber;
|
||||
let modStart = mapping.modifiedRange.startLineNumber;
|
||||
let length = mapping.originalRange.length;
|
||||
const atStart = origStart === 1 && modStart === 1;
|
||||
const atEnd = origStart + length === originalLineCount + 1 && modStart + length === modifiedLineCount + 1;
|
||||
if ((atStart || atEnd) && length > minContext + minHiddenLineCount) {
|
||||
if (atStart && !atEnd) {
|
||||
length -= minContext;
|
||||
}
|
||||
if (atEnd && !atStart) {
|
||||
origStart += minContext;
|
||||
modStart += minContext;
|
||||
length -= minContext;
|
||||
}
|
||||
result.push(new UnchangedRegion(origStart, modStart, length, 0, 0));
|
||||
}
|
||||
else if (length > minContext * 2 + minHiddenLineCount) {
|
||||
origStart += minContext;
|
||||
modStart += minContext;
|
||||
length -= minContext * 2;
|
||||
result.push(new UnchangedRegion(origStart, modStart, length, 0, 0));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
get originalRange() {
|
||||
return LineRange.ofLength(this.originalLineNumber, this.lineCount);
|
||||
}
|
||||
get modifiedRange() {
|
||||
return LineRange.ofLength(this.modifiedLineNumber, this.lineCount);
|
||||
}
|
||||
constructor(originalLineNumber, modifiedLineNumber, lineCount, visibleLineCountTop, visibleLineCountBottom) {
|
||||
this.originalLineNumber = originalLineNumber;
|
||||
this.modifiedLineNumber = modifiedLineNumber;
|
||||
this.lineCount = lineCount;
|
||||
this._visibleLineCountTop = observableValue('visibleLineCountTop', 0);
|
||||
this.visibleLineCountTop = this._visibleLineCountTop;
|
||||
this._visibleLineCountBottom = observableValue('visibleLineCountBottom', 0);
|
||||
this.visibleLineCountBottom = this._visibleLineCountBottom;
|
||||
this._shouldHideControls = derived('isVisible', reader => this.visibleLineCountTop.read(reader) + this.visibleLineCountBottom.read(reader) === this.lineCount && !this.isDragged.read(reader));
|
||||
this.isDragged = observableValue('isDragged', false);
|
||||
this._visibleLineCountTop.set(visibleLineCountTop, undefined);
|
||||
this._visibleLineCountBottom.set(visibleLineCountBottom, undefined);
|
||||
}
|
||||
shouldHideControls(reader) {
|
||||
return this._shouldHideControls.read(reader);
|
||||
}
|
||||
getHiddenOriginalRange(reader) {
|
||||
return LineRange.ofLength(this.originalLineNumber + this._visibleLineCountTop.read(reader), this.lineCount - this._visibleLineCountTop.read(reader) - this._visibleLineCountBottom.read(reader));
|
||||
}
|
||||
getHiddenModifiedRange(reader) {
|
||||
return LineRange.ofLength(this.modifiedLineNumber + this._visibleLineCountTop.read(reader), this.lineCount - this._visibleLineCountTop.read(reader) - this._visibleLineCountBottom.read(reader));
|
||||
}
|
||||
setHiddenModifiedRange(range, tx) {
|
||||
const visibleLineCountTop = range.startLineNumber - this.modifiedLineNumber;
|
||||
const visibleLineCountBottom = (this.modifiedLineNumber + this.lineCount) - range.endLineNumberExclusive;
|
||||
this.setState(visibleLineCountTop, visibleLineCountBottom, tx);
|
||||
}
|
||||
getMaxVisibleLineCountTop() {
|
||||
return this.lineCount - this._visibleLineCountBottom.get();
|
||||
}
|
||||
getMaxVisibleLineCountBottom() {
|
||||
return this.lineCount - this._visibleLineCountTop.get();
|
||||
}
|
||||
showMoreAbove(count = 10, tx) {
|
||||
const maxVisibleLineCountTop = this.getMaxVisibleLineCountTop();
|
||||
this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get() + count, maxVisibleLineCountTop), tx);
|
||||
}
|
||||
showMoreBelow(count = 10, tx) {
|
||||
const maxVisibleLineCountBottom = this.lineCount - this._visibleLineCountTop.get();
|
||||
this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get() + count, maxVisibleLineCountBottom), tx);
|
||||
}
|
||||
showAll(tx) {
|
||||
this._visibleLineCountBottom.set(this.lineCount - this._visibleLineCountTop.get(), tx);
|
||||
}
|
||||
setState(visibleLineCountTop, visibleLineCountBottom, tx) {
|
||||
visibleLineCountTop = Math.max(Math.min(visibleLineCountTop, this.lineCount), 0);
|
||||
visibleLineCountBottom = Math.max(Math.min(visibleLineCountBottom, this.lineCount - visibleLineCountTop), 0);
|
||||
this._visibleLineCountTop.set(visibleLineCountTop, tx);
|
||||
this._visibleLineCountBottom.set(visibleLineCountBottom, tx);
|
||||
}
|
||||
}
|
||||
function applyOriginalEdits(diff, textEdits, originalTextModel, modifiedTextModel) {
|
||||
if (textEdits.length === 0) {
|
||||
return diff;
|
||||
}
|
||||
const diff2 = flip(diff);
|
||||
const diff3 = applyModifiedEdits(diff2, textEdits, modifiedTextModel, originalTextModel);
|
||||
if (!diff3) {
|
||||
return undefined;
|
||||
}
|
||||
return flip(diff3);
|
||||
}
|
||||
function flip(diff) {
|
||||
return {
|
||||
changes: diff.changes.map(c => c.flip()),
|
||||
moves: diff.moves.map(m => m.flip()),
|
||||
identical: diff.identical,
|
||||
quitEarly: diff.quitEarly,
|
||||
};
|
||||
}
|
||||
function applyModifiedEdits(diff, textEdits, originalTextModel, modifiedTextModel) {
|
||||
if (textEdits.length === 0) {
|
||||
return diff;
|
||||
}
|
||||
if (diff.changes.some(c => !c.innerChanges) || diff.moves.length > 0) {
|
||||
// TODO support these cases
|
||||
return undefined;
|
||||
}
|
||||
const changes = applyModifiedEditsToLineRangeMappings(diff.changes, textEdits, originalTextModel, modifiedTextModel);
|
||||
const moves = diff.moves.map(m => {
|
||||
const newModifiedRange = applyEditToLineRange(m.lineRangeMapping.modifiedRange, textEdits);
|
||||
return newModifiedRange ? new MovedText(new SimpleLineRangeMapping(m.lineRangeMapping.originalRange, newModifiedRange), applyModifiedEditsToLineRangeMappings(m.changes, textEdits, originalTextModel, modifiedTextModel)) : undefined;
|
||||
}).filter(isDefined);
|
||||
return {
|
||||
identical: false,
|
||||
quitEarly: false,
|
||||
changes,
|
||||
moves,
|
||||
};
|
||||
}
|
||||
function applyEditToLineRange(range, textEdits) {
|
||||
let rangeStartLineNumber = range.startLineNumber;
|
||||
let rangeEndLineNumberEx = range.endLineNumberExclusive;
|
||||
for (let i = textEdits.length - 1; i >= 0; i--) {
|
||||
const textEdit = textEdits[i];
|
||||
const textEditStartLineNumber = lengthGetLineCount(textEdit.startOffset) + 1;
|
||||
const textEditEndLineNumber = lengthGetLineCount(textEdit.endOffset) + 1;
|
||||
const newLengthLineCount = lengthGetLineCount(textEdit.newLength);
|
||||
const delta = newLengthLineCount - (textEditEndLineNumber - textEditStartLineNumber);
|
||||
if (textEditEndLineNumber < rangeStartLineNumber) {
|
||||
// the text edit is before us
|
||||
rangeStartLineNumber += delta;
|
||||
rangeEndLineNumberEx += delta;
|
||||
}
|
||||
else if (textEditStartLineNumber > rangeEndLineNumberEx) {
|
||||
// the text edit is after us
|
||||
// NOOP
|
||||
}
|
||||
else if (textEditStartLineNumber < rangeStartLineNumber && rangeEndLineNumberEx < textEditEndLineNumber) {
|
||||
// the range is fully contained in the text edit
|
||||
return undefined;
|
||||
}
|
||||
else if (textEditStartLineNumber < rangeStartLineNumber && textEditEndLineNumber <= rangeEndLineNumberEx) {
|
||||
// the text edit ends inside our range
|
||||
rangeStartLineNumber = textEditEndLineNumber + 1;
|
||||
rangeStartLineNumber += delta;
|
||||
rangeEndLineNumberEx += delta;
|
||||
}
|
||||
else if (rangeStartLineNumber <= textEditStartLineNumber && textEditEndLineNumber < rangeStartLineNumber) {
|
||||
// the text edit starts inside our range
|
||||
rangeEndLineNumberEx = textEditStartLineNumber;
|
||||
}
|
||||
else {
|
||||
rangeEndLineNumberEx += delta;
|
||||
}
|
||||
}
|
||||
return new LineRange(rangeStartLineNumber, rangeEndLineNumberEx);
|
||||
}
|
||||
function applyModifiedEditsToLineRangeMappings(changes, textEdits, originalTextModel, modifiedTextModel) {
|
||||
const diffTextEdits = changes.flatMap(c => c.innerChanges.map(c => new TextEditInfo(positionToLength(c.originalRange.getStartPosition()), positionToLength(c.originalRange.getEndPosition()), lengthOfRange(c.modifiedRange).toLength())));
|
||||
const combined = combineTextEditInfos(diffTextEdits, textEdits);
|
||||
let lastOriginalEndOffset = lengthZero;
|
||||
let lastModifiedEndOffset = lengthZero;
|
||||
const rangeMappings = combined.map(c => {
|
||||
const modifiedStartOffset = lengthAdd(lastModifiedEndOffset, lengthDiffNonNegative(lastOriginalEndOffset, c.startOffset));
|
||||
lastOriginalEndOffset = c.endOffset;
|
||||
lastModifiedEndOffset = lengthAdd(modifiedStartOffset, c.newLength);
|
||||
return new RangeMapping(Range.fromPositions(lengthToPosition(c.startOffset), lengthToPosition(c.endOffset)), Range.fromPositions(lengthToPosition(modifiedStartOffset), lengthToPosition(lastModifiedEndOffset)));
|
||||
});
|
||||
const newChanges = lineRangeMappingFromRangeMappings(rangeMappings, originalTextModel.getLinesContent(), modifiedTextModel.getLinesContent());
|
||||
return newChanges;
|
||||
}
|
||||
330
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.js
generated
vendored
Normal file
330
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/diffEditorWidget2.js
generated
vendored
Normal file
|
|
@ -0,0 +1,330 @@
|
|||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { $, h } from '../../../../base/browser/dom.js';
|
||||
import { onUnexpectedError } from '../../../../base/common/errors.js';
|
||||
import { Event } from '../../../../base/common/event.js';
|
||||
import { autorun, derived, keepAlive, observableValue } from '../../../../base/common/observable.js';
|
||||
import { autorunWithStore2 } from '../../../../base/common/observableImpl/autorun.js';
|
||||
import { disposableObservableValue, transaction } from '../../../../base/common/observableImpl/base.js';
|
||||
import { derivedWithStore } from '../../../../base/common/observableImpl/derived.js';
|
||||
import './style.css';
|
||||
import { EditorExtensionsRegistry } from '../../editorExtensions.js';
|
||||
import { ICodeEditorService } from '../../services/codeEditorService.js';
|
||||
import { CodeEditorWidget } from '../codeEditorWidget.js';
|
||||
import { DiffEditorDecorations } from './diffEditorDecorations.js';
|
||||
import { DiffEditorSash } from './diffEditorSash.js';
|
||||
import { DiffReview2 } from './diffReview.js';
|
||||
import { ViewZoneManager } from './lineAlignment.js';
|
||||
import { MovedBlocksLinesPart } from './movedBlocksLines.js';
|
||||
import { OverviewRulerPart } from './overviewRulerPart.js';
|
||||
import { UnchangedRangesFeature } from './unchangedRanges.js';
|
||||
import { ObservableElementSizeObserver, applyStyle, readHotReloadableExport } from './utils.js';
|
||||
import { WorkerBasedDocumentDiffProvider } from '../workerBasedDocumentDiffProvider.js';
|
||||
import { EditorType } from '../../../common/editorCommon.js';
|
||||
import { EditorContextKeys } from '../../../common/editorContextKeys.js';
|
||||
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';
|
||||
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
||||
import { ServiceCollection } from '../../../../platform/instantiation/common/serviceCollection.js';
|
||||
import { DelegatingEditor } from './delegatingEditorImpl.js';
|
||||
import { DiffEditorEditors } from './diffEditorEditors.js';
|
||||
import { DiffEditorOptions } from './diffEditorOptions.js';
|
||||
import { DiffEditorViewModel } from './diffEditorViewModel.js';
|
||||
export let DiffEditorWidget2 = class DiffEditorWidget2 extends DelegatingEditor {
|
||||
constructor(_domElement, options, codeEditorWidgetOptions, _parentContextKeyService, _parentInstantiationService, codeEditorService) {
|
||||
var _a;
|
||||
super();
|
||||
this._domElement = _domElement;
|
||||
this._parentContextKeyService = _parentContextKeyService;
|
||||
this._parentInstantiationService = _parentInstantiationService;
|
||||
this.elements = h('div.monaco-diff-editor.side-by-side', { style: { position: 'relative', height: '100%' } }, [
|
||||
h('div.noModificationsOverlay@overlay', { style: { position: 'absolute', height: '100%', visibility: 'hidden', } }, [$('span', {}, 'No Changes')]),
|
||||
h('div.editor.original@original', { style: { position: 'absolute', height: '100%' } }),
|
||||
h('div.editor.modified@modified', { style: { position: 'absolute', height: '100%' } }),
|
||||
]);
|
||||
this._diffModel = this._register(disposableObservableValue('diffModel', undefined));
|
||||
this.onDidChangeModel = Event.fromObservableLight(this._diffModel);
|
||||
this._contextKeyService = this._register(this._parentContextKeyService.createScoped(this._domElement));
|
||||
this._instantiationService = this._parentInstantiationService.createChild(new ServiceCollection([IContextKeyService, this._contextKeyService]));
|
||||
this._boundarySashes = observableValue('boundarySashes', undefined);
|
||||
this._layoutInfo = derived('modifiedEditorLayoutInfo', (reader) => {
|
||||
var _a;
|
||||
const width = this._rootSizeObserver.width.read(reader);
|
||||
const height = this._rootSizeObserver.height.read(reader);
|
||||
const sashLeft = (_a = this._sash.read(reader)) === null || _a === void 0 ? void 0 : _a.sashLeft.read(reader);
|
||||
const originalWidth = sashLeft !== null && sashLeft !== void 0 ? sashLeft : Math.max(5, this._editors.original.getLayoutInfo().decorationsLeft);
|
||||
this.elements.original.style.width = originalWidth + 'px';
|
||||
this.elements.original.style.left = '0px';
|
||||
this.elements.modified.style.width = (width - originalWidth) + 'px';
|
||||
this.elements.modified.style.left = originalWidth + 'px';
|
||||
this._editors.original.layout({ width: originalWidth, height: height });
|
||||
this._editors.modified.layout({
|
||||
width: width - originalWidth -
|
||||
(this._options.renderOverviewRuler.read(reader) ? OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH : 0),
|
||||
height
|
||||
});
|
||||
this._reviewPane.layout(0, width, height);
|
||||
return {
|
||||
modifiedEditor: this._editors.modified.getLayoutInfo(),
|
||||
originalEditor: this._editors.original.getLayoutInfo(),
|
||||
};
|
||||
});
|
||||
this._diffValue = this._diffModel.map((m, r) => m === null || m === void 0 ? void 0 : m.diff.read(r));
|
||||
this.onDidUpdateDiff = Event.fromObservableLight(this._diffValue);
|
||||
codeEditorService.willCreateDiffEditor();
|
||||
this._contextKeyService.createKey('isInDiffEditor', true);
|
||||
this._contextKeyService.createKey('diffEditorVersion', 2);
|
||||
this._options = new DiffEditorOptions(options);
|
||||
this._contextKeyService.createKey(EditorContextKeys.isEmbeddedDiffEditor.key, false);
|
||||
const isEmbeddedDiffEditorKey = EditorContextKeys.isEmbeddedDiffEditor.bindTo(this._contextKeyService);
|
||||
this._register(autorun('update isEmbeddedDiffEditorKey', reader => {
|
||||
isEmbeddedDiffEditorKey.set(this._options.isInEmbeddedEditor.read(reader));
|
||||
}));
|
||||
this._domElement.appendChild(this.elements.root);
|
||||
this._rootSizeObserver = this._register(new ObservableElementSizeObserver(this.elements.root, options.dimension));
|
||||
this._rootSizeObserver.setAutomaticLayout((_a = options.automaticLayout) !== null && _a !== void 0 ? _a : false);
|
||||
const reviewPaneObservable = observableValue('reviewPane', undefined);
|
||||
this._editors = this._register(this._instantiationService.createInstance(DiffEditorEditors, this.elements.original, this.elements.modified, this._options, codeEditorWidgetOptions, (i, c, o, o2) => this._createInnerEditor(i, c, o, o2), reviewPaneObservable.map((r, reader) => { var _a; return (_a = r === null || r === void 0 ? void 0 : r.isVisible.read(reader)) !== null && _a !== void 0 ? _a : false; })));
|
||||
this._sash = derivedWithStore('sash', (reader, store) => {
|
||||
const showSash = this._options.renderSideBySide.read(reader);
|
||||
this.elements.root.classList.toggle('side-by-side', showSash);
|
||||
if (!showSash) {
|
||||
return undefined;
|
||||
}
|
||||
const result = store.add(new DiffEditorSash(this._options, this.elements.root, {
|
||||
height: this._rootSizeObserver.height,
|
||||
width: this._rootSizeObserver.width.map((w, reader) => w - (this._options.renderOverviewRuler.read(reader) ? OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH : 0)),
|
||||
}));
|
||||
store.add(autorun('setBoundarySashes', reader => {
|
||||
const boundarySashes = this._boundarySashes.read(reader);
|
||||
if (boundarySashes) {
|
||||
result.setBoundarySashes(boundarySashes);
|
||||
}
|
||||
}));
|
||||
return result;
|
||||
});
|
||||
this._register(keepAlive(this._sash, true));
|
||||
this._register(autorunWithStore2('UnchangedRangesFeature', (reader, store) => {
|
||||
this.unchangedRangesFeature = store.add(new (readHotReloadableExport(UnchangedRangesFeature, reader))(this._editors, this._diffModel, this._options));
|
||||
}));
|
||||
this._register(autorunWithStore2('DiffEditorDecorations', (reader, store) => {
|
||||
store.add(new (readHotReloadableExport(DiffEditorDecorations, reader))(this._editors, this._diffModel, this._options));
|
||||
}));
|
||||
this._register(this._instantiationService.createInstance(ViewZoneManager, this._editors, this._diffModel, this._options, this, () => this.unchangedRangesFeature.isUpdatingViewZones));
|
||||
this._register(autorunWithStore2('OverviewRulerPart', (reader, store) => {
|
||||
store.add(this._instantiationService.createInstance(readHotReloadableExport(OverviewRulerPart, reader), this._editors, this.elements.root, this._diffModel, this._rootSizeObserver.width, this._rootSizeObserver.height, this._layoutInfo.map(i => i.modifiedEditor), this._options));
|
||||
}));
|
||||
this._reviewPane = this._register(this._instantiationService.createInstance(DiffReview2, this));
|
||||
this.elements.root.appendChild(this._reviewPane.domNode.domNode);
|
||||
this.elements.root.appendChild(this._reviewPane.shadow.domNode);
|
||||
this.elements.root.appendChild(this._reviewPane.actionBarContainer.domNode);
|
||||
reviewPaneObservable.set(this._reviewPane, undefined);
|
||||
this._createDiffEditorContributions();
|
||||
codeEditorService.addDiffEditor(this);
|
||||
this._register(keepAlive(this._layoutInfo, true));
|
||||
this._register(new MovedBlocksLinesPart(this.elements.root, this._diffModel, this._layoutInfo.map(i => i.originalEditor), this._layoutInfo.map(i => i.modifiedEditor), this._editors));
|
||||
this._register(applyStyle(this.elements.overlay, {
|
||||
width: this._layoutInfo.map((i, r) => i.originalEditor.width + (this._options.renderSideBySide.read(r) ? 0 : i.modifiedEditor.width)),
|
||||
visibility: derived('visibility', reader => {
|
||||
var _a, _b;
|
||||
return (this._options.collapseUnchangedRegions.read(reader) && ((_b = (_a = this._diffModel.read(reader)) === null || _a === void 0 ? void 0 : _a.diff.read(reader)) === null || _b === void 0 ? void 0 : _b.mappings.length) === 0)
|
||||
? 'visible' : 'hidden';
|
||||
}),
|
||||
}));
|
||||
this._register(this._editors.original.onDidChangeCursorPosition(e => {
|
||||
const m = this._diffModel.get();
|
||||
if (!m) {
|
||||
return;
|
||||
}
|
||||
const movedText = m.diff.get().movedTexts.find(m => m.lineRangeMapping.originalRange.contains(e.position.lineNumber));
|
||||
m.syncedMovedTexts.set(movedText, undefined);
|
||||
}));
|
||||
this._register(this._editors.modified.onDidChangeCursorPosition(e => {
|
||||
const m = this._diffModel.get();
|
||||
if (!m) {
|
||||
return;
|
||||
}
|
||||
const movedText = m.diff.get().movedTexts.find(m => m.lineRangeMapping.modifiedRange.contains(e.position.lineNumber));
|
||||
m.syncedMovedTexts.set(movedText, undefined);
|
||||
}));
|
||||
// Revert change when an arrow is clicked.
|
||||
this._register(this._editors.modified.onMouseDown(event => {
|
||||
var _a, _b;
|
||||
if (!event.event.rightButton && event.target.position && ((_a = event.target.element) === null || _a === void 0 ? void 0 : _a.className.includes('arrow-revert-change'))) {
|
||||
const lineNumber = event.target.position.lineNumber;
|
||||
const viewZone = event.target;
|
||||
const model = this._diffModel.get();
|
||||
if (!model) {
|
||||
return;
|
||||
}
|
||||
const diffs = (_b = model.diff.get()) === null || _b === void 0 ? void 0 : _b.mappings;
|
||||
if (!diffs) {
|
||||
return;
|
||||
}
|
||||
const diff = diffs.find(d => (viewZone === null || viewZone === void 0 ? void 0 : viewZone.detail.afterLineNumber) === d.lineRangeMapping.modifiedRange.startLineNumber - 1 ||
|
||||
d.lineRangeMapping.modifiedRange.startLineNumber === lineNumber);
|
||||
if (!diff) {
|
||||
return;
|
||||
}
|
||||
this.revert(diff.lineRangeMapping);
|
||||
event.event.stopPropagation();
|
||||
}
|
||||
}));
|
||||
}
|
||||
_createInnerEditor(instantiationService, container, options, editorWidgetOptions) {
|
||||
const editor = instantiationService.createInstance(CodeEditorWidget, container, options, editorWidgetOptions);
|
||||
return editor;
|
||||
}
|
||||
_createDiffEditorContributions() {
|
||||
const contributions = EditorExtensionsRegistry.getDiffEditorContributions();
|
||||
for (const desc of contributions) {
|
||||
try {
|
||||
this._register(this._instantiationService.createInstance(desc.ctor, this));
|
||||
}
|
||||
catch (err) {
|
||||
onUnexpectedError(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
get _targetEditor() { return this._editors.modified; }
|
||||
getEditorType() { return EditorType.IDiffEditor; }
|
||||
layout(dimension) { this._rootSizeObserver.observe(dimension); }
|
||||
hasTextFocus() { return this._editors.original.hasTextFocus() || this._editors.modified.hasTextFocus(); }
|
||||
saveViewState() {
|
||||
var _a;
|
||||
const originalViewState = this._editors.original.saveViewState();
|
||||
const modifiedViewState = this._editors.modified.saveViewState();
|
||||
return {
|
||||
original: originalViewState,
|
||||
modified: modifiedViewState,
|
||||
modelState: (_a = this._diffModel.get()) === null || _a === void 0 ? void 0 : _a.serializeState(),
|
||||
};
|
||||
}
|
||||
restoreViewState(s) {
|
||||
var _a;
|
||||
if (s && s.original && s.modified) {
|
||||
const diffEditorState = s;
|
||||
this._editors.original.restoreViewState(diffEditorState.original);
|
||||
this._editors.modified.restoreViewState(diffEditorState.modified);
|
||||
if (diffEditorState.modelState) {
|
||||
(_a = this._diffModel.get()) === null || _a === void 0 ? void 0 : _a.restoreSerializedState(diffEditorState.modelState);
|
||||
}
|
||||
}
|
||||
}
|
||||
createViewModel(model) {
|
||||
return new DiffEditorViewModel(model, this._options,
|
||||
// TODO@hediet make diffAlgorithm observable
|
||||
this._instantiationService.createInstance(WorkerBasedDocumentDiffProvider, { diffAlgorithm: this._options.diffAlgorithm.get() }));
|
||||
}
|
||||
getModel() { var _a, _b; return (_b = (_a = this._diffModel.get()) === null || _a === void 0 ? void 0 : _a.model) !== null && _b !== void 0 ? _b : null; }
|
||||
setModel(model) {
|
||||
const vm = model ? ('model' in model) ? model : this.createViewModel(model) : undefined;
|
||||
this._editors.original.setModel(vm ? vm.model.original : null);
|
||||
this._editors.modified.setModel(vm ? vm.model.modified : null);
|
||||
transaction(tx => {
|
||||
this._diffModel.set(vm, tx);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @param changedOptions Only has values for top-level options that have actually changed.
|
||||
*/
|
||||
updateOptions(changedOptions) {
|
||||
this._options.updateOptions(changedOptions);
|
||||
}
|
||||
getContainerDomNode() { return this._domElement; }
|
||||
getOriginalEditor() { return this._editors.original; }
|
||||
getModifiedEditor() { return this._editors.modified; }
|
||||
/**
|
||||
* @deprecated Use `this.getDiffComputationResult().changes2` instead.
|
||||
*/
|
||||
getLineChanges() {
|
||||
var _a;
|
||||
const diffState = (_a = this._diffModel.get()) === null || _a === void 0 ? void 0 : _a.diff.get();
|
||||
if (!diffState) {
|
||||
return null;
|
||||
}
|
||||
return toLineChanges(diffState);
|
||||
}
|
||||
revert(diff) {
|
||||
var _a;
|
||||
const model = (_a = this._diffModel.get()) === null || _a === void 0 ? void 0 : _a.model;
|
||||
if (!model) {
|
||||
return;
|
||||
}
|
||||
const changes = diff.innerChanges
|
||||
? diff.innerChanges.map(c => ({
|
||||
range: c.modifiedRange,
|
||||
text: model.original.getValueInRange(c.originalRange)
|
||||
}))
|
||||
: [
|
||||
{
|
||||
range: diff.modifiedRange.toExclusiveRange(),
|
||||
text: model.original.getValueInRange(diff.originalRange.toExclusiveRange())
|
||||
}
|
||||
];
|
||||
this._editors.modified.executeEdits('diffEditor', changes);
|
||||
}
|
||||
diffReviewNext() { this._reviewPane.next(); }
|
||||
diffReviewPrev() { this._reviewPane.prev(); }
|
||||
};
|
||||
DiffEditorWidget2 = __decorate([
|
||||
__param(3, IContextKeyService),
|
||||
__param(4, IInstantiationService),
|
||||
__param(5, ICodeEditorService)
|
||||
], DiffEditorWidget2);
|
||||
function toLineChanges(state) {
|
||||
return state.mappings.map(x => {
|
||||
const m = x.lineRangeMapping;
|
||||
let originalStartLineNumber;
|
||||
let originalEndLineNumber;
|
||||
let modifiedStartLineNumber;
|
||||
let modifiedEndLineNumber;
|
||||
let innerChanges = m.innerChanges;
|
||||
if (m.originalRange.isEmpty) {
|
||||
// Insertion
|
||||
originalStartLineNumber = m.originalRange.startLineNumber - 1;
|
||||
originalEndLineNumber = 0;
|
||||
innerChanges = undefined;
|
||||
}
|
||||
else {
|
||||
originalStartLineNumber = m.originalRange.startLineNumber;
|
||||
originalEndLineNumber = m.originalRange.endLineNumberExclusive - 1;
|
||||
}
|
||||
if (m.modifiedRange.isEmpty) {
|
||||
// Deletion
|
||||
modifiedStartLineNumber = m.modifiedRange.startLineNumber - 1;
|
||||
modifiedEndLineNumber = 0;
|
||||
innerChanges = undefined;
|
||||
}
|
||||
else {
|
||||
modifiedStartLineNumber = m.modifiedRange.startLineNumber;
|
||||
modifiedEndLineNumber = m.modifiedRange.endLineNumberExclusive - 1;
|
||||
}
|
||||
return {
|
||||
originalStartLineNumber,
|
||||
originalEndLineNumber,
|
||||
modifiedStartLineNumber,
|
||||
modifiedEndLineNumber,
|
||||
charChanges: innerChanges === null || innerChanges === void 0 ? void 0 : innerChanges.map(m => ({
|
||||
originalStartLineNumber: m.originalRange.startLineNumber,
|
||||
originalStartColumn: m.originalRange.startColumn,
|
||||
originalEndLineNumber: m.originalRange.endLineNumber,
|
||||
originalEndColumn: m.originalRange.endColumn,
|
||||
modifiedStartLineNumber: m.modifiedRange.startLineNumber,
|
||||
modifiedStartColumn: m.modifiedRange.startColumn,
|
||||
modifiedEndLineNumber: m.modifiedRange.endLineNumber,
|
||||
modifiedEndColumn: m.modifiedRange.endColumn,
|
||||
}))
|
||||
};
|
||||
});
|
||||
}
|
||||
673
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/diffReview.js
generated
vendored
Normal file
673
node_modules/monaco-editor-core/esm/vs/editor/browser/widget/diffEditorWidget2/diffReview.js
generated
vendored
Normal file
|
|
@ -0,0 +1,673 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
import * as dom from '../../../../base/browser/dom.js';
|
||||
import { createFastDomNode } from '../../../../base/browser/fastDomNode.js';
|
||||
import { ActionBar } from '../../../../base/browser/ui/actionbar/actionbar.js';
|
||||
import { DomScrollableElement } from '../../../../base/browser/ui/scrollbar/scrollableElement.js';
|
||||
import { Action } from '../../../../base/common/actions.js';
|
||||
import { Codicon } from '../../../../base/common/codicons.js';
|
||||
import { Disposable } from '../../../../base/common/lifecycle.js';
|
||||
import { observableValue } from '../../../../base/common/observable.js';
|
||||
import { ThemeIcon } from '../../../../base/common/themables.js';
|
||||
import { applyFontInfo } from '../../config/domFontInfo.js';
|
||||
import { DiffReview } from '../diffReview.js';
|
||||
import { EditorFontLigatures } from '../../../common/config/editorOptions.js';
|
||||
import { Position } from '../../../common/core/position.js';
|
||||
import { ILanguageService } from '../../../common/languages/language.js';
|
||||
import { LineTokens } from '../../../common/tokens/lineTokens.js';
|
||||
import { RenderLineInput, renderViewLine2 as renderViewLine } from '../../../common/viewLayout/viewLineRenderer.js';
|
||||
import { ViewLineRenderingData } from '../../../common/viewModel.js';
|
||||
import * as nls from '../../../../nls.js';
|
||||
import { AudioCue, IAudioCueService } from '../../../../platform/audioCues/browser/audioCueService.js';
|
||||
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
|
||||
import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
|
||||
const DIFF_LINES_PADDING = 3;
|
||||
class DiffEntry {
|
||||
constructor(originalLineStart, originalLineEnd, modifiedLineStart, modifiedLineEnd) {
|
||||
this.originalLineStart = originalLineStart;
|
||||
this.originalLineEnd = originalLineEnd;
|
||||
this.modifiedLineStart = modifiedLineStart;
|
||||
this.modifiedLineEnd = modifiedLineEnd;
|
||||
}
|
||||
getType() {
|
||||
if (this.originalLineStart === 0) {
|
||||
return 1 /* DiffEntryType.Insert */;
|
||||
}
|
||||
if (this.modifiedLineStart === 0) {
|
||||
return 2 /* DiffEntryType.Delete */;
|
||||
}
|
||||
return 0 /* DiffEntryType.Equal */;
|
||||
}
|
||||
}
|
||||
class Diff {
|
||||
constructor(entries) {
|
||||
this.entries = entries;
|
||||
}
|
||||
}
|
||||
const diffReviewInsertIcon = registerIcon('diff-review-insert', Codicon.add, nls.localize('diffReviewInsertIcon', 'Icon for \'Insert\' in diff review.'));
|
||||
const diffReviewRemoveIcon = registerIcon('diff-review-remove', Codicon.remove, nls.localize('diffReviewRemoveIcon', 'Icon for \'Remove\' in diff review.'));
|
||||
const diffReviewCloseIcon = registerIcon('diff-review-close', Codicon.close, nls.localize('diffReviewCloseIcon', 'Icon for \'Close\' in diff review.'));
|
||||
export let DiffReview2 = class DiffReview2 extends Disposable {
|
||||
get _isVisible() { return this._isVisibleObs.get(); }
|
||||
constructor(diffEditor, _languageService, _audioCueService, _configurationService) {
|
||||
super();
|
||||
this._languageService = _languageService;
|
||||
this._audioCueService = _audioCueService;
|
||||
this._configurationService = _configurationService;
|
||||
this._isVisibleObs = observableValue('isVisible', false);
|
||||
this.isVisible = this._isVisibleObs;
|
||||
this._width = 0;
|
||||
this._top = 0;
|
||||
this._height = 0;
|
||||
this._diffEditor = diffEditor;
|
||||
this.shadow = createFastDomNode(document.createElement('div'));
|
||||
this.shadow.setClassName('diff-review-shadow');
|
||||
this.actionBarContainer = createFastDomNode(document.createElement('div'));
|
||||
this.actionBarContainer.setClassName('diff-review-actions');
|
||||
this._actionBar = this._register(new ActionBar(this.actionBarContainer.domNode));
|
||||
this._actionBar.push(new Action('diffreview.close', nls.localize('label.close', "Close"), 'close-diff-review ' + ThemeIcon.asClassName(diffReviewCloseIcon), true, () => __awaiter(this, void 0, void 0, function* () { return this.hide(); })), { label: false, icon: true });
|
||||
this.domNode = createFastDomNode(document.createElement('div'));
|
||||
this.domNode.setClassName('diff-review monaco-editor-background');
|
||||
this._content = createFastDomNode(document.createElement('div'));
|
||||
this._content.setClassName('diff-review-content');
|
||||
this._content.setAttribute('role', 'code');
|
||||
this.scrollbar = this._register(new DomScrollableElement(this._content.domNode, {}));
|
||||
this.domNode.domNode.appendChild(this.scrollbar.getDomNode());
|
||||
this._register(diffEditor.onDidUpdateDiff(() => {
|
||||
if (!this._isVisible) {
|
||||
return;
|
||||
}
|
||||
this._diffs = this._compute();
|
||||
this._render();
|
||||
}));
|
||||
this._register(diffEditor.getModifiedEditor().onDidChangeCursorPosition(() => {
|
||||
if (!this._isVisible) {
|
||||
return;
|
||||
}
|
||||
this._render();
|
||||
}));
|
||||
this._register(dom.addStandardDisposableListener(this.domNode.domNode, 'click', (e) => {
|
||||
e.preventDefault();
|
||||
const row = dom.findParentWithClass(e.target, 'diff-review-row');
|
||||
if (row) {
|
||||
this._goToRow(row);
|
||||
}
|
||||
}));
|
||||
this._register(dom.addStandardDisposableListener(this.domNode.domNode, 'keydown', (e) => {
|
||||
if (e.equals(18 /* KeyCode.DownArrow */)
|
||||
|| e.equals(2048 /* KeyMod.CtrlCmd */ | 18 /* KeyCode.DownArrow */)
|
||||
|| e.equals(512 /* KeyMod.Alt */ | 18 /* KeyCode.DownArrow */)) {
|
||||
e.preventDefault();
|
||||
this._goToRow(this._getNextRow(), 'next');
|
||||
}
|
||||
if (e.equals(16 /* KeyCode.UpArrow */)
|
||||
|| e.equals(2048 /* KeyMod.CtrlCmd */ | 16 /* KeyCode.UpArrow */)
|
||||
|| e.equals(512 /* KeyMod.Alt */ | 16 /* KeyCode.UpArrow */)) {
|
||||
e.preventDefault();
|
||||
this._goToRow(this._getPrevRow(), 'previous');
|
||||
}
|
||||
if (e.equals(9 /* KeyCode.Escape */)
|
||||
|| e.equals(2048 /* KeyMod.CtrlCmd */ | 9 /* KeyCode.Escape */)
|
||||
|| e.equals(512 /* KeyMod.Alt */ | 9 /* KeyCode.Escape */)
|
||||
|| e.equals(1024 /* KeyMod.Shift */ | 9 /* KeyCode.Escape */)
|
||||
|| e.equals(10 /* KeyCode.Space */)
|
||||
|| e.equals(3 /* KeyCode.Enter */)) {
|
||||
e.preventDefault();
|
||||
this.accept();
|
||||
}
|
||||
}));
|
||||
this._register(this._configurationService.onDidChangeConfiguration(e => {
|
||||
if (e.affectsConfiguration('accessibility.verbosity.diffEditor')) {
|
||||
this._diffEditor.updateOptions({ accessibilityVerbose: this._configurationService.getValue('accessibility.verbosity.diffEditor') });
|
||||
}
|
||||
}));
|
||||
this._diffs = [];
|
||||
this._currentDiff = null;
|
||||
}
|
||||
prev() {
|
||||
let index = 0;
|
||||
if (!this._isVisible) {
|
||||
this._diffs = this._compute();
|
||||
}
|
||||
if (this._isVisible) {
|
||||
let currentIndex = -1;
|
||||
for (let i = 0, len = this._diffs.length; i < len; i++) {
|
||||
if (this._diffs[i] === this._currentDiff) {
|
||||
currentIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
index = (this._diffs.length + currentIndex - 1);
|
||||
}
|
||||
else {
|
||||
index = this._findDiffIndex(this._diffEditor.getPosition());
|
||||
}
|
||||
if (this._diffs.length === 0) {
|
||||
// Nothing to do
|
||||
return;
|
||||
}
|
||||
index = index % this._diffs.length;
|
||||
const entries = this._diffs[index].entries;
|
||||
this._diffEditor.setPosition(new Position(entries[0].modifiedLineStart, 1));
|
||||
this._diffEditor.setSelection({ startColumn: 1, startLineNumber: entries[0].modifiedLineStart, endColumn: 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */, endLineNumber: entries[entries.length - 1].modifiedLineEnd });
|
||||
this._isVisibleObs.set(true, undefined);
|
||||
this.layout();
|
||||
this._render();
|
||||
this._goToRow(this._getPrevRow(), 'previous');
|
||||
}
|
||||
next() {
|
||||
let index = 0;
|
||||
if (!this._isVisible) {
|
||||
this._diffs = this._compute();
|
||||
}
|
||||
if (this._isVisible) {
|
||||
let currentIndex = -1;
|
||||
for (let i = 0, len = this._diffs.length; i < len; i++) {
|
||||
if (this._diffs[i] === this._currentDiff) {
|
||||
currentIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
index = (currentIndex + 1);
|
||||
}
|
||||
else {
|
||||
index = this._findDiffIndex(this._diffEditor.getPosition());
|
||||
}
|
||||
if (this._diffs.length === 0) {
|
||||
// Nothing to do
|
||||
return;
|
||||
}
|
||||
index = index % this._diffs.length;
|
||||
const entries = this._diffs[index].entries;
|
||||
this._diffEditor.setPosition(new Position(entries[0].modifiedLineStart, 1));
|
||||
this._diffEditor.setSelection({ startColumn: 1, startLineNumber: entries[0].modifiedLineStart, endColumn: 1073741824 /* Constants.MAX_SAFE_SMALL_INTEGER */, endLineNumber: entries[entries.length - 1].modifiedLineEnd });
|
||||
this._isVisibleObs.set(true, undefined);
|
||||
this.layout();
|
||||
this._render();
|
||||
this._goToRow(this._getNextRow(), 'next');
|
||||
}
|
||||
accept() {
|
||||
let jumpToLineNumber = -1;
|
||||
const current = this._getCurrentFocusedRow();
|
||||
if (current) {
|
||||
const lineNumber = parseInt(current.getAttribute('data-line'), 10);
|
||||
if (!isNaN(lineNumber)) {
|
||||
jumpToLineNumber = lineNumber;
|
||||
}
|
||||
}
|
||||
this.hide();
|
||||
if (jumpToLineNumber !== -1) {
|
||||
this._diffEditor.setPosition(new Position(jumpToLineNumber, 1));
|
||||
this._diffEditor.revealPosition(new Position(jumpToLineNumber, 1), 1 /* ScrollType.Immediate */);
|
||||
}
|
||||
}
|
||||
hide() {
|
||||
this._isVisibleObs.set(false, undefined);
|
||||
this._diffEditor.focus();
|
||||
this.layout();
|
||||
this._render();
|
||||
}
|
||||
_getPrevRow() {
|
||||
const current = this._getCurrentFocusedRow();
|
||||
if (!current) {
|
||||
return this._getFirstRow();
|
||||
}
|
||||
if (current.previousElementSibling) {
|
||||
return current.previousElementSibling;
|
||||
}
|
||||
return current;
|
||||
}
|
||||
_getNextRow() {
|
||||
const current = this._getCurrentFocusedRow();
|
||||
if (!current) {
|
||||
return this._getFirstRow();
|
||||
}
|
||||
if (current.nextElementSibling) {
|
||||
return current.nextElementSibling;
|
||||
}
|
||||
return current;
|
||||
}
|
||||
_getFirstRow() {
|
||||
return this.domNode.domNode.querySelector('.diff-review-row');
|
||||
}
|
||||
_getCurrentFocusedRow() {
|
||||
const result = document.activeElement;
|
||||
if (result && /diff-review-row/.test(result.className)) {
|
||||
return result;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
_goToRow(row, type) {
|
||||
const current = this._getCurrentFocusedRow();
|
||||
row.tabIndex = 0;
|
||||
row.focus();
|
||||
if (current && current !== row) {
|
||||
current.tabIndex = -1;
|
||||
}
|
||||
const element = !type ? current : type === 'next' ? current === null || current === void 0 ? void 0 : current.nextElementSibling : current === null || current === void 0 ? void 0 : current.previousElementSibling;
|
||||
if (element === null || element === void 0 ? void 0 : element.classList.contains("line-insert" /* DiffEditorLineClasses.Insert */)) {
|
||||
this._audioCueService.playAudioCue(AudioCue.diffLineInserted, true);
|
||||
}
|
||||
else if (element === null || element === void 0 ? void 0 : element.classList.contains("line-delete" /* DiffEditorLineClasses.Delete */)) {
|
||||
this._audioCueService.playAudioCue(AudioCue.diffLineDeleted, true);
|
||||
}
|
||||
this.scrollbar.scanDomNode();
|
||||
}
|
||||
layout(top = this._top, width = this._width, height = this._height) {
|
||||
this._width = width;
|
||||
this._top = top;
|
||||
this._height = height;
|
||||
this.shadow.setTop(top - 6);
|
||||
this.shadow.setWidth(width);
|
||||
this.shadow.setHeight(this._isVisible ? 6 : 0);
|
||||
this.domNode.setTop(top);
|
||||
this.domNode.setWidth(width);
|
||||
this.domNode.setHeight(height);
|
||||
this._content.setHeight(height);
|
||||
this._content.setWidth(width);
|
||||
if (this._isVisible) {
|
||||
this.domNode.setDisplay('block');
|
||||
this.actionBarContainer.setAttribute('aria-hidden', 'false');
|
||||
this.actionBarContainer.setDisplay('block');
|
||||
}
|
||||
else {
|
||||
this.domNode.setDisplay('none');
|
||||
this.actionBarContainer.setAttribute('aria-hidden', 'true');
|
||||
this.actionBarContainer.setDisplay('none');
|
||||
}
|
||||
}
|
||||
_compute() {
|
||||
const lineChanges = this._diffEditor.getLineChanges();
|
||||
if (!lineChanges || lineChanges.length === 0) {
|
||||
return [];
|
||||
}
|
||||
const originalModel = this._diffEditor.getOriginalEditor().getModel();
|
||||
const modifiedModel = this._diffEditor.getModifiedEditor().getModel();
|
||||
if (!originalModel || !modifiedModel) {
|
||||
return [];
|
||||
}
|
||||
return DiffReview2._mergeAdjacent(lineChanges, originalModel.getLineCount(), modifiedModel.getLineCount());
|
||||
}
|
||||
static _mergeAdjacent(lineChanges, originalLineCount, modifiedLineCount) {
|
||||
if (!lineChanges || lineChanges.length === 0) {
|
||||
return [];
|
||||
}
|
||||
const diffs = [];
|
||||
let diffsLength = 0;
|
||||
for (let i = 0, len = lineChanges.length; i < len; i++) {
|
||||
const lineChange = lineChanges[i];
|
||||
const originalStart = lineChange.originalStartLineNumber;
|
||||
const originalEnd = lineChange.originalEndLineNumber;
|
||||
const modifiedStart = lineChange.modifiedStartLineNumber;
|
||||
const modifiedEnd = lineChange.modifiedEndLineNumber;
|
||||
const r = [];
|
||||
let rLength = 0;
|
||||
// Emit before anchors
|
||||
{
|
||||
const originalEqualAbove = (originalEnd === 0 ? originalStart : originalStart - 1);
|
||||
const modifiedEqualAbove = (modifiedEnd === 0 ? modifiedStart : modifiedStart - 1);
|
||||
// Make sure we don't step into the previous diff
|
||||
let minOriginal = 1;
|
||||
let minModified = 1;
|
||||
if (i > 0) {
|
||||
const prevLineChange = lineChanges[i - 1];
|
||||
if (prevLineChange.originalEndLineNumber === 0) {
|
||||
minOriginal = prevLineChange.originalStartLineNumber + 1;
|
||||
}
|
||||
else {
|
||||
minOriginal = prevLineChange.originalEndLineNumber + 1;
|
||||
}
|
||||
if (prevLineChange.modifiedEndLineNumber === 0) {
|
||||
minModified = prevLineChange.modifiedStartLineNumber + 1;
|
||||
}
|
||||
else {
|
||||
minModified = prevLineChange.modifiedEndLineNumber + 1;
|
||||
}
|
||||
}
|
||||
let fromOriginal = originalEqualAbove - DIFF_LINES_PADDING + 1;
|
||||
let fromModified = modifiedEqualAbove - DIFF_LINES_PADDING + 1;
|
||||
if (fromOriginal < minOriginal) {
|
||||
const delta = minOriginal - fromOriginal;
|
||||
fromOriginal = fromOriginal + delta;
|
||||
fromModified = fromModified + delta;
|
||||
}
|
||||
if (fromModified < minModified) {
|
||||
const delta = minModified - fromModified;
|
||||
fromOriginal = fromOriginal + delta;
|
||||
fromModified = fromModified + delta;
|
||||
}
|
||||
r[rLength++] = new DiffEntry(fromOriginal, originalEqualAbove, fromModified, modifiedEqualAbove);
|
||||
}
|
||||
// Emit deleted lines
|
||||
{
|
||||
if (originalEnd !== 0) {
|
||||
r[rLength++] = new DiffEntry(originalStart, originalEnd, 0, 0);
|
||||
}
|
||||
}
|
||||
// Emit inserted lines
|
||||
{
|
||||
if (modifiedEnd !== 0) {
|
||||
r[rLength++] = new DiffEntry(0, 0, modifiedStart, modifiedEnd);
|
||||
}
|
||||
}
|
||||
// Emit after anchors
|
||||
{
|
||||
const originalEqualBelow = (originalEnd === 0 ? originalStart + 1 : originalEnd + 1);
|
||||
const modifiedEqualBelow = (modifiedEnd === 0 ? modifiedStart + 1 : modifiedEnd + 1);
|
||||
// Make sure we don't step into the next diff
|
||||
let maxOriginal = originalLineCount;
|
||||
let maxModified = modifiedLineCount;
|
||||
if (i + 1 < len) {
|
||||
const nextLineChange = lineChanges[i + 1];
|
||||
if (nextLineChange.originalEndLineNumber === 0) {
|
||||
maxOriginal = nextLineChange.originalStartLineNumber;
|
||||
}
|
||||
else {
|
||||
maxOriginal = nextLineChange.originalStartLineNumber - 1;
|
||||
}
|
||||
if (nextLineChange.modifiedEndLineNumber === 0) {
|
||||
maxModified = nextLineChange.modifiedStartLineNumber;
|
||||
}
|
||||
else {
|
||||
maxModified = nextLineChange.modifiedStartLineNumber - 1;
|
||||
}
|
||||
}
|
||||
let toOriginal = originalEqualBelow + DIFF_LINES_PADDING - 1;
|
||||
let toModified = modifiedEqualBelow + DIFF_LINES_PADDING - 1;
|
||||
if (toOriginal > maxOriginal) {
|
||||
const delta = maxOriginal - toOriginal;
|
||||
toOriginal = toOriginal + delta;
|
||||
toModified = toModified + delta;
|
||||
}
|
||||
if (toModified > maxModified) {
|
||||
const delta = maxModified - toModified;
|
||||
toOriginal = toOriginal + delta;
|
||||
toModified = toModified + delta;
|
||||
}
|
||||
r[rLength++] = new DiffEntry(originalEqualBelow, toOriginal, modifiedEqualBelow, toModified);
|
||||
}
|
||||
diffs[diffsLength++] = new Diff(r);
|
||||
}
|
||||
// Merge adjacent diffs
|
||||
let curr = diffs[0].entries;
|
||||
const r = [];
|
||||
let rLength = 0;
|
||||
for (let i = 1, len = diffs.length; i < len; i++) {
|
||||
const thisDiff = diffs[i].entries;
|
||||
const currLast = curr[curr.length - 1];
|
||||
const thisFirst = thisDiff[0];
|
||||
if (currLast.getType() === 0 /* DiffEntryType.Equal */
|
||||
&& thisFirst.getType() === 0 /* DiffEntryType.Equal */
|
||||
&& thisFirst.originalLineStart <= currLast.originalLineEnd) {
|
||||
// We are dealing with equal lines that overlap
|
||||
curr[curr.length - 1] = new DiffEntry(currLast.originalLineStart, thisFirst.originalLineEnd, currLast.modifiedLineStart, thisFirst.modifiedLineEnd);
|
||||
curr = curr.concat(thisDiff.slice(1));
|
||||
continue;
|
||||
}
|
||||
r[rLength++] = new Diff(curr);
|
||||
curr = thisDiff;
|
||||
}
|
||||
r[rLength++] = new Diff(curr);
|
||||
return r;
|
||||
}
|
||||
_findDiffIndex(pos) {
|
||||
const lineNumber = pos.lineNumber;
|
||||
for (let i = 0, len = this._diffs.length; i < len; i++) {
|
||||
const diff = this._diffs[i].entries;
|
||||
const lastModifiedLine = diff[diff.length - 1].modifiedLineEnd;
|
||||
if (lineNumber <= lastModifiedLine) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
_render() {
|
||||
const originalOptions = this._diffEditor.getOriginalEditor().getOptions();
|
||||
const modifiedOptions = this._diffEditor.getModifiedEditor().getOptions();
|
||||
const originalModel = this._diffEditor.getOriginalEditor().getModel();
|
||||
const modifiedModel = this._diffEditor.getModifiedEditor().getModel();
|
||||
const originalModelOpts = originalModel.getOptions();
|
||||
const modifiedModelOpts = modifiedModel.getOptions();
|
||||
if (!this._isVisible || !originalModel || !modifiedModel) {
|
||||
dom.clearNode(this._content.domNode);
|
||||
this._currentDiff = null;
|
||||
this.scrollbar.scanDomNode();
|
||||
return;
|
||||
}
|
||||
const diffIndex = this._findDiffIndex(this._diffEditor.getPosition());
|
||||
if (this._diffs[diffIndex] === this._currentDiff) {
|
||||
return;
|
||||
}
|
||||
this._currentDiff = this._diffs[diffIndex];
|
||||
const diffs = this._diffs[diffIndex].entries;
|
||||
const container = document.createElement('div');
|
||||
container.className = 'diff-review-table';
|
||||
container.setAttribute('role', 'list');
|
||||
container.setAttribute('aria-label', 'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands');
|
||||
applyFontInfo(container, modifiedOptions.get(48 /* EditorOption.fontInfo */));
|
||||
let minOriginalLine = 0;
|
||||
let maxOriginalLine = 0;
|
||||
let minModifiedLine = 0;
|
||||
let maxModifiedLine = 0;
|
||||
for (let i = 0, len = diffs.length; i < len; i++) {
|
||||
const diffEntry = diffs[i];
|
||||
const originalLineStart = diffEntry.originalLineStart;
|
||||
const originalLineEnd = diffEntry.originalLineEnd;
|
||||
const modifiedLineStart = diffEntry.modifiedLineStart;
|
||||
const modifiedLineEnd = diffEntry.modifiedLineEnd;
|
||||
if (originalLineStart !== 0 && ((minOriginalLine === 0 || originalLineStart < minOriginalLine))) {
|
||||
minOriginalLine = originalLineStart;
|
||||
}
|
||||
if (originalLineEnd !== 0 && ((maxOriginalLine === 0 || originalLineEnd > maxOriginalLine))) {
|
||||
maxOriginalLine = originalLineEnd;
|
||||
}
|
||||
if (modifiedLineStart !== 0 && ((minModifiedLine === 0 || modifiedLineStart < minModifiedLine))) {
|
||||
minModifiedLine = modifiedLineStart;
|
||||
}
|
||||
if (modifiedLineEnd !== 0 && ((maxModifiedLine === 0 || modifiedLineEnd > maxModifiedLine))) {
|
||||
maxModifiedLine = modifiedLineEnd;
|
||||
}
|
||||
}
|
||||
const header = document.createElement('div');
|
||||
header.className = 'diff-review-row';
|
||||
const cell = document.createElement('div');
|
||||
cell.className = 'diff-review-cell diff-review-summary';
|
||||
const originalChangedLinesCnt = maxOriginalLine - minOriginalLine + 1;
|
||||
const modifiedChangedLinesCnt = maxModifiedLine - minModifiedLine + 1;
|
||||
cell.appendChild(document.createTextNode(`${diffIndex + 1}/${this._diffs.length}: @@ -${minOriginalLine},${originalChangedLinesCnt} +${minModifiedLine},${modifiedChangedLinesCnt} @@`));
|
||||
header.setAttribute('data-line', String(minModifiedLine));
|
||||
const getAriaLines = (lines) => {
|
||||
if (lines === 0) {
|
||||
return nls.localize('no_lines_changed', "no lines changed");
|
||||
}
|
||||
else if (lines === 1) {
|
||||
return nls.localize('one_line_changed', "1 line changed");
|
||||
}
|
||||
else {
|
||||
return nls.localize('more_lines_changed', "{0} lines changed", lines);
|
||||
}
|
||||
};
|
||||
const originalChangedLinesCntAria = getAriaLines(originalChangedLinesCnt);
|
||||
const modifiedChangedLinesCntAria = getAriaLines(modifiedChangedLinesCnt);
|
||||
header.setAttribute('aria-label', nls.localize({
|
||||
key: 'header',
|
||||
comment: [
|
||||
'This is the ARIA label for a git diff header.',
|
||||
'A git diff header looks like this: @@ -154,12 +159,39 @@.',
|
||||
'That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.',
|
||||
'Variables 0 and 1 refer to the diff index out of total number of diffs.',
|
||||
'Variables 2 and 4 will be numbers (a line number).',
|
||||
'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.'
|
||||
]
|
||||
}, "Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}", (diffIndex + 1), this._diffs.length, minOriginalLine, originalChangedLinesCntAria, minModifiedLine, modifiedChangedLinesCntAria));
|
||||
header.appendChild(cell);
|
||||
// @@ -504,7 +517,7 @@
|
||||
header.setAttribute('role', 'listitem');
|
||||
container.appendChild(header);
|
||||
const lineHeight = modifiedOptions.get(64 /* EditorOption.lineHeight */);
|
||||
let modLine = minModifiedLine;
|
||||
for (let i = 0, len = diffs.length; i < len; i++) {
|
||||
const diffEntry = diffs[i];
|
||||
DiffReview2._renderSection(container, diffEntry, modLine, lineHeight, this._width, originalOptions, originalModel, originalModelOpts, modifiedOptions, modifiedModel, modifiedModelOpts, this._languageService.languageIdCodec);
|
||||
if (diffEntry.modifiedLineStart !== 0) {
|
||||
modLine = diffEntry.modifiedLineEnd;
|
||||
}
|
||||
}
|
||||
dom.clearNode(this._content.domNode);
|
||||
this._content.domNode.appendChild(container);
|
||||
this.scrollbar.scanDomNode();
|
||||
}
|
||||
static _renderSection(dest, diffEntry, modLine, lineHeight, width, originalOptions, originalModel, originalModelOpts, modifiedOptions, modifiedModel, modifiedModelOpts, languageIdCodec) {
|
||||
const type = diffEntry.getType();
|
||||
let rowClassName = 'diff-review-row';
|
||||
let lineNumbersExtraClassName = '';
|
||||
const spacerClassName = 'diff-review-spacer';
|
||||
let spacerIcon = null;
|
||||
switch (type) {
|
||||
case 1 /* DiffEntryType.Insert */:
|
||||
rowClassName = 'diff-review-row line-insert';
|
||||
lineNumbersExtraClassName = ' char-insert';
|
||||
spacerIcon = diffReviewInsertIcon;
|
||||
break;
|
||||
case 2 /* DiffEntryType.Delete */:
|
||||
rowClassName = 'diff-review-row line-delete';
|
||||
lineNumbersExtraClassName = ' char-delete';
|
||||
spacerIcon = diffReviewRemoveIcon;
|
||||
break;
|
||||
}
|
||||
const originalLineStart = diffEntry.originalLineStart;
|
||||
const originalLineEnd = diffEntry.originalLineEnd;
|
||||
const modifiedLineStart = diffEntry.modifiedLineStart;
|
||||
const modifiedLineEnd = diffEntry.modifiedLineEnd;
|
||||
const cnt = Math.max(modifiedLineEnd - modifiedLineStart, originalLineEnd - originalLineStart);
|
||||
const originalLayoutInfo = originalOptions.get(141 /* EditorOption.layoutInfo */);
|
||||
const originalLineNumbersWidth = originalLayoutInfo.glyphMarginWidth + originalLayoutInfo.lineNumbersWidth;
|
||||
const modifiedLayoutInfo = modifiedOptions.get(141 /* EditorOption.layoutInfo */);
|
||||
const modifiedLineNumbersWidth = 10 + modifiedLayoutInfo.glyphMarginWidth + modifiedLayoutInfo.lineNumbersWidth;
|
||||
for (let i = 0; i <= cnt; i++) {
|
||||
const originalLine = (originalLineStart === 0 ? 0 : originalLineStart + i);
|
||||
const modifiedLine = (modifiedLineStart === 0 ? 0 : modifiedLineStart + i);
|
||||
const row = document.createElement('div');
|
||||
row.style.minWidth = width + 'px';
|
||||
row.className = rowClassName;
|
||||
row.setAttribute('role', 'listitem');
|
||||
if (modifiedLine !== 0) {
|
||||
modLine = modifiedLine;
|
||||
}
|
||||
row.setAttribute('data-line', String(modLine));
|
||||
const cell = document.createElement('div');
|
||||
cell.className = 'diff-review-cell';
|
||||
cell.style.height = `${lineHeight}px`;
|
||||
row.appendChild(cell);
|
||||
const originalLineNumber = document.createElement('span');
|
||||
originalLineNumber.style.width = (originalLineNumbersWidth + 'px');
|
||||
originalLineNumber.style.minWidth = (originalLineNumbersWidth + 'px');
|
||||
originalLineNumber.className = 'diff-review-line-number' + lineNumbersExtraClassName;
|
||||
if (originalLine !== 0) {
|
||||
originalLineNumber.appendChild(document.createTextNode(String(originalLine)));
|
||||
}
|
||||
else {
|
||||
originalLineNumber.innerText = '\u00a0';
|
||||
}
|
||||
cell.appendChild(originalLineNumber);
|
||||
const modifiedLineNumber = document.createElement('span');
|
||||
modifiedLineNumber.style.width = (modifiedLineNumbersWidth + 'px');
|
||||
modifiedLineNumber.style.minWidth = (modifiedLineNumbersWidth + 'px');
|
||||
modifiedLineNumber.style.paddingRight = '10px';
|
||||
modifiedLineNumber.className = 'diff-review-line-number' + lineNumbersExtraClassName;
|
||||
if (modifiedLine !== 0) {
|
||||
modifiedLineNumber.appendChild(document.createTextNode(String(modifiedLine)));
|
||||
}
|
||||
else {
|
||||
modifiedLineNumber.innerText = '\u00a0';
|
||||
}
|
||||
cell.appendChild(modifiedLineNumber);
|
||||
const spacer = document.createElement('span');
|
||||
spacer.className = spacerClassName;
|
||||
if (spacerIcon) {
|
||||
const spacerCodicon = document.createElement('span');
|
||||
spacerCodicon.className = ThemeIcon.asClassName(spacerIcon);
|
||||
spacerCodicon.innerText = '\u00a0\u00a0';
|
||||
spacer.appendChild(spacerCodicon);
|
||||
}
|
||||
else {
|
||||
spacer.innerText = '\u00a0\u00a0';
|
||||
}
|
||||
cell.appendChild(spacer);
|
||||
let lineContent;
|
||||
if (modifiedLine !== 0) {
|
||||
let html = this._renderLine(modifiedModel, modifiedOptions, modifiedModelOpts.tabSize, modifiedLine, languageIdCodec);
|
||||
if (DiffReview2._ttPolicy) {
|
||||
html = DiffReview2._ttPolicy.createHTML(html);
|
||||
}
|
||||
cell.insertAdjacentHTML('beforeend', html);
|
||||
lineContent = modifiedModel.getLineContent(modifiedLine);
|
||||
}
|
||||
else {
|
||||
let html = this._renderLine(originalModel, originalOptions, originalModelOpts.tabSize, originalLine, languageIdCodec);
|
||||
if (DiffReview2._ttPolicy) {
|
||||
html = DiffReview2._ttPolicy.createHTML(html);
|
||||
}
|
||||
cell.insertAdjacentHTML('beforeend', html);
|
||||
lineContent = originalModel.getLineContent(originalLine);
|
||||
}
|
||||
if (lineContent.length === 0) {
|
||||
lineContent = nls.localize('blankLine', "blank");
|
||||
}
|
||||
let ariaLabel = '';
|
||||
switch (type) {
|
||||
case 0 /* DiffEntryType.Equal */:
|
||||
if (originalLine === modifiedLine) {
|
||||
ariaLabel = nls.localize({ key: 'unchangedLine', comment: ['The placeholders are contents of the line and should not be translated.'] }, "{0} unchanged line {1}", lineContent, originalLine);
|
||||
}
|
||||
else {
|
||||
ariaLabel = nls.localize('equalLine', "{0} original line {1} modified line {2}", lineContent, originalLine, modifiedLine);
|
||||
}
|
||||
break;
|
||||
case 1 /* DiffEntryType.Insert */:
|
||||
ariaLabel = nls.localize('insertLine', "+ {0} modified line {1}", lineContent, modifiedLine);
|
||||
break;
|
||||
case 2 /* DiffEntryType.Delete */:
|
||||
ariaLabel = nls.localize('deleteLine', "- {0} original line {1}", lineContent, originalLine);
|
||||
break;
|
||||
}
|
||||
row.setAttribute('aria-label', ariaLabel);
|
||||
dest.appendChild(row);
|
||||
}
|
||||
}
|
||||
static _renderLine(model, options, tabSize, lineNumber, languageIdCodec) {
|
||||
const lineContent = model.getLineContent(lineNumber);
|
||||
const fontInfo = options.get(48 /* EditorOption.fontInfo */);
|
||||
const lineTokens = LineTokens.createEmpty(lineContent, languageIdCodec);
|
||||
const isBasicASCII = ViewLineRenderingData.isBasicASCII(lineContent, model.mightContainNonBasicASCII());
|
||||
const containsRTL = ViewLineRenderingData.containsRTL(lineContent, isBasicASCII, model.mightContainRTL());
|
||||
const r = renderViewLine(new RenderLineInput((fontInfo.isMonospace && !options.get(31 /* EditorOption.disableMonospaceOptimizations */)), fontInfo.canUseHalfwidthRightwardsArrow, lineContent, false, isBasicASCII, containsRTL, 0, lineTokens, [], tabSize, 0, fontInfo.spaceWidth, fontInfo.middotWidth, fontInfo.wsmiddotWidth, options.get(114 /* EditorOption.stopRenderingLineAfter */), options.get(96 /* EditorOption.renderWhitespace */), options.get(91 /* EditorOption.renderControlCharacters */), options.get(49 /* EditorOption.fontLigatures */) !== EditorFontLigatures.OFF, null));
|
||||
return r.html;
|
||||
}
|
||||
};
|
||||
DiffReview2._ttPolicy = DiffReview._ttPolicy; // TODO inline once DiffReview is deprecated.
|
||||
DiffReview2 = __decorate([
|
||||
__param(1, ILanguageService),
|
||||
__param(2, IAudioCueService),
|
||||
__param(3, IConfigurationService)
|
||||
], DiffReview2);
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue