monaco-editor-core 0.54.0-dev-20251004 → 0.54.0-dev-20251005

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/esm/nls.messages.de.js +1 -1
  2. package/esm/nls.messages.es.js +1 -1
  3. package/esm/nls.messages.fr.js +1 -1
  4. package/esm/nls.messages.it.js +1 -1
  5. package/esm/nls.messages.ja.js +1 -1
  6. package/esm/nls.messages.ko.js +1 -1
  7. package/esm/nls.messages.ru.js +1 -1
  8. package/esm/nls.messages.zh-cn.js +1 -1
  9. package/esm/nls.messages.zh-tw.js +1 -1
  10. package/esm/vs/base/browser/dom.js.map +1 -1
  11. package/esm/vs/base/browser/fastDomNode.js +0 -1
  12. package/esm/vs/base/browser/fastDomNode.js.map +1 -1
  13. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +1 -1
  14. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
  15. package/esm/vs/base/common/buffer.js.map +1 -1
  16. package/esm/vs/base/common/errors.js.map +1 -1
  17. package/esm/vs/base/common/hash.js.map +1 -1
  18. package/esm/vs/base/common/worker/webWorker.js +26 -22
  19. package/esm/vs/base/common/worker/webWorker.js.map +1 -1
  20. package/esm/vs/editor/browser/config/editorConfiguration.js +3 -6
  21. package/esm/vs/editor/browser/config/editorConfiguration.js.map +1 -1
  22. package/esm/vs/editor/browser/config/migrateOptions.js +1 -2
  23. package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
  24. package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js +0 -1
  25. package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js.map +1 -1
  26. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +2 -2
  27. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js.map +1 -1
  28. package/esm/vs/editor/browser/controller/mouseHandler.js +2 -2
  29. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  30. package/esm/vs/editor/browser/controller/mouseTarget.js +7 -8
  31. package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
  32. package/esm/vs/editor/browser/controller/pointerHandler.js +0 -2
  33. package/esm/vs/editor/browser/controller/pointerHandler.js.map +1 -1
  34. package/esm/vs/editor/browser/coreCommands.js.map +1 -1
  35. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  36. package/esm/vs/editor/browser/editorDom.js +0 -2
  37. package/esm/vs/editor/browser/editorDom.js.map +1 -1
  38. package/esm/vs/editor/browser/editorExtensions.js.map +1 -1
  39. package/esm/vs/editor/browser/gpu/gpuUtils.js +1 -1
  40. package/esm/vs/editor/browser/gpu/gpuUtils.js.map +1 -1
  41. package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -1
  42. package/esm/vs/editor/browser/gpu/viewGpuContext.js.map +1 -1
  43. package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
  44. package/esm/vs/editor/browser/services/bulkEditService.js.map +1 -1
  45. package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
  46. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  47. package/esm/vs/editor/browser/services/hoverService/hoverService.js +1 -1
  48. package/esm/vs/editor/browser/services/hoverService/hoverService.js.map +1 -1
  49. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
  50. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
  51. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  52. package/esm/vs/editor/browser/view.js.map +1 -1
  53. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -0
  54. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  55. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +1 -0
  56. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js.map +1 -1
  57. package/esm/vs/editor/browser/widget/codeEditor/codeEditorContributions.js.map +1 -1
  58. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +4 -2
  59. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  60. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -1
  61. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js.map +1 -1
  62. package/esm/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js.map +1 -1
  63. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -1
  64. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js.map +1 -1
  65. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +1 -1
  66. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
  67. package/esm/vs/editor/browser/widget/diffEditor/utils.js +2 -2
  68. package/esm/vs/editor/browser/widget/diffEditor/utils.js.map +1 -1
  69. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -2
  70. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
  71. package/esm/vs/editor/common/config/editorOptions.js +121 -72
  72. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  73. package/esm/vs/editor/common/config/fontInfo.js +32 -16
  74. package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
  75. package/esm/vs/editor/common/config/fontInfoFromSettings.js +16 -0
  76. package/esm/vs/editor/common/config/fontInfoFromSettings.js.map +1 -0
  77. package/esm/vs/editor/common/core/edits/edit.js +1 -0
  78. package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
  79. package/esm/vs/editor/common/core/edits/stringEdit.js +2 -0
  80. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  81. package/esm/vs/editor/common/core/position.js +1 -1
  82. package/esm/vs/editor/common/core/position.js.map +1 -1
  83. package/esm/vs/editor/common/core/range.js +1 -1
  84. package/esm/vs/editor/common/core/range.js.map +1 -1
  85. package/esm/vs/editor/common/core/selection.js +1 -1
  86. package/esm/vs/editor/common/core/selection.js.map +1 -1
  87. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  88. package/esm/vs/editor/common/editorCommon.js.map +1 -1
  89. package/esm/vs/editor/common/languages.js +1 -2
  90. package/esm/vs/editor/common/languages.js.map +1 -1
  91. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +14 -13
  92. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js.map +1 -1
  93. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +2 -0
  94. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js.map +1 -1
  95. package/esm/vs/editor/common/model/textModel.js +1 -1
  96. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  97. package/esm/vs/editor/common/model.js +1 -1
  98. package/esm/vs/editor/common/model.js.map +1 -1
  99. package/esm/vs/editor/common/services/editorBaseApi.js +0 -2
  100. package/esm/vs/editor/common/services/editorBaseApi.js.map +1 -1
  101. package/esm/vs/editor/common/services/editorWebWorker.js +1 -0
  102. package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
  103. package/esm/vs/editor/common/services/editorWorkerHost.js.map +1 -1
  104. package/esm/vs/editor/common/services/modelService.js +14 -21
  105. package/esm/vs/editor/common/services/modelService.js.map +1 -1
  106. package/esm/vs/editor/common/textModelEditSource.js +2 -1
  107. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  108. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +40 -1
  109. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
  110. package/esm/vs/editor/common/viewModel/viewModelImpl.js +2 -1
  111. package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
  112. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +1 -0
  113. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js.map +1 -1
  114. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +1 -1
  115. package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
  116. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
  117. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  118. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js.map +1 -1
  119. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +1 -1
  120. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
  121. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +1 -0
  122. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  123. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
  124. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
  125. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js.map +1 -1
  126. package/esm/vs/editor/editor.api.d.ts +8 -8
  127. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
  128. package/monaco.d.ts +8 -8
  129. package/package.json +2 -2
@@ -23,7 +23,7 @@ import { migrateOptions } from './migrateOptions.js';
23
23
  import { TabFocus } from './tabFocus.js';
24
24
  import { ComputeOptionsMemory, ConfigurationChangedEvent, editorOptionsRegistry } from '../../common/config/editorOptions.js';
25
25
  import { EditorZoom } from '../../common/config/editorZoom.js';
