@codingame/monaco-vscode-api 2.0.3 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.js +15 -12
- package/extensions.d.ts +4 -7
- package/external/@xterm/xterm/typings/xterm.d.ts +22 -0
- package/missing-services.js +62 -6
- package/package.json +8 -8
- package/service-override/tools/editor.js +14 -0
- package/services.d.ts +3 -2
- package/services.js +6 -4
- package/vscode/src/vs/base/browser/browser.js +45 -30
- package/vscode/src/vs/base/browser/canIUse.js +1 -1
- package/vscode/src/vs/base/browser/defaultWorkerFactory.js +12 -5
- package/vscode/src/vs/base/browser/dom.js +104 -14
- package/vscode/src/vs/base/browser/indexedDB.js +3 -3
- package/vscode/src/vs/base/browser/markdownRenderer.js +29 -1
- package/vscode/src/vs/base/browser/mouseEvent.js +17 -3
- package/vscode/src/vs/base/browser/ui/actionbar/actionbar.js +3 -3
- package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.js +287 -0
- package/vscode/src/vs/base/browser/ui/button/button.js +9 -0
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/dialog/dialog.js +1 -1
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabelHover.js +16 -5
- package/vscode/src/vs/base/browser/ui/list/listView.js +31 -11
- package/vscode/src/vs/base/browser/ui/list/listWidget.js +35 -21
- package/vscode/src/vs/base/browser/ui/menu/menu.js +10 -1
- package/vscode/src/vs/base/browser/ui/menu/menubar.js +8 -4
- package/vscode/src/vs/base/browser/ui/scrollbar/scrollableElement.js +6 -5
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +469 -95
- package/vscode/src/vs/base/browser/ui/tree/asyncDataTree.js +22 -7
- package/vscode/src/vs/base/browser/ui/tree/indexTreeModel.js +0 -5
- package/vscode/src/vs/base/browser/ui/tree/media/tree.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/tree/objectTree.js +70 -4
- package/vscode/src/vs/base/common/assert.js +6 -1
- package/vscode/src/vs/base/common/async.js +31 -6
- package/vscode/src/vs/base/common/codicons.js +5 -0
- package/vscode/src/vs/base/common/event.d.ts +0 -5
- package/vscode/src/vs/base/common/event.js +0 -15
- package/vscode/src/vs/base/common/filters.d.ts +1 -18
- package/vscode/src/vs/base/common/htmlContent.js +12 -6
- package/vscode/src/vs/base/common/iterator.js +8 -0
- package/vscode/src/vs/base/common/labels.js +2 -1
- package/vscode/src/vs/base/common/map.js +20 -1
- package/vscode/src/vs/base/common/observableInternal/base.d.ts +4 -0
- package/vscode/src/vs/base/common/observableInternal/base.js +16 -8
- package/vscode/src/vs/base/common/observableInternal/derived.js +4 -6
- package/vscode/src/vs/base/common/observableInternal/utils.js +60 -5
- package/vscode/src/vs/base/common/platform.js +20 -20
- package/vscode/src/vs/base/common/prefixTree.js +4 -3
- package/vscode/src/vs/base/common/product.d.ts +5 -2
- package/vscode/src/vs/base/common/strings.js +23 -7
- package/vscode/src/vs/base/common/themables.js +4 -1
- package/vscode/src/vs/base/common/uri.js +11 -1
- package/vscode/src/vs/base/common/worker/simpleWorker.js +1 -1
- package/vscode/src/vs/editor/browser/config/migrateOptions.js +5 -0
- package/vscode/src/vs/editor/browser/controller/mouseHandler.js +1 -0
- package/vscode/src/vs/editor/browser/controller/mouseTarget.js +14 -8
- package/vscode/src/vs/editor/browser/controller/pointerHandler.js +18 -11
- package/vscode/src/vs/editor/browser/controller/textAreaHandler.js +1 -1
- package/vscode/src/vs/editor/browser/controller/textAreaInput.js +3 -3
- package/vscode/src/vs/{workbench/services/hover/browser → editor/browser/services}/hoverService.d.ts +7 -6
- package/vscode/src/vs/editor/browser/services/hoverService.js +195 -0
- package/vscode/src/vs/editor/browser/view.js +29 -39
- package/vscode/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +41 -19
- package/vscode/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +30 -23
- package/vscode/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +23 -8
- package/vscode/src/vs/editor/browser/viewParts/lines/viewLines.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +8 -1
- package/vscode/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.js +7 -1
- package/vscode/src/vs/editor/browser/viewParts/minimap/minimap.js +1 -1
- package/vscode/src/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +30 -3
- package/vscode/src/vs/editor/browser/widget/codeEditorWidget.js +39 -15
- package/vscode/src/vs/editor/browser/widget/diffEditor/{accessibleDiffViewer.css.js → components/accessibleDiffViewer.css.js} +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/{accessibleDiffViewer.js → components/accessibleDiffViewer.js} +43 -43
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorDecorations.js +89 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/{diffEditorEditors.js → components/diffEditorEditors.js} +14 -14
- package/vscode/src/vs/editor/browser/widget/diffEditor/{diffEditorSash.js → components/diffEditorSash.js} +5 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/{lineAlignment.js → components/diffEditorViewZones/diffEditorViewZones.js} +38 -28
- package/vscode/src/vs/editor/browser/widget/diffEditor/{inlineDiffDeletedCodeMargin.js → components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js} +14 -14
- package/vscode/src/vs/editor/browser/widget/diffEditor/{renderLines.js → components/diffEditorViewZones/renderLines.js} +7 -7
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +29 -38
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +150 -38
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +17 -16
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +104 -6
- package/vscode/src/vs/editor/browser/widget/diffEditor/{hideUnchangedRegionsFeature.js → features/hideUnchangedRegionsFeature.js} +51 -78
- package/vscode/src/vs/editor/browser/widget/diffEditor/{movedBlocksLines.js → features/movedBlocksLinesFeature.js} +23 -23
- package/vscode/src/vs/editor/browser/widget/diffEditor/{overviewRulerPart.js → features/overviewRulerFeature.js} +28 -28
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +145 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/{decorations.js → registrations.contribution.js} +18 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +10 -2
- package/vscode/src/vs/editor/browser/widget/hoverWidget/hover.css.js +4 -0
- package/vscode/src/vs/editor/browser/widget/hoverWidget/hoverWidget.js +527 -0
- package/vscode/src/vs/editor/{contrib → browser/widget}/markdownRenderer/browser/markdownRenderer.js +11 -11
- package/vscode/src/vs/editor/{contrib → browser/widget}/markdownRenderer/browser/renderedMarkdown.css.js +1 -1
- package/vscode/src/vs/editor/common/config/editorOptions.d.ts +11 -10
- package/vscode/src/vs/editor/common/config/editorOptions.js +46 -42
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +3 -3
- package/vscode/src/vs/editor/common/core/offsetRange.d.ts +2 -0
- package/vscode/src/vs/editor/common/core/offsetRange.js +8 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/algorithms/diffAlgorithm.js +9 -0
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/heuristicSequenceOptimizations.js +50 -47
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/linesSliceCharSequence.js +4 -1
- package/vscode/src/vs/editor/common/diff/rangeMapping.d.ts +2 -1
- package/vscode/src/vs/editor/common/diff/rangeMapping.js +13 -2
- package/vscode/src/vs/editor/common/languages.d.ts +10 -2
- package/vscode/src/vs/editor/common/model/textModel.js +19 -13
- package/vscode/src/vs/editor/common/model/tokenizationTextModelPart.js +1 -1
- package/vscode/src/vs/editor/common/model.d.ts +19 -1
- package/vscode/src/vs/editor/common/model.js +2 -1
- package/vscode/src/vs/editor/common/services/editorSimpleWorker.js +2 -1
- package/vscode/src/vs/editor/common/services/getIconClasses.js +4 -1
- package/vscode/src/vs/editor/common/services/semanticTokensProviderStyling.js +3 -3
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +9 -8
- package/vscode/src/vs/editor/common/standaloneStrings.js +18 -18
- package/vscode/src/vs/editor/common/viewEvents.js +2 -0
- package/vscode/src/vs/editor/common/viewModel/glyphLanesModel.js +55 -0
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +4 -1
- package/vscode/src/vs/editor/contrib/clipboard/browser/clipboard.js +5 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeAction.js +1 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +46 -20
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionMenu.js +1 -1
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +38 -11
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +56 -101
- package/vscode/src/vs/editor/contrib/codelens/browser/codelensWidget.js +3 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorContributions.js +2 -2
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorHoverParticipant.js +10 -29
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorPickerWidget.js +4 -4
- package/vscode/src/vs/editor/contrib/diffEditorBreadcrumbs/browser/contribution.js +51 -0
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +19 -1
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +38 -10
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +29 -1
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/edit.js +10 -3
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +3 -17
- package/vscode/src/vs/editor/contrib/find/browser/findController.js +3 -35
- package/vscode/src/vs/editor/contrib/folding/browser/foldingDecorations.js +26 -6
- package/vscode/src/vs/editor/contrib/fontZoom/browser/fontZoom.js +6 -6
- package/vscode/src/vs/editor/contrib/format/browser/format.js +9 -9
- package/vscode/src/vs/editor/contrib/format/browser/formatActions.js +5 -5
- package/vscode/src/vs/editor/contrib/gotoError/browser/media/gotoErrorWidget.css.js +1 -1
- package/vscode/src/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +2 -2
- package/vscode/src/vs/editor/contrib/hover/browser/contentHover.js +85 -76
- package/vscode/src/vs/editor/contrib/hover/browser/hover.js +120 -90
- package/vscode/src/vs/editor/contrib/hover/browser/marginHover.js +18 -6
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +1 -1
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +2 -2
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHints.js +4 -2
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +56 -38
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +1 -1
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +12 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +4 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +2 -2
- package/vscode/src/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +50 -53
- package/vscode/src/vs/editor/contrib/message/browser/messageController.js +5 -2
- package/vscode/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +5 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScroll.css.js +1 -1
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +4 -4
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +8 -5
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +58 -46
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestController.js +34 -7
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +30 -38
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestModel.js +2 -2
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidget.js +11 -3
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +18 -7
- package/vscode/src/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +8 -10
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/vscode/src/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +7 -6
- package/vscode/src/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -0
- package/vscode/src/vs/editor/editor.api.d.ts +82 -11
- package/vscode/src/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +8 -3
- package/vscode/src/vs/editor/standalone/browser/standaloneLayoutService.js +4 -3
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +22 -11
- package/vscode/src/vs/editor/standalone/browser/standaloneThemeService.js +1 -1
- package/vscode/src/vs/nls.d.ts +6 -0
- package/vscode/src/vs/platform/accessibility/browser/accessibilityService.js +4 -1
- package/vscode/src/vs/platform/accessibility/common/accessibility.d.ts +2 -16
- package/vscode/src/vs/platform/accessibility/common/accessibility.js +1 -2
- package/vscode/src/vs/platform/action/common/actionCommonCategories.d.ts +7 -20
- package/vscode/src/vs/platform/action/common/actionCommonCategories.js +8 -8
- package/vscode/src/vs/platform/actionWidget/browser/actionList.js +0 -1
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.css.js +1 -1
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +2 -0
- package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +5 -0
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.css.js +1 -1
- package/vscode/src/vs/platform/actions/browser/menuEntryActionViewItem.js +2 -2
- package/vscode/src/vs/platform/actions/common/actions.d.ts +9 -1
- package/vscode/src/vs/platform/actions/common/actions.js +12 -1
- package/vscode/src/vs/platform/audioCues/browser/audioCueService.d.ts +11 -1
- package/vscode/src/vs/platform/audioCues/browser/audioCueService.js +174 -28
- package/vscode/src/vs/platform/clipboard/browser/clipboardService.js +38 -5
- package/vscode/src/vs/platform/configuration/common/configuration.d.ts +0 -1
- package/vscode/src/vs/platform/environment/common/environmentService.js +1 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +5 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +24 -5
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +6 -1
- package/vscode/src/vs/{workbench/services → platform}/hover/browser/hover.d.ts +6 -8
- package/vscode/src/vs/platform/hover/browser/hover.js +3 -0
- package/vscode/src/vs/platform/instantiation/common/instantiationService.js +14 -4
- package/vscode/src/vs/platform/keybinding/common/abstractKeybindingService.js +11 -4
- package/vscode/src/vs/platform/keybinding/common/keybinding.d.ts +7 -0
- package/vscode/src/vs/platform/layout/browser/layoutService.d.ts +6 -0
- package/vscode/src/vs/platform/list/browser/listService.js +7 -5
- package/vscode/src/vs/platform/log/common/bufferLog.js +1 -0
- package/vscode/src/vs/platform/log/common/log.d.ts +0 -1
- package/vscode/src/vs/platform/log/common/log.js +1 -2
- package/vscode/src/vs/platform/notification/common/notification.d.ts +36 -19
- package/vscode/src/vs/platform/notification/common/notification.js +9 -3
- package/vscode/src/vs/platform/quickinput/browser/pickerQuickAccess.js +4 -1
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +50 -48
- package/vscode/src/vs/platform/quickinput/browser/quickInputController.js +3 -5
- package/vscode/src/vs/platform/quickinput/browser/quickInputList.js +49 -66
- package/vscode/src/vs/platform/quickinput/browser/quickInputService.js +11 -3
- package/vscode/src/vs/platform/quickinput/browser/quickInputUtils.js +16 -2
- package/vscode/src/vs/platform/quickinput/common/quickInput.d.ts +230 -26
- package/vscode/src/vs/platform/remote/common/remoteAuthorityResolver.d.ts +1 -0
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -0
- package/vscode/src/vs/platform/theme/browser/defaultStyles.js +5 -3
- package/vscode/src/vs/platform/theme/common/colorRegistry.js +28 -9
- package/vscode/src/vs/platform/tunnel/common/tunnel.d.ts +2 -0
- package/vscode/src/vs/platform/window/common/window.js +14 -8
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +97 -78
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostAuthentication.js +1 -22
- package/vscode/src/vs/workbench/api/common/extHostChat.js +0 -6
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +31 -36
- package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostComments.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostConsoleForwarder.js +1 -0
- package/vscode/src/vs/workbench/api/common/extHostDebugService.js +130 -6
- package/vscode/src/vs/workbench/api/common/extHostDocumentContentProviders.js +28 -15
- package/vscode/src/vs/workbench/api/common/extHostDocuments.js +4 -5
- package/vscode/src/vs/workbench/api/common/extHostExtensionService.js +5 -1
- package/vscode/src/vs/workbench/api/common/extHostFileSystem.js +1 -2
- package/vscode/src/vs/workbench/api/common/extHostFileSystemConsumer.js +2 -2
- package/vscode/src/vs/workbench/api/common/extHostInlineChat.js +35 -33
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +40 -13
- package/vscode/src/vs/workbench/api/common/extHostMessageService.js +10 -1
- package/vscode/src/vs/workbench/api/common/extHostNotebook.js +11 -7
- package/vscode/src/vs/workbench/api/common/extHostNotebookEditors.js +2 -3
- package/vscode/src/vs/workbench/api/common/extHostNotebookKernels.js +29 -4
- package/vscode/src/vs/workbench/api/common/extHostProfileContentHandler.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostProgress.js +1 -7
- package/vscode/src/vs/workbench/api/common/extHostSCM.js +49 -93
- package/vscode/src/vs/workbench/api/common/extHostSpeech.js +21 -0
- package/vscode/src/vs/workbench/api/common/extHostTask.js +18 -22
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +1 -0
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostTesting.js +55 -36
- package/vscode/src/vs/workbench/api/common/extHostTextEditor.js +5 -2
- package/vscode/src/vs/workbench/api/common/extHostTextEditors.js +6 -7
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +6 -3
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +4 -2
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +74 -12
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +27 -8
- package/vscode/src/vs/workbench/api/worker/extHostConsoleForwarder.js +1 -1
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +172 -103
- package/vscode/src/vs/workbench/browser/actions/windowActions.js +13 -17
- package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +34 -34
- package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +4 -4
- package/vscode/src/vs/workbench/browser/dnd.js +2 -2
- package/vscode/src/vs/workbench/browser/labels.js +34 -4
- package/vscode/src/vs/workbench/browser/part.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +4 -4
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsControl.js +801 -0
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsModel.js +140 -0
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbsPicker.js +410 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editor.js +1 -2
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +304 -303
- package/vscode/src/vs/workbench/browser/parts/editor/editorAutoSave.js +101 -47
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +114 -47
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +1313 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupWatermark.js +190 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorPanes.js +344 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +10 -10
- package/vscode/src/vs/workbench/browser/parts/editor/editorTabsControl.js +27 -42
- package/vscode/src/vs/workbench/browser/parts/editor/editorTitleControl.js +152 -0
- package/vscode/src/vs/workbench/browser/parts/editor/editorsObserver.js +8 -8
- package/vscode/src/vs/workbench/browser/parts/editor/media/breadcrumbscontrol.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/editorgroupview.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/editortitlecontrol.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/media/singleeditortabscontrol.css.js +4 -0
- package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +1626 -0
- package/vscode/src/vs/workbench/browser/parts/editor/multiRowEditorTabsControl.js +150 -0
- package/vscode/src/vs/workbench/browser/parts/editor/noEditorTabsControl.js +52 -0
- package/vscode/src/vs/workbench/browser/parts/editor/singleEditorTabsControl.js +260 -0
- package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/textResourceEditor.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +39 -36
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +68 -28
- package/vscode/src/vs/workbench/browser/parts/panel/media/panelpart.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +15 -14
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +18 -17
- package/vscode/src/vs/workbench/browser/parts/titlebar/windowTitle.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/media/views.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +7 -10
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +2 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.d.ts +2 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +18 -17
- package/vscode/src/vs/workbench/browser/quickaccess.js +33 -1
- package/vscode/src/vs/workbench/browser/web.api.d.ts +6 -0
- package/vscode/src/vs/workbench/browser/window.js +92 -9
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +114 -65
- package/vscode/src/vs/workbench/common/component.d.ts +5 -1
- package/vscode/src/vs/workbench/common/component.js +6 -0
- package/vscode/src/vs/workbench/common/configuration.js +11 -1
- package/vscode/src/vs/workbench/common/contextkeys.js +8 -4
- package/vscode/src/vs/workbench/common/editor/editorInput.d.ts +6 -0
- package/vscode/src/vs/workbench/common/editor/editorInput.js +3 -0
- package/vscode/src/vs/workbench/common/editor/filteredEditorGroupModel.js +107 -0
- package/vscode/src/vs/workbench/common/editor/resourceEditorInput.d.ts +6 -3
- package/vscode/src/vs/workbench/common/editor/resourceEditorInput.js +21 -3
- package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.d.ts +2 -1
- package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.js +9 -6
- package/vscode/src/vs/workbench/common/editor.d.ts +16 -4
- package/vscode/src/vs/workbench/common/editor.js +7 -1
- package/vscode/src/vs/workbench/common/memento.js +33 -12
- package/vscode/src/vs/workbench/common/notifications.js +30 -7
- package/vscode/src/vs/workbench/common/theme.js +61 -1
- package/vscode/src/vs/workbench/common/views.d.ts +1 -28
- package/vscode/src/vs/workbench/common/views.js +1 -2
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +232 -19
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +9 -9
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +1 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +19 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +8 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +57 -38
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +9 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +7 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +31 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +93 -49
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +30 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSlashCommandContentWidget.js +24 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +9 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +12 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +21 -43
- package/vscode/src/vs/workbench/contrib/chat/common/chatService.js +6 -6
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +4 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +0 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/{comments.contribution.js → commentsAccessibility.js} +36 -128
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +41 -18
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +202 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +27 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +165 -52
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +48 -31
- package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +6 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.d.ts +40 -10
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +28 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugContext.js +14 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +52 -23
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +164 -0
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +10 -0
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +285 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +123 -78
- package/vscode/src/vs/workbench/contrib/extensions/common/extensionsInput.js +10 -0
- package/vscode/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.js +3 -19
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +1 -2
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +8 -9
- package/vscode/src/vs/workbench/contrib/files/browser/files.configuration.contribution.js +70 -2
- package/vscode/src/vs/workbench/contrib/files/browser/files.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +2 -2
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +34 -17
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +5 -4
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +48 -14
- package/vscode/src/vs/workbench/contrib/format/browser/formatActionsMultiple.js +16 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +317 -321
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatLivePreviewWidget.js +17 -24
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingService.js +3 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +306 -130
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +3 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +385 -613
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +69 -64
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +71 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +39 -44
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +5 -3
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/findModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/coreActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/foldingController.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookCellChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/media/notebookEditorStickyScroll.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +38 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +36 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +32 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellPart.js +24 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbarStickyScroll.js +1 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatActions.js +264 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/chat/cellChatController.js +60 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCell.js +12 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +12 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +6 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookViewModelImpl.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +188 -155
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +10 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +16 -33
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorInput.js +9 -7
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +6 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookKernelService.js +2 -1
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +29 -14
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +15 -3
- package/vscode/src/vs/workbench/contrib/remote/browser/urlFinder.js +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +22 -6
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +16 -17
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +78 -50
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +15 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +25 -45
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +12 -4
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalIcon.js +2 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationAddon.js +33 -36
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/decorationStyles.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/markNavigationAddon.js +3 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +5 -8
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.js +15 -27
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +3 -3
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +38 -22
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverageService.js +5 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testProfileService.js +60 -40
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testResultStorage.js +15 -11
- package/vscode/src/vs/workbench/contrib/testing/common/testService.js +26 -1
- package/vscode/src/vs/workbench/contrib/testing/common/testTypes.js +24 -23
- package/vscode/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.js +1 -1
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +124 -26
- package/vscode/src/vs/workbench/services/authentication/common/authentication.d.ts +68 -0
- package/vscode/src/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.js +76 -36
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolver.js +1 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.js +1 -0
- package/vscode/src/vs/workbench/services/editor/browser/editorService.js +15 -3
- package/vscode/src/vs/workbench/services/editor/common/editorGroupFinder.js +10 -1
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +51 -43
- package/vscode/src/vs/workbench/services/editor/common/editorService.d.ts +13 -8
- package/vscode/src/vs/workbench/services/editor/common/editorService.js +2 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +10 -10
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +7 -7
- package/vscode/src/vs/workbench/services/extensions/common/rpcProtocol.js +1 -0
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.d.ts +29 -9
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +160 -63
- package/vscode/src/vs/workbench/services/host/browser/host.d.ts +8 -0
- package/vscode/src/vs/workbench/services/keybinding/common/keybindingEditing.js +60 -72
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.d.ts +0 -4
- package/vscode/src/vs/workbench/services/notebook/common/notebookDocumentService.js +56 -0
- package/vscode/src/vs/workbench/services/output/common/output.js +2 -2
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorInput.js +10 -0
- package/vscode/src/vs/workbench/services/preferences/common/preferencesEditorInput.js +10 -0
- package/vscode/src/vs/workbench/services/remote/common/remoteExplorerService.js +2 -1
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +5 -4
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorInput.js +21 -8
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.d.ts +4 -0
- package/vscode/src/vs/workbench/services/untitled/common/untitledTextEditorService.js +3 -0
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +4 -4
- package/vscode/src/vs/workbench/{browser/parts/views → services/views/browser}/viewsService.js +20 -15
- package/vscode/src/vs/workbench/services/views/common/viewsService.d.ts +34 -0
- package/vscode/src/vs/workbench/services/{hover/browser/hover.js → views/common/viewsService.js} +2 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.d.ts +6 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +5 -2
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceTrust.js +1 -0
- package/vscode-dts/vscode.proposed.chatAgents2.d.ts +112 -47
- package/vscode-dts/vscode.proposed.chatAgents2Additions.d.ts +68 -9
- package/vscode-dts/{vscode.proposed.scmInputBoxActionButton.d.ts → vscode.proposed.codeActionRanges.d.ts} +8 -10
- package/vscode-dts/{vscode.proposed.readonlyMessage.d.ts → vscode.proposed.commentReactor.d.ts} +3 -4
- package/vscode-dts/vscode.proposed.contribMultiDiffEditorMenus.d.ts +6 -0
- package/vscode-dts/vscode.proposed.contribSourceControlHistoryItemGroupMenu.d.ts +8 -0
- package/vscode-dts/vscode.proposed.contribSourceControlHistoryItemMenu.d.ts +8 -0
- package/vscode-dts/vscode.proposed.debugVisualization.d.ts +100 -0
- package/vscode-dts/vscode.proposed.defaultChatAgent.d.ts +1 -1
- package/vscode-dts/vscode.proposed.interactive.d.ts +13 -16
- package/vscode-dts/vscode.proposed.notebookVariableProvider.d.ts +4 -1
- package/vscode-dts/vscode.proposed.resolvers.d.ts +4 -0
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +4 -10
- package/vscode-dts/vscode.proposed.scmMultiDiffEditor.d.ts +34 -0
- package/vscode-dts/vscode.proposed.speech.d.ts +17 -3
- package/vscode-dts/vscode.proposed.testCoverage.d.ts +7 -1
- package/vscode-dts/vscode.proposed.tunnelFactory.d.ts +4 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/colors.js +0 -17
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorDecorations.js +0 -231
- package/vscode/src/vs/editor/browser/widget/diffEditor/outlineModel.js +0 -299
- package/vscode/src/vs/editor/browser/widget/diffEditor/workerBasedDocumentDiffProvider.js +0 -101
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/suggestAddon.js +0 -390
- package/vscode/src/vs/workbench/services/editor/common/editorGroupColumn.d.ts +0 -10
- package/vscode/src/vs/workbench/services/suggest/browser/media/suggest.css.js +0 -4
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionItem.d.ts +0 -28
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionItem.js +0 -10
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionModel.d.ts +0 -30
- package/vscode/src/vs/workbench/services/suggest/browser/simpleCompletionModel.js +0 -98
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.d.ts +0 -10
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidget.js +0 -428
- package/vscode/src/vs/workbench/services/suggest/browser/simpleSuggestWidgetRenderer.js +0 -83
- package/vscode-dts/vscode.proposed.chatVariables.d.ts +0 -39
- package/vscode-dts/vscode.proposed.interactiveUserActions.d.ts +0 -77
- package/vscode-dts/vscode.proposed.saveEditor.d.ts +0 -35
- package/vscode-dts/vscode.proposed.scmInputBoxValueProvider.d.ts +0 -25
- package/vscode-dts/vscode.proposed.testingActiveProfile.d.ts +0 -21
|
@@ -1024,11 +1024,11 @@ let NotebookCellList = class NotebookCellList extends WorkbenchList {
|
|
|
1024
1024
|
if (styles.listHoverOutline) {
|
|
1025
1025
|
content.push(`.monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover { outline: 1px dashed ${styles.listHoverOutline}; outline-offset: -1px; }`);
|
|
1026
1026
|
}
|
|
1027
|
-
if (styles.
|
|
1027
|
+
if (styles.listDropOverBackground) {
|
|
1028
1028
|
content.push(`
|
|
1029
1029
|
.monaco-list${suffix}.drop-target,
|
|
1030
1030
|
.monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-rows.drop-target,
|
|
1031
|
-
.monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-row.drop-target { background-color: ${styles.
|
|
1031
|
+
.monaco-list${suffix} > div.monaco-scrollable-element > .monaco-list-row.drop-target { background-color: ${styles.listDropOverBackground} !important; color: inherit !important; }
|
|
1032
1032
|
`);
|
|
1033
1033
|
}
|
|
1034
1034
|
const newStyles = content.join('\n');
|
|
@@ -150,7 +150,8 @@ let BackLayerWebView = class BackLayerWebView extends Themable {
|
|
|
150
150
|
renderOptions: {
|
|
151
151
|
lineLimit: this.options.outputLineLimit,
|
|
152
152
|
outputScrolling: this.options.outputScrolling,
|
|
153
|
-
outputWordWrap: this.options.outputWordWrap
|
|
153
|
+
outputWordWrap: this.options.outputWordWrap,
|
|
154
|
+
linkifyFilePaths: this.options.outputLinkifyFilePaths,
|
|
154
155
|
}
|
|
155
156
|
});
|
|
156
157
|
}
|
|
@@ -190,7 +191,8 @@ let BackLayerWebView = class BackLayerWebView extends Themable {
|
|
|
190
191
|
const renderOptions = {
|
|
191
192
|
lineLimit: this.options.outputLineLimit,
|
|
192
193
|
outputScrolling: this.options.outputScrolling,
|
|
193
|
-
outputWordWrap: this.options.outputWordWrap
|
|
194
|
+
outputWordWrap: this.options.outputWordWrap,
|
|
195
|
+
linkifyFilePaths: this.options.outputLinkifyFilePaths
|
|
194
196
|
};
|
|
195
197
|
const preloadScript = preloadsScriptStr({
|
|
196
198
|
...this.options,
|
|
@@ -400,10 +402,10 @@ let BackLayerWebView = class BackLayerWebView extends Themable {
|
|
|
400
402
|
isResolved() {
|
|
401
403
|
return !!this.webview;
|
|
402
404
|
}
|
|
403
|
-
createWebview() {
|
|
405
|
+
createWebview(codeWindow) {
|
|
404
406
|
const baseUrl = this.asWebviewUri(this.getNotebookBaseUri(), undefined);
|
|
405
407
|
const htmlContent = this.generateContent(( baseUrl.toString()));
|
|
406
|
-
return this._initialize(htmlContent);
|
|
408
|
+
return this._initialize(htmlContent, codeWindow);
|
|
407
409
|
}
|
|
408
410
|
getNotebookBaseUri() {
|
|
409
411
|
if (this.documentUri.scheme === Schemas.untitled) {
|
|
@@ -429,11 +431,11 @@ let BackLayerWebView = class BackLayerWebView extends Themable {
|
|
|
429
431
|
dirname(( FileAccess.asFileUri('vs/loader.js'))),
|
|
430
432
|
];
|
|
431
433
|
}
|
|
432
|
-
_initialize(content) {
|
|
434
|
+
_initialize(content, codeWindow) {
|
|
433
435
|
if (!getWindow(this.element).document.body.contains(this.element)) {
|
|
434
436
|
throw new Error('Element is already detached from the DOM tree');
|
|
435
437
|
}
|
|
436
|
-
this.webview = this._createInset(this.webviewService, content);
|
|
438
|
+
this.webview = this._createInset(this.webviewService, content, codeWindow);
|
|
437
439
|
this.webview.mountTo(this.element);
|
|
438
440
|
this._register(this.webview);
|
|
439
441
|
this._register(( new WebviewWindowDragMonitor(() => this.webview)));
|
|
@@ -530,7 +532,7 @@ let BackLayerWebView = class BackLayerWebView extends Themable {
|
|
|
530
532
|
const latestCell = this.notebookEditor.getCellByInfo(resolvedResult.cellInfo);
|
|
531
533
|
if (latestCell) {
|
|
532
534
|
latestCell.outputIsFocused = true;
|
|
533
|
-
this.notebookEditor.focusNotebookCell(latestCell, 'output', { skipReveal: true });
|
|
535
|
+
this.notebookEditor.focusNotebookCell(latestCell, 'output', { skipReveal: true, outputWebviewFocused: true });
|
|
534
536
|
}
|
|
535
537
|
}
|
|
536
538
|
break;
|
|
@@ -935,7 +937,7 @@ let BackLayerWebView = class BackLayerWebView extends Themable {
|
|
|
935
937
|
await this.fileService.writeFile(newFileUri, buff);
|
|
936
938
|
await this.openerService.open(newFileUri);
|
|
937
939
|
}
|
|
938
|
-
_createInset(webviewService, content) {
|
|
940
|
+
_createInset(webviewService, content, codeWindow) {
|
|
939
941
|
this.localResourceRootsCache = this._getResourceRootsCache();
|
|
940
942
|
const webview = webviewService.createWebviewElement({
|
|
941
943
|
origin: BackLayerWebView_1.getOriginStore(this.storageService).getOrigin(this.notebookViewType, undefined),
|
|
@@ -955,7 +957,8 @@ let BackLayerWebView = class BackLayerWebView extends Themable {
|
|
|
955
957
|
localResourceRoots: this.localResourceRootsCache,
|
|
956
958
|
},
|
|
957
959
|
extension: undefined,
|
|
958
|
-
providedViewType: 'notebook.output'
|
|
960
|
+
providedViewType: 'notebook.output',
|
|
961
|
+
codeWindow: codeWindow
|
|
959
962
|
});
|
|
960
963
|
webview.setHtml(content);
|
|
961
964
|
webview.setContextKeyService(this.contextKeyService);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
async function webviewPreloads(ctx) {
|
|
2
2
|
const $window = window;
|
|
3
|
+
const userAgent = navigator.userAgent;
|
|
4
|
+
const isChrome = (userAgent.indexOf('Chrome') >= 0);
|
|
3
5
|
const textEncoder = ( new TextEncoder());
|
|
4
6
|
const textDecoder = ( new TextDecoder());
|
|
5
7
|
let currentOptions = ctx.options;
|
|
@@ -305,9 +307,9 @@ async function webviewPreloads(ctx) {
|
|
|
305
307
|
deltaX: event.deltaX,
|
|
306
308
|
deltaY: event.deltaY,
|
|
307
309
|
deltaZ: event.deltaZ,
|
|
308
|
-
wheelDelta: event.wheelDelta,
|
|
309
|
-
wheelDeltaX: event.wheelDeltaX,
|
|
310
|
-
wheelDeltaY: event.wheelDeltaY,
|
|
310
|
+
wheelDelta: event.wheelDelta && isChrome ? (event.wheelDelta / $window.devicePixelRatio) : event.wheelDelta,
|
|
311
|
+
wheelDeltaX: event.wheelDeltaX && isChrome ? (event.wheelDeltaX / $window.devicePixelRatio) : event.wheelDeltaX,
|
|
312
|
+
wheelDeltaY: event.wheelDeltaY && isChrome ? (event.wheelDeltaY / $window.devicePixelRatio) : event.wheelDeltaY,
|
|
311
313
|
detail: event.detail,
|
|
312
314
|
shiftKey: event.shiftKey,
|
|
313
315
|
type: event.type
|
|
@@ -1243,6 +1245,7 @@ async function webviewPreloads(ctx) {
|
|
|
1243
1245
|
get lineLimit() { return currentRenderOptions.lineLimit; },
|
|
1244
1246
|
get outputScrolling() { return currentRenderOptions.outputScrolling; },
|
|
1245
1247
|
get outputWordWrap() { return currentRenderOptions.outputWordWrap; },
|
|
1248
|
+
get linkifyFilePaths() { return currentRenderOptions.linkifyFilePaths; },
|
|
1246
1249
|
},
|
|
1247
1250
|
get onDidChangeSettings() { return settingChange.event; }
|
|
1248
1251
|
};
|
|
@@ -543,6 +543,7 @@ let NotebookViewModel = class NotebookViewModel extends Disposable {
|
|
|
543
543
|
if (handle !== undefined) {
|
|
544
544
|
const cell = this.getCellByHandle(handle);
|
|
545
545
|
cell?.deltaCellDecorations([id], []);
|
|
546
|
+
this._decorationIdToCellMap.delete(id);
|
|
546
547
|
}
|
|
547
548
|
});
|
|
548
549
|
const result = [];
|
package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { localizeWithPath } from '../../../../../nls.js';
|
|
3
|
-
import { addDisposableListener, EventType, getWindow, clearNode
|
|
3
|
+
import { addDisposableListener, EventType, getWindow, clearNode } from '../../../../../base/browser/dom.js';
|
|
4
4
|
import { StandardMouseEvent } from '../../../../../base/browser/mouseEvent.js';
|
|
5
|
+
import { Emitter } from '../../../../../base/common/event.js';
|
|
5
6
|
import { Disposable, DisposableStore } from '../../../../../base/common/lifecycle.js';
|
|
6
7
|
import { Categories } from '../../../../../platform/action/common/actionCommonCategories.js';
|
|
7
8
|
import { registerAction2, Action2, MenuId } from '../../../../../platform/actions/common/actions.js';
|
|
@@ -9,6 +10,10 @@ import { IConfigurationService } from '../../../../../platform/configuration/com
|
|
|
9
10
|
import { ContextKeyExpr } from '../../../../../platform/contextkey/common/contextkey.js';
|
|
10
11
|
import { IContextMenuService } from '../../../../../platform/contextview/browser/contextView.js';
|
|
11
12
|
import { CellKind } from '../../common/notebookCommon.js';
|
|
13
|
+
import { Delayer } from '../../../../../base/common/async.js';
|
|
14
|
+
import { ThemeIcon } from '../../../../../base/common/themables.js';
|
|
15
|
+
import { foldingCollapsedIcon, foldingExpandedIcon } from '../../../../../editor/contrib/folding/browser/foldingDecorations.js';
|
|
16
|
+
import { FoldingController } from '../controller/foldingController.js';
|
|
12
17
|
var NotebookStickyScroll_1;
|
|
13
18
|
class ToggleNotebookStickyScroll extends Action2 {
|
|
14
19
|
constructor() {
|
|
@@ -54,24 +59,39 @@ class ToggleNotebookStickyScroll extends Action2 {
|
|
|
54
59
|
}
|
|
55
60
|
}
|
|
56
61
|
class NotebookStickyLine extends Disposable {
|
|
57
|
-
constructor(element, entry, notebookEditor) {
|
|
62
|
+
constructor(element, foldingIcon, header, entry, notebookEditor) {
|
|
58
63
|
super();
|
|
59
64
|
this.element = element;
|
|
65
|
+
this.foldingIcon = foldingIcon;
|
|
66
|
+
this.header = header;
|
|
60
67
|
this.entry = entry;
|
|
61
68
|
this.notebookEditor = notebookEditor;
|
|
62
|
-
this._register(addDisposableListener(this.
|
|
69
|
+
this._register(addDisposableListener(this.header, EventType.CLICK , () => {
|
|
63
70
|
this.focusCell();
|
|
64
71
|
}));
|
|
72
|
+
this._register(addDisposableListener(this.foldingIcon.domNode, EventType.CLICK , () => {
|
|
73
|
+
if (this.entry.cell.cellKind === CellKind.Markup) {
|
|
74
|
+
const currentFoldingState = this.entry.cell.foldingState;
|
|
75
|
+
this.toggleFoldRange(currentFoldingState);
|
|
76
|
+
}
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
toggleFoldRange(currentState) {
|
|
80
|
+
const foldingController = this.notebookEditor.getContribution(FoldingController.id);
|
|
81
|
+
const index = this.entry.index;
|
|
82
|
+
const headerLevel = this.entry.level;
|
|
83
|
+
const newFoldingState = ((currentState === 2) ) ? 1 : 2 ;
|
|
84
|
+
foldingController.setFoldingStateUp(index, newFoldingState, headerLevel);
|
|
85
|
+
this.focusCell();
|
|
65
86
|
}
|
|
66
87
|
focusCell() {
|
|
67
88
|
this.notebookEditor.focusNotebookCell(this.entry.cell, 'container');
|
|
68
89
|
const cellScrollTop = this.notebookEditor.getAbsoluteTopOfElement(this.entry.cell);
|
|
69
|
-
const parentCount =
|
|
90
|
+
const parentCount = NotebookStickyLine.getParentCount(this.entry);
|
|
70
91
|
this.notebookEditor.setScrollTop(cellScrollTop - (parentCount + 1.1) * 22);
|
|
71
92
|
}
|
|
72
|
-
getParentCount() {
|
|
93
|
+
static getParentCount(entry) {
|
|
73
94
|
let count = 0;
|
|
74
|
-
let entry = this.entry;
|
|
75
95
|
while (entry.parent) {
|
|
76
96
|
count++;
|
|
77
97
|
entry = entry.parent;
|
|
@@ -79,16 +99,48 @@ class NotebookStickyLine extends Disposable {
|
|
|
79
99
|
return count;
|
|
80
100
|
}
|
|
81
101
|
}
|
|
102
|
+
class StickyFoldingIcon {
|
|
103
|
+
constructor(isCollapsed, dimension) {
|
|
104
|
+
this.isCollapsed = isCollapsed;
|
|
105
|
+
this.dimension = dimension;
|
|
106
|
+
this.domNode = document.createElement('div');
|
|
107
|
+
this.domNode.style.width = `${dimension}px`;
|
|
108
|
+
this.domNode.style.height = `${dimension}px`;
|
|
109
|
+
this.domNode.className = ThemeIcon.asClassName(isCollapsed ? foldingCollapsedIcon : foldingExpandedIcon);
|
|
110
|
+
}
|
|
111
|
+
setVisible(visible) {
|
|
112
|
+
this.domNode.style.cursor = visible ? 'pointer' : 'default';
|
|
113
|
+
this.domNode.style.opacity = visible ? '1' : '0';
|
|
114
|
+
}
|
|
115
|
+
}
|
|
82
116
|
let NotebookStickyScroll = NotebookStickyScroll_1 = class NotebookStickyScroll extends Disposable {
|
|
83
117
|
getDomNode() {
|
|
84
118
|
return this.domNode;
|
|
85
119
|
}
|
|
86
120
|
getCurrentStickyHeight() {
|
|
87
|
-
|
|
121
|
+
let height = 0;
|
|
122
|
+
this.currentStickyLines.forEach((value) => {
|
|
123
|
+
if (value.rendered) {
|
|
124
|
+
height += 22;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
return height;
|
|
88
128
|
}
|
|
89
129
|
setCurrentStickyLines(newStickyLines) {
|
|
90
130
|
this.currentStickyLines = newStickyLines;
|
|
91
131
|
}
|
|
132
|
+
compareStickyLineMaps(mapA, mapB) {
|
|
133
|
+
if (mapA.size !== mapB.size) {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
for (const [key, value] of mapA) {
|
|
137
|
+
const otherValue = mapB.get(key);
|
|
138
|
+
if (!otherValue || value.rendered !== otherValue.rendered) {
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
92
144
|
constructor(domNode, notebookEditor, notebookOutline, notebookCellList, _contextMenuService) {
|
|
93
145
|
super();
|
|
94
146
|
this.domNode = domNode;
|
|
@@ -98,15 +150,15 @@ let NotebookStickyScroll = NotebookStickyScroll_1 = class NotebookStickyScroll e
|
|
|
98
150
|
this._contextMenuService = _contextMenuService;
|
|
99
151
|
this._disposables = ( new DisposableStore());
|
|
100
152
|
this.currentStickyLines = ( new Map());
|
|
101
|
-
|
|
153
|
+
this.filteredOutlineEntries = [];
|
|
154
|
+
this._onDidChangeNotebookStickyScroll = this._register(( new Emitter()));
|
|
155
|
+
this.onDidChangeNotebookStickyScroll = this._onDidChangeNotebookStickyScroll.event;
|
|
156
|
+
if (this.notebookEditor.notebookOptions.getDisplayOptions().stickyScrollEnabled) {
|
|
102
157
|
this.init();
|
|
103
158
|
}
|
|
104
159
|
this._register(this.notebookEditor.notebookOptions.onDidChangeOptions((e) => {
|
|
105
|
-
if (e.
|
|
106
|
-
this.updateConfig();
|
|
107
|
-
}
|
|
108
|
-
if (e.globalToolbar) {
|
|
109
|
-
this.setTop();
|
|
160
|
+
if (e.stickyScrollEnabled || e.stickyScrollMode) {
|
|
161
|
+
this.updateConfig(e);
|
|
110
162
|
}
|
|
111
163
|
}));
|
|
112
164
|
this._register(addDisposableListener(this.domNode, EventType.CONTEXT_MENU, async (event) => {
|
|
@@ -120,41 +172,47 @@ let NotebookStickyScroll = NotebookStickyScroll_1 = class NotebookStickyScroll e
|
|
|
120
172
|
getAnchor: () => event,
|
|
121
173
|
});
|
|
122
174
|
}
|
|
123
|
-
updateConfig() {
|
|
124
|
-
if (
|
|
125
|
-
this.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
if (this.notebookEditor.notebookOptions.getDisplayOptions().globalToolbar) {
|
|
136
|
-
this.domNode.style.top = '26px';
|
|
175
|
+
updateConfig(e) {
|
|
176
|
+
if (e.stickyScrollEnabled) {
|
|
177
|
+
if (this.notebookEditor.notebookOptions.getDisplayOptions().stickyScrollEnabled) {
|
|
178
|
+
this.init();
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
this._disposables.clear();
|
|
182
|
+
this.notebookOutline.dispose();
|
|
183
|
+
this.disposeCurrentStickyLines();
|
|
184
|
+
clearNode(this.domNode);
|
|
185
|
+
this.updateDisplay();
|
|
186
|
+
}
|
|
137
187
|
}
|
|
138
|
-
else {
|
|
139
|
-
this.
|
|
188
|
+
else if (e.stickyScrollMode && this.notebookEditor.notebookOptions.getDisplayOptions().stickyScrollEnabled) {
|
|
189
|
+
this.updateContent(computeContent(this.notebookEditor, this.notebookCellList, this.filteredOutlineEntries, this.getCurrentStickyHeight()));
|
|
140
190
|
}
|
|
141
191
|
}
|
|
142
192
|
init() {
|
|
143
193
|
this.notebookOutline.init();
|
|
144
|
-
this.
|
|
194
|
+
this.filteredOutlineEntries = this.notebookOutline.entries.filter(entry => entry.level !== 7);
|
|
195
|
+
this.updateContent(computeContent(this.notebookEditor, this.notebookCellList, this.filteredOutlineEntries, this.getCurrentStickyHeight()));
|
|
145
196
|
this._disposables.add(this.notebookOutline.onDidChange(() => {
|
|
146
|
-
|
|
147
|
-
this.
|
|
148
|
-
this.
|
|
197
|
+
this.filteredOutlineEntries = this.notebookOutline.entries.filter(entry => entry.level !== 7);
|
|
198
|
+
const recompute = computeContent(this.notebookEditor, this.notebookCellList, this.filteredOutlineEntries, this.getCurrentStickyHeight());
|
|
199
|
+
if (!this.compareStickyLineMaps(recompute, this.currentStickyLines)) {
|
|
200
|
+
this.updateContent(recompute);
|
|
201
|
+
}
|
|
149
202
|
}));
|
|
150
203
|
this._disposables.add(this.notebookEditor.onDidAttachViewModel(() => {
|
|
151
204
|
this.notebookOutline.init();
|
|
152
|
-
this.
|
|
205
|
+
this.updateContent(computeContent(this.notebookEditor, this.notebookCellList, this.filteredOutlineEntries, this.getCurrentStickyHeight()));
|
|
153
206
|
}));
|
|
154
207
|
this._disposables.add(this.notebookEditor.onDidScroll(() => {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
208
|
+
const d = ( new Delayer(100));
|
|
209
|
+
d.trigger(() => {
|
|
210
|
+
d.dispose();
|
|
211
|
+
const recompute = computeContent(this.notebookEditor, this.notebookCellList, this.filteredOutlineEntries, this.getCurrentStickyHeight());
|
|
212
|
+
if (!this.compareStickyLineMaps(recompute, this.currentStickyLines)) {
|
|
213
|
+
this.updateContent(recompute);
|
|
214
|
+
}
|
|
215
|
+
});
|
|
158
216
|
}));
|
|
159
217
|
}
|
|
160
218
|
static getVisibleOutlineEntry(visibleIndex, notebookOutlineEntries) {
|
|
@@ -183,72 +241,30 @@ let NotebookStickyScroll = NotebookStickyScroll_1 = class NotebookStickyScroll e
|
|
|
183
241
|
}
|
|
184
242
|
return undefined;
|
|
185
243
|
}
|
|
186
|
-
initializeContent() {
|
|
187
|
-
const visibleRange = this.notebookEditor.visibleRanges[0];
|
|
188
|
-
if (!visibleRange) {
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
clearNode(this.domNode);
|
|
192
|
-
const editorScrollTop = this.notebookEditor.scrollTop;
|
|
193
|
-
let trackedEntry = undefined;
|
|
194
|
-
let sectionBottom = 0;
|
|
195
|
-
for (let i = visibleRange.start; i < visibleRange.end; i++) {
|
|
196
|
-
if (i === 0) {
|
|
197
|
-
this.updateDisplay();
|
|
198
|
-
this.setCurrentStickyLines(( new Map()));
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
const cell = this.notebookEditor.cellAt(i);
|
|
202
|
-
if (!cell) {
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
const nextCell = this.notebookEditor.cellAt(i + 1);
|
|
206
|
-
if (nextCell && i + 1 < visibleRange.end) {
|
|
207
|
-
if (nextCell.cellKind === CellKind.Markup) {
|
|
208
|
-
sectionBottom = this.notebookCellList.getCellViewScrollBottom(cell);
|
|
209
|
-
const entry = NotebookStickyScroll_1.getVisibleOutlineEntry(i, this.notebookOutline.entries);
|
|
210
|
-
if (!entry) {
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
const newStickyHeight = NotebookStickyScroll_1.computeStickyHeight(entry);
|
|
214
|
-
if (editorScrollTop + newStickyHeight < sectionBottom) {
|
|
215
|
-
trackedEntry = entry;
|
|
216
|
-
break;
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
continue;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
sectionBottom = this.notebookEditor.scrollTop + this.notebookEditor.getLayoutInfo().scrollHeight;
|
|
225
|
-
trackedEntry = NotebookStickyScroll_1.getVisibleOutlineEntry(i, this.notebookOutline.entries);
|
|
226
|
-
break;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
const linesToRender = Math.floor((sectionBottom - editorScrollTop) / 22);
|
|
230
|
-
let newMap = ( new Map());
|
|
231
|
-
newMap = NotebookStickyScroll_1.renderStickyLines(trackedEntry?.parent, this.domNode, linesToRender, newMap, this.notebookEditor);
|
|
232
|
-
this.setCurrentStickyLines(newMap);
|
|
233
|
-
this.updateDisplay();
|
|
234
|
-
}
|
|
235
244
|
updateContent(newMap) {
|
|
245
|
+
clearNode(this.domNode);
|
|
246
|
+
this.disposeCurrentStickyLines();
|
|
247
|
+
this.renderStickyLines(newMap, this.domNode);
|
|
248
|
+
const oldStickyHeight = this.getCurrentStickyHeight();
|
|
236
249
|
this.setCurrentStickyLines(newMap);
|
|
250
|
+
const sizeDelta = this.getCurrentStickyHeight() - oldStickyHeight;
|
|
251
|
+
if (sizeDelta !== 0) {
|
|
252
|
+
this._onDidChangeNotebookStickyScroll.fire(sizeDelta);
|
|
253
|
+
}
|
|
237
254
|
this.updateDisplay();
|
|
238
255
|
}
|
|
239
256
|
updateDisplay() {
|
|
240
|
-
const hasSticky = this.
|
|
257
|
+
const hasSticky = this.getCurrentStickyHeight() > 0;
|
|
241
258
|
if (!hasSticky) {
|
|
242
259
|
this.domNode.style.display = 'none';
|
|
243
260
|
}
|
|
244
261
|
else {
|
|
245
262
|
this.domNode.style.display = 'block';
|
|
246
263
|
}
|
|
247
|
-
this.setTop();
|
|
248
264
|
}
|
|
249
265
|
static computeStickyHeight(entry) {
|
|
250
266
|
let height = 0;
|
|
251
|
-
if (entry.cell.cellKind === CellKind.Markup) {
|
|
267
|
+
if (entry.cell.cellKind === CellKind.Markup && entry.level !== 7) {
|
|
252
268
|
height += 22;
|
|
253
269
|
}
|
|
254
270
|
while (entry.parent) {
|
|
@@ -257,8 +273,9 @@ let NotebookStickyScroll = NotebookStickyScroll_1 = class NotebookStickyScroll e
|
|
|
257
273
|
}
|
|
258
274
|
return height;
|
|
259
275
|
}
|
|
260
|
-
static
|
|
276
|
+
static checkCollapsedStickyLines(entry, numLinesToRender, notebookEditor) {
|
|
261
277
|
let currentEntry = entry;
|
|
278
|
+
const newMap = ( new Map());
|
|
262
279
|
const elementsToRender = [];
|
|
263
280
|
while (currentEntry) {
|
|
264
281
|
if (currentEntry.level === 7) {
|
|
@@ -274,17 +291,38 @@ let NotebookStickyScroll = NotebookStickyScroll_1 = class NotebookStickyScroll e
|
|
|
274
291
|
if (i >= numLinesToRender) {
|
|
275
292
|
break;
|
|
276
293
|
}
|
|
277
|
-
containerElement.append(elementsToRender[i].element);
|
|
278
294
|
newMap.set(elementsToRender[i].entry, { line: elementsToRender[i], rendered: true });
|
|
279
295
|
}
|
|
280
|
-
containerElement.append($('div', { class: 'notebook-shadow' }));
|
|
281
296
|
return newMap;
|
|
282
297
|
}
|
|
298
|
+
renderStickyLines(stickyMap, containerElement) {
|
|
299
|
+
const reversedEntries = Array.from(stickyMap.entries()).reverse();
|
|
300
|
+
for (const [, value] of reversedEntries) {
|
|
301
|
+
if (!value.rendered) {
|
|
302
|
+
continue;
|
|
303
|
+
}
|
|
304
|
+
containerElement.append(value.line.element);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
283
307
|
static createStickyElement(entry, notebookEditor) {
|
|
284
308
|
const stickyElement = document.createElement('div');
|
|
285
|
-
stickyElement.classList.add('notebook-sticky-scroll-
|
|
286
|
-
|
|
287
|
-
|
|
309
|
+
stickyElement.classList.add('notebook-sticky-scroll-element');
|
|
310
|
+
const indentMode = notebookEditor.notebookOptions.getLayoutConfiguration().stickyScrollMode;
|
|
311
|
+
if (indentMode === 'indented') {
|
|
312
|
+
stickyElement.style.paddingLeft = NotebookStickyLine.getParentCount(entry) * 10 + 'px';
|
|
313
|
+
}
|
|
314
|
+
let isCollapsed = false;
|
|
315
|
+
if (entry.cell.cellKind === CellKind.Markup) {
|
|
316
|
+
isCollapsed = entry.cell.foldingState === 2 ;
|
|
317
|
+
}
|
|
318
|
+
const stickyFoldingIcon = ( new StickyFoldingIcon(isCollapsed, 16));
|
|
319
|
+
stickyFoldingIcon.domNode.classList.add('notebook-sticky-scroll-folding-icon');
|
|
320
|
+
stickyFoldingIcon.setVisible(true);
|
|
321
|
+
const stickyHeader = document.createElement('div');
|
|
322
|
+
stickyHeader.classList.add('notebook-sticky-scroll-header');
|
|
323
|
+
stickyHeader.innerText = entry.label;
|
|
324
|
+
stickyElement.append(stickyFoldingIcon.domNode, stickyHeader);
|
|
325
|
+
return ( new NotebookStickyLine(stickyElement, stickyFoldingIcon, stickyHeader, entry, notebookEditor));
|
|
288
326
|
}
|
|
289
327
|
disposeCurrentStickyLines() {
|
|
290
328
|
this.currentStickyLines.forEach((value) => {
|
|
@@ -294,88 +332,83 @@ let NotebookStickyScroll = NotebookStickyScroll_1 = class NotebookStickyScroll e
|
|
|
294
332
|
dispose() {
|
|
295
333
|
this._disposables.dispose();
|
|
296
334
|
this.disposeCurrentStickyLines();
|
|
335
|
+
this.notebookOutline.dispose();
|
|
297
336
|
super.dispose();
|
|
298
337
|
}
|
|
299
338
|
};
|
|
300
339
|
NotebookStickyScroll = NotebookStickyScroll_1 = ( __decorate([
|
|
301
340
|
( __param(4, IContextMenuService))
|
|
302
341
|
], NotebookStickyScroll));
|
|
303
|
-
function computeContent(
|
|
304
|
-
const editorScrollTop = notebookEditor.scrollTop;
|
|
342
|
+
function computeContent(notebookEditor, notebookCellList, notebookOutlineEntries, renderedStickyHeight) {
|
|
343
|
+
const editorScrollTop = notebookEditor.scrollTop - renderedStickyHeight;
|
|
305
344
|
const visibleRange = notebookEditor.visibleRanges[0];
|
|
306
345
|
if (!visibleRange) {
|
|
307
346
|
return ( new Map());
|
|
308
347
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
348
|
+
if (visibleRange.start === 0) {
|
|
349
|
+
const firstCell = notebookEditor.cellAt(0);
|
|
350
|
+
const firstCellEntry = NotebookStickyScroll.getVisibleOutlineEntry(0, notebookOutlineEntries);
|
|
351
|
+
if (firstCell && firstCellEntry && firstCell.cellKind === CellKind.Markup && firstCellEntry.level !== 7) {
|
|
352
|
+
if (notebookEditor.scrollTop > 22) {
|
|
353
|
+
const newMap = NotebookStickyScroll.checkCollapsedStickyLines(firstCellEntry, 100, notebookEditor);
|
|
354
|
+
return newMap;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
let cell;
|
|
359
|
+
let cellEntry;
|
|
360
|
+
const startIndex = visibleRange.start - 1;
|
|
361
|
+
for (let currentIndex = startIndex; currentIndex < visibleRange.end; currentIndex++) {
|
|
362
|
+
cell = notebookEditor.cellAt(currentIndex);
|
|
313
363
|
if (!cell) {
|
|
314
364
|
return ( new Map());
|
|
315
365
|
}
|
|
316
|
-
|
|
317
|
-
if (
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
366
|
+
cellEntry = NotebookStickyScroll.getVisibleOutlineEntry(currentIndex, notebookOutlineEntries);
|
|
367
|
+
if (!cellEntry) {
|
|
368
|
+
return ( new Map());
|
|
369
|
+
}
|
|
370
|
+
const nextCell = notebookEditor.cellAt(currentIndex + 1);
|
|
371
|
+
if (!nextCell) {
|
|
372
|
+
const sectionBottom = notebookEditor.getLayoutInfo().scrollHeight;
|
|
373
|
+
const linesToRender = Math.floor((sectionBottom) / 22);
|
|
374
|
+
const newMap = NotebookStickyScroll.checkCollapsedStickyLines(cellEntry, linesToRender, notebookEditor);
|
|
375
|
+
return newMap;
|
|
376
|
+
}
|
|
377
|
+
const nextCellEntry = NotebookStickyScroll.getVisibleOutlineEntry(currentIndex + 1, notebookOutlineEntries);
|
|
378
|
+
if (!nextCellEntry) {
|
|
379
|
+
return ( new Map());
|
|
380
|
+
}
|
|
381
|
+
if (nextCell.cellKind === CellKind.Markup && nextCellEntry.level !== 7) {
|
|
382
|
+
const sectionBottom = notebookCellList.getCellViewScrollTop(nextCell);
|
|
383
|
+
const currentSectionStickyHeight = NotebookStickyScroll.computeStickyHeight(cellEntry);
|
|
384
|
+
const nextSectionStickyHeight = NotebookStickyScroll.computeStickyHeight(nextCellEntry);
|
|
385
|
+
if (editorScrollTop + currentSectionStickyHeight < sectionBottom) {
|
|
386
|
+
const linesToRender = Math.floor((sectionBottom - editorScrollTop) / 22);
|
|
387
|
+
const newMap = NotebookStickyScroll.checkCollapsedStickyLines(cellEntry, linesToRender, notebookEditor);
|
|
388
|
+
return newMap;
|
|
322
389
|
}
|
|
323
|
-
if (
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}
|
|
390
|
+
else if (nextSectionStickyHeight >= currentSectionStickyHeight) {
|
|
391
|
+
const newMap = NotebookStickyScroll.checkCollapsedStickyLines(nextCellEntry, 100, notebookEditor);
|
|
392
|
+
return newMap;
|
|
327
393
|
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
if (!entry) {
|
|
334
|
-
return ( new Map());
|
|
335
|
-
}
|
|
336
|
-
const currentSectionStickyHeight = NotebookStickyScroll.computeStickyHeight(entry);
|
|
337
|
-
if (editorScrollTop + currentSectionStickyHeight < sectionBottom) {
|
|
338
|
-
const linesToRender = Math.floor((sectionBottom - editorScrollTop) / 22);
|
|
339
|
-
let newMap = ( new Map());
|
|
340
|
-
newMap = NotebookStickyScroll.renderStickyLines(entry, domNode, linesToRender, newMap, notebookEditor);
|
|
341
|
-
return newMap;
|
|
342
|
-
}
|
|
343
|
-
let nextSectionEntry = undefined;
|
|
344
|
-
for (let j = 1; j < visibleRange.end - i; j++) {
|
|
345
|
-
const cellCheck = notebookEditor.cellAt(i + j);
|
|
346
|
-
if (cellCheck) {
|
|
347
|
-
nextSectionEntry = NotebookStickyScroll.getVisibleOutlineEntry(i + j, notebookOutlineEntries);
|
|
348
|
-
if (nextSectionEntry) {
|
|
349
|
-
break;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
const nextSectionStickyHeight = NotebookStickyScroll.computeStickyHeight(nextSectionEntry);
|
|
354
|
-
sectionBottom = notebookCellList.getCellViewScrollTop(nextSectionEntry.cell) - 10;
|
|
355
|
-
if (entry?.parent?.parent === nextSectionEntry?.parent) {
|
|
356
|
-
const linesToRender = Math.floor((sectionBottom - editorScrollTop) / 22) + 100;
|
|
357
|
-
let newMap = ( new Map());
|
|
358
|
-
newMap = NotebookStickyScroll.renderStickyLines(nextSectionEntry?.parent, domNode, linesToRender, newMap, notebookEditor);
|
|
394
|
+
else if (nextSectionStickyHeight < currentSectionStickyHeight) {
|
|
395
|
+
const availableSpace = sectionBottom - editorScrollTop;
|
|
396
|
+
if (availableSpace >= nextSectionStickyHeight) {
|
|
397
|
+
const linesToRender = Math.floor((availableSpace) / 22);
|
|
398
|
+
const newMap = NotebookStickyScroll.checkCollapsedStickyLines(cellEntry, linesToRender, notebookEditor);
|
|
359
399
|
return newMap;
|
|
360
400
|
}
|
|
361
|
-
else
|
|
362
|
-
const
|
|
363
|
-
let newMap = ( new Map());
|
|
364
|
-
newMap = NotebookStickyScroll.renderStickyLines(entry?.parent, domNode, linesToRender, newMap, notebookEditor);
|
|
401
|
+
else {
|
|
402
|
+
const newMap = NotebookStickyScroll.checkCollapsedStickyLines(nextCellEntry, 100, notebookEditor);
|
|
365
403
|
return newMap;
|
|
366
404
|
}
|
|
367
405
|
}
|
|
368
406
|
}
|
|
369
|
-
else {
|
|
370
|
-
sectionBottom = notebookEditor.getLayoutInfo().scrollHeight;
|
|
371
|
-
trackedEntry = NotebookStickyScroll.getVisibleOutlineEntry(i, notebookOutlineEntries);
|
|
372
|
-
const linesToRender = Math.floor((sectionBottom - editorScrollTop) / 22);
|
|
373
|
-
let newMap = ( new Map());
|
|
374
|
-
newMap = NotebookStickyScroll.renderStickyLines(trackedEntry?.parent, domNode, linesToRender, newMap, notebookEditor);
|
|
375
|
-
return newMap;
|
|
376
|
-
}
|
|
377
407
|
}
|
|
378
|
-
|
|
408
|
+
const sectionBottom = notebookEditor.getLayoutInfo().scrollHeight;
|
|
409
|
+
const linesToRender = Math.floor((sectionBottom - editorScrollTop) / 22);
|
|
410
|
+
const newMap = NotebookStickyScroll.checkCollapsedStickyLines(cellEntry, linesToRender, notebookEditor);
|
|
411
|
+
return newMap;
|
|
379
412
|
}
|
|
380
413
|
registerAction2(ToggleNotebookStickyScroll);
|
|
381
414
|
export { NotebookStickyLine, NotebookStickyScroll, ToggleNotebookStickyScroll, computeContent };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { ActionViewItem } from '../../../../../base/browser/ui/actionbar/actionViewItems.js';
|
|
3
3
|
import { Action } from '../../../../../base/common/actions.js';
|
|
4
|
-
import { localizeWithPath } from '../../../../../nls.js';
|
|
4
|
+
import { localize2WithPath, localizeWithPath } from '../../../../../nls.js';
|
|
5
5
|
import { registerAction2, Action2, MenuId } from '../../../../../platform/actions/common/actions.js';
|
|
6
6
|
import { ContextKeyExpr } from '../../../../../platform/contextkey/common/contextkey.js';
|
|
7
7
|
import { ExtensionIdentifier } from '../../../../../platform/extensions/common/extensions.js';
|
|
@@ -37,11 +37,11 @@ registerAction2(class extends Action2 {
|
|
|
37
37
|
super({
|
|
38
38
|
id: SELECT_KERNEL_ID,
|
|
39
39
|
category: NOTEBOOK_ACTIONS_CATEGORY,
|
|
40
|
-
title:
|
|
40
|
+
title: ( localize2WithPath(
|
|
41
41
|
'vs/workbench/contrib/notebook/browser/viewParts/notebookKernelView',
|
|
42
42
|
'notebookActions.selectKernel',
|
|
43
|
-
|
|
44
|
-
)),
|
|
43
|
+
'Select Notebook Kernel'
|
|
44
|
+
)),
|
|
45
45
|
icon: selectKernelIcon,
|
|
46
46
|
f1: true,
|
|
47
47
|
precondition: NOTEBOOK_IS_ACTIVE_EDITOR,
|