monaco-editor-core 0.56.0-dev-20260628 → 0.56.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.
Files changed (64) hide show
  1. package/esm/nls.keys.json +1 -1
  2. package/esm/nls.messages.cs.js +2 -2
  3. package/esm/nls.messages.de.js +2 -2
  4. package/esm/nls.messages.es.js +2 -2
  5. package/esm/nls.messages.fr.js +2 -2
  6. package/esm/nls.messages.it.js +2 -2
  7. package/esm/nls.messages.ja.js +2 -2
  8. package/esm/nls.messages.js +1 -1
  9. package/esm/nls.messages.json +1 -1
  10. package/esm/nls.messages.ko.js +2 -2
  11. package/esm/nls.messages.pl.js +2 -2
  12. package/esm/nls.messages.pt-br.js +2 -2
  13. package/esm/nls.messages.ru.js +2 -2
  14. package/esm/nls.messages.tr.js +2 -2
  15. package/esm/nls.messages.zh-cn.js +2 -2
  16. package/esm/nls.messages.zh-tw.js +2 -2
  17. package/esm/nls.metadata.json +0 -4
  18. package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +10 -23
  19. package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
  20. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +0 -1
  21. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
  22. package/esm/vs/editor/contrib/hover/browser/contentHoverRendered.js +2 -2
  23. package/esm/vs/editor/contrib/hover/browser/contentHoverRendered.js.map +1 -1
  24. package/esm/vs/platform/actionWidget/browser/actionList.js +8 -48
  25. package/esm/vs/platform/actionWidget/browser/actionList.js.map +1 -1
  26. package/esm/vs/platform/actionWidget/browser/actionWidget.css +2 -87
  27. package/esm/vs/platform/actionWidget/browser/actionWidget.js +12 -12
  28. package/esm/vs/platform/configuration/common/configurationRegistry.js +11 -11
  29. package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
  30. package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
  31. package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
  32. package/esm/vs/platform/contextkey/common/scanner.js +5 -5
  33. package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
  34. package/esm/vs/platform/hover/browser/hoverWidget.js +1 -1
  35. package/esm/vs/platform/hover/browser/updatableHoverWidget.js +1 -1
  36. package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +5 -5
  37. package/esm/vs/platform/list/browser/listService.js +27 -27
  38. package/esm/vs/platform/markers/common/markerService.js +2 -2
  39. package/esm/vs/platform/markers/common/markers.js +6 -6
  40. package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
  41. package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
  42. package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
  43. package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
  44. package/esm/vs/platform/quickinput/browser/quickInputController.js +6 -6
  45. package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
  46. package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
  47. package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
  48. package/esm/vs/platform/quickinput/browser/tree/quickTree.js +1 -1
  49. package/esm/vs/platform/theme/common/colorUtils.js +2 -2
  50. package/esm/vs/platform/theme/common/colors/baseColors.js +19 -19
  51. package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
  52. package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
  53. package/esm/vs/platform/theme/common/colors/inputColors.js +48 -48
  54. package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
  55. package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
  56. package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
  57. package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
  58. package/esm/vs/platform/theme/common/colors/quickpickColors.js +10 -10
  59. package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
  60. package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
  61. package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
  62. package/esm/vs/platform/workspace/common/workspace.js +1 -1
  63. package/package.json +2 -2
  64. package/version.txt +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/hover/browser/contentHoverRendered.ts","vs/editor/contrib/hover/browser/contentHoverRendered.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,EAA4G,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC/J,OAAO,EAAE,UAAU,EAAE,eAAe,EAAe,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC9G,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAEtD,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AAEvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,2BAA2B,EAAE,MAAM,2EAA2E,CAAC;AACpI,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAE5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2DAA2D,CAAC;AAEvF,IAAM,oBAAoB,4BAA1B,MAAM,oBAAqB,SAAQ,UAAU;IAcnD,YACC,MAAmB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;IAED,IAAW,qBAAqB;QAC/B,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACpC,CAAC;IAED,IAAW,eAAe;QACzB,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;IACnC,CAAC;;AAjOI,yBAAyB;IAoB5B,WAAA,kBAAkB,CAAA;IAClB,WAAA,aAAa,CAAA;IACb,WAAA,iBAAiB,CAAA;GAtBd,yBAAyB,CAkO9B","file":"contentHoverRendered.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IEditorHoverContext, IEditorHoverParticipant, IEditorHoverRenderContext, IHoverPart, IRenderedHoverParts, RenderedHoverParts } from './hoverTypes.js';\nimport { Disposable, DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { EditorHoverStatusBar } from './contentHoverStatusBar.js';\nimport { HoverStartSource } from './hoverOperation.js';\nimport { HoverCopyButton } from './hoverCopyButton.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { ContentHoverResult } from './contentHoverTypes.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { HoverVerbosityAction } from '../../../common/languages.js';\nimport { MarkdownHoverParticipant } from './markdownHoverParticipant.js';\nimport { ColorHover, HoverColorPickerParticipant } from '../../colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js';\nimport { InlayHintsHover } from '../../inlayHints/browser/inlayHintsHover.js';\nimport { BugIndicatingError } from '../../../../base/common/errors.js';\nimport { HoverAction } from '../../../../base/browser/ui/hover/hoverWidget.js';\nimport { IHoverService } from '../../../../platform/hover/browser/hover.js';\nimport { IOffsetRange } from '../../../common/core/ranges/offsetRange.js';\nimport { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.js';\n\nexport class RenderedContentHover extends Disposable {\n\n\tpublic closestMouseDistance: number | undefined;\n\tpublic initialMousePosX: number | undefined;\n\tpublic initialMousePosY: number | undefined;\n\n\tpublic readonly showAtPosition: Position;\n\tpublic readonly showAtSecondaryPosition: Position;\n\tpublic readonly shouldFocus: boolean;\n\tpublic readonly source: HoverStartSource;\n\tpublic readonly shouldAppearBeforeContent: boolean;\n\n\tprivate readonly _renderedHoverParts: RenderedContentHoverParts;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\thoverResult: ContentHoverResult,\n\t\tparticipants: IEditorHoverParticipant<IHoverPart>[],\n\t\tcontext: IEditorHoverContext,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IHoverService hoverService: IHoverService,\n\t\t@IClipboardService clipboardService: IClipboardService\n\t) {\n\t\tsuper();\n\t\tconst parts = hoverResult.hoverParts;\n\t\tthis._renderedHoverParts = this._register(new RenderedContentHoverParts(\n\t\t\teditor,\n\t\t\tparticipants,\n\t\t\tparts,\n\t\t\tcontext,\n\t\t\tkeybindingService,\n\t\t\thoverService,\n\t\t\tclipboardService\n\t\t));\n\t\tconst contentHoverComputerOptions = hoverResult.options;\n\t\tconst anchor = contentHoverComputerOptions.anchor;\n\t\tconst { showAtPosition, showAtSecondaryPosition } = RenderedContentHover.computeHoverPositions(editor, anchor.range, parts);\n\t\tthis.shouldAppearBeforeContent = parts.some(m => m.isBeforeContent);\n\t\tthis.showAtPosition = showAtPosition;\n\t\tthis.showAtSecondaryPosition = showAtSecondaryPosition;\n\t\tthis.initialMousePosX = anchor.initialMousePosX;\n\t\tthis.initialMousePosY = anchor.initialMousePosY;\n\t\tthis.shouldFocus = contentHoverComputerOptions.shouldFocus;\n\t\tthis.source = contentHoverComputerOptions.source;\n\t}\n\n\tpublic get domNode(): DocumentFragment {\n\t\treturn this._renderedHoverParts.domNode;\n\t}\n\n\tpublic get domNodeHasChildren(): boolean {\n\t\treturn this._renderedHoverParts.domNodeHasChildren;\n\t}\n\n\tpublic get focusedHoverPartIndex(): number {\n\t\treturn this._renderedHoverParts.focusedHoverPartIndex;\n\t}\n\n\tpublic get hoverPartsCount(): number {\n\t\treturn this._renderedHoverParts.hoverPartsCount;\n\t}\n\n\tpublic focusHoverPartWithIndex(index: number): void {\n\t\tthis._renderedHoverParts.focusHoverPartWithIndex(index);\n\t}\n\n\tpublic async updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): Promise<void> {\n\t\tthis._renderedHoverParts.updateHoverVerbosityLevel(action, index, focus);\n\t}\n\n\tpublic isColorPickerVisible(): boolean {\n\t\treturn this._renderedHoverParts.isColorPickerVisible();\n\t}\n\n\tpublic static computeHoverPositions(editor: ICodeEditor, anchorRange: Range, hoverParts: IHoverPart[]): { showAtPosition: Position; showAtSecondaryPosition: Position } {\n\n\t\tlet startColumnBoundary = 1;\n\t\tif (editor.hasModel()) {\n\t\t\t// Ensure the range is on the current view line\n\t\t\tconst viewModel = editor._getViewModel();\n\t\t\tconst coordinatesConverter = viewModel.coordinatesConverter;\n\t\t\tconst anchorViewRange = coordinatesConverter.convertModelRangeToViewRange(anchorRange);\n\t\t\tconst anchorViewMinColumn = viewModel.getLineMinColumn(anchorViewRange.startLineNumber);\n\t\t\tconst anchorViewRangeStart = new Position(anchorViewRange.startLineNumber, anchorViewMinColumn);\n\t\t\tstartColumnBoundary = coordinatesConverter.convertViewPositionToModelPosition(anchorViewRangeStart).column;\n\t\t}\n\n\t\t// The anchor range is always on a single line\n\t\tconst anchorStartLineNumber = anchorRange.startLineNumber;\n\t\tlet secondaryPositionColumn = anchorRange.startColumn;\n\t\tlet forceShowAtRange: Range | undefined;\n\n\t\tfor (const hoverPart of hoverParts) {\n\t\t\tconst hoverPartRange = hoverPart.range;\n\t\t\tconst hoverPartRangeOnAnchorStartLine = hoverPartRange.startLineNumber === anchorStartLineNumber;\n\t\t\tconst hoverPartRangeOnAnchorEndLine = hoverPartRange.endLineNumber === anchorStartLineNumber;\n\t\t\tconst hoverPartRangeIsOnAnchorLine = hoverPartRangeOnAnchorStartLine && hoverPartRangeOnAnchorEndLine;\n\t\t\tif (hoverPartRangeIsOnAnchorLine) {\n\t\t\t\t// this message has a range that is completely sitting on the line of the anchor\n\t\t\t\tconst hoverPartStartColumn = hoverPartRange.startColumn;\n\t\t\t\tconst minSecondaryPositionColumn = Math.min(secondaryPositionColumn, hoverPartStartColumn);\n\t\t\t\tsecondaryPositionColumn = Math.max(minSecondaryPositionColumn, startColumnBoundary);\n\t\t\t}\n\t\t\tif (hoverPart.forceShowAtRange) {\n\t\t\t\tforceShowAtRange = hoverPartRange;\n\t\t\t}\n\t\t}\n\n\t\tlet showAtPosition: Position;\n\t\tlet showAtSecondaryPosition: Position;\n\t\tif (forceShowAtRange) {\n\t\t\tconst forceShowAtPosition = forceShowAtRange.getStartPosition();\n\t\t\tshowAtPosition = forceShowAtPosition;\n\t\t\tshowAtSecondaryPosition = forceShowAtPosition;\n\t\t} else {\n\t\t\tshowAtPosition = anchorRange.getStartPosition();\n\t\t\tshowAtSecondaryPosition = new Position(anchorStartLineNumber, secondaryPositionColumn);\n\t\t}\n\t\treturn {\n\t\t\tshowAtPosition,\n\t\t\tshowAtSecondaryPosition,\n\t\t};\n\t}\n}\n\ninterface IRenderedContentHoverPart {\n\t/**\n\t * Type of rendered part\n\t */\n\ttype: 'hoverPart';\n\t/**\n\t * Participant of the rendered hover part\n\t */\n\tparticipant: IEditorHoverParticipant<IHoverPart>;\n\t/**\n\t * The rendered hover part\n\t */\n\thoverPart: IHoverPart;\n\t/**\n\t * The HTML element containing the hover status bar.\n\t */\n\thoverElement: HTMLElement;\n}\n\ninterface IRenderedContentStatusBar {\n\t/**\n\t * Type of rendered part\n\t */\n\ttype: 'statusBar';\n\t/**\n\t * The HTML element containing the hover status bar.\n\t */\n\thoverElement: HTMLElement;\n\t/**\n\t * The actions of the hover status bar.\n\t */\n\tactions: HoverAction[];\n}\n\ntype IRenderedContentHoverPartOrStatusBar = IRenderedContentHoverPart | IRenderedContentStatusBar;\n\nclass RenderedStatusBar implements IDisposable {\n\n\tconstructor(fragment: DocumentFragment, private readonly _statusBar: EditorHoverStatusBar) {\n\t\tfragment.appendChild(this._statusBar.hoverElement);\n\t}\n\n\tget hoverElement(): HTMLElement {\n\t\treturn this._statusBar.hoverElement;\n\t}\n\n\tget actions(): HoverAction[] {\n\t\treturn this._statusBar.actions;\n\t}\n\n\tdispose() {\n\t\tthis._statusBar.dispose();\n\t}\n}\n\nclass RenderedContentHoverParts extends Disposable {\n\n\tprivate static readonly _DECORATION_OPTIONS = ModelDecorationOptions.register({\n\t\tdescription: 'content-hover-highlight',\n\t\tclassName: 'hoverHighlight'\n\t});\n\n\tprivate readonly _renderedParts: IRenderedContentHoverPartOrStatusBar[] = [];\n\tprivate readonly _fragment: DocumentFragment;\n\tprivate readonly _context: IEditorHoverContext;\n\n\tprivate _markdownHoverParticipant: MarkdownHoverParticipant | undefined;\n\tprivate _colorHoverParticipant: HoverColorPickerParticipant | undefined;\n\tprivate _focusedHoverPartIndex: number = -1;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\tparticipants: IEditorHoverParticipant<IHoverPart>[],\n\t\thoverParts: IHoverPart[],\n\t\tcontext: IEditorHoverContext,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IHoverService private readonly _hoverService: IHoverService,\n\t\t@IClipboardService private readonly _clipboardService: IClipboardService\n\t) {\n\t\tsuper();\n\t\tthis._context = context;\n\t\tthis._fragment = document.createDocumentFragment();\n\t\tthis._register(this._renderParts(participants, hoverParts, context, keybindingService, this._hoverService));\n\t\tthis._register(this._registerListenersOnRenderedParts());\n\t\tthis._register(this._createEditorDecorations(editor, hoverParts));\n\t\tthis._updateMarkdownAndColorParticipantInfo(participants);\n\t}\n\n\tprivate _createEditorDecorations(editor: ICodeEditor, hoverParts: IHoverPart[]): IDisposable {\n\t\tif (hoverParts.length === 0) {\n\t\t\treturn Disposable.None;\n\t\t}\n\t\tlet highlightRange = hoverParts[0].range;\n\t\tfor (const hoverPart of hoverParts) {\n\t\t\tconst hoverPartRange = hoverPart.range;\n\t\t\thighlightRange = Range.plusRange(highlightRange, hoverPartRange);\n\t\t}\n\t\tconst highlightDecoration = editor.createDecorationsCollection();\n\t\thighlightDecoration.set([{\n\t\t\trange: highlightRange,\n\t\t\toptions: RenderedContentHoverParts._DECORATION_OPTIONS\n\t\t}]);\n\t\treturn toDisposable(() => {\n\t\t\thighlightDecoration.clear();\n\t\t});\n\t}\n\n\tprivate _renderParts(participants: IEditorHoverParticipant<IHoverPart>[], hoverParts: IHoverPart[], hoverContext: IEditorHoverContext, keybindingService: IKeybindingService, hoverService: IHoverService): IDisposable {\n\t\tconst statusBar = new EditorHoverStatusBar(keybindingService, hoverService);\n\t\tconst hoverRenderingContext: IEditorHoverRenderContext = {\n\t\t\tfragment: this._fragment,\n\t\t\tstatusBar,\n\t\t\t...hoverContext\n\t\t};\n\t\tconst disposables = new DisposableStore();\n\t\tdisposables.add(statusBar);\n\t\tfor (const participant of participants) {\n\t\t\tconst renderedHoverParts = this._renderHoverPartsForParticipant(hoverParts, participant, hoverRenderingContext);\n\t\t\tdisposables.add(renderedHoverParts);\n\t\t\tfor (const renderedHoverPart of renderedHoverParts.renderedHoverParts) {\n\t\t\t\tthis._renderedParts.push({\n\t\t\t\t\ttype: 'hoverPart',\n\t\t\t\t\tparticipant,\n\t\t\t\t\thoverPart: renderedHoverPart.hoverPart,\n\t\t\t\t\thoverElement: renderedHoverPart.hoverElement,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tconst renderedStatusBar = this._renderStatusBar(this._fragment, statusBar);\n\t\tif (renderedStatusBar) {\n\t\t\tdisposables.add(renderedStatusBar);\n\t\t\tthis._renderedParts.push({\n\t\t\t\ttype: 'statusBar',\n\t\t\t\thoverElement: renderedStatusBar.hoverElement,\n\t\t\t\tactions: renderedStatusBar.actions,\n\t\t\t});\n\t\t}\n\t\treturn disposables;\n\t}\n\n\tprivate _renderHoverPartsForParticipant(hoverParts: IHoverPart[], participant: IEditorHoverParticipant<IHoverPart>, hoverRenderingContext: IEditorHoverRenderContext): IRenderedHoverParts<IHoverPart> {\n\t\tconst hoverPartsForParticipant = hoverParts.filter(hoverPart => hoverPart.owner === participant);\n\t\tconst hasHoverPartsForParticipant = hoverPartsForParticipant.length > 0;\n\t\tif (!hasHoverPartsForParticipant) {\n\t\t\treturn new RenderedHoverParts([]);\n\t\t}\n\t\treturn participant.renderHoverParts(hoverRenderingContext, hoverPartsForParticipant);\n\t}\n\n\tprivate _renderStatusBar(fragment: DocumentFragment, statusBar: EditorHoverStatusBar): RenderedStatusBar | undefined {\n\t\tif (!statusBar.hasContent) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn new RenderedStatusBar(fragment, statusBar);\n\t}\n\n\tprivate _registerListenersOnRenderedParts(): IDisposable {\n\t\tconst disposables = new DisposableStore();\n\t\tthis._renderedParts.forEach((renderedPart: IRenderedContentHoverPartOrStatusBar, index: number) => {\n\t\t\tconst element = renderedPart.hoverElement;\n\t\t\telement.tabIndex = 0;\n\t\t\tdisposables.add(dom.addDisposableListener(element, dom.EventType.FOCUS_IN, (event: Event) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis._focusedHoverPartIndex = index;\n\t\t\t}));\n\t\t\tdisposables.add(dom.addDisposableListener(element, dom.EventType.FOCUS_OUT, (event: Event) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis._focusedHoverPartIndex = -1;\n\t\t\t}));\n\t\t\t// Add copy button for marker hovers\n\t\t\tif (renderedPart.type === 'hoverPart' && !(renderedPart.hoverPart instanceof ColorHover) && !renderedPart.participant.hideCopyButton) {\n\t\t\t\tdisposables.add(new HoverCopyButton(\n\t\t\t\t\telement,\n\t\t\t\t\t() => renderedPart.participant.getAccessibleContent(renderedPart.hoverPart),\n\t\t\t\t\tthis._clipboardService,\n\t\t\t\t\tthis._hoverService\n\t\t\t\t));\n\t\t\t}\n\t\t});\n\t\treturn disposables;\n\t}\n\n\tprivate _updateMarkdownAndColorParticipantInfo(participants: IEditorHoverParticipant<IHoverPart>[]) {\n\t\tconst markdownHoverParticipant = participants.find(p => {\n\t\t\treturn (p instanceof MarkdownHoverParticipant) && !(p instanceof InlayHintsHover);\n\t\t});\n\t\tif (markdownHoverParticipant) {\n\t\t\tthis._markdownHoverParticipant = markdownHoverParticipant as MarkdownHoverParticipant;\n\t\t}\n\t\tthis._colorHoverParticipant = participants.find(p => p instanceof HoverColorPickerParticipant);\n\t}\n\n\tpublic focusHoverPartWithIndex(index: number): void {\n\t\tif (index < 0 || index >= this._renderedParts.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._renderedParts[index].hoverElement.focus();\n\t}\n\n\tpublic async updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): Promise<void> {\n\t\tif (!this._markdownHoverParticipant) {\n\t\t\treturn;\n\t\t}\n\t\tlet rangeOfIndicesToUpdate: IOffsetRange;\n\t\tif (index >= 0) {\n\t\t\trangeOfIndicesToUpdate = { start: index, endExclusive: index + 1 };\n\t\t} else {\n\t\t\trangeOfIndicesToUpdate = this._findRangeOfMarkdownHoverParts(this._markdownHoverParticipant);\n\t\t}\n\t\tfor (let i = rangeOfIndicesToUpdate.start; i < rangeOfIndicesToUpdate.endExclusive; i++) {\n\t\t\tconst normalizedMarkdownHoverIndex = this._normalizedIndexToMarkdownHoverIndexRange(this._markdownHoverParticipant, i);\n\t\t\tif (normalizedMarkdownHoverIndex === undefined) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst renderedPart = await this._markdownHoverParticipant.updateMarkdownHoverVerbosityLevel(action, normalizedMarkdownHoverIndex);\n\t\t\tif (!renderedPart) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._renderedParts[i] = {\n\t\t\t\ttype: 'hoverPart',\n\t\t\t\tparticipant: this._markdownHoverParticipant,\n\t\t\t\thoverPart: renderedPart.hoverPart,\n\t\t\t\thoverElement: renderedPart.hoverElement,\n\t\t\t};\n\t\t}\n\t\tif (focus) {\n\t\t\tif (index >= 0) {\n\t\t\t\tthis.focusHoverPartWithIndex(index);\n\t\t\t} else {\n\t\t\t\tthis._context.focus();\n\t\t\t}\n\t\t}\n\t\tthis._context.onContentsChanged();\n\t}\n\n\tpublic isColorPickerVisible(): boolean {\n\t\treturn this._colorHoverParticipant?.isColorPickerVisible() ?? false;\n\t}\n\n\tprivate _normalizedIndexToMarkdownHoverIndexRange(markdownHoverParticipant: MarkdownHoverParticipant, index: number): number | undefined {\n\t\tconst renderedPart = this._renderedParts[index];\n\t\tif (!renderedPart || renderedPart.type !== 'hoverPart') {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst isHoverPartMarkdownHover = renderedPart.participant === markdownHoverParticipant;\n\t\tif (!isHoverPartMarkdownHover) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst firstIndexOfMarkdownHovers = this._renderedParts.findIndex(renderedPart =>\n\t\t\trenderedPart.type === 'hoverPart'\n\t\t\t&& renderedPart.participant === markdownHoverParticipant\n\t\t);\n\t\tif (firstIndexOfMarkdownHovers === -1) {\n\t\t\tthrow new BugIndicatingError();\n\t\t}\n\t\treturn index - firstIndexOfMarkdownHovers;\n\t}\n\n\tprivate _findRangeOfMarkdownHoverParts(markdownHoverParticipant: MarkdownHoverParticipant): IOffsetRange {\n\t\tconst copiedRenderedParts = this._renderedParts.slice();\n\t\tconst firstIndexOfMarkdownHovers = copiedRenderedParts.findIndex(renderedPart => renderedPart.type === 'hoverPart' && renderedPart.participant === markdownHoverParticipant);\n\t\tconst inversedLastIndexOfMarkdownHovers = copiedRenderedParts.reverse().findIndex(renderedPart => renderedPart.type === 'hoverPart' && renderedPart.participant === markdownHoverParticipant);\n\t\tconst lastIndexOfMarkdownHovers = inversedLastIndexOfMarkdownHovers >= 0 ? copiedRenderedParts.length - inversedLastIndexOfMarkdownHovers : inversedLastIndexOfMarkdownHovers;\n\t\treturn { start: firstIndexOfMarkdownHovers, endExclusive: lastIndexOfMarkdownHovers + 1 };\n\t}\n\n\tpublic get domNode(): DocumentFragment {\n\t\treturn this._fragment;\n\t}\n\n\tpublic get domNodeHasChildren(): boolean {\n\t\treturn this._fragment.hasChildNodes();\n\t}\n\n\tpublic get focusedHoverPartIndex(): number {\n\t\treturn this._focusedHoverPartIndex;\n\t}\n\n\tpublic get hoverPartsCount(): number {\n\t\treturn this._renderedParts.length;\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IEditorHoverContext, IEditorHoverParticipant, IEditorHoverRenderContext, IHoverPart, IRenderedHoverParts, RenderedHoverParts } from './hoverTypes.js';\nimport { Disposable, DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { EditorHoverStatusBar } from './contentHoverStatusBar.js';\nimport { HoverStartSource } from './hoverOperation.js';\nimport { HoverCopyButton } from './hoverCopyButton.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { ContentHoverResult } from './contentHoverTypes.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { HoverVerbosityAction } from '../../../common/languages.js';\nimport { MarkdownHoverParticipant } from './markdownHoverParticipant.js';\nimport { ColorHover, HoverColorPickerParticipant } from '../../colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js';\nimport { InlayHintsHover } from '../../inlayHints/browser/inlayHintsHover.js';\nimport { BugIndicatingError } from '../../../../base/common/errors.js';\nimport { HoverAction } from '../../../../base/browser/ui/hover/hoverWidget.js';\nimport { IHoverService } from '../../../../platform/hover/browser/hover.js';\nimport { IOffsetRange } from '../../../common/core/ranges/offsetRange.js';\nimport { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.js';\n\nexport class RenderedContentHover extends Disposable {\n\n\tpublic closestMouseDistance: number | undefined;\n\tpublic initialMousePosX: number | undefined;\n\tpublic initialMousePosY: number | undefined;\n\n\tpublic readonly showAtPosition: Position;\n\tpublic readonly showAtSecondaryPosition: Position;\n\tpublic readonly shouldFocus: boolean;\n\tpublic readonly source: HoverStartSource;\n\tpublic readonly shouldAppearBeforeContent: boolean;\n\n\tprivate readonly _renderedHoverParts: RenderedContentHoverParts;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\thoverResult: ContentHoverResult,\n\t\tparticipants: IEditorHoverParticipant<IHoverPart>[],\n\t\tcontext: IEditorHoverContext,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IHoverService hoverService: IHoverService,\n\t\t@IClipboardService clipboardService: IClipboardService\n\t) {\n\t\tsuper();\n\t\tconst parts = hoverResult.hoverParts;\n\t\tthis._renderedHoverParts = this._register(new RenderedContentHoverParts(\n\t\t\teditor,\n\t\t\tparticipants,\n\t\t\tparts,\n\t\t\tcontext,\n\t\t\tkeybindingService,\n\t\t\thoverService,\n\t\t\tclipboardService\n\t\t));\n\t\tconst contentHoverComputerOptions = hoverResult.options;\n\t\tconst anchor = contentHoverComputerOptions.anchor;\n\t\tconst { showAtPosition, showAtSecondaryPosition } = RenderedContentHover.computeHoverPositions(editor, anchor.range, parts);\n\t\tthis.shouldAppearBeforeContent = parts.some(m => m.isBeforeContent);\n\t\tthis.showAtPosition = showAtPosition;\n\t\tthis.showAtSecondaryPosition = showAtSecondaryPosition;\n\t\tthis.initialMousePosX = anchor.initialMousePosX;\n\t\tthis.initialMousePosY = anchor.initialMousePosY;\n\t\tthis.shouldFocus = contentHoverComputerOptions.shouldFocus;\n\t\tthis.source = contentHoverComputerOptions.source;\n\t}\n\n\tpublic get domNode(): DocumentFragment {\n\t\treturn this._renderedHoverParts.domNode;\n\t}\n\n\tpublic get domNodeHasChildren(): boolean {\n\t\treturn this._renderedHoverParts.domNodeHasChildren;\n\t}\n\n\tpublic get focusedHoverPartIndex(): number {\n\t\treturn this._renderedHoverParts.focusedHoverPartIndex;\n\t}\n\n\tpublic get hoverPartsCount(): number {\n\t\treturn this._renderedHoverParts.hoverPartsCount;\n\t}\n\n\tpublic focusHoverPartWithIndex(index: number): void {\n\t\tthis._renderedHoverParts.focusHoverPartWithIndex(index);\n\t}\n\n\tpublic async updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): Promise<void> {\n\t\tthis._renderedHoverParts.updateHoverVerbosityLevel(action, index, focus);\n\t}\n\n\tpublic isColorPickerVisible(): boolean {\n\t\treturn this._renderedHoverParts.isColorPickerVisible();\n\t}\n\n\tpublic static computeHoverPositions(editor: ICodeEditor, anchorRange: Range, hoverParts: IHoverPart[]): { showAtPosition: Position; showAtSecondaryPosition: Position } {\n\n\t\tlet startColumnBoundary = 1;\n\t\tif (editor.hasModel()) {\n\t\t\t// Ensure the range is on the current view line\n\t\t\tconst viewModel = editor._getViewModel();\n\t\t\tconst coordinatesConverter = viewModel.coordinatesConverter;\n\t\t\tconst anchorViewRange = coordinatesConverter.convertModelRangeToViewRange(anchorRange);\n\t\t\tconst anchorViewMinColumn = viewModel.getLineMinColumn(anchorViewRange.startLineNumber);\n\t\t\tconst anchorViewRangeStart = new Position(anchorViewRange.startLineNumber, anchorViewMinColumn);\n\t\t\tstartColumnBoundary = coordinatesConverter.convertViewPositionToModelPosition(anchorViewRangeStart).column;\n\t\t}\n\n\t\t// The anchor range is always on a single line\n\t\tconst anchorStartLineNumber = anchorRange.startLineNumber;\n\t\tlet secondaryPositionColumn = anchorRange.startColumn;\n\t\tlet forceShowAtRange: Range | undefined;\n\n\t\tfor (const hoverPart of hoverParts) {\n\t\t\tconst hoverPartRange = hoverPart.range;\n\t\t\tconst hoverPartRangeOnAnchorStartLine = hoverPartRange.startLineNumber === anchorStartLineNumber;\n\t\t\tconst hoverPartRangeOnAnchorEndLine = hoverPartRange.endLineNumber === anchorStartLineNumber;\n\t\t\tconst hoverPartRangeIsOnAnchorLine = hoverPartRangeOnAnchorStartLine && hoverPartRangeOnAnchorEndLine;\n\t\t\tif (hoverPartRangeIsOnAnchorLine) {\n\t\t\t\t// this message has a range that is completely sitting on the line of the anchor\n\t\t\t\tconst hoverPartStartColumn = hoverPartRange.startColumn;\n\t\t\t\tconst minSecondaryPositionColumn = Math.min(secondaryPositionColumn, hoverPartStartColumn);\n\t\t\t\tsecondaryPositionColumn = Math.max(minSecondaryPositionColumn, startColumnBoundary);\n\t\t\t}\n\t\t\tif (hoverPart.forceShowAtRange) {\n\t\t\t\tforceShowAtRange = hoverPartRange;\n\t\t\t}\n\t\t}\n\n\t\tlet showAtPosition: Position;\n\t\tlet showAtSecondaryPosition: Position;\n\t\tif (forceShowAtRange) {\n\t\t\tconst forceShowAtPosition = forceShowAtRange.getStartPosition();\n\t\t\tshowAtPosition = forceShowAtPosition;\n\t\t\tshowAtSecondaryPosition = forceShowAtPosition;\n\t\t} else {\n\t\t\tshowAtPosition = anchorRange.getStartPosition();\n\t\t\tshowAtSecondaryPosition = new Position(anchorStartLineNumber, secondaryPositionColumn);\n\t\t}\n\t\treturn {\n\t\t\tshowAtPosition,\n\t\t\tshowAtSecondaryPosition,\n\t\t};\n\t}\n}\n\ninterface IRenderedContentHoverPart {\n\t/**\n\t * Type of rendered part\n\t */\n\ttype: 'hoverPart';\n\t/**\n\t * Participant of the rendered hover part\n\t */\n\tparticipant: IEditorHoverParticipant<IHoverPart>;\n\t/**\n\t * The rendered hover part\n\t */\n\thoverPart: IHoverPart;\n\t/**\n\t * The HTML element containing the hover status bar.\n\t */\n\thoverElement: HTMLElement;\n}\n\ninterface IRenderedContentStatusBar {\n\t/**\n\t * Type of rendered part\n\t */\n\ttype: 'statusBar';\n\t/**\n\t * The HTML element containing the hover status bar.\n\t */\n\thoverElement: HTMLElement;\n\t/**\n\t * The actions of the hover status bar.\n\t */\n\tactions: HoverAction[];\n}\n\ntype IRenderedContentHoverPartOrStatusBar = IRenderedContentHoverPart | IRenderedContentStatusBar;\n\nclass RenderedStatusBar implements IDisposable {\n\n\tconstructor(fragment: DocumentFragment, private readonly _statusBar: EditorHoverStatusBar) {\n\t\tfragment.appendChild(this._statusBar.hoverElement);\n\t}\n\n\tget hoverElement(): HTMLElement {\n\t\treturn this._statusBar.hoverElement;\n\t}\n\n\tget actions(): HoverAction[] {\n\t\treturn this._statusBar.actions;\n\t}\n\n\tdispose() {\n\t\tthis._statusBar.dispose();\n\t}\n}\n\nclass RenderedContentHoverParts extends Disposable {\n\n\tprivate static readonly _DECORATION_OPTIONS = ModelDecorationOptions.register({\n\t\tdescription: 'content-hover-highlight',\n\t\tclassName: 'hoverHighlight'\n\t});\n\n\tprivate readonly _renderedParts: IRenderedContentHoverPartOrStatusBar[] = [];\n\tprivate readonly _fragment: DocumentFragment;\n\tprivate readonly _context: IEditorHoverContext;\n\n\tprivate _markdownHoverParticipant: MarkdownHoverParticipant | undefined;\n\tprivate _colorHoverParticipant: HoverColorPickerParticipant | undefined;\n\tprivate _focusedHoverPartIndex: number = -1;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\tparticipants: IEditorHoverParticipant<IHoverPart>[],\n\t\thoverParts: IHoverPart[],\n\t\tcontext: IEditorHoverContext,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IHoverService private readonly _hoverService: IHoverService,\n\t\t@IClipboardService private readonly _clipboardService: IClipboardService\n\t) {\n\t\tsuper();\n\t\tthis._context = context;\n\t\tthis._fragment = document.createDocumentFragment();\n\t\tthis._register(this._renderParts(participants, hoverParts, context, keybindingService, this._hoverService));\n\t\tthis._register(this._registerListenersOnRenderedParts());\n\t\tthis._register(this._createEditorDecorations(editor, hoverParts));\n\t\tthis._updateMarkdownAndColorParticipantInfo(participants);\n\t}\n\n\tprivate _createEditorDecorations(editor: ICodeEditor, hoverParts: IHoverPart[]): IDisposable {\n\t\tif (hoverParts.length === 0) {\n\t\t\treturn Disposable.None;\n\t\t}\n\t\tlet highlightRange = hoverParts[0].range;\n\t\tfor (const hoverPart of hoverParts) {\n\t\t\tconst hoverPartRange = hoverPart.range;\n\t\t\thighlightRange = Range.plusRange(highlightRange, hoverPartRange);\n\t\t}\n\t\tconst highlightDecoration = editor.createDecorationsCollection();\n\t\thighlightDecoration.set([{\n\t\t\trange: highlightRange,\n\t\t\toptions: RenderedContentHoverParts._DECORATION_OPTIONS\n\t\t}]);\n\t\treturn toDisposable(() => {\n\t\t\thighlightDecoration.clear();\n\t\t});\n\t}\n\n\tprivate _renderParts(participants: IEditorHoverParticipant<IHoverPart>[], hoverParts: IHoverPart[], hoverContext: IEditorHoverContext, keybindingService: IKeybindingService, hoverService: IHoverService): IDisposable {\n\t\tconst statusBar = new EditorHoverStatusBar(keybindingService, hoverService);\n\t\tconst hoverRenderingContext: IEditorHoverRenderContext = {\n\t\t\tfragment: this._fragment,\n\t\t\tstatusBar,\n\t\t\t...hoverContext\n\t\t};\n\t\tconst disposables = new DisposableStore();\n\t\tdisposables.add(statusBar);\n\t\tfor (const participant of participants) {\n\t\t\tconst renderedHoverParts = this._renderHoverPartsForParticipant(hoverParts, participant, hoverRenderingContext);\n\t\t\tdisposables.add(renderedHoverParts);\n\t\t\tfor (const renderedHoverPart of renderedHoverParts.renderedHoverParts) {\n\t\t\t\tthis._renderedParts.push({\n\t\t\t\t\ttype: 'hoverPart',\n\t\t\t\t\tparticipant,\n\t\t\t\t\thoverPart: renderedHoverPart.hoverPart,\n\t\t\t\t\thoverElement: renderedHoverPart.hoverElement,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tconst renderedStatusBar = this._renderStatusBar(this._fragment, statusBar);\n\t\tif (renderedStatusBar) {\n\t\t\tdisposables.add(renderedStatusBar);\n\t\t\tthis._renderedParts.push({\n\t\t\t\ttype: 'statusBar',\n\t\t\t\thoverElement: renderedStatusBar.hoverElement,\n\t\t\t\tactions: renderedStatusBar.actions,\n\t\t\t});\n\t\t}\n\t\treturn disposables;\n\t}\n\n\tprivate _renderHoverPartsForParticipant(hoverParts: IHoverPart[], participant: IEditorHoverParticipant<IHoverPart>, hoverRenderingContext: IEditorHoverRenderContext): IRenderedHoverParts<IHoverPart> {\n\t\tconst hoverPartsForParticipant = hoverParts.filter(hoverPart => hoverPart.owner === participant);\n\t\tconst hasHoverPartsForParticipant = hoverPartsForParticipant.length > 0;\n\t\tif (!hasHoverPartsForParticipant) {\n\t\t\treturn new RenderedHoverParts([]);\n\t\t}\n\t\treturn participant.renderHoverParts(hoverRenderingContext, hoverPartsForParticipant);\n\t}\n\n\tprivate _renderStatusBar(fragment: DocumentFragment, statusBar: EditorHoverStatusBar): RenderedStatusBar | undefined {\n\t\tif (!statusBar.hasContent) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn new RenderedStatusBar(fragment, statusBar);\n\t}\n\n\tprivate _registerListenersOnRenderedParts(): IDisposable {\n\t\tconst disposables = new DisposableStore();\n\t\tthis._renderedParts.forEach((renderedPart: IRenderedContentHoverPartOrStatusBar, index: number) => {\n\t\t\tconst element = renderedPart.hoverElement;\n\t\t\telement.tabIndex = 0;\n\t\t\tdisposables.add(dom.addDisposableListener(element, dom.EventType.FOCUS_IN, (event: Event) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis._focusedHoverPartIndex = index;\n\t\t\t}));\n\t\t\tdisposables.add(dom.addDisposableListener(element, dom.EventType.FOCUS_OUT, (event: Event) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis._focusedHoverPartIndex = -1;\n\t\t\t}));\n\t\t\t// Add copy button for marker hovers\n\t\t\tif (renderedPart.type === 'hoverPart' && !(renderedPart.hoverPart instanceof ColorHover) && !renderedPart.participant.hideCopyButton) {\n\t\t\t\tdisposables.add(new HoverCopyButton(\n\t\t\t\t\telement,\n\t\t\t\t\t() => renderedPart.participant.getAccessibleContent(renderedPart.hoverPart),\n\t\t\t\t\tthis._clipboardService,\n\t\t\t\t\tthis._hoverService\n\t\t\t\t));\n\t\t\t}\n\t\t});\n\t\treturn disposables;\n\t}\n\n\tprivate _updateMarkdownAndColorParticipantInfo(participants: IEditorHoverParticipant<IHoverPart>[]) {\n\t\tconst markdownHoverParticipant = participants.find(p => {\n\t\t\treturn (p instanceof MarkdownHoverParticipant) && !(p instanceof InlayHintsHover);\n\t\t});\n\t\tif (markdownHoverParticipant) {\n\t\t\tthis._markdownHoverParticipant = markdownHoverParticipant as MarkdownHoverParticipant;\n\t\t}\n\t\tthis._colorHoverParticipant = participants.find(p => p instanceof HoverColorPickerParticipant);\n\t}\n\n\tpublic focusHoverPartWithIndex(index: number): void {\n\t\tif (index < 0 || index >= this._renderedParts.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._renderedParts[index].hoverElement.focus();\n\t}\n\n\tpublic async updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): Promise<void> {\n\t\tif (!this._markdownHoverParticipant) {\n\t\t\treturn;\n\t\t}\n\t\tlet rangeOfIndicesToUpdate: IOffsetRange;\n\t\tif (index >= 0) {\n\t\t\trangeOfIndicesToUpdate = { start: index, endExclusive: index + 1 };\n\t\t} else {\n\t\t\trangeOfIndicesToUpdate = this._findRangeOfMarkdownHoverParts(this._markdownHoverParticipant);\n\t\t}\n\t\tfor (let i = rangeOfIndicesToUpdate.start; i < rangeOfIndicesToUpdate.endExclusive; i++) {\n\t\t\tconst normalizedMarkdownHoverIndex = this._normalizedIndexToMarkdownHoverIndexRange(this._markdownHoverParticipant, i);\n\t\t\tif (normalizedMarkdownHoverIndex === undefined) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst renderedPart = await this._markdownHoverParticipant.updateMarkdownHoverVerbosityLevel(action, normalizedMarkdownHoverIndex);\n\t\t\tif (!renderedPart) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._renderedParts[i] = {\n\t\t\t\ttype: 'hoverPart',\n\t\t\t\tparticipant: this._markdownHoverParticipant,\n\t\t\t\thoverPart: renderedPart.hoverPart,\n\t\t\t\thoverElement: renderedPart.hoverElement,\n\t\t\t};\n\t\t}\n\t\tif (focus) {\n\t\t\tif (index >= 0) {\n\t\t\t\tthis.focusHoverPartWithIndex(index);\n\t\t\t} else {\n\t\t\t\tthis._context.focus();\n\t\t\t}\n\t\t}\n\t\tthis._context.onContentsChanged();\n\t}\n\n\tpublic isColorPickerVisible(): boolean {\n\t\treturn this._colorHoverParticipant?.isColorPickerVisible() ?? false;\n\t}\n\n\tprivate _normalizedIndexToMarkdownHoverIndexRange(markdownHoverParticipant: MarkdownHoverParticipant, index: number): number | undefined {\n\t\tconst renderedPart = this._renderedParts[index];\n\t\tif (!renderedPart || renderedPart.type !== 'hoverPart') {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst isHoverPartMarkdownHover = renderedPart.participant === markdownHoverParticipant;\n\t\tif (!isHoverPartMarkdownHover) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst firstIndexOfMarkdownHovers = this._renderedParts.findIndex(renderedPart =>\n\t\t\trenderedPart.type === 'hoverPart'\n\t\t\t&& renderedPart.participant === markdownHoverParticipant\n\t\t);\n\t\tif (firstIndexOfMarkdownHovers === -1) {\n\t\t\tthrow new BugIndicatingError();\n\t\t}\n\t\treturn index - firstIndexOfMarkdownHovers;\n\t}\n\n\tprivate _findRangeOfMarkdownHoverParts(markdownHoverParticipant: MarkdownHoverParticipant): IOffsetRange {\n\t\tconst copiedRenderedParts = this._renderedParts.slice();\n\t\tconst firstIndexOfMarkdownHovers = copiedRenderedParts.findIndex(renderedPart => renderedPart.type === 'hoverPart' && renderedPart.participant === markdownHoverParticipant);\n\t\tconst inversedLastIndexOfMarkdownHovers = copiedRenderedParts.reverse().findIndex(renderedPart => renderedPart.type === 'hoverPart' && renderedPart.participant === markdownHoverParticipant);\n\t\tconst lastIndexOfMarkdownHovers = inversedLastIndexOfMarkdownHovers >= 0 ? copiedRenderedParts.length - inversedLastIndexOfMarkdownHovers : inversedLastIndexOfMarkdownHovers;\n\t\treturn { start: firstIndexOfMarkdownHovers, endExclusive: lastIndexOfMarkdownHovers + 1 };\n\t}\n\n\tpublic get domNode(): DocumentFragment {\n\t\treturn this._fragment;\n\t}\n\n\tpublic get domNodeHasChildren(): boolean {\n\t\treturn this._fragment.hasChildNodes();\n\t}\n\n\tpublic get focusedHoverPartIndex(): number {\n\t\treturn this._focusedHoverPartIndex;\n\t}\n\n\tpublic get hoverPartsCount(): number {\n\t\treturn this._renderedParts.length;\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/contrib/hover/browser/contentHoverRendered.ts","vs/editor/contrib/hover/browser/contentHoverRendered.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;;AAEhG,OAAO,EAA4G,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC/J,OAAO,EAAE,UAAU,EAAE,eAAe,EAAe,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC9G,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAEtD,OAAO,KAAK,GAAG,MAAM,iCAAiC,CAAC;AAEvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,2EAA2E,CAAC;AACxH,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9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,EAAE,CAAC;IAC3F,CAAC;IAED,IAAW,OAAO;QACjB,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAED,IAAW,kBAAkB;QAC5B,OAAO,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;IACvC,CAAC;IAED,IAAW,qBAAqB;QAC/B,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACpC,CAAC;IAED,IAAW,eAAe;QACzB,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;IACnC,CAAC;;AAjOI,yBAAyB;IAoB5B,WAAA,kBAAkB,CAAA;IAClB,WAAA,aAAa,CAAA;IACb,WAAA,iBAAiB,CAAA;GAtBd,yBAAyB,CAkO9B","file":"contentHoverRendered.js","sourceRoot":"file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src","sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IEditorHoverContext, IEditorHoverParticipant, IEditorHoverRenderContext, IHoverPart, IRenderedHoverParts, RenderedHoverParts } from './hoverTypes.js';\nimport { Disposable, DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { EditorHoverStatusBar } from './contentHoverStatusBar.js';\nimport { HoverStartSource } from './hoverOperation.js';\nimport { HoverCopyButton } from './hoverCopyButton.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { ContentHoverResult } from './contentHoverTypes.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { HoverVerbosityAction } from '../../../common/languages.js';\nimport { MarkdownHoverParticipant } from './markdownHoverParticipant.js';\nimport { HoverColorPickerParticipant } from '../../colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js';\nimport { InlayHintsHover } from '../../inlayHints/browser/inlayHintsHover.js';\nimport { BugIndicatingError } from '../../../../base/common/errors.js';\nimport { HoverAction } from '../../../../base/browser/ui/hover/hoverWidget.js';\nimport { IHoverService } from '../../../../platform/hover/browser/hover.js';\nimport { IOffsetRange } from '../../../common/core/ranges/offsetRange.js';\nimport { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.js';\n\nexport class RenderedContentHover extends Disposable {\n\n\tpublic closestMouseDistance: number | undefined;\n\tpublic initialMousePosX: number | undefined;\n\tpublic initialMousePosY: number | undefined;\n\n\tpublic readonly showAtPosition: Position;\n\tpublic readonly showAtSecondaryPosition: Position;\n\tpublic readonly shouldFocus: boolean;\n\tpublic readonly source: HoverStartSource;\n\tpublic readonly shouldAppearBeforeContent: boolean;\n\n\tprivate readonly _renderedHoverParts: RenderedContentHoverParts;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\thoverResult: ContentHoverResult,\n\t\tparticipants: IEditorHoverParticipant<IHoverPart>[],\n\t\tcontext: IEditorHoverContext,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IHoverService hoverService: IHoverService,\n\t\t@IClipboardService clipboardService: IClipboardService\n\t) {\n\t\tsuper();\n\t\tconst parts = hoverResult.hoverParts;\n\t\tthis._renderedHoverParts = this._register(new RenderedContentHoverParts(\n\t\t\teditor,\n\t\t\tparticipants,\n\t\t\tparts,\n\t\t\tcontext,\n\t\t\tkeybindingService,\n\t\t\thoverService,\n\t\t\tclipboardService\n\t\t));\n\t\tconst contentHoverComputerOptions = hoverResult.options;\n\t\tconst anchor = contentHoverComputerOptions.anchor;\n\t\tconst { showAtPosition, showAtSecondaryPosition } = RenderedContentHover.computeHoverPositions(editor, anchor.range, parts);\n\t\tthis.shouldAppearBeforeContent = parts.some(m => m.isBeforeContent);\n\t\tthis.showAtPosition = showAtPosition;\n\t\tthis.showAtSecondaryPosition = showAtSecondaryPosition;\n\t\tthis.initialMousePosX = anchor.initialMousePosX;\n\t\tthis.initialMousePosY = anchor.initialMousePosY;\n\t\tthis.shouldFocus = contentHoverComputerOptions.shouldFocus;\n\t\tthis.source = contentHoverComputerOptions.source;\n\t}\n\n\tpublic get domNode(): DocumentFragment {\n\t\treturn this._renderedHoverParts.domNode;\n\t}\n\n\tpublic get domNodeHasChildren(): boolean {\n\t\treturn this._renderedHoverParts.domNodeHasChildren;\n\t}\n\n\tpublic get focusedHoverPartIndex(): number {\n\t\treturn this._renderedHoverParts.focusedHoverPartIndex;\n\t}\n\n\tpublic get hoverPartsCount(): number {\n\t\treturn this._renderedHoverParts.hoverPartsCount;\n\t}\n\n\tpublic focusHoverPartWithIndex(index: number): void {\n\t\tthis._renderedHoverParts.focusHoverPartWithIndex(index);\n\t}\n\n\tpublic async updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): Promise<void> {\n\t\tthis._renderedHoverParts.updateHoverVerbosityLevel(action, index, focus);\n\t}\n\n\tpublic isColorPickerVisible(): boolean {\n\t\treturn this._renderedHoverParts.isColorPickerVisible();\n\t}\n\n\tpublic static computeHoverPositions(editor: ICodeEditor, anchorRange: Range, hoverParts: IHoverPart[]): { showAtPosition: Position; showAtSecondaryPosition: Position } {\n\n\t\tlet startColumnBoundary = 1;\n\t\tif (editor.hasModel()) {\n\t\t\t// Ensure the range is on the current view line\n\t\t\tconst viewModel = editor._getViewModel();\n\t\t\tconst coordinatesConverter = viewModel.coordinatesConverter;\n\t\t\tconst anchorViewRange = coordinatesConverter.convertModelRangeToViewRange(anchorRange);\n\t\t\tconst anchorViewMinColumn = viewModel.getLineMinColumn(anchorViewRange.startLineNumber);\n\t\t\tconst anchorViewRangeStart = new Position(anchorViewRange.startLineNumber, anchorViewMinColumn);\n\t\t\tstartColumnBoundary = coordinatesConverter.convertViewPositionToModelPosition(anchorViewRangeStart).column;\n\t\t}\n\n\t\t// The anchor range is always on a single line\n\t\tconst anchorStartLineNumber = anchorRange.startLineNumber;\n\t\tlet secondaryPositionColumn = anchorRange.startColumn;\n\t\tlet forceShowAtRange: Range | undefined;\n\n\t\tfor (const hoverPart of hoverParts) {\n\t\t\tconst hoverPartRange = hoverPart.range;\n\t\t\tconst hoverPartRangeOnAnchorStartLine = hoverPartRange.startLineNumber === anchorStartLineNumber;\n\t\t\tconst hoverPartRangeOnAnchorEndLine = hoverPartRange.endLineNumber === anchorStartLineNumber;\n\t\t\tconst hoverPartRangeIsOnAnchorLine = hoverPartRangeOnAnchorStartLine && hoverPartRangeOnAnchorEndLine;\n\t\t\tif (hoverPartRangeIsOnAnchorLine) {\n\t\t\t\t// this message has a range that is completely sitting on the line of the anchor\n\t\t\t\tconst hoverPartStartColumn = hoverPartRange.startColumn;\n\t\t\t\tconst minSecondaryPositionColumn = Math.min(secondaryPositionColumn, hoverPartStartColumn);\n\t\t\t\tsecondaryPositionColumn = Math.max(minSecondaryPositionColumn, startColumnBoundary);\n\t\t\t}\n\t\t\tif (hoverPart.forceShowAtRange) {\n\t\t\t\tforceShowAtRange = hoverPartRange;\n\t\t\t}\n\t\t}\n\n\t\tlet showAtPosition: Position;\n\t\tlet showAtSecondaryPosition: Position;\n\t\tif (forceShowAtRange) {\n\t\t\tconst forceShowAtPosition = forceShowAtRange.getStartPosition();\n\t\t\tshowAtPosition = forceShowAtPosition;\n\t\t\tshowAtSecondaryPosition = forceShowAtPosition;\n\t\t} else {\n\t\t\tshowAtPosition = anchorRange.getStartPosition();\n\t\t\tshowAtSecondaryPosition = new Position(anchorStartLineNumber, secondaryPositionColumn);\n\t\t}\n\t\treturn {\n\t\t\tshowAtPosition,\n\t\t\tshowAtSecondaryPosition,\n\t\t};\n\t}\n}\n\ninterface IRenderedContentHoverPart {\n\t/**\n\t * Type of rendered part\n\t */\n\ttype: 'hoverPart';\n\t/**\n\t * Participant of the rendered hover part\n\t */\n\tparticipant: IEditorHoverParticipant<IHoverPart>;\n\t/**\n\t * The rendered hover part\n\t */\n\thoverPart: IHoverPart;\n\t/**\n\t * The HTML element containing the hover status bar.\n\t */\n\thoverElement: HTMLElement;\n}\n\ninterface IRenderedContentStatusBar {\n\t/**\n\t * Type of rendered part\n\t */\n\ttype: 'statusBar';\n\t/**\n\t * The HTML element containing the hover status bar.\n\t */\n\thoverElement: HTMLElement;\n\t/**\n\t * The actions of the hover status bar.\n\t */\n\tactions: HoverAction[];\n}\n\ntype IRenderedContentHoverPartOrStatusBar = IRenderedContentHoverPart | IRenderedContentStatusBar;\n\nclass RenderedStatusBar implements IDisposable {\n\n\tconstructor(fragment: DocumentFragment, private readonly _statusBar: EditorHoverStatusBar) {\n\t\tfragment.appendChild(this._statusBar.hoverElement);\n\t}\n\n\tget hoverElement(): HTMLElement {\n\t\treturn this._statusBar.hoverElement;\n\t}\n\n\tget actions(): HoverAction[] {\n\t\treturn this._statusBar.actions;\n\t}\n\n\tdispose() {\n\t\tthis._statusBar.dispose();\n\t}\n}\n\nclass RenderedContentHoverParts extends Disposable {\n\n\tprivate static readonly _DECORATION_OPTIONS = ModelDecorationOptions.register({\n\t\tdescription: 'content-hover-highlight',\n\t\tclassName: 'hoverHighlight'\n\t});\n\n\tprivate readonly _renderedParts: IRenderedContentHoverPartOrStatusBar[] = [];\n\tprivate readonly _fragment: DocumentFragment;\n\tprivate readonly _context: IEditorHoverContext;\n\n\tprivate _markdownHoverParticipant: MarkdownHoverParticipant | undefined;\n\tprivate _colorHoverParticipant: HoverColorPickerParticipant | undefined;\n\tprivate _focusedHoverPartIndex: number = -1;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\tparticipants: IEditorHoverParticipant<IHoverPart>[],\n\t\thoverParts: IHoverPart[],\n\t\tcontext: IEditorHoverContext,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IHoverService private readonly _hoverService: IHoverService,\n\t\t@IClipboardService private readonly _clipboardService: IClipboardService\n\t) {\n\t\tsuper();\n\t\tthis._context = context;\n\t\tthis._fragment = document.createDocumentFragment();\n\t\tthis._register(this._renderParts(participants, hoverParts, context, keybindingService, this._hoverService));\n\t\tthis._register(this._registerListenersOnRenderedParts());\n\t\tthis._register(this._createEditorDecorations(editor, hoverParts));\n\t\tthis._updateMarkdownAndColorParticipantInfo(participants);\n\t}\n\n\tprivate _createEditorDecorations(editor: ICodeEditor, hoverParts: IHoverPart[]): IDisposable {\n\t\tif (hoverParts.length === 0) {\n\t\t\treturn Disposable.None;\n\t\t}\n\t\tlet highlightRange = hoverParts[0].range;\n\t\tfor (const hoverPart of hoverParts) {\n\t\t\tconst hoverPartRange = hoverPart.range;\n\t\t\thighlightRange = Range.plusRange(highlightRange, hoverPartRange);\n\t\t}\n\t\tconst highlightDecoration = editor.createDecorationsCollection();\n\t\thighlightDecoration.set([{\n\t\t\trange: highlightRange,\n\t\t\toptions: RenderedContentHoverParts._DECORATION_OPTIONS\n\t\t}]);\n\t\treturn toDisposable(() => {\n\t\t\thighlightDecoration.clear();\n\t\t});\n\t}\n\n\tprivate _renderParts(participants: IEditorHoverParticipant<IHoverPart>[], hoverParts: IHoverPart[], hoverContext: IEditorHoverContext, keybindingService: IKeybindingService, hoverService: IHoverService): IDisposable {\n\t\tconst statusBar = new EditorHoverStatusBar(keybindingService, hoverService);\n\t\tconst hoverRenderingContext: IEditorHoverRenderContext = {\n\t\t\tfragment: this._fragment,\n\t\t\tstatusBar,\n\t\t\t...hoverContext\n\t\t};\n\t\tconst disposables = new DisposableStore();\n\t\tdisposables.add(statusBar);\n\t\tfor (const participant of participants) {\n\t\t\tconst renderedHoverParts = this._renderHoverPartsForParticipant(hoverParts, participant, hoverRenderingContext);\n\t\t\tdisposables.add(renderedHoverParts);\n\t\t\tfor (const renderedHoverPart of renderedHoverParts.renderedHoverParts) {\n\t\t\t\tthis._renderedParts.push({\n\t\t\t\t\ttype: 'hoverPart',\n\t\t\t\t\tparticipant,\n\t\t\t\t\thoverPart: renderedHoverPart.hoverPart,\n\t\t\t\t\thoverElement: renderedHoverPart.hoverElement,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tconst renderedStatusBar = this._renderStatusBar(this._fragment, statusBar);\n\t\tif (renderedStatusBar) {\n\t\t\tdisposables.add(renderedStatusBar);\n\t\t\tthis._renderedParts.push({\n\t\t\t\ttype: 'statusBar',\n\t\t\t\thoverElement: renderedStatusBar.hoverElement,\n\t\t\t\tactions: renderedStatusBar.actions,\n\t\t\t});\n\t\t}\n\t\treturn disposables;\n\t}\n\n\tprivate _renderHoverPartsForParticipant(hoverParts: IHoverPart[], participant: IEditorHoverParticipant<IHoverPart>, hoverRenderingContext: IEditorHoverRenderContext): IRenderedHoverParts<IHoverPart> {\n\t\tconst hoverPartsForParticipant = hoverParts.filter(hoverPart => hoverPart.owner === participant);\n\t\tconst hasHoverPartsForParticipant = hoverPartsForParticipant.length > 0;\n\t\tif (!hasHoverPartsForParticipant) {\n\t\t\treturn new RenderedHoverParts([]);\n\t\t}\n\t\treturn participant.renderHoverParts(hoverRenderingContext, hoverPartsForParticipant);\n\t}\n\n\tprivate _renderStatusBar(fragment: DocumentFragment, statusBar: EditorHoverStatusBar): RenderedStatusBar | undefined {\n\t\tif (!statusBar.hasContent) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn new RenderedStatusBar(fragment, statusBar);\n\t}\n\n\tprivate _registerListenersOnRenderedParts(): IDisposable {\n\t\tconst disposables = new DisposableStore();\n\t\tthis._renderedParts.forEach((renderedPart: IRenderedContentHoverPartOrStatusBar, index: number) => {\n\t\t\tconst element = renderedPart.hoverElement;\n\t\t\telement.tabIndex = 0;\n\t\t\tdisposables.add(dom.addDisposableListener(element, dom.EventType.FOCUS_IN, (event: Event) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis._focusedHoverPartIndex = index;\n\t\t\t}));\n\t\t\tdisposables.add(dom.addDisposableListener(element, dom.EventType.FOCUS_OUT, (event: Event) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis._focusedHoverPartIndex = -1;\n\t\t\t}));\n\t\t\t// Add copy button for marker hovers\n\t\t\tif (renderedPart.type === 'hoverPart' && !renderedPart.participant.hideCopyButton) {\n\t\t\t\tdisposables.add(new HoverCopyButton(\n\t\t\t\t\telement,\n\t\t\t\t\t() => renderedPart.participant.getAccessibleContent(renderedPart.hoverPart),\n\t\t\t\t\tthis._clipboardService,\n\t\t\t\t\tthis._hoverService\n\t\t\t\t));\n\t\t\t}\n\t\t});\n\t\treturn disposables;\n\t}\n\n\tprivate _updateMarkdownAndColorParticipantInfo(participants: IEditorHoverParticipant<IHoverPart>[]) {\n\t\tconst markdownHoverParticipant = participants.find(p => {\n\t\t\treturn (p instanceof MarkdownHoverParticipant) && !(p instanceof InlayHintsHover);\n\t\t});\n\t\tif (markdownHoverParticipant) {\n\t\t\tthis._markdownHoverParticipant = markdownHoverParticipant as MarkdownHoverParticipant;\n\t\t}\n\t\tthis._colorHoverParticipant = participants.find(p => p instanceof HoverColorPickerParticipant);\n\t}\n\n\tpublic focusHoverPartWithIndex(index: number): void {\n\t\tif (index < 0 || index >= this._renderedParts.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._renderedParts[index].hoverElement.focus();\n\t}\n\n\tpublic async updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): Promise<void> {\n\t\tif (!this._markdownHoverParticipant) {\n\t\t\treturn;\n\t\t}\n\t\tlet rangeOfIndicesToUpdate: IOffsetRange;\n\t\tif (index >= 0) {\n\t\t\trangeOfIndicesToUpdate = { start: index, endExclusive: index + 1 };\n\t\t} else {\n\t\t\trangeOfIndicesToUpdate = this._findRangeOfMarkdownHoverParts(this._markdownHoverParticipant);\n\t\t}\n\t\tfor (let i = rangeOfIndicesToUpdate.start; i < rangeOfIndicesToUpdate.endExclusive; i++) {\n\t\t\tconst normalizedMarkdownHoverIndex = this._normalizedIndexToMarkdownHoverIndexRange(this._markdownHoverParticipant, i);\n\t\t\tif (normalizedMarkdownHoverIndex === undefined) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst renderedPart = await this._markdownHoverParticipant.updateMarkdownHoverVerbosityLevel(action, normalizedMarkdownHoverIndex);\n\t\t\tif (!renderedPart) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._renderedParts[i] = {\n\t\t\t\ttype: 'hoverPart',\n\t\t\t\tparticipant: this._markdownHoverParticipant,\n\t\t\t\thoverPart: renderedPart.hoverPart,\n\t\t\t\thoverElement: renderedPart.hoverElement,\n\t\t\t};\n\t\t}\n\t\tif (focus) {\n\t\t\tif (index >= 0) {\n\t\t\t\tthis.focusHoverPartWithIndex(index);\n\t\t\t} else {\n\t\t\t\tthis._context.focus();\n\t\t\t}\n\t\t}\n\t\tthis._context.onContentsChanged();\n\t}\n\n\tpublic isColorPickerVisible(): boolean {\n\t\treturn this._colorHoverParticipant?.isColorPickerVisible() ?? false;\n\t}\n\n\tprivate _normalizedIndexToMarkdownHoverIndexRange(markdownHoverParticipant: MarkdownHoverParticipant, index: number): number | undefined {\n\t\tconst renderedPart = this._renderedParts[index];\n\t\tif (!renderedPart || renderedPart.type !== 'hoverPart') {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst isHoverPartMarkdownHover = renderedPart.participant === markdownHoverParticipant;\n\t\tif (!isHoverPartMarkdownHover) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst firstIndexOfMarkdownHovers = this._renderedParts.findIndex(renderedPart =>\n\t\t\trenderedPart.type === 'hoverPart'\n\t\t\t&& renderedPart.participant === markdownHoverParticipant\n\t\t);\n\t\tif (firstIndexOfMarkdownHovers === -1) {\n\t\t\tthrow new BugIndicatingError();\n\t\t}\n\t\treturn index - firstIndexOfMarkdownHovers;\n\t}\n\n\tprivate _findRangeOfMarkdownHoverParts(markdownHoverParticipant: MarkdownHoverParticipant): IOffsetRange {\n\t\tconst copiedRenderedParts = this._renderedParts.slice();\n\t\tconst firstIndexOfMarkdownHovers = copiedRenderedParts.findIndex(renderedPart => renderedPart.type === 'hoverPart' && renderedPart.participant === markdownHoverParticipant);\n\t\tconst inversedLastIndexOfMarkdownHovers = copiedRenderedParts.reverse().findIndex(renderedPart => renderedPart.type === 'hoverPart' && renderedPart.participant === markdownHoverParticipant);\n\t\tconst lastIndexOfMarkdownHovers = inversedLastIndexOfMarkdownHovers >= 0 ? copiedRenderedParts.length - inversedLastIndexOfMarkdownHovers : inversedLastIndexOfMarkdownHovers;\n\t\treturn { start: firstIndexOfMarkdownHovers, endExclusive: lastIndexOfMarkdownHovers + 1 };\n\t}\n\n\tpublic get domNode(): DocumentFragment {\n\t\treturn this._fragment;\n\t}\n\n\tpublic get domNodeHasChildren(): boolean {\n\t\treturn this._fragment.hasChildNodes();\n\t}\n\n\tpublic get focusedHoverPartIndex(): number {\n\t\treturn this._focusedHoverPartIndex;\n\t}\n\n\tpublic get hoverPartsCount(): number {\n\t\treturn this._renderedParts.length;\n\t}\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IEditorHoverContext, IEditorHoverParticipant, IEditorHoverRenderContext, IHoverPart, IRenderedHoverParts, RenderedHoverParts } from './hoverTypes.js';\nimport { Disposable, DisposableStore, IDisposable, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { EditorHoverStatusBar } from './contentHoverStatusBar.js';\nimport { HoverStartSource } from './hoverOperation.js';\nimport { HoverCopyButton } from './hoverCopyButton.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { ModelDecorationOptions } from '../../../common/model/textModel.js';\nimport { ICodeEditor } from '../../../browser/editorBrowser.js';\nimport { Position } from '../../../common/core/position.js';\nimport { Range } from '../../../common/core/range.js';\nimport { ContentHoverResult } from './contentHoverTypes.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { HoverVerbosityAction } from '../../../common/languages.js';\nimport { MarkdownHoverParticipant } from './markdownHoverParticipant.js';\nimport { HoverColorPickerParticipant } from '../../colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js';\nimport { InlayHintsHover } from '../../inlayHints/browser/inlayHintsHover.js';\nimport { BugIndicatingError } from '../../../../base/common/errors.js';\nimport { HoverAction } from '../../../../base/browser/ui/hover/hoverWidget.js';\nimport { IHoverService } from '../../../../platform/hover/browser/hover.js';\nimport { IOffsetRange } from '../../../common/core/ranges/offsetRange.js';\nimport { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.js';\n\nexport class RenderedContentHover extends Disposable {\n\n\tpublic closestMouseDistance: number | undefined;\n\tpublic initialMousePosX: number | undefined;\n\tpublic initialMousePosY: number | undefined;\n\n\tpublic readonly showAtPosition: Position;\n\tpublic readonly showAtSecondaryPosition: Position;\n\tpublic readonly shouldFocus: boolean;\n\tpublic readonly source: HoverStartSource;\n\tpublic readonly shouldAppearBeforeContent: boolean;\n\n\tprivate readonly _renderedHoverParts: RenderedContentHoverParts;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\thoverResult: ContentHoverResult,\n\t\tparticipants: IEditorHoverParticipant<IHoverPart>[],\n\t\tcontext: IEditorHoverContext,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IHoverService hoverService: IHoverService,\n\t\t@IClipboardService clipboardService: IClipboardService\n\t) {\n\t\tsuper();\n\t\tconst parts = hoverResult.hoverParts;\n\t\tthis._renderedHoverParts = this._register(new RenderedContentHoverParts(\n\t\t\teditor,\n\t\t\tparticipants,\n\t\t\tparts,\n\t\t\tcontext,\n\t\t\tkeybindingService,\n\t\t\thoverService,\n\t\t\tclipboardService\n\t\t));\n\t\tconst contentHoverComputerOptions = hoverResult.options;\n\t\tconst anchor = contentHoverComputerOptions.anchor;\n\t\tconst { showAtPosition, showAtSecondaryPosition } = RenderedContentHover.computeHoverPositions(editor, anchor.range, parts);\n\t\tthis.shouldAppearBeforeContent = parts.some(m => m.isBeforeContent);\n\t\tthis.showAtPosition = showAtPosition;\n\t\tthis.showAtSecondaryPosition = showAtSecondaryPosition;\n\t\tthis.initialMousePosX = anchor.initialMousePosX;\n\t\tthis.initialMousePosY = anchor.initialMousePosY;\n\t\tthis.shouldFocus = contentHoverComputerOptions.shouldFocus;\n\t\tthis.source = contentHoverComputerOptions.source;\n\t}\n\n\tpublic get domNode(): DocumentFragment {\n\t\treturn this._renderedHoverParts.domNode;\n\t}\n\n\tpublic get domNodeHasChildren(): boolean {\n\t\treturn this._renderedHoverParts.domNodeHasChildren;\n\t}\n\n\tpublic get focusedHoverPartIndex(): number {\n\t\treturn this._renderedHoverParts.focusedHoverPartIndex;\n\t}\n\n\tpublic get hoverPartsCount(): number {\n\t\treturn this._renderedHoverParts.hoverPartsCount;\n\t}\n\n\tpublic focusHoverPartWithIndex(index: number): void {\n\t\tthis._renderedHoverParts.focusHoverPartWithIndex(index);\n\t}\n\n\tpublic async updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): Promise<void> {\n\t\tthis._renderedHoverParts.updateHoverVerbosityLevel(action, index, focus);\n\t}\n\n\tpublic isColorPickerVisible(): boolean {\n\t\treturn this._renderedHoverParts.isColorPickerVisible();\n\t}\n\n\tpublic static computeHoverPositions(editor: ICodeEditor, anchorRange: Range, hoverParts: IHoverPart[]): { showAtPosition: Position; showAtSecondaryPosition: Position } {\n\n\t\tlet startColumnBoundary = 1;\n\t\tif (editor.hasModel()) {\n\t\t\t// Ensure the range is on the current view line\n\t\t\tconst viewModel = editor._getViewModel();\n\t\t\tconst coordinatesConverter = viewModel.coordinatesConverter;\n\t\t\tconst anchorViewRange = coordinatesConverter.convertModelRangeToViewRange(anchorRange);\n\t\t\tconst anchorViewMinColumn = viewModel.getLineMinColumn(anchorViewRange.startLineNumber);\n\t\t\tconst anchorViewRangeStart = new Position(anchorViewRange.startLineNumber, anchorViewMinColumn);\n\t\t\tstartColumnBoundary = coordinatesConverter.convertViewPositionToModelPosition(anchorViewRangeStart).column;\n\t\t}\n\n\t\t// The anchor range is always on a single line\n\t\tconst anchorStartLineNumber = anchorRange.startLineNumber;\n\t\tlet secondaryPositionColumn = anchorRange.startColumn;\n\t\tlet forceShowAtRange: Range | undefined;\n\n\t\tfor (const hoverPart of hoverParts) {\n\t\t\tconst hoverPartRange = hoverPart.range;\n\t\t\tconst hoverPartRangeOnAnchorStartLine = hoverPartRange.startLineNumber === anchorStartLineNumber;\n\t\t\tconst hoverPartRangeOnAnchorEndLine = hoverPartRange.endLineNumber === anchorStartLineNumber;\n\t\t\tconst hoverPartRangeIsOnAnchorLine = hoverPartRangeOnAnchorStartLine && hoverPartRangeOnAnchorEndLine;\n\t\t\tif (hoverPartRangeIsOnAnchorLine) {\n\t\t\t\t// this message has a range that is completely sitting on the line of the anchor\n\t\t\t\tconst hoverPartStartColumn = hoverPartRange.startColumn;\n\t\t\t\tconst minSecondaryPositionColumn = Math.min(secondaryPositionColumn, hoverPartStartColumn);\n\t\t\t\tsecondaryPositionColumn = Math.max(minSecondaryPositionColumn, startColumnBoundary);\n\t\t\t}\n\t\t\tif (hoverPart.forceShowAtRange) {\n\t\t\t\tforceShowAtRange = hoverPartRange;\n\t\t\t}\n\t\t}\n\n\t\tlet showAtPosition: Position;\n\t\tlet showAtSecondaryPosition: Position;\n\t\tif (forceShowAtRange) {\n\t\t\tconst forceShowAtPosition = forceShowAtRange.getStartPosition();\n\t\t\tshowAtPosition = forceShowAtPosition;\n\t\t\tshowAtSecondaryPosition = forceShowAtPosition;\n\t\t} else {\n\t\t\tshowAtPosition = anchorRange.getStartPosition();\n\t\t\tshowAtSecondaryPosition = new Position(anchorStartLineNumber, secondaryPositionColumn);\n\t\t}\n\t\treturn {\n\t\t\tshowAtPosition,\n\t\t\tshowAtSecondaryPosition,\n\t\t};\n\t}\n}\n\ninterface IRenderedContentHoverPart {\n\t/**\n\t * Type of rendered part\n\t */\n\ttype: 'hoverPart';\n\t/**\n\t * Participant of the rendered hover part\n\t */\n\tparticipant: IEditorHoverParticipant<IHoverPart>;\n\t/**\n\t * The rendered hover part\n\t */\n\thoverPart: IHoverPart;\n\t/**\n\t * The HTML element containing the hover status bar.\n\t */\n\thoverElement: HTMLElement;\n}\n\ninterface IRenderedContentStatusBar {\n\t/**\n\t * Type of rendered part\n\t */\n\ttype: 'statusBar';\n\t/**\n\t * The HTML element containing the hover status bar.\n\t */\n\thoverElement: HTMLElement;\n\t/**\n\t * The actions of the hover status bar.\n\t */\n\tactions: HoverAction[];\n}\n\ntype IRenderedContentHoverPartOrStatusBar = IRenderedContentHoverPart | IRenderedContentStatusBar;\n\nclass RenderedStatusBar implements IDisposable {\n\n\tconstructor(fragment: DocumentFragment, private readonly _statusBar: EditorHoverStatusBar) {\n\t\tfragment.appendChild(this._statusBar.hoverElement);\n\t}\n\n\tget hoverElement(): HTMLElement {\n\t\treturn this._statusBar.hoverElement;\n\t}\n\n\tget actions(): HoverAction[] {\n\t\treturn this._statusBar.actions;\n\t}\n\n\tdispose() {\n\t\tthis._statusBar.dispose();\n\t}\n}\n\nclass RenderedContentHoverParts extends Disposable {\n\n\tprivate static readonly _DECORATION_OPTIONS = ModelDecorationOptions.register({\n\t\tdescription: 'content-hover-highlight',\n\t\tclassName: 'hoverHighlight'\n\t});\n\n\tprivate readonly _renderedParts: IRenderedContentHoverPartOrStatusBar[] = [];\n\tprivate readonly _fragment: DocumentFragment;\n\tprivate readonly _context: IEditorHoverContext;\n\n\tprivate _markdownHoverParticipant: MarkdownHoverParticipant | undefined;\n\tprivate _colorHoverParticipant: HoverColorPickerParticipant | undefined;\n\tprivate _focusedHoverPartIndex: number = -1;\n\n\tconstructor(\n\t\teditor: ICodeEditor,\n\t\tparticipants: IEditorHoverParticipant<IHoverPart>[],\n\t\thoverParts: IHoverPart[],\n\t\tcontext: IEditorHoverContext,\n\t\t@IKeybindingService keybindingService: IKeybindingService,\n\t\t@IHoverService private readonly _hoverService: IHoverService,\n\t\t@IClipboardService private readonly _clipboardService: IClipboardService\n\t) {\n\t\tsuper();\n\t\tthis._context = context;\n\t\tthis._fragment = document.createDocumentFragment();\n\t\tthis._register(this._renderParts(participants, hoverParts, context, keybindingService, this._hoverService));\n\t\tthis._register(this._registerListenersOnRenderedParts());\n\t\tthis._register(this._createEditorDecorations(editor, hoverParts));\n\t\tthis._updateMarkdownAndColorParticipantInfo(participants);\n\t}\n\n\tprivate _createEditorDecorations(editor: ICodeEditor, hoverParts: IHoverPart[]): IDisposable {\n\t\tif (hoverParts.length === 0) {\n\t\t\treturn Disposable.None;\n\t\t}\n\t\tlet highlightRange = hoverParts[0].range;\n\t\tfor (const hoverPart of hoverParts) {\n\t\t\tconst hoverPartRange = hoverPart.range;\n\t\t\thighlightRange = Range.plusRange(highlightRange, hoverPartRange);\n\t\t}\n\t\tconst highlightDecoration = editor.createDecorationsCollection();\n\t\thighlightDecoration.set([{\n\t\t\trange: highlightRange,\n\t\t\toptions: RenderedContentHoverParts._DECORATION_OPTIONS\n\t\t}]);\n\t\treturn toDisposable(() => {\n\t\t\thighlightDecoration.clear();\n\t\t});\n\t}\n\n\tprivate _renderParts(participants: IEditorHoverParticipant<IHoverPart>[], hoverParts: IHoverPart[], hoverContext: IEditorHoverContext, keybindingService: IKeybindingService, hoverService: IHoverService): IDisposable {\n\t\tconst statusBar = new EditorHoverStatusBar(keybindingService, hoverService);\n\t\tconst hoverRenderingContext: IEditorHoverRenderContext = {\n\t\t\tfragment: this._fragment,\n\t\t\tstatusBar,\n\t\t\t...hoverContext\n\t\t};\n\t\tconst disposables = new DisposableStore();\n\t\tdisposables.add(statusBar);\n\t\tfor (const participant of participants) {\n\t\t\tconst renderedHoverParts = this._renderHoverPartsForParticipant(hoverParts, participant, hoverRenderingContext);\n\t\t\tdisposables.add(renderedHoverParts);\n\t\t\tfor (const renderedHoverPart of renderedHoverParts.renderedHoverParts) {\n\t\t\t\tthis._renderedParts.push({\n\t\t\t\t\ttype: 'hoverPart',\n\t\t\t\t\tparticipant,\n\t\t\t\t\thoverPart: renderedHoverPart.hoverPart,\n\t\t\t\t\thoverElement: renderedHoverPart.hoverElement,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tconst renderedStatusBar = this._renderStatusBar(this._fragment, statusBar);\n\t\tif (renderedStatusBar) {\n\t\t\tdisposables.add(renderedStatusBar);\n\t\t\tthis._renderedParts.push({\n\t\t\t\ttype: 'statusBar',\n\t\t\t\thoverElement: renderedStatusBar.hoverElement,\n\t\t\t\tactions: renderedStatusBar.actions,\n\t\t\t});\n\t\t}\n\t\treturn disposables;\n\t}\n\n\tprivate _renderHoverPartsForParticipant(hoverParts: IHoverPart[], participant: IEditorHoverParticipant<IHoverPart>, hoverRenderingContext: IEditorHoverRenderContext): IRenderedHoverParts<IHoverPart> {\n\t\tconst hoverPartsForParticipant = hoverParts.filter(hoverPart => hoverPart.owner === participant);\n\t\tconst hasHoverPartsForParticipant = hoverPartsForParticipant.length > 0;\n\t\tif (!hasHoverPartsForParticipant) {\n\t\t\treturn new RenderedHoverParts([]);\n\t\t}\n\t\treturn participant.renderHoverParts(hoverRenderingContext, hoverPartsForParticipant);\n\t}\n\n\tprivate _renderStatusBar(fragment: DocumentFragment, statusBar: EditorHoverStatusBar): RenderedStatusBar | undefined {\n\t\tif (!statusBar.hasContent) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn new RenderedStatusBar(fragment, statusBar);\n\t}\n\n\tprivate _registerListenersOnRenderedParts(): IDisposable {\n\t\tconst disposables = new DisposableStore();\n\t\tthis._renderedParts.forEach((renderedPart: IRenderedContentHoverPartOrStatusBar, index: number) => {\n\t\t\tconst element = renderedPart.hoverElement;\n\t\t\telement.tabIndex = 0;\n\t\t\tdisposables.add(dom.addDisposableListener(element, dom.EventType.FOCUS_IN, (event: Event) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis._focusedHoverPartIndex = index;\n\t\t\t}));\n\t\t\tdisposables.add(dom.addDisposableListener(element, dom.EventType.FOCUS_OUT, (event: Event) => {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tthis._focusedHoverPartIndex = -1;\n\t\t\t}));\n\t\t\t// Add copy button for marker hovers\n\t\t\tif (renderedPart.type === 'hoverPart' && !renderedPart.participant.hideCopyButton) {\n\t\t\t\tdisposables.add(new HoverCopyButton(\n\t\t\t\t\telement,\n\t\t\t\t\t() => renderedPart.participant.getAccessibleContent(renderedPart.hoverPart),\n\t\t\t\t\tthis._clipboardService,\n\t\t\t\t\tthis._hoverService\n\t\t\t\t));\n\t\t\t}\n\t\t});\n\t\treturn disposables;\n\t}\n\n\tprivate _updateMarkdownAndColorParticipantInfo(participants: IEditorHoverParticipant<IHoverPart>[]) {\n\t\tconst markdownHoverParticipant = participants.find(p => {\n\t\t\treturn (p instanceof MarkdownHoverParticipant) && !(p instanceof InlayHintsHover);\n\t\t});\n\t\tif (markdownHoverParticipant) {\n\t\t\tthis._markdownHoverParticipant = markdownHoverParticipant as MarkdownHoverParticipant;\n\t\t}\n\t\tthis._colorHoverParticipant = participants.find(p => p instanceof HoverColorPickerParticipant);\n\t}\n\n\tpublic focusHoverPartWithIndex(index: number): void {\n\t\tif (index < 0 || index >= this._renderedParts.length) {\n\t\t\treturn;\n\t\t}\n\t\tthis._renderedParts[index].hoverElement.focus();\n\t}\n\n\tpublic async updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): Promise<void> {\n\t\tif (!this._markdownHoverParticipant) {\n\t\t\treturn;\n\t\t}\n\t\tlet rangeOfIndicesToUpdate: IOffsetRange;\n\t\tif (index >= 0) {\n\t\t\trangeOfIndicesToUpdate = { start: index, endExclusive: index + 1 };\n\t\t} else {\n\t\t\trangeOfIndicesToUpdate = this._findRangeOfMarkdownHoverParts(this._markdownHoverParticipant);\n\t\t}\n\t\tfor (let i = rangeOfIndicesToUpdate.start; i < rangeOfIndicesToUpdate.endExclusive; i++) {\n\t\t\tconst normalizedMarkdownHoverIndex = this._normalizedIndexToMarkdownHoverIndexRange(this._markdownHoverParticipant, i);\n\t\t\tif (normalizedMarkdownHoverIndex === undefined) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst renderedPart = await this._markdownHoverParticipant.updateMarkdownHoverVerbosityLevel(action, normalizedMarkdownHoverIndex);\n\t\t\tif (!renderedPart) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._renderedParts[i] = {\n\t\t\t\ttype: 'hoverPart',\n\t\t\t\tparticipant: this._markdownHoverParticipant,\n\t\t\t\thoverPart: renderedPart.hoverPart,\n\t\t\t\thoverElement: renderedPart.hoverElement,\n\t\t\t};\n\t\t}\n\t\tif (focus) {\n\t\t\tif (index >= 0) {\n\t\t\t\tthis.focusHoverPartWithIndex(index);\n\t\t\t} else {\n\t\t\t\tthis._context.focus();\n\t\t\t}\n\t\t}\n\t\tthis._context.onContentsChanged();\n\t}\n\n\tpublic isColorPickerVisible(): boolean {\n\t\treturn this._colorHoverParticipant?.isColorPickerVisible() ?? false;\n\t}\n\n\tprivate _normalizedIndexToMarkdownHoverIndexRange(markdownHoverParticipant: MarkdownHoverParticipant, index: number): number | undefined {\n\t\tconst renderedPart = this._renderedParts[index];\n\t\tif (!renderedPart || renderedPart.type !== 'hoverPart') {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst isHoverPartMarkdownHover = renderedPart.participant === markdownHoverParticipant;\n\t\tif (!isHoverPartMarkdownHover) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst firstIndexOfMarkdownHovers = this._renderedParts.findIndex(renderedPart =>\n\t\t\trenderedPart.type === 'hoverPart'\n\t\t\t&& renderedPart.participant === markdownHoverParticipant\n\t\t);\n\t\tif (firstIndexOfMarkdownHovers === -1) {\n\t\t\tthrow new BugIndicatingError();\n\t\t}\n\t\treturn index - firstIndexOfMarkdownHovers;\n\t}\n\n\tprivate _findRangeOfMarkdownHoverParts(markdownHoverParticipant: MarkdownHoverParticipant): IOffsetRange {\n\t\tconst copiedRenderedParts = this._renderedParts.slice();\n\t\tconst firstIndexOfMarkdownHovers = copiedRenderedParts.findIndex(renderedPart => renderedPart.type === 'hoverPart' && renderedPart.participant === markdownHoverParticipant);\n\t\tconst inversedLastIndexOfMarkdownHovers = copiedRenderedParts.reverse().findIndex(renderedPart => renderedPart.type === 'hoverPart' && renderedPart.participant === markdownHoverParticipant);\n\t\tconst lastIndexOfMarkdownHovers = inversedLastIndexOfMarkdownHovers >= 0 ? copiedRenderedParts.length - inversedLastIndexOfMarkdownHovers : inversedLastIndexOfMarkdownHovers;\n\t\treturn { start: firstIndexOfMarkdownHovers, endExclusive: lastIndexOfMarkdownHovers + 1 };\n\t}\n\n\tpublic get domNode(): DocumentFragment {\n\t\treturn this._fragment;\n\t}\n\n\tpublic get domNodeHasChildren(): boolean {\n\t\treturn this._fragment.hasChildNodes();\n\t}\n\n\tpublic get focusedHoverPartIndex(): number {\n\t\treturn this._focusedHoverPartIndex;\n\t}\n\n\tpublic get hoverPartsCount(): number {\n\t\treturn this._renderedParts.length;\n\t}\n}\n"]}
@@ -17,7 +17,6 @@ import { renderMarkdown } from '../../../base/browser/markdownRenderer.js';
17
17
  import { ActionBar } from '../../../base/browser/ui/actionbar/actionbar.js';
18
18
  import { getAnchorRect } from '../../../base/browser/ui/contextview/contextview.js';
19
19
  import { KeybindingLabel } from '../../../base/browser/ui/keybindingLabel/keybindingLabel.js';
20
- import { Toggle } from '../../../base/browser/ui/toggle/toggle.js';
21
20
  import { List } from '../../../base/browser/ui/list/listWidget.js';
22
21
  import { SubmenuAction, toAction } from '../../../base/common/actions.js';
23
22
  import { CancellationTokenSource } from '../../../base/common/cancellation.js';
@@ -109,11 +108,8 @@ let ActionItemRenderer = class ActionItemRenderer {
109
108
  const submenuIndicator = document.createElement('div');
110
109
  submenuIndicator.className = 'action-list-submenu-indicator';
111
110
  container.append(submenuIndicator);
112
- const inlineToggleContainer = document.createElement('div');
113
- inlineToggleContainer.className = 'action-list-item-inline-toggle';
114
- container.append(inlineToggleContainer);
115
111
  const elementDisposables = new DisposableStore();
116
- return { container, icon, text, detail, badge, description, groupTitle, keybinding, toolbar, submenuIndicator, inlineToggleContainer, elementDisposables };
112
+ return { container, icon, text, detail, badge, description, groupTitle, keybinding, toolbar, submenuIndicator, elementDisposables };
117
113
  }
118
114
  renderElement(element, _index, data) {
119
115
  // Clear previous element disposables
@@ -210,34 +206,6 @@ let ActionItemRenderer = class ActionItemRenderer {
210
206
  data.detail.textContent = '';
211
207
  data.detail.style.display = 'none';
212
208
  }
213
- // Render optional inline toggle (shown as its own row below the detail)
214
- dom.clearNode(data.inlineToggleContainer);
215
- if (element.inlineToggle) {
216
- const inlineToggle = element.inlineToggle;
217
- const toggleLabel = document.createElement('span');
218
- toggleLabel.className = 'action-list-item-inline-toggle-label';
219
- toggleLabel.textContent = stripNewlines(inlineToggle.label);
220
- data.inlineToggleContainer.append(toggleLabel);
221
- data.inlineToggleContainer.style.display = '';
222
- data.container.classList.add('has-inline-toggle');
223
- const toggle = data.elementDisposables.add(new Toggle({
224
- title: inlineToggle.title ?? inlineToggle.label,
225
- isChecked: inlineToggle.checked,
226
- actionClassName: 'action-list-inline-switch',
227
- notFocusable: false,
228
- inputActiveOptionBorder: undefined,
229
- inputActiveOptionForeground: undefined,
230
- inputActiveOptionBackground: undefined,
231
- }));
232
- data.inlineToggleContainer.append(toggle.domNode);
233
- data.elementDisposables.add(toggle.onChange(() => inlineToggle.onChange(toggle.checked)));
234
- // Keep clicks on the toggle row from selecting the item.
235
- data.elementDisposables.add(dom.addDisposableListener(data.inlineToggleContainer, dom.EventType.CLICK, e => e.stopPropagation()));
236
- }
237
- else {
238
- data.inlineToggleContainer.style.display = 'none';
239
- data.container.classList.remove('has-inline-toggle');
240
- }
241
209
  const actionTitle = this._keybindingService.lookupKeybinding(acceptSelectedActionCommand)?.getLabel();
242
210
  const previewTitle = this._keybindingService.lookupKeybinding(previewSelectedActionCommand)?.getLabel();
243
211
  data.container.classList.toggle('option-disabled', !!element.disabled);
@@ -436,22 +404,17 @@ let ActionListWidget = ActionListWidget_1 = class ActionListWidget extends Dispo
436
404
  if (element.group?.title) {
437
405
  label = label + ', ' + element.group.title;
438
406
  }
439
- if (element.inlineToggle) {
440
- label = label + ', ' + (element.inlineToggle.checked
441
- ? localize(1708, "{0}, on", element.inlineToggle.label)
442
- : localize(1709, "{0}, off", element.inlineToggle.label));
443
- }
444
407
  if (element.disabled) {
445
- label = localize(1710, "{0}, Disabled Reason: {1}", label, element.disabled);
408
+ label = localize(1708, "{0}, Disabled Reason: {1}", label, element.disabled);
446
409
  }
447
410
  if (element.submenuActions?.length) {
448
- label = localize(1711, "{0}, use right arrow to access options", label);
411
+ label = localize(1709, "{0}, use right arrow to access options", label);
449
412
  }
450
413
  return label;
451
414
  }
452
415
  return null;
453
416
  },
454
- getWidgetAriaLabel: () => localize(1712, "Action Widget"),
417
+ getWidgetAriaLabel: () => localize(1710, "Action Widget"),
455
418
  getRole: (e) => {
456
419
  switch (e.kind) {
457
420
  case "action" /* ActionListItemKind.Action */:
@@ -481,8 +444,8 @@ let ActionListWidget = ActionListWidget_1 = class ActionListWidget extends Dispo
481
444
  this._filterInput = document.createElement('input');
482
445
  this._filterInput.type = 'text';
483
446
  this._filterInput.className = 'action-list-filter-input';
484
- this._filterInput.placeholder = this._options?.filterPlaceholder ?? localize(1713, "Search...");
485
- this._filterInput.setAttribute('aria-label', localize(1714, "Filter items"));
447
+ this._filterInput.placeholder = this._options?.filterPlaceholder ?? localize(1711, "Search...");
448
+ this._filterInput.setAttribute('aria-label', localize(1712, "Filter items"));
486
449
  filterRow.appendChild(this._filterInput);
487
450
  const filterActions = this._options?.filterActions ?? [];
488
451
  if (filterActions.length > 0) {
@@ -841,9 +804,6 @@ let ActionListWidget = ActionListWidget_1 = class ActionListWidget extends Dispo
841
804
  case "separator" /* ActionListItemKind.Separator */:
842
805
  return item.label ? this._actionLineHeight : this._separatorLineHeight;
843
806
  default:
844
- if (item.inlineToggle) {
845
- return this._options?.inlineToggleItemHeight ?? 70;
846
- }
847
807
  return item.detail ? (this._options?.detailItemHeight ?? 48) : this._actionLineHeight;
848
808
  }
849
809
  }
@@ -1067,10 +1027,10 @@ let ActionListWidget = ActionListWidget_1 = class ActionListWidget extends Dispo
1067
1027
  });
1068
1028
  return;
1069
1029
  }
1070
- // Don't select when clicking the toolbar, submenu indicator, or inline toggle
1030
+ // Don't select when clicking the toolbar or submenu indicator
1071
1031
  if (dom.isMouseEvent(e.browserEvent)) {
1072
1032
  const target = e.browserEvent.target;
1073
- if (dom.isHTMLElement(target) && (target.closest('.action-list-item-toolbar') || target.closest('.action-list-submenu-indicator') || target.closest('.action-list-item-inline-toggle'))) {
1033
+ if (dom.isHTMLElement(target) && (target.closest('.action-list-item-toolbar') || target.closest('.action-list-submenu-indicator'))) {
1074
1034
  this._list.setSelection([]);
1075
1035
  return;
1076
1036
  }