monaco-editor-core 0.56.0-dev-20251121 → 0.56.0-dev-20251122
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 +2 -0
- package/esm/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/esm/vs/base/browser/ui/list/rowCache.js +1 -4
- package/esm/vs/base/browser/ui/list/rowCache.js.map +1 -1
- package/esm/vs/base/browser/ui/menu/menu.js +14 -12
- package/esm/vs/base/browser/ui/menu/menu.js.map +1 -1
- package/esm/vs/base/common/map.js +8 -5
- package/esm/vs/base/common/map.js.map +1 -1
- package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +1 -4
- package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
- package/esm/vs/base/common/worker/webWorker.js +10 -7
- package/esm/vs/base/common/worker/webWorker.js.map +1 -1
- package/esm/vs/editor/browser/services/editorWorkerService.js +1 -1
- package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/findWidgetSearchHistory.js.map +1 -1
- package/esm/vs/editor/contrib/find/browser/replaceWidgetHistory.js.map +1 -1
- package/esm/vs/editor/contrib/folding/browser/folding.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js +29 -16
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/inlineEditsLongDistanceHint.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js +42 -5
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/longDistanceHint/longDistancePreviewEditor.js.map +1 -1
- package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/view.css +10 -0
- package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js +1 -1
- package/esm/vs/editor/standalone/browser/services/standaloneWebWorkerService.js.map +1 -1
- package/esm/vs/platform/actionWidget/browser/actionWidget.css +7 -0
- package/esm/vs/platform/hover/browser/hoverService.js +17 -8
- package/esm/vs/platform/hover/browser/hoverService.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +41 -8
- package/esm/vs/platform/quickinput/browser/commandsQuickAccess.js.map +1 -1
- package/esm/vs/platform/quickinput/browser/helpQuickAccess.js +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 +6 -6
- package/esm/vs/platform/quickinput/browser/quickInputList.js +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/quickInputTreeController.js +8 -0
- package/esm/vs/platform/quickinput/browser/tree/quickInputTreeController.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 +16 -16
- 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/webWorker/browser/webWorkerDescriptor.js.map +1 -1
- package/esm/vs/platform/workspace/common/workspace.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/browser/ui/list/rowCache.ts","vs/base/browser/ui/list/rowCache.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAUjC,MAAM,OAAO,QAAQ;IAOpB,YAAoB,SAA6C;QAA7C,cAAS,GAAT,SAAS,CAAoC;QALzD,UAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;QAEzB,mCAA8B,GAAG,IAAI,GAAG,EAAe,CAAC;QACjE,kBAAa,GAAG,KAAK,CAAC;IAEuC,CAAC;IAEtE;;;;;OAKG;IACH,KAAK,CAAC,UAAkB;QACvB,IAAI,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,CAAC;QAErD,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,IAAI,MAAM,EAAE,CAAC;YACZ,OAAO,GAAG,IAAI,CAAC,8BAA8B,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAClE,IAAI,OAAO,EAAE,CAAC;gBACb,IAAI,CAAC,8BAA8B,CAAC,MAAM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AC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAChD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,UAAU,EAAE,CAAC,CAAC;QACxD,CAAC;QACD,OAAO,QAAQ,CAAC;IACjB,CAAC;CACD","file":"rowCache.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 { $ } from '../../dom.js';\nimport { IDisposable } from '../../../common/lifecycle.js';\nimport { IListRenderer } from './list.js';\n\nexport interface IRow {\n\tdomNode: HTMLElement;\n\ttemplateId: string;\n\ttemplateData: any;\n}\n\nexport class RowCache<T> implements IDisposable {\n\n\tprivate cache = new Map<string, IRow[]>();\n\n\tprivate readonly transactionNodesPendingRemoval = new Set<HTMLElement>();\n\tprivate inTransaction = false;\n\n\tconstructor(private renderers: Map<string, IListRenderer<T, any>>) { }\n\n\t/**\n\t * Returns a row either by creating a new one or reusing\n\t * a previously released row which shares the same templateId.\n\t *\n\t * @returns A row and `isReusingConnectedDomNode` if the row's node is already in the dom in a stale position.\n\t */\n\talloc(templateId: string): { row: IRow; isReusingConnectedDomNode: boolean } {\n\t\tlet result = this.getTemplateCache(templateId).pop();\n\n\t\tlet isStale = false;\n\t\tif (result) {\n\t\t\tisStale = this.transactionNodesPendingRemoval.has(result.domNode);\n\t\t\tif (isStale) {\n\t\t\t\tthis.transactionNodesPendingRemoval.delete(result.domNode);\n\t\t\t}\n\t\t} else {\n\t\t\tconst domNode = $('.monaco-list-row');\n\t\t\tconst renderer = this.getRenderer(templateId);\n\t\t\tconst templateData = renderer.renderTemplate(domNode);\n\t\t\tresult = { domNode, templateId, templateData };\n\t\t}\n\n\t\treturn { row: result, isReusingConnectedDomNode: isStale };\n\t}\n\n\t/**\n\t * Releases the row for eventual reuse.\n\t */\n\trelease(row: IRow): void {\n\t\tif (!row) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.releaseRow(row);\n\t}\n\n\t/**\n\t * Begin a set of changes that use the cache. This lets us skip work when a row is removed and then inserted again.\n\t */\n\ttransact(makeChanges: () => void) {\n\t\tif (this.inTransaction) {\n\t\t\tthrow new Error('Already in transaction');\n\t\t}\n\n\t\tthis.inTransaction = true;\n\n\t\ttry {\n\t\t\tmakeChanges();\n\t\t} finally {\n\t\t\tfor (const domNode of this.transactionNodesPendingRemoval) {\n\t\t\t\tthis.doRemoveNode(domNode);\n\t\t\t}\n\n\t\t\tthis.transactionNodesPendingRemoval.clear();\n\t\t\tthis.inTransaction = false;\n\t\t}\n\t}\n\n\tprivate releaseRow(row: IRow): void {\n\t\tconst { domNode, templateId } = row;\n\t\tif (domNode) {\n\t\t\tif (this.inTransaction) {\n\t\t\t\tthis.transactionNodesPendingRemoval.add(domNode);\n\t\t\t} else {\n\t\t\t\tthis.doRemoveNode(domNode);\n\t\t\t}\n\t\t}\n\n\t\tconst cache = this.getTemplateCache(templateId);\n\t\tcache.push(row);\n\t}\n\n\tprivate doRemoveNode(domNode: HTMLElement) {\n\t\tdomNode.classList.remove('scrolling');\n\t\tdomNode.remove();\n\t}\n\n\tprivate getTemplateCache(templateId: string): IRow[] {\n\t\tlet result = this.cache.get(templateId);\n\n\t\tif (!result) {\n\t\t\tresult = [];\n\t\t\tthis.cache.set(templateId, result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tdispose(): void {\n\t\tthis.cache.forEach((cachedRows, templateId) => {\n\t\t\tfor (const cachedRow of cachedRows) {\n\t\t\t\tconst renderer = this.getRenderer(templateId);\n\t\t\t\trenderer.disposeTemplate(cachedRow.templateData);\n\t\t\t\tcachedRow.templateData = null;\n\t\t\t}\n\t\t});\n\n\t\tthis.cache.clear();\n\t\tthis.transactionNodesPendingRemoval.clear();\n\t}\n\n\tprivate getRenderer(templateId: string): IListRenderer<T, any> {\n\t\tconst renderer = this.renderers.get(templateId);\n\t\tif (!renderer) {\n\t\t\tthrow new Error(`No renderer found for ${templateId}`);\n\t\t}\n\t\treturn renderer;\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 { $ } from '../../dom.js';\nimport { IDisposable } from '../../../common/lifecycle.js';\nimport { IListRenderer } from './list.js';\n\nexport interface IRow {\n\tdomNode: HTMLElement;\n\ttemplateId: string;\n\ttemplateData: any;\n}\n\nexport class RowCache<T> implements IDisposable {\n\n\tprivate cache = new Map<string, IRow[]>();\n\n\tprivate readonly transactionNodesPendingRemoval = new Set<HTMLElement>();\n\tprivate inTransaction = false;\n\n\tconstructor(private renderers: Map<string, IListRenderer<T, any>>) { }\n\n\t/**\n\t * Returns a row either by creating a new one or reusing\n\t * a previously released row which shares the same templateId.\n\t *\n\t * @returns A row and `isReusingConnectedDomNode` if the row's node is already in the dom in a stale position.\n\t */\n\talloc(templateId: string): { row: IRow; isReusingConnectedDomNode: boolean } {\n\t\tlet result = this.getTemplateCache(templateId).pop();\n\n\t\tlet isStale = false;\n\t\tif (result) {\n\t\t\tisStale = this.transactionNodesPendingRemoval.has(result.domNode);\n\t\t\tif (isStale) {\n\t\t\t\tthis.transactionNodesPendingRemoval.delete(result.domNode);\n\t\t\t}\n\t\t} else {\n\t\t\tconst domNode = $('.monaco-list-row');\n\t\t\tconst renderer = this.getRenderer(templateId);\n\t\t\tconst templateData = renderer.renderTemplate(domNode);\n\t\t\tresult = { domNode, templateId, templateData };\n\t\t}\n\n\t\treturn { row: result, isReusingConnectedDomNode: isStale };\n\t}\n\n\t/**\n\t * Releases the row for eventual reuse.\n\t */\n\trelease(row: IRow): void {\n\t\tif (!row) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.releaseRow(row);\n\t}\n\n\t/**\n\t * Begin a set of changes that use the cache. This lets us skip work when a row is removed and then inserted again.\n\t */\n\ttransact(makeChanges: () => void) {\n\t\tif (this.inTransaction) {\n\t\t\tthrow new Error('Already in transaction');\n\t\t}\n\n\t\tthis.inTransaction = true;\n\n\t\ttry {\n\t\t\tmakeChanges();\n\t\t} finally {\n\t\t\tfor (const domNode of this.transactionNodesPendingRemoval) {\n\t\t\t\tthis.doRemoveNode(domNode);\n\t\t\t}\n\n\t\t\tthis.transactionNodesPendingRemoval.clear();\n\t\t\tthis.inTransaction = false;\n\t\t}\n\t}\n\n\tprivate releaseRow(row: IRow): void {\n\t\tconst { domNode, templateId } = row;\n\t\tif (domNode) {\n\t\t\tif (this.inTransaction) {\n\t\t\t\tthis.transactionNodesPendingRemoval.add(domNode);\n\t\t\t} else {\n\t\t\t\tthis.doRemoveNode(domNode);\n\t\t\t}\n\t\t}\n\n\t\tconst cache = this.getTemplateCache(templateId);\n\t\tcache.push(row);\n\t}\n\n\tprivate doRemoveNode(domNode: HTMLElement) {\n\t\tdomNode.classList.remove('scrolling');\n\t\tdomNode.remove();\n\t}\n\n\tprivate getTemplateCache(templateId: string): IRow[] {\n\t\tlet result = this.cache.get(templateId);\n\n\t\tif (!result) {\n\t\t\tresult = [];\n\t\t\tthis.cache.set(templateId, result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tdispose(): void {\n\t\tthis.cache.forEach((cachedRows, templateId) => {\n\t\t\tfor (const cachedRow of cachedRows) {\n\t\t\t\tconst renderer = this.getRenderer(templateId);\n\t\t\t\trenderer.disposeTemplate(cachedRow.templateData);\n\t\t\t\tcachedRow.templateData = null;\n\t\t\t}\n\t\t});\n\n\t\tthis.cache.clear();\n\t\tthis.transactionNodesPendingRemoval.clear();\n\t}\n\n\tprivate getRenderer(templateId: string): IListRenderer<T, any> {\n\t\tconst renderer = this.renderers.get(templateId);\n\t\tif (!renderer) {\n\t\t\tthrow new Error(`No renderer found for ${templateId}`);\n\t\t}\n\t\treturn renderer;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/base/browser/ui/list/rowCache.ts","vs/base/browser/ui/list/rowCache.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAUjC,MAAM,OAAO,QAAQ;IAOpB,YAAoB,SAA6C;QAA7C,cAAS,GAAT,SAAS,CAAoC;QALzD,UAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;QAEzB,mCAA8B,GAAG,IAAI,GAAG,EAAe,CAAC;QACjE,kBAAa,GAAG,KAAK,CAAC;IAEuC,CAAC;IAEtE;;;;;OAKG;IACH,KAAK,CAAC,UAAkB;QACvB,IAAI,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,GAAG,EAAE,CAAC;QAErD,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,IAAI,MAAM,EAAE,CAAC;YACZ,OAAO,GAAG,IAAI,CAAC,8BAA8B,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACtE,CAAC;aAAM,CAAC;YACP,MAAM,OAAO,GAAG,CAAC,CAAC,kBAAkB,CAAC,CAAC;YACtC,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAC9C,MAAM,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YACtD,MAAM,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;QAChD,CAAC;QAED,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,yBAAyB,EAAE,OAAO,EAAE,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,GAAS;QAChB,IAAI,CAAC,GAAG,EAAE,CAAC;YACV,OAAO;QACR,CAAC;QAED,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;IAED;;OAEG;I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YACZ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QACpC,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IAED,OAAO;QACN,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,EAAE;YAC7C,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;gBACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;gBAC9C,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;gBACjD,SAAS,CAAC,YAAY,GAAG,IAAI,CAAC;YAC/B,CAAC;QACF,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACnB,IAAI,CAAC,8BAA8B,CAAC,KAAK,EAAE,CAAC;IAC7C,CAAC;IAEO,WAAW,CAAC,UAAkB;QACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAChD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,UAAU,EAAE,CAAC,CAAC;QACxD,CAAC;QACD,OAAO,QAAQ,CAAC;IACjB,CAAC;CACD","file":"rowCache.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 { $ } from '../../dom.js';\nimport { IDisposable } from '../../../common/lifecycle.js';\nimport { IListRenderer } from './list.js';\n\nexport interface IRow {\n\tdomNode: HTMLElement;\n\ttemplateId: string;\n\ttemplateData: any;\n}\n\nexport class RowCache<T> implements IDisposable {\n\n\tprivate cache = new Map<string, IRow[]>();\n\n\tprivate readonly transactionNodesPendingRemoval = new Set<HTMLElement>();\n\tprivate inTransaction = false;\n\n\tconstructor(private renderers: Map<string, IListRenderer<T, any>>) { }\n\n\t/**\n\t * Returns a row either by creating a new one or reusing\n\t * a previously released row which shares the same templateId.\n\t *\n\t * @returns A row and `isReusingConnectedDomNode` if the row's node is already in the dom in a stale position.\n\t */\n\talloc(templateId: string): { row: IRow; isReusingConnectedDomNode: boolean } {\n\t\tlet result = this.getTemplateCache(templateId).pop();\n\n\t\tlet isStale = false;\n\t\tif (result) {\n\t\t\tisStale = this.transactionNodesPendingRemoval.delete(result.domNode);\n\t\t} else {\n\t\t\tconst domNode = $('.monaco-list-row');\n\t\t\tconst renderer = this.getRenderer(templateId);\n\t\t\tconst templateData = renderer.renderTemplate(domNode);\n\t\t\tresult = { domNode, templateId, templateData };\n\t\t}\n\n\t\treturn { row: result, isReusingConnectedDomNode: isStale };\n\t}\n\n\t/**\n\t * Releases the row for eventual reuse.\n\t */\n\trelease(row: IRow): void {\n\t\tif (!row) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.releaseRow(row);\n\t}\n\n\t/**\n\t * Begin a set of changes that use the cache. This lets us skip work when a row is removed and then inserted again.\n\t */\n\ttransact(makeChanges: () => void) {\n\t\tif (this.inTransaction) {\n\t\t\tthrow new Error('Already in transaction');\n\t\t}\n\n\t\tthis.inTransaction = true;\n\n\t\ttry {\n\t\t\tmakeChanges();\n\t\t} finally {\n\t\t\tfor (const domNode of this.transactionNodesPendingRemoval) {\n\t\t\t\tthis.doRemoveNode(domNode);\n\t\t\t}\n\n\t\t\tthis.transactionNodesPendingRemoval.clear();\n\t\t\tthis.inTransaction = false;\n\t\t}\n\t}\n\n\tprivate releaseRow(row: IRow): void {\n\t\tconst { domNode, templateId } = row;\n\t\tif (domNode) {\n\t\t\tif (this.inTransaction) {\n\t\t\t\tthis.transactionNodesPendingRemoval.add(domNode);\n\t\t\t} else {\n\t\t\t\tthis.doRemoveNode(domNode);\n\t\t\t}\n\t\t}\n\n\t\tconst cache = this.getTemplateCache(templateId);\n\t\tcache.push(row);\n\t}\n\n\tprivate doRemoveNode(domNode: HTMLElement) {\n\t\tdomNode.classList.remove('scrolling');\n\t\tdomNode.remove();\n\t}\n\n\tprivate getTemplateCache(templateId: string): IRow[] {\n\t\tlet result = this.cache.get(templateId);\n\n\t\tif (!result) {\n\t\t\tresult = [];\n\t\t\tthis.cache.set(templateId, result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tdispose(): void {\n\t\tthis.cache.forEach((cachedRows, templateId) => {\n\t\t\tfor (const cachedRow of cachedRows) {\n\t\t\t\tconst renderer = this.getRenderer(templateId);\n\t\t\t\trenderer.disposeTemplate(cachedRow.templateData);\n\t\t\t\tcachedRow.templateData = null;\n\t\t\t}\n\t\t});\n\n\t\tthis.cache.clear();\n\t\tthis.transactionNodesPendingRemoval.clear();\n\t}\n\n\tprivate getRenderer(templateId: string): IListRenderer<T, any> {\n\t\tconst renderer = this.renderers.get(templateId);\n\t\tif (!renderer) {\n\t\t\tthrow new Error(`No renderer found for ${templateId}`);\n\t\t}\n\t\treturn renderer;\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 { $ } from '../../dom.js';\nimport { IDisposable } from '../../../common/lifecycle.js';\nimport { IListRenderer } from './list.js';\n\nexport interface IRow {\n\tdomNode: HTMLElement;\n\ttemplateId: string;\n\ttemplateData: any;\n}\n\nexport class RowCache<T> implements IDisposable {\n\n\tprivate cache = new Map<string, IRow[]>();\n\n\tprivate readonly transactionNodesPendingRemoval = new Set<HTMLElement>();\n\tprivate inTransaction = false;\n\n\tconstructor(private renderers: Map<string, IListRenderer<T, any>>) { }\n\n\t/**\n\t * Returns a row either by creating a new one or reusing\n\t * a previously released row which shares the same templateId.\n\t *\n\t * @returns A row and `isReusingConnectedDomNode` if the row's node is already in the dom in a stale position.\n\t */\n\talloc(templateId: string): { row: IRow; isReusingConnectedDomNode: boolean } {\n\t\tlet result = this.getTemplateCache(templateId).pop();\n\n\t\tlet isStale = false;\n\t\tif (result) {\n\t\t\tisStale = this.transactionNodesPendingRemoval.delete(result.domNode);\n\t\t} else {\n\t\t\tconst domNode = $('.monaco-list-row');\n\t\t\tconst renderer = this.getRenderer(templateId);\n\t\t\tconst templateData = renderer.renderTemplate(domNode);\n\t\t\tresult = { domNode, templateId, templateData };\n\t\t}\n\n\t\treturn { row: result, isReusingConnectedDomNode: isStale };\n\t}\n\n\t/**\n\t * Releases the row for eventual reuse.\n\t */\n\trelease(row: IRow): void {\n\t\tif (!row) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.releaseRow(row);\n\t}\n\n\t/**\n\t * Begin a set of changes that use the cache. This lets us skip work when a row is removed and then inserted again.\n\t */\n\ttransact(makeChanges: () => void) {\n\t\tif (this.inTransaction) {\n\t\t\tthrow new Error('Already in transaction');\n\t\t}\n\n\t\tthis.inTransaction = true;\n\n\t\ttry {\n\t\t\tmakeChanges();\n\t\t} finally {\n\t\t\tfor (const domNode of this.transactionNodesPendingRemoval) {\n\t\t\t\tthis.doRemoveNode(domNode);\n\t\t\t}\n\n\t\t\tthis.transactionNodesPendingRemoval.clear();\n\t\t\tthis.inTransaction = false;\n\t\t}\n\t}\n\n\tprivate releaseRow(row: IRow): void {\n\t\tconst { domNode, templateId } = row;\n\t\tif (domNode) {\n\t\t\tif (this.inTransaction) {\n\t\t\t\tthis.transactionNodesPendingRemoval.add(domNode);\n\t\t\t} else {\n\t\t\t\tthis.doRemoveNode(domNode);\n\t\t\t}\n\t\t}\n\n\t\tconst cache = this.getTemplateCache(templateId);\n\t\tcache.push(row);\n\t}\n\n\tprivate doRemoveNode(domNode: HTMLElement) {\n\t\tdomNode.classList.remove('scrolling');\n\t\tdomNode.remove();\n\t}\n\n\tprivate getTemplateCache(templateId: string): IRow[] {\n\t\tlet result = this.cache.get(templateId);\n\n\t\tif (!result) {\n\t\t\tresult = [];\n\t\t\tthis.cache.set(templateId, result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tdispose(): void {\n\t\tthis.cache.forEach((cachedRows, templateId) => {\n\t\t\tfor (const cachedRow of cachedRows) {\n\t\t\t\tconst renderer = this.getRenderer(templateId);\n\t\t\t\trenderer.disposeTemplate(cachedRow.templateData);\n\t\t\t\tcachedRow.templateData = null;\n\t\t\t}\n\t\t});\n\n\t\tthis.cache.clear();\n\t\tthis.transactionNodesPendingRemoval.clear();\n\t}\n\n\tprivate getRenderer(templateId: string): IListRenderer<T, any> {\n\t\tconst renderer = this.renderers.get(templateId);\n\t\tif (!renderer) {\n\t\t\tthrow new Error(`No renderer found for ${templateId}`);\n\t\t}\n\t\treturn renderer;\n\t}\n}\n"]}
|
|
@@ -65,9 +65,9 @@ export class Menu extends ActionBar {
|
|
|
65
65
|
if (options.enableMnemonics) {
|
|
66
66
|
this._register(addDisposableListener(menuElement, EventType.KEY_DOWN, (e) => {
|
|
67
67
|
const key = e.key.toLocaleLowerCase();
|
|
68
|
-
|
|
68
|
+
const actions = this.mnemonics.get(key);
|
|
69
|
+
if (actions !== undefined) {
|
|
69
70
|
EventHelper.stop(e, true);
|
|
70
|
-
const actions = this.mnemonics.get(key);
|
|
71
71
|
if (actions.length === 1) {
|
|
72
72
|
if (actions[0] instanceof SubmenuMenuActionViewItem && actions[0].container) {
|
|
73
73
|
this.focusItemByElement(actions[0].container);
|
|
@@ -263,12 +263,13 @@ export class Menu extends ActionBar {
|
|
|
263
263
|
if (options.enableMnemonics) {
|
|
264
264
|
const mnemonic = menuActionViewItem.getMnemonic();
|
|
265
265
|
if (mnemonic && menuActionViewItem.isEnabled()) {
|
|
266
|
-
|
|
267
|
-
if (
|
|
268
|
-
actionViewItems
|
|
266
|
+
const actionViewItems = this.mnemonics.get(mnemonic);
|
|
267
|
+
if (actionViewItems !== undefined) {
|
|
268
|
+
actionViewItems.push(menuActionViewItem);
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
this.mnemonics.set(mnemonic, [menuActionViewItem]);
|
|
269
272
|
}
|
|
270
|
-
actionViewItems.push(menuActionViewItem);
|
|
271
|
-
this.mnemonics.set(mnemonic, actionViewItems);
|
|
272
273
|
}
|
|
273
274
|
}
|
|
274
275
|
return menuActionViewItem;
|
|
@@ -284,12 +285,13 @@ export class Menu extends ActionBar {
|
|
|
284
285
|
if (options.enableMnemonics) {
|
|
285
286
|
const mnemonic = menuActionViewItem.getMnemonic();
|
|
286
287
|
if (mnemonic && menuActionViewItem.isEnabled()) {
|
|
287
|
-
|
|
288
|
-
if (
|
|
289
|
-
actionViewItems
|
|
288
|
+
const actionViewItems = this.mnemonics.get(mnemonic);
|
|
289
|
+
if (actionViewItems !== undefined) {
|
|
290
|
+
actionViewItems.push(menuActionViewItem);
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
this.mnemonics.set(mnemonic, [menuActionViewItem]);
|
|
290
294
|
}
|
|
291
|
-
actionViewItems.push(menuActionViewItem);
|
|
292
|
-
this.mnemonics.set(mnemonic, actionViewItems);
|
|
293
295
|
}
|
|
294
296
|
}
|
|
295
297
|
return menuActionViewItem;
|