monaco-editor-core 0.55.0 → 0.56.0-dev-20251121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/nls.keys.json +1 -1
- package/esm/nls.messages.cs.js +2 -2
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.pl.js +2 -2
- package/esm/nls.messages.pt-br.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +27 -8
- package/esm/vs/base/browser/dom.js +31 -34
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/dompurify/dompurify.js +0 -1
- package/esm/vs/base/browser/keyboardEvent.js +3 -3
- package/esm/vs/base/browser/keyboardEvent.js.map +1 -1
- package/esm/vs/base/browser/markdownRenderer.js +5 -2
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/pixelRatio.js +5 -5
- package/esm/vs/base/browser/pixelRatio.js.map +1 -1
- package/esm/vs/base/browser/trustedTypes.js +1 -1
- package/esm/vs/base/browser/trustedTypes.js.map +1 -1
- package/esm/vs/base/browser/ui/actionbar/actionbar.js +3 -0
- package/esm/vs/base/browser/ui/actionbar/actionbar.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +7 -0
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js.map +1 -1
- package/esm/vs/base/browser/ui/hover/hoverWidget.css +0 -13
- package/esm/vs/base/browser/ui/inputbox/inputBox.js +7 -0
- package/esm/vs/base/browser/ui/inputbox/inputBox.js.map +1 -1
- package/esm/vs/base/browser/ui/keybindingLabel/keybindingLabel.css +4 -2
- package/esm/vs/base/browser/ui/list/listView.js +7 -2
- package/esm/vs/base/browser/ui/list/listView.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBox.js +4 -0
- package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.css +12 -32
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +8 -18
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +41 -14
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/abstractTree.js +11 -0
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +1 -0
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/compressedObjectTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/dataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/objectTreeModel.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
- package/esm/vs/base/common/arrays.js +10 -0
- package/esm/vs/base/common/arrays.js.map +1 -1
- package/esm/vs/base/common/async.js +34 -0
- package/esm/vs/base/common/async.js.map +1 -1
- package/esm/vs/base/common/buffer.js +1 -1
- package/esm/vs/base/common/buffer.js.map +1 -1
- package/esm/vs/base/common/cancellation.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +3 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/collections.js.map +1 -1
- package/esm/vs/base/common/equals.js.map +1 -1
- package/esm/vs/base/common/event.js +32 -15
- package/esm/vs/base/common/event.js.map +1 -1
- package/esm/vs/base/common/filters.js +22 -3
- package/esm/vs/base/common/filters.js.map +1 -1
- package/esm/vs/base/common/hotReload.js +2 -2
- package/esm/vs/base/common/hotReload.js.map +1 -1
- package/esm/vs/base/common/iterator.js +1 -1
- package/esm/vs/base/common/iterator.js.map +1 -1
- package/esm/vs/base/common/keyCodes.js +7 -6
- package/esm/vs/base/common/keyCodes.js.map +1 -1
- package/esm/vs/base/common/linkedList.js.map +1 -1
- package/esm/vs/base/common/map.js.map +1 -1
- package/esm/vs/base/common/marked/marked.js +0 -1
- package/esm/vs/base/common/network.js +26 -1
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/normalization.js +19 -6
- package/esm/vs/base/common/normalization.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugLocation.js +1 -2
- package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
- package/esm/vs/base/common/observableInternal/debugName.js +0 -1
- package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
- package/esm/vs/base/common/observableInternal/index.js +4 -4
- package/esm/vs/base/common/observableInternal/index.js.map +1 -1
- package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js +38 -10
- package/esm/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/baseObservable.js +3 -3
- package/esm/vs/base/common/observableInternal/observables/baseObservable.js.map +1 -1
- package/esm/vs/base/common/observableInternal/utils/utils.js +46 -5
- package/esm/vs/base/common/observableInternal/utils/utils.js.map +1 -1
- package/esm/vs/base/common/path.js +1 -0
- package/esm/vs/base/common/path.js.map +1 -1
- package/esm/vs/base/common/strings.js +27 -19
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/editor/browser/config/elementSizeObserver.js +5 -5
- package/esm/vs/editor/browser/config/elementSizeObserver.js.map +1 -1
- package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
- package/esm/vs/editor/browser/config/migrateOptions.js +6 -0
- package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
- package/esm/vs/editor/browser/config/tabFocus.js +4 -2
- package/esm/vs/editor/browser/config/tabFocus.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -0
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
- package/esm/vs/editor/browser/coreCommands.js +1 -2
- package/esm/vs/editor/browser/coreCommands.js.map +1 -1
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +32 -1
- package/esm/vs/editor/browser/observableCodeEditor.js.map +1 -1
- package/esm/vs/editor/browser/services/contribution.js +9 -0
- package/esm/vs/editor/browser/services/contribution.js.map +1 -0
- package/esm/vs/editor/browser/services/editorWorkerService.js +27 -14
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/browser/services/openerService.js +5 -1
- package/esm/vs/editor/browser/services/openerService.js.map +1 -1
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js +1 -1
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
- package/esm/vs/editor/browser/view/renderingContext.js +1 -1
- package/esm/vs/editor/browser/view/renderingContext.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +10 -3
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +3 -4
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/minimap/minimap.js +1 -1
- package/esm/vs/editor/browser/viewParts/minimap/minimap.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +1 -1
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +4 -2
- package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/rulers/rulers.js +1 -3
- package/esm/vs/editor/browser/viewParts/rulers/rulers.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +1 -1
- package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js +2 -1
- package/esm/vs/editor/browser/viewParts/viewLines/domReadingContext.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +6 -18
- package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +0 -7
- package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js.map +1 -1
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +7 -2
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +1 -0
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js.map +1 -1
- package/esm/vs/editor/common/commands/replaceCommand.js +2 -2
- package/esm/vs/editor/common/commands/replaceCommand.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +374 -360
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/core/2d/rect.js +7 -0
- package/esm/vs/editor/common/core/2d/rect.js.map +1 -1
- package/esm/vs/editor/common/core/2d/size.js +20 -0
- package/esm/vs/editor/common/core/2d/size.js.map +1 -0
- package/esm/vs/editor/common/core/editorColorRegistry.js +69 -68
- package/esm/vs/editor/common/core/editorColorRegistry.js.map +1 -1
- package/esm/vs/editor/common/core/ranges/offsetRange.js +9 -0
- package/esm/vs/editor/common/core/ranges/offsetRange.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js +4 -4
- package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
- package/esm/vs/editor/common/editorContextKeys.js +47 -47
- package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
- package/esm/vs/editor/common/languages.js +56 -56
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/editStack.js +1 -1
- package/esm/vs/editor/common/services/languagesAssociations.js +6 -8
- package/esm/vs/editor/common/services/languagesAssociations.js.map +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +11 -10
- package/esm/vs/editor/common/standaloneStrings.js.map +1 -1
- package/esm/vs/editor/common/textModelEditSource.js +1 -1
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +6 -6
- package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +17 -17
- package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelens.js.map +1 -1
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +10 -10
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +14 -0
- package/esm/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js.map +1 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +9 -9
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +2 -2
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +17 -17
- package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findWidget.js +26 -26
- package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +1 -1
- package/esm/vs/editor/contrib/folding/browser/folding.js +20 -20
- package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/format.js +21 -6
- package/esm/vs/editor/contrib/format/browser/format.js.map +1 -1
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +5 -10
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +11 -6
- package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverUtils.js +24 -0
- package/esm/vs/editor/contrib/hover/browser/hoverUtils.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +9 -9
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +5 -5
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +20 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +12 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +18 -16
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +5 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +42 -37
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js +3 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineEdit.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js +8 -8
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineSuggestionItem.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +54 -43
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +12 -12
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +74 -48
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +8 -36
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js +10 -11
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsNewUsers.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js +105 -119
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewInterface.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js +8 -36
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViewProducer.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js +95 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/debugVisualization.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js +17 -9
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsInsertionView.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +415 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +253 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js +103 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/flexBoxLayout.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js +32 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/towersLayout.js.map +1 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js +44 -11
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/utils/utils.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +181 -0
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js.map +1 -0
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -31
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js.map +1 -1
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +10 -10
- package/esm/vs/editor/contrib/message/browser/messageController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +4 -4
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +2 -2
- package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js.map +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +18 -13
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js.map +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/esm/vs/editor/contrib/rename/browser/rename.js +12 -12
- package/esm/vs/editor/contrib/rename/browser/rename.js.map +1 -1
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +17 -17
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +29 -29
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +4 -4
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
- package/esm/vs/editor/editor.all.js +1 -0
- package/esm/vs/editor/editor.all.js.map +1 -1
- package/esm/vs/editor/editor.api.d.ts +9 -5
- package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js +22 -2
- package/esm/vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess.js.map +1 -1
- package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js +39 -0
- package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js.map +1 -0
- package/esm/vs/editor/standalone/browser/standaloneEditor.js +2 -1
- package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneServices.js +3 -21
- package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneWebWorker.js +4 -4
- package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +7 -9
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/actions.js +2 -0
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/actions/common/menuService.js +2 -2
- package/esm/vs/platform/configuration/common/configuration.js +5 -4
- package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationModels.js +21 -10
- package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +3 -3
- package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/contextview/browser/contextViewService.js.map +1 -1
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/list/browser/listService.js.map +1 -1
- package/esm/vs/platform/markers/common/markerService.js +2 -2
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +11 -32
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/media/quickInput.css +9 -3
- package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +35 -14
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js +4 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js +71 -40
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js +21 -8
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeRenderer.js.map +1 -1
- package/esm/vs/platform/telemetry/common/gdprTypings.js.map +1 -1
- package/esm/vs/platform/telemetry/common/telemetry.js.map +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/editorColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
- package/esm/vs/platform/theme/common/colors/miscColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js +12 -0
- package/esm/vs/platform/webWorker/browser/webWorkerDescriptor.js.map +1 -0
- package/esm/vs/platform/webWorker/browser/webWorkerService.js +7 -0
- package/esm/vs/platform/webWorker/browser/webWorkerService.js.map +1 -0
- package/esm/vs/{base/browser/webWorkerFactory.js → platform/webWorker/browser/webWorkerServiceImpl.js} +47 -66
- package/esm/vs/platform/webWorker/browser/webWorkerServiceImpl.js.map +1 -0
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +9 -5
- package/package.json +2 -2
- package/version.txt +1 -1
- package/esm/vs/base/browser/webWorkerFactory.js.map +0 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js +0 -82
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/depend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K,GAAG,MAAM,CAAC;QAClC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,SAAS,IAAI,CAAC;QAC7C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,GAAG,SAAS,IAAI,CAAC;QACjD,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;IAC1G,CAAC;IAEM,UAAU,CAAC,OAAgB;QACjC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;QAC5D,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAClD,CAAC;CACD","file":"stickyScrollWidget.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { createTrustedTypesPolicy } from '../../../../base/browser/trustedTypes.js';\nimport { equals } from '../../../../base/common/arrays.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { ThemeIcon } from '../../../../base/common/themables.js';\nimport './stickyScroll.css';\nimport { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from '../../../browser/editorBrowser.js';\nimport { getColumnOfNodeOffset } from '../../../browser/viewParts/viewLines/viewLine.js';\nimport { EmbeddedCodeEditorWidget } from '../../../browser/widget/codeEditor/embeddedCodeEditorWidget.js';\nimport { EditorLayoutInfo, EditorOption, RenderLineNumbersType } from '../../../common/config/editorOptions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { StringBuilder } from '../../../common/core/stringBuilder.js';\nimport { LineDecoration } from '../../../common/viewLayout/lineDecorations.js';\nimport { CharacterMapping, RenderLineInput, renderViewLine } from '../../../common/viewLayout/viewLineRenderer.js';\nimport { foldingCollapsedIcon, foldingExpandedIcon } from '../../folding/browser/foldingDecorations.js';\nimport { FoldingModel } from '../../folding/browser/foldingModel.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { IViewModel } from '../../../common/viewModel.js';\n\nexport class StickyScrollWidgetState {\n\tconstructor(\n\t\treadonly startLineNumbers: number[],\n\t\treadonly endLineNumbers: number[],\n\t\treadonly lastLineRelativePosition: number,\n\t\treadonly showEndForLine: number | null = null\n\t) { }\n\n\tequals(other: StickyScrollWidgetState | undefined): boolean {\n\t\treturn !!other\n\t\t\t&& this.lastLineRelativePosition === other.lastLineRelativePosition\n\t\t\t&& this.showEndForLine === other.showEndForLine\n\t\t\t&& equals(this.startLineNumbers, other.startLineNumbers)\n\t\t\t&& equals(this.endLineNumbers, other.endLineNumbers);\n\t}\n\n\tstatic get Empty() {\n\t\treturn new StickyScrollWidgetState([], [], 0);\n\t}\n}\n\nconst _ttPolicy = createTrustedTypesPolicy('stickyScrollViewLayer', { createHTML: value => value });\nconst STICKY_INDEX_ATTR = 'data-sticky-line-index';\nconst STICKY_IS_LINE_ATTR = 'data-sticky-is-line';\nconst STICKY_IS_LINE_NUMBER_ATTR = 'data-sticky-is-line-number';\nconst STICKY_IS_FOLDING_ICON_ATTR = 'data-sticky-is-folding-icon';\n\nexport class StickyScrollWidget extends Disposable implements IOverlayWidget {\n\n\tprivate readonly _foldingIconStore = this._register(new DisposableStore());\n\tprivate readonly _rootDomNode: HTMLElement = document.createElement('div');\n\tprivate readonly _lineNumbersDomNode: HTMLElement = document.createElement('div');\n\tprivate readonly _linesDomNodeScrollable: HTMLElement = document.createElement('div');\n\tprivate readonly _linesDomNode: HTMLElement = document.createElement('div');\n\n\tprivate readonly _editor: ICodeEditor;\n\n\tprivate _state: StickyScrollWidgetState | undefined;\n\tprivate _lineHeight: number;\n\tprivate _renderedStickyLines: RenderedStickyLine[] = [];\n\tprivate _lineNumbers: number[] = [];\n\tprivate _lastLineRelativePosition: number = 0;\n\tprivate _minContentWidthInPx: number = 0;\n\tprivate _isOnGlyphMargin: boolean = false;\n\tprivate _height: number = -1;\n\n\tpublic get height(): number { return this._height; }\n\n\tprivate readonly _onDidChangeStickyScrollHeight = this._register(new Emitter<{ height: number }>());\n\tpublic readonly onDidChangeStickyScrollHeight = this._onDidChangeStickyScrollHeight.event;\n\n\tconstructor(\n\t\teditor: ICodeEditor\n\t) {\n\t\tsuper();\n\n\t\tthis._editor = editor;\n\t\tthis._lineHeight = editor.getOption(EditorOption.lineHeight);\n\t\tthis._lineNumbersDomNode.className = 'sticky-widget-line-numbers';\n\t\tthis._lineNumbersDomNode.setAttribute('role', 'none');\n\n\t\tthis._linesDomNode.className = 'sticky-widget-lines';\n\t\tthis._linesDomNode.setAttribute('role', 'list');\n\n\t\tthis._linesDomNodeScrollable.className = 'sticky-widget-lines-scrollable';\n\t\tthis._linesDomNodeScrollable.appendChild(this._linesDomNode);\n\n\t\tthis._rootDomNode.className = 'sticky-widget';\n\t\tthis._rootDomNode.classList.toggle('peek', editor instanceof EmbeddedCodeEditorWidget);\n\t\tthis._rootDomNode.appendChild(this._lineNumbersDomNode);\n\t\tthis._rootDomNode.appendChild(this._linesDomNodeScrollable);\n\t\tthis._setHeight(0);\n\n\t\tconst updateScrollLeftPosition = () => {\n\t\t\tthis._linesDomNode.style.left = this._editor.getOption(EditorOption.stickyScroll).scrollWithEditor ? `-${this._editor.getScrollLeft()}px` : '0px';\n\t\t};\n\t\tthis._register(this._editor.onDidChangeConfiguration((e) => {\n\t\t\tif (e.hasChanged(EditorOption.stickyScroll)) {\n\t\t\t\tupdateScrollLeftPosition();\n\t\t\t}\n\t\t\tif (e.hasChanged(EditorOption.lineHeight)) {\n\t\t\t\tthis._lineHeight = this._editor.getOption(EditorOption.lineHeight);\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._editor.onDidScrollChange((e) => {\n\t\t\tif (e.scrollLeftChanged) {\n\t\t\t\tupdateScrollLeftPosition();\n\t\t\t}\n\t\t\tif (e.scrollWidthChanged) {\n\t\t\t\tthis._updateWidgetWidth();\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._editor.onDidChangeModel(() => {\n\t\t\tupdateScrollLeftPosition();\n\t\t\tthis._updateWidgetWidth();\n\t\t}));\n\t\tupdateScrollLeftPosition();\n\n\t\tthis._register(this._editor.onDidLayoutChange((e) => {\n\t\t\tthis._updateWidgetWidth();\n\t\t}));\n\t\tthis._updateWidgetWidth();\n\t}\n\n\tget lineNumbers(): number[] {\n\t\treturn this._lineNumbers;\n\t}\n\n\tget lineNumberCount(): number {\n\t\treturn this._lineNumbers.length;\n\t}\n\n\tgetRenderedStickyLine(lineNumber: number): RenderedStickyLine | undefined {\n\t\treturn this._renderedStickyLines.find(stickyLine => stickyLine.lineNumber === lineNumber);\n\t}\n\n\tgetCurrentLines(): readonly number[] {\n\t\treturn this._lineNumbers;\n\t}\n\n\tsetState(state: StickyScrollWidgetState | undefined, foldingModel: FoldingModel | undefined, rebuildFromIndexCandidate?: number): void {\n\t\tconst currentStateAndPreviousStateUndefined = !this._state && !state;\n\t\tconst currentStateDefinedAndEqualsPreviousState = this._state && this._state.equals(state);\n\t\tif (rebuildFromIndexCandidate === undefined && (currentStateAndPreviousStateUndefined || currentStateDefinedAndEqualsPreviousState)) {\n\t\t\treturn;\n\t\t}\n\t\tconst data = this._findRenderingData(state);\n\t\tconst previousLineNumbers = this._lineNumbers;\n\t\tthis._lineNumbers = data.lineNumbers;\n\t\tthis._lastLineRelativePosition = data.lastLineRelativePosition;\n\t\tconst rebuildFromIndex = this._findIndexToRebuildFrom(previousLineNumbers, this._lineNumbers, rebuildFromIndexCandidate);\n\t\tthis._renderRootNode(this._lineNumbers, this._lastLineRelativePosition, foldingModel, rebuildFromIndex);\n\t\tthis._state = state;\n\t}\n\n\tprivate _findRenderingData(state: StickyScrollWidgetState | undefined): { lineNumbers: number[]; lastLineRelativePosition: number } {\n\t\tif (!state) {\n\t\t\treturn { lineNumbers: [], lastLineRelativePosition: 0 };\n\t\t}\n\t\tconst candidateLineNumbers = [...state.startLineNumbers];\n\t\tif (state.showEndForLine !== null) {\n\t\t\tcandidateLineNumbers[state.showEndForLine] = state.endLineNumbers[state.showEndForLine];\n\t\t}\n\t\tlet totalHeight = 0;\n\t\tfor (let i = 0; i < candidateLineNumbers.length; i++) {\n\t\t\ttotalHeight += this._editor.getLineHeightForPosition(new Position(candidateLineNumbers[i], 1));\n\t\t}\n\t\tif (totalHeight === 0) {\n\t\t\treturn { lineNumbers: [], lastLineRelativePosition: 0 };\n\t\t}\n\t\treturn { lineNumbers: candidateLineNumbers, lastLineRelativePosition: state.lastLineRelativePosition };\n\t}\n\n\tprivate _findIndexToRebuildFrom(previousLineNumbers: number[], newLineNumbers: number[], rebuildFromIndexCandidate?: number): number {\n\t\tif (newLineNumbers.length === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (rebuildFromIndexCandidate !== undefined) {\n\t\t\treturn rebuildFromIndexCandidate;\n\t\t}\n\t\tconst validIndex = newLineNumbers.findIndex(startLineNumber => !previousLineNumbers.includes(startLineNumber));\n\t\treturn validIndex === -1 ? 0 : validIndex;\n\t}\n\n\tprivate _updateWidgetWidth(): void {\n\t\tconst layoutInfo = this._editor.getLayoutInfo();\n\t\tconst lineNumbersWidth = layoutInfo.contentLeft;\n\t\tthis._lineNumbersDomNode.style.width = `${lineNumbersWidth}px`;\n\t\tthis._linesDomNodeScrollable.style.setProperty('--vscode-editorStickyScroll-scrollableWidth', `${this._editor.getScrollWidth() - layoutInfo.verticalScrollbarWidth}px`);\n\t\tthis._rootDomNode.style.width = `${layoutInfo.width - layoutInfo.verticalScrollbarWidth}px`;\n\t}\n\n\tprivate _useFoldingOpacityTransition(requireTransitions: boolean) {\n\t\tthis._lineNumbersDomNode.style.setProperty('--vscode-editorStickyScroll-foldingOpacityTransition', `opacity ${requireTransitions ? 0.5 : 0}s`);\n\t}\n\n\tprivate _setFoldingIconsVisibility(allVisible: boolean) {\n\t\tfor (const line of this._renderedStickyLines) {\n\t\t\tconst foldingIcon = line.foldingIcon;\n\t\t\tif (!foldingIcon) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfoldingIcon.setVisible(allVisible ? true : foldingIcon.isCollapsed);\n\t\t}\n\t}\n\n\tprivate async _renderRootNode(lineNumbers: number[], lastLineRelativePosition: number, foldingModel: FoldingModel | undefined, rebuildFromIndex: number): Promise<void> {\n\t\tconst viewModel = this._editor._getViewModel();\n\t\tif (!viewModel) {\n\t\t\tthis._clearWidget();\n\t\t\treturn;\n\t\t}\n\t\tif (lineNumbers.length === 0) {\n\t\t\tthis._clearWidget();\n\t\t\treturn;\n\t\t}\n\t\tconst renderedStickyLines: RenderedStickyLine[] = [];\n\t\tconst lastLineNumber = lineNumbers[lineNumbers.length - 1];\n\t\tlet top: number = 0;\n\t\tfor (let i = 0; i < this._renderedStickyLines.length; i++) {\n\t\t\tif (i < rebuildFromIndex) {\n\t\t\t\tconst renderedLine = this._renderedStickyLines[i];\n\t\t\t\trenderedStickyLines.push(this._updatePosition(renderedLine, top, renderedLine.lineNumber === lastLineNumber));\n\t\t\t\ttop += renderedLine.height;\n\t\t\t} else {\n\t\t\t\tconst renderedLine = this._renderedStickyLines[i];\n\t\t\t\trenderedLine.lineNumberDomNode.remove();\n\t\t\t\trenderedLine.lineDomNode.remove();\n\t\t\t}\n\t\t}\n\t\tconst layoutInfo = this._editor.getLayoutInfo();\n\t\tfor (let i = rebuildFromIndex; i < lineNumbers.length; i++) {\n\t\t\tconst stickyLine = this._renderChildNode(viewModel, i, lineNumbers[i], top, lastLineNumber === lineNumbers[i], foldingModel, layoutInfo);\n\t\t\ttop += stickyLine.height;\n\t\t\tthis._linesDomNode.appendChild(stickyLine.lineDomNode);\n\t\t\tthis._lineNumbersDomNode.appendChild(stickyLine.lineNumberDomNode);\n\t\t\trenderedStickyLines.push(stickyLine);\n\t\t}\n\t\tif (foldingModel) {\n\t\t\tthis._setFoldingHoverListeners();\n\t\t\tthis._useFoldingOpacityTransition(!this._isOnGlyphMargin);\n\t\t}\n\t\tthis._minContentWidthInPx = Math.max(...this._renderedStickyLines.map(l => l.scrollWidth)) + layoutInfo.verticalScrollbarWidth;\n\t\tthis._renderedStickyLines = renderedStickyLines;\n\t\tthis._setHeight(top + lastLineRelativePosition);\n\t\tthis._editor.layoutOverlayWidget(this);\n\t}\n\n\tprivate _clearWidget(): void {\n\t\tfor (let i = 0; i < this._renderedStickyLines.length; i++) {\n\t\t\tconst stickyLine = this._renderedStickyLines[i];\n\t\t\tstickyLine.lineNumberDomNode.remove();\n\t\t\tstickyLine.lineDomNode.remove();\n\t\t}\n\t\tthis._setHeight(0);\n\t}\n\n\tprivate _setHeight(height: number): void {\n\t\tif (this._height === height) {\n\t\t\treturn;\n\t\t}\n\t\tthis._height = height;\n\n\t\tif (this._height === 0) {\n\t\t\tthis._rootDomNode.style.display = 'none';\n\t\t} else {\n\t\t\tthis._rootDomNode.style.display = 'block';\n\t\t\tthis._lineNumbersDomNode.style.height = `${this._height}px`;\n\t\t\tthis._linesDomNodeScrollable.style.height = `${this._height}px`;\n\t\t\tthis._rootDomNode.style.height = `${this._height}px`;\n\t\t}\n\n\t\tthis._onDidChangeStickyScrollHeight.fire({ height: this._height });\n\t}\n\n\tprivate _setFoldingHoverListeners(): void {\n\t\tconst showFoldingControls: 'mouseover' | 'always' | 'never' = this._editor.getOption(EditorOption.showFoldingControls);\n\t\tif (showFoldingControls !== 'mouseover') {\n\t\t\treturn;\n\t\t}\n\t\tthis._foldingIconStore.clear();\n\t\tthis._foldingIconStore.add(dom.addDisposableListener(this._lineNumbersDomNode, dom.EventType.MOUSE_ENTER, () => {\n\t\t\tthis._isOnGlyphMargin = true;\n\t\t\tthis._setFoldingIconsVisibility(true);\n\t\t}));\n\t\tthis._foldingIconStore.add(dom.addDisposableListener(this._lineNumbersDomNode, dom.EventType.MOUSE_LEAVE, () => {\n\t\t\tthis._isOnGlyphMargin = false;\n\t\t\tthis._useFoldingOpacityTransition(true);\n\t\t\tthis._setFoldingIconsVisibility(false);\n\t\t}));\n\t}\n\n\tprivate _renderChildNode(viewModel: IViewModel, index: number, line: number, top: number, isLastLine: boolean, foldingModel: FoldingModel | undefined, layoutInfo: EditorLayoutInfo): RenderedStickyLine {\n\t\tconst viewLineNumber = viewModel.coordinatesConverter.convertModelPositionToViewPosition(new Position(line, 1)).lineNumber;\n\t\tconst lineRenderingData = viewModel.getViewLineRenderingData(viewLineNumber);\n\t\tconst lineNumberOption = this._editor.getOption(EditorOption.lineNumbers);\n\t\tconst verticalScrollbarSize = this._editor.getOption(EditorOption.scrollbar).verticalScrollbarSize;\n\n\t\tlet actualInlineDecorations: LineDecoration[];\n\t\ttry {\n\t\t\tactualInlineDecorations = LineDecoration.filter(lineRenderingData.inlineDecorations, viewLineNumber, lineRenderingData.minColumn, lineRenderingData.maxColumn);\n\t\t} catch (err) {\n\t\t\tactualInlineDecorations = [];\n\t\t}\n\n\t\tconst lineHeight = this._editor.getLineHeightForPosition(new Position(line, 1));\n\t\tconst textDirection = viewModel.getTextDirection(line);\n\t\tconst renderLineInput: RenderLineInput = new RenderLineInput(true, true, lineRenderingData.content,\n\t\t\tlineRenderingData.continuesWithWrappedLine,\n\t\t\tlineRenderingData.isBasicASCII, lineRenderingData.containsRTL, 0,\n\t\t\tlineRenderingData.tokens, actualInlineDecorations,\n\t\t\tlineRenderingData.tabSize, lineRenderingData.startVisibleColumn,\n\t\t\t1, 1, 1, 500, 'none', true, true, null,\n\t\t\ttextDirection, verticalScrollbarSize\n\t\t);\n\n\t\tconst sb = new StringBuilder(2000);\n\t\tconst renderOutput = renderViewLine(renderLineInput, sb);\n\n\t\tlet newLine;\n\t\tif (_ttPolicy) {\n\t\t\tnewLine = _ttPolicy.createHTML(sb.build());\n\t\t} else {\n\t\t\tnewLine = sb.build();\n\t\t}\n\n\t\tconst lineHTMLNode = document.createElement('span');\n\t\tlineHTMLNode.setAttribute(STICKY_INDEX_ATTR, String(index));\n\t\tlineHTMLNode.setAttribute(STICKY_IS_LINE_ATTR, '');\n\t\tlineHTMLNode.setAttribute('role', 'listitem');\n\t\tlineHTMLNode.tabIndex = 0;\n\t\tlineHTMLNode.className = 'sticky-line-content';\n\t\tlineHTMLNode.classList.add(`stickyLine${line}`);\n\t\tlineHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tlineHTMLNode.innerHTML = newLine as string;\n\n\t\tconst lineNumberHTMLNode = document.createElement('span');\n\t\tlineNumberHTMLNode.setAttribute(STICKY_INDEX_ATTR, String(index));\n\t\tlineNumberHTMLNode.setAttribute(STICKY_IS_LINE_NUMBER_ATTR, '');\n\t\tlineNumberHTMLNode.className = 'sticky-line-number';\n\t\tlineNumberHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tconst lineNumbersWidth = layoutInfo.contentLeft;\n\t\tlineNumberHTMLNode.style.width = `${lineNumbersWidth}px`;\n\n\t\tconst innerLineNumberHTML = document.createElement('span');\n\t\tif (lineNumberOption.renderType === RenderLineNumbersType.On || lineNumberOption.renderType === RenderLineNumbersType.Interval && line % 10 === 0) {\n\t\t\tinnerLineNumberHTML.innerText = line.toString();\n\t\t} else if (lineNumberOption.renderType === RenderLineNumbersType.Relative) {\n\t\t\tinnerLineNumberHTML.innerText = Math.abs(line - this._editor.getPosition()!.lineNumber).toString();\n\t\t}\n\t\tinnerLineNumberHTML.className = 'sticky-line-number-inner';\n\t\tinnerLineNumberHTML.style.width = `${layoutInfo.lineNumbersWidth}px`;\n\t\tinnerLineNumberHTML.style.paddingLeft = `${layoutInfo.lineNumbersLeft}px`;\n\n\t\tlineNumberHTMLNode.appendChild(innerLineNumberHTML);\n\t\tconst foldingIcon = this._renderFoldingIconForLine(foldingModel, line);\n\t\tif (foldingIcon) {\n\t\t\tlineNumberHTMLNode.appendChild(foldingIcon.domNode);\n\t\t\tfoldingIcon.domNode.style.left = `${layoutInfo.lineNumbersWidth + layoutInfo.lineNumbersLeft}px`;\n\t\t\tfoldingIcon.domNode.style.lineHeight = `${lineHeight}px`;\n\t\t}\n\n\t\tthis._editor.applyFontInfo(lineHTMLNode);\n\t\tthis._editor.applyFontInfo(lineNumberHTMLNode);\n\n\t\tlineNumberHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tlineHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tlineNumberHTMLNode.style.height = `${lineHeight}px`;\n\t\tlineHTMLNode.style.height = `${lineHeight}px`;\n\n\t\tconst renderedLine = new RenderedStickyLine(\n\t\t\tindex,\n\t\t\tline,\n\t\t\tlineHTMLNode,\n\t\t\tlineNumberHTMLNode,\n\t\t\tfoldingIcon,\n\t\t\trenderOutput.characterMapping,\n\t\t\tlineHTMLNode.scrollWidth,\n\t\t\tlineHeight\n\t\t);\n\t\treturn this._updatePosition(renderedLine, top, isLastLine);\n\t}\n\n\tprivate _updatePosition(stickyLine: RenderedStickyLine, top: number, isLastLine: boolean): RenderedStickyLine {\n\t\tconst lineHTMLNode = stickyLine.lineDomNode;\n\t\tconst lineNumberHTMLNode = stickyLine.lineNumberDomNode;\n\t\tif (isLastLine) {\n\t\t\tconst zIndex = '0';\n\t\t\tlineHTMLNode.style.zIndex = zIndex;\n\t\t\tlineNumberHTMLNode.style.zIndex = zIndex;\n\t\t\tconst updatedTop = `${top + this._lastLineRelativePosition + (stickyLine.foldingIcon?.isCollapsed ? 1 : 0)}px`;\n\t\t\tlineHTMLNode.style.top = updatedTop;\n\t\t\tlineNumberHTMLNode.style.top = updatedTop;\n\t\t} else {\n\t\t\tconst zIndex = '1';\n\t\t\tlineHTMLNode.style.zIndex = zIndex;\n\t\t\tlineNumberHTMLNode.style.zIndex = zIndex;\n\t\t\tlineHTMLNode.style.top = `${top}px`;\n\t\t\tlineNumberHTMLNode.style.top = `${top}px`;\n\t\t}\n\t\treturn stickyLine;\n\t}\n\n\tprivate _renderFoldingIconForLine(foldingModel: FoldingModel | undefined, line: number): StickyFoldingIcon | undefined {\n\t\tconst showFoldingControls: 'mouseover' | 'always' | 'never' = this._editor.getOption(EditorOption.showFoldingControls);\n\t\tif (!foldingModel || showFoldingControls === 'never') {\n\t\t\treturn;\n\t\t}\n\t\tconst foldingRegions = foldingModel.regions;\n\t\tconst indexOfFoldingRegion = foldingRegions.findRange(line);\n\t\tconst startLineNumber = foldingRegions.getStartLineNumber(indexOfFoldingRegion);\n\t\tconst isFoldingScope = line === startLineNumber;\n\t\tif (!isFoldingScope) {\n\t\t\treturn;\n\t\t}\n\t\tconst isCollapsed = foldingRegions.isCollapsed(indexOfFoldingRegion);\n\t\tconst foldingIcon = new StickyFoldingIcon(isCollapsed, startLineNumber, foldingRegions.getEndLineNumber(indexOfFoldingRegion), this._lineHeight);\n\t\tfoldingIcon.setVisible(this._isOnGlyphMargin ? true : (isCollapsed || showFoldingControls === 'always'));\n\t\tfoldingIcon.domNode.setAttribute(STICKY_IS_FOLDING_ICON_ATTR, '');\n\t\treturn foldingIcon;\n\t}\n\n\tgetId(): string {\n\t\treturn 'editor.contrib.stickyScrollWidget';\n\t}\n\n\tgetDomNode(): HTMLElement {\n\t\treturn this._rootDomNode;\n\t}\n\n\tgetPosition(): IOverlayWidgetPosition | null {\n\t\treturn {\n\t\t\tpreference: OverlayWidgetPositionPreference.TOP_CENTER,\n\t\t\tstackOridinal: 10,\n\t\t};\n\t}\n\n\tgetMinContentWidthInPx(): number {\n\t\treturn this._minContentWidthInPx;\n\t}\n\n\tfocusLineWithIndex(index: number) {\n\t\tif (0 <= index && index < this._renderedStickyLines.length) {\n\t\t\tthis._renderedStickyLines[index].lineDomNode.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Given a leaf dom node, tries to find the editor position.\n\t */\n\tgetEditorPositionFromNode(spanDomNode: HTMLElement | null): Position | null {\n\t\tif (!spanDomNode || spanDomNode.children.length > 0) {\n\t\t\t// This is not a leaf node\n\t\t\treturn null;\n\t\t}\n\t\tconst renderedStickyLine = this._getRenderedStickyLineFromChildDomNode(spanDomNode);\n\t\tif (!renderedStickyLine) {\n\t\t\treturn null;\n\t\t}\n\t\tconst column = getColumnOfNodeOffset(renderedStickyLine.characterMapping, spanDomNode, 0);\n\t\treturn new Position(renderedStickyLine.lineNumber, column);\n\t}\n\n\tgetLineNumberFromChildDomNode(domNode: HTMLElement | null): number | null {\n\t\treturn this._getRenderedStickyLineFromChildDomNode(domNode)?.lineNumber ?? null;\n\t}\n\n\tprivate _getRenderedStickyLineFromChildDomNode(domNode: HTMLElement | null): RenderedStickyLine | null {\n\t\tconst index = this.getLineIndexFromChildDomNode(domNode);\n\t\tif (index === null || index < 0 || index >= this._renderedStickyLines.length) {\n\t\t\treturn null;\n\t\t}\n\t\treturn this._renderedStickyLines[index];\n\t}\n\n\t/**\n\t * Given a child dom node, tries to find the line number attribute that was stored in the node.\n\t * @returns the attribute value or null if none is found.\n\t */\n\tgetLineIndexFromChildDomNode(domNode: HTMLElement | null): number | null {\n\t\tconst lineIndex = this._getAttributeValue(domNode, STICKY_INDEX_ATTR);\n\t\treturn lineIndex ? parseInt(lineIndex, 10) : null;\n\t}\n\n\t/**\n\t * Given a child dom node, tries to find if it is (contained in) a sticky line.\n\t * @returns a boolean.\n\t */\n\tisInStickyLine(domNode: HTMLElement | null): boolean {\n\t\tconst isInLine = this._getAttributeValue(domNode, STICKY_IS_LINE_ATTR);\n\t\treturn isInLine !== undefined;\n\t}\n\n\t/**\n\t * Given a child dom node, tries to find if this dom node is (contained in) a sticky folding icon.\n\t * @returns a boolean.\n\t */\n\tisInFoldingIconDomNode(domNode: HTMLElement | null): boolean {\n\t\tconst isInFoldingIcon = this._getAttributeValue(domNode, STICKY_IS_FOLDING_ICON_ATTR);\n\t\treturn isInFoldingIcon !== undefined;\n\t}\n\n\t/**\n\t * Given the dom node, finds if it or its parent sequence contains the given attribute.\n\t * @returns the attribute value or undefined.\n\t */\n\tprivate _getAttributeValue(domNode: HTMLElement | null, attribute: string): string | undefined {\n\t\twhile (domNode && domNode !== this._rootDomNode) {\n\t\t\tconst line = domNode.getAttribute(attribute);\n\t\t\tif (line !== null) {\n\t\t\t\treturn line;\n\t\t\t}\n\t\t\tdomNode = domNode.parentElement;\n\t\t}\n\t\treturn;\n\t}\n}\n\nclass RenderedStickyLine {\n\tconstructor(\n\t\tpublic readonly index: number,\n\t\tpublic readonly lineNumber: number,\n\t\tpublic readonly lineDomNode: HTMLElement,\n\t\tpublic readonly lineNumberDomNode: HTMLElement,\n\t\tpublic readonly foldingIcon: StickyFoldingIcon | undefined,\n\t\tpublic readonly characterMapping: CharacterMapping,\n\t\tpublic readonly scrollWidth: number,\n\t\tpublic readonly height: number\n\t) { }\n}\n\nclass StickyFoldingIcon {\n\n\tpublic domNode: HTMLElement;\n\n\tconstructor(\n\t\tpublic isCollapsed: boolean,\n\t\tpublic foldingStartLine: number,\n\t\tpublic foldingEndLine: number,\n\t\tpublic dimension: number\n\t) {\n\t\tthis.domNode = document.createElement('div');\n\t\tthis.domNode.style.width = `26px`;\n\t\tthis.domNode.style.height = `${dimension}px`;\n\t\tthis.domNode.style.lineHeight = `${dimension}px`;\n\t\tthis.domNode.className = ThemeIcon.asClassName(isCollapsed ? foldingCollapsedIcon : foldingExpandedIcon);\n\t}\n\n\tpublic setVisible(visible: boolean) {\n\t\tthis.domNode.style.cursor = visible ? 'pointer' : 'default';\n\t\tthis.domNode.style.opacity = visible ? '1' : '0';\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { createTrustedTypesPolicy } from '../../../../base/browser/trustedTypes.js';\nimport { equals } from '../../../../base/common/arrays.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { ThemeIcon } from '../../../../base/common/themables.js';\nimport './stickyScroll.css';\nimport { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from '../../../browser/editorBrowser.js';\nimport { getColumnOfNodeOffset } from '../../../browser/viewParts/viewLines/viewLine.js';\nimport { EmbeddedCodeEditorWidget } from '../../../browser/widget/codeEditor/embeddedCodeEditorWidget.js';\nimport { EditorLayoutInfo, EditorOption, RenderLineNumbersType } from '../../../common/config/editorOptions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { StringBuilder } from '../../../common/core/stringBuilder.js';\nimport { LineDecoration } from '../../../common/viewLayout/lineDecorations.js';\nimport { CharacterMapping, RenderLineInput, renderViewLine } from '../../../common/viewLayout/viewLineRenderer.js';\nimport { foldingCollapsedIcon, foldingExpandedIcon } from '../../folding/browser/foldingDecorations.js';\nimport { FoldingModel } from '../../folding/browser/foldingModel.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { IViewModel } from '../../../common/viewModel.js';\n\nexport class StickyScrollWidgetState {\n\tconstructor(\n\t\treadonly startLineNumbers: number[],\n\t\treadonly endLineNumbers: number[],\n\t\treadonly lastLineRelativePosition: number,\n\t\treadonly showEndForLine: number | null = null\n\t) { }\n\n\tequals(other: StickyScrollWidgetState | undefined): boolean {\n\t\treturn !!other\n\t\t\t&& this.lastLineRelativePosition === other.lastLineRelativePosition\n\t\t\t&& this.showEndForLine === other.showEndForLine\n\t\t\t&& equals(this.startLineNumbers, other.startLineNumbers)\n\t\t\t&& equals(this.endLineNumbers, other.endLineNumbers);\n\t}\n\n\tstatic get Empty() {\n\t\treturn new StickyScrollWidgetState([], [], 0);\n\t}\n}\n\nconst _ttPolicy = createTrustedTypesPolicy('stickyScrollViewLayer', { createHTML: value => value });\nconst STICKY_INDEX_ATTR = 'data-sticky-line-index';\nconst STICKY_IS_LINE_ATTR = 'data-sticky-is-line';\nconst STICKY_IS_LINE_NUMBER_ATTR = 'data-sticky-is-line-number';\nconst STICKY_IS_FOLDING_ICON_ATTR = 'data-sticky-is-folding-icon';\n\nexport class StickyScrollWidget extends Disposable implements IOverlayWidget {\n\n\tprivate readonly _foldingIconStore = this._register(new DisposableStore());\n\tprivate readonly _rootDomNode: HTMLElement = document.createElement('div');\n\tprivate readonly _lineNumbersDomNode: HTMLElement = document.createElement('div');\n\tprivate readonly _linesDomNodeScrollable: HTMLElement = document.createElement('div');\n\tprivate readonly _linesDomNode: HTMLElement = document.createElement('div');\n\n\tprivate readonly _editor: ICodeEditor;\n\n\tprivate _state: StickyScrollWidgetState | undefined;\n\tprivate _lineHeight: number;\n\tprivate _renderedStickyLines: RenderedStickyLine[] = [];\n\tprivate _lineNumbers: number[] = [];\n\tprivate _lastLineRelativePosition: number = 0;\n\tprivate _minContentWidthInPx: number = 0;\n\tprivate _isOnGlyphMargin: boolean = false;\n\tprivate _height: number = -1;\n\n\tpublic get height(): number { return this._height; }\n\n\tprivate readonly _onDidChangeStickyScrollHeight = this._register(new Emitter<{ height: number }>());\n\tpublic readonly onDidChangeStickyScrollHeight = this._onDidChangeStickyScrollHeight.event;\n\n\tconstructor(\n\t\teditor: ICodeEditor\n\t) {\n\t\tsuper();\n\n\t\tthis._editor = editor;\n\t\tthis._lineHeight = editor.getOption(EditorOption.lineHeight);\n\t\tthis._lineNumbersDomNode.className = 'sticky-widget-line-numbers';\n\t\tthis._lineNumbersDomNode.setAttribute('role', 'none');\n\n\t\tthis._linesDomNode.className = 'sticky-widget-lines';\n\t\tthis._linesDomNode.setAttribute('role', 'list');\n\n\t\tthis._linesDomNodeScrollable.className = 'sticky-widget-lines-scrollable';\n\t\tthis._linesDomNodeScrollable.appendChild(this._linesDomNode);\n\n\t\tthis._rootDomNode.className = 'sticky-widget';\n\t\tthis._rootDomNode.classList.toggle('peek', editor instanceof EmbeddedCodeEditorWidget);\n\t\tthis._rootDomNode.appendChild(this._lineNumbersDomNode);\n\t\tthis._rootDomNode.appendChild(this._linesDomNodeScrollable);\n\t\tthis._setHeight(0);\n\n\t\tconst updateScrollLeftPosition = () => {\n\t\t\tthis._linesDomNode.style.left = this._editor.getOption(EditorOption.stickyScroll).scrollWithEditor ? `-${this._editor.getScrollLeft()}px` : '0px';\n\t\t};\n\t\tthis._register(this._editor.onDidChangeConfiguration((e) => {\n\t\t\tif (e.hasChanged(EditorOption.stickyScroll)) {\n\t\t\t\tupdateScrollLeftPosition();\n\t\t\t}\n\t\t\tif (e.hasChanged(EditorOption.lineHeight)) {\n\t\t\t\tthis._lineHeight = this._editor.getOption(EditorOption.lineHeight);\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._editor.onDidScrollChange((e) => {\n\t\t\tif (e.scrollLeftChanged) {\n\t\t\t\tupdateScrollLeftPosition();\n\t\t\t}\n\t\t\tif (e.scrollWidthChanged) {\n\t\t\t\tthis._updateWidgetWidth();\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._editor.onDidChangeModel(() => {\n\t\t\tupdateScrollLeftPosition();\n\t\t\tthis._updateWidgetWidth();\n\t\t}));\n\t\tupdateScrollLeftPosition();\n\n\t\tthis._register(this._editor.onDidLayoutChange((e) => {\n\t\t\tthis._updateWidgetWidth();\n\t\t}));\n\t\tthis._updateWidgetWidth();\n\t}\n\n\tget lineNumbers(): number[] {\n\t\treturn this._lineNumbers;\n\t}\n\n\tget lineNumberCount(): number {\n\t\treturn this._lineNumbers.length;\n\t}\n\n\tgetRenderedStickyLine(lineNumber: number): RenderedStickyLine | undefined {\n\t\treturn this._renderedStickyLines.find(stickyLine => stickyLine.lineNumber === lineNumber);\n\t}\n\n\tgetCurrentLines(): readonly number[] {\n\t\treturn this._lineNumbers;\n\t}\n\n\tsetState(state: StickyScrollWidgetState | undefined, foldingModel: FoldingModel | undefined, rebuildFromIndexCandidate?: number): void {\n\t\tconst currentStateAndPreviousStateUndefined = !this._state && !state;\n\t\tconst currentStateDefinedAndEqualsPreviousState = this._state && this._state.equals(state);\n\t\tif (rebuildFromIndexCandidate === undefined && (currentStateAndPreviousStateUndefined || currentStateDefinedAndEqualsPreviousState)) {\n\t\t\treturn;\n\t\t}\n\t\tconst data = this._findRenderingData(state);\n\t\tconst previousLineNumbers = this._lineNumbers;\n\t\tthis._lineNumbers = data.lineNumbers;\n\t\tthis._lastLineRelativePosition = data.lastLineRelativePosition;\n\t\tconst rebuildFromIndex = this._findIndexToRebuildFrom(previousLineNumbers, this._lineNumbers, rebuildFromIndexCandidate);\n\t\tthis._renderRootNode(this._lineNumbers, this._lastLineRelativePosition, foldingModel, rebuildFromIndex);\n\t\tthis._state = state;\n\t}\n\n\tprivate _findRenderingData(state: StickyScrollWidgetState | undefined): { lineNumbers: number[]; lastLineRelativePosition: number } {\n\t\tif (!state) {\n\t\t\treturn { lineNumbers: [], lastLineRelativePosition: 0 };\n\t\t}\n\t\tconst candidateLineNumbers = [...state.startLineNumbers];\n\t\tif (state.showEndForLine !== null) {\n\t\t\tcandidateLineNumbers[state.showEndForLine] = state.endLineNumbers[state.showEndForLine];\n\t\t}\n\t\tlet totalHeight = 0;\n\t\tfor (let i = 0; i < candidateLineNumbers.length; i++) {\n\t\t\ttotalHeight += this._editor.getLineHeightForPosition(new Position(candidateLineNumbers[i], 1));\n\t\t}\n\t\tif (totalHeight === 0) {\n\t\t\treturn { lineNumbers: [], lastLineRelativePosition: 0 };\n\t\t}\n\t\treturn { lineNumbers: candidateLineNumbers, lastLineRelativePosition: state.lastLineRelativePosition };\n\t}\n\n\tprivate _findIndexToRebuildFrom(previousLineNumbers: number[], newLineNumbers: number[], rebuildFromIndexCandidate?: number): number {\n\t\tif (newLineNumbers.length === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (rebuildFromIndexCandidate !== undefined) {\n\t\t\treturn rebuildFromIndexCandidate;\n\t\t}\n\t\tconst validIndex = newLineNumbers.findIndex(startLineNumber => !previousLineNumbers.includes(startLineNumber));\n\t\treturn validIndex === -1 ? 0 : validIndex;\n\t}\n\n\tprivate _updateWidgetWidth(): void {\n\t\tconst layoutInfo = this._editor.getLayoutInfo();\n\t\tconst lineNumbersWidth = layoutInfo.contentLeft;\n\t\tthis._lineNumbersDomNode.style.width = `${lineNumbersWidth}px`;\n\t\tthis._linesDomNodeScrollable.style.setProperty('--vscode-editorStickyScroll-scrollableWidth', `${this._editor.getScrollWidth() - layoutInfo.verticalScrollbarWidth}px`);\n\t\tthis._rootDomNode.style.width = `${layoutInfo.width - layoutInfo.verticalScrollbarWidth}px`;\n\t}\n\n\tprivate _useFoldingOpacityTransition(requireTransitions: boolean) {\n\t\tthis._lineNumbersDomNode.style.setProperty('--vscode-editorStickyScroll-foldingOpacityTransition', `opacity ${requireTransitions ? 0.5 : 0}s`);\n\t}\n\n\tprivate _setFoldingIconsVisibility(allVisible: boolean) {\n\t\tfor (const line of this._renderedStickyLines) {\n\t\t\tconst foldingIcon = line.foldingIcon;\n\t\t\tif (!foldingIcon) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfoldingIcon.setVisible(allVisible ? true : foldingIcon.isCollapsed);\n\t\t}\n\t}\n\n\tprivate async _renderRootNode(lineNumbers: number[], lastLineRelativePosition: number, foldingModel: FoldingModel | undefined, rebuildFromIndex: number): Promise<void> {\n\t\tconst viewModel = this._editor._getViewModel();\n\t\tif (!viewModel) {\n\t\t\tthis._clearWidget();\n\t\t\treturn;\n\t\t}\n\t\tif (lineNumbers.length === 0) {\n\t\t\tthis._clearWidget();\n\t\t\treturn;\n\t\t}\n\t\tconst renderedStickyLines: RenderedStickyLine[] = [];\n\t\tconst lastLineNumber = lineNumbers[lineNumbers.length - 1];\n\t\tlet top: number = 0;\n\t\tfor (let i = 0; i < this._renderedStickyLines.length; i++) {\n\t\t\tif (i < rebuildFromIndex) {\n\t\t\t\tconst renderedLine = this._renderedStickyLines[i];\n\t\t\t\trenderedStickyLines.push(this._updatePosition(renderedLine, top, renderedLine.lineNumber === lastLineNumber));\n\t\t\t\ttop += renderedLine.height;\n\t\t\t} else {\n\t\t\t\tconst renderedLine = this._renderedStickyLines[i];\n\t\t\t\trenderedLine.lineNumberDomNode.remove();\n\t\t\t\trenderedLine.lineDomNode.remove();\n\t\t\t}\n\t\t}\n\t\tconst layoutInfo = this._editor.getLayoutInfo();\n\t\tfor (let i = rebuildFromIndex; i < lineNumbers.length; i++) {\n\t\t\tconst stickyLine = this._renderChildNode(viewModel, i, lineNumbers[i], top, lastLineNumber === lineNumbers[i], foldingModel, layoutInfo);\n\t\t\ttop += stickyLine.height;\n\t\t\tthis._linesDomNode.appendChild(stickyLine.lineDomNode);\n\t\t\tthis._lineNumbersDomNode.appendChild(stickyLine.lineNumberDomNode);\n\t\t\trenderedStickyLines.push(stickyLine);\n\t\t}\n\t\tif (foldingModel) {\n\t\t\tthis._setFoldingHoverListeners();\n\t\t\tthis._useFoldingOpacityTransition(!this._isOnGlyphMargin);\n\t\t}\n\t\tthis._minContentWidthInPx = Math.max(...this._renderedStickyLines.map(l => l.scrollWidth)) + layoutInfo.verticalScrollbarWidth;\n\t\tthis._renderedStickyLines = renderedStickyLines;\n\t\tthis._setHeight(top + lastLineRelativePosition);\n\t\tthis._editor.layoutOverlayWidget(this);\n\t}\n\n\tprivate _clearWidget(): void {\n\t\tfor (let i = 0; i < this._renderedStickyLines.length; i++) {\n\t\t\tconst stickyLine = this._renderedStickyLines[i];\n\t\t\tstickyLine.lineNumberDomNode.remove();\n\t\t\tstickyLine.lineDomNode.remove();\n\t\t}\n\t\tthis._setHeight(0);\n\t}\n\n\tprivate _setHeight(height: number): void {\n\t\tif (this._height === height) {\n\t\t\treturn;\n\t\t}\n\t\tthis._height = height;\n\n\t\tif (this._height === 0) {\n\t\t\tthis._rootDomNode.style.display = 'none';\n\t\t} else {\n\t\t\tthis._rootDomNode.style.display = 'block';\n\t\t\tthis._lineNumbersDomNode.style.height = `${this._height}px`;\n\t\t\tthis._linesDomNodeScrollable.style.height = `${this._height}px`;\n\t\t\tthis._rootDomNode.style.height = `${this._height}px`;\n\t\t}\n\n\t\tthis._onDidChangeStickyScrollHeight.fire({ height: this._height });\n\t}\n\n\tprivate _setFoldingHoverListeners(): void {\n\t\tconst showFoldingControls: 'mouseover' | 'always' | 'never' = this._editor.getOption(EditorOption.showFoldingControls);\n\t\tif (showFoldingControls !== 'mouseover') {\n\t\t\treturn;\n\t\t}\n\t\tthis._foldingIconStore.clear();\n\t\tthis._foldingIconStore.add(dom.addDisposableListener(this._lineNumbersDomNode, dom.EventType.MOUSE_ENTER, () => {\n\t\t\tthis._isOnGlyphMargin = true;\n\t\t\tthis._setFoldingIconsVisibility(true);\n\t\t}));\n\t\tthis._foldingIconStore.add(dom.addDisposableListener(this._lineNumbersDomNode, dom.EventType.MOUSE_LEAVE, () => {\n\t\t\tthis._isOnGlyphMargin = false;\n\t\t\tthis._useFoldingOpacityTransition(true);\n\t\t\tthis._setFoldingIconsVisibility(false);\n\t\t}));\n\t}\n\n\tprivate _renderChildNode(viewModel: IViewModel, index: number, line: number, top: number, isLastLine: boolean, foldingModel: FoldingModel | undefined, layoutInfo: EditorLayoutInfo): RenderedStickyLine {\n\t\tconst viewLineNumber = viewModel.coordinatesConverter.convertModelPositionToViewPosition(new Position(line, 1)).lineNumber;\n\t\tconst lineRenderingData = viewModel.getViewLineRenderingData(viewLineNumber);\n\t\tconst lineNumberOption = this._editor.getOption(EditorOption.lineNumbers);\n\t\tconst verticalScrollbarSize = this._editor.getOption(EditorOption.scrollbar).verticalScrollbarSize;\n\n\t\tlet actualInlineDecorations: LineDecoration[];\n\t\ttry {\n\t\t\tactualInlineDecorations = LineDecoration.filter(lineRenderingData.inlineDecorations, viewLineNumber, lineRenderingData.minColumn, lineRenderingData.maxColumn);\n\t\t} catch (err) {\n\t\t\tactualInlineDecorations = [];\n\t\t}\n\n\t\tconst lineHeight = this._editor.getLineHeightForPosition(new Position(line, 1));\n\t\tconst textDirection = viewModel.getTextDirection(line);\n\t\tconst renderLineInput: RenderLineInput = new RenderLineInput(true, true, lineRenderingData.content,\n\t\t\tlineRenderingData.continuesWithWrappedLine,\n\t\t\tlineRenderingData.isBasicASCII, lineRenderingData.containsRTL, 0,\n\t\t\tlineRenderingData.tokens, actualInlineDecorations,\n\t\t\tlineRenderingData.tabSize, lineRenderingData.startVisibleColumn,\n\t\t\t1, 1, 1, 500, 'none', true, true, null,\n\t\t\ttextDirection, verticalScrollbarSize\n\t\t);\n\n\t\tconst sb = new StringBuilder(2000);\n\t\tconst renderOutput = renderViewLine(renderLineInput, sb);\n\n\t\tlet newLine;\n\t\tif (_ttPolicy) {\n\t\t\tnewLine = _ttPolicy.createHTML(sb.build());\n\t\t} else {\n\t\t\tnewLine = sb.build();\n\t\t}\n\n\t\tconst lineHTMLNode = document.createElement('span');\n\t\tlineHTMLNode.setAttribute(STICKY_INDEX_ATTR, String(index));\n\t\tlineHTMLNode.setAttribute(STICKY_IS_LINE_ATTR, '');\n\t\tlineHTMLNode.setAttribute('role', 'listitem');\n\t\tlineHTMLNode.tabIndex = 0;\n\t\tlineHTMLNode.className = 'sticky-line-content';\n\t\tlineHTMLNode.classList.add(`stickyLine${line}`);\n\t\tlineHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tlineHTMLNode.innerHTML = newLine as string;\n\n\t\tconst lineNumberHTMLNode = document.createElement('span');\n\t\tlineNumberHTMLNode.setAttribute(STICKY_INDEX_ATTR, String(index));\n\t\tlineNumberHTMLNode.setAttribute(STICKY_IS_LINE_NUMBER_ATTR, '');\n\t\tlineNumberHTMLNode.className = 'sticky-line-number';\n\t\tlineNumberHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tconst lineNumbersWidth = layoutInfo.contentLeft;\n\t\tlineNumberHTMLNode.style.width = `${lineNumbersWidth}px`;\n\n\t\tconst innerLineNumberHTML = document.createElement('span');\n\t\tif (lineNumberOption.renderType === RenderLineNumbersType.On || lineNumberOption.renderType === RenderLineNumbersType.Interval && line % 10 === 0) {\n\t\t\tinnerLineNumberHTML.innerText = line.toString();\n\t\t} else if (lineNumberOption.renderType === RenderLineNumbersType.Relative) {\n\t\t\tinnerLineNumberHTML.innerText = Math.abs(line - this._editor.getPosition()!.lineNumber).toString();\n\t\t}\n\t\tinnerLineNumberHTML.className = 'sticky-line-number-inner';\n\t\tinnerLineNumberHTML.style.width = `${layoutInfo.lineNumbersWidth}px`;\n\t\tinnerLineNumberHTML.style.paddingLeft = `${layoutInfo.lineNumbersLeft}px`;\n\n\t\tlineNumberHTMLNode.appendChild(innerLineNumberHTML);\n\t\tconst foldingIcon = this._renderFoldingIconForLine(foldingModel, line);\n\t\tif (foldingIcon) {\n\t\t\tlineNumberHTMLNode.appendChild(foldingIcon.domNode);\n\t\t\tfoldingIcon.domNode.style.left = `${layoutInfo.lineNumbersWidth + layoutInfo.lineNumbersLeft}px`;\n\t\t\tfoldingIcon.domNode.style.lineHeight = `${lineHeight}px`;\n\t\t}\n\n\t\tthis._editor.applyFontInfo(lineHTMLNode);\n\t\tthis._editor.applyFontInfo(lineNumberHTMLNode);\n\n\t\tlineNumberHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tlineHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tlineNumberHTMLNode.style.height = `${lineHeight}px`;\n\t\tlineHTMLNode.style.height = `${lineHeight}px`;\n\n\t\tconst renderedLine = new RenderedStickyLine(\n\t\t\tindex,\n\t\t\tline,\n\t\t\tlineHTMLNode,\n\t\t\tlineNumberHTMLNode,\n\t\t\tfoldingIcon,\n\t\t\trenderOutput.characterMapping,\n\t\t\tlineHTMLNode.scrollWidth,\n\t\t\tlineHeight\n\t\t);\n\t\treturn this._updatePosition(renderedLine, top, isLastLine);\n\t}\n\n\tprivate _updatePosition(stickyLine: RenderedStickyLine, top: number, isLastLine: boolean): RenderedStickyLine {\n\t\tconst lineHTMLNode = stickyLine.lineDomNode;\n\t\tconst lineNumberHTMLNode = stickyLine.lineNumberDomNode;\n\t\tif (isLastLine) {\n\t\t\tconst zIndex = '0';\n\t\t\tlineHTMLNode.style.zIndex = zIndex;\n\t\t\tlineNumberHTMLNode.style.zIndex = zIndex;\n\t\t\tconst updatedTop = `${top + this._lastLineRelativePosition + (stickyLine.foldingIcon?.isCollapsed ? 1 : 0)}px`;\n\t\t\tlineHTMLNode.style.top = updatedTop;\n\t\t\tlineNumberHTMLNode.style.top = updatedTop;\n\t\t} else {\n\t\t\tconst zIndex = '1';\n\t\t\tlineHTMLNode.style.zIndex = zIndex;\n\t\t\tlineNumberHTMLNode.style.zIndex = zIndex;\n\t\t\tlineHTMLNode.style.top = `${top}px`;\n\t\t\tlineNumberHTMLNode.style.top = `${top}px`;\n\t\t}\n\t\treturn stickyLine;\n\t}\n\n\tprivate _renderFoldingIconForLine(foldingModel: FoldingModel | undefined, line: number): StickyFoldingIcon | undefined {\n\t\tconst showFoldingControls: 'mouseover' | 'always' | 'never' = this._editor.getOption(EditorOption.showFoldingControls);\n\t\tif (!foldingModel || showFoldingControls === 'never') {\n\t\t\treturn;\n\t\t}\n\t\tconst foldingRegions = foldingModel.regions;\n\t\tconst indexOfFoldingRegion = foldingRegions.findRange(line);\n\t\tconst startLineNumber = foldingRegions.getStartLineNumber(indexOfFoldingRegion);\n\t\tconst isFoldingScope = line === startLineNumber;\n\t\tif (!isFoldingScope) {\n\t\t\treturn;\n\t\t}\n\t\tconst isCollapsed = foldingRegions.isCollapsed(indexOfFoldingRegion);\n\t\tconst foldingIcon = new StickyFoldingIcon(isCollapsed, startLineNumber, foldingRegions.getEndLineNumber(indexOfFoldingRegion), this._lineHeight);\n\t\tfoldingIcon.setVisible(this._isOnGlyphMargin ? true : (isCollapsed || showFoldingControls === 'always'));\n\t\tfoldingIcon.domNode.setAttribute(STICKY_IS_FOLDING_ICON_ATTR, '');\n\t\treturn foldingIcon;\n\t}\n\n\tgetId(): string {\n\t\treturn 'editor.contrib.stickyScrollWidget';\n\t}\n\n\tgetDomNode(): HTMLElement {\n\t\treturn this._rootDomNode;\n\t}\n\n\tgetPosition(): IOverlayWidgetPosition | null {\n\t\treturn {\n\t\t\tpreference: OverlayWidgetPositionPreference.TOP_CENTER,\n\t\t\tstackOridinal: 10,\n\t\t};\n\t}\n\n\tgetMinContentWidthInPx(): number {\n\t\treturn this._minContentWidthInPx;\n\t}\n\n\tfocusLineWithIndex(index: number) {\n\t\tif (0 <= index && index < this._renderedStickyLines.length) {\n\t\t\tthis._renderedStickyLines[index].lineDomNode.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Given a leaf dom node, tries to find the editor position.\n\t */\n\tgetEditorPositionFromNode(spanDomNode: HTMLElement | null): Position | null {\n\t\tif (!spanDomNode || spanDomNode.children.length > 0) {\n\t\t\t// This is not a leaf node\n\t\t\treturn null;\n\t\t}\n\t\tconst renderedStickyLine = this._getRenderedStickyLineFromChildDomNode(spanDomNode);\n\t\tif (!renderedStickyLine) {\n\t\t\treturn null;\n\t\t}\n\t\tconst column = getColumnOfNodeOffset(renderedStickyLine.characterMapping, spanDomNode, 0);\n\t\treturn new Position(renderedStickyLine.lineNumber, column);\n\t}\n\n\tgetLineNumberFromChildDomNode(domNode: HTMLElement | null): number | null {\n\t\treturn this._getRenderedStickyLineFromChildDomNode(domNode)?.lineNumber ?? null;\n\t}\n\n\tprivate _getRenderedStickyLineFromChildDomNode(domNode: HTMLElement | null): RenderedStickyLine | null {\n\t\tconst index = this.getLineIndexFromChildDomNode(domNode);\n\t\tif (index === null || index < 0 || index >= this._renderedStickyLines.length) {\n\t\t\treturn null;\n\t\t}\n\t\treturn this._renderedStickyLines[index];\n\t}\n\n\t/**\n\t * Given a child dom node, tries to find the line number attribute that was stored in the node.\n\t * @returns the attribute value or null if none is found.\n\t */\n\tgetLineIndexFromChildDomNode(domNode: HTMLElement | null): number | null {\n\t\tconst lineIndex = this._getAttributeValue(domNode, STICKY_INDEX_ATTR);\n\t\treturn lineIndex ? parseInt(lineIndex, 10) : null;\n\t}\n\n\t/**\n\t * Given a child dom node, tries to find if it is (contained in) a sticky line.\n\t * @returns a boolean.\n\t */\n\tisInStickyLine(domNode: HTMLElement | null): boolean {\n\t\tconst isInLine = this._getAttributeValue(domNode, STICKY_IS_LINE_ATTR);\n\t\treturn isInLine !== undefined;\n\t}\n\n\t/**\n\t * Given a child dom node, tries to find if this dom node is (contained in) a sticky folding icon.\n\t * @returns a boolean.\n\t */\n\tisInFoldingIconDomNode(domNode: HTMLElement | null): boolean {\n\t\tconst isInFoldingIcon = this._getAttributeValue(domNode, STICKY_IS_FOLDING_ICON_ATTR);\n\t\treturn isInFoldingIcon !== undefined;\n\t}\n\n\t/**\n\t * Given the dom node, finds if it or its parent sequence contains the given attribute.\n\t * @returns the attribute value or undefined.\n\t */\n\tprivate _getAttributeValue(domNode: HTMLElement | null, attribute: string): string | undefined {\n\t\twhile (domNode && domNode !== this._rootDomNode) {\n\t\t\tconst line = domNode.getAttribute(attribute);\n\t\t\tif (line !== null) {\n\t\t\t\treturn line;\n\t\t\t}\n\t\t\tdomNode = domNode.parentElement;\n\t\t}\n\t\treturn;\n\t}\n}\n\nclass RenderedStickyLine {\n\tconstructor(\n\t\tpublic readonly index: number,\n\t\tpublic readonly lineNumber: number,\n\t\tpublic readonly lineDomNode: HTMLElement,\n\t\tpublic readonly lineNumberDomNode: HTMLElement,\n\t\tpublic readonly foldingIcon: StickyFoldingIcon | undefined,\n\t\tpublic readonly characterMapping: CharacterMapping,\n\t\tpublic readonly scrollWidth: number,\n\t\tpublic readonly height: number\n\t) { }\n}\n\nclass StickyFoldingIcon {\n\n\tpublic domNode: HTMLElement;\n\n\tconstructor(\n\t\tpublic isCollapsed: boolean,\n\t\tpublic foldingStartLine: number,\n\t\tpublic foldingEndLine: number,\n\t\tpublic dimension: number\n\t) {\n\t\tthis.domNode = document.createElement('div');\n\t\tthis.domNode.style.width = `26px`;\n\t\tthis.domNode.style.height = `${dimension}px`;\n\t\tthis.domNode.style.lineHeight = `${dimension}px`;\n\t\tthis.domNode.className = ThemeIcon.asClassName(isCollapsed ? foldingCollapsedIcon : foldingExpandedIcon);\n\t}\n\n\tpublic setVisible(visible: boolean) {\n\t\tthis.domNode.style.cursor = visible ? 'pointer' : 'default';\n\t\tthis.domNode.style.opacity = visible ? '1' : '0';\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.ts","vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,oBAAoB,CAAC;AAE5B,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AACzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gEAAgE,CAAC;AAE1G,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,EAAoB,eAAe,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AACnH,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAExG,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAG3D,MAAM,OAAO,uBAAuB;IACnC,YACU,gBAA0B,EAC1B,cAAwB,EACxB,wBAAgC,EAChC,iBAAgC,IAAI;QAHpC,qBAAgB,GAAhB,gBAAgB,CAAU;QAC1B,mBAAc,GAAd,cAAc,CAAU;QACxB,6BAAwB,GAAxB,wBAAwB,CAAQ;QAChC,mBAAc,GAAd,cAAc,CAAsB;IAC1C,CAAC;IA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ExB,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;QAClC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,SAAS,IAAI,CAAC;QAC7C,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,GAAG,SAAS,IAAI,CAAC;QACjD,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;IAC1G,CAAC;IAEM,UAAU,CAAC,OAAgB;QACjC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;QAC5D,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAClD,CAAC;CACD","file":"stickyScrollWidget.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { createTrustedTypesPolicy } from '../../../../base/browser/trustedTypes.js';\nimport { equals } from '../../../../base/common/arrays.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { ThemeIcon } from '../../../../base/common/themables.js';\nimport './stickyScroll.css';\nimport { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from '../../../browser/editorBrowser.js';\nimport { getColumnOfNodeOffset } from '../../../browser/viewParts/viewLines/viewLine.js';\nimport { EmbeddedCodeEditorWidget } from '../../../browser/widget/codeEditor/embeddedCodeEditorWidget.js';\nimport { EditorLayoutInfo, EditorOption, RenderLineNumbersType } from '../../../common/config/editorOptions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { StringBuilder } from '../../../common/core/stringBuilder.js';\nimport { LineDecoration } from '../../../common/viewLayout/lineDecorations.js';\nimport { CharacterMapping, RenderLineInput, renderViewLine } from '../../../common/viewLayout/viewLineRenderer.js';\nimport { foldingCollapsedIcon, foldingExpandedIcon } from '../../folding/browser/foldingDecorations.js';\nimport { FoldingModel } from '../../folding/browser/foldingModel.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { IViewModel } from '../../../common/viewModel.js';\n\nexport class StickyScrollWidgetState {\n\tconstructor(\n\t\treadonly startLineNumbers: number[],\n\t\treadonly endLineNumbers: number[],\n\t\treadonly lastLineRelativePosition: number,\n\t\treadonly showEndForLine: number | null = null\n\t) { }\n\n\tequals(other: StickyScrollWidgetState | undefined): boolean {\n\t\treturn !!other\n\t\t\t&& this.lastLineRelativePosition === other.lastLineRelativePosition\n\t\t\t&& this.showEndForLine === other.showEndForLine\n\t\t\t&& equals(this.startLineNumbers, other.startLineNumbers)\n\t\t\t&& equals(this.endLineNumbers, other.endLineNumbers);\n\t}\n\n\tstatic get Empty() {\n\t\treturn new StickyScrollWidgetState([], [], 0);\n\t}\n}\n\nconst _ttPolicy = createTrustedTypesPolicy('stickyScrollViewLayer', { createHTML: value => value });\nconst STICKY_INDEX_ATTR = 'data-sticky-line-index';\nconst STICKY_IS_LINE_ATTR = 'data-sticky-is-line';\nconst STICKY_IS_LINE_NUMBER_ATTR = 'data-sticky-is-line-number';\nconst STICKY_IS_FOLDING_ICON_ATTR = 'data-sticky-is-folding-icon';\n\nexport class StickyScrollWidget extends Disposable implements IOverlayWidget {\n\n\tprivate readonly _foldingIconStore = this._register(new DisposableStore());\n\tprivate readonly _rootDomNode: HTMLElement = document.createElement('div');\n\tprivate readonly _lineNumbersDomNode: HTMLElement = document.createElement('div');\n\tprivate readonly _linesDomNodeScrollable: HTMLElement = document.createElement('div');\n\tprivate readonly _linesDomNode: HTMLElement = document.createElement('div');\n\n\tprivate readonly _editor: ICodeEditor;\n\n\tprivate _state: StickyScrollWidgetState | undefined;\n\tprivate _lineHeight: number;\n\tprivate _renderedStickyLines: RenderedStickyLine[] = [];\n\tprivate _lineNumbers: number[] = [];\n\tprivate _lastLineRelativePosition: number = 0;\n\tprivate _minContentWidthInPx: number = 0;\n\tprivate _isOnGlyphMargin: boolean = false;\n\tprivate _height: number = -1;\n\n\tpublic get height(): number { return this._height; }\n\n\tprivate readonly _onDidChangeStickyScrollHeight = this._register(new Emitter<{ height: number }>());\n\tpublic readonly onDidChangeStickyScrollHeight = this._onDidChangeStickyScrollHeight.event;\n\n\tconstructor(\n\t\teditor: ICodeEditor\n\t) {\n\t\tsuper();\n\n\t\tthis._editor = editor;\n\t\tthis._lineHeight = editor.getOption(EditorOption.lineHeight);\n\t\tthis._lineNumbersDomNode.className = 'sticky-widget-line-numbers';\n\t\tthis._lineNumbersDomNode.setAttribute('role', 'none');\n\n\t\tthis._linesDomNode.className = 'sticky-widget-lines';\n\t\tthis._linesDomNode.setAttribute('role', 'list');\n\n\t\tthis._linesDomNodeScrollable.className = 'sticky-widget-lines-scrollable';\n\t\tthis._linesDomNodeScrollable.appendChild(this._linesDomNode);\n\n\t\tthis._rootDomNode.className = 'sticky-widget';\n\t\tthis._rootDomNode.classList.toggle('peek', editor instanceof EmbeddedCodeEditorWidget);\n\t\tthis._rootDomNode.appendChild(this._lineNumbersDomNode);\n\t\tthis._rootDomNode.appendChild(this._linesDomNodeScrollable);\n\t\tthis._setHeight(0);\n\n\t\tconst updateScrollLeftPosition = () => {\n\t\t\tthis._linesDomNode.style.left = this._editor.getOption(EditorOption.stickyScroll).scrollWithEditor ? `-${this._editor.getScrollLeft()}px` : '0px';\n\t\t};\n\t\tthis._register(this._editor.onDidChangeConfiguration((e) => {\n\t\t\tif (e.hasChanged(EditorOption.stickyScroll)) {\n\t\t\t\tupdateScrollLeftPosition();\n\t\t\t}\n\t\t\tif (e.hasChanged(EditorOption.lineHeight)) {\n\t\t\t\tthis._lineHeight = this._editor.getOption(EditorOption.lineHeight);\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._editor.onDidScrollChange((e) => {\n\t\t\tif (e.scrollLeftChanged) {\n\t\t\t\tupdateScrollLeftPosition();\n\t\t\t}\n\t\t\tif (e.scrollWidthChanged) {\n\t\t\t\tthis._updateWidgetWidth();\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._editor.onDidChangeModel(() => {\n\t\t\tupdateScrollLeftPosition();\n\t\t\tthis._updateWidgetWidth();\n\t\t}));\n\t\tupdateScrollLeftPosition();\n\n\t\tthis._register(this._editor.onDidLayoutChange((e) => {\n\t\t\tthis._updateWidgetWidth();\n\t\t}));\n\t\tthis._updateWidgetWidth();\n\t}\n\n\tget lineNumbers(): number[] {\n\t\treturn this._lineNumbers;\n\t}\n\n\tget lineNumberCount(): number {\n\t\treturn this._lineNumbers.length;\n\t}\n\n\tgetRenderedStickyLine(lineNumber: number): RenderedStickyLine | undefined {\n\t\treturn this._renderedStickyLines.find(stickyLine => stickyLine.lineNumber === lineNumber);\n\t}\n\n\tgetCurrentLines(): readonly number[] {\n\t\treturn this._lineNumbers;\n\t}\n\n\tsetState(state: StickyScrollWidgetState | undefined, foldingModel: FoldingModel | undefined, rebuildFromIndexCandidate?: number): void {\n\t\tconst currentStateAndPreviousStateUndefined = !this._state && !state;\n\t\tconst currentStateDefinedAndEqualsPreviousState = this._state && this._state.equals(state);\n\t\tif (rebuildFromIndexCandidate === undefined && (currentStateAndPreviousStateUndefined || currentStateDefinedAndEqualsPreviousState)) {\n\t\t\treturn;\n\t\t}\n\t\tconst data = this._findRenderingData(state);\n\t\tconst previousLineNumbers = this._lineNumbers;\n\t\tthis._lineNumbers = data.lineNumbers;\n\t\tthis._lastLineRelativePosition = data.lastLineRelativePosition;\n\t\tconst rebuildFromIndex = this._findIndexToRebuildFrom(previousLineNumbers, this._lineNumbers, rebuildFromIndexCandidate);\n\t\tthis._renderRootNode(this._lineNumbers, this._lastLineRelativePosition, foldingModel, rebuildFromIndex);\n\t\tthis._state = state;\n\t}\n\n\tprivate _findRenderingData(state: StickyScrollWidgetState | undefined): { lineNumbers: number[]; lastLineRelativePosition: number } {\n\t\tif (!state) {\n\t\t\treturn { lineNumbers: [], lastLineRelativePosition: 0 };\n\t\t}\n\t\tconst candidateLineNumbers = [...state.startLineNumbers];\n\t\tif (state.showEndForLine !== null) {\n\t\t\tcandidateLineNumbers[state.showEndForLine] = state.endLineNumbers[state.showEndForLine];\n\t\t}\n\t\tlet totalHeight = 0;\n\t\tfor (let i = 0; i < candidateLineNumbers.length; i++) {\n\t\t\ttotalHeight += this._editor.getLineHeightForPosition(new Position(candidateLineNumbers[i], 1));\n\t\t}\n\t\tif (totalHeight === 0) {\n\t\t\treturn { lineNumbers: [], lastLineRelativePosition: 0 };\n\t\t}\n\t\treturn { lineNumbers: candidateLineNumbers, lastLineRelativePosition: state.lastLineRelativePosition };\n\t}\n\n\tprivate _findIndexToRebuildFrom(previousLineNumbers: number[], newLineNumbers: number[], rebuildFromIndexCandidate?: number): number {\n\t\tif (newLineNumbers.length === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (rebuildFromIndexCandidate !== undefined) {\n\t\t\treturn rebuildFromIndexCandidate;\n\t\t}\n\t\tconst validIndex = newLineNumbers.findIndex(startLineNumber => !previousLineNumbers.includes(startLineNumber));\n\t\treturn validIndex === -1 ? 0 : validIndex;\n\t}\n\n\tprivate _updateWidgetWidth(): void {\n\t\tconst layoutInfo = this._editor.getLayoutInfo();\n\t\tconst lineNumbersWidth = layoutInfo.contentLeft;\n\t\tthis._lineNumbersDomNode.style.width = `${lineNumbersWidth}px`;\n\t\tthis._linesDomNodeScrollable.style.setProperty('--vscode-editorStickyScroll-scrollableWidth', `${this._editor.getScrollWidth() - layoutInfo.verticalScrollbarWidth}px`);\n\t\tthis._rootDomNode.style.width = `${layoutInfo.width - layoutInfo.verticalScrollbarWidth}px`;\n\t}\n\n\tprivate _useFoldingOpacityTransition(requireTransitions: boolean) {\n\t\tthis._lineNumbersDomNode.style.setProperty('--vscode-editorStickyScroll-foldingOpacityTransition', `opacity ${requireTransitions ? 0.5 : 0}s`);\n\t}\n\n\tprivate _setFoldingIconsVisibility(allVisible: boolean) {\n\t\tfor (const line of this._renderedStickyLines) {\n\t\t\tconst foldingIcon = line.foldingIcon;\n\t\t\tif (!foldingIcon) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfoldingIcon.setVisible(allVisible ? true : foldingIcon.isCollapsed);\n\t\t}\n\t}\n\n\tprivate async _renderRootNode(lineNumbers: number[], lastLineRelativePosition: number, foldingModel: FoldingModel | undefined, rebuildFromIndex: number): Promise<void> {\n\t\tconst viewModel = this._editor._getViewModel();\n\t\tif (!viewModel) {\n\t\t\tthis._clearWidget();\n\t\t\treturn;\n\t\t}\n\t\tif (lineNumbers.length === 0) {\n\t\t\tthis._clearWidget();\n\t\t\treturn;\n\t\t}\n\t\tconst renderedStickyLines: RenderedStickyLine[] = [];\n\t\tconst lastLineNumber = lineNumbers[lineNumbers.length - 1];\n\t\tlet top: number = 0;\n\t\tfor (let i = 0; i < this._renderedStickyLines.length; i++) {\n\t\t\tif (i < rebuildFromIndex) {\n\t\t\t\tconst renderedLine = this._renderedStickyLines[i];\n\t\t\t\trenderedStickyLines.push(this._updatePosition(renderedLine, top, renderedLine.lineNumber === lastLineNumber));\n\t\t\t\ttop += renderedLine.height;\n\t\t\t} else {\n\t\t\t\tconst renderedLine = this._renderedStickyLines[i];\n\t\t\t\trenderedLine.lineNumberDomNode.remove();\n\t\t\t\trenderedLine.lineDomNode.remove();\n\t\t\t}\n\t\t}\n\t\tconst layoutInfo = this._editor.getLayoutInfo();\n\t\tfor (let i = rebuildFromIndex; i < lineNumbers.length; i++) {\n\t\t\tconst stickyLine = this._renderChildNode(viewModel, i, lineNumbers[i], top, lastLineNumber === lineNumbers[i], foldingModel, layoutInfo);\n\t\t\ttop += stickyLine.height;\n\t\t\tthis._linesDomNode.appendChild(stickyLine.lineDomNode);\n\t\t\tthis._lineNumbersDomNode.appendChild(stickyLine.lineNumberDomNode);\n\t\t\trenderedStickyLines.push(stickyLine);\n\t\t}\n\t\tif (foldingModel) {\n\t\t\tthis._setFoldingHoverListeners();\n\t\t\tthis._useFoldingOpacityTransition(!this._isOnGlyphMargin);\n\t\t}\n\t\tthis._minContentWidthInPx = Math.max(...this._renderedStickyLines.map(l => l.scrollWidth)) + layoutInfo.verticalScrollbarWidth;\n\t\tthis._renderedStickyLines = renderedStickyLines;\n\t\tthis._setHeight(top + lastLineRelativePosition);\n\t\tthis._editor.layoutOverlayWidget(this);\n\t}\n\n\tprivate _clearWidget(): void {\n\t\tfor (let i = 0; i < this._renderedStickyLines.length; i++) {\n\t\t\tconst stickyLine = this._renderedStickyLines[i];\n\t\t\tstickyLine.lineNumberDomNode.remove();\n\t\t\tstickyLine.lineDomNode.remove();\n\t\t}\n\t\tthis._setHeight(0);\n\t}\n\n\tprivate _setHeight(height: number): void {\n\t\tif (this._height === height) {\n\t\t\treturn;\n\t\t}\n\t\tthis._height = height;\n\n\t\tif (this._height === 0) {\n\t\t\tthis._rootDomNode.style.display = 'none';\n\t\t} else {\n\t\t\tthis._rootDomNode.style.display = 'block';\n\t\t\tthis._lineNumbersDomNode.style.height = `${this._height}px`;\n\t\t\tthis._linesDomNodeScrollable.style.height = `${this._height}px`;\n\t\t\tthis._rootDomNode.style.height = `${this._height}px`;\n\t\t}\n\n\t\tthis._onDidChangeStickyScrollHeight.fire({ height: this._height });\n\t}\n\n\tprivate _setFoldingHoverListeners(): void {\n\t\tconst showFoldingControls: 'mouseover' | 'always' | 'never' = this._editor.getOption(EditorOption.showFoldingControls);\n\t\tif (showFoldingControls !== 'mouseover') {\n\t\t\treturn;\n\t\t}\n\t\tthis._foldingIconStore.clear();\n\t\tthis._foldingIconStore.add(dom.addDisposableListener(this._lineNumbersDomNode, dom.EventType.MOUSE_ENTER, () => {\n\t\t\tthis._isOnGlyphMargin = true;\n\t\t\tthis._setFoldingIconsVisibility(true);\n\t\t}));\n\t\tthis._foldingIconStore.add(dom.addDisposableListener(this._lineNumbersDomNode, dom.EventType.MOUSE_LEAVE, () => {\n\t\t\tthis._isOnGlyphMargin = false;\n\t\t\tthis._useFoldingOpacityTransition(true);\n\t\t\tthis._setFoldingIconsVisibility(false);\n\t\t}));\n\t}\n\n\tprivate _renderChildNode(viewModel: IViewModel, index: number, line: number, top: number, isLastLine: boolean, foldingModel: FoldingModel | undefined, layoutInfo: EditorLayoutInfo): RenderedStickyLine {\n\t\tconst viewLineNumber = viewModel.coordinatesConverter.convertModelPositionToViewPosition(new Position(line, 1)).lineNumber;\n\t\tconst lineRenderingData = viewModel.getViewLineRenderingData(viewLineNumber);\n\t\tconst lineNumberOption = this._editor.getOption(EditorOption.lineNumbers);\n\t\tconst verticalScrollbarSize = this._editor.getOption(EditorOption.scrollbar).verticalScrollbarSize;\n\n\t\tlet actualInlineDecorations: LineDecoration[];\n\t\ttry {\n\t\t\tactualInlineDecorations = LineDecoration.filter(lineRenderingData.inlineDecorations, viewLineNumber, lineRenderingData.minColumn, lineRenderingData.maxColumn);\n\t\t} catch (err) {\n\t\t\tactualInlineDecorations = [];\n\t\t}\n\n\t\tconst lineHeight = this._editor.getLineHeightForPosition(new Position(line, 1));\n\t\tconst textDirection = viewModel.getTextDirection(line);\n\t\tconst renderLineInput: RenderLineInput = new RenderLineInput(true, true, lineRenderingData.content,\n\t\t\tlineRenderingData.continuesWithWrappedLine,\n\t\t\tlineRenderingData.isBasicASCII, lineRenderingData.containsRTL, 0,\n\t\t\tlineRenderingData.tokens, actualInlineDecorations,\n\t\t\tlineRenderingData.tabSize, lineRenderingData.startVisibleColumn,\n\t\t\t1, 1, 1, 500, 'none', true, true, null,\n\t\t\ttextDirection, verticalScrollbarSize\n\t\t);\n\n\t\tconst sb = new StringBuilder(2000);\n\t\tconst renderOutput = renderViewLine(renderLineInput, sb);\n\n\t\tlet newLine;\n\t\tif (_ttPolicy) {\n\t\t\tnewLine = _ttPolicy.createHTML(sb.build());\n\t\t} else {\n\t\t\tnewLine = sb.build();\n\t\t}\n\n\t\tconst lineHTMLNode = document.createElement('span');\n\t\tlineHTMLNode.setAttribute(STICKY_INDEX_ATTR, String(index));\n\t\tlineHTMLNode.setAttribute(STICKY_IS_LINE_ATTR, '');\n\t\tlineHTMLNode.setAttribute('role', 'listitem');\n\t\tlineHTMLNode.tabIndex = 0;\n\t\tlineHTMLNode.className = 'sticky-line-content';\n\t\tlineHTMLNode.classList.add(`stickyLine${line}`);\n\t\tlineHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tlineHTMLNode.innerHTML = newLine as string;\n\n\t\tconst lineNumberHTMLNode = document.createElement('span');\n\t\tlineNumberHTMLNode.setAttribute(STICKY_INDEX_ATTR, String(index));\n\t\tlineNumberHTMLNode.setAttribute(STICKY_IS_LINE_NUMBER_ATTR, '');\n\t\tlineNumberHTMLNode.className = 'sticky-line-number';\n\t\tlineNumberHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tconst lineNumbersWidth = layoutInfo.contentLeft;\n\t\tlineNumberHTMLNode.style.width = `${lineNumbersWidth}px`;\n\n\t\tconst innerLineNumberHTML = document.createElement('span');\n\t\tif (lineNumberOption.renderType === RenderLineNumbersType.On || lineNumberOption.renderType === RenderLineNumbersType.Interval && line % 10 === 0) {\n\t\t\tinnerLineNumberHTML.innerText = line.toString();\n\t\t} else if (lineNumberOption.renderType === RenderLineNumbersType.Relative) {\n\t\t\tinnerLineNumberHTML.innerText = Math.abs(line - this._editor.getPosition()!.lineNumber).toString();\n\t\t}\n\t\tinnerLineNumberHTML.className = 'sticky-line-number-inner';\n\t\tinnerLineNumberHTML.style.width = `${layoutInfo.lineNumbersWidth}px`;\n\t\tinnerLineNumberHTML.style.paddingLeft = `${layoutInfo.lineNumbersLeft}px`;\n\n\t\tlineNumberHTMLNode.appendChild(innerLineNumberHTML);\n\t\tconst foldingIcon = this._renderFoldingIconForLine(foldingModel, line);\n\t\tif (foldingIcon) {\n\t\t\tlineNumberHTMLNode.appendChild(foldingIcon.domNode);\n\t\t\tfoldingIcon.domNode.style.left = `${layoutInfo.lineNumbersWidth + layoutInfo.lineNumbersLeft}px`;\n\t\t\tfoldingIcon.domNode.style.lineHeight = `${lineHeight}px`;\n\t\t}\n\n\t\tthis._editor.applyFontInfo(lineHTMLNode);\n\t\tthis._editor.applyFontInfo(lineNumberHTMLNode);\n\n\t\tlineNumberHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tlineHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tlineNumberHTMLNode.style.height = `${lineHeight}px`;\n\t\tlineHTMLNode.style.height = `${lineHeight}px`;\n\n\t\tconst renderedLine = new RenderedStickyLine(\n\t\t\tindex,\n\t\t\tline,\n\t\t\tlineHTMLNode,\n\t\t\tlineNumberHTMLNode,\n\t\t\tfoldingIcon,\n\t\t\trenderOutput.characterMapping,\n\t\t\tlineHTMLNode.scrollWidth,\n\t\t\tlineHeight\n\t\t);\n\t\treturn this._updatePosition(renderedLine, top, isLastLine);\n\t}\n\n\tprivate _updatePosition(stickyLine: RenderedStickyLine, top: number, isLastLine: boolean): RenderedStickyLine {\n\t\tconst lineHTMLNode = stickyLine.lineDomNode;\n\t\tconst lineNumberHTMLNode = stickyLine.lineNumberDomNode;\n\t\tif (isLastLine) {\n\t\t\tconst zIndex = '0';\n\t\t\tlineHTMLNode.style.zIndex = zIndex;\n\t\t\tlineNumberHTMLNode.style.zIndex = zIndex;\n\t\t\tconst updatedTop = `${top + this._lastLineRelativePosition + (stickyLine.foldingIcon?.isCollapsed ? 1 : 0)}px`;\n\t\t\tlineHTMLNode.style.top = updatedTop;\n\t\t\tlineNumberHTMLNode.style.top = updatedTop;\n\t\t} else {\n\t\t\tconst zIndex = '1';\n\t\t\tlineHTMLNode.style.zIndex = zIndex;\n\t\t\tlineNumberHTMLNode.style.zIndex = zIndex;\n\t\t\tlineHTMLNode.style.top = `${top}px`;\n\t\t\tlineNumberHTMLNode.style.top = `${top}px`;\n\t\t}\n\t\treturn stickyLine;\n\t}\n\n\tprivate _renderFoldingIconForLine(foldingModel: FoldingModel | undefined, line: number): StickyFoldingIcon | undefined {\n\t\tconst showFoldingControls: 'mouseover' | 'always' | 'never' = this._editor.getOption(EditorOption.showFoldingControls);\n\t\tif (!foldingModel || showFoldingControls === 'never') {\n\t\t\treturn;\n\t\t}\n\t\tconst foldingRegions = foldingModel.regions;\n\t\tconst indexOfFoldingRegion = foldingRegions.findRange(line);\n\t\tconst startLineNumber = foldingRegions.getStartLineNumber(indexOfFoldingRegion);\n\t\tconst isFoldingScope = line === startLineNumber;\n\t\tif (!isFoldingScope) {\n\t\t\treturn;\n\t\t}\n\t\tconst isCollapsed = foldingRegions.isCollapsed(indexOfFoldingRegion);\n\t\tconst foldingIcon = new StickyFoldingIcon(isCollapsed, startLineNumber, foldingRegions.getEndLineNumber(indexOfFoldingRegion), this._lineHeight);\n\t\tfoldingIcon.setVisible(this._isOnGlyphMargin ? true : (isCollapsed || showFoldingControls === 'always'));\n\t\tfoldingIcon.domNode.setAttribute(STICKY_IS_FOLDING_ICON_ATTR, '');\n\t\treturn foldingIcon;\n\t}\n\n\tgetId(): string {\n\t\treturn 'editor.contrib.stickyScrollWidget';\n\t}\n\n\tgetDomNode(): HTMLElement {\n\t\treturn this._rootDomNode;\n\t}\n\n\tgetPosition(): IOverlayWidgetPosition | null {\n\t\treturn {\n\t\t\tpreference: OverlayWidgetPositionPreference.TOP_CENTER,\n\t\t\tstackOrdinal: 10,\n\t\t};\n\t}\n\n\tgetMinContentWidthInPx(): number {\n\t\treturn this._minContentWidthInPx;\n\t}\n\n\tfocusLineWithIndex(index: number) {\n\t\tif (0 <= index && index < this._renderedStickyLines.length) {\n\t\t\tthis._renderedStickyLines[index].lineDomNode.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Given a leaf dom node, tries to find the editor position.\n\t */\n\tgetEditorPositionFromNode(spanDomNode: HTMLElement | null): Position | null {\n\t\tif (!spanDomNode || spanDomNode.children.length > 0) {\n\t\t\t// This is not a leaf node\n\t\t\treturn null;\n\t\t}\n\t\tconst renderedStickyLine = this._getRenderedStickyLineFromChildDomNode(spanDomNode);\n\t\tif (!renderedStickyLine) {\n\t\t\treturn null;\n\t\t}\n\t\tconst column = getColumnOfNodeOffset(renderedStickyLine.characterMapping, spanDomNode, 0);\n\t\treturn new Position(renderedStickyLine.lineNumber, column);\n\t}\n\n\tgetLineNumberFromChildDomNode(domNode: HTMLElement | null): number | null {\n\t\treturn this._getRenderedStickyLineFromChildDomNode(domNode)?.lineNumber ?? null;\n\t}\n\n\tprivate _getRenderedStickyLineFromChildDomNode(domNode: HTMLElement | null): RenderedStickyLine | null {\n\t\tconst index = this.getLineIndexFromChildDomNode(domNode);\n\t\tif (index === null || index < 0 || index >= this._renderedStickyLines.length) {\n\t\t\treturn null;\n\t\t}\n\t\treturn this._renderedStickyLines[index];\n\t}\n\n\t/**\n\t * Given a child dom node, tries to find the line number attribute that was stored in the node.\n\t * @returns the attribute value or null if none is found.\n\t */\n\tgetLineIndexFromChildDomNode(domNode: HTMLElement | null): number | null {\n\t\tconst lineIndex = this._getAttributeValue(domNode, STICKY_INDEX_ATTR);\n\t\treturn lineIndex ? parseInt(lineIndex, 10) : null;\n\t}\n\n\t/**\n\t * Given a child dom node, tries to find if it is (contained in) a sticky line.\n\t * @returns a boolean.\n\t */\n\tisInStickyLine(domNode: HTMLElement | null): boolean {\n\t\tconst isInLine = this._getAttributeValue(domNode, STICKY_IS_LINE_ATTR);\n\t\treturn isInLine !== undefined;\n\t}\n\n\t/**\n\t * Given a child dom node, tries to find if this dom node is (contained in) a sticky folding icon.\n\t * @returns a boolean.\n\t */\n\tisInFoldingIconDomNode(domNode: HTMLElement | null): boolean {\n\t\tconst isInFoldingIcon = this._getAttributeValue(domNode, STICKY_IS_FOLDING_ICON_ATTR);\n\t\treturn isInFoldingIcon !== undefined;\n\t}\n\n\t/**\n\t * Given the dom node, finds if it or its parent sequence contains the given attribute.\n\t * @returns the attribute value or undefined.\n\t */\n\tprivate _getAttributeValue(domNode: HTMLElement | null, attribute: string): string | undefined {\n\t\twhile (domNode && domNode !== this._rootDomNode) {\n\t\t\tconst line = domNode.getAttribute(attribute);\n\t\t\tif (line !== null) {\n\t\t\t\treturn line;\n\t\t\t}\n\t\t\tdomNode = domNode.parentElement;\n\t\t}\n\t\treturn;\n\t}\n}\n\nclass RenderedStickyLine {\n\tconstructor(\n\t\tpublic readonly index: number,\n\t\tpublic readonly lineNumber: number,\n\t\tpublic readonly lineDomNode: HTMLElement,\n\t\tpublic readonly lineNumberDomNode: HTMLElement,\n\t\tpublic readonly foldingIcon: StickyFoldingIcon | undefined,\n\t\tpublic readonly characterMapping: CharacterMapping,\n\t\tpublic readonly scrollWidth: number,\n\t\tpublic readonly height: number\n\t) { }\n}\n\nclass StickyFoldingIcon {\n\n\tpublic domNode: HTMLElement;\n\n\tconstructor(\n\t\tpublic isCollapsed: boolean,\n\t\tpublic foldingStartLine: number,\n\t\tpublic foldingEndLine: number,\n\t\tpublic dimension: number\n\t) {\n\t\tthis.domNode = document.createElement('div');\n\t\tthis.domNode.style.width = `26px`;\n\t\tthis.domNode.style.height = `${dimension}px`;\n\t\tthis.domNode.style.lineHeight = `${dimension}px`;\n\t\tthis.domNode.className = ThemeIcon.asClassName(isCollapsed ? foldingCollapsedIcon : foldingExpandedIcon);\n\t}\n\n\tpublic setVisible(visible: boolean) {\n\t\tthis.domNode.style.cursor = visible ? 'pointer' : 'default';\n\t\tthis.domNode.style.opacity = visible ? '1' : '0';\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport * as dom from '../../../../base/browser/dom.js';\nimport { createTrustedTypesPolicy } from '../../../../base/browser/trustedTypes.js';\nimport { equals } from '../../../../base/common/arrays.js';\nimport { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { ThemeIcon } from '../../../../base/common/themables.js';\nimport './stickyScroll.css';\nimport { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from '../../../browser/editorBrowser.js';\nimport { getColumnOfNodeOffset } from '../../../browser/viewParts/viewLines/viewLine.js';\nimport { EmbeddedCodeEditorWidget } from '../../../browser/widget/codeEditor/embeddedCodeEditorWidget.js';\nimport { EditorLayoutInfo, EditorOption, RenderLineNumbersType } from '../../../common/config/editorOptions.js';\nimport { Position } from '../../../common/core/position.js';\nimport { StringBuilder } from '../../../common/core/stringBuilder.js';\nimport { LineDecoration } from '../../../common/viewLayout/lineDecorations.js';\nimport { CharacterMapping, RenderLineInput, renderViewLine } from '../../../common/viewLayout/viewLineRenderer.js';\nimport { foldingCollapsedIcon, foldingExpandedIcon } from '../../folding/browser/foldingDecorations.js';\nimport { FoldingModel } from '../../folding/browser/foldingModel.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport { IViewModel } from '../../../common/viewModel.js';\n\nexport class StickyScrollWidgetState {\n\tconstructor(\n\t\treadonly startLineNumbers: number[],\n\t\treadonly endLineNumbers: number[],\n\t\treadonly lastLineRelativePosition: number,\n\t\treadonly showEndForLine: number | null = null\n\t) { }\n\n\tequals(other: StickyScrollWidgetState | undefined): boolean {\n\t\treturn !!other\n\t\t\t&& this.lastLineRelativePosition === other.lastLineRelativePosition\n\t\t\t&& this.showEndForLine === other.showEndForLine\n\t\t\t&& equals(this.startLineNumbers, other.startLineNumbers)\n\t\t\t&& equals(this.endLineNumbers, other.endLineNumbers);\n\t}\n\n\tstatic get Empty() {\n\t\treturn new StickyScrollWidgetState([], [], 0);\n\t}\n}\n\nconst _ttPolicy = createTrustedTypesPolicy('stickyScrollViewLayer', { createHTML: value => value });\nconst STICKY_INDEX_ATTR = 'data-sticky-line-index';\nconst STICKY_IS_LINE_ATTR = 'data-sticky-is-line';\nconst STICKY_IS_LINE_NUMBER_ATTR = 'data-sticky-is-line-number';\nconst STICKY_IS_FOLDING_ICON_ATTR = 'data-sticky-is-folding-icon';\n\nexport class StickyScrollWidget extends Disposable implements IOverlayWidget {\n\n\tprivate readonly _foldingIconStore = this._register(new DisposableStore());\n\tprivate readonly _rootDomNode: HTMLElement = document.createElement('div');\n\tprivate readonly _lineNumbersDomNode: HTMLElement = document.createElement('div');\n\tprivate readonly _linesDomNodeScrollable: HTMLElement = document.createElement('div');\n\tprivate readonly _linesDomNode: HTMLElement = document.createElement('div');\n\n\tprivate readonly _editor: ICodeEditor;\n\n\tprivate _state: StickyScrollWidgetState | undefined;\n\tprivate _lineHeight: number;\n\tprivate _renderedStickyLines: RenderedStickyLine[] = [];\n\tprivate _lineNumbers: number[] = [];\n\tprivate _lastLineRelativePosition: number = 0;\n\tprivate _minContentWidthInPx: number = 0;\n\tprivate _isOnGlyphMargin: boolean = false;\n\tprivate _height: number = -1;\n\n\tpublic get height(): number { return this._height; }\n\n\tprivate readonly _onDidChangeStickyScrollHeight = this._register(new Emitter<{ height: number }>());\n\tpublic readonly onDidChangeStickyScrollHeight = this._onDidChangeStickyScrollHeight.event;\n\n\tconstructor(\n\t\teditor: ICodeEditor\n\t) {\n\t\tsuper();\n\n\t\tthis._editor = editor;\n\t\tthis._lineHeight = editor.getOption(EditorOption.lineHeight);\n\t\tthis._lineNumbersDomNode.className = 'sticky-widget-line-numbers';\n\t\tthis._lineNumbersDomNode.setAttribute('role', 'none');\n\n\t\tthis._linesDomNode.className = 'sticky-widget-lines';\n\t\tthis._linesDomNode.setAttribute('role', 'list');\n\n\t\tthis._linesDomNodeScrollable.className = 'sticky-widget-lines-scrollable';\n\t\tthis._linesDomNodeScrollable.appendChild(this._linesDomNode);\n\n\t\tthis._rootDomNode.className = 'sticky-widget';\n\t\tthis._rootDomNode.classList.toggle('peek', editor instanceof EmbeddedCodeEditorWidget);\n\t\tthis._rootDomNode.appendChild(this._lineNumbersDomNode);\n\t\tthis._rootDomNode.appendChild(this._linesDomNodeScrollable);\n\t\tthis._setHeight(0);\n\n\t\tconst updateScrollLeftPosition = () => {\n\t\t\tthis._linesDomNode.style.left = this._editor.getOption(EditorOption.stickyScroll).scrollWithEditor ? `-${this._editor.getScrollLeft()}px` : '0px';\n\t\t};\n\t\tthis._register(this._editor.onDidChangeConfiguration((e) => {\n\t\t\tif (e.hasChanged(EditorOption.stickyScroll)) {\n\t\t\t\tupdateScrollLeftPosition();\n\t\t\t}\n\t\t\tif (e.hasChanged(EditorOption.lineHeight)) {\n\t\t\t\tthis._lineHeight = this._editor.getOption(EditorOption.lineHeight);\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._editor.onDidScrollChange((e) => {\n\t\t\tif (e.scrollLeftChanged) {\n\t\t\t\tupdateScrollLeftPosition();\n\t\t\t}\n\t\t\tif (e.scrollWidthChanged) {\n\t\t\t\tthis._updateWidgetWidth();\n\t\t\t}\n\t\t}));\n\t\tthis._register(this._editor.onDidChangeModel(() => {\n\t\t\tupdateScrollLeftPosition();\n\t\t\tthis._updateWidgetWidth();\n\t\t}));\n\t\tupdateScrollLeftPosition();\n\n\t\tthis._register(this._editor.onDidLayoutChange((e) => {\n\t\t\tthis._updateWidgetWidth();\n\t\t}));\n\t\tthis._updateWidgetWidth();\n\t}\n\n\tget lineNumbers(): number[] {\n\t\treturn this._lineNumbers;\n\t}\n\n\tget lineNumberCount(): number {\n\t\treturn this._lineNumbers.length;\n\t}\n\n\tgetRenderedStickyLine(lineNumber: number): RenderedStickyLine | undefined {\n\t\treturn this._renderedStickyLines.find(stickyLine => stickyLine.lineNumber === lineNumber);\n\t}\n\n\tgetCurrentLines(): readonly number[] {\n\t\treturn this._lineNumbers;\n\t}\n\n\tsetState(state: StickyScrollWidgetState | undefined, foldingModel: FoldingModel | undefined, rebuildFromIndexCandidate?: number): void {\n\t\tconst currentStateAndPreviousStateUndefined = !this._state && !state;\n\t\tconst currentStateDefinedAndEqualsPreviousState = this._state && this._state.equals(state);\n\t\tif (rebuildFromIndexCandidate === undefined && (currentStateAndPreviousStateUndefined || currentStateDefinedAndEqualsPreviousState)) {\n\t\t\treturn;\n\t\t}\n\t\tconst data = this._findRenderingData(state);\n\t\tconst previousLineNumbers = this._lineNumbers;\n\t\tthis._lineNumbers = data.lineNumbers;\n\t\tthis._lastLineRelativePosition = data.lastLineRelativePosition;\n\t\tconst rebuildFromIndex = this._findIndexToRebuildFrom(previousLineNumbers, this._lineNumbers, rebuildFromIndexCandidate);\n\t\tthis._renderRootNode(this._lineNumbers, this._lastLineRelativePosition, foldingModel, rebuildFromIndex);\n\t\tthis._state = state;\n\t}\n\n\tprivate _findRenderingData(state: StickyScrollWidgetState | undefined): { lineNumbers: number[]; lastLineRelativePosition: number } {\n\t\tif (!state) {\n\t\t\treturn { lineNumbers: [], lastLineRelativePosition: 0 };\n\t\t}\n\t\tconst candidateLineNumbers = [...state.startLineNumbers];\n\t\tif (state.showEndForLine !== null) {\n\t\t\tcandidateLineNumbers[state.showEndForLine] = state.endLineNumbers[state.showEndForLine];\n\t\t}\n\t\tlet totalHeight = 0;\n\t\tfor (let i = 0; i < candidateLineNumbers.length; i++) {\n\t\t\ttotalHeight += this._editor.getLineHeightForPosition(new Position(candidateLineNumbers[i], 1));\n\t\t}\n\t\tif (totalHeight === 0) {\n\t\t\treturn { lineNumbers: [], lastLineRelativePosition: 0 };\n\t\t}\n\t\treturn { lineNumbers: candidateLineNumbers, lastLineRelativePosition: state.lastLineRelativePosition };\n\t}\n\n\tprivate _findIndexToRebuildFrom(previousLineNumbers: number[], newLineNumbers: number[], rebuildFromIndexCandidate?: number): number {\n\t\tif (newLineNumbers.length === 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (rebuildFromIndexCandidate !== undefined) {\n\t\t\treturn rebuildFromIndexCandidate;\n\t\t}\n\t\tconst validIndex = newLineNumbers.findIndex(startLineNumber => !previousLineNumbers.includes(startLineNumber));\n\t\treturn validIndex === -1 ? 0 : validIndex;\n\t}\n\n\tprivate _updateWidgetWidth(): void {\n\t\tconst layoutInfo = this._editor.getLayoutInfo();\n\t\tconst lineNumbersWidth = layoutInfo.contentLeft;\n\t\tthis._lineNumbersDomNode.style.width = `${lineNumbersWidth}px`;\n\t\tthis._linesDomNodeScrollable.style.setProperty('--vscode-editorStickyScroll-scrollableWidth', `${this._editor.getScrollWidth() - layoutInfo.verticalScrollbarWidth}px`);\n\t\tthis._rootDomNode.style.width = `${layoutInfo.width - layoutInfo.verticalScrollbarWidth}px`;\n\t}\n\n\tprivate _useFoldingOpacityTransition(requireTransitions: boolean) {\n\t\tthis._lineNumbersDomNode.style.setProperty('--vscode-editorStickyScroll-foldingOpacityTransition', `opacity ${requireTransitions ? 0.5 : 0}s`);\n\t}\n\n\tprivate _setFoldingIconsVisibility(allVisible: boolean) {\n\t\tfor (const line of this._renderedStickyLines) {\n\t\t\tconst foldingIcon = line.foldingIcon;\n\t\t\tif (!foldingIcon) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfoldingIcon.setVisible(allVisible ? true : foldingIcon.isCollapsed);\n\t\t}\n\t}\n\n\tprivate async _renderRootNode(lineNumbers: number[], lastLineRelativePosition: number, foldingModel: FoldingModel | undefined, rebuildFromIndex: number): Promise<void> {\n\t\tconst viewModel = this._editor._getViewModel();\n\t\tif (!viewModel) {\n\t\t\tthis._clearWidget();\n\t\t\treturn;\n\t\t}\n\t\tif (lineNumbers.length === 0) {\n\t\t\tthis._clearWidget();\n\t\t\treturn;\n\t\t}\n\t\tconst renderedStickyLines: RenderedStickyLine[] = [];\n\t\tconst lastLineNumber = lineNumbers[lineNumbers.length - 1];\n\t\tlet top: number = 0;\n\t\tfor (let i = 0; i < this._renderedStickyLines.length; i++) {\n\t\t\tif (i < rebuildFromIndex) {\n\t\t\t\tconst renderedLine = this._renderedStickyLines[i];\n\t\t\t\trenderedStickyLines.push(this._updatePosition(renderedLine, top, renderedLine.lineNumber === lastLineNumber));\n\t\t\t\ttop += renderedLine.height;\n\t\t\t} else {\n\t\t\t\tconst renderedLine = this._renderedStickyLines[i];\n\t\t\t\trenderedLine.lineNumberDomNode.remove();\n\t\t\t\trenderedLine.lineDomNode.remove();\n\t\t\t}\n\t\t}\n\t\tconst layoutInfo = this._editor.getLayoutInfo();\n\t\tfor (let i = rebuildFromIndex; i < lineNumbers.length; i++) {\n\t\t\tconst stickyLine = this._renderChildNode(viewModel, i, lineNumbers[i], top, lastLineNumber === lineNumbers[i], foldingModel, layoutInfo);\n\t\t\ttop += stickyLine.height;\n\t\t\tthis._linesDomNode.appendChild(stickyLine.lineDomNode);\n\t\t\tthis._lineNumbersDomNode.appendChild(stickyLine.lineNumberDomNode);\n\t\t\trenderedStickyLines.push(stickyLine);\n\t\t}\n\t\tif (foldingModel) {\n\t\t\tthis._setFoldingHoverListeners();\n\t\t\tthis._useFoldingOpacityTransition(!this._isOnGlyphMargin);\n\t\t}\n\t\tthis._minContentWidthInPx = Math.max(...this._renderedStickyLines.map(l => l.scrollWidth)) + layoutInfo.verticalScrollbarWidth;\n\t\tthis._renderedStickyLines = renderedStickyLines;\n\t\tthis._setHeight(top + lastLineRelativePosition);\n\t\tthis._editor.layoutOverlayWidget(this);\n\t}\n\n\tprivate _clearWidget(): void {\n\t\tfor (let i = 0; i < this._renderedStickyLines.length; i++) {\n\t\t\tconst stickyLine = this._renderedStickyLines[i];\n\t\t\tstickyLine.lineNumberDomNode.remove();\n\t\t\tstickyLine.lineDomNode.remove();\n\t\t}\n\t\tthis._setHeight(0);\n\t}\n\n\tprivate _setHeight(height: number): void {\n\t\tif (this._height === height) {\n\t\t\treturn;\n\t\t}\n\t\tthis._height = height;\n\n\t\tif (this._height === 0) {\n\t\t\tthis._rootDomNode.style.display = 'none';\n\t\t} else {\n\t\t\tthis._rootDomNode.style.display = 'block';\n\t\t\tthis._lineNumbersDomNode.style.height = `${this._height}px`;\n\t\t\tthis._linesDomNodeScrollable.style.height = `${this._height}px`;\n\t\t\tthis._rootDomNode.style.height = `${this._height}px`;\n\t\t}\n\n\t\tthis._onDidChangeStickyScrollHeight.fire({ height: this._height });\n\t}\n\n\tprivate _setFoldingHoverListeners(): void {\n\t\tconst showFoldingControls: 'mouseover' | 'always' | 'never' = this._editor.getOption(EditorOption.showFoldingControls);\n\t\tif (showFoldingControls !== 'mouseover') {\n\t\t\treturn;\n\t\t}\n\t\tthis._foldingIconStore.clear();\n\t\tthis._foldingIconStore.add(dom.addDisposableListener(this._lineNumbersDomNode, dom.EventType.MOUSE_ENTER, () => {\n\t\t\tthis._isOnGlyphMargin = true;\n\t\t\tthis._setFoldingIconsVisibility(true);\n\t\t}));\n\t\tthis._foldingIconStore.add(dom.addDisposableListener(this._lineNumbersDomNode, dom.EventType.MOUSE_LEAVE, () => {\n\t\t\tthis._isOnGlyphMargin = false;\n\t\t\tthis._useFoldingOpacityTransition(true);\n\t\t\tthis._setFoldingIconsVisibility(false);\n\t\t}));\n\t}\n\n\tprivate _renderChildNode(viewModel: IViewModel, index: number, line: number, top: number, isLastLine: boolean, foldingModel: FoldingModel | undefined, layoutInfo: EditorLayoutInfo): RenderedStickyLine {\n\t\tconst viewLineNumber = viewModel.coordinatesConverter.convertModelPositionToViewPosition(new Position(line, 1)).lineNumber;\n\t\tconst lineRenderingData = viewModel.getViewLineRenderingData(viewLineNumber);\n\t\tconst lineNumberOption = this._editor.getOption(EditorOption.lineNumbers);\n\t\tconst verticalScrollbarSize = this._editor.getOption(EditorOption.scrollbar).verticalScrollbarSize;\n\n\t\tlet actualInlineDecorations: LineDecoration[];\n\t\ttry {\n\t\t\tactualInlineDecorations = LineDecoration.filter(lineRenderingData.inlineDecorations, viewLineNumber, lineRenderingData.minColumn, lineRenderingData.maxColumn);\n\t\t} catch (err) {\n\t\t\tactualInlineDecorations = [];\n\t\t}\n\n\t\tconst lineHeight = this._editor.getLineHeightForPosition(new Position(line, 1));\n\t\tconst textDirection = viewModel.getTextDirection(line);\n\t\tconst renderLineInput: RenderLineInput = new RenderLineInput(true, true, lineRenderingData.content,\n\t\t\tlineRenderingData.continuesWithWrappedLine,\n\t\t\tlineRenderingData.isBasicASCII, lineRenderingData.containsRTL, 0,\n\t\t\tlineRenderingData.tokens, actualInlineDecorations,\n\t\t\tlineRenderingData.tabSize, lineRenderingData.startVisibleColumn,\n\t\t\t1, 1, 1, 500, 'none', true, true, null,\n\t\t\ttextDirection, verticalScrollbarSize\n\t\t);\n\n\t\tconst sb = new StringBuilder(2000);\n\t\tconst renderOutput = renderViewLine(renderLineInput, sb);\n\n\t\tlet newLine;\n\t\tif (_ttPolicy) {\n\t\t\tnewLine = _ttPolicy.createHTML(sb.build());\n\t\t} else {\n\t\t\tnewLine = sb.build();\n\t\t}\n\n\t\tconst lineHTMLNode = document.createElement('span');\n\t\tlineHTMLNode.setAttribute(STICKY_INDEX_ATTR, String(index));\n\t\tlineHTMLNode.setAttribute(STICKY_IS_LINE_ATTR, '');\n\t\tlineHTMLNode.setAttribute('role', 'listitem');\n\t\tlineHTMLNode.tabIndex = 0;\n\t\tlineHTMLNode.className = 'sticky-line-content';\n\t\tlineHTMLNode.classList.add(`stickyLine${line}`);\n\t\tlineHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tlineHTMLNode.innerHTML = newLine as string;\n\n\t\tconst lineNumberHTMLNode = document.createElement('span');\n\t\tlineNumberHTMLNode.setAttribute(STICKY_INDEX_ATTR, String(index));\n\t\tlineNumberHTMLNode.setAttribute(STICKY_IS_LINE_NUMBER_ATTR, '');\n\t\tlineNumberHTMLNode.className = 'sticky-line-number';\n\t\tlineNumberHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tconst lineNumbersWidth = layoutInfo.contentLeft;\n\t\tlineNumberHTMLNode.style.width = `${lineNumbersWidth}px`;\n\n\t\tconst innerLineNumberHTML = document.createElement('span');\n\t\tif (lineNumberOption.renderType === RenderLineNumbersType.On || lineNumberOption.renderType === RenderLineNumbersType.Interval && line % 10 === 0) {\n\t\t\tinnerLineNumberHTML.innerText = line.toString();\n\t\t} else if (lineNumberOption.renderType === RenderLineNumbersType.Relative) {\n\t\t\tinnerLineNumberHTML.innerText = Math.abs(line - this._editor.getPosition()!.lineNumber).toString();\n\t\t}\n\t\tinnerLineNumberHTML.className = 'sticky-line-number-inner';\n\t\tinnerLineNumberHTML.style.width = `${layoutInfo.lineNumbersWidth}px`;\n\t\tinnerLineNumberHTML.style.paddingLeft = `${layoutInfo.lineNumbersLeft}px`;\n\n\t\tlineNumberHTMLNode.appendChild(innerLineNumberHTML);\n\t\tconst foldingIcon = this._renderFoldingIconForLine(foldingModel, line);\n\t\tif (foldingIcon) {\n\t\t\tlineNumberHTMLNode.appendChild(foldingIcon.domNode);\n\t\t\tfoldingIcon.domNode.style.left = `${layoutInfo.lineNumbersWidth + layoutInfo.lineNumbersLeft}px`;\n\t\t\tfoldingIcon.domNode.style.lineHeight = `${lineHeight}px`;\n\t\t}\n\n\t\tthis._editor.applyFontInfo(lineHTMLNode);\n\t\tthis._editor.applyFontInfo(lineNumberHTMLNode);\n\n\t\tlineNumberHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tlineHTMLNode.style.lineHeight = `${lineHeight}px`;\n\t\tlineNumberHTMLNode.style.height = `${lineHeight}px`;\n\t\tlineHTMLNode.style.height = `${lineHeight}px`;\n\n\t\tconst renderedLine = new RenderedStickyLine(\n\t\t\tindex,\n\t\t\tline,\n\t\t\tlineHTMLNode,\n\t\t\tlineNumberHTMLNode,\n\t\t\tfoldingIcon,\n\t\t\trenderOutput.characterMapping,\n\t\t\tlineHTMLNode.scrollWidth,\n\t\t\tlineHeight\n\t\t);\n\t\treturn this._updatePosition(renderedLine, top, isLastLine);\n\t}\n\n\tprivate _updatePosition(stickyLine: RenderedStickyLine, top: number, isLastLine: boolean): RenderedStickyLine {\n\t\tconst lineHTMLNode = stickyLine.lineDomNode;\n\t\tconst lineNumberHTMLNode = stickyLine.lineNumberDomNode;\n\t\tif (isLastLine) {\n\t\t\tconst zIndex = '0';\n\t\t\tlineHTMLNode.style.zIndex = zIndex;\n\t\t\tlineNumberHTMLNode.style.zIndex = zIndex;\n\t\t\tconst updatedTop = `${top + this._lastLineRelativePosition + (stickyLine.foldingIcon?.isCollapsed ? 1 : 0)}px`;\n\t\t\tlineHTMLNode.style.top = updatedTop;\n\t\t\tlineNumberHTMLNode.style.top = updatedTop;\n\t\t} else {\n\t\t\tconst zIndex = '1';\n\t\t\tlineHTMLNode.style.zIndex = zIndex;\n\t\t\tlineNumberHTMLNode.style.zIndex = zIndex;\n\t\t\tlineHTMLNode.style.top = `${top}px`;\n\t\t\tlineNumberHTMLNode.style.top = `${top}px`;\n\t\t}\n\t\treturn stickyLine;\n\t}\n\n\tprivate _renderFoldingIconForLine(foldingModel: FoldingModel | undefined, line: number): StickyFoldingIcon | undefined {\n\t\tconst showFoldingControls: 'mouseover' | 'always' | 'never' = this._editor.getOption(EditorOption.showFoldingControls);\n\t\tif (!foldingModel || showFoldingControls === 'never') {\n\t\t\treturn;\n\t\t}\n\t\tconst foldingRegions = foldingModel.regions;\n\t\tconst indexOfFoldingRegion = foldingRegions.findRange(line);\n\t\tconst startLineNumber = foldingRegions.getStartLineNumber(indexOfFoldingRegion);\n\t\tconst isFoldingScope = line === startLineNumber;\n\t\tif (!isFoldingScope) {\n\t\t\treturn;\n\t\t}\n\t\tconst isCollapsed = foldingRegions.isCollapsed(indexOfFoldingRegion);\n\t\tconst foldingIcon = new StickyFoldingIcon(isCollapsed, startLineNumber, foldingRegions.getEndLineNumber(indexOfFoldingRegion), this._lineHeight);\n\t\tfoldingIcon.setVisible(this._isOnGlyphMargin ? true : (isCollapsed || showFoldingControls === 'always'));\n\t\tfoldingIcon.domNode.setAttribute(STICKY_IS_FOLDING_ICON_ATTR, '');\n\t\treturn foldingIcon;\n\t}\n\n\tgetId(): string {\n\t\treturn 'editor.contrib.stickyScrollWidget';\n\t}\n\n\tgetDomNode(): HTMLElement {\n\t\treturn this._rootDomNode;\n\t}\n\n\tgetPosition(): IOverlayWidgetPosition | null {\n\t\treturn {\n\t\t\tpreference: OverlayWidgetPositionPreference.TOP_CENTER,\n\t\t\tstackOrdinal: 10,\n\t\t};\n\t}\n\n\tgetMinContentWidthInPx(): number {\n\t\treturn this._minContentWidthInPx;\n\t}\n\n\tfocusLineWithIndex(index: number) {\n\t\tif (0 <= index && index < this._renderedStickyLines.length) {\n\t\t\tthis._renderedStickyLines[index].lineDomNode.focus();\n\t\t}\n\t}\n\n\t/**\n\t * Given a leaf dom node, tries to find the editor position.\n\t */\n\tgetEditorPositionFromNode(spanDomNode: HTMLElement | null): Position | null {\n\t\tif (!spanDomNode || spanDomNode.children.length > 0) {\n\t\t\t// This is not a leaf node\n\t\t\treturn null;\n\t\t}\n\t\tconst renderedStickyLine = this._getRenderedStickyLineFromChildDomNode(spanDomNode);\n\t\tif (!renderedStickyLine) {\n\t\t\treturn null;\n\t\t}\n\t\tconst column = getColumnOfNodeOffset(renderedStickyLine.characterMapping, spanDomNode, 0);\n\t\treturn new Position(renderedStickyLine.lineNumber, column);\n\t}\n\n\tgetLineNumberFromChildDomNode(domNode: HTMLElement | null): number | null {\n\t\treturn this._getRenderedStickyLineFromChildDomNode(domNode)?.lineNumber ?? null;\n\t}\n\n\tprivate _getRenderedStickyLineFromChildDomNode(domNode: HTMLElement | null): RenderedStickyLine | null {\n\t\tconst index = this.getLineIndexFromChildDomNode(domNode);\n\t\tif (index === null || index < 0 || index >= this._renderedStickyLines.length) {\n\t\t\treturn null;\n\t\t}\n\t\treturn this._renderedStickyLines[index];\n\t}\n\n\t/**\n\t * Given a child dom node, tries to find the line number attribute that was stored in the node.\n\t * @returns the attribute value or null if none is found.\n\t */\n\tgetLineIndexFromChildDomNode(domNode: HTMLElement | null): number | null {\n\t\tconst lineIndex = this._getAttributeValue(domNode, STICKY_INDEX_ATTR);\n\t\treturn lineIndex ? parseInt(lineIndex, 10) : null;\n\t}\n\n\t/**\n\t * Given a child dom node, tries to find if it is (contained in) a sticky line.\n\t * @returns a boolean.\n\t */\n\tisInStickyLine(domNode: HTMLElement | null): boolean {\n\t\tconst isInLine = this._getAttributeValue(domNode, STICKY_IS_LINE_ATTR);\n\t\treturn isInLine !== undefined;\n\t}\n\n\t/**\n\t * Given a child dom node, tries to find if this dom node is (contained in) a sticky folding icon.\n\t * @returns a boolean.\n\t */\n\tisInFoldingIconDomNode(domNode: HTMLElement | null): boolean {\n\t\tconst isInFoldingIcon = this._getAttributeValue(domNode, STICKY_IS_FOLDING_ICON_ATTR);\n\t\treturn isInFoldingIcon !== undefined;\n\t}\n\n\t/**\n\t * Given the dom node, finds if it or its parent sequence contains the given attribute.\n\t * @returns the attribute value or undefined.\n\t */\n\tprivate _getAttributeValue(domNode: HTMLElement | null, attribute: string): string | undefined {\n\t\twhile (domNode && domNode !== this._rootDomNode) {\n\t\t\tconst line = domNode.getAttribute(attribute);\n\t\t\tif (line !== null) {\n\t\t\t\treturn line;\n\t\t\t}\n\t\t\tdomNode = domNode.parentElement;\n\t\t}\n\t\treturn;\n\t}\n}\n\nclass RenderedStickyLine {\n\tconstructor(\n\t\tpublic readonly index: number,\n\t\tpublic readonly lineNumber: number,\n\t\tpublic readonly lineDomNode: HTMLElement,\n\t\tpublic readonly lineNumberDomNode: HTMLElement,\n\t\tpublic readonly foldingIcon: StickyFoldingIcon | undefined,\n\t\tpublic readonly characterMapping: CharacterMapping,\n\t\tpublic readonly scrollWidth: number,\n\t\tpublic readonly height: number\n\t) { }\n}\n\nclass StickyFoldingIcon {\n\n\tpublic domNode: HTMLElement;\n\n\tconstructor(\n\t\tpublic isCollapsed: boolean,\n\t\tpublic foldingStartLine: number,\n\t\tpublic foldingEndLine: number,\n\t\tpublic dimension: number\n\t) {\n\t\tthis.domNode = document.createElement('div');\n\t\tthis.domNode.style.width = `26px`;\n\t\tthis.domNode.style.height = `${dimension}px`;\n\t\tthis.domNode.style.lineHeight = `${dimension}px`;\n\t\tthis.domNode.className = ThemeIcon.asClassName(isCollapsed ? foldingCollapsedIcon : foldingExpandedIcon);\n\t}\n\n\tpublic setVisible(visible: boolean) {\n\t\tthis.domNode.style.cursor = visible ? 'pointer' : 'default';\n\t\tthis.domNode.style.opacity = visible ? '1' : '0';\n\t}\n}\n"]}
|
|
@@ -21,14 +21,14 @@ import { ILanguageFeaturesService } from '../../../common/services/languageFeatu
|
|
|
21
21
|
import { historyNavigationVisible } from '../../../../platform/history/browser/contextScopedHistoryWidget.js';
|
|
22
22
|
export const Context = {
|
|
23
23
|
Visible: historyNavigationVisible,
|
|
24
|
-
HasFocusedSuggestion: new RawContextKey('suggestWidgetHasFocusedSuggestion', false, localize(
|
|
25
|
-
DetailsVisible: new RawContextKey('suggestWidgetDetailsVisible', false, localize(
|
|
26
|
-
MultipleSuggestions: new RawContextKey('suggestWidgetMultipleSuggestions', false, localize(
|
|
27
|
-
MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true, localize(
|
|
28
|
-
AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', true, localize(
|
|
29
|
-
HasInsertAndReplaceRange: new RawContextKey('suggestionHasInsertAndReplaceRange', false, localize(
|
|
30
|
-
InsertMode: new RawContextKey('suggestionInsertMode', undefined, { type: 'string', description: localize(
|
|
31
|
-
CanResolve: new RawContextKey('suggestionCanResolve', false, localize(
|
|
24
|
+
HasFocusedSuggestion: new RawContextKey('suggestWidgetHasFocusedSuggestion', false, localize(1462, "Whether any suggestion is focused")),
|
|
25
|
+
DetailsVisible: new RawContextKey('suggestWidgetDetailsVisible', false, localize(1463, "Whether suggestion details are visible")),
|
|
26
|
+
MultipleSuggestions: new RawContextKey('suggestWidgetMultipleSuggestions', false, localize(1464, "Whether there are multiple suggestions to pick from")),
|
|
27
|
+
MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true, localize(1465, "Whether inserting the current suggestion yields in a change or has everything already been typed")),
|
|
28
|
+
AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', true, localize(1466, "Whether suggestions are inserted when pressing Enter")),
|
|
29
|
+
HasInsertAndReplaceRange: new RawContextKey('suggestionHasInsertAndReplaceRange', false, localize(1467, "Whether the current suggestion has insert and replace behaviour")),
|
|
30
|
+
InsertMode: new RawContextKey('suggestionInsertMode', undefined, { type: 'string', description: localize(1468, "Whether the default behaviour is to insert or replace") }),
|
|
31
|
+
CanResolve: new RawContextKey('suggestionCanResolve', false, localize(1469, "Whether the current suggestion supports to resolve further details")),
|
|
32
32
|
};
|
|
33
33
|
export const suggestWidgetStatusbarMenu = new MenuId('suggestWidgetStatusBar');
|
|
34
34
|
export class CompletionItem {
|
|
@@ -482,7 +482,7 @@ let SuggestController = class SuggestController {
|
|
|
482
482
|
}
|
|
483
483
|
_alertCompletionItem(item) {
|
|
484
484
|
if (isNonEmptyArray(item.completion.additionalTextEdits)) {
|
|
485
|
-
const msg = nls.localize(
|
|
485
|
+
const msg = nls.localize(1470, "Accepting '{0}' made {1} additional edits", item.textLabel, item.completion.additionalTextEdits.length);
|
|
486
486
|
alert(msg);
|
|
487
487
|
}
|
|
488
488
|
}
|
|
@@ -669,7 +669,7 @@ export class TriggerSuggestAction extends EditorAction {
|
|
|
669
669
|
constructor() {
|
|
670
670
|
super({
|
|
671
671
|
id: TriggerSuggestAction.id,
|
|
672
|
-
label: nls.localize2(
|
|
672
|
+
label: nls.localize2(1478, "Trigger Suggest"),
|
|
673
673
|
precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasCompletionItemProvider, SuggestContext.Visible.toNegated()),
|
|
674
674
|
kbOpts: {
|
|
675
675
|
kbExpr: EditorContextKeys.textInputFocus,
|
|
@@ -717,19 +717,19 @@ registerEditorCommand(new SuggestCommand({
|
|
|
717
717
|
}],
|
|
718
718
|
menuOpts: [{
|
|
719
719
|
menuId: suggestWidgetStatusbarMenu,
|
|
720
|
-
title: nls.localize(
|
|
720
|
+
title: nls.localize(1471, "Insert"),
|
|
721
721
|
group: 'left',
|
|
722
722
|
order: 1,
|
|
723
723
|
when: SuggestContext.HasInsertAndReplaceRange.toNegated()
|
|
724
724
|
}, {
|
|
725
725
|
menuId: suggestWidgetStatusbarMenu,
|
|
726
|
-
title: nls.localize(
|
|
726
|
+
title: nls.localize(1472, "Insert"),
|
|
727
727
|
group: 'left',
|
|
728
728
|
order: 1,
|
|
729
729
|
when: ContextKeyExpr.and(SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('insert'))
|
|
730
730
|
}, {
|
|
731
731
|
menuId: suggestWidgetStatusbarMenu,
|
|
732
|
-
title: nls.localize(
|
|
732
|
+
title: nls.localize(1473, "Replace"),
|
|
733
733
|
group: 'left',
|
|
734
734
|
order: 1,
|
|
735
735
|
when: ContextKeyExpr.and(SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('replace'))
|
|
@@ -752,13 +752,13 @@ registerEditorCommand(new SuggestCommand({
|
|
|
752
752
|
group: 'left',
|
|
753
753
|
order: 2,
|
|
754
754
|
when: ContextKeyExpr.and(SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('insert')),
|
|
755
|
-
title: nls.localize(
|
|
755
|
+
title: nls.localize(1474, "Replace")
|
|
756
756
|
}, {
|
|
757
757
|
menuId: suggestWidgetStatusbarMenu,
|
|
758
758
|
group: 'left',
|
|
759
759
|
order: 2,
|
|
760
760
|
when: ContextKeyExpr.and(SuggestContext.HasInsertAndReplaceRange, SuggestContext.InsertMode.isEqualTo('replace')),
|
|
761
|
-
title: nls.localize(
|
|
761
|
+
title: nls.localize(1475, "Insert")
|
|
762
762
|
}]
|
|
763
763
|
}));
|
|
764
764
|
// continue to support the old command
|
|
@@ -866,13 +866,13 @@ registerEditorCommand(new SuggestCommand({
|
|
|
866
866
|
group: 'right',
|
|
867
867
|
order: 1,
|
|
868
868
|
when: ContextKeyExpr.and(SuggestContext.DetailsVisible, SuggestContext.CanResolve),
|
|
869
|
-
title: nls.localize(
|
|
869
|
+
title: nls.localize(1476, "Show Less")
|
|
870
870
|
}, {
|
|
871
871
|
menuId: suggestWidgetStatusbarMenu,
|
|
872
872
|
group: 'right',
|
|
873
873
|
order: 1,
|
|
874
874
|
when: ContextKeyExpr.and(SuggestContext.DetailsVisible.toNegated(), SuggestContext.CanResolve),
|
|
875
|
-
title: nls.localize(
|
|
875
|
+
title: nls.localize(1477, "Show More")
|
|
876
876
|
}]
|
|
877
877
|
}));
|
|
878
878
|
registerEditorCommand(new SuggestCommand({
|
|
@@ -931,7 +931,7 @@ registerEditorAction(class extends EditorAction {
|
|
|
931
931
|
constructor() {
|
|
932
932
|
super({
|
|
933
933
|
id: 'editor.action.resetSuggestSize',
|
|
934
|
-
label: nls.localize2(
|
|
934
|
+
label: nls.localize2(1479, "Reset Suggest Widget Size"),
|
|
935
935
|
precondition: undefined
|
|
936
936
|
});
|
|
937
937
|
}
|
|
@@ -42,15 +42,15 @@ import { isWindows } from '../../../../base/common/platform.js';
|
|
|
42
42
|
/**
|
|
43
43
|
* Suggest widget colors
|
|
44
44
|
*/
|
|
45
|
-
registerColor('editorSuggestWidget.background', editorWidgetBackground, nls.localize(
|
|
46
|
-
registerColor('editorSuggestWidget.border', editorWidgetBorder, nls.localize(
|
|
47
|
-
export const editorSuggestWidgetForeground = registerColor('editorSuggestWidget.foreground', editorForeground, nls.localize(
|
|
48
|
-
registerColor('editorSuggestWidget.selectedForeground', quickInputListFocusForeground, nls.localize(
|
|
49
|
-
registerColor('editorSuggestWidget.selectedIconForeground', quickInputListFocusIconForeground, nls.localize(
|
|
50
|
-
export const editorSuggestWidgetSelectedBackground = registerColor('editorSuggestWidget.selectedBackground', quickInputListFocusBackground, nls.localize(
|
|
51
|
-
registerColor('editorSuggestWidget.highlightForeground', listHighlightForeground, nls.localize(
|
|
52
|
-
registerColor('editorSuggestWidget.focusHighlightForeground', listFocusHighlightForeground, nls.localize(
|
|
53
|
-
registerColor('editorSuggestWidgetStatus.foreground', transparent(editorSuggestWidgetForeground, .5), nls.localize(
|
|
45
|
+
registerColor('editorSuggestWidget.background', editorWidgetBackground, nls.localize(1480, 'Background color of the suggest widget.'));
|
|
46
|
+
registerColor('editorSuggestWidget.border', editorWidgetBorder, nls.localize(1481, 'Border color of the suggest widget.'));
|
|
47
|
+
export const editorSuggestWidgetForeground = registerColor('editorSuggestWidget.foreground', editorForeground, nls.localize(1482, 'Foreground color of the suggest widget.'));
|
|
48
|
+
registerColor('editorSuggestWidget.selectedForeground', quickInputListFocusForeground, nls.localize(1483, 'Foreground color of the selected entry in the suggest widget.'));
|
|
49
|
+
registerColor('editorSuggestWidget.selectedIconForeground', quickInputListFocusIconForeground, nls.localize(1484, 'Icon foreground color of the selected entry in the suggest widget.'));
|
|
50
|
+
export const editorSuggestWidgetSelectedBackground = registerColor('editorSuggestWidget.selectedBackground', quickInputListFocusBackground, nls.localize(1485, 'Background color of the selected entry in the suggest widget.'));
|
|
51
|
+
registerColor('editorSuggestWidget.highlightForeground', listHighlightForeground, nls.localize(1486, 'Color of the match highlights in the suggest widget.'));
|
|
52
|
+
registerColor('editorSuggestWidget.focusHighlightForeground', listFocusHighlightForeground, nls.localize(1487, 'Color of the match highlights in the suggest widget when an item is focused.'));
|
|
53
|
+
registerColor('editorSuggestWidgetStatus.foreground', transparent(editorSuggestWidgetForeground, .5), nls.localize(1488, 'Foreground color of the suggest widget status.'));
|
|
54
54
|
class PersistedWidgetSize {
|
|
55
55
|
constructor(_service, editor) {
|
|
56
56
|
this._service = _service;
|
|
@@ -78,8 +78,8 @@ class PersistedWidgetSize {
|
|
|
78
78
|
}
|
|
79
79
|
let SuggestWidget = class SuggestWidget {
|
|
80
80
|
static { SuggestWidget_1 = this; }
|
|
81
|
-
static { this.LOADING_MESSAGE = nls.localize(
|
|
82
|
-
static { this.NO_SUGGESTIONS_MESSAGE = nls.localize(
|
|
81
|
+
static { this.LOADING_MESSAGE = nls.localize(1489, "Loading..."); }
|
|
82
|
+
static { this.NO_SUGGESTIONS_MESSAGE = nls.localize(1490, "No suggestions."); }
|
|
83
83
|
constructor(editor, _storageService, _contextKeyService, _themeService, instantiationService) {
|
|
84
84
|
this.editor = editor;
|
|
85
85
|
this._storageService = _storageService;
|
|
@@ -166,7 +166,7 @@ let SuggestWidget = class SuggestWidget {
|
|
|
166
166
|
multipleSelectionSupport: false,
|
|
167
167
|
accessibilityProvider: {
|
|
168
168
|
getRole: () => isWindows ? 'listitem' : 'option',
|
|
169
|
-
getWidgetAriaLabel: () => nls.localize(
|
|
169
|
+
getWidgetAriaLabel: () => nls.localize(1491, "Suggest"),
|
|
170
170
|
getWidgetRole: () => 'listbox',
|
|
171
171
|
getAriaLabel: (item) => {
|
|
172
172
|
let label = item.textLabel;
|
|
@@ -174,24 +174,24 @@ let SuggestWidget = class SuggestWidget {
|
|
|
174
174
|
if (typeof item.completion.label !== 'string') {
|
|
175
175
|
const { detail, description } = item.completion.label;
|
|
176
176
|
if (detail && description) {
|
|
177
|
-
label = nls.localize(
|
|
177
|
+
label = nls.localize(1492, '{0} {1}, {2}, {3}', label, detail, description, kindLabel);
|
|
178
178
|
}
|
|
179
179
|
else if (detail) {
|
|
180
|
-
label = nls.localize(
|
|
180
|
+
label = nls.localize(1493, '{0} {1}, {2}', label, detail, kindLabel);
|
|
181
181
|
}
|
|
182
182
|
else if (description) {
|
|
183
|
-
label = nls.localize(
|
|
183
|
+
label = nls.localize(1494, '{0}, {1}, {2}', label, description, kindLabel);
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
else {
|
|
187
|
-
label = nls.localize(
|
|
187
|
+
label = nls.localize(1495, '{0}, {1}', label, kindLabel);
|
|
188
188
|
}
|
|
189
189
|
if (!item.isResolved || !this._isDetailsVisible()) {
|
|
190
190
|
return label;
|
|
191
191
|
}
|
|
192
192
|
const { documentation, detail } = item.completion;
|
|
193
193
|
const docs = strings.format('{0}{1}', detail || '', documentation ? (typeof documentation === 'string' ? documentation : documentation.value) : '');
|
|
194
|
-
return nls.localize(
|
|
194
|
+
return nls.localize(1496, "{0}, docs: {1}", label, docs);
|
|
195
195
|
},
|
|
196
196
|
}
|
|
197
197
|
});
|
|
@@ -48,7 +48,7 @@ let SuggestDetailsWidget = class SuggestDetailsWidget {
|
|
|
48
48
|
this._disposables.add(this._scrollbar);
|
|
49
49
|
this._header = dom.append(this._body, dom.$('.header'));
|
|
50
50
|
this._close = dom.append(this._header, dom.$('span' + ThemeIcon.asCSSSelector(Codicon.close)));
|
|
51
|
-
this._close.title = nls.localize(
|
|
51
|
+
this._close.title = nls.localize(1497, "Close");
|
|
52
52
|
this._close.role = 'button';
|
|
53
53
|
this._close.tabIndex = -1;
|
|
54
54
|
this._type = dom.append(this._header, dom.$('p.type'));
|
|
@@ -94,7 +94,7 @@ let SuggestDetailsWidget = class SuggestDetailsWidget {
|
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
renderLoading() {
|
|
97
|
-
this._type.textContent = nls.localize(
|
|
97
|
+
this._type.textContent = nls.localize(1498, "Loading...");
|
|
98
98
|
this._docs.textContent = '';
|
|
99
99
|
this.domNode.classList.remove('no-docs', 'no-type');
|
|
100
100
|
this.layout(this.size.width, this.getLayoutInfo().lineHeight * 2);
|
|
@@ -28,7 +28,7 @@ import { FileKind } from '../../../../platform/files/common/files.js';
|
|
|
28
28
|
import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
|
|
29
29
|
import { IThemeService } from '../../../../platform/theme/common/themeService.js';
|
|
30
30
|
import { canExpandCompletionItem } from './suggestWidgetDetails.js';
|
|
31
|
-
const suggestMoreInfoIcon = registerIcon('suggest-more-info', Codicon.chevronRight, nls.localize(
|
|
31
|
+
const suggestMoreInfoIcon = registerIcon('suggest-more-info', Codicon.chevronRight, nls.localize(1499, 'Icon for more information in the suggest widget.'));
|
|
32
32
|
const _completionItemColor = new class ColorExtractor {
|
|
33
33
|
static { this._regexRelaxed = /(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/; }
|
|
34
34
|
static { this._regexStrict = new RegExp(`^${ColorExtractor._regexRelaxed.source}$`, 'i'); }
|
|
@@ -84,7 +84,7 @@ let ItemRenderer = class ItemRenderer {
|
|
|
84
84
|
const qualifierLabel = append(left, $('span.qualifier-label'));
|
|
85
85
|
const detailsLabel = append(right, $('span.details-label'));
|
|
86
86
|
const readMore = append(right, $('span.readMore' + ThemeIcon.asCSSSelector(suggestMoreInfoIcon)));
|
|
87
|
-
readMore.title = nls.localize(
|
|
87
|
+
readMore.title = nls.localize(1500, "Read More");
|
|
88
88
|
const configureFont = () => {
|
|
89
89
|
const options = this._editor.getOptions();
|
|
90
90
|
const fontInfo = options.get(59 /* EditorOption.fontInfo */);
|
|
@@ -16,7 +16,7 @@ import { IContextKeyService, RawContextKey } from '../../../../platform/contextk
|
|
|
16
16
|
import { localize } from '../../../../nls.js';
|
|
17
17
|
let WordContextKey = class WordContextKey {
|
|
18
18
|
static { WordContextKey_1 = this; }
|
|
19
|
-
static { this.AtEnd = new RawContextKey('atEndOfWord', false, { type: 'boolean', description: localize(
|
|
19
|
+
static { this.AtEnd = new RawContextKey('atEndOfWord', false, { type: 'boolean', description: localize(1501, "A context key that is true when at the end of a word. Note that this is only defined when tab-completions are enabled") }); }
|
|
20
20
|
constructor(_editor, contextKeyService) {
|
|
21
21
|
this._editor = _editor;
|
|
22
22
|
this._enabled = false;
|