@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
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import './hover.css.js';
|
|
3
|
+
import { DisposableStore } from '../../../../base/common/lifecycle.js';
|
|
4
|
+
import { Emitter } from '../../../../base/common/event.js';
|
|
5
|
+
import { getWindow, addDisposableListener, prepend, append, $ as $$1, getDomNodeZoomLevel } from '../../../../base/browser/dom.js';
|
|
6
|
+
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';
|
|
7
|
+
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';
|
|
8
|
+
import { EDITOR_FONT_DEFAULTS } from '../../../common/config/editorOptions.js';
|
|
9
|
+
import { HoverWidget as HoverWidget$1, getHoverAccessibleViewHint } from '../../../../base/browser/ui/hover/hoverWidget.js';
|
|
10
|
+
import { Widget } from '../../../../base/browser/ui/widget.js';
|
|
11
|
+
import { IOpenerService } from '../../../../platform/opener/common/opener.js';
|
|
12
|
+
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
|
|
13
|
+
import { openLinkFromMarkdown, MarkdownRenderer } from '../markdownRenderer/browser/markdownRenderer.js';
|
|
14
|
+
import { isMarkdownString } from '../../../../base/common/htmlContent.js';
|
|
15
|
+
import { localizeWithPath } from '../../../../nls.js';
|
|
16
|
+
import { isMacintosh } from '../../../../base/common/platform.js';
|
|
17
|
+
import { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';
|
|
18
|
+
import { status } from '../../../../base/browser/ui/aria/aria.js';
|
|
19
|
+
const $ = $$1;
|
|
20
|
+
let HoverWidget = class HoverWidget extends Widget {
|
|
21
|
+
get _targetWindow() {
|
|
22
|
+
return getWindow(this._target.targetElements[0]);
|
|
23
|
+
}
|
|
24
|
+
get _targetDocumentElement() {
|
|
25
|
+
return getWindow(this._target.targetElements[0]).document.documentElement;
|
|
26
|
+
}
|
|
27
|
+
get isDisposed() { return this._isDisposed; }
|
|
28
|
+
get isMouseIn() { return this._lockMouseTracker.isMouseIn; }
|
|
29
|
+
get domNode() { return this._hover.containerDomNode; }
|
|
30
|
+
get onDispose() { return this._onDispose.event; }
|
|
31
|
+
get onRequestLayout() { return this._onRequestLayout.event; }
|
|
32
|
+
get anchor() { return this._hoverPosition === 2 ? 0 : 1 ; }
|
|
33
|
+
get x() { return this._x; }
|
|
34
|
+
get y() { return this._y; }
|
|
35
|
+
get isLocked() { return this._isLocked; }
|
|
36
|
+
set isLocked(value) {
|
|
37
|
+
if (this._isLocked === value) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
this._isLocked = value;
|
|
41
|
+
this._hoverContainer.classList.toggle('locked', this._isLocked);
|
|
42
|
+
}
|
|
43
|
+
constructor(options, _keybindingService, _configurationService, _openerService, _instantiationService, _accessibilityService) {
|
|
44
|
+
super();
|
|
45
|
+
this._keybindingService = _keybindingService;
|
|
46
|
+
this._configurationService = _configurationService;
|
|
47
|
+
this._openerService = _openerService;
|
|
48
|
+
this._instantiationService = _instantiationService;
|
|
49
|
+
this._accessibilityService = _accessibilityService;
|
|
50
|
+
this._messageListeners = ( new DisposableStore());
|
|
51
|
+
this._isDisposed = false;
|
|
52
|
+
this._forcePosition = false;
|
|
53
|
+
this._x = 0;
|
|
54
|
+
this._y = 0;
|
|
55
|
+
this._isLocked = false;
|
|
56
|
+
this._enableFocusTraps = false;
|
|
57
|
+
this._addedFocusTrap = false;
|
|
58
|
+
this._onDispose = this._register(( new Emitter()));
|
|
59
|
+
this._onRequestLayout = this._register(( new Emitter()));
|
|
60
|
+
this._linkHandler = options.linkHandler || (url => {
|
|
61
|
+
return openLinkFromMarkdown(this._openerService, url, isMarkdownString(options.content) ? options.content.isTrusted : undefined);
|
|
62
|
+
});
|
|
63
|
+
this._target = 'targetElements' in options.target ? options.target : ( new ElementHoverTarget(options.target));
|
|
64
|
+
this._hoverPointer = options.appearance?.showPointer ? $('div.workbench-hover-pointer') : undefined;
|
|
65
|
+
this._hover = this._register(( new HoverWidget$1()));
|
|
66
|
+
this._hover.containerDomNode.classList.add('workbench-hover', 'fadeIn');
|
|
67
|
+
if (options.appearance?.compact) {
|
|
68
|
+
this._hover.containerDomNode.classList.add('workbench-hover', 'compact');
|
|
69
|
+
}
|
|
70
|
+
if (options.appearance?.skipFadeInAnimation) {
|
|
71
|
+
this._hover.containerDomNode.classList.add('skip-fade-in');
|
|
72
|
+
}
|
|
73
|
+
if (options.additionalClasses) {
|
|
74
|
+
this._hover.containerDomNode.classList.add(...options.additionalClasses);
|
|
75
|
+
}
|
|
76
|
+
if (options.position?.forcePosition) {
|
|
77
|
+
this._forcePosition = true;
|
|
78
|
+
}
|
|
79
|
+
if (options.trapFocus) {
|
|
80
|
+
this._enableFocusTraps = true;
|
|
81
|
+
}
|
|
82
|
+
this._hoverPosition = options.position?.hoverPosition ?? 3 ;
|
|
83
|
+
this.onmousedown(this._hover.containerDomNode, e => e.stopPropagation());
|
|
84
|
+
this.onkeydown(this._hover.containerDomNode, e => {
|
|
85
|
+
if (e.equals(9 )) {
|
|
86
|
+
this.dispose();
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
this._register(addDisposableListener(this._targetWindow, 'blur', () => this.dispose()));
|
|
90
|
+
const rowElement = $('div.hover-row.markdown-hover');
|
|
91
|
+
const contentsElement = $('div.hover-contents');
|
|
92
|
+
if (typeof options.content === 'string') {
|
|
93
|
+
contentsElement.textContent = options.content;
|
|
94
|
+
contentsElement.style.whiteSpace = 'pre-wrap';
|
|
95
|
+
}
|
|
96
|
+
else if (options.content instanceof HTMLElement) {
|
|
97
|
+
contentsElement.appendChild(options.content);
|
|
98
|
+
contentsElement.classList.add('html-hover-contents');
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
const markdown = options.content;
|
|
102
|
+
const mdRenderer = this._instantiationService.createInstance(MarkdownRenderer, { codeBlockFontFamily: this._configurationService.getValue('editor').fontFamily || EDITOR_FONT_DEFAULTS.fontFamily });
|
|
103
|
+
const { element } = mdRenderer.render(markdown, {
|
|
104
|
+
actionHandler: {
|
|
105
|
+
callback: (content) => this._linkHandler(content),
|
|
106
|
+
disposables: this._messageListeners
|
|
107
|
+
},
|
|
108
|
+
asyncRenderCallback: () => {
|
|
109
|
+
contentsElement.classList.add('code-hover-contents');
|
|
110
|
+
this.layout();
|
|
111
|
+
this._onRequestLayout.fire();
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
contentsElement.appendChild(element);
|
|
115
|
+
}
|
|
116
|
+
rowElement.appendChild(contentsElement);
|
|
117
|
+
this._hover.contentsDomNode.appendChild(rowElement);
|
|
118
|
+
if (options.actions && options.actions.length > 0) {
|
|
119
|
+
const statusBarElement = $('div.hover-row.status-bar');
|
|
120
|
+
const actionsElement = $('div.actions');
|
|
121
|
+
options.actions.forEach(action => {
|
|
122
|
+
const keybinding = this._keybindingService.lookupKeybinding(action.commandId);
|
|
123
|
+
keybinding ? keybinding.getLabel() : null;
|
|
124
|
+
});
|
|
125
|
+
statusBarElement.appendChild(actionsElement);
|
|
126
|
+
this._hover.containerDomNode.appendChild(statusBarElement);
|
|
127
|
+
}
|
|
128
|
+
this._hoverContainer = $('div.workbench-hover-container');
|
|
129
|
+
if (this._hoverPointer) {
|
|
130
|
+
this._hoverContainer.appendChild(this._hoverPointer);
|
|
131
|
+
}
|
|
132
|
+
this._hoverContainer.appendChild(this._hover.containerDomNode);
|
|
133
|
+
let hideOnHover;
|
|
134
|
+
if (options.actions && options.actions.length > 0) {
|
|
135
|
+
hideOnHover = false;
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
if (options.persistence?.hideOnHover === undefined) {
|
|
139
|
+
hideOnHover = typeof options.content === 'string' ||
|
|
140
|
+
isMarkdownString(options.content) && !options.content.value.includes('](') && !options.content.value.includes('</a>');
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
hideOnHover = options.persistence.hideOnHover;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
if (hideOnHover && options.appearance?.showHoverHint) {
|
|
147
|
+
const statusBarElement = $('div.hover-row.status-bar');
|
|
148
|
+
const infoElement = $('div.info');
|
|
149
|
+
infoElement.textContent = ( localizeWithPath(
|
|
150
|
+
'vs/editor/browser/widget/hoverWidget/hoverWidget',
|
|
151
|
+
'hoverhint',
|
|
152
|
+
'Hold {0} key to mouse over',
|
|
153
|
+
isMacintosh ? 'Option' : 'Alt'
|
|
154
|
+
));
|
|
155
|
+
statusBarElement.appendChild(infoElement);
|
|
156
|
+
this._hover.containerDomNode.appendChild(statusBarElement);
|
|
157
|
+
}
|
|
158
|
+
const mouseTrackerTargets = [...this._target.targetElements];
|
|
159
|
+
if (!hideOnHover) {
|
|
160
|
+
mouseTrackerTargets.push(this._hoverContainer);
|
|
161
|
+
}
|
|
162
|
+
const mouseTracker = this._register(( new CompositeMouseTracker(mouseTrackerTargets)));
|
|
163
|
+
this._register(mouseTracker.onMouseOut(() => {
|
|
164
|
+
if (!this._isLocked) {
|
|
165
|
+
this.dispose();
|
|
166
|
+
}
|
|
167
|
+
}));
|
|
168
|
+
if (hideOnHover) {
|
|
169
|
+
const mouseTracker2Targets = [...this._target.targetElements, this._hoverContainer];
|
|
170
|
+
this._lockMouseTracker = this._register(( new CompositeMouseTracker(mouseTracker2Targets)));
|
|
171
|
+
this._register(this._lockMouseTracker.onMouseOut(() => {
|
|
172
|
+
if (!this._isLocked) {
|
|
173
|
+
this.dispose();
|
|
174
|
+
}
|
|
175
|
+
}));
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
this._lockMouseTracker = mouseTracker;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
addFocusTrap() {
|
|
182
|
+
if (!this._enableFocusTraps || this._addedFocusTrap) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
this._addedFocusTrap = true;
|
|
186
|
+
const firstContainerFocusElement = this._hover.containerDomNode;
|
|
187
|
+
const lastContainerFocusElement = this.findLastFocusableChild(this._hover.containerDomNode);
|
|
188
|
+
if (lastContainerFocusElement) {
|
|
189
|
+
const beforeContainerFocusElement = prepend(this._hoverContainer, $('div'));
|
|
190
|
+
const afterContainerFocusElement = append(this._hoverContainer, $('div'));
|
|
191
|
+
beforeContainerFocusElement.tabIndex = 0;
|
|
192
|
+
afterContainerFocusElement.tabIndex = 0;
|
|
193
|
+
this._register(addDisposableListener(afterContainerFocusElement, 'focus', (e) => {
|
|
194
|
+
firstContainerFocusElement.focus();
|
|
195
|
+
e.preventDefault();
|
|
196
|
+
}));
|
|
197
|
+
this._register(addDisposableListener(beforeContainerFocusElement, 'focus', (e) => {
|
|
198
|
+
lastContainerFocusElement.focus();
|
|
199
|
+
e.preventDefault();
|
|
200
|
+
}));
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
findLastFocusableChild(root) {
|
|
204
|
+
if (root.hasChildNodes()) {
|
|
205
|
+
for (let i = 0; i < root.childNodes.length; i++) {
|
|
206
|
+
const node = root.childNodes.item(root.childNodes.length - i - 1);
|
|
207
|
+
if (node.nodeType === node.ELEMENT_NODE) {
|
|
208
|
+
const parsedNode = node;
|
|
209
|
+
if (typeof parsedNode.tabIndex === 'number' && parsedNode.tabIndex >= 0) {
|
|
210
|
+
return parsedNode;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
const recursivelyFoundElement = this.findLastFocusableChild(node);
|
|
214
|
+
if (recursivelyFoundElement) {
|
|
215
|
+
return recursivelyFoundElement;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return undefined;
|
|
220
|
+
}
|
|
221
|
+
render(container) {
|
|
222
|
+
container.appendChild(this._hoverContainer);
|
|
223
|
+
const hoverFocused = this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement);
|
|
224
|
+
const accessibleViewHint = hoverFocused && getHoverAccessibleViewHint(this._configurationService.getValue('accessibility.verbosity.hover') === true && this._accessibilityService.isScreenReaderOptimized(), this._keybindingService.lookupKeybinding('editor.action.accessibleView')?.getAriaLabel());
|
|
225
|
+
if (accessibleViewHint) {
|
|
226
|
+
status(accessibleViewHint);
|
|
227
|
+
}
|
|
228
|
+
this.layout();
|
|
229
|
+
this.addFocusTrap();
|
|
230
|
+
}
|
|
231
|
+
layout() {
|
|
232
|
+
this._hover.containerDomNode.classList.remove('right-aligned');
|
|
233
|
+
this._hover.contentsDomNode.style.maxHeight = '';
|
|
234
|
+
const getZoomAccountedBoundingClientRect = (e) => {
|
|
235
|
+
const zoom = getDomNodeZoomLevel(e);
|
|
236
|
+
const boundingRect = e.getBoundingClientRect();
|
|
237
|
+
return {
|
|
238
|
+
top: boundingRect.top * zoom,
|
|
239
|
+
bottom: boundingRect.bottom * zoom,
|
|
240
|
+
right: boundingRect.right * zoom,
|
|
241
|
+
left: boundingRect.left * zoom,
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
const targetBounds = ( this._target.targetElements.map(e => getZoomAccountedBoundingClientRect(e)));
|
|
245
|
+
const top = Math.min(...( targetBounds.map(e => e.top)));
|
|
246
|
+
const right = Math.max(...( targetBounds.map(e => e.right)));
|
|
247
|
+
const bottom = Math.max(...( targetBounds.map(e => e.bottom)));
|
|
248
|
+
const left = Math.min(...( targetBounds.map(e => e.left)));
|
|
249
|
+
const width = right - left;
|
|
250
|
+
const height = bottom - top;
|
|
251
|
+
const targetRect = {
|
|
252
|
+
top, right, bottom, left, width, height,
|
|
253
|
+
center: {
|
|
254
|
+
x: left + (width / 2),
|
|
255
|
+
y: top + (height / 2)
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
this.adjustHorizontalHoverPosition(targetRect);
|
|
259
|
+
this.adjustVerticalHoverPosition(targetRect);
|
|
260
|
+
this.adjustHoverMaxHeight(targetRect);
|
|
261
|
+
this._hoverContainer.style.padding = '';
|
|
262
|
+
this._hoverContainer.style.margin = '';
|
|
263
|
+
if (this._hoverPointer) {
|
|
264
|
+
switch (this._hoverPosition) {
|
|
265
|
+
case 1 :
|
|
266
|
+
targetRect.left += 3 ;
|
|
267
|
+
targetRect.right += 3 ;
|
|
268
|
+
this._hoverContainer.style.paddingLeft = `${3 }px`;
|
|
269
|
+
this._hoverContainer.style.marginLeft = `${-3 }px`;
|
|
270
|
+
break;
|
|
271
|
+
case 0 :
|
|
272
|
+
targetRect.left -= 3 ;
|
|
273
|
+
targetRect.right -= 3 ;
|
|
274
|
+
this._hoverContainer.style.paddingRight = `${3 }px`;
|
|
275
|
+
this._hoverContainer.style.marginRight = `${-3 }px`;
|
|
276
|
+
break;
|
|
277
|
+
case 2 :
|
|
278
|
+
targetRect.top += 3 ;
|
|
279
|
+
targetRect.bottom += 3 ;
|
|
280
|
+
this._hoverContainer.style.paddingTop = `${3 }px`;
|
|
281
|
+
this._hoverContainer.style.marginTop = `${-3 }px`;
|
|
282
|
+
break;
|
|
283
|
+
case 3 :
|
|
284
|
+
targetRect.top -= 3 ;
|
|
285
|
+
targetRect.bottom -= 3 ;
|
|
286
|
+
this._hoverContainer.style.paddingBottom = `${3 }px`;
|
|
287
|
+
this._hoverContainer.style.marginBottom = `${-3 }px`;
|
|
288
|
+
break;
|
|
289
|
+
}
|
|
290
|
+
targetRect.center.x = targetRect.left + (width / 2);
|
|
291
|
+
targetRect.center.y = targetRect.top + (height / 2);
|
|
292
|
+
}
|
|
293
|
+
this.computeXCordinate(targetRect);
|
|
294
|
+
this.computeYCordinate(targetRect);
|
|
295
|
+
if (this._hoverPointer) {
|
|
296
|
+
this._hoverPointer.classList.remove('top');
|
|
297
|
+
this._hoverPointer.classList.remove('left');
|
|
298
|
+
this._hoverPointer.classList.remove('right');
|
|
299
|
+
this._hoverPointer.classList.remove('bottom');
|
|
300
|
+
this.setHoverPointerPosition(targetRect);
|
|
301
|
+
}
|
|
302
|
+
this._hover.onContentsChanged();
|
|
303
|
+
}
|
|
304
|
+
computeXCordinate(target) {
|
|
305
|
+
const hoverWidth = this._hover.containerDomNode.clientWidth + 2 ;
|
|
306
|
+
if (this._target.x !== undefined) {
|
|
307
|
+
this._x = this._target.x;
|
|
308
|
+
}
|
|
309
|
+
else if (this._hoverPosition === 1 ) {
|
|
310
|
+
this._x = target.right;
|
|
311
|
+
}
|
|
312
|
+
else if (this._hoverPosition === 0 ) {
|
|
313
|
+
this._x = target.left - hoverWidth;
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
if (this._hoverPointer) {
|
|
317
|
+
this._x = target.center.x - (this._hover.containerDomNode.clientWidth / 2);
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
this._x = target.left;
|
|
321
|
+
}
|
|
322
|
+
if (this._x + hoverWidth >= this._targetDocumentElement.clientWidth) {
|
|
323
|
+
this._hover.containerDomNode.classList.add('right-aligned');
|
|
324
|
+
this._x = Math.max(this._targetDocumentElement.clientWidth - hoverWidth - 2 , this._targetDocumentElement.clientLeft);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
if (this._x < this._targetDocumentElement.clientLeft) {
|
|
328
|
+
this._x = target.left + 2 ;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
computeYCordinate(target) {
|
|
332
|
+
if (this._target.y !== undefined) {
|
|
333
|
+
this._y = this._target.y;
|
|
334
|
+
}
|
|
335
|
+
else if (this._hoverPosition === 3 ) {
|
|
336
|
+
this._y = target.top;
|
|
337
|
+
}
|
|
338
|
+
else if (this._hoverPosition === 2 ) {
|
|
339
|
+
this._y = target.bottom - 2;
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
if (this._hoverPointer) {
|
|
343
|
+
this._y = target.center.y + (this._hover.containerDomNode.clientHeight / 2);
|
|
344
|
+
}
|
|
345
|
+
else {
|
|
346
|
+
this._y = target.bottom;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
if (this._y > this._targetWindow.innerHeight) {
|
|
350
|
+
this._y = target.bottom;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
adjustHorizontalHoverPosition(target) {
|
|
354
|
+
if (this._target.x !== undefined) {
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
if (this._forcePosition) {
|
|
358
|
+
const padding = (this._hoverPointer ? 3 : 0) + 2 ;
|
|
359
|
+
if (this._hoverPosition === 1 ) {
|
|
360
|
+
this._hover.containerDomNode.style.maxWidth = `${this._targetDocumentElement.clientWidth - target.right - padding}px`;
|
|
361
|
+
}
|
|
362
|
+
else if (this._hoverPosition === 0 ) {
|
|
363
|
+
this._hover.containerDomNode.style.maxWidth = `${target.left - padding}px`;
|
|
364
|
+
}
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
if (this._hoverPosition === 1 ) {
|
|
368
|
+
const roomOnRight = this._targetDocumentElement.clientWidth - target.right;
|
|
369
|
+
if (roomOnRight < this._hover.containerDomNode.clientWidth) {
|
|
370
|
+
const roomOnLeft = target.left;
|
|
371
|
+
if (roomOnLeft >= this._hover.containerDomNode.clientWidth) {
|
|
372
|
+
this._hoverPosition = 0 ;
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
this._hoverPosition = 2 ;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
else if (this._hoverPosition === 0 ) {
|
|
380
|
+
const roomOnLeft = target.left;
|
|
381
|
+
if (roomOnLeft < this._hover.containerDomNode.clientWidth) {
|
|
382
|
+
const roomOnRight = this._targetDocumentElement.clientWidth - target.right;
|
|
383
|
+
if (roomOnRight >= this._hover.containerDomNode.clientWidth) {
|
|
384
|
+
this._hoverPosition = 1 ;
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
this._hoverPosition = 2 ;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
if (target.left - this._hover.containerDomNode.clientWidth <= this._targetDocumentElement.clientLeft) {
|
|
391
|
+
this._hoverPosition = 1 ;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
adjustVerticalHoverPosition(target) {
|
|
396
|
+
if (this._target.y !== undefined || this._forcePosition) {
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
if (this._hoverPosition === 3 ) {
|
|
400
|
+
if (target.top - this._hover.containerDomNode.clientHeight < 0) {
|
|
401
|
+
this._hoverPosition = 2 ;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
else if (this._hoverPosition === 2 ) {
|
|
405
|
+
if (target.bottom + this._hover.containerDomNode.clientHeight > this._targetWindow.innerHeight) {
|
|
406
|
+
this._hoverPosition = 3 ;
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
adjustHoverMaxHeight(target) {
|
|
411
|
+
let maxHeight = this._targetWindow.innerHeight / 2;
|
|
412
|
+
if (this._forcePosition) {
|
|
413
|
+
const padding = (this._hoverPointer ? 3 : 0) + 2 ;
|
|
414
|
+
if (this._hoverPosition === 3 ) {
|
|
415
|
+
maxHeight = Math.min(maxHeight, target.top - padding);
|
|
416
|
+
}
|
|
417
|
+
else if (this._hoverPosition === 2 ) {
|
|
418
|
+
maxHeight = Math.min(maxHeight, this._targetWindow.innerHeight - target.bottom - padding);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
this._hover.containerDomNode.style.maxHeight = `${maxHeight}px`;
|
|
422
|
+
if (this._hover.contentsDomNode.clientHeight < this._hover.contentsDomNode.scrollHeight) {
|
|
423
|
+
const extraRightPadding = `${this._hover.scrollbar.options.verticalScrollbarSize}px`;
|
|
424
|
+
if (this._hover.contentsDomNode.style.paddingRight !== extraRightPadding) {
|
|
425
|
+
this._hover.contentsDomNode.style.paddingRight = extraRightPadding;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
setHoverPointerPosition(target) {
|
|
430
|
+
if (!this._hoverPointer) {
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
switch (this._hoverPosition) {
|
|
434
|
+
case 0 :
|
|
435
|
+
case 1 : {
|
|
436
|
+
this._hoverPointer.classList.add(this._hoverPosition === 0 ? 'right' : 'left');
|
|
437
|
+
const hoverHeight = this._hover.containerDomNode.clientHeight;
|
|
438
|
+
if (hoverHeight > target.height) {
|
|
439
|
+
this._hoverPointer.style.top = `${target.center.y - (this._y - hoverHeight) - 3 }px`;
|
|
440
|
+
}
|
|
441
|
+
else {
|
|
442
|
+
this._hoverPointer.style.top = `${Math.round((hoverHeight / 2)) - 3 }px`;
|
|
443
|
+
}
|
|
444
|
+
break;
|
|
445
|
+
}
|
|
446
|
+
case 3 :
|
|
447
|
+
case 2 : {
|
|
448
|
+
this._hoverPointer.classList.add(this._hoverPosition === 3 ? 'bottom' : 'top');
|
|
449
|
+
const hoverWidth = this._hover.containerDomNode.clientWidth;
|
|
450
|
+
let pointerLeftPosition = Math.round((hoverWidth / 2)) - 3 ;
|
|
451
|
+
const pointerX = this._x + pointerLeftPosition;
|
|
452
|
+
if (pointerX < target.left || pointerX > target.right) {
|
|
453
|
+
pointerLeftPosition = target.center.x - this._x - 3 ;
|
|
454
|
+
}
|
|
455
|
+
this._hoverPointer.style.left = `${pointerLeftPosition}px`;
|
|
456
|
+
break;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
focus() {
|
|
461
|
+
this._hover.containerDomNode.focus();
|
|
462
|
+
}
|
|
463
|
+
hide() {
|
|
464
|
+
this.dispose();
|
|
465
|
+
}
|
|
466
|
+
dispose() {
|
|
467
|
+
if (!this._isDisposed) {
|
|
468
|
+
this._onDispose.fire();
|
|
469
|
+
this._hoverContainer.remove();
|
|
470
|
+
this._messageListeners.dispose();
|
|
471
|
+
this._target.dispose();
|
|
472
|
+
super.dispose();
|
|
473
|
+
}
|
|
474
|
+
this._isDisposed = true;
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
HoverWidget = ( __decorate([
|
|
478
|
+
( __param(1, IKeybindingService)),
|
|
479
|
+
( __param(2, IConfigurationService)),
|
|
480
|
+
( __param(3, IOpenerService)),
|
|
481
|
+
( __param(4, IInstantiationService)),
|
|
482
|
+
( __param(5, IAccessibilityService))
|
|
483
|
+
], HoverWidget));
|
|
484
|
+
class CompositeMouseTracker extends Widget {
|
|
485
|
+
get onMouseOut() { return this._onMouseOut.event; }
|
|
486
|
+
get isMouseIn() { return this._isMouseIn; }
|
|
487
|
+
constructor(_elements) {
|
|
488
|
+
super();
|
|
489
|
+
this._elements = _elements;
|
|
490
|
+
this._isMouseIn = true;
|
|
491
|
+
this._onMouseOut = this._register(( new Emitter()));
|
|
492
|
+
this._elements.forEach(n => this.onmouseover(n, () => this._onTargetMouseOver(n)));
|
|
493
|
+
this._elements.forEach(n => this.onmouseleave(n, () => this._onTargetMouseLeave(n)));
|
|
494
|
+
}
|
|
495
|
+
_onTargetMouseOver(target) {
|
|
496
|
+
this._isMouseIn = true;
|
|
497
|
+
this._clearEvaluateMouseStateTimeout(target);
|
|
498
|
+
}
|
|
499
|
+
_onTargetMouseLeave(target) {
|
|
500
|
+
this._isMouseIn = false;
|
|
501
|
+
this._evaluateMouseState(target);
|
|
502
|
+
}
|
|
503
|
+
_evaluateMouseState(target) {
|
|
504
|
+
this._clearEvaluateMouseStateTimeout(target);
|
|
505
|
+
this._mouseTimeout = getWindow(target).setTimeout(() => this._fireIfMouseOutside(), 0);
|
|
506
|
+
}
|
|
507
|
+
_clearEvaluateMouseStateTimeout(target) {
|
|
508
|
+
if (this._mouseTimeout) {
|
|
509
|
+
getWindow(target).clearTimeout(this._mouseTimeout);
|
|
510
|
+
this._mouseTimeout = undefined;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
_fireIfMouseOutside() {
|
|
514
|
+
if (!this._isMouseIn) {
|
|
515
|
+
this._onMouseOut.fire();
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
class ElementHoverTarget {
|
|
520
|
+
constructor(_element) {
|
|
521
|
+
this._element = _element;
|
|
522
|
+
this.targetElements = [this._element];
|
|
523
|
+
}
|
|
524
|
+
dispose() {
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
export { HoverWidget };
|
package/vscode/src/vs/editor/{contrib → browser/widget}/markdownRenderer/browser/markdownRenderer.js
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { __decorate, __param } from '
|
|
2
|
-
import { renderMarkdown } from '
|
|
3
|
-
import { createTrustedTypesPolicy } from '
|
|
4
|
-
import { onUnexpectedError } from '
|
|
5
|
-
import { Emitter } from '
|
|
6
|
-
import { DisposableStore } from '
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { renderMarkdown } from '../../../../../base/browser/markdownRenderer.js';
|
|
3
|
+
import { createTrustedTypesPolicy } from '../../../../../base/browser/trustedTypes.js';
|
|
4
|
+
import { onUnexpectedError } from '../../../../../base/common/errors.js';
|
|
5
|
+
import { Emitter } from '../../../../../base/common/event.js';
|
|
6
|
+
import { DisposableStore } from '../../../../../base/common/lifecycle.js';
|
|
7
7
|
import './renderedMarkdown.css.js';
|
|
8
|
-
import { applyFontInfo } from '../../../
|
|
9
|
-
import { ILanguageService } from '
|
|
10
|
-
import { PLAINTEXT_LANGUAGE_ID } from '
|
|
11
|
-
import { tokenizeToString } from '
|
|
12
|
-
import { IOpenerService } from '
|
|
8
|
+
import { applyFontInfo } from '../../../config/domFontInfo.js';
|
|
9
|
+
import { ILanguageService } from '../../../../common/languages/language.js';
|
|
10
|
+
import { PLAINTEXT_LANGUAGE_ID } from '../../../../common/languages/modesRegistry.js';
|
|
11
|
+
import { tokenizeToString } from '../../../../common/languages/textToHtmlTokenizer.js';
|
|
12
|
+
import { IOpenerService } from '../../../../../platform/opener/common/opener.js';
|
|
13
13
|
var MarkdownRenderer_1;
|
|
14
14
|
let MarkdownRenderer = class MarkdownRenderer {
|
|
15
15
|
static { MarkdownRenderer_1 = this; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import n from '
|
|
1
|
+
import n from '../../../../../../../../external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
2
|
var css = ".monaco-editor .rendered-markdown kbd{background-color:var(--vscode-keybindingLabel-background);border-color:var(--vscode-keybindingLabel-border);border-bottom-color:var(--vscode-keybindingLabel-bottomBorder);border-radius:3px;border-style:solid;border-width:1px;box-shadow:inset 0 -1px 0 var(--vscode-widget-shadow);color:var(--vscode-keybindingLabel-foreground);padding:1px 3px;vertical-align:middle}";
|
|
3
3
|
n(css,{});
|
|
4
4
|
export { css, css as default };
|
|
@@ -909,7 +909,7 @@ interface IEditorHoverOptions {
|
|
|
909
909
|
*/
|
|
910
910
|
above?: boolean;
|
|
911
911
|
}
|
|
912
|
-
declare enum
|
|
912
|
+
declare enum ShowLightbulbIconMode {
|
|
913
913
|
Off = "off",
|
|
914
914
|
OnCode = "onCode",
|
|
915
915
|
On = "on"
|
|
@@ -920,15 +920,12 @@ declare enum ShowAiIconMode {
|
|
|
920
920
|
interface IEditorLightbulbOptions {
|
|
921
921
|
/**
|
|
922
922
|
* Enable the lightbulb code action.
|
|
923
|
-
*
|
|
923
|
+
* The three possible values are `off`, `on` and `onCode` and the default is `onCode`.
|
|
924
|
+
* `off` disables the code action menu.
|
|
925
|
+
* `on` shows the code action menu on code and on empty lines.
|
|
926
|
+
* `onCode` shows the code action menu on code only.
|
|
924
927
|
*/
|
|
925
|
-
enabled?:
|
|
926
|
-
experimental?: {
|
|
927
|
-
/**
|
|
928
|
-
* Highlight AI code actions with AI icon
|
|
929
|
-
*/
|
|
930
|
-
showAiIcon?: ShowAiIconMode;
|
|
931
|
-
};
|
|
928
|
+
enabled?: ShowLightbulbIconMode;
|
|
932
929
|
}
|
|
933
930
|
interface IEditorStickyScrollOptions {
|
|
934
931
|
/**
|
|
@@ -1193,6 +1190,10 @@ interface IInlineSuggestOptions {
|
|
|
1193
1190
|
* Does not clear active inline suggestions when the editor loses focus.
|
|
1194
1191
|
*/
|
|
1195
1192
|
keepOnBlur?: boolean;
|
|
1193
|
+
/**
|
|
1194
|
+
* Font family for inline suggestions.
|
|
1195
|
+
*/
|
|
1196
|
+
fontFamily?: string | 'default';
|
|
1196
1197
|
}
|
|
1197
1198
|
interface IBracketPairColorizationOptions {
|
|
1198
1199
|
/**
|
|
@@ -1431,4 +1432,4 @@ interface IPasteAsOptions {
|
|
|
1431
1432
|
showPasteSelector?: 'afterPaste' | 'never';
|
|
1432
1433
|
}
|
|
1433
1434
|
|
|
1434
|
-
export { type EditorAutoClosingEditStrategy, type EditorAutoClosingStrategy, EditorAutoIndentStrategy, type EditorAutoSurroundStrategy, type GoToLocationValues, type IBracketPairColorizationOptions, type IDiffEditorBaseOptions, type IDiffEditorOptions, type IDropIntoEditorOptions, type IEditorCommentsOptions, type IEditorFindOptions, type IEditorHoverOptions, type IEditorInlayHintsOptions, type IEditorLightbulbOptions, type IEditorMinimapOptions, type IEditorOptions, type IEditorPaddingOptions, type IEditorParameterHintOptions, type IEditorScrollbarOptions, type IEditorStickyScrollOptions, type IGotoLocationOptions, type IGuidesOptions, type IInlineSuggestOptions, type IPasteAsOptions, type IQuickSuggestionsOptions, type IRulerOption, type ISmartSelectOptions, type ISuggestOptions, type IUnicodeHighlightOptions, type InUntrustedWorkspace, type LineNumbersType, type QuickSuggestionsValue,
|
|
1435
|
+
export { type EditorAutoClosingEditStrategy, type EditorAutoClosingStrategy, EditorAutoIndentStrategy, type EditorAutoSurroundStrategy, type GoToLocationValues, type IBracketPairColorizationOptions, type IDiffEditorBaseOptions, type IDiffEditorOptions, type IDropIntoEditorOptions, type IEditorCommentsOptions, type IEditorFindOptions, type IEditorHoverOptions, type IEditorInlayHintsOptions, type IEditorLightbulbOptions, type IEditorMinimapOptions, type IEditorOptions, type IEditorPaddingOptions, type IEditorParameterHintOptions, type IEditorScrollbarOptions, type IEditorStickyScrollOptions, type IGotoLocationOptions, type IGuidesOptions, type IInlineSuggestOptions, type IPasteAsOptions, type IQuickSuggestionsOptions, type IRulerOption, type ISmartSelectOptions, type ISuggestOptions, type IUnicodeHighlightOptions, type InUntrustedWorkspace, type LineNumbersType, type QuickSuggestionsValue, ShowLightbulbIconMode };
|