monaco-editor-core 0.55.0-dev-20251008 → 0.55.0-dev-20251010
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.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.ru.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 +3 -1
- package/esm/vs/base/browser/history.js.map +1 -1
- package/esm/vs/base/browser/markdownRenderer.js.map +1 -1
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
- package/esm/vs/base/browser/ui/toolbar/toolbar.js +4 -1
- package/esm/vs/base/browser/ui/toolbar/toolbar.js.map +1 -1
- package/esm/vs/base/browser/ui/tree/tree.js.map +1 -1
- package/esm/vs/base/common/codiconsLibrary.js +9 -1
- package/esm/vs/base/common/codiconsLibrary.js.map +1 -1
- package/esm/vs/base/common/history.js.map +1 -1
- package/esm/vs/base/common/worker/webWorker.js.map +1 -1
- package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +8 -16
- package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
- package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
- package/esm/vs/editor/browser/widget/markdownRenderer/browser/editorMarkdownCodeBlockRenderer.js +77 -0
- package/esm/vs/editor/browser/widget/markdownRenderer/browser/editorMarkdownCodeBlockRenderer.js.map +1 -0
- package/esm/vs/editor/common/config/editorConfiguration.js.map +1 -1
- package/esm/vs/editor/common/config/editorZoom.js.map +1 -1
- package/esm/vs/editor/common/core/text/abstractText.js +5 -1
- package/esm/vs/editor/common/core/text/abstractText.js.map +1 -1
- package/esm/vs/editor/common/diff/documentDiffProvider.js.map +1 -1
- package/esm/vs/editor/common/editorCommon.js.map +1 -1
- package/esm/vs/editor/common/languages/language.js.map +1 -1
- package/esm/vs/editor/common/languages/languageConfigurationRegistry.js.map +1 -1
- package/esm/vs/editor/common/languages.js.map +1 -1
- package/esm/vs/editor/common/model/tokens/treeSitter/tokenStore.js +2 -1
- package/esm/vs/editor/common/model/tokens/treeSitter/tokenStore.js.map +1 -1
- package/esm/vs/editor/common/textModelBracketPairs.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findController.js +54 -61
- package/esm/vs/editor/contrib/find/browser/findController.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js +5 -8
- package/esm/vs/editor/contrib/hover/browser/glyphHoverWidget.js.map +1 -1
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +18 -23
- package/esm/vs/editor/contrib/hover/browser/markdownHoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace.js +2 -2
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +10 -12
- package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js +9 -13
- package/esm/vs/editor/contrib/inlineCompletions/browser/hintsWidget/hoverParticipant.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js +8 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorMenu.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsModel.js +1 -1
- 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 +31 -31
- package/esm/vs/editor/contrib/linkedEditing/browser/linkedEditing.js +2 -2
- package/esm/vs/editor/contrib/links/browser/links.js +10 -10
- package/esm/vs/editor/contrib/message/browser/messageController.js +2 -2
- package/esm/vs/editor/contrib/message/browser/messageController.js.map +1 -1
- package/esm/vs/editor/contrib/multicursor/browser/multicursor.js +22 -22
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHints.js +1 -1
- package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +10 -12
- 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/quickAccess/browser/gotoLineQuickAccess.js +5 -5
- package/esm/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +32 -32
- package/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +2 -2
- package/esm/vs/editor/contrib/rename/browser/rename.js +11 -11
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js +7 -7
- package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
- package/esm/vs/editor/contrib/smartSelect/browser/smartSelect.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetController2.js +4 -4
- package/esm/vs/editor/contrib/snippet/browser/snippetVariables.js +4 -4
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +11 -11
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js.map +1 -1
- package/esm/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggest.js +8 -8
- package/esm/vs/editor/contrib/suggest/browser/suggestController.js +10 -10
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js +18 -24
- package/esm/vs/editor/contrib/suggest/browser/suggestWidget.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js +15 -18
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetDetails.js.map +1 -1
- package/esm/vs/editor/contrib/suggest/browser/suggestWidgetRenderer.js +2 -2
- package/esm/vs/editor/contrib/suggest/browser/wordContextKey.js +1 -1
- package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.js +33 -33
- package/esm/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +4 -4
- package/esm/vs/editor/contrib/tokenization/browser/tokenization.js +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +7 -6
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js.map +1 -1
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +29 -32
- package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
- package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js +5 -5
- package/esm/vs/editor/contrib/wordHighlighter/browser/highlightDecorations.js +9 -9
- package/esm/vs/editor/contrib/wordHighlighter/browser/wordHighlighter.js +3 -3
- package/esm/vs/editor/contrib/wordOperations/browser/wordOperations.js +1 -1
- package/esm/vs/editor/editor.api.d.ts +5 -4
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js +10 -5
- package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
- package/esm/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +62 -62
- package/esm/vs/platform/action/common/actionCommonCategories.js +6 -6
- package/esm/vs/platform/actionWidget/browser/actionList.js +4 -4
- package/esm/vs/platform/actionWidget/browser/actionWidget.js +7 -7
- package/esm/vs/platform/actions/browser/actionViewItemService.js.map +1 -1
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js +21 -18
- package/esm/vs/platform/actions/browser/menuEntryActionViewItem.js.map +1 -1
- package/esm/vs/platform/actions/browser/toolbar.js +2 -2
- package/esm/vs/platform/actions/common/actions.js +1 -0
- package/esm/vs/platform/actions/common/actions.js.map +1 -1
- package/esm/vs/platform/actions/common/menuService.js +2 -2
- package/esm/vs/platform/configuration/common/configuration.js.map +1 -1
- package/esm/vs/platform/configuration/common/configurationRegistry.js +10 -10
- package/esm/vs/platform/contextkey/browser/contextKeyService.js +1 -1
- package/esm/vs/platform/contextkey/common/contextkey.js +9 -9
- package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
- package/esm/vs/platform/contextkey/common/contextkeys.js +9 -9
- package/esm/vs/platform/contextkey/common/scanner.js +5 -5
- package/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +1 -1
- package/esm/vs/platform/keybinding/common/abstractKeybindingService.js +4 -4
- package/esm/vs/platform/keybinding/common/keybinding.js.map +1 -1
- package/esm/vs/platform/list/browser/listService.js +27 -27
- package/esm/vs/platform/log/common/log.js.map +1 -1
- package/esm/vs/platform/markdown/browser/markdownRenderer.js +72 -0
- package/esm/vs/platform/markdown/browser/markdownRenderer.js.map +1 -0
- package/esm/vs/platform/markers/common/markerService.js +2 -2
- package/esm/vs/platform/markers/common/markers.js +6 -6
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +7 -7
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInput.js +29 -19
- package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputActions.js +5 -5
- package/esm/vs/platform/quickinput/browser/quickInputController.js +7 -6
- package/esm/vs/platform/quickinput/browser/quickInputController.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputList.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/quickInputUtils.js +1 -1
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeAccessibilityProvider.js +1 -1
- package/esm/vs/platform/quickinput/common/quickInput.js.map +1 -1
- package/esm/vs/platform/theme/common/colorUtils.js +2 -2
- package/esm/vs/platform/theme/common/colors/baseColors.js +17 -17
- package/esm/vs/platform/theme/common/colors/chartsColors.js +8 -8
- package/esm/vs/platform/theme/common/colors/editorColors.js +95 -95
- package/esm/vs/platform/theme/common/colors/inputColors.js +47 -47
- package/esm/vs/platform/theme/common/colors/listColors.js +36 -36
- package/esm/vs/platform/theme/common/colors/menuColors.js +7 -7
- package/esm/vs/platform/theme/common/colors/minimapColors.js +11 -11
- package/esm/vs/platform/theme/common/colors/miscColors.js +15 -15
- package/esm/vs/platform/theme/common/colors/quickpickColors.js +9 -9
- package/esm/vs/platform/theme/common/colors/searchColors.js +3 -3
- package/esm/vs/platform/theme/common/iconRegistry.js +6 -6
- package/esm/vs/platform/undoRedo/common/undoRedoService.js +20 -20
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/esm/vs/platform/workspace/common/workspaceTrust.js.map +1 -1
- package/monaco.d.ts +5 -4
- package/package.json +2 -2
- package/version.txt +1 -1
- package/esm/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js +0 -111
- package/esm/vs/editor/browser/widget/markdownRenderer/browser/markdownRenderer.js.map +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { ActionBar } from '../actionbar/actionbar.js';
|
|
6
6
|
import { DropdownMenuActionViewItem } from '../dropdown/dropdownActionViewItem.js';
|
|
7
|
-
import { Action, SubmenuAction } from '../../../common/actions.js';
|
|
7
|
+
import { Action, Separator, SubmenuAction } from '../../../common/actions.js';
|
|
8
8
|
import { Codicon } from '../../../common/codicons.js';
|
|
9
9
|
import { ThemeIcon } from '../../../common/themables.js';
|
|
10
10
|
import { EventMultiplexer } from '../../../common/event.js';
|
|
@@ -107,6 +107,9 @@ export class ToolBar extends Disposable {
|
|
|
107
107
|
this.toggleMenuAction.menuActions = secondaryActions.slice(0);
|
|
108
108
|
primaryActionsToSet.push(this.toggleMenuAction);
|
|
109
109
|
}
|
|
110
|
+
if (primaryActionsToSet.length > 0 && this.options.trailingSeparator) {
|
|
111
|
+
primaryActionsToSet.push(new Separator());
|
|
112
|
+
}
|
|
110
113
|
primaryActionsToSet.forEach(action => {
|
|
111
114
|
this.actionBar.push(action, { icon: this.options.icon ?? true, label: this.options.label ?? false, keybinding: this.getKeybindingLabel(action) });
|
|
112
115
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["vs/base/browser/ui/toolbar/toolbar.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAAE,SAAS,EAA+C,MAAM,2BAA2B,CAAC;AAEnG,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,MAAM,EAA0B,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3F,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,eAAe,CAAC;AACvB,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAgC9E;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,UAAU;IAUtC,IAAI,6BAA6B,KAAK,OAAO,IAAI,CAAC,8BAA8B,CAAC,KAAK,CAAC,CAAC,CAAC;IAGzF,YAAY,SAAsB,EAAE,mBAAyC,EAAE,UAA2B,EAAE,WAAW,uCAA+B,EAAE;QACvJ,KAAK,EAAE,CAAC;QATD,2BAAsB,GAAiC,EAAE,CAAC;QAC1D,wBA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CAAC,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;IAEQ,OAAO;QACf,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;QAC3B,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;CACD;AAED,MAAM,OAAO,gBAAiB,SAAQ,MAAM;aAE3B,OAAE,GAAG,qBAAqB,CAAC;IAK3C,YAAY,kBAA8B,EAAE,KAAc;QACzD,KAAK,GAAG,KAAK,IAAI,GAAG,CAAC,QAAQ,CAAC,EAAa,EAAE,iBAAiB,CAAC,CAAC;QAChE,KAAK,CAAC,gBAAgB,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;QAEnD,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IAC9C,CAAC;IAEQ,KAAK,CAAC,GAAG;QACjB,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW;QACd,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;IAED,IAAI,WAAW,CAAC,OAA+B;QAC9C,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;IAC7B,CAAC","file":"toolbar.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 { IContextMenuProvider } from '../../contextmenu.js';\nimport { ActionBar, ActionsOrientation, IActionViewItemProvider } from '../actionbar/actionbar.js';\nimport { AnchorAlignment } from '../contextview/contextview.js';\nimport { DropdownMenuActionViewItem } from '../dropdown/dropdownActionViewItem.js';\nimport { Action, IAction, IActionRunner, SubmenuAction } from '../../../common/actions.js';\nimport { Codicon } from '../../../common/codicons.js';\nimport { ThemeIcon } from '../../../common/themables.js';\nimport { EventMultiplexer } from '../../../common/event.js';\nimport { ResolvedKeybinding } from '../../../common/keybindings.js';\nimport { Disposable, DisposableStore } from '../../../common/lifecycle.js';\nimport './toolbar.css';\nimport * as nls from '../../../../nls.js';\nimport { IHoverDelegate } from '../hover/hoverDelegate.js';\nimport { createInstantHoverDelegate } from '../hover/hoverDelegateFactory.js';\n\nexport interface IToolBarOptions {\n\torientation?: ActionsOrientation;\n\tactionViewItemProvider?: IActionViewItemProvider;\n\tariaLabel?: string;\n\tgetKeyBinding?: (action: IAction) => ResolvedKeybinding | undefined;\n\tactionRunner?: IActionRunner;\n\ttoggleMenuTitle?: string;\n\tanchorAlignmentProvider?: () => AnchorAlignment;\n\trenderDropdownAsChildElement?: boolean;\n\tmoreIcon?: ThemeIcon;\n\tallowContextMenu?: boolean;\n\tskipTelemetry?: boolean;\n\thoverDelegate?: IHoverDelegate;\n\n\t/**\n\t * If true, toggled primary items are highlighted with a background color.\n\t */\n\thighlightToggledItems?: boolean;\n\n\t/**\n\t * Render action with icons (default: `true`)\n\t */\n\ticon?: boolean;\n\n\t/**\n\t * Render action with label (default: `false`)\n\t */\n\tlabel?: boolean;\n}\n\n/**\n * A widget that combines an action bar for primary actions and a dropdown for secondary actions.\n */\nexport class ToolBar extends Disposable {\n\tprivate options: IToolBarOptions;\n\tprotected readonly actionBar: ActionBar;\n\tprivate toggleMenuAction: ToggleMenuAction;\n\tprivate toggleMenuActionViewItem: DropdownMenuActionViewItem | undefined;\n\tprivate submenuActionViewItems: DropdownMenuActionViewItem[] = [];\n\tprivate hasSecondaryActions: boolean = false;\n\tprivate readonly element: HTMLElement;\n\n\tprivate _onDidChangeDropdownVisibility = this._register(new EventMultiplexer<boolean>());\n\tget onDidChangeDropdownVisibility() { return this._onDidChangeDropdownVisibility.event; }\n\tprivate readonly disposables = this._register(new DisposableStore());\n\n\tconstructor(container: HTMLElement, contextMenuProvider: IContextMenuProvider, options: IToolBarOptions = { orientation: ActionsOrientation.HORIZONTAL }) {\n\t\tsuper();\n\n\t\toptions.hoverDelegate = options.hoverDelegate ?? this._register(createInstantHoverDelegate());\n\t\tthis.options = options;\n\n\t\tthis.toggleMenuAction = this._register(new ToggleMenuAction(() => this.toggleMenuActionViewItem?.show(), options.toggleMenuTitle));\n\n\t\tthis.element = document.createElement('div');\n\t\tthis.element.className = 'monaco-toolbar';\n\t\tcontainer.appendChild(this.element);\n\n\t\tthis.actionBar = this._register(new ActionBar(this.element, {\n\t\t\torientation: options.orientation,\n\t\t\tariaLabel: options.ariaLabel,\n\t\t\tactionRunner: options.actionRunner,\n\t\t\tallowContextMenu: options.allowContextMenu,\n\t\t\thighlightToggledItems: options.highlightToggledItems,\n\t\t\thoverDelegate: options.hoverDelegate,\n\t\t\tactionViewItemProvider: (action, viewItemOptions) => {\n\t\t\t\tif (action.id === ToggleMenuAction.ID) {\n\t\t\t\t\tthis.toggleMenuActionViewItem = new DropdownMenuActionViewItem(\n\t\t\t\t\t\taction,\n\t\t\t\t\t\t(<ToggleMenuAction>action).menuActions,\n\t\t\t\t\t\tcontextMenuProvider,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tactionViewItemProvider: this.options.actionViewItemProvider,\n\t\t\t\t\t\t\tactionRunner: this.actionRunner,\n\t\t\t\t\t\t\tkeybindingProvider: this.options.getKeyBinding,\n\t\t\t\t\t\t\tclassNames: ThemeIcon.asClassNameArray(options.moreIcon ?? Codicon.toolBarMore),\n\t\t\t\t\t\t\tanchorAlignmentProvider: this.options.anchorAlignmentProvider,\n\t\t\t\t\t\t\tmenuAsChild: !!this.options.renderDropdownAsChildElement,\n\t\t\t\t\t\t\tskipTelemetry: this.options.skipTelemetry,\n\t\t\t\t\t\t\tisMenu: true,\n\t\t\t\t\t\t\thoverDelegate: this.options.hoverDelegate\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tthis.toggleMenuActionViewItem.setActionContext(this.actionBar.context);\n\t\t\t\t\tthis.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility));\n\n\t\t\t\t\treturn this.toggleMenuActionViewItem;\n\t\t\t\t}\n\n\t\t\t\tif (options.actionViewItemProvider) {\n\t\t\t\t\tconst result = options.actionViewItemProvider(action, viewItemOptions);\n\n\t\t\t\t\tif (result) {\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (action instanceof SubmenuAction) {\n\t\t\t\t\tconst result = new DropdownMenuActionViewItem(\n\t\t\t\t\t\taction,\n\t\t\t\t\t\taction.actions,\n\t\t\t\t\t\tcontextMenuProvider,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tactionViewItemProvider: this.options.actionViewItemProvider,\n\t\t\t\t\t\t\tactionRunner: this.actionRunner,\n\t\t\t\t\t\t\tkeybindingProvider: this.options.getKeyBinding,\n\t\t\t\t\t\t\tclassNames: action.class,\n\t\t\t\t\t\t\tanchorAlignmentProvider: this.options.anchorAlignmentProvider,\n\t\t\t\t\t\t\tmenuAsChild: !!this.options.renderDropdownAsChildElement,\n\t\t\t\t\t\t\tskipTelemetry: this.options.skipTelemetry,\n\t\t\t\t\t\t\thoverDelegate: this.options.hoverDelegate\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tresult.setActionContext(this.actionBar.context);\n\t\t\t\t\tthis.submenuActionViewItems.push(result);\n\t\t\t\t\tthis.disposables.add(this._onDidChangeDropdownVisibility.add(result.onDidChangeVisibility));\n\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}));\n\t}\n\n\tset actionRunner(actionRunner: IActionRunner) {\n\t\tthis.actionBar.actionRunner = actionRunner;\n\t}\n\n\tget actionRunner(): IActionRunner {\n\t\treturn this.actionBar.actionRunner;\n\t}\n\n\tset context(context: unknown) {\n\t\tthis.actionBar.context = context;\n\t\tthis.toggleMenuActionViewItem?.setActionContext(context);\n\t\tfor (const actionViewItem of this.submenuActionViewItems) {\n\t\t\tactionViewItem.setActionContext(context);\n\t\t}\n\t}\n\n\tgetElement(): HTMLElement {\n\t\treturn this.element;\n\t}\n\n\tgetItemAction(indexOrElement: number | HTMLElement) {\n\t\treturn this.actionBar.getAction(indexOrElement);\n\t}\n\n\tsetActions(primaryActions: ReadonlyArray<IAction>, secondaryActions?: ReadonlyArray<IAction>): void {\n\t\tthis.clear();\n\n\t\tconst primaryActionsToSet = primaryActions ? primaryActions.slice(0) : [];\n\n\t\t// Inject additional action to open secondary actions if present\n\t\tthis.hasSecondaryActions = !!(secondaryActions && secondaryActions.length > 0);\n\t\tif (this.hasSecondaryActions && secondaryActions) {\n\t\t\tthis.toggleMenuAction.menuActions = secondaryActions.slice(0);\n\t\t\tprimaryActionsToSet.push(this.toggleMenuAction);\n\t\t}\n\n\t\tprimaryActionsToSet.forEach(action => {\n\t\t\tthis.actionBar.push(action, { icon: this.options.icon ?? true, label: this.options.label ?? false, keybinding: this.getKeybindingLabel(action) });\n\t\t});\n\t}\n\n\tprivate getKeybindingLabel(action: IAction): string | undefined {\n\t\tconst key = this.options.getKeyBinding?.(action);\n\n\t\treturn key?.getLabel() ?? undefined;\n\t}\n\n\tprivate clear(): void {\n\t\tthis.submenuActionViewItems = [];\n\t\tthis.disposables.clear();\n\t\tthis.actionBar.clear();\n\t}\n\n\toverride dispose(): void {\n\t\tthis.clear();\n\t\tthis.disposables.dispose();\n\t\tsuper.dispose();\n\t}\n}\n\nexport class ToggleMenuAction extends Action {\n\n\tstatic readonly ID = 'toolbar.toggle.more';\n\n\tprivate _menuActions: ReadonlyArray<IAction>;\n\tprivate toggleDropdownMenu: () => void;\n\n\tconstructor(toggleDropdownMenu: () => void, title?: string) {\n\t\ttitle = title || nls.localize('moreActions', \"More Actions...\");\n\t\tsuper(ToggleMenuAction.ID, title, undefined, true);\n\n\t\tthis._menuActions = [];\n\t\tthis.toggleDropdownMenu = toggleDropdownMenu;\n\t}\n\n\toverride async run(): Promise<void> {\n\t\tthis.toggleDropdownMenu();\n\t}\n\n\tget menuActions(): ReadonlyArray<IAction> {\n\t\treturn this._menuActions;\n\t}\n\n\tset menuActions(actions: ReadonlyArray<IAction>) {\n\t\tthis._menuActions = actions;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["vs/base/browser/ui/toolbar/toolbar.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAAE,SAAS,EAA+C,MAAM,2BAA2B,CAAC;AAEnG,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,MAAM,EAA0B,SAAS,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtG,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,eAAe,CAAC;AACvB,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAiC9E;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,UAAU;IAUtC,IAAI,6BAA6B,KAAK,OAAO,IAAI,CAAC,8BAA8B,CAAC,KAAK,CAAC,CAAC,CAAC;IAGzF,YAAY,SAAsB,EAAE,mBAAyC,EAAE,UAA2B,EAAE,WAAW,uCAA+B,EAAE;QACvJ,KAAK,EAAE,CAAC;QATD,2BAAsB,GAAiC,EAAE,CAAC;QAC1D,wBAAmB,GAAY,KAAK,CAAC;QAGrC,mCAA8B,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,gBAAgB,EAAW,CAAC,CAAC;QAExE,gBAAW,GAAG,IAAI,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,GAAG,EAAE,CAAC;QACjC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;IAEQ,OAAO;QACf,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;QAC3B,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;CACD;AAED,MAAM,OAAO,gBAAiB,SAAQ,MAAM;aAE3B,OAAE,GAAG,qBAAqB,CAAC;IAK3C,YAAY,kBAA8B,EAAE,KAAc;QACzD,KAAK,GAAG,KAAK,IAAI,GAAG,CAAC,QAAQ,CAAC,EAAa,EAAE,iBAAiB,CAAC,CAAC;QAChE,KAAK,CAAC,gBAAgB,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;QAEnD,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IAC9C,CAAC;IAEQ,KAAK,CAAC,GAAG;QACjB,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW;QACd,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;IAED,IAAI,WAAW,CAAC,OAA+B;QAC9C,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;IAC7B,CAAC","file":"toolbar.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 { IContextMenuProvider } from '../../contextmenu.js';\nimport { ActionBar, ActionsOrientation, IActionViewItemProvider } from '../actionbar/actionbar.js';\nimport { AnchorAlignment } from '../contextview/contextview.js';\nimport { DropdownMenuActionViewItem } from '../dropdown/dropdownActionViewItem.js';\nimport { Action, IAction, IActionRunner, Separator, SubmenuAction } from '../../../common/actions.js';\nimport { Codicon } from '../../../common/codicons.js';\nimport { ThemeIcon } from '../../../common/themables.js';\nimport { EventMultiplexer } from '../../../common/event.js';\nimport { ResolvedKeybinding } from '../../../common/keybindings.js';\nimport { Disposable, DisposableStore } from '../../../common/lifecycle.js';\nimport './toolbar.css';\nimport * as nls from '../../../../nls.js';\nimport { IHoverDelegate } from '../hover/hoverDelegate.js';\nimport { createInstantHoverDelegate } from '../hover/hoverDelegateFactory.js';\n\nexport interface IToolBarOptions {\n\torientation?: ActionsOrientation;\n\tactionViewItemProvider?: IActionViewItemProvider;\n\tariaLabel?: string;\n\tgetKeyBinding?: (action: IAction) => ResolvedKeybinding | undefined;\n\tactionRunner?: IActionRunner;\n\ttoggleMenuTitle?: string;\n\tanchorAlignmentProvider?: () => AnchorAlignment;\n\trenderDropdownAsChildElement?: boolean;\n\tmoreIcon?: ThemeIcon;\n\tallowContextMenu?: boolean;\n\tskipTelemetry?: boolean;\n\thoverDelegate?: IHoverDelegate;\n\ttrailingSeparator?: boolean;\n\n\t/**\n\t * If true, toggled primary items are highlighted with a background color.\n\t */\n\thighlightToggledItems?: boolean;\n\n\t/**\n\t * Render action with icons (default: `true`)\n\t */\n\ticon?: boolean;\n\n\t/**\n\t * Render action with label (default: `false`)\n\t */\n\tlabel?: boolean;\n}\n\n/**\n * A widget that combines an action bar for primary actions and a dropdown for secondary actions.\n */\nexport class ToolBar extends Disposable {\n\tprivate options: IToolBarOptions;\n\tprotected readonly actionBar: ActionBar;\n\tprivate toggleMenuAction: ToggleMenuAction;\n\tprivate toggleMenuActionViewItem: DropdownMenuActionViewItem | undefined;\n\tprivate submenuActionViewItems: DropdownMenuActionViewItem[] = [];\n\tprivate hasSecondaryActions: boolean = false;\n\tprivate readonly element: HTMLElement;\n\n\tprivate _onDidChangeDropdownVisibility = this._register(new EventMultiplexer<boolean>());\n\tget onDidChangeDropdownVisibility() { return this._onDidChangeDropdownVisibility.event; }\n\tprivate readonly disposables = this._register(new DisposableStore());\n\n\tconstructor(container: HTMLElement, contextMenuProvider: IContextMenuProvider, options: IToolBarOptions = { orientation: ActionsOrientation.HORIZONTAL }) {\n\t\tsuper();\n\n\t\toptions.hoverDelegate = options.hoverDelegate ?? this._register(createInstantHoverDelegate());\n\t\tthis.options = options;\n\n\t\tthis.toggleMenuAction = this._register(new ToggleMenuAction(() => this.toggleMenuActionViewItem?.show(), options.toggleMenuTitle));\n\n\t\tthis.element = document.createElement('div');\n\t\tthis.element.className = 'monaco-toolbar';\n\t\tcontainer.appendChild(this.element);\n\n\t\tthis.actionBar = this._register(new ActionBar(this.element, {\n\t\t\torientation: options.orientation,\n\t\t\tariaLabel: options.ariaLabel,\n\t\t\tactionRunner: options.actionRunner,\n\t\t\tallowContextMenu: options.allowContextMenu,\n\t\t\thighlightToggledItems: options.highlightToggledItems,\n\t\t\thoverDelegate: options.hoverDelegate,\n\t\t\tactionViewItemProvider: (action, viewItemOptions) => {\n\t\t\t\tif (action.id === ToggleMenuAction.ID) {\n\t\t\t\t\tthis.toggleMenuActionViewItem = new DropdownMenuActionViewItem(\n\t\t\t\t\t\taction,\n\t\t\t\t\t\t(<ToggleMenuAction>action).menuActions,\n\t\t\t\t\t\tcontextMenuProvider,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tactionViewItemProvider: this.options.actionViewItemProvider,\n\t\t\t\t\t\t\tactionRunner: this.actionRunner,\n\t\t\t\t\t\t\tkeybindingProvider: this.options.getKeyBinding,\n\t\t\t\t\t\t\tclassNames: ThemeIcon.asClassNameArray(options.moreIcon ?? Codicon.toolBarMore),\n\t\t\t\t\t\t\tanchorAlignmentProvider: this.options.anchorAlignmentProvider,\n\t\t\t\t\t\t\tmenuAsChild: !!this.options.renderDropdownAsChildElement,\n\t\t\t\t\t\t\tskipTelemetry: this.options.skipTelemetry,\n\t\t\t\t\t\t\tisMenu: true,\n\t\t\t\t\t\t\thoverDelegate: this.options.hoverDelegate\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tthis.toggleMenuActionViewItem.setActionContext(this.actionBar.context);\n\t\t\t\t\tthis.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility));\n\n\t\t\t\t\treturn this.toggleMenuActionViewItem;\n\t\t\t\t}\n\n\t\t\t\tif (options.actionViewItemProvider) {\n\t\t\t\t\tconst result = options.actionViewItemProvider(action, viewItemOptions);\n\n\t\t\t\t\tif (result) {\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (action instanceof SubmenuAction) {\n\t\t\t\t\tconst result = new DropdownMenuActionViewItem(\n\t\t\t\t\t\taction,\n\t\t\t\t\t\taction.actions,\n\t\t\t\t\t\tcontextMenuProvider,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tactionViewItemProvider: this.options.actionViewItemProvider,\n\t\t\t\t\t\t\tactionRunner: this.actionRunner,\n\t\t\t\t\t\t\tkeybindingProvider: this.options.getKeyBinding,\n\t\t\t\t\t\t\tclassNames: action.class,\n\t\t\t\t\t\t\tanchorAlignmentProvider: this.options.anchorAlignmentProvider,\n\t\t\t\t\t\t\tmenuAsChild: !!this.options.renderDropdownAsChildElement,\n\t\t\t\t\t\t\tskipTelemetry: this.options.skipTelemetry,\n\t\t\t\t\t\t\thoverDelegate: this.options.hoverDelegate\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tresult.setActionContext(this.actionBar.context);\n\t\t\t\t\tthis.submenuActionViewItems.push(result);\n\t\t\t\t\tthis.disposables.add(this._onDidChangeDropdownVisibility.add(result.onDidChangeVisibility));\n\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}));\n\t}\n\n\tset actionRunner(actionRunner: IActionRunner) {\n\t\tthis.actionBar.actionRunner = actionRunner;\n\t}\n\n\tget actionRunner(): IActionRunner {\n\t\treturn this.actionBar.actionRunner;\n\t}\n\n\tset context(context: unknown) {\n\t\tthis.actionBar.context = context;\n\t\tthis.toggleMenuActionViewItem?.setActionContext(context);\n\t\tfor (const actionViewItem of this.submenuActionViewItems) {\n\t\t\tactionViewItem.setActionContext(context);\n\t\t}\n\t}\n\n\tgetElement(): HTMLElement {\n\t\treturn this.element;\n\t}\n\n\tgetItemAction(indexOrElement: number | HTMLElement) {\n\t\treturn this.actionBar.getAction(indexOrElement);\n\t}\n\n\tsetActions(primaryActions: ReadonlyArray<IAction>, secondaryActions?: ReadonlyArray<IAction>): void {\n\t\tthis.clear();\n\n\t\tconst primaryActionsToSet = primaryActions ? primaryActions.slice(0) : [];\n\n\t\t// Inject additional action to open secondary actions if present\n\t\tthis.hasSecondaryActions = !!(secondaryActions && secondaryActions.length > 0);\n\t\tif (this.hasSecondaryActions && secondaryActions) {\n\t\t\tthis.toggleMenuAction.menuActions = secondaryActions.slice(0);\n\t\t\tprimaryActionsToSet.push(this.toggleMenuAction);\n\t\t}\n\n\t\tif (primaryActionsToSet.length > 0 && this.options.trailingSeparator) {\n\t\t\tprimaryActionsToSet.push(new Separator());\n\t\t}\n\n\t\tprimaryActionsToSet.forEach(action => {\n\t\t\tthis.actionBar.push(action, { icon: this.options.icon ?? true, label: this.options.label ?? false, keybinding: this.getKeybindingLabel(action) });\n\t\t});\n\t}\n\n\tprivate getKeybindingLabel(action: IAction): string | undefined {\n\t\tconst key = this.options.getKeyBinding?.(action);\n\n\t\treturn key?.getLabel() ?? undefined;\n\t}\n\n\tprivate clear(): void {\n\t\tthis.submenuActionViewItems = [];\n\t\tthis.disposables.clear();\n\t\tthis.actionBar.clear();\n\t}\n\n\toverride dispose(): void {\n\t\tthis.clear();\n\t\tthis.disposables.dispose();\n\t\tsuper.dispose();\n\t}\n}\n\nexport class ToggleMenuAction extends Action {\n\n\tstatic readonly ID = 'toolbar.toggle.more';\n\n\tprivate _menuActions: ReadonlyArray<IAction>;\n\tprivate toggleDropdownMenu: () => void;\n\n\tconstructor(toggleDropdownMenu: () => void, title?: string) {\n\t\ttitle = title || nls.localize('moreActions', \"More Actions...\");\n\t\tsuper(ToggleMenuAction.ID, title, undefined, true);\n\n\t\tthis._menuActions = [];\n\t\tthis.toggleDropdownMenu = toggleDropdownMenu;\n\t}\n\n\toverride async run(): Promise<void> {\n\t\tthis.toggleDropdownMenu();\n\t}\n\n\tget menuActions(): ReadonlyArray<IAction> {\n\t\treturn this._menuActions;\n\t}\n\n\tset menuActions(actions: ReadonlyArray<IAction>) {\n\t\tthis._menuActions = actions;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/browser/ui/tree/tree.ts","vs/base/browser/ui/tree/tree.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AA+EhG,MAAM,CAAN,IAAY,8BAaX;AAbD,WAAY,8BAA8B;IACzC,2FAAQ,CAAA;IACR,6FAAS,CAAA;IAET;;OAEG;IACH,+GAAkB,CAAA;IAElB;;OAEG;IACH,iHAAmB,CAAA;AACpB,CAAC,EAbW,8BAA8B,KAA9B,8BAA8B,QAazC;AAgFD,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC/B,qEAAO,CAAA;IACP,qEAAO,CAAA;IACP,qEAAO,CAAA;IACP,mEAAM,CAAA;AACP,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAqCD,MAAM,OAAO,SAAU,SAAQ,KAAK;IAEnC,YAAY,IAAY,EAAE,OAAe;QACxC,KAAK,CAAC,cAAc,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC;CACD;AAED,MAAM,OAAO,UAAU;IAEtB,YAAoB,EAAe;QAAf,OAAE,GAAF,EAAE,CAAa;QAE3B,SAAI,GAAG,IAAI,OAAO,EAAQ,CAAC;IAFI,CAAC;IAIxC,GAAG,CAAC,GAAM;QACT,IAAI,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEhC,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;YACtB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAC5B,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;CACD","file":"tree.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 { IDragAndDropData } from '../../dnd.js';\nimport { IMouseEvent } from '../../mouseEvent.js';\nimport { IListDragAndDrop, IListDragOverReaction, IListElementRenderDetails, IListRenderer } from '../list/list.js';\nimport { ListViewTargetSector } from '../list/listView.js';\nimport { Event } from '../../../common/event.js';\n\nexport const enum TreeVisibility {\n\n\t/**\n\t * The tree node should be hidden.\n\t */\n\tHidden,\n\n\t/**\n\t * The tree node should be visible.\n\t */\n\tVisible,\n\n\t/**\n\t * The tree node should be visible if any of its descendants is visible.\n\t */\n\tRecurse\n}\n\n/**\n * A composed filter result containing the visibility result as well as\n * metadata.\n */\nexport interface ITreeFilterDataResult<TFilterData> {\n\n\t/**\n\t * Whether the node should be visible.\n\t */\n\tvisibility: boolean | TreeVisibility;\n\n\t/**\n\t * Metadata about the element's visibility which gets forwarded to the\n\t * renderer once the element gets rendered.\n\t */\n\tdata: TFilterData;\n}\n\n/**\n * The result of a filter call can be a boolean value indicating whether\n * the element should be visible or not, a value of type `TreeVisibility` or\n * an object composed of the visibility result as well as additional metadata\n * which gets forwarded to the renderer once the element gets rendered.\n */\nexport type TreeFilterResult<TFilterData> = boolean | TreeVisibility | ITreeFilterDataResult<TFilterData>;\n\n/**\n * A tree filter is responsible for controlling the visibility of\n * elements in a tree.\n */\nexport interface ITreeFilter<T, TFilterData = void> {\n\n\t/**\n\t * Returns whether this elements should be visible and, if affirmative,\n\t * additional metadata which gets forwarded to the renderer once the element\n\t * gets rendered.\n\t *\n\t * @param element The tree element.\n\t */\n\tfilter(element: T, parentVisibility: TreeVisibility): TreeFilterResult<TFilterData>;\n}\n\nexport interface ITreeSorter<T> {\n\tcompare(element: T, otherElement: T): number;\n}\n\nexport interface ITreeElement<T> {\n\treadonly element: T;\n\treadonly children?: Iterable<ITreeElement<T>>;\n\treadonly collapsible?: boolean;\n\treadonly collapsed?: boolean;\n}\n\nexport enum ObjectTreeElementCollapseState {\n\tExpanded,\n\tCollapsed,\n\n\t/**\n\t * If the element is already in the tree, preserve its current state. Else, expand it.\n\t */\n\tPreserveOrExpanded,\n\n\t/**\n\t * If the element is already in the tree, preserve its current state. Else, collapse it.\n\t */\n\tPreserveOrCollapsed,\n}\n\nexport interface IObjectTreeElement<T> {\n\treadonly element: T;\n\treadonly children?: Iterable<IObjectTreeElement<T>>;\n\treadonly collapsible?: boolean;\n\treadonly collapsed?: boolean | ObjectTreeElementCollapseState;\n}\n\nexport interface ITreeNode<T, TFilterData = void> {\n\treadonly element: T;\n\treadonly children: ITreeNode<T, TFilterData>[];\n\treadonly depth: number;\n\treadonly visibleChildrenCount: number;\n\treadonly visibleChildIndex: number;\n\treadonly collapsible: boolean;\n\treadonly collapsed: boolean;\n\treadonly visible: boolean;\n\treadonly filterData: TFilterData | undefined;\n}\n\nexport interface ICollapseStateChangeEvent<T, TFilterData> {\n\tnode: ITreeNode<T, TFilterData>;\n\tdeep: boolean;\n}\n\nexport interface ITreeListSpliceData<T, TFilterData> {\n\tstart: number;\n\tdeleteCount: number;\n\telements: ITreeNode<T, TFilterData>[];\n}\n\nexport interface ITreeModelSpliceEvent<T, TFilterData> {\n\tinsertedNodes: ITreeNode<T, TFilterData>[];\n\tdeletedNodes: ITreeNode<T, TFilterData>[];\n}\n\nexport interface ITreeModel<T, TFilterData, TRef> {\n\n\treadonly onDidSpliceModel: Event<ITreeModelSpliceEvent<T, TFilterData>>;\n\treadonly onDidSpliceRenderedNodes: Event<ITreeListSpliceData<T, TFilterData>>;\n\treadonly onDidChangeCollapseState: Event<ICollapseStateChangeEvent<T, TFilterData>>;\n\treadonly onDidChangeRenderNodeCount: Event<ITreeNode<T, TFilterData>>;\n\n\thas(location: TRef): boolean;\n\n\tgetListIndex(location: TRef): number;\n\tgetListRenderCount(location: TRef): number;\n\tgetNode(location?: TRef): ITreeNode<T, any>;\n\tgetNodeLocation(node: ITreeNode<T, any>): TRef;\n\tgetParentNodeLocation(location: TRef): TRef | undefined;\n\n\tgetFirstElementChild(location: TRef): T | undefined;\n\n\tisCollapsible(location: TRef): boolean;\n\tsetCollapsible(location: TRef, collapsible?: boolean): boolean;\n\tisCollapsed(location: TRef): boolean;\n\tsetCollapsed(location: TRef, collapsed?: boolean, recursive?: boolean): boolean;\n\texpandTo(location: TRef): void;\n\n\trerender(location: TRef): void;\n\trefilter(): void;\n}\n\nexport interface ITreeElementRenderDetails extends IListElementRenderDetails {\n\treadonly indent: number;\n}\n\nexport interface ITreeRenderer<T, TFilterData = void, TTemplateData = void> extends IListRenderer<ITreeNode<T, TFilterData>, TTemplateData> {\n\trenderElement(element: ITreeNode<T, TFilterData>, index: number, templateData: TTemplateData, details?: ITreeElementRenderDetails): void;\n\tdisposeElement?(element: ITreeNode<T, TFilterData>, index: number, templateData: TTemplateData, details?: ITreeElementRenderDetails): void;\n\trenderTwistie?(element: T, twistieElement: HTMLElement): boolean;\n\tonDidChangeTwistieState?: Event<T>;\n}\n\nexport interface ITreeEvent<T> {\n\treadonly elements: readonly T[];\n\treadonly browserEvent?: UIEvent;\n}\n\nexport enum TreeMouseEventTarget {\n\tUnknown,\n\tTwistie,\n\tElement,\n\tFilter\n}\n\nexport interface ITreeMouseEvent<T> {\n\treadonly browserEvent: MouseEvent;\n\treadonly element: T | null;\n\treadonly target: TreeMouseEventTarget;\n}\n\nexport interface ITreeContextMenuEvent<T> {\n\treadonly browserEvent: UIEvent;\n\treadonly element: T | null;\n\treadonly anchor: HTMLElement | IMouseEvent;\n\treadonly isStickyScroll: boolean;\n}\n\nexport interface IDataSource<TInput, T> {\n}\n\nexport interface IAsyncDataSource<TInput, T> {\n\thasChildren(element: TInput | T): boolean;\n\tgetChildren(element: TInput | T): Iterable<T> | Promise<Iterable<T>>;\n}\n\nexport const enum TreeDragOverBubble {\n\tDown,\n\tUp\n}\n\nexport interface ITreeDragOverReaction extends IListDragOverReaction {\n\tbubble?: TreeDragOverBubble;\n\tautoExpand?: boolean;\n}\n\nexport interface ITreeDragAndDrop<T> extends IListDragAndDrop<T> {\n\tonDragOver(data: IDragAndDropData, targetElement: T | undefined, targetIndex: number | undefined, targetSector: ListViewTargetSector | undefined, originalEvent: DragEvent): boolean | ITreeDragOverReaction;\n}\n\nexport class TreeError extends Error {\n\n\tconstructor(user: string, message: string) {\n\t\tsuper(`TreeError [${user}] ${message}`);\n\t}\n}\n\nexport class WeakMapper<K extends object, V> {\n\n\tconstructor(private fn: (k: K) => V) { }\n\n\tprivate _map = new WeakMap<K, V>();\n\n\tmap(key: K): V {\n\t\tlet result = this._map.get(key);\n\n\t\tif (!result) {\n\t\t\tresult = this.fn(key);\n\t\t\tthis._map.set(key, result);\n\t\t}\n\n\t\treturn result;\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 { IDragAndDropData } from '../../dnd.js';\nimport { IMouseEvent } from '../../mouseEvent.js';\nimport { IListDragAndDrop, IListDragOverReaction, IListElementRenderDetails, IListRenderer } from '../list/list.js';\nimport { ListViewTargetSector } from '../list/listView.js';\nimport { Event } from '../../../common/event.js';\n\nexport const enum TreeVisibility {\n\n\t/**\n\t * The tree node should be hidden.\n\t */\n\tHidden,\n\n\t/**\n\t * The tree node should be visible.\n\t */\n\tVisible,\n\n\t/**\n\t * The tree node should be visible if any of its descendants is visible.\n\t */\n\tRecurse\n}\n\n/**\n * A composed filter result containing the visibility result as well as\n * metadata.\n */\nexport interface ITreeFilterDataResult<TFilterData> {\n\n\t/**\n\t * Whether the node should be visible.\n\t */\n\tvisibility: boolean | TreeVisibility;\n\n\t/**\n\t * Metadata about the element's visibility which gets forwarded to the\n\t * renderer once the element gets rendered.\n\t */\n\tdata: TFilterData;\n}\n\n/**\n * The result of a filter call can be a boolean value indicating whether\n * the element should be visible or not, a value of type `TreeVisibility` or\n * an object composed of the visibility result as well as additional metadata\n * which gets forwarded to the renderer once the element gets rendered.\n */\nexport type TreeFilterResult<TFilterData> = boolean | TreeVisibility | ITreeFilterDataResult<TFilterData>;\n\n/**\n * A tree filter is responsible for controlling the visibility of\n * elements in a tree.\n */\nexport interface ITreeFilter<T, TFilterData = void> {\n\n\t/**\n\t * Returns whether this elements should be visible and, if affirmative,\n\t * additional metadata which gets forwarded to the renderer once the element\n\t * gets rendered.\n\t *\n\t * @param element The tree element.\n\t */\n\tfilter(element: T, parentVisibility: TreeVisibility): TreeFilterResult<TFilterData>;\n}\n\nexport interface ITreeSorter<T> {\n\tcompare(element: T, otherElement: T): number;\n}\n\nexport interface ITreeElement<T> {\n\treadonly element: T;\n\treadonly children?: Iterable<ITreeElement<T>>;\n\treadonly collapsible?: boolean;\n\treadonly collapsed?: boolean;\n}\n\nexport enum ObjectTreeElementCollapseState {\n\tExpanded,\n\tCollapsed,\n\n\t/**\n\t * If the element is already in the tree, preserve its current state. Else, expand it.\n\t */\n\tPreserveOrExpanded,\n\n\t/**\n\t * If the element is already in the tree, preserve its current state. Else, collapse it.\n\t */\n\tPreserveOrCollapsed,\n}\n\nexport interface IObjectTreeElement<T> {\n\treadonly element: T;\n\treadonly children?: Iterable<IObjectTreeElement<T>>;\n\treadonly collapsible?: boolean;\n\treadonly collapsed?: boolean | ObjectTreeElementCollapseState;\n}\n\nexport interface ITreeNode<T, TFilterData = void> {\n\treadonly element: T;\n\treadonly children: ITreeNode<T, TFilterData>[];\n\treadonly depth: number;\n\treadonly visibleChildrenCount: number;\n\treadonly visibleChildIndex: number;\n\treadonly collapsible: boolean;\n\treadonly collapsed: boolean;\n\treadonly visible: boolean;\n\treadonly filterData: TFilterData | undefined;\n}\n\nexport interface ICollapseStateChangeEvent<T, TFilterData> {\n\tnode: ITreeNode<T, TFilterData>;\n\tdeep: boolean;\n}\n\nexport interface ITreeListSpliceData<T, TFilterData> {\n\tstart: number;\n\tdeleteCount: number;\n\telements: ITreeNode<T, TFilterData>[];\n}\n\nexport interface ITreeModelSpliceEvent<T, TFilterData> {\n\tinsertedNodes: ITreeNode<T, TFilterData>[];\n\tdeletedNodes: ITreeNode<T, TFilterData>[];\n}\n\nexport interface ITreeModel<T, TFilterData, TRef> {\n\n\treadonly onDidSpliceModel: Event<ITreeModelSpliceEvent<T, TFilterData>>;\n\treadonly onDidSpliceRenderedNodes: Event<ITreeListSpliceData<T, TFilterData>>;\n\treadonly onDidChangeCollapseState: Event<ICollapseStateChangeEvent<T, TFilterData>>;\n\treadonly onDidChangeRenderNodeCount: Event<ITreeNode<T, TFilterData>>;\n\n\thas(location: TRef): boolean;\n\n\tgetListIndex(location: TRef): number;\n\tgetListRenderCount(location: TRef): number;\n\tgetNode(location?: TRef): ITreeNode<T, any>;\n\tgetNodeLocation(node: ITreeNode<T, any>): TRef;\n\tgetParentNodeLocation(location: TRef): TRef | undefined;\n\n\tgetFirstElementChild(location: TRef): T | undefined;\n\n\tisCollapsible(location: TRef): boolean;\n\tsetCollapsible(location: TRef, collapsible?: boolean): boolean;\n\tisCollapsed(location: TRef): boolean;\n\tsetCollapsed(location: TRef, collapsed?: boolean, recursive?: boolean): boolean;\n\texpandTo(location: TRef): void;\n\n\trerender(location: TRef): void;\n\trefilter(): void;\n}\n\nexport interface ITreeElementRenderDetails extends IListElementRenderDetails {\n\treadonly indent: number;\n}\n\nexport interface ITreeRenderer<T, TFilterData = void, TTemplateData = void> extends IListRenderer<ITreeNode<T, TFilterData>, TTemplateData> {\n\trenderElement(element: ITreeNode<T, TFilterData>, index: number, templateData: TTemplateData, details?: ITreeElementRenderDetails): void;\n\tdisposeElement?(element: ITreeNode<T, TFilterData>, index: number, templateData: TTemplateData, details?: ITreeElementRenderDetails): void;\n\trenderTwistie?(element: T, twistieElement: HTMLElement): boolean;\n\tonDidChangeTwistieState?: Event<T>;\n}\n\nexport interface ITreeEvent<T> {\n\treadonly elements: readonly T[];\n\treadonly browserEvent?: UIEvent;\n}\n\nexport enum TreeMouseEventTarget {\n\tUnknown,\n\tTwistie,\n\tElement,\n\tFilter\n}\n\nexport interface ITreeMouseEvent<T> {\n\treadonly browserEvent: MouseEvent;\n\treadonly element: T | null;\n\treadonly target: TreeMouseEventTarget;\n}\n\nexport interface ITreeContextMenuEvent<T> {\n\treadonly browserEvent: UIEvent;\n\treadonly element: T | null;\n\treadonly anchor: HTMLElement | IMouseEvent;\n\treadonly isStickyScroll: boolean;\n}\n\nexport interface IDataSource<TInput, T> {\n}\n\nexport interface IAsyncDataSource<TInput, T> {\n\thasChildren(element: TInput | T): boolean;\n\tgetChildren(element: TInput | T): Iterable<T> | Promise<Iterable<T>>;\n}\n\nexport const enum TreeDragOverBubble {\n\tDown,\n\tUp\n}\n\nexport interface ITreeDragOverReaction extends IListDragOverReaction {\n\tbubble?: TreeDragOverBubble;\n\tautoExpand?: boolean;\n}\n\nexport interface ITreeDragAndDrop<T> extends IListDragAndDrop<T> {\n\tonDragOver(data: IDragAndDropData, targetElement: T | undefined, targetIndex: number | undefined, targetSector: ListViewTargetSector | undefined, originalEvent: DragEvent): boolean | ITreeDragOverReaction;\n}\n\nexport class TreeError extends Error {\n\n\tconstructor(user: string, message: string) {\n\t\tsuper(`TreeError [${user}] ${message}`);\n\t}\n}\n\nexport class WeakMapper<K extends object, V> {\n\n\tconstructor(private fn: (k: K) => V) { }\n\n\tprivate _map = new WeakMap<K, V>();\n\n\tmap(key: K): V {\n\t\tlet result = this._map.get(key);\n\n\t\tif (!result) {\n\t\t\tresult = this.fn(key);\n\t\t\tthis._map.set(key, result);\n\t\t}\n\n\t\treturn result;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/browser/ui/tree/tree.ts","vs/base/browser/ui/tree/tree.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AA+EhG,MAAM,CAAN,IAAY,8BAaX;AAbD,WAAY,8BAA8B;IACzC,2FAAQ,CAAA;IACR,6FAAS,CAAA;IAET;;OAEG;IACH,+GAAkB,CAAA;IAElB;;OAEG;IACH,iHAAmB,CAAA;AACpB,CAAC,EAbW,8BAA8B,KAA9B,8BAA8B,QAazC;AAgFD,MAAM,CAAN,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC/B,qEAAO,CAAA;IACP,qEAAO,CAAA;IACP,qEAAO,CAAA;IACP,mEAAM,CAAA;AACP,CAAC,EALW,oBAAoB,KAApB,oBAAoB,QAK/B;AAqCD,MAAM,OAAO,SAAU,SAAQ,KAAK;IAEnC,YAAY,IAAY,EAAE,OAAe;QACxC,KAAK,CAAC,cAAc,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC;CACD;AAED,MAAM,OAAO,UAAU;IAEtB,YAAoB,EAAe;QAAf,OAAE,GAAF,EAAE,CAAa;QAE3B,SAAI,GAAG,IAAI,OAAO,EAAQ,CAAC;IAFI,CAAC;IAIxC,GAAG,CAAC,GAAM;QACT,IAAI,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAEhC,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;YACtB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAC5B,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;CACD","file":"tree.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 { IDragAndDropData } from '../../dnd.js';\nimport { IMouseEvent } from '../../mouseEvent.js';\nimport { IListDragAndDrop, IListDragOverReaction, IListElementRenderDetails, IListRenderer } from '../list/list.js';\nimport { ListViewTargetSector } from '../list/listView.js';\nimport { Event } from '../../../common/event.js';\n\nexport const enum TreeVisibility {\n\n\t/**\n\t * The tree node should be hidden.\n\t */\n\tHidden,\n\n\t/**\n\t * The tree node should be visible.\n\t */\n\tVisible,\n\n\t/**\n\t * The tree node should be visible if any of its descendants is visible.\n\t */\n\tRecurse\n}\n\n/**\n * A composed filter result containing the visibility result as well as\n * metadata.\n */\nexport interface ITreeFilterDataResult<TFilterData> {\n\n\t/**\n\t * Whether the node should be visible.\n\t */\n\tvisibility: boolean | TreeVisibility;\n\n\t/**\n\t * Metadata about the element's visibility which gets forwarded to the\n\t * renderer once the element gets rendered.\n\t */\n\tdata: TFilterData;\n}\n\n/**\n * The result of a filter call can be a boolean value indicating whether\n * the element should be visible or not, a value of type `TreeVisibility` or\n * an object composed of the visibility result as well as additional metadata\n * which gets forwarded to the renderer once the element gets rendered.\n */\nexport type TreeFilterResult<TFilterData> = boolean | TreeVisibility | ITreeFilterDataResult<TFilterData>;\n\n/**\n * A tree filter is responsible for controlling the visibility of\n * elements in a tree.\n */\nexport interface ITreeFilter<T, TFilterData = void> {\n\n\t/**\n\t * Returns whether this elements should be visible and, if affirmative,\n\t * additional metadata which gets forwarded to the renderer once the element\n\t * gets rendered.\n\t *\n\t * @param element The tree element.\n\t */\n\tfilter(element: T, parentVisibility: TreeVisibility): TreeFilterResult<TFilterData>;\n}\n\nexport interface ITreeSorter<T> {\n\tcompare(element: T, otherElement: T): number;\n}\n\nexport interface ITreeElement<T> {\n\treadonly element: T;\n\treadonly children?: Iterable<ITreeElement<T>>;\n\treadonly collapsible?: boolean;\n\treadonly collapsed?: boolean;\n}\n\nexport enum ObjectTreeElementCollapseState {\n\tExpanded,\n\tCollapsed,\n\n\t/**\n\t * If the element is already in the tree, preserve its current state. Else, expand it.\n\t */\n\tPreserveOrExpanded,\n\n\t/**\n\t * If the element is already in the tree, preserve its current state. Else, collapse it.\n\t */\n\tPreserveOrCollapsed,\n}\n\nexport interface IObjectTreeElement<T> {\n\treadonly element: T;\n\treadonly children?: Iterable<IObjectTreeElement<T>>;\n\treadonly collapsible?: boolean;\n\treadonly collapsed?: boolean | ObjectTreeElementCollapseState;\n}\n\nexport interface ITreeNode<T, TFilterData = void> {\n\treadonly element: T;\n\treadonly children: ITreeNode<T, TFilterData>[];\n\treadonly depth: number;\n\treadonly visibleChildrenCount: number;\n\treadonly visibleChildIndex: number;\n\treadonly collapsible: boolean;\n\treadonly collapsed: boolean;\n\treadonly visible: boolean;\n\treadonly filterData: TFilterData | undefined;\n}\n\nexport interface ICollapseStateChangeEvent<T, TFilterData> {\n\tnode: ITreeNode<T, TFilterData>;\n\tdeep: boolean;\n}\n\nexport interface ITreeListSpliceData<T, TFilterData> {\n\tstart: number;\n\tdeleteCount: number;\n\telements: ITreeNode<T, TFilterData>[];\n}\n\nexport interface ITreeModelSpliceEvent<T, TFilterData> {\n\tinsertedNodes: ITreeNode<T, TFilterData>[];\n\tdeletedNodes: ITreeNode<T, TFilterData>[];\n}\n\nexport interface ITreeModel<T, TFilterData, TRef> {\n\n\treadonly onDidSpliceModel: Event<ITreeModelSpliceEvent<T, TFilterData>>;\n\treadonly onDidSpliceRenderedNodes: Event<ITreeListSpliceData<T, TFilterData>>;\n\treadonly onDidChangeCollapseState: Event<ICollapseStateChangeEvent<T, TFilterData>>;\n\treadonly onDidChangeRenderNodeCount: Event<ITreeNode<T, TFilterData>>;\n\n\thas(location: TRef): boolean;\n\n\tgetListIndex(location: TRef): number;\n\tgetListRenderCount(location: TRef): number;\n\tgetNode(location?: TRef): ITreeNode<T, any>;\n\tgetNodeLocation(node: ITreeNode<T, any>): TRef;\n\tgetParentNodeLocation(location: TRef): TRef | undefined;\n\n\tgetFirstElementChild(location: TRef): T | undefined;\n\n\tisCollapsible(location: TRef): boolean;\n\tsetCollapsible(location: TRef, collapsible?: boolean): boolean;\n\tisCollapsed(location: TRef): boolean;\n\tsetCollapsed(location: TRef, collapsed?: boolean, recursive?: boolean): boolean;\n\texpandTo(location: TRef): void;\n\n\trerender(location: TRef): void;\n\trefilter(): void;\n}\n\nexport interface ITreeElementRenderDetails extends IListElementRenderDetails {\n\treadonly indent: number;\n}\n\nexport interface ITreeRenderer<T, TFilterData = void, TTemplateData = void> extends IListRenderer<ITreeNode<T, TFilterData>, TTemplateData> {\n\trenderElement(element: ITreeNode<T, TFilterData>, index: number, templateData: TTemplateData, details?: ITreeElementRenderDetails): void;\n\tdisposeElement?(element: ITreeNode<T, TFilterData>, index: number, templateData: TTemplateData, details?: ITreeElementRenderDetails): void;\n\trenderTwistie?(element: T, twistieElement: HTMLElement): boolean;\n\treadonly onDidChangeTwistieState?: Event<T>;\n}\n\nexport interface ITreeEvent<T> {\n\treadonly elements: readonly T[];\n\treadonly browserEvent?: UIEvent;\n}\n\nexport enum TreeMouseEventTarget {\n\tUnknown,\n\tTwistie,\n\tElement,\n\tFilter\n}\n\nexport interface ITreeMouseEvent<T> {\n\treadonly browserEvent: MouseEvent;\n\treadonly element: T | null;\n\treadonly target: TreeMouseEventTarget;\n}\n\nexport interface ITreeContextMenuEvent<T> {\n\treadonly browserEvent: UIEvent;\n\treadonly element: T | null;\n\treadonly anchor: HTMLElement | IMouseEvent;\n\treadonly isStickyScroll: boolean;\n}\n\nexport interface IDataSource<TInput, T> {\n}\n\nexport interface IAsyncDataSource<TInput, T> {\n\thasChildren(element: TInput | T): boolean;\n\tgetChildren(element: TInput | T): Iterable<T> | Promise<Iterable<T>>;\n}\n\nexport const enum TreeDragOverBubble {\n\tDown,\n\tUp\n}\n\nexport interface ITreeDragOverReaction extends IListDragOverReaction {\n\tbubble?: TreeDragOverBubble;\n\tautoExpand?: boolean;\n}\n\nexport interface ITreeDragAndDrop<T> extends IListDragAndDrop<T> {\n\tonDragOver(data: IDragAndDropData, targetElement: T | undefined, targetIndex: number | undefined, targetSector: ListViewTargetSector | undefined, originalEvent: DragEvent): boolean | ITreeDragOverReaction;\n}\n\nexport class TreeError extends Error {\n\n\tconstructor(user: string, message: string) {\n\t\tsuper(`TreeError [${user}] ${message}`);\n\t}\n}\n\nexport class WeakMapper<K extends object, V> {\n\n\tconstructor(private fn: (k: K) => V) { }\n\n\tprivate _map = new WeakMap<K, V>();\n\n\tmap(key: K): V {\n\t\tlet result = this._map.get(key);\n\n\t\tif (!result) {\n\t\t\tresult = this.fn(key);\n\t\t\tthis._map.set(key, result);\n\t\t}\n\n\t\treturn result;\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 { IDragAndDropData } from '../../dnd.js';\nimport { IMouseEvent } from '../../mouseEvent.js';\nimport { IListDragAndDrop, IListDragOverReaction, IListElementRenderDetails, IListRenderer } from '../list/list.js';\nimport { ListViewTargetSector } from '../list/listView.js';\nimport { Event } from '../../../common/event.js';\n\nexport const enum TreeVisibility {\n\n\t/**\n\t * The tree node should be hidden.\n\t */\n\tHidden,\n\n\t/**\n\t * The tree node should be visible.\n\t */\n\tVisible,\n\n\t/**\n\t * The tree node should be visible if any of its descendants is visible.\n\t */\n\tRecurse\n}\n\n/**\n * A composed filter result containing the visibility result as well as\n * metadata.\n */\nexport interface ITreeFilterDataResult<TFilterData> {\n\n\t/**\n\t * Whether the node should be visible.\n\t */\n\tvisibility: boolean | TreeVisibility;\n\n\t/**\n\t * Metadata about the element's visibility which gets forwarded to the\n\t * renderer once the element gets rendered.\n\t */\n\tdata: TFilterData;\n}\n\n/**\n * The result of a filter call can be a boolean value indicating whether\n * the element should be visible or not, a value of type `TreeVisibility` or\n * an object composed of the visibility result as well as additional metadata\n * which gets forwarded to the renderer once the element gets rendered.\n */\nexport type TreeFilterResult<TFilterData> = boolean | TreeVisibility | ITreeFilterDataResult<TFilterData>;\n\n/**\n * A tree filter is responsible for controlling the visibility of\n * elements in a tree.\n */\nexport interface ITreeFilter<T, TFilterData = void> {\n\n\t/**\n\t * Returns whether this elements should be visible and, if affirmative,\n\t * additional metadata which gets forwarded to the renderer once the element\n\t * gets rendered.\n\t *\n\t * @param element The tree element.\n\t */\n\tfilter(element: T, parentVisibility: TreeVisibility): TreeFilterResult<TFilterData>;\n}\n\nexport interface ITreeSorter<T> {\n\tcompare(element: T, otherElement: T): number;\n}\n\nexport interface ITreeElement<T> {\n\treadonly element: T;\n\treadonly children?: Iterable<ITreeElement<T>>;\n\treadonly collapsible?: boolean;\n\treadonly collapsed?: boolean;\n}\n\nexport enum ObjectTreeElementCollapseState {\n\tExpanded,\n\tCollapsed,\n\n\t/**\n\t * If the element is already in the tree, preserve its current state. Else, expand it.\n\t */\n\tPreserveOrExpanded,\n\n\t/**\n\t * If the element is already in the tree, preserve its current state. Else, collapse it.\n\t */\n\tPreserveOrCollapsed,\n}\n\nexport interface IObjectTreeElement<T> {\n\treadonly element: T;\n\treadonly children?: Iterable<IObjectTreeElement<T>>;\n\treadonly collapsible?: boolean;\n\treadonly collapsed?: boolean | ObjectTreeElementCollapseState;\n}\n\nexport interface ITreeNode<T, TFilterData = void> {\n\treadonly element: T;\n\treadonly children: ITreeNode<T, TFilterData>[];\n\treadonly depth: number;\n\treadonly visibleChildrenCount: number;\n\treadonly visibleChildIndex: number;\n\treadonly collapsible: boolean;\n\treadonly collapsed: boolean;\n\treadonly visible: boolean;\n\treadonly filterData: TFilterData | undefined;\n}\n\nexport interface ICollapseStateChangeEvent<T, TFilterData> {\n\tnode: ITreeNode<T, TFilterData>;\n\tdeep: boolean;\n}\n\nexport interface ITreeListSpliceData<T, TFilterData> {\n\tstart: number;\n\tdeleteCount: number;\n\telements: ITreeNode<T, TFilterData>[];\n}\n\nexport interface ITreeModelSpliceEvent<T, TFilterData> {\n\tinsertedNodes: ITreeNode<T, TFilterData>[];\n\tdeletedNodes: ITreeNode<T, TFilterData>[];\n}\n\nexport interface ITreeModel<T, TFilterData, TRef> {\n\n\treadonly onDidSpliceModel: Event<ITreeModelSpliceEvent<T, TFilterData>>;\n\treadonly onDidSpliceRenderedNodes: Event<ITreeListSpliceData<T, TFilterData>>;\n\treadonly onDidChangeCollapseState: Event<ICollapseStateChangeEvent<T, TFilterData>>;\n\treadonly onDidChangeRenderNodeCount: Event<ITreeNode<T, TFilterData>>;\n\n\thas(location: TRef): boolean;\n\n\tgetListIndex(location: TRef): number;\n\tgetListRenderCount(location: TRef): number;\n\tgetNode(location?: TRef): ITreeNode<T, any>;\n\tgetNodeLocation(node: ITreeNode<T, any>): TRef;\n\tgetParentNodeLocation(location: TRef): TRef | undefined;\n\n\tgetFirstElementChild(location: TRef): T | undefined;\n\n\tisCollapsible(location: TRef): boolean;\n\tsetCollapsible(location: TRef, collapsible?: boolean): boolean;\n\tisCollapsed(location: TRef): boolean;\n\tsetCollapsed(location: TRef, collapsed?: boolean, recursive?: boolean): boolean;\n\texpandTo(location: TRef): void;\n\n\trerender(location: TRef): void;\n\trefilter(): void;\n}\n\nexport interface ITreeElementRenderDetails extends IListElementRenderDetails {\n\treadonly indent: number;\n}\n\nexport interface ITreeRenderer<T, TFilterData = void, TTemplateData = void> extends IListRenderer<ITreeNode<T, TFilterData>, TTemplateData> {\n\trenderElement(element: ITreeNode<T, TFilterData>, index: number, templateData: TTemplateData, details?: ITreeElementRenderDetails): void;\n\tdisposeElement?(element: ITreeNode<T, TFilterData>, index: number, templateData: TTemplateData, details?: ITreeElementRenderDetails): void;\n\trenderTwistie?(element: T, twistieElement: HTMLElement): boolean;\n\treadonly onDidChangeTwistieState?: Event<T>;\n}\n\nexport interface ITreeEvent<T> {\n\treadonly elements: readonly T[];\n\treadonly browserEvent?: UIEvent;\n}\n\nexport enum TreeMouseEventTarget {\n\tUnknown,\n\tTwistie,\n\tElement,\n\tFilter\n}\n\nexport interface ITreeMouseEvent<T> {\n\treadonly browserEvent: MouseEvent;\n\treadonly element: T | null;\n\treadonly target: TreeMouseEventTarget;\n}\n\nexport interface ITreeContextMenuEvent<T> {\n\treadonly browserEvent: UIEvent;\n\treadonly element: T | null;\n\treadonly anchor: HTMLElement | IMouseEvent;\n\treadonly isStickyScroll: boolean;\n}\n\nexport interface IDataSource<TInput, T> {\n}\n\nexport interface IAsyncDataSource<TInput, T> {\n\thasChildren(element: TInput | T): boolean;\n\tgetChildren(element: TInput | T): Iterable<T> | Promise<Iterable<T>>;\n}\n\nexport const enum TreeDragOverBubble {\n\tDown,\n\tUp\n}\n\nexport interface ITreeDragOverReaction extends IListDragOverReaction {\n\tbubble?: TreeDragOverBubble;\n\tautoExpand?: boolean;\n}\n\nexport interface ITreeDragAndDrop<T> extends IListDragAndDrop<T> {\n\tonDragOver(data: IDragAndDropData, targetElement: T | undefined, targetIndex: number | undefined, targetSector: ListViewTargetSector | undefined, originalEvent: DragEvent): boolean | ITreeDragOverReaction;\n}\n\nexport class TreeError extends Error {\n\n\tconstructor(user: string, message: string) {\n\t\tsuper(`TreeError [${user}] ${message}`);\n\t}\n}\n\nexport class WeakMapper<K extends object, V> {\n\n\tconstructor(private fn: (k: K) => V) { }\n\n\tprivate _map = new WeakMap<K, V>();\n\n\tmap(key: K): V {\n\t\tlet result = this._map.get(key);\n\n\t\tif (!result) {\n\t\t\tresult = this.fn(key);\n\t\t\tthis._map.set(key, result);\n\t\t}\n\n\t\treturn result;\n\t}\n}\n"]}
|
|
@@ -80,7 +80,6 @@ export const codiconsLibrary = {
|
|
|
80
80
|
vm: register('vm', 0xea7a),
|
|
81
81
|
deviceDesktop: register('device-desktop', 0xea7a),
|
|
82
82
|
file: register('file', 0xea7b),
|
|
83
|
-
fileText: register('file-text', 0xea7b),
|
|
84
83
|
more: register('more', 0xea7c),
|
|
85
84
|
ellipsis: register('ellipsis', 0xea7c),
|
|
86
85
|
kebabHorizontal: register('kebab-horizontal', 0xea7c),
|
|
@@ -614,5 +613,14 @@ export const codiconsLibrary = {
|
|
|
614
613
|
collection: register('collection', 0xec57),
|
|
615
614
|
newCollection: register('new-collection', 0xec58),
|
|
616
615
|
thinking: register('thinking', 0xec59),
|
|
616
|
+
build: register('build', 0xec5a),
|
|
617
|
+
commentDiscussionQuote: register('comment-discussion-quote', 0xec5b),
|
|
618
|
+
cursor: register('cursor', 0xec5c),
|
|
619
|
+
eraser: register('eraser', 0xec5d),
|
|
620
|
+
fileText: register('file-text', 0xec5e),
|
|
621
|
+
gitLens: register('git-lens', 0xec5f),
|
|
622
|
+
quotes: register('quotes', 0xec60),
|
|
623
|
+
rename: register('rename', 0xec61),
|
|
624
|
+
runWithDeps: register('run-with-deps', 0xec62),
|
|
617
625
|
};
|
|
618
626
|
//# sourceMappingURL=codiconsLibrary.js.map
|