26
- import { BareFontInfo } from '../../common/config/fontInfo.js';
26
+ import { createBareFontInfoFromValidatedSettings } from '../../common/config/fontInfoFromSettings.js';
27
27
  import { IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js';
28
28
  import { getWindow, getWindowById } from '../../../base/browser/dom.js';
29
29
  import { PixelRatio } from '../../../base/browser/pixelRatio.js';
@@ -73,7 +73,7 @@ let EditorConfiguration = class EditorConfiguration extends Disposable {
73
73
  }
74
74
  _computeOptions() {
75
75
  const partialEnv = this._readEnvConfiguration();
76
- const bareFontInfo = BareFontInfo.createFromValidatedSettings(this._validatedOptions, partialEnv.pixelRatio, this.isSimpleWidget);
76
+ const bareFontInfo = createBareFontInfoFromValidatedSettings(this._validatedOptions, partialEnv.pixelRatio, this.isSimpleWidget);
77
77
  const fontInfo = this._readFontInfo(bareFontInfo);
78
78
  const env = {
79
79
  memory: this._computeOptionsMemory,
@@ -101,7 +101,7 @@ let EditorConfiguration = class EditorConfiguration extends Disposable {
101
101
  outerHeight: this._containerObserver.getHeight(),
102
102
  emptySelectionClipboard: browser.isWebKit || browser.isFirefox,
103
103
  pixelRatio: PixelRatio.getInstance(getWindowById(this._targetWindowId, true).window).value,
104
- // eslint-disable-next-line local/code-no-any-casts
104
+ // eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any
105
105
  editContextSupported: typeof globalThis.EditContext === 'function',
106
106
  accessibilitySupport: (this._accessibilityService.isScreenReaderOptimized()
107
107
  ? 2 /* AccessibilitySupport.Enabled */
@@ -226,7 +226,6 @@ class EditorOptionsUtil {
226
226
  static validateOptions(options) {
227
227
  const result = new ValidatedEditorOptions();
228
228
  for (const editorOption of editorOptionsRegistry) {
229
- // eslint-disable-next-line local/code-no-any-casts
230
229
  const value = (editorOption.name === '_never_' ? undefined : options[editorOption.name]);
231
230
  result._write(editorOption.id, editorOption.validate(value));
232
231
  }
@@ -276,9 +275,7 @@ class EditorOptionsUtil {
276
275
  let changed = false;
277
276
  for (const editorOption of editorOptionsRegistry) {
278
277
  if (update.hasOwnProperty(editorOption.name)) {
279
- // eslint-disable-next-line local/code-no-any-casts
280
278
  const result = editorOption.applyUpdate(options[editorOption.name], update[editorOption.name]);
281
- // eslint-disable-next-line local/code-no-any-casts
282
279
  options[editorOption.name] = result.newValue;
283
280
  changed = changed || result.didChange;
284
281
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/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CAAC,CAAC,IAAI,CAAC,CAAC;IAC1E,CAAC;IAED;;;MAGE;IACK,MAAM,CAAC,WAAW,CAAC,OAAuB,EAAE,MAAgC;QAClF,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,KAAK,MAAM,YAAY,IAAI,qBAAqB,EAAE,CAAC;YAClD,IAAI,MAAM,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC9C,mDAAmD;gBACnD,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,CAAE,OAAe,CAAC,YAAY,CAAC,IAAI,CAAC,EAAG,MAAc,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;gBACjH,mDAAmD;gBAClD,OAAe,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;gBACtD,OAAO,GAAG,OAAO,IAAI,MAAM,CAAC,SAAS,CAAC;YACvC,CAAC;QACF,CAAC;QACD,OAAO,OAAO,CAAC;IAChB,CAAC;CACD;AAED,SAAS,0BAA0B,CAAC,QAAkC;IACrE,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC5C,cAAc,CAAC,OAAO,CAAC,CAAC;IACxB,OAAO,OAAO,CAAC;AAChB,CAAC","file":"editorConfiguration.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 * as browser from '../../../base/browser/browser.js';\nimport * as arrays from '../../../base/common/arrays.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport * as objects from '../../../base/common/objects.js';\nimport * as platform from '../../../base/common/platform.js';\nimport { ElementSizeObserver } from './elementSizeObserver.js';\nimport { FontMeasurements } from './fontMeasurements.js';\nimport { migrateOptions } from './migrateOptions.js';\nimport { TabFocus } from './tabFocus.js';\nimport { ComputeOptionsMemory, ConfigurationChangedEvent, EditorOption, editorOptionsRegistry, FindComputedEditorOptionValueById, IComputedEditorOptions, IEditorOptions, IEnvironmentalOptions } from '../../common/config/editorOptions.js';\nimport { EditorZoom } from '../../common/config/editorZoom.js';\nimport { BareFontInfo, FontInfo, IValidatedEditorOptions } from '../../common/config/fontInfo.js';\nimport { IDimension } from '../../common/core/2d/dimension.js';\nimport { IEditorConfiguration } from '../../common/config/editorConfiguration.js';\nimport { AccessibilitySupport, IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js';\nimport { getWindow, getWindowById } from '../../../base/browser/dom.js';\nimport { PixelRatio } from '../../../base/browser/pixelRatio.js';\nimport { MenuId } from '../../../platform/actions/common/actions.js';\nimport { InputMode } from '../../common/inputMode.js';\n\nexport interface IEditorConstructionOptions extends IEditorOptions {\n\t/**\n\t * The initial editor dimension (to avoid measuring the container).\n\t */\n\tdimension?: IDimension;\n\t/**\n\t * Place overflow widgets inside an external DOM node.\n\t * Defaults to an internal DOM node.\n\t */\n\toverflowWidgetsDomNode?: HTMLElement;\n}\n\nexport class EditorConfiguration extends Disposable implements IEditorConfiguration {\n\n\tprivate _onDidChange = this._register(new Emitter<ConfigurationChangedEvent>());\n\tpublic readonly onDidChange: Event<ConfigurationChangedEvent> = this._onDidChange.event;\n\n\tprivate _onDidChangeFast = this._register(new Emitter<ConfigurationChangedEvent>());\n\tpublic readonly onDidChangeFast: Event<ConfigurationChangedEvent> = this._onDidChangeFast.event;\n\n\tpublic readonly isSimpleWidget: boolean;\n\tpublic readonly contextMenuId: MenuId;\n\tprivate readonly _containerObserver: ElementSizeObserver;\n\n\tprivate _isDominatedByLongLines: boolean = false;\n\tprivate _viewLineCount: number = 1;\n\tprivate _lineNumbersDigitCount: number = 1;\n\tprivate _reservedHeight: number = 0;\n\tprivate _glyphMarginDecorationLaneCount: number = 1;\n\tprivate _targetWindowId: number;\n\n\tprivate readonly _computeOptionsMemory: ComputeOptionsMemory = new ComputeOptionsMemory();\n\t/**\n\t * Raw options as they were passed in and merged with all calls to `updateOptions`.\n\t */\n\tprivate readonly _rawOptions: IEditorOptions;\n\t/**\n\t * Validated version of `_rawOptions`.\n\t */\n\tprivate _validatedOptions: ValidatedEditorOptions;\n\t/**\n\t * Complete options which are a combination of passed in options and env values.\n\t */\n\tpublic options: ComputedEditorOptions;\n\n\tconstructor(\n\t\tisSimpleWidget: boolean,\n\t\tcontextMenuId: MenuId,\n\t\toptions: Readonly<IEditorConstructionOptions>,\n\t\tcontainer: HTMLElement | null,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService\n\t) {\n\t\tsuper();\n\t\tthis.isSimpleWidget = isSimpleWidget;\n\t\tthis.contextMenuId = contextMenuId;\n\t\tthis._containerObserver = this._register(new ElementSizeObserver(container, options.dimension));\n\t\tthis._targetWindowId = getWindow(container).vscodeWindowId;\n\n\t\tthis._rawOptions = deepCloneAndMigrateOptions(options);\n\t\tthis._validatedOptions = EditorOptionsUtil.validateOptions(this._rawOptions);\n\t\tthis.options = this._computeOptions();\n\n\t\tif (this.options.get(EditorOption.automaticLayout)) {\n\t\t\tthis._containerObserver.startObserving();\n\t\t}\n\n\t\tthis._register(EditorZoom.onDidChangeZoomLevel(() => this._recomputeOptions()));\n\t\tthis._register(TabFocus.onDidChangeTabFocus(() => this._recomputeOptions()));\n\t\tthis._register(this._containerObserver.onDidChange(() => this._recomputeOptions()));\n\t\tthis._register(FontMeasurements.onDidChange(() => this._recomputeOptions()));\n\t\tthis._register(PixelRatio.getInstance(getWindow(container)).onDidChange(() => this._recomputeOptions()));\n\t\tthis._register(this._accessibilityService.onDidChangeScreenReaderOptimized(() => this._recomputeOptions()));\n\t\tthis._register(InputMode.onDidChangeInputMode(() => this._recomputeOptions()));\n\t}\n\n\tprivate _recomputeOptions(): void {\n\t\tconst newOptions = this._computeOptions();\n\t\tconst changeEvent = EditorOptionsUtil.checkEquals(this.options, newOptions);\n\t\tif (changeEvent === null) {\n\t\t\t// nothing changed!\n\t\t\treturn;\n\t\t}\n\n\t\tthis.options = newOptions;\n\t\tthis._onDidChangeFast.fire(changeEvent);\n\t\tthis._onDidChange.fire(changeEvent);\n\t}\n\n\tprivate _computeOptions(): ComputedEditorOptions {\n\t\tconst partialEnv = this._readEnvConfiguration();\n\t\tconst bareFontInfo = BareFontInfo.createFromValidatedSettings(this._validatedOptions, partialEnv.pixelRatio, this.isSimpleWidget);\n\t\tconst fontInfo = this._readFontInfo(bareFontInfo);\n\t\tconst env: IEnvironmentalOptions = {\n\t\t\tmemory: this._computeOptionsMemory,\n\t\t\touterWidth: partialEnv.outerWidth,\n\t\t\touterHeight: partialEnv.outerHeight - this._reservedHeight,\n\t\t\tfontInfo: fontInfo,\n\t\t\textraEditorClassName: partialEnv.extraEditorClassName,\n\t\t\tisDominatedByLongLines: this._isDominatedByLongLines,\n\t\t\tviewLineCount: this._viewLineCount,\n\t\t\tlineNumbersDigitCount: this._lineNumbersDigitCount,\n\t\t\temptySelectionClipboard: partialEnv.emptySelectionClipboard,\n\t\t\tpixelRatio: partialEnv.pixelRatio,\n\t\t\ttabFocusMode: this._validatedOptions.get(EditorOption.tabFocusMode) || TabFocus.getTabFocusMode(),\n\t\t\tinputMode: InputMode.getInputMode(),\n\t\t\taccessibilitySupport: partialEnv.accessibilitySupport,\n\t\t\tglyphMarginDecorationLaneCount: this._glyphMarginDecorationLaneCount,\n\t\t\teditContextSupported: partialEnv.editContextSupported\n\t\t};\n\t\treturn EditorOptionsUtil.computeOptions(this._validatedOptions, env);\n\t}\n\n\tprotected _readEnvConfiguration(): IEnvConfiguration {\n\t\treturn {\n\t\t\textraEditorClassName: getExtraEditorClassName(),\n\t\t\touterWidth: this._containerObserver.getWidth(),\n\t\t\touterHeight: this._containerObserver.getHeight(),\n\t\t\temptySelectionClipboard: browser.isWebKit || browser.isFirefox,\n\t\t\tpixelRatio: PixelRatio.getInstance(getWindowById(this._targetWindowId, true).window).value,\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\teditContextSupported: typeof (globalThis as any).EditContext === 'function',\n\t\t\taccessibilitySupport: (\n\t\t\t\tthis._accessibilityService.isScreenReaderOptimized()\n\t\t\t\t\t? AccessibilitySupport.Enabled\n\t\t\t\t\t: this._accessibilityService.getAccessibilitySupport()\n\t\t\t)\n\t\t};\n\t}\n\n\tprotected _readFontInfo(bareFontInfo: BareFontInfo): FontInfo {\n\t\treturn FontMeasurements.readFontInfo(getWindowById(this._targetWindowId, true).window, bareFontInfo);\n\t}\n\n\tpublic getRawOptions(): IEditorOptions {\n\t\treturn this._rawOptions;\n\t}\n\n\tpublic updateOptions(_newOptions: Readonly<IEditorOptions>): void {\n\t\tconst newOptions = deepCloneAndMigrateOptions(_newOptions);\n\n\t\tconst didChange = EditorOptionsUtil.applyUpdate(this._rawOptions, newOptions);\n\t\tif (!didChange) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._validatedOptions = EditorOptionsUtil.validateOptions(this._rawOptions);\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic observeContainer(dimension?: IDimension): void {\n\t\tthis._containerObserver.observe(dimension);\n\t}\n\n\tpublic setIsDominatedByLongLines(isDominatedByLongLines: boolean): void {\n\t\tif (this._isDominatedByLongLines === isDominatedByLongLines) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isDominatedByLongLines = isDominatedByLongLines;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setModelLineCount(modelLineCount: number): void {\n\t\tconst lineNumbersDigitCount = digitCount(modelLineCount);\n\t\tif (this._lineNumbersDigitCount === lineNumbersDigitCount) {\n\t\t\treturn;\n\t\t}\n\t\tthis._lineNumbersDigitCount = lineNumbersDigitCount;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setViewLineCount(viewLineCount: number): void {\n\t\tif (this._viewLineCount === viewLineCount) {\n\t\t\treturn;\n\t\t}\n\t\tthis._viewLineCount = viewLineCount;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setReservedHeight(reservedHeight: number) {\n\t\tif (this._reservedHeight === reservedHeight) {\n\t\t\treturn;\n\t\t}\n\t\tthis._reservedHeight = reservedHeight;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setGlyphMarginDecorationLaneCount(decorationLaneCount: number): void {\n\t\tif (this._glyphMarginDecorationLaneCount === decorationLaneCount) {\n\t\t\treturn;\n\t\t}\n\t\tthis._glyphMarginDecorationLaneCount = decorationLaneCount;\n\t\tthis._recomputeOptions();\n\t}\n}\n\nfunction digitCount(n: number): number {\n\tlet r = 0;\n\twhile (n) {\n\t\tn = Math.floor(n / 10);\n\t\tr++;\n\t}\n\treturn r ? r : 1;\n}\n\nfunction getExtraEditorClassName(): string {\n\tlet extra = '';\n\tif (browser.isSafari || browser.isWebkitWebView) {\n\t\t// See https://github.com/microsoft/vscode/issues/108822\n\t\textra += 'no-minimap-shadow ';\n\t\textra += 'enable-user-select ';\n\t} else {\n\t\t// Use user-select: none in all browsers except Safari and native macOS WebView\n\t\textra += 'no-user-select ';\n\t}\n\tif (platform.isMacintosh) {\n\t\textra += 'mac ';\n\t}\n\treturn extra;\n}\n\nexport interface IEnvConfiguration {\n\textraEditorClassName: string;\n\touterWidth: number;\n\touterHeight: number;\n\temptySelectionClipboard: boolean;\n\tpixelRatio: number;\n\taccessibilitySupport: AccessibilitySupport;\n\teditContextSupported: boolean;\n}\n\nclass ValidatedEditorOptions implements IValidatedEditorOptions {\n\tprivate readonly _values: any[] = [];\n\tpublic _read<T>(option: EditorOption): T {\n\t\treturn this._values[option];\n\t}\n\tpublic get<T extends EditorOption>(id: T): FindComputedEditorOptionValueById<T> {\n\t\treturn this._values[id];\n\t}\n\tpublic _write<T>(option: EditorOption, value: T): void {\n\t\tthis._values[option] = value;\n\t}\n}\n\nexport class ComputedEditorOptions implements IComputedEditorOptions {\n\tprivate readonly _values: any[] = [];\n\tpublic _read<T>(id: EditorOption): T {\n\t\tif (id >= this._values.length) {\n\t\t\tthrow new Error('Cannot read uninitialized value');\n\t\t}\n\t\treturn this._values[id];\n\t}\n\tpublic get<T extends EditorOption>(id: T): FindComputedEditorOptionValueById<T> {\n\t\treturn this._read(id);\n\t}\n\tpublic _write<T>(id: EditorOption, value: T): void {\n\t\tthis._values[id] = value;\n\t}\n}\n\nclass EditorOptionsUtil {\n\n\tpublic static validateOptions(options: IEditorOptions): ValidatedEditorOptions {\n\t\tconst result = new ValidatedEditorOptions();\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\tconst value = (editorOption.name === '_never_' ? undefined : (options as any)[editorOption.name]);\n\t\t\tresult._write(editorOption.id, editorOption.validate(value));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static computeOptions(options: ValidatedEditorOptions, env: IEnvironmentalOptions): ComputedEditorOptions {\n\t\tconst result = new ComputedEditorOptions();\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\tresult._write(editorOption.id, editorOption.compute(env, result, options._read(editorOption.id)));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _deepEquals<T>(a: T, b: T): boolean {\n\t\tif (typeof a !== 'object' || typeof b !== 'object' || !a || !b) {\n\t\t\treturn a === b;\n\t\t}\n\t\tif (Array.isArray(a) || Array.isArray(b)) {\n\t\t\treturn (Array.isArray(a) && Array.isArray(b) ? arrays.equals(a, b) : false);\n\t\t}\n\t\tif (Object.keys(a as unknown as object).length !== Object.keys(b as unknown as object).length) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (const key in a) {\n\t\t\tif (!EditorOptionsUtil._deepEquals(a[key], b[key])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static checkEquals(a: ComputedEditorOptions, b: ComputedEditorOptions): ConfigurationChangedEvent | null {\n\t\tconst result: boolean[] = [];\n\t\tlet somethingChanged = false;\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\tconst changed = !EditorOptionsUtil._deepEquals(a._read(editorOption.id), b._read(editorOption.id));\n\t\t\tresult[editorOption.id] = changed;\n\t\t\tif (changed) {\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t}\n\t\treturn (somethingChanged ? new ConfigurationChangedEvent(result) : null);\n\t}\n\n\t/**\n\t * Returns true if something changed.\n\t * Modifies `options`.\n\t*/\n\tpublic static applyUpdate(options: IEditorOptions, update: Readonly<IEditorOptions>): boolean {\n\t\tlet changed = false;\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\tif (update.hasOwnProperty(editorOption.name)) {\n\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\tconst result = editorOption.applyUpdate((options as any)[editorOption.name], (update as any)[editorOption.name]);\n\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t(options as any)[editorOption.name] = result.newValue;\n\t\t\t\tchanged = changed || result.didChange;\n\t\t\t}\n\t\t}\n\t\treturn changed;\n\t}\n}\n\nfunction deepCloneAndMigrateOptions(_options: Readonly<IEditorOptions>): IEditorOptions {\n\tconst options = objects.deepClone(_options);\n\tmigrateOptions(options);\n\treturn options;\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 * as browser from '../../../base/browser/browser.js';\nimport * as arrays from '../../../base/common/arrays.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport * as objects from '../../../base/common/objects.js';\nimport * as platform from '../../../base/common/platform.js';\nimport { ElementSizeObserver } from './elementSizeObserver.js';\nimport { FontMeasurements } from './fontMeasurements.js';\nimport { migrateOptions } from './migrateOptions.js';\nimport { TabFocus } from './tabFocus.js';\nimport { ComputeOptionsMemory, ConfigurationChangedEvent, EditorOption, editorOptionsRegistry, FindComputedEditorOptionValueById, IComputedEditorOptions, IEditorOptions, IEnvironmentalOptions } from '../../common/config/editorOptions.js';\nimport { EditorZoom } from '../../common/config/editorZoom.js';\nimport { BareFontInfo, FontInfo, IValidatedEditorOptions } from '../../common/config/fontInfo.js';\nimport { IDimension } from '../../common/core/2d/dimension.js';\nimport { IEditorConfiguration } from '../../common/config/editorConfiguration.js';\nimport { AccessibilitySupport, IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js';\nimport { getWindow, getWindowById } from '../../../base/browser/dom.js';\nimport { PixelRatio } from '../../../base/browser/pixelRatio.js';\nimport { MenuId } from '../../../platform/actions/common/actions.js';\nimport { InputMode } from '../../common/inputMode.js';\n\nexport interface IEditorConstructionOptions extends IEditorOptions {\n\t/**\n\t * The initial editor dimension (to avoid measuring the container).\n\t */\n\tdimension?: IDimension;\n\t/**\n\t * Place overflow widgets inside an external DOM node.\n\t * Defaults to an internal DOM node.\n\t */\n\toverflowWidgetsDomNode?: HTMLElement;\n}\n\nexport class EditorConfiguration extends Disposable implements IEditorConfiguration {\n\n\tprivate _onDidChange = this._register(new Emitter<ConfigurationChangedEvent>());\n\tpublic readonly onDidChange: Event<ConfigurationChangedEvent> = this._onDidChange.event;\n\n\tprivate _onDidChangeFast = this._register(new Emitter<ConfigurationChangedEvent>());\n\tpublic readonly onDidChangeFast: Event<ConfigurationChangedEvent> = this._onDidChangeFast.event;\n\n\tpublic readonly isSimpleWidget: boolean;\n\tpublic readonly contextMenuId: MenuId;\n\tprivate readonly _containerObserver: ElementSizeObserver;\n\n\tprivate _isDominatedByLongLines: boolean = false;\n\tprivate _viewLineCount: number = 1;\n\tprivate _lineNumbersDigitCount: number = 1;\n\tprivate _reservedHeight: number = 0;\n\tprivate _glyphMarginDecorationLaneCount: number = 1;\n\tprivate _targetWindowId: number;\n\n\tprivate readonly _computeOptionsMemory: ComputeOptionsMemory = new ComputeOptionsMemory();\n\t/**\n\t * Raw options as they were passed in and merged with all calls to `updateOptions`.\n\t */\n\tprivate readonly _rawOptions: IEditorOptions;\n\t/**\n\t * Validated version of `_rawOptions`.\n\t */\n\tprivate _validatedOptions: ValidatedEditorOptions;\n\t/**\n\t * Complete options which are a combination of passed in options and env values.\n\t */\n\tpublic options: ComputedEditorOptions;\n\n\tconstructor(\n\t\tisSimpleWidget: boolean,\n\t\tcontextMenuId: MenuId,\n\t\toptions: Readonly<IEditorConstructionOptions>,\n\t\tcontainer: HTMLElement | null,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService\n\t) {\n\t\tsuper();\n\t\tthis.isSimpleWidget = isSimpleWidget;\n\t\tthis.contextMenuId = contextMenuId;\n\t\tthis._containerObserver = this._register(new ElementSizeObserver(container, options.dimension));\n\t\tthis._targetWindowId = getWindow(container).vscodeWindowId;\n\n\t\tthis._rawOptions = deepCloneAndMigrateOptions(options);\n\t\tthis._validatedOptions = EditorOptionsUtil.validateOptions(this._rawOptions);\n\t\tthis.options = this._computeOptions();\n\n\t\tif (this.options.get(EditorOption.automaticLayout)) {\n\t\t\tthis._containerObserver.startObserving();\n\t\t}\n\n\t\tthis._register(EditorZoom.onDidChangeZoomLevel(() => this._recomputeOptions()));\n\t\tthis._register(TabFocus.onDidChangeTabFocus(() => this._recomputeOptions()));\n\t\tthis._register(this._containerObserver.onDidChange(() => this._recomputeOptions()));\n\t\tthis._register(FontMeasurements.onDidChange(() => this._recomputeOptions()));\n\t\tthis._register(PixelRatio.getInstance(getWindow(container)).onDidChange(() => this._recomputeOptions()));\n\t\tthis._register(this._accessibilityService.onDidChangeScreenReaderOptimized(() => this._recomputeOptions()));\n\t\tthis._register(InputMode.onDidChangeInputMode(() => this._recomputeOptions()));\n\t}\n\n\tprivate _recomputeOptions(): void {\n\t\tconst newOptions = this._computeOptions();\n\t\tconst changeEvent = EditorOptionsUtil.checkEquals(this.options, newOptions);\n\t\tif (changeEvent === null) {\n\t\t\t// nothing changed!\n\t\t\treturn;\n\t\t}\n\n\t\tthis.options = newOptions;\n\t\tthis._onDidChangeFast.fire(changeEvent);\n\t\tthis._onDidChange.fire(changeEvent);\n\t}\n\n\tprivate _computeOptions(): ComputedEditorOptions {\n\t\tconst partialEnv = this._readEnvConfiguration();\n\t\tconst bareFontInfo = BareFontInfo.createFromValidatedSettings(this._validatedOptions, partialEnv.pixelRatio, this.isSimpleWidget);\n\t\tconst fontInfo = this._readFontInfo(bareFontInfo);\n\t\tconst env: IEnvironmentalOptions = {\n\t\t\tmemory: this._computeOptionsMemory,\n\t\t\touterWidth: partialEnv.outerWidth,\n\t\t\touterHeight: partialEnv.outerHeight - this._reservedHeight,\n\t\t\tfontInfo: fontInfo,\n\t\t\textraEditorClassName: partialEnv.extraEditorClassName,\n\t\t\tisDominatedByLongLines: this._isDominatedByLongLines,\n\t\t\tviewLineCount: this._viewLineCount,\n\t\t\tlineNumbersDigitCount: this._lineNumbersDigitCount,\n\t\t\temptySelectionClipboard: partialEnv.emptySelectionClipboard,\n\t\t\tpixelRatio: partialEnv.pixelRatio,\n\t\t\ttabFocusMode: this._validatedOptions.get(EditorOption.tabFocusMode) || TabFocus.getTabFocusMode(),\n\t\t\tinputMode: InputMode.getInputMode(),\n\t\t\taccessibilitySupport: partialEnv.accessibilitySupport,\n\t\t\tglyphMarginDecorationLaneCount: this._glyphMarginDecorationLaneCount,\n\t\t\teditContextSupported: partialEnv.editContextSupported\n\t\t};\n\t\treturn EditorOptionsUtil.computeOptions(this._validatedOptions, env);\n\t}\n\n\tprotected _readEnvConfiguration(): IEnvConfiguration {\n\t\treturn {\n\t\t\textraEditorClassName: getExtraEditorClassName(),\n\t\t\touterWidth: this._containerObserver.getWidth(),\n\t\t\touterHeight: this._containerObserver.getHeight(),\n\t\t\temptySelectionClipboard: browser.isWebKit || browser.isFirefox,\n\t\t\tpixelRatio: PixelRatio.getInstance(getWindowById(this._targetWindowId, true).window).value,\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\teditContextSupported: typeof (globalThis as any).EditContext === 'function',\n\t\t\taccessibilitySupport: (\n\t\t\t\tthis._accessibilityService.isScreenReaderOptimized()\n\t\t\t\t\t? AccessibilitySupport.Enabled\n\t\t\t\t\t: this._accessibilityService.getAccessibilitySupport()\n\t\t\t)\n\t\t};\n\t}\n\n\tprotected _readFontInfo(bareFontInfo: BareFontInfo): FontInfo {\n\t\treturn FontMeasurements.readFontInfo(getWindowById(this._targetWindowId, true).window, bareFontInfo);\n\t}\n\n\tpublic getRawOptions(): IEditorOptions {\n\t\treturn this._rawOptions;\n\t}\n\n\tpublic updateOptions(_newOptions: Readonly<IEditorOptions>): void {\n\t\tconst newOptions = deepCloneAndMigrateOptions(_newOptions);\n\n\t\tconst didChange = EditorOptionsUtil.applyUpdate(this._rawOptions, newOptions);\n\t\tif (!didChange) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._validatedOptions = EditorOptionsUtil.validateOptions(this._rawOptions);\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic observeContainer(dimension?: IDimension): void {\n\t\tthis._containerObserver.observe(dimension);\n\t}\n\n\tpublic setIsDominatedByLongLines(isDominatedByLongLines: boolean): void {\n\t\tif (this._isDominatedByLongLines === isDominatedByLongLines) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isDominatedByLongLines = isDominatedByLongLines;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setModelLineCount(modelLineCount: number): void {\n\t\tconst lineNumbersDigitCount = digitCount(modelLineCount);\n\t\tif (this._lineNumbersDigitCount === lineNumbersDigitCount) {\n\t\t\treturn;\n\t\t}\n\t\tthis._lineNumbersDigitCount = lineNumbersDigitCount;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setViewLineCount(viewLineCount: number): void {\n\t\tif (this._viewLineCount === viewLineCount) {\n\t\t\treturn;\n\t\t}\n\t\tthis._viewLineCount = viewLineCount;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setReservedHeight(reservedHeight: number) {\n\t\tif (this._reservedHeight === reservedHeight) {\n\t\t\treturn;\n\t\t}\n\t\tthis._reservedHeight = reservedHeight;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setGlyphMarginDecorationLaneCount(decorationLaneCount: number): void {\n\t\tif (this._glyphMarginDecorationLaneCount === decorationLaneCount) {\n\t\t\treturn;\n\t\t}\n\t\tthis._glyphMarginDecorationLaneCount = decorationLaneCount;\n\t\tthis._recomputeOptions();\n\t}\n}\n\nfunction digitCount(n: number): number {\n\tlet r = 0;\n\twhile (n) {\n\t\tn = Math.floor(n / 10);\n\t\tr++;\n\t}\n\treturn r ? r : 1;\n}\n\nfunction getExtraEditorClassName(): string {\n\tlet extra = '';\n\tif (browser.isSafari || browser.isWebkitWebView) {\n\t\t// See https://github.com/microsoft/vscode/issues/108822\n\t\textra += 'no-minimap-shadow ';\n\t\textra += 'enable-user-select ';\n\t} else {\n\t\t// Use user-select: none in all browsers except Safari and native macOS WebView\n\t\textra += 'no-user-select ';\n\t}\n\tif (platform.isMacintosh) {\n\t\textra += 'mac ';\n\t}\n\treturn extra;\n}\n\nexport interface IEnvConfiguration {\n\textraEditorClassName: string;\n\touterWidth: number;\n\touterHeight: number;\n\temptySelectionClipboard: boolean;\n\tpixelRatio: number;\n\taccessibilitySupport: AccessibilitySupport;\n\teditContextSupported: boolean;\n}\n\nclass ValidatedEditorOptions implements IValidatedEditorOptions {\n\tprivate readonly _values: any[] = [];\n\tpublic _read<T>(option: EditorOption): T {\n\t\treturn this._values[option];\n\t}\n\tpublic get<T extends EditorOption>(id: T): FindComputedEditorOptionValueById<T> {\n\t\treturn this._values[id];\n\t}\n\tpublic _write<T>(option: EditorOption, value: T): void {\n\t\tthis._values[option] = value;\n\t}\n}\n\nexport class ComputedEditorOptions implements IComputedEditorOptions {\n\tprivate readonly _values: any[] = [];\n\tpublic _read<T>(id: EditorOption): T {\n\t\tif (id >= this._values.length) {\n\t\t\tthrow new Error('Cannot read uninitialized value');\n\t\t}\n\t\treturn this._values[id];\n\t}\n\tpublic get<T extends EditorOption>(id: T): FindComputedEditorOptionValueById<T> {\n\t\treturn this._read(id);\n\t}\n\tpublic _write<T>(id: EditorOption, value: T): void {\n\t\tthis._values[id] = value;\n\t}\n}\n\nclass EditorOptionsUtil {\n\n\tpublic static validateOptions(options: IEditorOptions): ValidatedEditorOptions {\n\t\tconst result = new ValidatedEditorOptions();\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\tconst value = (editorOption.name === '_never_' ? undefined : (options as any)[editorOption.name]);\n\t\t\tresult._write(editorOption.id, editorOption.validate(value));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static computeOptions(options: ValidatedEditorOptions, env: IEnvironmentalOptions): ComputedEditorOptions {\n\t\tconst result = new ComputedEditorOptions();\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\tresult._write(editorOption.id, editorOption.compute(env, result, options._read(editorOption.id)));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _deepEquals<T>(a: T, b: T): boolean {\n\t\tif (typeof a !== 'object' || typeof b !== 'object' || !a || !b) {\n\t\t\treturn a === b;\n\t\t}\n\t\tif (Array.isArray(a) || Array.isArray(b)) {\n\t\t\treturn (Array.isArray(a) && Array.isArray(b) ? arrays.equals(a, b) : false);\n\t\t}\n\t\tif (Object.keys(a as unknown as object).length !== Object.keys(b as unknown as object).length) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (const key in a) {\n\t\t\tif (!EditorOptionsUtil._deepEquals(a[key], b[key])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static checkEquals(a: ComputedEditorOptions, b: ComputedEditorOptions): ConfigurationChangedEvent | null {\n\t\tconst result: boolean[] = [];\n\t\tlet somethingChanged = false;\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\tconst changed = !EditorOptionsUtil._deepEquals(a._read(editorOption.id), b._read(editorOption.id));\n\t\t\tresult[editorOption.id] = changed;\n\t\t\tif (changed) {\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t}\n\t\treturn (somethingChanged ? new ConfigurationChangedEvent(result) : null);\n\t}\n\n\t/**\n\t * Returns true if something changed.\n\t * Modifies `options`.\n\t*/\n\tpublic static applyUpdate(options: IEditorOptions, update: Readonly<IEditorOptions>): boolean {\n\t\tlet changed = false;\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\tif (update.hasOwnProperty(editorOption.name)) {\n\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\tconst result = editorOption.applyUpdate((options as any)[editorOption.name], (update as any)[editorOption.name]);\n\t\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\t\t(options as any)[editorOption.name] = result.newValue;\n\t\t\t\tchanged = changed || result.didChange;\n\t\t\t}\n\t\t}\n\t\treturn changed;\n\t}\n}\n\nfunction deepCloneAndMigrateOptions(_options: Readonly<IEditorOptions>): IEditorOptions {\n\tconst options = objects.deepClone(_options);\n\tmigrateOptions(options);\n\treturn options;\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/config/editorConfiguration.ts","vs/editor/browser/config/editorConfiguration.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,KAAK,OAAO,MAAM,kCAAkC,CAAC;AAC5D,OAAO,KAAK,MAAM,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,OAAO,EAAS,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,KAAK,OAAO,MAAM,iCAAiC,CAAC;AAC3D,OAAO,KAAK,QAAQ,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAA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AED,SAAS,0BAA0B,CAAC,QAAkC;IACrE,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC5C,cAAc,CAAC,OAAO,CAAC,CAAC;IACxB,OAAO,OAAO,CAAC;AAChB,CAAC","file":"editorConfiguration.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 * as browser from '../../../base/browser/browser.js';\nimport * as arrays from '../../../base/common/arrays.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport * as objects from '../../../base/common/objects.js';\nimport * as platform from '../../../base/common/platform.js';\nimport { ElementSizeObserver } from './elementSizeObserver.js';\nimport { FontMeasurements } from './fontMeasurements.js';\nimport { migrateOptions } from './migrateOptions.js';\nimport { TabFocus } from './tabFocus.js';\nimport { ComputeOptionsMemory, ConfigurationChangedEvent, EditorOption, editorOptionsRegistry, FindComputedEditorOptionValueById, IComputedEditorOptions, IEditorOptions, IEnvironmentalOptions } from '../../common/config/editorOptions.js';\nimport { EditorZoom } from '../../common/config/editorZoom.js';\nimport { BareFontInfo, FontInfo, IValidatedEditorOptions } from '../../common/config/fontInfo.js';\nimport { createBareFontInfoFromValidatedSettings } from '../../common/config/fontInfoFromSettings.js';\nimport { IDimension } from '../../common/core/2d/dimension.js';\nimport { IEditorConfiguration } from '../../common/config/editorConfiguration.js';\nimport { AccessibilitySupport, IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js';\nimport { getWindow, getWindowById } from '../../../base/browser/dom.js';\nimport { PixelRatio } from '../../../base/browser/pixelRatio.js';\nimport { MenuId } from '../../../platform/actions/common/actions.js';\nimport { InputMode } from '../../common/inputMode.js';\n\nexport interface IEditorConstructionOptions extends IEditorOptions {\n\t/**\n\t * The initial editor dimension (to avoid measuring the container).\n\t */\n\tdimension?: IDimension;\n\t/**\n\t * Place overflow widgets inside an external DOM node.\n\t * Defaults to an internal DOM node.\n\t */\n\toverflowWidgetsDomNode?: HTMLElement;\n}\n\nexport class EditorConfiguration extends Disposable implements IEditorConfiguration {\n\n\tprivate _onDidChange = this._register(new Emitter<ConfigurationChangedEvent>());\n\tpublic readonly onDidChange: Event<ConfigurationChangedEvent> = this._onDidChange.event;\n\n\tprivate _onDidChangeFast = this._register(new Emitter<ConfigurationChangedEvent>());\n\tpublic readonly onDidChangeFast: Event<ConfigurationChangedEvent> = this._onDidChangeFast.event;\n\n\tpublic readonly isSimpleWidget: boolean;\n\tpublic readonly contextMenuId: MenuId;\n\tprivate readonly _containerObserver: ElementSizeObserver;\n\n\tprivate _isDominatedByLongLines: boolean = false;\n\tprivate _viewLineCount: number = 1;\n\tprivate _lineNumbersDigitCount: number = 1;\n\tprivate _reservedHeight: number = 0;\n\tprivate _glyphMarginDecorationLaneCount: number = 1;\n\tprivate _targetWindowId: number;\n\n\tprivate readonly _computeOptionsMemory: ComputeOptionsMemory = new ComputeOptionsMemory();\n\t/**\n\t * Raw options as they were passed in and merged with all calls to `updateOptions`.\n\t */\n\tprivate readonly _rawOptions: IEditorOptions;\n\t/**\n\t * Validated version of `_rawOptions`.\n\t */\n\tprivate _validatedOptions: ValidatedEditorOptions;\n\t/**\n\t * Complete options which are a combination of passed in options and env values.\n\t */\n\tpublic options: ComputedEditorOptions;\n\n\tconstructor(\n\t\tisSimpleWidget: boolean,\n\t\tcontextMenuId: MenuId,\n\t\toptions: Readonly<IEditorConstructionOptions>,\n\t\tcontainer: HTMLElement | null,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService\n\t) {\n\t\tsuper();\n\t\tthis.isSimpleWidget = isSimpleWidget;\n\t\tthis.contextMenuId = contextMenuId;\n\t\tthis._containerObserver = this._register(new ElementSizeObserver(container, options.dimension));\n\t\tthis._targetWindowId = getWindow(container).vscodeWindowId;\n\n\t\tthis._rawOptions = deepCloneAndMigrateOptions(options);\n\t\tthis._validatedOptions = EditorOptionsUtil.validateOptions(this._rawOptions);\n\t\tthis.options = this._computeOptions();\n\n\t\tif (this.options.get(EditorOption.automaticLayout)) {\n\t\t\tthis._containerObserver.startObserving();\n\t\t}\n\n\t\tthis._register(EditorZoom.onDidChangeZoomLevel(() => this._recomputeOptions()));\n\t\tthis._register(TabFocus.onDidChangeTabFocus(() => this._recomputeOptions()));\n\t\tthis._register(this._containerObserver.onDidChange(() => this._recomputeOptions()));\n\t\tthis._register(FontMeasurements.onDidChange(() => this._recomputeOptions()));\n\t\tthis._register(PixelRatio.getInstance(getWindow(container)).onDidChange(() => this._recomputeOptions()));\n\t\tthis._register(this._accessibilityService.onDidChangeScreenReaderOptimized(() => this._recomputeOptions()));\n\t\tthis._register(InputMode.onDidChangeInputMode(() => this._recomputeOptions()));\n\t}\n\n\tprivate _recomputeOptions(): void {\n\t\tconst newOptions = this._computeOptions();\n\t\tconst changeEvent = EditorOptionsUtil.checkEquals(this.options, newOptions);\n\t\tif (changeEvent === null) {\n\t\t\t// nothing changed!\n\t\t\treturn;\n\t\t}\n\n\t\tthis.options = newOptions;\n\t\tthis._onDidChangeFast.fire(changeEvent);\n\t\tthis._onDidChange.fire(changeEvent);\n\t}\n\n\tprivate _computeOptions(): ComputedEditorOptions {\n\t\tconst partialEnv = this._readEnvConfiguration();\n\t\tconst bareFontInfo = createBareFontInfoFromValidatedSettings(this._validatedOptions, partialEnv.pixelRatio, this.isSimpleWidget);\n\t\tconst fontInfo = this._readFontInfo(bareFontInfo);\n\t\tconst env: IEnvironmentalOptions = {\n\t\t\tmemory: this._computeOptionsMemory,\n\t\t\touterWidth: partialEnv.outerWidth,\n\t\t\touterHeight: partialEnv.outerHeight - this._reservedHeight,\n\t\t\tfontInfo: fontInfo,\n\t\t\textraEditorClassName: partialEnv.extraEditorClassName,\n\t\t\tisDominatedByLongLines: this._isDominatedByLongLines,\n\t\t\tviewLineCount: this._viewLineCount,\n\t\t\tlineNumbersDigitCount: this._lineNumbersDigitCount,\n\t\t\temptySelectionClipboard: partialEnv.emptySelectionClipboard,\n\t\t\tpixelRatio: partialEnv.pixelRatio,\n\t\t\ttabFocusMode: this._validatedOptions.get(EditorOption.tabFocusMode) || TabFocus.getTabFocusMode(),\n\t\t\tinputMode: InputMode.getInputMode(),\n\t\t\taccessibilitySupport: partialEnv.accessibilitySupport,\n\t\t\tglyphMarginDecorationLaneCount: this._glyphMarginDecorationLaneCount,\n\t\t\teditContextSupported: partialEnv.editContextSupported\n\t\t};\n\t\treturn EditorOptionsUtil.computeOptions(this._validatedOptions, env);\n\t}\n\n\tprotected _readEnvConfiguration(): IEnvConfiguration {\n\t\treturn {\n\t\t\textraEditorClassName: getExtraEditorClassName(),\n\t\t\touterWidth: this._containerObserver.getWidth(),\n\t\t\touterHeight: this._containerObserver.getHeight(),\n\t\t\temptySelectionClipboard: browser.isWebKit || browser.isFirefox,\n\t\t\tpixelRatio: PixelRatio.getInstance(getWindowById(this._targetWindowId, true).window).value,\n\t\t\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\t\t\teditContextSupported: typeof (globalThis as any).EditContext === 'function',\n\t\t\taccessibilitySupport: (\n\t\t\t\tthis._accessibilityService.isScreenReaderOptimized()\n\t\t\t\t\t? AccessibilitySupport.Enabled\n\t\t\t\t\t: this._accessibilityService.getAccessibilitySupport()\n\t\t\t)\n\t\t};\n\t}\n\n\tprotected _readFontInfo(bareFontInfo: BareFontInfo): FontInfo {\n\t\treturn FontMeasurements.readFontInfo(getWindowById(this._targetWindowId, true).window, bareFontInfo);\n\t}\n\n\tpublic getRawOptions(): IEditorOptions {\n\t\treturn this._rawOptions;\n\t}\n\n\tpublic updateOptions(_newOptions: Readonly<IEditorOptions>): void {\n\t\tconst newOptions = deepCloneAndMigrateOptions(_newOptions);\n\n\t\tconst didChange = EditorOptionsUtil.applyUpdate(this._rawOptions, newOptions);\n\t\tif (!didChange) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._validatedOptions = EditorOptionsUtil.validateOptions(this._rawOptions);\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic observeContainer(dimension?: IDimension): void {\n\t\tthis._containerObserver.observe(dimension);\n\t}\n\n\tpublic setIsDominatedByLongLines(isDominatedByLongLines: boolean): void {\n\t\tif (this._isDominatedByLongLines === isDominatedByLongLines) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isDominatedByLongLines = isDominatedByLongLines;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setModelLineCount(modelLineCount: number): void {\n\t\tconst lineNumbersDigitCount = digitCount(modelLineCount);\n\t\tif (this._lineNumbersDigitCount === lineNumbersDigitCount) {\n\t\t\treturn;\n\t\t}\n\t\tthis._lineNumbersDigitCount = lineNumbersDigitCount;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setViewLineCount(viewLineCount: number): void {\n\t\tif (this._viewLineCount === viewLineCount) {\n\t\t\treturn;\n\t\t}\n\t\tthis._viewLineCount = viewLineCount;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setReservedHeight(reservedHeight: number) {\n\t\tif (this._reservedHeight === reservedHeight) {\n\t\t\treturn;\n\t\t}\n\t\tthis._reservedHeight = reservedHeight;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setGlyphMarginDecorationLaneCount(decorationLaneCount: number): void {\n\t\tif (this._glyphMarginDecorationLaneCount === decorationLaneCount) {\n\t\t\treturn;\n\t\t}\n\t\tthis._glyphMarginDecorationLaneCount = decorationLaneCount;\n\t\tthis._recomputeOptions();\n\t}\n}\n\nfunction digitCount(n: number): number {\n\tlet r = 0;\n\twhile (n) {\n\t\tn = Math.floor(n / 10);\n\t\tr++;\n\t}\n\treturn r ? r : 1;\n}\n\nfunction getExtraEditorClassName(): string {\n\tlet extra = '';\n\tif (browser.isSafari || browser.isWebkitWebView) {\n\t\t// See https://github.com/microsoft/vscode/issues/108822\n\t\textra += 'no-minimap-shadow ';\n\t\textra += 'enable-user-select ';\n\t} else {\n\t\t// Use user-select: none in all browsers except Safari and native macOS WebView\n\t\textra += 'no-user-select ';\n\t}\n\tif (platform.isMacintosh) {\n\t\textra += 'mac ';\n\t}\n\treturn extra;\n}\n\nexport interface IEnvConfiguration {\n\textraEditorClassName: string;\n\touterWidth: number;\n\touterHeight: number;\n\temptySelectionClipboard: boolean;\n\tpixelRatio: number;\n\taccessibilitySupport: AccessibilitySupport;\n\teditContextSupported: boolean;\n}\n\nclass ValidatedEditorOptions implements IValidatedEditorOptions {\n\tprivate readonly _values: unknown[] = [];\n\tpublic _read<T>(option: EditorOption): T {\n\t\treturn this._values[option] as T;\n\t}\n\tpublic get<T extends EditorOption>(id: T): FindComputedEditorOptionValueById<T> {\n\t\treturn this._values[id] as FindComputedEditorOptionValueById<T>;\n\t}\n\tpublic _write<T>(option: EditorOption, value: T): void {\n\t\tthis._values[option] = value;\n\t}\n}\n\nexport class ComputedEditorOptions implements IComputedEditorOptions {\n\tprivate readonly _values: unknown[] = [];\n\tpublic _read<T>(id: EditorOption): T {\n\t\tif (id >= this._values.length) {\n\t\t\tthrow new Error('Cannot read uninitialized value');\n\t\t}\n\t\treturn this._values[id] as T;\n\t}\n\tpublic get<T extends EditorOption>(id: T): FindComputedEditorOptionValueById<T> {\n\t\treturn this._read(id);\n\t}\n\tpublic _write<T>(id: EditorOption, value: T): void {\n\t\tthis._values[id] = value;\n\t}\n}\n\nclass EditorOptionsUtil {\n\n\tpublic static validateOptions(options: IEditorOptions): ValidatedEditorOptions {\n\t\tconst result = new ValidatedEditorOptions();\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\tconst value = (editorOption.name === '_never_' ? undefined : (options as Record<string, unknown>)[editorOption.name]);\n\t\t\tresult._write(editorOption.id, editorOption.validate(value));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static computeOptions(options: ValidatedEditorOptions, env: IEnvironmentalOptions): ComputedEditorOptions {\n\t\tconst result = new ComputedEditorOptions();\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\tresult._write(editorOption.id, editorOption.compute(env, result, options._read(editorOption.id)));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _deepEquals<T>(a: T, b: T): boolean {\n\t\tif (typeof a !== 'object' || typeof b !== 'object' || !a || !b) {\n\t\t\treturn a === b;\n\t\t}\n\t\tif (Array.isArray(a) || Array.isArray(b)) {\n\t\t\treturn (Array.isArray(a) && Array.isArray(b) ? arrays.equals(a, b) : false);\n\t\t}\n\t\tif (Object.keys(a as unknown as object).length !== Object.keys(b as unknown as object).length) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (const key in a) {\n\t\t\tif (!EditorOptionsUtil._deepEquals(a[key], b[key])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static checkEquals(a: ComputedEditorOptions, b: ComputedEditorOptions): ConfigurationChangedEvent | null {\n\t\tconst result: boolean[] = [];\n\t\tlet somethingChanged = false;\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\tconst changed = !EditorOptionsUtil._deepEquals(a._read(editorOption.id), b._read(editorOption.id));\n\t\t\tresult[editorOption.id] = changed;\n\t\t\tif (changed) {\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t}\n\t\treturn (somethingChanged ? new ConfigurationChangedEvent(result) : null);\n\t}\n\n\t/**\n\t * Returns true if something changed.\n\t * Modifies `options`.\n\t*/\n\tpublic static applyUpdate(options: IEditorOptions, update: Readonly<IEditorOptions>): boolean {\n\t\tlet changed = false;\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\tif (update.hasOwnProperty(editorOption.name)) {\n\t\t\t\tconst result = editorOption.applyUpdate((options as Record<string, unknown>)[editorOption.name], (update as Record<string, unknown>)[editorOption.name]);\n\t\t\t\t(options as Record<string, unknown>)[editorOption.name] = result.newValue;\n\t\t\t\tchanged = changed || result.didChange;\n\t\t\t}\n\t\t}\n\t\treturn changed;\n\t}\n}\n\nfunction deepCloneAndMigrateOptions(_options: Readonly<IEditorOptions>): IEditorOptions {\n\tconst options = objects.deepClone(_options);\n\tmigrateOptions(options);\n\treturn options;\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 * as browser from '../../../base/browser/browser.js';\nimport * as arrays from '../../../base/common/arrays.js';\nimport { Emitter, Event } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport * as objects from '../../../base/common/objects.js';\nimport * as platform from '../../../base/common/platform.js';\nimport { ElementSizeObserver } from './elementSizeObserver.js';\nimport { FontMeasurements } from './fontMeasurements.js';\nimport { migrateOptions } from './migrateOptions.js';\nimport { TabFocus } from './tabFocus.js';\nimport { ComputeOptionsMemory, ConfigurationChangedEvent, EditorOption, editorOptionsRegistry, FindComputedEditorOptionValueById, IComputedEditorOptions, IEditorOptions, IEnvironmentalOptions } from '../../common/config/editorOptions.js';\nimport { EditorZoom } from '../../common/config/editorZoom.js';\nimport { BareFontInfo, FontInfo, IValidatedEditorOptions } from '../../common/config/fontInfo.js';\nimport { createBareFontInfoFromValidatedSettings } from '../../common/config/fontInfoFromSettings.js';\nimport { IDimension } from '../../common/core/2d/dimension.js';\nimport { IEditorConfiguration } from '../../common/config/editorConfiguration.js';\nimport { AccessibilitySupport, IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js';\nimport { getWindow, getWindowById } from '../../../base/browser/dom.js';\nimport { PixelRatio } from '../../../base/browser/pixelRatio.js';\nimport { MenuId } from '../../../platform/actions/common/actions.js';\nimport { InputMode } from '../../common/inputMode.js';\n\nexport interface IEditorConstructionOptions extends IEditorOptions {\n\t/**\n\t * The initial editor dimension (to avoid measuring the container).\n\t */\n\tdimension?: IDimension;\n\t/**\n\t * Place overflow widgets inside an external DOM node.\n\t * Defaults to an internal DOM node.\n\t */\n\toverflowWidgetsDomNode?: HTMLElement;\n}\n\nexport class EditorConfiguration extends Disposable implements IEditorConfiguration {\n\n\tprivate _onDidChange = this._register(new Emitter<ConfigurationChangedEvent>());\n\tpublic readonly onDidChange: Event<ConfigurationChangedEvent> = this._onDidChange.event;\n\n\tprivate _onDidChangeFast = this._register(new Emitter<ConfigurationChangedEvent>());\n\tpublic readonly onDidChangeFast: Event<ConfigurationChangedEvent> = this._onDidChangeFast.event;\n\n\tpublic readonly isSimpleWidget: boolean;\n\tpublic readonly contextMenuId: MenuId;\n\tprivate readonly _containerObserver: ElementSizeObserver;\n\n\tprivate _isDominatedByLongLines: boolean = false;\n\tprivate _viewLineCount: number = 1;\n\tprivate _lineNumbersDigitCount: number = 1;\n\tprivate _reservedHeight: number = 0;\n\tprivate _glyphMarginDecorationLaneCount: number = 1;\n\tprivate _targetWindowId: number;\n\n\tprivate readonly _computeOptionsMemory: ComputeOptionsMemory = new ComputeOptionsMemory();\n\t/**\n\t * Raw options as they were passed in and merged with all calls to `updateOptions`.\n\t */\n\tprivate readonly _rawOptions: IEditorOptions;\n\t/**\n\t * Validated version of `_rawOptions`.\n\t */\n\tprivate _validatedOptions: ValidatedEditorOptions;\n\t/**\n\t * Complete options which are a combination of passed in options and env values.\n\t */\n\tpublic options: ComputedEditorOptions;\n\n\tconstructor(\n\t\tisSimpleWidget: boolean,\n\t\tcontextMenuId: MenuId,\n\t\toptions: Readonly<IEditorConstructionOptions>,\n\t\tcontainer: HTMLElement | null,\n\t\t@IAccessibilityService private readonly _accessibilityService: IAccessibilityService\n\t) {\n\t\tsuper();\n\t\tthis.isSimpleWidget = isSimpleWidget;\n\t\tthis.contextMenuId = contextMenuId;\n\t\tthis._containerObserver = this._register(new ElementSizeObserver(container, options.dimension));\n\t\tthis._targetWindowId = getWindow(container).vscodeWindowId;\n\n\t\tthis._rawOptions = deepCloneAndMigrateOptions(options);\n\t\tthis._validatedOptions = EditorOptionsUtil.validateOptions(this._rawOptions);\n\t\tthis.options = this._computeOptions();\n\n\t\tif (this.options.get(EditorOption.automaticLayout)) {\n\t\t\tthis._containerObserver.startObserving();\n\t\t}\n\n\t\tthis._register(EditorZoom.onDidChangeZoomLevel(() => this._recomputeOptions()));\n\t\tthis._register(TabFocus.onDidChangeTabFocus(() => this._recomputeOptions()));\n\t\tthis._register(this._containerObserver.onDidChange(() => this._recomputeOptions()));\n\t\tthis._register(FontMeasurements.onDidChange(() => this._recomputeOptions()));\n\t\tthis._register(PixelRatio.getInstance(getWindow(container)).onDidChange(() => this._recomputeOptions()));\n\t\tthis._register(this._accessibilityService.onDidChangeScreenReaderOptimized(() => this._recomputeOptions()));\n\t\tthis._register(InputMode.onDidChangeInputMode(() => this._recomputeOptions()));\n\t}\n\n\tprivate _recomputeOptions(): void {\n\t\tconst newOptions = this._computeOptions();\n\t\tconst changeEvent = EditorOptionsUtil.checkEquals(this.options, newOptions);\n\t\tif (changeEvent === null) {\n\t\t\t// nothing changed!\n\t\t\treturn;\n\t\t}\n\n\t\tthis.options = newOptions;\n\t\tthis._onDidChangeFast.fire(changeEvent);\n\t\tthis._onDidChange.fire(changeEvent);\n\t}\n\n\tprivate _computeOptions(): ComputedEditorOptions {\n\t\tconst partialEnv = this._readEnvConfiguration();\n\t\tconst bareFontInfo = createBareFontInfoFromValidatedSettings(this._validatedOptions, partialEnv.pixelRatio, this.isSimpleWidget);\n\t\tconst fontInfo = this._readFontInfo(bareFontInfo);\n\t\tconst env: IEnvironmentalOptions = {\n\t\t\tmemory: this._computeOptionsMemory,\n\t\t\touterWidth: partialEnv.outerWidth,\n\t\t\touterHeight: partialEnv.outerHeight - this._reservedHeight,\n\t\t\tfontInfo: fontInfo,\n\t\t\textraEditorClassName: partialEnv.extraEditorClassName,\n\t\t\tisDominatedByLongLines: this._isDominatedByLongLines,\n\t\t\tviewLineCount: this._viewLineCount,\n\t\t\tlineNumbersDigitCount: this._lineNumbersDigitCount,\n\t\t\temptySelectionClipboard: partialEnv.emptySelectionClipboard,\n\t\t\tpixelRatio: partialEnv.pixelRatio,\n\t\t\ttabFocusMode: this._validatedOptions.get(EditorOption.tabFocusMode) || TabFocus.getTabFocusMode(),\n\t\t\tinputMode: InputMode.getInputMode(),\n\t\t\taccessibilitySupport: partialEnv.accessibilitySupport,\n\t\t\tglyphMarginDecorationLaneCount: this._glyphMarginDecorationLaneCount,\n\t\t\teditContextSupported: partialEnv.editContextSupported\n\t\t};\n\t\treturn EditorOptionsUtil.computeOptions(this._validatedOptions, env);\n\t}\n\n\tprotected _readEnvConfiguration(): IEnvConfiguration {\n\t\treturn {\n\t\t\textraEditorClassName: getExtraEditorClassName(),\n\t\t\touterWidth: this._containerObserver.getWidth(),\n\t\t\touterHeight: this._containerObserver.getHeight(),\n\t\t\temptySelectionClipboard: browser.isWebKit || browser.isFirefox,\n\t\t\tpixelRatio: PixelRatio.getInstance(getWindowById(this._targetWindowId, true).window).value,\n\t\t\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\t\t\teditContextSupported: typeof (globalThis as any).EditContext === 'function',\n\t\t\taccessibilitySupport: (\n\t\t\t\tthis._accessibilityService.isScreenReaderOptimized()\n\t\t\t\t\t? AccessibilitySupport.Enabled\n\t\t\t\t\t: this._accessibilityService.getAccessibilitySupport()\n\t\t\t)\n\t\t};\n\t}\n\n\tprotected _readFontInfo(bareFontInfo: BareFontInfo): FontInfo {\n\t\treturn FontMeasurements.readFontInfo(getWindowById(this._targetWindowId, true).window, bareFontInfo);\n\t}\n\n\tpublic getRawOptions(): IEditorOptions {\n\t\treturn this._rawOptions;\n\t}\n\n\tpublic updateOptions(_newOptions: Readonly<IEditorOptions>): void {\n\t\tconst newOptions = deepCloneAndMigrateOptions(_newOptions);\n\n\t\tconst didChange = EditorOptionsUtil.applyUpdate(this._rawOptions, newOptions);\n\t\tif (!didChange) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._validatedOptions = EditorOptionsUtil.validateOptions(this._rawOptions);\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic observeContainer(dimension?: IDimension): void {\n\t\tthis._containerObserver.observe(dimension);\n\t}\n\n\tpublic setIsDominatedByLongLines(isDominatedByLongLines: boolean): void {\n\t\tif (this._isDominatedByLongLines === isDominatedByLongLines) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isDominatedByLongLines = isDominatedByLongLines;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setModelLineCount(modelLineCount: number): void {\n\t\tconst lineNumbersDigitCount = digitCount(modelLineCount);\n\t\tif (this._lineNumbersDigitCount === lineNumbersDigitCount) {\n\t\t\treturn;\n\t\t}\n\t\tthis._lineNumbersDigitCount = lineNumbersDigitCount;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setViewLineCount(viewLineCount: number): void {\n\t\tif (this._viewLineCount === viewLineCount) {\n\t\t\treturn;\n\t\t}\n\t\tthis._viewLineCount = viewLineCount;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setReservedHeight(reservedHeight: number) {\n\t\tif (this._reservedHeight === reservedHeight) {\n\t\t\treturn;\n\t\t}\n\t\tthis._reservedHeight = reservedHeight;\n\t\tthis._recomputeOptions();\n\t}\n\n\tpublic setGlyphMarginDecorationLaneCount(decorationLaneCount: number): void {\n\t\tif (this._glyphMarginDecorationLaneCount === decorationLaneCount) {\n\t\t\treturn;\n\t\t}\n\t\tthis._glyphMarginDecorationLaneCount = decorationLaneCount;\n\t\tthis._recomputeOptions();\n\t}\n}\n\nfunction digitCount(n: number): number {\n\tlet r = 0;\n\twhile (n) {\n\t\tn = Math.floor(n / 10);\n\t\tr++;\n\t}\n\treturn r ? r : 1;\n}\n\nfunction getExtraEditorClassName(): string {\n\tlet extra = '';\n\tif (browser.isSafari || browser.isWebkitWebView) {\n\t\t// See https://github.com/microsoft/vscode/issues/108822\n\t\textra += 'no-minimap-shadow ';\n\t\textra += 'enable-user-select ';\n\t} else {\n\t\t// Use user-select: none in all browsers except Safari and native macOS WebView\n\t\textra += 'no-user-select ';\n\t}\n\tif (platform.isMacintosh) {\n\t\textra += 'mac ';\n\t}\n\treturn extra;\n}\n\nexport interface IEnvConfiguration {\n\textraEditorClassName: string;\n\touterWidth: number;\n\touterHeight: number;\n\temptySelectionClipboard: boolean;\n\tpixelRatio: number;\n\taccessibilitySupport: AccessibilitySupport;\n\teditContextSupported: boolean;\n}\n\nclass ValidatedEditorOptions implements IValidatedEditorOptions {\n\tprivate readonly _values: unknown[] = [];\n\tpublic _read<T>(option: EditorOption): T {\n\t\treturn this._values[option] as T;\n\t}\n\tpublic get<T extends EditorOption>(id: T): FindComputedEditorOptionValueById<T> {\n\t\treturn this._values[id] as FindComputedEditorOptionValueById<T>;\n\t}\n\tpublic _write<T>(option: EditorOption, value: T): void {\n\t\tthis._values[option] = value;\n\t}\n}\n\nexport class ComputedEditorOptions implements IComputedEditorOptions {\n\tprivate readonly _values: unknown[] = [];\n\tpublic _read<T>(id: EditorOption): T {\n\t\tif (id >= this._values.length) {\n\t\t\tthrow new Error('Cannot read uninitialized value');\n\t\t}\n\t\treturn this._values[id] as T;\n\t}\n\tpublic get<T extends EditorOption>(id: T): FindComputedEditorOptionValueById<T> {\n\t\treturn this._read(id);\n\t}\n\tpublic _write<T>(id: EditorOption, value: T): void {\n\t\tthis._values[id] = value;\n\t}\n}\n\nclass EditorOptionsUtil {\n\n\tpublic static validateOptions(options: IEditorOptions): ValidatedEditorOptions {\n\t\tconst result = new ValidatedEditorOptions();\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\tconst value = (editorOption.name === '_never_' ? undefined : (options as Record<string, unknown>)[editorOption.name]);\n\t\t\tresult._write(editorOption.id, editorOption.validate(value));\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static computeOptions(options: ValidatedEditorOptions, env: IEnvironmentalOptions): ComputedEditorOptions {\n\t\tconst result = new ComputedEditorOptions();\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\tresult._write(editorOption.id, editorOption.compute(env, result, options._read(editorOption.id)));\n\t\t}\n\t\treturn result;\n\t}\n\n\tprivate static _deepEquals<T>(a: T, b: T): boolean {\n\t\tif (typeof a !== 'object' || typeof b !== 'object' || !a || !b) {\n\t\t\treturn a === b;\n\t\t}\n\t\tif (Array.isArray(a) || Array.isArray(b)) {\n\t\t\treturn (Array.isArray(a) && Array.isArray(b) ? arrays.equals(a, b) : false);\n\t\t}\n\t\tif (Object.keys(a as unknown as object).length !== Object.keys(b as unknown as object).length) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (const key in a) {\n\t\t\tif (!EditorOptionsUtil._deepEquals(a[key], b[key])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static checkEquals(a: ComputedEditorOptions, b: ComputedEditorOptions): ConfigurationChangedEvent | null {\n\t\tconst result: boolean[] = [];\n\t\tlet somethingChanged = false;\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\tconst changed = !EditorOptionsUtil._deepEquals(a._read(editorOption.id), b._read(editorOption.id));\n\t\t\tresult[editorOption.id] = changed;\n\t\t\tif (changed) {\n\t\t\t\tsomethingChanged = true;\n\t\t\t}\n\t\t}\n\t\treturn (somethingChanged ? new ConfigurationChangedEvent(result) : null);\n\t}\n\n\t/**\n\t * Returns true if something changed.\n\t * Modifies `options`.\n\t*/\n\tpublic static applyUpdate(options: IEditorOptions, update: Readonly<IEditorOptions>): boolean {\n\t\tlet changed = false;\n\t\tfor (const editorOption of editorOptionsRegistry) {\n\t\t\tif (update.hasOwnProperty(editorOption.name)) {\n\t\t\t\tconst result = editorOption.applyUpdate((options as Record<string, unknown>)[editorOption.name], (update as Record<string, unknown>)[editorOption.name]);\n\t\t\t\t(options as Record<string, unknown>)[editorOption.name] = result.newValue;\n\t\t\t\tchanged = changed || result.didChange;\n\t\t\t}\n\t\t}\n\t\treturn changed;\n\t}\n}\n\nfunction deepCloneAndMigrateOptions(_options: Readonly<IEditorOptions>): IEditorOptions {\n\tconst options = objects.deepClone(_options);\n\tmigrateOptions(options);\n\treturn options;\n}\n"]}
@@ -15,7 +15,7 @@ export class EditorSettingMigration {
15
15
  this.migrate(value, read, write);
16
16
  }
17
17
  static _read(source, key) {
18
- if (typeof source === 'undefined') {
18
+ if (typeof source === 'undefined' || source === null) {
19
19
  return undefined;
20
20
  }
21
21
  const firstDotIndex = key.indexOf('.');
@@ -179,7 +179,6 @@ registerEditorSettingMigration('editor.experimentalEditContextEnabled', (value,
179
179
  registerEditorSettingMigration('codeActionsOnSave', (value, read, write) => {
180
180
  if (value && typeof value === 'object') {
181
181
  let toBeModified = false;
182
- // eslint-disable-next-line local/code-no-any-casts
183
182
  const newValue = {};
184
183
  for (const entry of Object.entries(value)) {
185
184
  if (typeof entry[1] === 'boolean') {
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/config/migrateOptions.ts","vs/editor/browser/config/migrateOptions.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAYhG,MAAM,OAAO,sBAAsB;aAEpB,UAAK,GAA6B,EAAE,CAAC;IAEnD,YACiB,GAAW,EACX,OAA4E;QAD5E,QAAG,GAAH,GAAG,CAAQ;QACX,YAAO,GAAP,OAAO,CAAqE;IACzF,CAAC;IAEL,KAAK,CAAC,OAAY;QACjB,MAAM,KAAK,GAAG,sBAAsB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9D,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,sBAAsB,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACzE,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,KAAU,EAAE,EAAE,CAAC,sBAAsB,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9F,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAClC,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/_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 { IEditorOptions } from '../../common/config/editorOptions.js';\n\nexport interface ISettingsReader {\n\t(key: string): any;\n}\n\nexport interface ISettingsWriter {\n\t(key: string, value: any): void;\n}\n\nexport class EditorSettingMigration {\n\n\tpublic static items: EditorSettingMigration[] = [];\n\n\tconstructor(\n\t\tpublic readonly key: string,\n\t\tpublic readonly migrate: (value: any, read: ISettingsReader, write: ISettingsWriter) => void\n\t) { }\n\n\tapply(options: any): void {\n\t\tconst value = EditorSettingMigration._read(options, this.key);\n\t\tconst read = (key: string) => EditorSettingMigration._read(options, key);\n\t\tconst write = (key: string, value: any) => EditorSettingMigration._write(options, key, value);\n\t\tthis.migrate(value, read, write);\n\t}\n\n\tprivate static _read(source: any, key: string): any {\n\t\tif (typeof source === 'undefined') {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\treturn this._read(source[firstSegment], key.substring(firstDotIndex + 1));\n\t\t}\n\t\treturn source[key];\n\t}\n\n\tprivate static _write(target: any, key: string, value: any): void {\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\ttarget[firstSegment] = target[firstSegment] || {};\n\t\t\tthis._write(target[firstSegment], key.substring(firstDotIndex + 1), value);\n\t\t\treturn;\n\t\t}\n\t\ttarget[key] = value;\n\t}\n}\n\nfunction registerEditorSettingMigration(key: string, migrate: (value: any, read: ISettingsReader, write: ISettingsWriter) => void): void {\n\tEditorSettingMigration.items.push(new EditorSettingMigration(key, migrate));\n}\n\nfunction registerSimpleEditorSettingMigration(key: string, values: [any, any][]): void {\n\tregisterEditorSettingMigration(key, (value, read, write) => {\n\t\tif (typeof value !== 'undefined') {\n\t\t\tfor (const [oldValue, newValue] of values) {\n\t\t\t\tif (value === oldValue) {\n\t\t\t\t\twrite(key, newValue);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}\n\n/**\n * Compatibility with old options\n */\nexport function migrateOptions(options: IEditorOptions): void {\n\tEditorSettingMigration.items.forEach(migration => migration.apply(options));\n}\n\nregisterSimpleEditorSettingMigration('wordWrap', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('lineNumbers', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorBlinking', [['visible', 'solid']]);\nregisterSimpleEditorSettingMigration('renderWhitespace', [[true, 'boundary'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('renderLineHighlight', [[true, 'line'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('acceptSuggestionOnEnter', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('tabCompletion', [[false, 'off'], [true, 'onlySnippets']]);\nregisterSimpleEditorSettingMigration('hover', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('parameterHints', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('autoIndent', [[false, 'advanced'], [true, 'full']]);\nregisterSimpleEditorSettingMigration('matchBrackets', [[true, 'always'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('renderFinalNewline', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorSmoothCaretAnimation', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('occurrencesHighlight', [[true, 'singleFile'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('wordBasedSuggestions', [[true, 'matchingDocuments'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('defaultColorDecorators', [[true, 'auto'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('minimap.autohide', [[true, 'mouseover'], [false, 'none']]);\n\nregisterEditorSettingMigration('autoClosingBrackets', (value, read, write) => {\n\tif (value === false) {\n\t\twrite('autoClosingBrackets', 'never');\n\t\tif (typeof read('autoClosingQuotes') === 'undefined') {\n\t\t\twrite('autoClosingQuotes', 'never');\n\t\t}\n\t\tif (typeof read('autoSurround') === 'undefined') {\n\t\t\twrite('autoSurround', 'never');\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('renderIndentGuides', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('renderIndentGuides', undefined);\n\t\tif (typeof read('guides.indentation') === 'undefined') {\n\t\t\twrite('guides.indentation', !!value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('highlightActiveIndentGuide', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('highlightActiveIndentGuide', undefined);\n\t\tif (typeof read('guides.highlightActiveIndentation') === 'undefined') {\n\t\t\twrite('guides.highlightActiveIndentation', !!value);\n\t\t}\n\t}\n});\n\nconst suggestFilteredTypesMapping: Record<string, string> = {\n\tmethod: 'showMethods',\n\tfunction: 'showFunctions',\n\tconstructor: 'showConstructors',\n\tdeprecated: 'showDeprecated',\n\tfield: 'showFields',\n\tvariable: 'showVariables',\n\tclass: 'showClasses',\n\tstruct: 'showStructs',\n\tinterface: 'showInterfaces',\n\tmodule: 'showModules',\n\tproperty: 'showProperties',\n\tevent: 'showEvents',\n\toperator: 'showOperators',\n\tunit: 'showUnits',\n\tvalue: 'showValues',\n\tconstant: 'showConstants',\n\tenum: 'showEnums',\n\tenumMember: 'showEnumMembers',\n\tkeyword: 'showKeywords',\n\ttext: 'showWords',\n\tcolor: 'showColors',\n\tfile: 'showFiles',\n\treference: 'showReferences',\n\tfolder: 'showFolders',\n\ttypeParameter: 'showTypeParameters',\n\tsnippet: 'showSnippets',\n};\n\nregisterEditorSettingMigration('suggest.filteredTypes', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tfor (const entry of Object.entries(suggestFilteredTypesMapping)) {\n\t\t\tconst v = value[entry[0]];\n\t\t\tif (v === false) {\n\t\t\t\tif (typeof read(`suggest.${entry[1]}`) === 'undefined') {\n\t\t\t\t\twrite(`suggest.${entry[1]}`, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twrite('suggest.filteredTypes', undefined);\n\t}\n});\n\nregisterEditorSettingMigration('quickSuggestions', (input, read, write) => {\n\tif (typeof input === 'boolean') {\n\t\tconst value = input ? 'on' : 'off';\n\t\tconst newValue = { comments: value, strings: value, other: value };\n\t\twrite('quickSuggestions', newValue);\n\t}\n});\n\n// Sticky Scroll\n\nregisterEditorSettingMigration('experimental.stickyScroll.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('experimental.stickyScroll.enabled', undefined);\n\t\tif (typeof read('stickyScroll.enabled') === 'undefined') {\n\t\t\twrite('stickyScroll.enabled', value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('experimental.stickyScroll.maxLineCount', (value, read, write) => {\n\tif (typeof value === 'number') {\n\t\twrite('experimental.stickyScroll.maxLineCount', undefined);\n\t\tif (typeof read('stickyScroll.maxLineCount') === 'undefined') {\n\t\t\twrite('stickyScroll.maxLineCount', value);\n\t\t}\n\t}\n});\n\n// Edit Context\n\nregisterEditorSettingMigration('editor.experimentalEditContextEnabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('editor.experimentalEditContextEnabled', undefined);\n\t\tif (typeof read('editor.editContext') === 'undefined') {\n\t\t\twrite('editor.editContext', value);\n\t\t}\n\t}\n});\n\n// Code Actions on Save\nregisterEditorSettingMigration('codeActionsOnSave', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tlet toBeModified = false;\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tconst newValue = {} as any;\n\t\tfor (const entry of Object.entries(value)) {\n\t\t\tif (typeof entry[1] === 'boolean') {\n\t\t\t\ttoBeModified = true;\n\t\t\t\tnewValue[entry[0]] = entry[1] ? 'explicit' : 'never';\n\t\t\t} else {\n\t\t\t\tnewValue[entry[0]] = entry[1];\n\t\t\t}\n\t\t}\n\t\tif (toBeModified) {\n\t\t\twrite(`codeActionsOnSave`, newValue);\n\t\t}\n\t}\n});\n\n// Migrate Quick Fix Settings\nregisterEditorSettingMigration('codeActionWidget.includeNearbyQuickfixes', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('codeActionWidget.includeNearbyQuickfixes', undefined);\n\t\tif (typeof read('codeActionWidget.includeNearbyQuickFixes') === 'undefined') {\n\t\t\twrite('codeActionWidget.includeNearbyQuickFixes', value);\n\t\t}\n\t}\n});\n\n// Migrate the lightbulb settings\nregisterEditorSettingMigration('lightbulb.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('lightbulb.enabled', value ? undefined : 'off');\n\t}\n});\n\n// NES Code Shifting\nregisterEditorSettingMigration('inlineSuggest.edits.codeShifting', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('inlineSuggest.edits.codeShifting', undefined);\n\t\twrite('inlineSuggest.edits.allowCodeShifting', value ? 'always' : 'never');\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 { IEditorOptions } from '../../common/config/editorOptions.js';\n\nexport interface ISettingsReader {\n\t(key: string): any;\n}\n\nexport interface ISettingsWriter {\n\t(key: string, value: any): void;\n}\n\nexport class EditorSettingMigration {\n\n\tpublic static items: EditorSettingMigration[] = [];\n\n\tconstructor(\n\t\tpublic readonly key: string,\n\t\tpublic readonly migrate: (value: any, read: ISettingsReader, write: ISettingsWriter) => void\n\t) { }\n\n\tapply(options: any): void {\n\t\tconst value = EditorSettingMigration._read(options, this.key);\n\t\tconst read = (key: string) => EditorSettingMigration._read(options, key);\n\t\tconst write = (key: string, value: any) => EditorSettingMigration._write(options, key, value);\n\t\tthis.migrate(value, read, write);\n\t}\n\n\tprivate static _read(source: any, key: string): any {\n\t\tif (typeof source === 'undefined') {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\treturn this._read(source[firstSegment], key.substring(firstDotIndex + 1));\n\t\t}\n\t\treturn source[key];\n\t}\n\n\tprivate static _write(target: any, key: string, value: any): void {\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\ttarget[firstSegment] = target[firstSegment] || {};\n\t\t\tthis._write(target[firstSegment], key.substring(firstDotIndex + 1), value);\n\t\t\treturn;\n\t\t}\n\t\ttarget[key] = value;\n\t}\n}\n\nfunction registerEditorSettingMigration(key: string, migrate: (value: any, read: ISettingsReader, write: ISettingsWriter) => void): void {\n\tEditorSettingMigration.items.push(new EditorSettingMigration(key, migrate));\n}\n\nfunction registerSimpleEditorSettingMigration(key: string, values: [any, any][]): void {\n\tregisterEditorSettingMigration(key, (value, read, write) => {\n\t\tif (typeof value !== 'undefined') {\n\t\t\tfor (const [oldValue, newValue] of values) {\n\t\t\t\tif (value === oldValue) {\n\t\t\t\t\twrite(key, newValue);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}\n\n/**\n * Compatibility with old options\n */\nexport function migrateOptions(options: IEditorOptions): void {\n\tEditorSettingMigration.items.forEach(migration => migration.apply(options));\n}\n\nregisterSimpleEditorSettingMigration('wordWrap', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('lineNumbers', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorBlinking', [['visible', 'solid']]);\nregisterSimpleEditorSettingMigration('renderWhitespace', [[true, 'boundary'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('renderLineHighlight', [[true, 'line'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('acceptSuggestionOnEnter', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('tabCompletion', [[false, 'off'], [true, 'onlySnippets']]);\nregisterSimpleEditorSettingMigration('hover', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('parameterHints', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('autoIndent', [[false, 'advanced'], [true, 'full']]);\nregisterSimpleEditorSettingMigration('matchBrackets', [[true, 'always'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('renderFinalNewline', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorSmoothCaretAnimation', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('occurrencesHighlight', [[true, 'singleFile'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('wordBasedSuggestions', [[true, 'matchingDocuments'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('defaultColorDecorators', [[true, 'auto'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('minimap.autohide', [[true, 'mouseover'], [false, 'none']]);\n\nregisterEditorSettingMigration('autoClosingBrackets', (value, read, write) => {\n\tif (value === false) {\n\t\twrite('autoClosingBrackets', 'never');\n\t\tif (typeof read('autoClosingQuotes') === 'undefined') {\n\t\t\twrite('autoClosingQuotes', 'never');\n\t\t}\n\t\tif (typeof read('autoSurround') === 'undefined') {\n\t\t\twrite('autoSurround', 'never');\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('renderIndentGuides', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('renderIndentGuides', undefined);\n\t\tif (typeof read('guides.indentation') === 'undefined') {\n\t\t\twrite('guides.indentation', !!value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('highlightActiveIndentGuide', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('highlightActiveIndentGuide', undefined);\n\t\tif (typeof read('guides.highlightActiveIndentation') === 'undefined') {\n\t\t\twrite('guides.highlightActiveIndentation', !!value);\n\t\t}\n\t}\n});\n\nconst suggestFilteredTypesMapping: Record<string, string> = {\n\tmethod: 'showMethods',\n\tfunction: 'showFunctions',\n\tconstructor: 'showConstructors',\n\tdeprecated: 'showDeprecated',\n\tfield: 'showFields',\n\tvariable: 'showVariables',\n\tclass: 'showClasses',\n\tstruct: 'showStructs',\n\tinterface: 'showInterfaces',\n\tmodule: 'showModules',\n\tproperty: 'showProperties',\n\tevent: 'showEvents',\n\toperator: 'showOperators',\n\tunit: 'showUnits',\n\tvalue: 'showValues',\n\tconstant: 'showConstants',\n\tenum: 'showEnums',\n\tenumMember: 'showEnumMembers',\n\tkeyword: 'showKeywords',\n\ttext: 'showWords',\n\tcolor: 'showColors',\n\tfile: 'showFiles',\n\treference: 'showReferences',\n\tfolder: 'showFolders',\n\ttypeParameter: 'showTypeParameters',\n\tsnippet: 'showSnippets',\n};\n\nregisterEditorSettingMigration('suggest.filteredTypes', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tfor (const entry of Object.entries(suggestFilteredTypesMapping)) {\n\t\t\tconst v = value[entry[0]];\n\t\t\tif (v === false) {\n\t\t\t\tif (typeof read(`suggest.${entry[1]}`) === 'undefined') {\n\t\t\t\t\twrite(`suggest.${entry[1]}`, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twrite('suggest.filteredTypes', undefined);\n\t}\n});\n\nregisterEditorSettingMigration('quickSuggestions', (input, read, write) => {\n\tif (typeof input === 'boolean') {\n\t\tconst value = input ? 'on' : 'off';\n\t\tconst newValue = { comments: value, strings: value, other: value };\n\t\twrite('quickSuggestions', newValue);\n\t}\n});\n\n// Sticky Scroll\n\nregisterEditorSettingMigration('experimental.stickyScroll.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('experimental.stickyScroll.enabled', undefined);\n\t\tif (typeof read('stickyScroll.enabled') === 'undefined') {\n\t\t\twrite('stickyScroll.enabled', value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('experimental.stickyScroll.maxLineCount', (value, read, write) => {\n\tif (typeof value === 'number') {\n\t\twrite('experimental.stickyScroll.maxLineCount', undefined);\n\t\tif (typeof read('stickyScroll.maxLineCount') === 'undefined') {\n\t\t\twrite('stickyScroll.maxLineCount', value);\n\t\t}\n\t}\n});\n\n// Edit Context\n\nregisterEditorSettingMigration('editor.experimentalEditContextEnabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('editor.experimentalEditContextEnabled', undefined);\n\t\tif (typeof read('editor.editContext') === 'undefined') {\n\t\t\twrite('editor.editContext', value);\n\t\t}\n\t}\n});\n\n// Code Actions on Save\nregisterEditorSettingMigration('codeActionsOnSave', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tlet toBeModified = false;\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\tconst newValue = {} as any;\n\t\tfor (const entry of Object.entries(value)) {\n\t\t\tif (typeof entry[1] === 'boolean') {\n\t\t\t\ttoBeModified = true;\n\t\t\t\tnewValue[entry[0]] = entry[1] ? 'explicit' : 'never';\n\t\t\t} else {\n\t\t\t\tnewValue[entry[0]] = entry[1];\n\t\t\t}\n\t\t}\n\t\tif (toBeModified) {\n\t\t\twrite(`codeActionsOnSave`, newValue);\n\t\t}\n\t}\n});\n\n// Migrate Quick Fix Settings\nregisterEditorSettingMigration('codeActionWidget.includeNearbyQuickfixes', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('codeActionWidget.includeNearbyQuickfixes', undefined);\n\t\tif (typeof read('codeActionWidget.includeNearbyQuickFixes') === 'undefined') {\n\t\t\twrite('codeActionWidget.includeNearbyQuickFixes', value);\n\t\t}\n\t}\n});\n\n// Migrate the lightbulb settings\nregisterEditorSettingMigration('lightbulb.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('lightbulb.enabled', value ? undefined : 'off');\n\t}\n});\n\n// NES Code Shifting\nregisterEditorSettingMigration('inlineSuggest.edits.codeShifting', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('inlineSuggest.edits.codeShifting', undefined);\n\t\twrite('inlineSuggest.edits.allowCodeShifting', value ? 'always' : 'never');\n\t}\n});\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/config/migrateOptions.ts","vs/editor/browser/config/migrateOptions.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAYhG,MAAM,OAAO,sBAAsB;aAEpB,UAAK,GAA6B,EAAE,CAAC;IAEnD,YACiB,GAAW,EACX,OAAgF;QADhF,QAAG,GAAH,GAAG,CAAQ;QACX,YAAO,GAAP,OAAO,CAAyE;IAC7F,CAAC;IAEL,KAAK,CAAC,OAAgB;QACrB,MAAM,KAAK,GAAG,sBAAsB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9D,MAAM,IAAI,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,sBAAsB,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACzE,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,KAAc,EAAE,EAAE,CAAC,sBAAsB,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QAClG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAClC,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,MAAe,EAAE,GAAW;QAChD,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;YACtD,OAAO,SAAS,CAAC;QAClB,CAAC;QAED,MAAM,aAAa,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACvC,IAAI,aAAa,IAAI,CAAC,EAAE,CAAC;YACxB,MAAM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AAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IACjG,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;QAChC,KAAK,CAAC,0CAA0C,EAAE,SAAS,CAAC,CAAC;QAC7D,IAAI,OAAO,IAAI,CAAC,0CAA0C,CAAC,KAAK,WAAW,EAAE,CAAC;YAC7E,KAAK,CAAC,0CAA0C,EAAE,KAAK,CAAC,CAAC;QAC1D,CAAC;IACF,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,iCAAiC;AACjC,8BAA8B,CAAC,mBAAmB,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IAC1E,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;QAChC,KAAK,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACvD,CAAC;AACF,CAAC,CAAC,CAAC;AAEH,oBAAoB;AACpB,8BAA8B,CAAC,kCAAkC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IACzF,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;QAChC,KAAK,CAAC,kCAAkC,EAAE,SAAS,CAAC,CAAC;QACrD,KAAK,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC5E,CAAC;AACF,CAAC,CAAC,CAAC","file":"migrateOptions.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 { IEditorOptions } from '../../common/config/editorOptions.js';\n\nexport interface ISettingsReader {\n\t(key: string): unknown;\n}\n\nexport interface ISettingsWriter {\n\t(key: string, value: unknown): void;\n}\n\nexport class EditorSettingMigration {\n\n\tpublic static items: EditorSettingMigration[] = [];\n\n\tconstructor(\n\t\tpublic readonly key: string,\n\t\tpublic readonly migrate: (value: unknown, read: ISettingsReader, write: ISettingsWriter) => void\n\t) { }\n\n\tapply(options: unknown): void {\n\t\tconst value = EditorSettingMigration._read(options, this.key);\n\t\tconst read = (key: string) => EditorSettingMigration._read(options, key);\n\t\tconst write = (key: string, value: unknown) => EditorSettingMigration._write(options, key, value);\n\t\tthis.migrate(value, read, write);\n\t}\n\n\tprivate static _read(source: unknown, key: string): unknown {\n\t\tif (typeof source === 'undefined' || source === null) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\treturn this._read((source as Record<string, unknown>)[firstSegment], key.substring(firstDotIndex + 1));\n\t\t}\n\t\treturn (source as Record<string, unknown>)[key];\n\t}\n\n\tprivate static _write(target: unknown, key: string, value: unknown): void {\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\t(target as Record<string, unknown>)[firstSegment] = (target as Record<string, unknown>)[firstSegment] || {};\n\t\t\tthis._write((target as Record<string, unknown>)[firstSegment], key.substring(firstDotIndex + 1), value);\n\t\t\treturn;\n\t\t}\n\t\t(target as Record<string, unknown>)[key] = value;\n\t}\n}\n\nfunction registerEditorSettingMigration(key: string, migrate: (value: unknown, read: ISettingsReader, write: ISettingsWriter) => void): void {\n\tEditorSettingMigration.items.push(new EditorSettingMigration(key, migrate));\n}\n\nfunction registerSimpleEditorSettingMigration(key: string, values: [unknown, unknown][]): void {\n\tregisterEditorSettingMigration(key, (value, read, write) => {\n\t\tif (typeof value !== 'undefined') {\n\t\t\tfor (const [oldValue, newValue] of values) {\n\t\t\t\tif (value === oldValue) {\n\t\t\t\t\twrite(key, newValue);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}\n\n/**\n * Compatibility with old options\n */\nexport function migrateOptions(options: IEditorOptions): void {\n\tEditorSettingMigration.items.forEach(migration => migration.apply(options));\n}\n\nregisterSimpleEditorSettingMigration('wordWrap', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('lineNumbers', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorBlinking', [['visible', 'solid']]);\nregisterSimpleEditorSettingMigration('renderWhitespace', [[true, 'boundary'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('renderLineHighlight', [[true, 'line'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('acceptSuggestionOnEnter', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('tabCompletion', [[false, 'off'], [true, 'onlySnippets']]);\nregisterSimpleEditorSettingMigration('hover', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('parameterHints', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('autoIndent', [[false, 'advanced'], [true, 'full']]);\nregisterSimpleEditorSettingMigration('matchBrackets', [[true, 'always'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('renderFinalNewline', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorSmoothCaretAnimation', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('occurrencesHighlight', [[true, 'singleFile'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('wordBasedSuggestions', [[true, 'matchingDocuments'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('defaultColorDecorators', [[true, 'auto'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('minimap.autohide', [[true, 'mouseover'], [false, 'none']]);\n\nregisterEditorSettingMigration('autoClosingBrackets', (value, read, write) => {\n\tif (value === false) {\n\t\twrite('autoClosingBrackets', 'never');\n\t\tif (typeof read('autoClosingQuotes') === 'undefined') {\n\t\t\twrite('autoClosingQuotes', 'never');\n\t\t}\n\t\tif (typeof read('autoSurround') === 'undefined') {\n\t\t\twrite('autoSurround', 'never');\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('renderIndentGuides', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('renderIndentGuides', undefined);\n\t\tif (typeof read('guides.indentation') === 'undefined') {\n\t\t\twrite('guides.indentation', !!value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('highlightActiveIndentGuide', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('highlightActiveIndentGuide', undefined);\n\t\tif (typeof read('guides.highlightActiveIndentation') === 'undefined') {\n\t\t\twrite('guides.highlightActiveIndentation', !!value);\n\t\t}\n\t}\n});\n\nconst suggestFilteredTypesMapping: Record<string, string> = {\n\tmethod: 'showMethods',\n\tfunction: 'showFunctions',\n\tconstructor: 'showConstructors',\n\tdeprecated: 'showDeprecated',\n\tfield: 'showFields',\n\tvariable: 'showVariables',\n\tclass: 'showClasses',\n\tstruct: 'showStructs',\n\tinterface: 'showInterfaces',\n\tmodule: 'showModules',\n\tproperty: 'showProperties',\n\tevent: 'showEvents',\n\toperator: 'showOperators',\n\tunit: 'showUnits',\n\tvalue: 'showValues',\n\tconstant: 'showConstants',\n\tenum: 'showEnums',\n\tenumMember: 'showEnumMembers',\n\tkeyword: 'showKeywords',\n\ttext: 'showWords',\n\tcolor: 'showColors',\n\tfile: 'showFiles',\n\treference: 'showReferences',\n\tfolder: 'showFolders',\n\ttypeParameter: 'showTypeParameters',\n\tsnippet: 'showSnippets',\n};\n\nregisterEditorSettingMigration('suggest.filteredTypes', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tfor (const entry of Object.entries(suggestFilteredTypesMapping)) {\n\t\t\tconst v = (value as Record<string, unknown>)[entry[0]];\n\t\t\tif (v === false) {\n\t\t\t\tif (typeof read(`suggest.${entry[1]}`) === 'undefined') {\n\t\t\t\t\twrite(`suggest.${entry[1]}`, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twrite('suggest.filteredTypes', undefined);\n\t}\n});\n\nregisterEditorSettingMigration('quickSuggestions', (input, read, write) => {\n\tif (typeof input === 'boolean') {\n\t\tconst value = input ? 'on' : 'off';\n\t\tconst newValue = { comments: value, strings: value, other: value };\n\t\twrite('quickSuggestions', newValue);\n\t}\n});\n\n// Sticky Scroll\n\nregisterEditorSettingMigration('experimental.stickyScroll.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('experimental.stickyScroll.enabled', undefined);\n\t\tif (typeof read('stickyScroll.enabled') === 'undefined') {\n\t\t\twrite('stickyScroll.enabled', value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('experimental.stickyScroll.maxLineCount', (value, read, write) => {\n\tif (typeof value === 'number') {\n\t\twrite('experimental.stickyScroll.maxLineCount', undefined);\n\t\tif (typeof read('stickyScroll.maxLineCount') === 'undefined') {\n\t\t\twrite('stickyScroll.maxLineCount', value);\n\t\t}\n\t}\n});\n\n// Edit Context\n\nregisterEditorSettingMigration('editor.experimentalEditContextEnabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('editor.experimentalEditContextEnabled', undefined);\n\t\tif (typeof read('editor.editContext') === 'undefined') {\n\t\t\twrite('editor.editContext', value);\n\t\t}\n\t}\n});\n\n// Code Actions on Save\nregisterEditorSettingMigration('codeActionsOnSave', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tlet toBeModified = false;\n\t\tconst newValue: Record<string, unknown> = {};\n\t\tfor (const entry of Object.entries(value)) {\n\t\t\tif (typeof entry[1] === 'boolean') {\n\t\t\t\ttoBeModified = true;\n\t\t\t\tnewValue[entry[0]] = entry[1] ? 'explicit' : 'never';\n\t\t\t} else {\n\t\t\t\tnewValue[entry[0]] = entry[1];\n\t\t\t}\n\t\t}\n\t\tif (toBeModified) {\n\t\t\twrite(`codeActionsOnSave`, newValue);\n\t\t}\n\t}\n});\n\n// Migrate Quick Fix Settings\nregisterEditorSettingMigration('codeActionWidget.includeNearbyQuickfixes', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('codeActionWidget.includeNearbyQuickfixes', undefined);\n\t\tif (typeof read('codeActionWidget.includeNearbyQuickFixes') === 'undefined') {\n\t\t\twrite('codeActionWidget.includeNearbyQuickFixes', value);\n\t\t}\n\t}\n});\n\n// Migrate the lightbulb settings\nregisterEditorSettingMigration('lightbulb.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('lightbulb.enabled', value ? undefined : 'off');\n\t}\n});\n\n// NES Code Shifting\nregisterEditorSettingMigration('inlineSuggest.edits.codeShifting', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('inlineSuggest.edits.codeShifting', undefined);\n\t\twrite('inlineSuggest.edits.allowCodeShifting', value ? 'always' : 'never');\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 { IEditorOptions } from '../../common/config/editorOptions.js';\n\nexport interface ISettingsReader {\n\t(key: string): unknown;\n}\n\nexport interface ISettingsWriter {\n\t(key: string, value: unknown): void;\n}\n\nexport class EditorSettingMigration {\n\n\tpublic static items: EditorSettingMigration[] = [];\n\n\tconstructor(\n\t\tpublic readonly key: string,\n\t\tpublic readonly migrate: (value: unknown, read: ISettingsReader, write: ISettingsWriter) => void\n\t) { }\n\n\tapply(options: unknown): void {\n\t\tconst value = EditorSettingMigration._read(options, this.key);\n\t\tconst read = (key: string) => EditorSettingMigration._read(options, key);\n\t\tconst write = (key: string, value: unknown) => EditorSettingMigration._write(options, key, value);\n\t\tthis.migrate(value, read, write);\n\t}\n\n\tprivate static _read(source: unknown, key: string): unknown {\n\t\tif (typeof source === 'undefined' || source === null) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\treturn this._read((source as Record<string, unknown>)[firstSegment], key.substring(firstDotIndex + 1));\n\t\t}\n\t\treturn (source as Record<string, unknown>)[key];\n\t}\n\n\tprivate static _write(target: unknown, key: string, value: unknown): void {\n\t\tconst firstDotIndex = key.indexOf('.');\n\t\tif (firstDotIndex >= 0) {\n\t\t\tconst firstSegment = key.substring(0, firstDotIndex);\n\t\t\t(target as Record<string, unknown>)[firstSegment] = (target as Record<string, unknown>)[firstSegment] || {};\n\t\t\tthis._write((target as Record<string, unknown>)[firstSegment], key.substring(firstDotIndex + 1), value);\n\t\t\treturn;\n\t\t}\n\t\t(target as Record<string, unknown>)[key] = value;\n\t}\n}\n\nfunction registerEditorSettingMigration(key: string, migrate: (value: unknown, read: ISettingsReader, write: ISettingsWriter) => void): void {\n\tEditorSettingMigration.items.push(new EditorSettingMigration(key, migrate));\n}\n\nfunction registerSimpleEditorSettingMigration(key: string, values: [unknown, unknown][]): void {\n\tregisterEditorSettingMigration(key, (value, read, write) => {\n\t\tif (typeof value !== 'undefined') {\n\t\t\tfor (const [oldValue, newValue] of values) {\n\t\t\t\tif (value === oldValue) {\n\t\t\t\t\twrite(key, newValue);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}\n\n/**\n * Compatibility with old options\n */\nexport function migrateOptions(options: IEditorOptions): void {\n\tEditorSettingMigration.items.forEach(migration => migration.apply(options));\n}\n\nregisterSimpleEditorSettingMigration('wordWrap', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('lineNumbers', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorBlinking', [['visible', 'solid']]);\nregisterSimpleEditorSettingMigration('renderWhitespace', [[true, 'boundary'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('renderLineHighlight', [[true, 'line'], [false, 'none']]);\nregisterSimpleEditorSettingMigration('acceptSuggestionOnEnter', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('tabCompletion', [[false, 'off'], [true, 'onlySnippets']]);\nregisterSimpleEditorSettingMigration('hover', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('parameterHints', [[true, { enabled: true }], [false, { enabled: false }]]);\nregisterSimpleEditorSettingMigration('autoIndent', [[false, 'advanced'], [true, 'full']]);\nregisterSimpleEditorSettingMigration('matchBrackets', [[true, 'always'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('renderFinalNewline', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('cursorSmoothCaretAnimation', [[true, 'on'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('occurrencesHighlight', [[true, 'singleFile'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('wordBasedSuggestions', [[true, 'matchingDocuments'], [false, 'off']]);\nregisterSimpleEditorSettingMigration('defaultColorDecorators', [[true, 'auto'], [false, 'never']]);\nregisterSimpleEditorSettingMigration('minimap.autohide', [[true, 'mouseover'], [false, 'none']]);\n\nregisterEditorSettingMigration('autoClosingBrackets', (value, read, write) => {\n\tif (value === false) {\n\t\twrite('autoClosingBrackets', 'never');\n\t\tif (typeof read('autoClosingQuotes') === 'undefined') {\n\t\t\twrite('autoClosingQuotes', 'never');\n\t\t}\n\t\tif (typeof read('autoSurround') === 'undefined') {\n\t\t\twrite('autoSurround', 'never');\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('renderIndentGuides', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('renderIndentGuides', undefined);\n\t\tif (typeof read('guides.indentation') === 'undefined') {\n\t\t\twrite('guides.indentation', !!value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('highlightActiveIndentGuide', (value, read, write) => {\n\tif (typeof value !== 'undefined') {\n\t\twrite('highlightActiveIndentGuide', undefined);\n\t\tif (typeof read('guides.highlightActiveIndentation') === 'undefined') {\n\t\t\twrite('guides.highlightActiveIndentation', !!value);\n\t\t}\n\t}\n});\n\nconst suggestFilteredTypesMapping: Record<string, string> = {\n\tmethod: 'showMethods',\n\tfunction: 'showFunctions',\n\tconstructor: 'showConstructors',\n\tdeprecated: 'showDeprecated',\n\tfield: 'showFields',\n\tvariable: 'showVariables',\n\tclass: 'showClasses',\n\tstruct: 'showStructs',\n\tinterface: 'showInterfaces',\n\tmodule: 'showModules',\n\tproperty: 'showProperties',\n\tevent: 'showEvents',\n\toperator: 'showOperators',\n\tunit: 'showUnits',\n\tvalue: 'showValues',\n\tconstant: 'showConstants',\n\tenum: 'showEnums',\n\tenumMember: 'showEnumMembers',\n\tkeyword: 'showKeywords',\n\ttext: 'showWords',\n\tcolor: 'showColors',\n\tfile: 'showFiles',\n\treference: 'showReferences',\n\tfolder: 'showFolders',\n\ttypeParameter: 'showTypeParameters',\n\tsnippet: 'showSnippets',\n};\n\nregisterEditorSettingMigration('suggest.filteredTypes', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tfor (const entry of Object.entries(suggestFilteredTypesMapping)) {\n\t\t\tconst v = (value as Record<string, unknown>)[entry[0]];\n\t\t\tif (v === false) {\n\t\t\t\tif (typeof read(`suggest.${entry[1]}`) === 'undefined') {\n\t\t\t\t\twrite(`suggest.${entry[1]}`, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\twrite('suggest.filteredTypes', undefined);\n\t}\n});\n\nregisterEditorSettingMigration('quickSuggestions', (input, read, write) => {\n\tif (typeof input === 'boolean') {\n\t\tconst value = input ? 'on' : 'off';\n\t\tconst newValue = { comments: value, strings: value, other: value };\n\t\twrite('quickSuggestions', newValue);\n\t}\n});\n\n// Sticky Scroll\n\nregisterEditorSettingMigration('experimental.stickyScroll.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('experimental.stickyScroll.enabled', undefined);\n\t\tif (typeof read('stickyScroll.enabled') === 'undefined') {\n\t\t\twrite('stickyScroll.enabled', value);\n\t\t}\n\t}\n});\n\nregisterEditorSettingMigration('experimental.stickyScroll.maxLineCount', (value, read, write) => {\n\tif (typeof value === 'number') {\n\t\twrite('experimental.stickyScroll.maxLineCount', undefined);\n\t\tif (typeof read('stickyScroll.maxLineCount') === 'undefined') {\n\t\t\twrite('stickyScroll.maxLineCount', value);\n\t\t}\n\t}\n});\n\n// Edit Context\n\nregisterEditorSettingMigration('editor.experimentalEditContextEnabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('editor.experimentalEditContextEnabled', undefined);\n\t\tif (typeof read('editor.editContext') === 'undefined') {\n\t\t\twrite('editor.editContext', value);\n\t\t}\n\t}\n});\n\n// Code Actions on Save\nregisterEditorSettingMigration('codeActionsOnSave', (value, read, write) => {\n\tif (value && typeof value === 'object') {\n\t\tlet toBeModified = false;\n\t\tconst newValue: Record<string, unknown> = {};\n\t\tfor (const entry of Object.entries(value)) {\n\t\t\tif (typeof entry[1] === 'boolean') {\n\t\t\t\ttoBeModified = true;\n\t\t\t\tnewValue[entry[0]] = entry[1] ? 'explicit' : 'never';\n\t\t\t} else {\n\t\t\t\tnewValue[entry[0]] = entry[1];\n\t\t\t}\n\t\t}\n\t\tif (toBeModified) {\n\t\t\twrite(`codeActionsOnSave`, newValue);\n\t\t}\n\t}\n});\n\n// Migrate Quick Fix Settings\nregisterEditorSettingMigration('codeActionWidget.includeNearbyQuickfixes', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('codeActionWidget.includeNearbyQuickfixes', undefined);\n\t\tif (typeof read('codeActionWidget.includeNearbyQuickFixes') === 'undefined') {\n\t\t\twrite('codeActionWidget.includeNearbyQuickFixes', value);\n\t\t}\n\t}\n});\n\n// Migrate the lightbulb settings\nregisterEditorSettingMigration('lightbulb.enabled', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('lightbulb.enabled', value ? undefined : 'off');\n\t}\n});\n\n// NES Code Shifting\nregisterEditorSettingMigration('inlineSuggest.edits.codeShifting', (value, read, write) => {\n\tif (typeof value === 'boolean') {\n\t\twrite('inlineSuggest.edits.codeShifting', undefined);\n\t\twrite('inlineSuggest.edits.allowCodeShifting', value ? 'always' : 'never');\n\t}\n});\n"]}
@@ -8,7 +8,6 @@ export var EditContext;
8
8
  * Create an edit context.
9
9
  */
10
10
  function create(window, options) {
11
- // eslint-disable-next-line local/code-no-any-casts
12
11
  return new window.EditContext(options);
13
12
  }
14
13
  EditContext.create = create;
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/controller/editContext/native/editContextFactory.ts","vs/editor/browser/controller/editContext/native/editContextFactory.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,MAAM,KAAW,WAAW,CAS3B;AATD,WAAiB,WAAW;IAE3B;;OAEG;IACH,SAAgB,MAAM,CAAC,MAAc,EAAE,OAAyB;QAC/D,mDAAmD;QACnD,OAAO,IAAK,MAAc,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;IAHe,kBAAM,SAGrB,CAAA;AACF,CAAC,EATgB,WAAW,KAAX,WAAW,QAS3B","file":"editContextFactory.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\n\nexport namespace EditContext {\n\n\t/**\n\t * Create an edit context.\n\t */\n\texport function create(window: Window, options?: EditContextInit): EditContext {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\treturn new (window as any).EditContext(options);\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\n\nexport namespace EditContext {\n\n\t/**\n\t * Create an edit context.\n\t */\n\texport function create(window: Window, options?: EditContextInit): EditContext {\n\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\treturn new (window as any).EditContext(options);\n\t}\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/controller/editContext/native/editContextFactory.ts","vs/editor/browser/controller/editContext/native/editContextFactory.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,MAAM,KAAW,WAAW,CAQ3B;AARD,WAAiB,WAAW;IAE3B;;OAEG;IACH,SAAgB,MAAM,CAAC,MAAc,EAAE,OAAyB;QAC/D,OAAO,IAAK,MAAqF,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACxH,CAAC;IAFe,kBAAM,SAErB,CAAA;AACF,CAAC,EARgB,WAAW,KAAX,WAAW,QAQ3B","file":"editContextFactory.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\n\nexport namespace EditContext {\n\n\t/**\n\t * Create an edit context.\n\t */\n\texport function create(window: Window, options?: EditContextInit): EditContext {\n\t\treturn new (window as unknown as { EditContext: new (options?: EditContextInit) => EditContext }).EditContext(options);\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\n\nexport namespace EditContext {\n\n\t/**\n\t * Create an edit context.\n\t */\n\texport function create(window: Window, options?: EditContextInit): EditContext {\n\t\treturn new (window as unknown as { EditContext: new (options?: EditContextInit) => EditContext }).EditContext(options);\n\t}\n}\n"]}
@@ -72,11 +72,11 @@ FocusTracker = __decorate([
72
72
  ], FocusTracker);
73
73
  export { FocusTracker };
74
74
  export function editContextAddDisposableListener(target, type, listener, options) {
75
- // eslint-disable-next-line local/code-no-any-casts
75
+ // eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any
76
76
  target.addEventListener(type, listener, options);
77
77
  return {
78
78
  dispose() {
79
- // eslint-disable-next-line local/code-no-any-casts
79
+ // eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any
80
80
  target.removeEventListener(type, listener);
81
81
  }
82
82
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.ts","vs/editor/browser/controller/editContext/native/nativeEditContextUtils.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAC5G,OAAO,EAAe,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AASjE,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAI3C,YACc,WAAwB,EACpB,QAAqB,EACrB,cAAgD;QAEjE,KAAK,EAAE,CAAC;QAHS,aAAQ,GAAR,QAAQ,CAAa;QACrB,mBAAc,GAAd,cAAc,CAAkC;QAN1D,eAAU,GAAY,KAAK,CAAC;QAC5B,cAAS,GAAY,KAAK,CAAC;QAQlC,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;YACjE,WAAW,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;YAC7C,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gBACpB,OAAO;YACR,CAAC;YACD,uDAAuD;YACvD,qDAAqD;YACrD,qDAAqD;YACrD,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC1B,CAAC,CAAC,CAAC,CAAC;QACJ,IAAI,CAAC,SAAS,CAAC,qB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U,gCAAgC,CAAmD,MAAmB,EAAE,IAAO,EAAE,QAAqF,EAAE,OAA2C;IAClQ,mDAAmD;IACnD,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAe,EAAE,OAAO,CAAC,CAAC;IACxD,OAAO;QACN,OAAO;YACN,mDAAmD;YACnD,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAe,CAAC,CAAC;QACnD,CAAC;KACD,CAAC;AACH,CAAC","file":"nativeEditContextUtils.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 { addDisposableListener, getActiveElement, getShadowRoot } from '../../../../../base/browser/dom.js';\nimport { IDisposable, Disposable } from '../../../../../base/common/lifecycle.js';\nimport { ILogService } from '../../../../../platform/log/common/log.js';\n\nexport interface ITypeData {\n\ttext: string;\n\treplacePrevCharCnt: number;\n\treplaceNextCharCnt: number;\n\tpositionDelta: number;\n}\n\nexport class FocusTracker extends Disposable {\n\tprivate _isFocused: boolean = false;\n\tprivate _isPaused: boolean = false;\n\n\tconstructor(\n\t\t@ILogService _logService: ILogService,\n\t\tprivate readonly _domNode: HTMLElement,\n\t\tprivate readonly _onFocusChange: (newFocusValue: boolean) => void,\n\t) {\n\t\tsuper();\n\t\tthis._register(addDisposableListener(this._domNode, 'focus', () => {\n\t\t\t_logService.trace('NativeEditContext.focus');\n\t\t\tif (this._isPaused) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Here we don't trust the browser and instead we check\n\t\t\t// that the active element is the one we are tracking\n\t\t\t// (this happens when cmd+tab is used to switch apps)\n\t\t\tthis.refreshFocusState();\n\t\t}));\n\t\tthis._register(addDisposableListener(this._domNode, 'blur', () => {\n\t\t\t_logService.trace('NativeEditContext.blur');\n\t\t\tif (this._isPaused) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._handleFocusedChanged(false);\n\t\t}));\n\t}\n\n\tpublic pause(): void {\n\t\tthis._isPaused = true;\n\t}\n\n\tpublic resume(): void {\n\t\tthis._isPaused = false;\n\t\tthis.refreshFocusState();\n\t}\n\n\tprivate _handleFocusedChanged(focused: boolean): void {\n\t\tif (this._isFocused === focused) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isFocused = focused;\n\t\tthis._onFocusChange(this._isFocused);\n\t}\n\n\tpublic focus(): void {\n\t\tthis._domNode.focus();\n\t\tthis.refreshFocusState();\n\t}\n\n\tpublic refreshFocusState(): void {\n\t\tconst shadowRoot = getShadowRoot(this._domNode);\n\t\tconst activeElement = shadowRoot ? shadowRoot.activeElement : getActiveElement();\n\t\tconst focused = this._domNode === activeElement;\n\t\tthis._handleFocusedChanged(focused);\n\t}\n\n\tget isFocused(): boolean {\n\t\treturn this._isFocused;\n\t}\n}\n\nexport function editContextAddDisposableListener<K extends keyof EditContextEventHandlersEventMap>(target: EventTarget, type: K, listener: (this: GlobalEventHandlers, ev: EditContextEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): IDisposable {\n\t// eslint-disable-next-line local/code-no-any-casts\n\ttarget.addEventListener(type, listener as any, options);\n\treturn {\n\t\tdispose() {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\ttarget.removeEventListener(type, listener as any);\n\t\t}\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 { addDisposableListener, getActiveElement, getShadowRoot } from '../../../../../base/browser/dom.js';\nimport { IDisposable, Disposable } from '../../../../../base/common/lifecycle.js';\nimport { ILogService } from '../../../../../platform/log/common/log.js';\n\nexport interface ITypeData {\n\ttext: string;\n\treplacePrevCharCnt: number;\n\treplaceNextCharCnt: number;\n\tpositionDelta: number;\n}\n\nexport class FocusTracker extends Disposable {\n\tprivate _isFocused: boolean = false;\n\tprivate _isPaused: boolean = false;\n\n\tconstructor(\n\t\t@ILogService _logService: ILogService,\n\t\tprivate readonly _domNode: HTMLElement,\n\t\tprivate readonly _onFocusChange: (newFocusValue: boolean) => void,\n\t) {\n\t\tsuper();\n\t\tthis._register(addDisposableListener(this._domNode, 'focus', () => {\n\t\t\t_logService.trace('NativeEditContext.focus');\n\t\t\tif (this._isPaused) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Here we don't trust the browser and instead we check\n\t\t\t// that the active element is the one we are tracking\n\t\t\t// (this happens when cmd+tab is used to switch apps)\n\t\t\tthis.refreshFocusState();\n\t\t}));\n\t\tthis._register(addDisposableListener(this._domNode, 'blur', () => {\n\t\t\t_logService.trace('NativeEditContext.blur');\n\t\t\tif (this._isPaused) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._handleFocusedChanged(false);\n\t\t}));\n\t}\n\n\tpublic pause(): void {\n\t\tthis._isPaused = true;\n\t}\n\n\tpublic resume(): void {\n\t\tthis._isPaused = false;\n\t\tthis.refreshFocusState();\n\t}\n\n\tprivate _handleFocusedChanged(focused: boolean): void {\n\t\tif (this._isFocused === focused) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isFocused = focused;\n\t\tthis._onFocusChange(this._isFocused);\n\t}\n\n\tpublic focus(): void {\n\t\tthis._domNode.focus();\n\t\tthis.refreshFocusState();\n\t}\n\n\tpublic refreshFocusState(): void {\n\t\tconst shadowRoot = getShadowRoot(this._domNode);\n\t\tconst activeElement = shadowRoot ? shadowRoot.activeElement : getActiveElement();\n\t\tconst focused = this._domNode === activeElement;\n\t\tthis._handleFocusedChanged(focused);\n\t}\n\n\tget isFocused(): boolean {\n\t\treturn this._isFocused;\n\t}\n}\n\nexport function editContextAddDisposableListener<K extends keyof EditContextEventHandlersEventMap>(target: EventTarget, type: K, listener: (this: GlobalEventHandlers, ev: EditContextEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): IDisposable {\n\t// eslint-disable-next-line local/code-no-any-casts\n\ttarget.addEventListener(type, listener as any, options);\n\treturn {\n\t\tdispose() {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts\n\t\t\ttarget.removeEventListener(type, listener as any);\n\t\t}\n\t};\n}\n"]}
1
+ {"version":3,"sources":["file:///mnt/vss/_work/1/s/dependencies/vscode/out-editor-src/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.ts","vs/editor/browser/controller/editContext/native/nativeEditContextUtils.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;;;;;;;;;;AAEhG,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAC5G,OAAO,EAAe,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AASjE,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAI3C,YACc,WAAwB,EACpB,QAAqB,EACrB,cAAgD;QAEjE,KAAK,EAAE,CAAC;QAHS,aAAQ,GAAR,QAAQ,CAAa;QACrB,mBAAc,GAAd,cAAc,CAAkC;QAN1D,eAAU,GAAY,KAAK,CAAC;QAC5B,cAAS,GAAY,KAAK,CAAC;QAQlC,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;YACjE,WAAW,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;YAC7C,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gBACpB,OAAO;YACR,CAAC;YACD,uDAAuD;YACvD,qDAAqD;YACrD,qDAAqD;YACrD,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC1B,CAAC,CAAC,CAAC,CAAC;QACJ,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE;YAChE,WAAW,CA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uF;IACvF,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAe,EAAE,OAAO,CAAC,CAAC;IACxD,OAAO;QACN,OAAO;YACN,uFAAuF;YACvF,MAAM,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAe,CAAC,CAAC;QACnD,CAAC;KACD,CAAC;AACH,CAAC","file":"nativeEditContextUtils.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 { addDisposableListener, getActiveElement, getShadowRoot } from '../../../../../base/browser/dom.js';\nimport { IDisposable, Disposable } from '../../../../../base/common/lifecycle.js';\nimport { ILogService } from '../../../../../platform/log/common/log.js';\n\nexport interface ITypeData {\n\ttext: string;\n\treplacePrevCharCnt: number;\n\treplaceNextCharCnt: number;\n\tpositionDelta: number;\n}\n\nexport class FocusTracker extends Disposable {\n\tprivate _isFocused: boolean = false;\n\tprivate _isPaused: boolean = false;\n\n\tconstructor(\n\t\t@ILogService _logService: ILogService,\n\t\tprivate readonly _domNode: HTMLElement,\n\t\tprivate readonly _onFocusChange: (newFocusValue: boolean) => void,\n\t) {\n\t\tsuper();\n\t\tthis._register(addDisposableListener(this._domNode, 'focus', () => {\n\t\t\t_logService.trace('NativeEditContext.focus');\n\t\t\tif (this._isPaused) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Here we don't trust the browser and instead we check\n\t\t\t// that the active element is the one we are tracking\n\t\t\t// (this happens when cmd+tab is used to switch apps)\n\t\t\tthis.refreshFocusState();\n\t\t}));\n\t\tthis._register(addDisposableListener(this._domNode, 'blur', () => {\n\t\t\t_logService.trace('NativeEditContext.blur');\n\t\t\tif (this._isPaused) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._handleFocusedChanged(false);\n\t\t}));\n\t}\n\n\tpublic pause(): void {\n\t\tthis._isPaused = true;\n\t}\n\n\tpublic resume(): void {\n\t\tthis._isPaused = false;\n\t\tthis.refreshFocusState();\n\t}\n\n\tprivate _handleFocusedChanged(focused: boolean): void {\n\t\tif (this._isFocused === focused) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isFocused = focused;\n\t\tthis._onFocusChange(this._isFocused);\n\t}\n\n\tpublic focus(): void {\n\t\tthis._domNode.focus();\n\t\tthis.refreshFocusState();\n\t}\n\n\tpublic refreshFocusState(): void {\n\t\tconst shadowRoot = getShadowRoot(this._domNode);\n\t\tconst activeElement = shadowRoot ? shadowRoot.activeElement : getActiveElement();\n\t\tconst focused = this._domNode === activeElement;\n\t\tthis._handleFocusedChanged(focused);\n\t}\n\n\tget isFocused(): boolean {\n\t\treturn this._isFocused;\n\t}\n}\n\nexport function editContextAddDisposableListener<K extends keyof EditContextEventHandlersEventMap>(target: EventTarget, type: K, listener: (this: GlobalEventHandlers, ev: EditContextEventHandlersEventMap[K]) => void, options?: boolean | AddEventListenerOptions): IDisposable {\n\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\ttarget.addEventListener(type, listener as any, options);\n\treturn {\n\t\tdispose() {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\t\t\ttarget.removeEventListener(type, listener as any);\n\t\t}\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 { addDisposableListener, getActiveElement, getShadowRoot } from '../../../../../base/browser/dom.js';\nimport { IDisposable, Disposable } from '../../../../../base/common/lifecycle.js';\nimport { ILogService } from '../../../../../platform/log/common/log.js';\n\nexport interface ITypeData {\n\ttext: string;\n\treplacePrevCharCnt: number;\n\treplaceNextCharCnt: number;\n\tpositionDelta: number;\n}\n\nexport class FocusTracker extends Disposable {\n\tprivate _isFocused: boolean = false;\n\tprivate _isPaused: boolean = false;\n\n\tconstructor(\n\t\t@ILogService _logService: ILogService,\n\t\tprivate readonly _domNode: HTMLElement,\n\t\tprivate readonly _onFocusChange: (newFocusValue: boolean) => void,\n\t) {\n\t\tsuper();\n\t\tthis._register(addDisposableListener(this._domNode, 'focus', () => {\n\t\t\t_logService.trace('NativeEditContext.focus');\n\t\t\tif (this._isPaused) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Here we don't trust the browser and instead we check\n\t\t\t// that the active element is the one we are tracking\n\t\t\t// (this happens when cmd+tab is used to switch apps)\n\t\t\tthis.refreshFocusState();\n\t\t}));\n\t\tthis._register(addDisposableListener(this._domNode, 'blur', () => {\n\t\t\t_logService.trace('NativeEditContext.blur');\n\t\t\tif (this._isPaused) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._handleFocusedChanged(false);\n\t\t}));\n\t}\n\n\tpublic pause(): void {\n\t\tthis._isPaused = true;\n\t}\n\n\tpublic resume(): void {\n\t\tthis._isPaused = false;\n\t\tthis.refreshFocusState();\n\t}\n\n\tprivate _handleFocusedChanged(focused: boolean): void {\n\t\tif (this._isFocused === focused) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isFocused = focused;\n\t\tthis._onFocusChange(this._isFocused);\n\t}\n\n\tpublic focus(): void {\n\t\tthis._domNode.focus();\n\t\tthis.refreshFocusState();\n\t}\n\n\tpublic refreshFocusState(): void {\n\t\tconst shadowRoot = getShadowRoot(this._domNode);\n\t\tconst activeElement = shadowRoot ? shadowRoot.activeElement : getActiveElement();\n\t\tconst focused = this._domNode === activeElement;\n\t\tthis._handleFocusedChanged(focused);\n\t}\n\n\tget isFocused(): boolean {\n\t\treturn this._isFocused;\n\t}\n}\n\nexport function editContextAddDisposableListener<K extends keyof EditContextEventHandlersEventMap>(target: EventTarget, type: K, listener: (this: GlobalEventHandlers, ev: EditContextEventHandlersEventMap[K]) => void, options?: boolean | AddEventListenerOptions): IDisposable {\n\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\ttarget.addEventListener(type, listener as any, options);\n\treturn {\n\t\tdispose() {\n\t\t\t// eslint-disable-next-line local/code-no-any-casts, @typescript-eslint/no-explicit-any\n\t\t\ttarget.removeEventListener(type, listener as any);\n\t\t}\n\t};\n}\n"]}
@@ -159,8 +159,8 @@ export class MouseHandler extends ViewEventHandler {
159
159
  if (!this.viewHelper.viewDomNode.contains(target)) {
160
160
  const shadowRoot = dom.getShadowRoot(this.viewHelper.viewDomNode);
161
161
  if (shadowRoot) {
162
- // eslint-disable-next-line local/code-no-any-casts
163
- target = shadowRoot.elementsFromPoint(e.posx, e.posy).find((el) => this.viewHelper.viewDomNode.contains(el));
162
+ const potentialTarget = shadowRoot.elementsFromPoint(e.posx, e.posy).find((el) => this.viewHelper.viewDomNode.contains(el)) ?? null;
163
+ target = potentialTarget;
164
164
  }
165
165
  }
166
166
  return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(), e.editorPos, e.pos, e.relativePos, testEventTarget ? target : null);