monaco-editor-core 0.57.0 → 0.58.0-dev-20261104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/nls.keys.json +1 -1
- package/esm/nls.messages.cs.js +2 -2
- package/esm/nls.messages.de.js +2 -2
- package/esm/nls.messages.es.js +2 -2
- package/esm/nls.messages.fr.js +2 -2
- package/esm/nls.messages.it.js +2 -2
- package/esm/nls.messages.ja.js +2 -2
- package/esm/nls.messages.js +1 -1
- package/esm/nls.messages.json +1 -1
- package/esm/nls.messages.ko.js +2 -2
- package/esm/nls.messages.pl.js +2 -2
- package/esm/nls.messages.pt-br.js +2 -2
- package/esm/nls.messages.ru.js +2 -2
- package/esm/nls.messages.tr.js +2 -2
- package/esm/nls.messages.zh-cn.js +2 -2
- package/esm/nls.messages.zh-tw.js +2 -2
- package/esm/nls.metadata.json +38 -6
- package/esm/vs/base/browser/browser.js +8 -0
- package/esm/vs/base/browser/browser.js.map +1 -1
- package/esm/vs/base/browser/contextmenu.js +8 -1
- package/esm/vs/base/browser/contextmenu.js.map +1 -1
- package/esm/vs/base/browser/dom.js +34 -5
- package/esm/vs/base/browser/dom.js.map +1 -1
- package/esm/vs/base/browser/dompurify/dompurify.js +2457 -2640
- package/esm/vs/base/browser/markdownRenderer.js +48 -21
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/pixelRatio.js +3 -2
- package/esm/vs/base/browser/pixelRatio.js.map +1 -1
- package/esm/vs/base/browser/ui/actionbar/actionViewItems.js +5 -2
- package/esm/vs/base/browser/ui/actionbar/actionViewItems.js.map +1 -1
- package/esm/vs/base/browser/ui/actionbar/actionbar.js +7 -2
- package/esm/vs/base/browser/ui/actionbar/actionbar.js.map +1 -1
- package/esm/vs/base/browser/ui/animations/animations.js +68 -40
- package/esm/vs/base/browser/ui/animations/animations.js.map +1 -1
- package/esm/vs/base/browser/ui/button/button.js +7 -0
- package/esm/vs/base/browser/ui/button/button.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/contextview/contextview.css +15 -0
- package/esm/vs/base/browser/ui/contextview/contextview.js +266 -40
- package/esm/vs/base/browser/ui/contextview/contextview.js.map +1 -1
- package/esm/vs/base/browser/ui/contextview/windowControlsOverlay.js +72 -0
- package/esm/vs/base/browser/ui/contextview/windowControlsOverlay.js.map +1 -0
- package/esm/vs/base/browser/ui/dialog/dialog.css +5 -0
- package/esm/vs/base/browser/ui/dropdown/dropdown.js +2 -1
- package/esm/vs/base/browser/ui/dropdown/dropdown.js.map +1 -1
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +1 -0
- package/esm/vs/base/browser/ui/dropdown/dropdownActionViewItem.js.map +1 -1
- package/esm/vs/base/browser/ui/hover/hover.js.map +1 -1
- package/esm/vs/base/browser/ui/list/listView.js +87 -15
- package/esm/vs/base/browser/ui/list/listView.js.map +1 -1
- package/esm/vs/base/browser/ui/list/listWidget.js +37 -15
- package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
- package/esm/vs/base/browser/ui/menu/menu.js +189 -52
- package/esm/vs/base/browser/ui/menu/menu.js.map +1 -1
- package/esm/vs/base/browser/ui/radio/radio.css +11 -0
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +2 -1
- package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBox.js.map +1 -1
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js +14 -8
- package/esm/vs/base/browser/ui/selectBox/selectBoxCustom.js.map +1 -1
- package/esm/vs/base/browser/ui/splitview/splitview.js +11 -7
- package/esm/vs/base/browser/ui/splitview/splitview.js.map +1 -1
- package/esm/vs/base/browser/ui/toggle/switch.css +16 -7
- package/esm/vs/base/browser/ui/toggle/switch.js +9 -6
- package/esm/vs/base/browser/ui/toggle/switch.js.map +1 -1
- package/esm/vs/base/browser/ui/toolbar/toolbar.css +1 -2
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +85 -38
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/abstractTree.js +48 -9
- package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js +10 -1
- package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/objectTree.js +3 -0
- package/esm/vs/base/browser/ui/tree/objectTree.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
- package/esm/vs/base/common/actions.js +8 -2
- package/esm/vs/base/common/actions.js.map +1 -1
- package/esm/vs/base/common/arrays.js +4 -4
- package/esm/vs/base/common/arrays.js.map +1 -1
- package/esm/vs/base/common/async.js +12 -8
- package/esm/vs/base/common/async.js.map +1 -1
- package/esm/vs/base/common/cancellation.js +25 -0
- package/esm/vs/base/common/cancellation.js.map +1 -1
- package/esm/vs/base/common/codicons.js +2 -0
- package/esm/vs/base/common/codicons.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +2 -0
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/color.js +1 -1
- package/esm/vs/base/common/color.js.map +1 -1
- package/esm/vs/base/common/diff/diff.js +60 -1
- package/esm/vs/base/common/diff/diff.js.map +1 -1
- package/esm/vs/base/common/event.js +1 -1
- package/esm/vs/base/common/event.js.map +1 -1
- package/esm/vs/base/common/glob.js +1 -0
- package/esm/vs/base/common/glob.js.map +1 -1
- package/esm/vs/base/common/htmlContent.js +74 -12
- package/esm/vs/base/common/htmlContent.js.map +1 -1
- package/esm/vs/base/common/json.js +19 -0
- package/esm/vs/base/common/json.js.map +1 -0
- package/esm/vs/base/common/network.js +16 -0
- package/esm/vs/base/common/network.js.map +1 -1
- package/esm/vs/base/common/resources.js +14 -2
- package/esm/vs/base/common/resources.js.map +1 -1
- package/esm/vs/base/common/strings.js +1 -1
- package/esm/vs/base/common/strings.js.map +1 -1
- package/esm/vs/base/common/uri.js +2 -2
- package/esm/vs/base/common/uri.js.map +1 -1
- package/esm/vs/editor/browser/config/editorConfiguration.js +1 -1
- package/esm/vs/editor/browser/config/fontMeasurements.js +19 -6
- package/esm/vs/editor/browser/config/fontMeasurements.js.map +1 -1
- package/esm/vs/editor/browser/controller/dragScrolling.js +3 -3
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +11 -5
- package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +8 -38
- package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/editContext/native/screenReaderContentRich.js +3 -3
- package/esm/vs/editor/browser/controller/editContext/native/screenReaderSupport.js +6 -6
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +12 -10
- package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js.map +1 -1
- package/esm/vs/editor/browser/controller/mouseHandler.js +7 -7
- package/esm/vs/editor/browser/controller/mouseTarget.js +3 -3
- package/esm/vs/editor/browser/coreCommands.js +2 -2
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/editorMarkdownSanitizer.js +19 -0
- package/esm/vs/editor/browser/editorMarkdownSanitizer.js.map +1 -0
- package/esm/vs/editor/browser/gpu/rectangleRenderer.js +1 -1
- package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
- package/esm/vs/editor/browser/observableCodeEditor.js +1 -1
- package/esm/vs/editor/browser/services/editorWorkerService.js +3 -2
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/browser/services/openerService.js +6 -2
- package/esm/vs/editor/browser/services/openerService.js.map +1 -1
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js +34 -11
- package/esm/vs/editor/browser/view/domLineBreaksComputer.js.map +1 -1
- package/esm/vs/editor/browser/view/viewController.js +7 -7
- package/esm/vs/editor/browser/view/viewController.js.map +1 -1
- package/esm/vs/editor/browser/view/viewLayer.js +1 -1
- package/esm/vs/editor/browser/view/viewOverlays.js +4 -4
- package/esm/vs/editor/browser/view.js +5 -5
- package/esm/vs/editor/browser/viewParts/blockDecorations/blockDecorations.js +1 -1
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +11 -3
- package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.js +6 -6
- package/esm/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.js +12 -12
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js +9 -2
- package/esm/vs/editor/browser/viewParts/glyphMargin/glyphMargin.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/indentGuides/indentGuides.js +2 -2
- package/esm/vs/editor/browser/viewParts/lineNumbers/lineNumbers.js +2 -2
- package/esm/vs/editor/browser/viewParts/linesDecorations/linesDecorations.js +2 -2
- package/esm/vs/editor/browser/viewParts/margin/margin.js +2 -2
- package/esm/vs/editor/browser/viewParts/minimap/minimap.js +6 -6
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js +9 -2
- package/esm/vs/editor/browser/viewParts/overlayWidgets/overlayWidgets.js.map +1 -1
- package/esm/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.js +5 -5
- package/esm/vs/editor/browser/viewParts/overviewRuler/overviewRuler.js +3 -3
- package/esm/vs/editor/browser/viewParts/rulers/rulers.js +2 -2
- package/esm/vs/editor/browser/viewParts/rulersGpu/rulersGpu.js +1 -1
- package/esm/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.js +3 -3
- package/esm/vs/editor/browser/viewParts/selections/selections.js +2 -2
- package/esm/vs/editor/browser/viewParts/viewCursors/viewCursor.js +2 -2
- package/esm/vs/editor/browser/viewParts/viewCursors/viewCursors.js +6 -6
- package/esm/vs/editor/browser/viewParts/viewLines/viewLineOptions.js +5 -5
- package/esm/vs/editor/browser/viewParts/viewLines/viewLines.js +11 -11
- package/esm/vs/editor/browser/viewParts/viewLinesGpu/viewLinesGpu.js +1 -1
- package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +2 -2
- package/esm/vs/editor/browser/viewParts/whitespace/whitespace.js +4 -4
- package/esm/vs/editor/browser/viewParts/wordWrapIndicator/wordWrapIndicator.js +2 -2
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +22 -21
- package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/commands.js +12 -12
- package/esm/vs/editor/browser/widget/diffEditor/components/accessibleDiffViewer.js +18 -18
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/diffEditorViewZones.js +3 -3
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js +10 -10
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/inlineDiffDeletedCodeMargin.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorViewZones/renderLines.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/diffEditor.contribution.js +4 -4
- package/esm/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +21 -3
- package/esm/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js.map +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +10 -10
- package/esm/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -1
- package/esm/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +2 -2
- package/esm/vs/editor/browser/widget/diffEditor/registrations.contribution.js +5 -5
- package/esm/vs/editor/browser/widget/multiDiffEditor/colors.js +3 -3
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollLayout.js +2 -2
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollLayout.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollView.js +21 -2
- package/esm/vs/editor/browser/widget/multiDiffEditor/compressedVirtualizedScrollView.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -2
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +11 -3
- package/esm/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js.map +1 -1
- package/esm/vs/editor/browser/widget/multiDiffEditor/virtualizedItemManager.js +1 -0
- package/esm/vs/editor/browser/widget/multiDiffEditor/virtualizedItemManager.js.map +1 -1
- package/esm/vs/editor/common/commands/columnSelectionPasteCommand.js +64 -0
- package/esm/vs/editor/common/commands/columnSelectionPasteCommand.js.map +1 -0
- package/esm/vs/editor/common/config/editorConfigurationSchema.js +68 -58
- package/esm/vs/editor/common/config/editorConfigurationSchema.js.map +1 -1
- package/esm/vs/editor/common/config/editorOptions.js +560 -500
- package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
- package/esm/vs/editor/common/core/editorColorRegistry.js +71 -71
- package/esm/vs/editor/common/core/edits/textEdit.js +16 -0
- package/esm/vs/editor/common/core/edits/textEdit.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursor.js +20 -10
- package/esm/vs/editor/common/cursor/cursor.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js +67 -14
- package/esm/vs/editor/common/cursor/cursorTypeEditOperations.js.map +1 -1
- package/esm/vs/editor/common/cursor/cursorTypeOperations.js +2 -2
- package/esm/vs/editor/common/cursor/cursorTypeOperations.js.map +1 -1
- package/esm/vs/editor/common/cursorCommon.js +22 -21
- package/esm/vs/editor/common/cursorCommon.js.map +1 -1
- package/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +21 -8
- package/esm/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js.map +1 -1
- package/esm/vs/editor/common/diff/documentDiffProvider.js.map +1 -1
- package/esm/vs/editor/common/diff/externalLinesDiffComputer.js +38 -26
- package/esm/vs/editor/common/diff/externalLinesDiffComputer.js.map +1 -1
- package/esm/vs/editor/common/diff/rangeMapping.js +11 -1
- package/esm/vs/editor/common/diff/rangeMapping.js.map +1 -1
- package/esm/vs/editor/common/diff/verifyLinesDiff.js +28 -0
- package/esm/vs/editor/common/diff/verifyLinesDiff.js.map +1 -0
- package/esm/vs/editor/common/editorContextKeys.js +53 -53
- package/esm/vs/editor/common/languages/languageConfiguration.js +8 -0
- package/esm/vs/editor/common/languages/languageConfiguration.js.map +1 -1
- package/esm/vs/editor/common/languages/modesRegistry.js +1 -1
- package/esm/vs/editor/common/languages.js +56 -56
- package/esm/vs/editor/common/model/editStack.js +1 -1
- package/esm/vs/editor/common/services/editorWebWorker.js +27 -6
- package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
- package/esm/vs/editor/common/services/editorWorker.js.map +1 -1
- package/esm/vs/editor/common/services/languageService.js +6 -4
- package/esm/vs/editor/common/services/languageService.js.map +1 -1
- package/esm/vs/editor/common/services/markerDecorationsService.js +21 -2
- package/esm/vs/editor/common/services/markerDecorationsService.js.map +1 -1
- package/esm/vs/editor/common/standalone/standaloneEnums.js +100 -97
- package/esm/vs/editor/common/standalone/standaloneEnums.js.map +1 -1
- package/esm/vs/editor/common/standaloneStrings.js +11 -11
- package/esm/vs/editor/common/textModelEditSource.js +9 -0
- package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
- package/esm/vs/editor/common/viewLayout/viewLayout.js +16 -16
- package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +2 -2
- package/esm/vs/editor/common/viewModel/monospaceLineBreaksComputer.js +1 -1
- package/esm/vs/editor/common/viewModel/viewModelImpl.js +19 -19
- package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
- package/esm/vs/editor/contrib/anchorSelect/browser/anchorSelect.js +6 -6
- package/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js +9 -9
- package/esm/vs/editor/contrib/caretOperations/browser/caretOperations.js +2 -2
- package/esm/vs/editor/contrib/caretOperations/browser/transpose.js +1 -1
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +23 -20
- package/esm/vs/editor/contrib/clipboard/browser/clipboard.js.map +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeAction.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/codeActionCommands.js +29 -29
- package/esm/vs/editor/contrib/codeAction/browser/codeActionContributions.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +3 -3
- package/esm/vs/editor/contrib/codeAction/browser/codeActionMenu.js +8 -8
- package/esm/vs/editor/contrib/codeAction/browser/codeActionModel.js +1 -1
- package/esm/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +9 -9
- package/esm/vs/editor/contrib/codelens/browser/codelensController.js +2 -2
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +25 -10
- package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerCloseButton.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/colorPickerParts/colorPickerHeader.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerContribution.js +1 -1
- package/esm/vs/editor/contrib/colorPicker/browser/hoverColorPicker/hoverColorPickerParticipant.js +3 -3
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerActions.js +7 -7
- package/esm/vs/editor/contrib/colorPicker/browser/standaloneColorPicker/standaloneColorPickerParticipant.js +1 -1
- package/esm/vs/editor/contrib/comment/browser/comment.js +6 -6
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +17 -17
- package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
- package/esm/vs/editor/contrib/cursorUndo/browser/cursorUndo.js +2 -2
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +4 -4
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +39 -39
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js.map +1 -1
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +8 -8
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +3 -3
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/pasteEditSession.js +19 -0
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/pasteEditSession.js.map +1 -0
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +26 -18
- package/esm/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js.map +1 -1
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js +1 -1
- package/esm/vs/editor/contrib/editorState/browser/keybindingCancellation.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +18 -18
- package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findModel.js +6 -6
- package/esm/vs/editor/contrib/find/browser/findWidget.js +40 -40
- package/esm/vs/editor/contrib/find/browser/findWidget.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/folding.js +23 -23
- package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +9 -9
- package/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +3 -3
- package/esm/vs/editor/contrib/format/browser/formatActions.js +2 -2
- package/esm/vs/editor/contrib/gotoError/browser/gotoError.js +8 -8
- package/esm/vs/editor/contrib/gotoError/browser/gotoErrorWidget.js +14 -14
- package/esm/vs/editor/contrib/gotoSymbol/browser/goToCommands.js +39 -39
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +2 -2
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js +4 -4
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesController.js.map +1 -1
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesTree.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget.js +3 -3
- package/esm/vs/editor/contrib/gotoSymbol/browser/referencesModel.js +8 -8
- package/esm/vs/editor/contrib/gotoSymbol/browser/symbolNavigation.js +3 -3
- package/esm/vs/editor/contrib/gpu/browser/gpuActions.js +4 -4
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js +9 -3
- package/esm/vs/editor/contrib/hover/browser/contentHoverController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverController.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js +2 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/hoverActionIds.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/hoverActions.js +24 -24
- package/esm/vs/editor/contrib/hover/browser/hoverCopyButton.js +2 -2
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +10 -8
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markerHoverParticipant.js +6 -6
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/indentation/browser/indentation.js +20 -20
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +5 -5
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +9 -9
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js +3 -3
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsLocations.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/commands.js +21 -21
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionContextKeys.js +13 -13
- package/esm/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.js +7 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js +6 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/model/renameSymbolProcessor.js +2 -2
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +7 -7
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +6 -6
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordReplacementView.js +3 -3
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/theme.js +20 -20
- package/esm/vs/editor/contrib/insertFinalNewLine/browser/insertFinalNewLine.js +1 -1
- package/esm/vs/editor/contrib/lineSelection/browser/lineSelection.js +1 -1
- package/esm/vs/editor/contrib/linesOperations/browser/linesOperations.js +32 -32
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +5 -4
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js.map +1 -1
- package/esm/vs/editor/contrib/links/browser/links.js +16 -15
- package/esm/vs/editor/contrib/links/browser/links.js.map +1 -1
- package/esm/vs/editor/contrib/longLinesHelper/browser/longLinesHelper.js +1 -1
- package/esm/vs/editor/contrib/message/browser/messageController.js +16 -12
- package/esm/vs/editor/contrib/message/browser/messageController.js.map +1 -1
- package/esm/vs/editor/contrib/middleScroll/browser/middleScrollController.js +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +91 -55
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js.map +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js +3 -3
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsModel.js.map +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +6 -4
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
- package/esm/vs/editor/contrib/peekView/browser/peekView.js +18 -18
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderText.contribution.js +1 -1
- package/esm/vs/editor/contrib/placeholderText/browser/placeholderTextContribution.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +1 -1
- package/esm/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +12 -12
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +3 -3
- package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +6 -6
- package/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +23 -13
- package/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js.map +1 -1
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +5 -5
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +5 -5
- package/esm/vs/editor/contrib/snippet/browser/snippetSession.js +2 -2
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +10 -8
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js +2 -2
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollWidget.js +6 -6
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +9 -9
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +15 -15
- package/esm/vs/editor/contrib/suggest/browser/suggestInlineCompletions.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/suggestModel.js +11 -11
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +27 -27
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +8 -6
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +5 -5
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +3 -3
- package/esm/vs/editor/contrib/suggest/browser/wordDistance.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +27 -27
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js +1 -1
- package/esm/vs/editor/contrib/wordHighlighter/browser/textualHighlightProvider.js.map +1 -1
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +50 -14
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +6 -6
- package/esm/vs/editor/editor.api.d.ts +133 -98
- package/esm/vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard.js +1 -1
- package/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js +5 -3
- package/esm/vs/editor/standalone/browser/quickInput/standaloneQuickInputService.js.map +1 -1
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js +15 -1
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
- package/esm/vs/nls.js.map +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +72 -66
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js.map +1 -1
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +434 -136
- package/esm/vs/platform/actionWidget/browser/actionList.js.map +1 -1
- package/esm/vs/platform/actionWidget/browser/actionWidget.css +74 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +24 -26
- package/esm/vs/platform/actionWidget/browser/actionWidget.js.map +1 -1
- package/esm/vs/platform/actionWidget/browser/actionWidgetMotion.js +16 -0
- package/esm/vs/platform/actionWidget/browser/actionWidgetMotion.js.map +1 -0
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +15 -17
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
- package/esm/vs/platform/actions/browser/toolbar.js +25 -12
- package/esm/vs/platform/actions/browser/toolbar.js.map +1 -1
- package/esm/vs/platform/actions/common/actions.js +4 -2
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/actions/common/menuService.js +15 -8
- package/esm/vs/platform/actions/common/menuService.js.map +1 -1
- package/esm/vs/platform/configuration/common/configuration.js +3 -1
- package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationModels.js +16 -11
- package/esm/vs/platform/configuration/common/configurationModels.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationRegistry.js +29 -27
- package/esm/vs/platform/configuration/common/configurationRegistry.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurations.js +13 -1
- package/esm/vs/platform/configuration/common/configurations.js.map +1 -1
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +2 -2
- package/esm/vs/platform/contextkey/browser/contextKeyService.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +28 -14
- package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkeys.js +10 -10
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/contextview/browser/contextMenuHandler.js +17 -4
- package/esm/vs/platform/contextview/browser/contextMenuHandler.js.map +1 -1
- package/esm/vs/platform/contextview/browser/contextMenuService.js +1 -1
- package/esm/vs/platform/contextview/browser/contextMenuService.js.map +1 -1
- package/esm/vs/platform/contextview/browser/contextView.js.map +1 -1
- package/esm/vs/platform/contextview/browser/contextViewService.js +7 -2
- package/esm/vs/platform/contextview/browser/contextViewService.js.map +1 -1
- package/esm/vs/platform/editor/common/editor.js +17 -0
- package/esm/vs/platform/editor/common/editor.js.map +1 -1
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/hover/browser/hoverService.js +6 -3
- package/esm/vs/platform/hover/browser/hoverService.js.map +1 -1
- package/esm/vs/platform/hover/browser/hoverWidget.js +38 -6
- package/esm/vs/platform/hover/browser/hoverWidget.js.map +1 -1
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js +32 -5
- package/esm/vs/platform/hover/browser/updatableHoverWidget.js.map +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js +1 -1
- package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +5 -5
- package/esm/vs/platform/keybinding/common/keybindingResolver.js +1 -1
- package/esm/vs/platform/keybinding/common/keybindingResolver.js.map +1 -1
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/markers/common/markerService.js +11 -8
- package/esm/vs/platform/markers/common/markerService.js.map +1 -1
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/markers/common/markers.js.map +1 -1
- package/esm/vs/platform/notification/common/notification.js.map +1 -1
- package/esm/vs/platform/notification/common/notificationMessage.js +37 -0
- package/esm/vs/platform/notification/common/notificationMessage.js.map +1 -0
- package/esm/vs/platform/opener/common/opener.js.map +1 -1
- package/esm/vs/platform/progress/common/progress.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +8 -8
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/media/quickInput.css +33 -2
- package/esm/vs/platform/quickinput/browser/quickAccess.js +7 -4
- package/esm/vs/platform/quickinput/browser/quickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +10 -10
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +65 -15
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js +96 -90
- package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputService.js +5 -7
- package/esm/vs/platform/quickinput/browser/quickInputService.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickTree.js +1 -1
- package/esm/vs/platform/quickinput/common/quickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
- package/esm/vs/platform/storage/common/storage.js.map +1 -1
- package/esm/vs/platform/theme/common/colorRegistry.js +1 -0
- package/esm/vs/platform/theme/common/colorRegistry.js.map +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +11 -3
- package/esm/vs/platform/theme/common/colorUtils.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/baseColors.js +19 -19
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -9
- package/esm/vs/platform/theme/common/colors/chartsColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/confettiColors.js +14 -0
- package/esm/vs/platform/theme/common/colors/confettiColors.js.map +1 -0
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +48 -48
- package/esm/vs/platform/theme/common/colors/inputColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +13 -13
- package/esm/vs/platform/theme/common/colors/minimapColors.js.map +1 -1
- package/esm/vs/platform/theme/common/colors/miscColors.js +16 -16
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +10 -10
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/monaco.d.ts +133 -98
- package/package.json +3 -3
- package/version.txt +1 -1
|
@@ -2,27 +2,56 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { getVisibleWCOTitlebarAreaRect } from '../../browser.js';
|
|
5
6
|
import { BrowserFeatures } from '../../canIUse.js';
|
|
6
7
|
import * as DOM from '../../dom.js';
|
|
7
8
|
import { createStyleSheet } from '../../domStylesheets.js';
|
|
9
|
+
import { onUnexpectedError } from '../../../common/errors.js';
|
|
8
10
|
import { Disposable, DisposableStore, toDisposable } from '../../../common/lifecycle.js';
|
|
9
11
|
import { layout2d } from '../../../common/layout.js';
|
|
10
12
|
import * as platform from '../../../common/platform.js';
|
|
13
|
+
import { avoidWindowControlsOverlay } from './windowControlsOverlay.js';
|
|
11
14
|
import './contextview.css';
|
|
15
|
+
export function isPopoverDOMPosition(domPosition) {
|
|
16
|
+
return domPosition === 4 /* ContextViewDOMPosition.POPOVER */ || domPosition === 5 /* ContextViewDOMPosition.POPOVER_SHADOW */;
|
|
17
|
+
}
|
|
12
18
|
export function isAnchor(obj) {
|
|
13
19
|
const anchor = obj;
|
|
14
20
|
return !!anchor && typeof anchor.x === 'number' && typeof anchor.y === 'number';
|
|
15
21
|
}
|
|
22
|
+
export function hasRequiredAncestorClasses(element, classNames) {
|
|
23
|
+
if (!classNames?.length) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
for (let candidate = element; candidate;) {
|
|
27
|
+
const current = candidate;
|
|
28
|
+
if (classNames.every(requirement => typeof requirement === 'string'
|
|
29
|
+
? current.classList.contains(requirement)
|
|
30
|
+
: requirement.some(className => current.classList.contains(className)))) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
if (current.parentElement) {
|
|
34
|
+
candidate = current.parentElement;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
const root = current.getRootNode();
|
|
38
|
+
candidate = root instanceof ShadowRoot && DOM.isHTMLElement(root.host) ? root.host : null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
16
43
|
export const CONTEXT_VIEW_MENU_MOTION_CLASS = 'context-view-menu-motion';
|
|
17
44
|
export const CONTEXT_VIEW_MENU_MOTION_CLOSING_CLASS = 'context-view-menu-motion-closing';
|
|
18
45
|
export const CONTEXT_VIEW_MENU_MOTION_CLOSE_ANIMATION_DURATION = 150;
|
|
19
|
-
export const CONTEXT_VIEW_MENU_MOTION_ANCESTOR_CLASSES = ['modern-ui', 'monaco-enable-motion'];
|
|
46
|
+
export const CONTEXT_VIEW_MENU_MOTION_ANCESTOR_CLASSES = [['modern-ui', 'modern-ui-frosted-glass'], 'monaco-enable-motion'];
|
|
20
47
|
export const CONTEXT_VIEW_CLOSE_ANIMATION_DURATION_VARIABLE = '--vscode-context-view-close-animation-duration';
|
|
21
48
|
export const CONTEXT_VIEW_MENU_MOTION_SHADOW_VARIABLE = '--vscode-context-view-menu-motion-shadow';
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
49
|
+
/** Inherited while an opacity animation isolates descendant menu backdrops. */
|
|
50
|
+
export const CONTEXT_VIEW_MENU_MOTION_BACKDROP_OPACITY_VARIABLE = '--vscode-context-view-menu-motion-backdrop-opacity';
|
|
51
|
+
export const CONTEXT_VIEW_MENU_MOTION_CLOSE_START_OPACITY_VARIABLE = '--vscode-context-view-menu-motion-close-start-opacity';
|
|
52
|
+
export const CONTEXT_VIEW_MENU_MOTION_CLOSE_START_TRANSFORM_VARIABLE = '--vscode-context-view-menu-motion-close-start-transform';
|
|
53
|
+
export const CONTEXT_VIEW_MENU_MOTION_OPEN_DURATION_MS = 250;
|
|
54
|
+
export const CONTEXT_VIEW_MENU_MOTION_EASING = 'cubic-bezier(0.22, 1, 0.36, 1)';
|
|
26
55
|
export const contextViewMenuCloseAnimation = {
|
|
27
56
|
className: CONTEXT_VIEW_MENU_MOTION_CLOSING_CLASS,
|
|
28
57
|
duration: CONTEXT_VIEW_MENU_MOTION_CLOSE_ANIMATION_DURATION,
|
|
@@ -61,6 +90,10 @@ function getContextViewMenuMotionCss(enabledSelectorPrefix) {
|
|
|
61
90
|
}
|
|
62
91
|
|
|
63
92
|
@keyframes context-view-menu-motion-open {
|
|
93
|
+
from, to {
|
|
94
|
+
${CONTEXT_VIEW_MENU_MOTION_BACKDROP_OPACITY_VARIABLE}: 100%;
|
|
95
|
+
}
|
|
96
|
+
|
|
64
97
|
0% {
|
|
65
98
|
opacity: 0;
|
|
66
99
|
transform: scale(0.97);
|
|
@@ -73,6 +106,10 @@ function getContextViewMenuMotionCss(enabledSelectorPrefix) {
|
|
|
73
106
|
}
|
|
74
107
|
|
|
75
108
|
@keyframes context-view-menu-motion-close {
|
|
109
|
+
from, to {
|
|
110
|
+
${CONTEXT_VIEW_MENU_MOTION_BACKDROP_OPACITY_VARIABLE}: 100%;
|
|
111
|
+
}
|
|
112
|
+
|
|
76
113
|
0% {
|
|
77
114
|
opacity: var(${CONTEXT_VIEW_MENU_MOTION_CLOSE_START_OPACITY_VARIABLE}, 1);
|
|
78
115
|
transform: var(${CONTEXT_VIEW_MENU_MOTION_CLOSE_START_TRANSFORM_VARIABLE}, scale(1));
|
|
@@ -128,11 +165,20 @@ export function getAnchorRect(anchor) {
|
|
|
128
165
|
};
|
|
129
166
|
}
|
|
130
167
|
}
|
|
168
|
+
function getDeepActiveElement(doc) {
|
|
169
|
+
let result = doc.activeElement;
|
|
170
|
+
while (result?.shadowRoot?.activeElement) {
|
|
171
|
+
result = result.shadowRoot.activeElement;
|
|
172
|
+
}
|
|
173
|
+
return result;
|
|
174
|
+
}
|
|
131
175
|
export class ContextView extends Disposable {
|
|
132
176
|
static { this.BUBBLE_UP_EVENTS = ['click', 'keydown', 'focus', 'blur']; }
|
|
133
177
|
static { this.BUBBLE_DOWN_EVENTS = ['click']; }
|
|
134
|
-
|
|
178
|
+
static { this.ISOLATED_KEY_EVENTS = ['keydown', 'keyup', 'keypress']; }
|
|
179
|
+
constructor(container, domPosition, options = {}) {
|
|
135
180
|
super();
|
|
181
|
+
this.options = options;
|
|
136
182
|
this.container = null;
|
|
137
183
|
this.useFixedPosition = false;
|
|
138
184
|
this.useShadowDOM = false;
|
|
@@ -141,6 +187,10 @@ export class ContextView extends Disposable {
|
|
|
141
187
|
this.toDisposeOnSetContainer = Disposable.None;
|
|
142
188
|
this.shadowRoot = null;
|
|
143
189
|
this.shadowRootHostElement = null;
|
|
190
|
+
this.domPosition = 1 /* ContextViewDOMPosition.ABSOLUTE */;
|
|
191
|
+
this.toDisposeOnPopoverHide = this._register(new DisposableStore());
|
|
192
|
+
this.focusToRestore = null;
|
|
193
|
+
this.showCount = 0;
|
|
144
194
|
ensureContextViewMenuMotionStyleSheet();
|
|
145
195
|
this.view = DOM.$('.context-view');
|
|
146
196
|
DOM.hide(this.view);
|
|
@@ -148,15 +198,26 @@ export class ContextView extends Disposable {
|
|
|
148
198
|
this._register(toDisposable(() => this.setContainer(null, 1 /* ContextViewDOMPosition.ABSOLUTE */)));
|
|
149
199
|
}
|
|
150
200
|
setContainer(container, domPosition) {
|
|
151
|
-
|
|
201
|
+
const previousDOMPosition = this.domPosition;
|
|
152
202
|
const usedShadowDOM = this.useShadowDOM;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
203
|
+
const useShadowDOM = domPosition === 3 /* ContextViewDOMPosition.FIXED_SHADOW */ || domPosition === 5 /* ContextViewDOMPosition.POPOVER_SHADOW */;
|
|
204
|
+
const unchanged = container === this.container && usedShadowDOM === useShadowDOM && isPopoverDOMPosition(previousDOMPosition) === isPopoverDOMPosition(domPosition);
|
|
205
|
+
// Tear down the previous popover while its position is still current, so
|
|
206
|
+
// that its owner tracking is disposed and its top layer entry is closed
|
|
207
|
+
if (this.container && !unchanged && isPopoverDOMPosition(previousDOMPosition)) {
|
|
208
|
+
this.hide(undefined, true);
|
|
209
|
+
this.completeHideAnimation();
|
|
210
|
+
}
|
|
211
|
+
this.domPosition = domPosition;
|
|
212
|
+
this.useFixedPosition = domPosition !== 1 /* ContextViewDOMPosition.ABSOLUTE */;
|
|
213
|
+
this.useShadowDOM = useShadowDOM;
|
|
214
|
+
if (unchanged) {
|
|
215
|
+
return; // container is the same and neither shadow DOM nor popover usage has changed
|
|
156
216
|
}
|
|
157
217
|
if (this.container) {
|
|
158
218
|
this.toDisposeOnSetContainer.dispose();
|
|
159
219
|
this.view.remove();
|
|
220
|
+
this.view.removeAttribute('popover');
|
|
160
221
|
if (this.shadowRoot) {
|
|
161
222
|
this.shadowRoot = null;
|
|
162
223
|
this.shadowRootHostElement?.remove();
|
|
@@ -166,6 +227,7 @@ export class ContextView extends Disposable {
|
|
|
166
227
|
}
|
|
167
228
|
if (container) {
|
|
168
229
|
this.container = container;
|
|
230
|
+
const isPopover = isPopoverDOMPosition(domPosition);
|
|
169
231
|
if (this.useShadowDOM) {
|
|
170
232
|
this.shadowRootHostElement = DOM.$('.shadow-root-host');
|
|
171
233
|
Object.assign(this.shadowRootHostElement.style, {
|
|
@@ -175,7 +237,14 @@ export class ContextView extends Disposable {
|
|
|
175
237
|
width: '0',
|
|
176
238
|
height: '0'
|
|
177
239
|
});
|
|
178
|
-
|
|
240
|
+
if (isPopover) {
|
|
241
|
+
// Attached to the owner only while shown, see showPopover.
|
|
242
|
+
// contextview.css resets the user agent popover styles
|
|
243
|
+
this.shadowRootHostElement.setAttribute('popover', 'manual');
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
this.container.appendChild(this.shadowRootHostElement);
|
|
247
|
+
}
|
|
179
248
|
this.shadowRoot = this.shadowRootHostElement.attachShadow({ mode: 'open' });
|
|
180
249
|
const style = document.createElement('style');
|
|
181
250
|
style.textContent = SHADOW_ROOT_CSS;
|
|
@@ -184,9 +253,24 @@ export class ContextView extends Disposable {
|
|
|
184
253
|
this.shadowRoot.appendChild(DOM.$('slot'));
|
|
185
254
|
}
|
|
186
255
|
else {
|
|
187
|
-
|
|
256
|
+
if (isPopover) {
|
|
257
|
+
// Attached to the owner only while shown, see showPopover.
|
|
258
|
+
// contextview.css resets the user agent popover styles
|
|
259
|
+
this.view.setAttribute('popover', 'manual');
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
this.container.appendChild(this.view);
|
|
263
|
+
}
|
|
188
264
|
}
|
|
189
265
|
const toDisposeOnSetContainer = new DisposableStore();
|
|
266
|
+
if (isPopover) {
|
|
267
|
+
// Keep keys pressed in the view from reaching the owner or
|
|
268
|
+
// window-level keybinding listeners while the view is hosted.
|
|
269
|
+
const popoverElement = this.getPopoverElement();
|
|
270
|
+
ContextView.ISOLATED_KEY_EVENTS.forEach(event => {
|
|
271
|
+
toDisposeOnSetContainer.add(DOM.addDisposableListener(popoverElement, event, e => e.stopPropagation()));
|
|
272
|
+
});
|
|
273
|
+
}
|
|
190
274
|
ContextView.BUBBLE_UP_EVENTS.forEach(event => {
|
|
191
275
|
toDisposeOnSetContainer.add(DOM.addStandardDisposableListener(this.container, event, e => {
|
|
192
276
|
this.onDOMEvent(e, false);
|
|
@@ -201,10 +285,17 @@ export class ContextView extends Disposable {
|
|
|
201
285
|
}
|
|
202
286
|
}
|
|
203
287
|
show(delegate) {
|
|
288
|
+
this.showCount++;
|
|
204
289
|
this.completeHideAnimation();
|
|
205
290
|
if (this.isVisible()) {
|
|
206
291
|
this.hide(undefined, true);
|
|
207
292
|
}
|
|
293
|
+
const ownerDocument = this.container?.ownerDocument ?? DOM.getActiveDocument();
|
|
294
|
+
const activeElement = getDeepActiveElement(ownerDocument);
|
|
295
|
+
this.focusToRestore = DOM.isHTMLElement(activeElement) ? activeElement : null;
|
|
296
|
+
if (isPopoverDOMPosition(this.domPosition)) {
|
|
297
|
+
this.showPopover();
|
|
298
|
+
}
|
|
208
299
|
// Show static box
|
|
209
300
|
DOM.clearNode(this.view);
|
|
210
301
|
this.view.className = 'context-view monaco-component';
|
|
@@ -218,17 +309,111 @@ export class ContextView extends Disposable {
|
|
|
218
309
|
this.view.style.position = this.useFixedPosition ? 'fixed' : 'absolute';
|
|
219
310
|
DOM.show(this.view);
|
|
220
311
|
// Render content
|
|
221
|
-
this.toDisposeOnClean = delegate.render(this.view) || Disposable.None;
|
|
312
|
+
this.toDisposeOnClean = delegate.render(this.view, { domPosition: this.domPosition }) || Disposable.None;
|
|
222
313
|
// Set active delegate
|
|
223
314
|
this.delegate = delegate;
|
|
315
|
+
if (isPopoverDOMPosition(this.domPosition)) {
|
|
316
|
+
this.trackPopoverOwner();
|
|
317
|
+
}
|
|
224
318
|
// Layout
|
|
225
319
|
this.doLayout();
|
|
320
|
+
// Layout hides the view when its popover owner is hidden or removed,
|
|
321
|
+
// for example by rendering; do not move focus into a hidden view
|
|
322
|
+
if (this.delegate !== delegate) {
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
226
325
|
// Focus
|
|
227
|
-
|
|
326
|
+
delegate.focus?.();
|
|
228
327
|
}
|
|
229
328
|
getViewElement() {
|
|
230
329
|
return this.view;
|
|
231
330
|
}
|
|
331
|
+
getPopoverElement() {
|
|
332
|
+
return this.shadowRootHostElement ?? this.view;
|
|
333
|
+
}
|
|
334
|
+
showPopover() {
|
|
335
|
+
const owner = this.container;
|
|
336
|
+
if (!owner) {
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
// Fall back to a fixed position without the Popover API or a connected
|
|
340
|
+
// owner; only report a failure to show a popover that should have shown
|
|
341
|
+
const popoverElement = this.getPopoverElement();
|
|
342
|
+
if (typeof popoverElement.showPopover === 'function' && owner.isConnected) {
|
|
343
|
+
try {
|
|
344
|
+
if (popoverElement.parentElement !== owner) {
|
|
345
|
+
adoptPopoverResetStyles(owner);
|
|
346
|
+
owner.appendChild(popoverElement);
|
|
347
|
+
}
|
|
348
|
+
if (!popoverElement.matches(':popover-open')) {
|
|
349
|
+
popoverElement.showPopover();
|
|
350
|
+
}
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
catch (e) {
|
|
354
|
+
onUnexpectedError(e);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
popoverElement.remove();
|
|
358
|
+
const fallbackContainer = this.options.getFallbackContainer?.(owner) ?? DOM.getWindow(owner).document.body;
|
|
359
|
+
this.setContainer(fallbackContainer, this.domPosition === 5 /* ContextViewDOMPosition.POPOVER_SHADOW */ ? 3 /* ContextViewDOMPosition.FIXED_SHADOW */ : 2 /* ContextViewDOMPosition.FIXED */);
|
|
360
|
+
}
|
|
361
|
+
trackPopoverOwner() {
|
|
362
|
+
const owner = this.container;
|
|
363
|
+
if (!owner) {
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
const popoverElement = this.getPopoverElement();
|
|
367
|
+
const targetWindow = DOM.getWindow(owner);
|
|
368
|
+
// Dismiss on pointer presses outside both the view and its owner, without restoring focus
|
|
369
|
+
this.toDisposeOnPopoverHide.add(DOM.addDisposableListener(targetWindow, DOM.EventType.POINTER_DOWN, e => {
|
|
370
|
+
const path = e.composedPath();
|
|
371
|
+
if (!path.includes(popoverElement) && !path.includes(owner)) {
|
|
372
|
+
this.hideWithoutRestoringFocus();
|
|
373
|
+
}
|
|
374
|
+
}, true));
|
|
375
|
+
const ResizeObserverCtor = targetWindow.ResizeObserver;
|
|
376
|
+
if (typeof ResizeObserverCtor === 'function') {
|
|
377
|
+
const observer = new ResizeObserverCtor(() => this.checkPopoverOwner());
|
|
378
|
+
observer.observe(owner);
|
|
379
|
+
this.toDisposeOnPopoverHide.add(toDisposable(() => observer.disconnect()));
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
isPopoverOwnerLost() {
|
|
383
|
+
const owner = this.container;
|
|
384
|
+
return !owner || !owner.isConnected || owner.getClientRects().length === 0;
|
|
385
|
+
}
|
|
386
|
+
checkPopoverOwner() {
|
|
387
|
+
if (this.isVisible() && isPopoverDOMPosition(this.domPosition) && this.isPopoverOwnerLost()) {
|
|
388
|
+
this.hideWithoutRestoringFocus();
|
|
389
|
+
return false;
|
|
390
|
+
}
|
|
391
|
+
return true;
|
|
392
|
+
}
|
|
393
|
+
hideWithoutRestoringFocus() {
|
|
394
|
+
this.focusToRestore = null;
|
|
395
|
+
this.hide(undefined, true);
|
|
396
|
+
}
|
|
397
|
+
restorePopoverFocus() {
|
|
398
|
+
const focusToRestore = this.focusToRestore;
|
|
399
|
+
this.focusToRestore = null;
|
|
400
|
+
if (!focusToRestore?.isConnected) {
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
const activeElement = getDeepActiveElement(focusToRestore.ownerDocument);
|
|
404
|
+
if (activeElement && (activeElement === focusToRestore.ownerDocument.body || DOM.isAncestor(activeElement, this.view))) {
|
|
405
|
+
focusToRestore.focus();
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
hidePopover() {
|
|
409
|
+
this.toDisposeOnPopoverHide.clear();
|
|
410
|
+
const popoverElement = this.getPopoverElement();
|
|
411
|
+
if (popoverElement.hasAttribute('popover') && popoverElement.matches(':popover-open')) {
|
|
412
|
+
popoverElement.hidePopover();
|
|
413
|
+
}
|
|
414
|
+
// Leave nothing behind in the owner, which may be an arbitrary element such as an input's parent
|
|
415
|
+
popoverElement.remove();
|
|
416
|
+
}
|
|
232
417
|
layout() {
|
|
233
418
|
if (!this.isVisible()) {
|
|
234
419
|
return;
|
|
@@ -245,6 +430,9 @@ export class ContextView extends Disposable {
|
|
|
245
430
|
if (!this.isVisible()) {
|
|
246
431
|
return;
|
|
247
432
|
}
|
|
433
|
+
if (!this.checkPopoverOwner()) {
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
248
436
|
// Get anchor
|
|
249
437
|
const anchor = getAnchorRect(this.delegate.getAnchor());
|
|
250
438
|
const containerWindow = this.container ? DOM.getWindow(this.container) : DOM.getActiveWindow();
|
|
@@ -258,10 +446,17 @@ export class ContextView extends Disposable {
|
|
|
258
446
|
const anchorAlignment = this.delegate.anchorAlignment;
|
|
259
447
|
const anchorAxisAlignment = this.delegate.anchorAxisAlignment;
|
|
260
448
|
const layoutResult = layout2d(viewport, view, anchor, { anchorAlignment, anchorPosition, anchorAxisAlignment });
|
|
261
|
-
const
|
|
449
|
+
const adjusted = avoidWindowControlsOverlay(getVisibleWCOTitlebarAreaRect(containerWindow), viewport, view, layoutResult);
|
|
450
|
+
const { top, left } = adjusted;
|
|
262
451
|
this.view.classList.remove('top', 'bottom', 'left', 'right');
|
|
263
|
-
|
|
264
|
-
|
|
452
|
+
if (adjusted === layoutResult) {
|
|
453
|
+
this.view.classList.add(layoutResult.anchorPosition === 0 /* AnchorPosition.BELOW */ ? 'bottom' : 'top');
|
|
454
|
+
this.view.classList.add(layoutResult.anchorAlignment === 0 /* AnchorAlignment.LEFT */ ? 'left' : 'right');
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
this.view.classList.add(top >= anchor.top + anchor.height ? 'bottom' : 'top');
|
|
458
|
+
this.view.classList.add(left >= anchor.left ? 'left' : 'right');
|
|
459
|
+
}
|
|
265
460
|
this.view.style.top = `${top - positioningOrigin.top}px`;
|
|
266
461
|
this.view.style.left = `${left - positioningOrigin.left}px`;
|
|
267
462
|
this.view.style.width = 'initial';
|
|
@@ -281,8 +476,25 @@ export class ContextView extends Disposable {
|
|
|
281
476
|
const toDispose = this.toDisposeOnClean;
|
|
282
477
|
this.toDisposeOnClean = Disposable.None;
|
|
283
478
|
delegate.onHide?.(data);
|
|
479
|
+
const isPopover = isPopoverDOMPosition(this.domPosition);
|
|
480
|
+
if (isPopover) {
|
|
481
|
+
// Stop tracking the owner first, then restore focus before the view
|
|
482
|
+
// becomes inert or hidden, so that focus never leaves the owner
|
|
483
|
+
this.toDisposeOnPopoverHide.clear();
|
|
484
|
+
const showCount = this.showCount;
|
|
485
|
+
this.restorePopoverFocus();
|
|
486
|
+
if (this.showCount !== showCount) {
|
|
487
|
+
// Restoring focus showed another view, for example an input box
|
|
488
|
+
// message; it now owns the view, so only clean up this rendering
|
|
489
|
+
toDispose.dispose();
|
|
490
|
+
return;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
else {
|
|
494
|
+
this.focusToRestore = null;
|
|
495
|
+
}
|
|
284
496
|
const closeAnimation = delegate.closeAnimation;
|
|
285
|
-
if (!skipAnimation && closeAnimation && closeAnimation.duration > 0 && this.
|
|
497
|
+
if (!skipAnimation && closeAnimation && closeAnimation.duration > 0 && hasRequiredAncestorClasses(this.view, closeAnimation.requiredAncestorClasses)) {
|
|
286
498
|
this.view.style.setProperty(CONTEXT_VIEW_CLOSE_ANIMATION_DURATION_VARIABLE, `${closeAnimation.duration}ms`);
|
|
287
499
|
this.prepareMenuCloseAnimation();
|
|
288
500
|
this.view.inert = true;
|
|
@@ -295,8 +507,11 @@ export class ContextView extends Disposable {
|
|
|
295
507
|
};
|
|
296
508
|
return;
|
|
297
509
|
}
|
|
298
|
-
toDispose.dispose();
|
|
299
510
|
DOM.hide(this.view);
|
|
511
|
+
if (isPopover) {
|
|
512
|
+
this.hidePopover();
|
|
513
|
+
}
|
|
514
|
+
toDispose.dispose();
|
|
300
515
|
}
|
|
301
516
|
isVisible() {
|
|
302
517
|
return !!this.delegate;
|
|
@@ -312,9 +527,12 @@ export class ContextView extends Disposable {
|
|
|
312
527
|
this.view.style.removeProperty(CONTEXT_VIEW_CLOSE_ANIMATION_DURATION_VARIABLE);
|
|
313
528
|
this.view.style.removeProperty(CONTEXT_VIEW_MENU_MOTION_CLOSE_START_OPACITY_VARIABLE);
|
|
314
529
|
this.view.style.removeProperty(CONTEXT_VIEW_MENU_MOTION_CLOSE_START_TRANSFORM_VARIABLE);
|
|
315
|
-
hidingContextView.toDispose.dispose();
|
|
316
530
|
DOM.hide(this.view);
|
|
317
531
|
this.view.inert = false;
|
|
532
|
+
if (isPopoverDOMPosition(this.domPosition)) {
|
|
533
|
+
this.hidePopover();
|
|
534
|
+
}
|
|
535
|
+
hidingContextView.toDispose.dispose();
|
|
318
536
|
}
|
|
319
537
|
prepareMenuCloseAnimation() {
|
|
320
538
|
if (!this.view.classList.contains(CONTEXT_VIEW_MENU_MOTION_CLASS)) {
|
|
@@ -328,25 +546,6 @@ export class ContextView extends Disposable {
|
|
|
328
546
|
this.view.style.setProperty(CONTEXT_VIEW_MENU_MOTION_CLOSE_START_OPACITY_VARIABLE, computedStyle.opacity);
|
|
329
547
|
this.view.style.setProperty(CONTEXT_VIEW_MENU_MOTION_CLOSE_START_TRANSFORM_VARIABLE, computedStyle.transform);
|
|
330
548
|
}
|
|
331
|
-
hasRequiredAncestorClasses(classNames) {
|
|
332
|
-
if (!classNames?.length) {
|
|
333
|
-
return true;
|
|
334
|
-
}
|
|
335
|
-
for (let candidate = this.view; candidate;) {
|
|
336
|
-
const current = candidate;
|
|
337
|
-
if (classNames.every(className => current.classList.contains(className))) {
|
|
338
|
-
return true;
|
|
339
|
-
}
|
|
340
|
-
if (current.parentElement) {
|
|
341
|
-
candidate = current.parentElement;
|
|
342
|
-
}
|
|
343
|
-
else {
|
|
344
|
-
const root = current.getRootNode();
|
|
345
|
-
candidate = root instanceof ShadowRoot && DOM.isHTMLElement(root.host) ? root.host : null;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
return false;
|
|
349
|
-
}
|
|
350
549
|
onDOMEvent(e, onCapture) {
|
|
351
550
|
if (this.delegate) {
|
|
352
551
|
if (this.delegate.onDOMEvent) {
|
|
@@ -358,11 +557,38 @@ export class ContextView extends Disposable {
|
|
|
358
557
|
}
|
|
359
558
|
}
|
|
360
559
|
dispose() {
|
|
361
|
-
this.hide();
|
|
560
|
+
this.hide(undefined, true);
|
|
362
561
|
this.completeHideAnimation();
|
|
363
562
|
super.dispose();
|
|
364
563
|
}
|
|
365
564
|
}
|
|
565
|
+
// Mirrors the popover reset in contextview.css, whose rules do not reach an
|
|
566
|
+
// owner inside a shadow root
|
|
567
|
+
const POPOVER_RESET_CSS = /* css */ `
|
|
568
|
+
.context-view[popover],
|
|
569
|
+
.shadow-root-host[popover] {
|
|
570
|
+
position: fixed;
|
|
571
|
+
inset: auto;
|
|
572
|
+
width: auto;
|
|
573
|
+
height: auto;
|
|
574
|
+
margin: 0;
|
|
575
|
+
padding: 0;
|
|
576
|
+
border: 0;
|
|
577
|
+
overflow: visible;
|
|
578
|
+
color: inherit;
|
|
579
|
+
background: transparent;
|
|
580
|
+
}
|
|
581
|
+
`;
|
|
582
|
+
const shadowRootsWithPopoverReset = new WeakSet();
|
|
583
|
+
function adoptPopoverResetStyles(owner) {
|
|
584
|
+
const shadowRoot = DOM.getShadowRoot(owner);
|
|
585
|
+
if (shadowRoot && !shadowRootsWithPopoverReset.has(shadowRoot)) {
|
|
586
|
+
shadowRootsWithPopoverReset.add(shadowRoot);
|
|
587
|
+
const style = owner.ownerDocument.createElement('style');
|
|
588
|
+
style.textContent = POPOVER_RESET_CSS;
|
|
589
|
+
shadowRoot.appendChild(style);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
366
592
|
const SHADOW_ROOT_CSS = /* css */ `
|
|
367
593
|
:host {
|
|
368
594
|
all: initial; /* 1st rule so subsequent properties are reset. */
|