monaco-editor-core 0.54.0 → 0.55.0-dev-20251007

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 (251) 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/canIUse.js +1 -0
  11. package/esm/vs/base/browser/canIUse.js.map +1 -1
  12. package/esm/vs/base/browser/dom.js +9 -0
  13. package/esm/vs/base/browser/dom.js.map +1 -1
  14. package/esm/vs/base/browser/fastDomNode.js.map +1 -1
  15. package/esm/vs/base/browser/mouseEvent.js +3 -0
  16. package/esm/vs/base/browser/mouseEvent.js.map +1 -1
  17. package/esm/vs/base/browser/trustedTypes.js +2 -0
  18. package/esm/vs/base/browser/trustedTypes.js.map +1 -1
  19. package/esm/vs/base/browser/ui/list/listWidget.js +5 -5
  20. package/esm/vs/base/browser/ui/list/listWidget.js.map +1 -1
  21. package/esm/vs/base/browser/ui/sash/sash.css +1 -1
  22. package/esm/vs/base/browser/ui/sash/sash.js +4 -0
  23. package/esm/vs/base/browser/ui/sash/sash.js.map +1 -1
  24. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js +1 -1
  25. package/esm/vs/base/browser/ui/scrollbar/scrollableElement.js.map +1 -1
  26. package/esm/vs/base/browser/ui/table/table.css +2 -2
  27. package/esm/vs/base/browser/ui/tree/abstractTree.js +7 -3
  28. package/esm/vs/base/browser/ui/tree/abstractTree.js.map +1 -1
  29. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +4 -0
  30. package/esm/vs/base/browser/ui/tree/asyncDataTree.js.map +1 -1
  31. package/esm/vs/base/browser/ui/tree/indexTreeModel.js +1 -0
  32. package/esm/vs/base/browser/ui/tree/indexTreeModel.js.map +1 -1
  33. package/esm/vs/base/browser/ui/tree/media/tree.css +2 -2
  34. package/esm/vs/base/browser/webWorkerFactory.js +3 -0
  35. package/esm/vs/base/browser/webWorkerFactory.js.map +1 -1
  36. package/esm/vs/base/common/buffer.js.map +1 -1
  37. package/esm/vs/base/common/decorators.js +1 -0
  38. package/esm/vs/base/common/decorators.js.map +1 -1
  39. package/esm/vs/base/common/errors.js +1 -0
  40. package/esm/vs/base/common/errors.js.map +1 -1
  41. package/esm/vs/base/common/glob.js +1 -1
  42. package/esm/vs/base/common/glob.js.map +1 -1
  43. package/esm/vs/base/common/hash.js.map +1 -1
  44. package/esm/vs/base/common/hotReload.js +2 -0
  45. package/esm/vs/base/common/hotReload.js.map +1 -1
  46. package/esm/vs/base/common/hotReloadHelpers.js +1 -0
  47. package/esm/vs/base/common/hotReloadHelpers.js.map +1 -1
  48. package/esm/vs/base/common/lifecycle.js +19 -0
  49. package/esm/vs/base/common/lifecycle.js.map +1 -1
  50. package/esm/vs/base/common/map.js.map +1 -1
  51. package/esm/vs/base/common/marshalling.js +4 -0
  52. package/esm/vs/base/common/marshalling.js.map +1 -1
  53. package/esm/vs/base/common/network.js +1 -0
  54. package/esm/vs/base/common/network.js.map +1 -1
  55. package/esm/vs/base/common/objects.js +1 -0
  56. package/esm/vs/base/common/objects.js.map +1 -1
  57. package/esm/vs/base/common/observableInternal/changeTracker.js +4 -0
  58. package/esm/vs/base/common/observableInternal/changeTracker.js.map +1 -1
  59. package/esm/vs/base/common/observableInternal/debugLocation.js +1 -0
  60. package/esm/vs/base/common/observableInternal/debugLocation.js.map +1 -1
  61. package/esm/vs/base/common/observableInternal/debugName.js +1 -0
  62. package/esm/vs/base/common/observableInternal/debugName.js.map +1 -1
  63. package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js +1 -0
  64. package/esm/vs/base/common/observableInternal/logging/consoleObservableLogger.js.map +1 -1
  65. package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js +1 -0
  66. package/esm/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js.map +1 -1
  67. package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js +1 -0
  68. package/esm/vs/base/common/observableInternal/logging/debugger/rpc.js.map +1 -1
  69. package/esm/vs/base/common/observableInternal/observables/derived.js +7 -1
  70. package/esm/vs/base/common/observableInternal/observables/derived.js.map +1 -1
  71. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js +2 -0
  72. package/esm/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
  73. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js +1 -0
  74. package/esm/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
  75. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js +1 -0
  76. package/esm/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
  77. package/esm/vs/base/common/process.js +1 -0
  78. package/esm/vs/base/common/process.js.map +1 -1
  79. package/esm/vs/base/common/product.js.map +1 -1
  80. package/esm/vs/base/common/types.js +2 -0
  81. package/esm/vs/base/common/types.js.map +1 -1
  82. package/esm/vs/base/common/worker/webWorker.js +26 -14
  83. package/esm/vs/base/common/worker/webWorker.js.map +1 -1
  84. package/esm/vs/base/parts/sandbox/common/sandboxTypes.js +2 -0
  85. package/esm/vs/base/parts/sandbox/common/sandboxTypes.js.map +1 -0
  86. package/esm/vs/editor/browser/config/editorConfiguration.js +3 -2
  87. package/esm/vs/editor/browser/config/editorConfiguration.js.map +1 -1
  88. package/esm/vs/editor/browser/config/migrateOptions.js +1 -1
  89. package/esm/vs/editor/browser/config/migrateOptions.js.map +1 -1
  90. package/esm/vs/editor/browser/controller/editContext/native/editContextFactory.js.map +1 -1
  91. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js +2 -0
  92. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.js.map +1 -1
  93. package/esm/vs/editor/browser/controller/mouseHandler.js +2 -1
  94. package/esm/vs/editor/browser/controller/mouseHandler.js.map +1 -1
  95. package/esm/vs/editor/browser/controller/mouseTarget.js +7 -0
  96. package/esm/vs/editor/browser/controller/mouseTarget.js.map +1 -1
  97. package/esm/vs/editor/browser/controller/pointerHandler.js.map +1 -1
  98. package/esm/vs/editor/browser/coreCommands.js.map +1 -1
  99. package/esm/vs/editor/browser/editorBrowser.js.map +1 -1
  100. package/esm/vs/editor/browser/editorDom.js.map +1 -1
  101. package/esm/vs/editor/browser/editorExtensions.js.map +1 -1
  102. package/esm/vs/editor/browser/gpu/gpuUtils.js +1 -0
  103. package/esm/vs/editor/browser/gpu/gpuUtils.js.map +1 -1
  104. package/esm/vs/editor/browser/gpu/viewGpuContext.js +1 -0
  105. package/esm/vs/editor/browser/gpu/viewGpuContext.js.map +1 -1
  106. package/esm/vs/editor/browser/services/abstractCodeEditorService.js.map +1 -1
  107. package/esm/vs/editor/browser/services/bulkEditService.js.map +1 -1
  108. package/esm/vs/editor/browser/services/codeEditorService.js.map +1 -1
  109. package/esm/vs/editor/browser/services/editorWorkerService.js.map +1 -1
  110. package/esm/vs/editor/browser/services/hoverService/hover.css +2 -0
  111. package/esm/vs/editor/browser/services/hoverService/hoverService.js.map +1 -1
  112. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js +1 -1
  113. package/esm/vs/editor/browser/services/hoverService/hoverWidget.js.map +1 -1
  114. package/esm/vs/editor/browser/services/inlineCompletionsService.js +8 -8
  115. package/esm/vs/editor/browser/services/inlineCompletionsService.js.map +1 -1
  116. package/esm/vs/editor/browser/services/openerService.js.map +1 -1
  117. package/esm/vs/editor/browser/view/viewLayer.js +1 -1
  118. package/esm/vs/editor/browser/view/viewLayer.js.map +1 -1
  119. package/esm/vs/editor/browser/view.js.map +1 -1
  120. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js +1 -0
  121. package/esm/vs/editor/browser/viewParts/contentWidgets/contentWidgets.js.map +1 -1
  122. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js +1 -0
  123. package/esm/vs/editor/browser/viewParts/viewZones/viewZones.js.map +1 -1
  124. package/esm/vs/editor/browser/widget/codeEditor/codeEditorContributions.js.map +1 -1
  125. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +4 -1
  126. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js.map +1 -1
  127. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +1 -0
  128. package/esm/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js.map +1 -1
  129. package/esm/vs/editor/browser/widget/diffEditor/delegatingEditorImpl.js.map +1 -1
  130. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -0
  131. package/esm/vs/editor/browser/widget/diffEditor/diffEditorOptions.js.map +1 -1
  132. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +1 -0
  133. package/esm/vs/editor/browser/widget/diffEditor/diffEditorWidget.js.map +1 -1
  134. package/esm/vs/editor/browser/widget/diffEditor/utils.js +2 -0
  135. package/esm/vs/editor/browser/widget/diffEditor/utils.js.map +1 -1
  136. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +2 -0
  137. package/esm/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js.map +1 -1
  138. package/esm/vs/editor/common/config/editorOptions.js +122 -68
  139. package/esm/vs/editor/common/config/editorOptions.js.map +1 -1
  140. package/esm/vs/editor/common/config/fontInfo.js +32 -16
  141. package/esm/vs/editor/common/config/fontInfo.js.map +1 -1
  142. package/esm/vs/editor/common/config/fontInfoFromSettings.js +16 -0
  143. package/esm/vs/editor/common/config/fontInfoFromSettings.js.map +1 -0
  144. package/esm/vs/editor/common/core/edits/edit.js +1 -0
  145. package/esm/vs/editor/common/core/edits/edit.js.map +1 -1
  146. package/esm/vs/editor/common/core/edits/stringEdit.js +2 -0
  147. package/esm/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  148. package/esm/vs/editor/common/core/position.js +1 -1
  149. package/esm/vs/editor/common/core/position.js.map +1 -1
  150. package/esm/vs/editor/common/core/range.js +1 -1
  151. package/esm/vs/editor/common/core/range.js.map +1 -1
  152. package/esm/vs/editor/common/core/selection.js +1 -1
  153. package/esm/vs/editor/common/core/selection.js.map +1 -1
  154. package/esm/vs/editor/common/cursor/cursorMoveCommands.js.map +1 -1
  155. package/esm/vs/editor/common/editorCommon.js.map +1 -1
  156. package/esm/vs/editor/common/languages.js +1 -1
  157. package/esm/vs/editor/common/languages.js.map +1 -1
  158. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js +14 -0
  159. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length.js.map +1 -1
  160. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js +2 -0
  161. package/esm/vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet.js.map +1 -1
  162. package/esm/vs/editor/common/model/textModel.js +1 -1
  163. package/esm/vs/editor/common/model/textModel.js.map +1 -1
  164. package/esm/vs/editor/common/model.js +1 -1
  165. package/esm/vs/editor/common/model.js.map +1 -1
  166. package/esm/vs/editor/common/services/editorBaseApi.js.map +1 -1
  167. package/esm/vs/editor/common/services/editorWebWorker.js +1 -0
  168. package/esm/vs/editor/common/services/editorWebWorker.js.map +1 -1
  169. package/esm/vs/editor/common/services/editorWorkerHost.js.map +1 -1
  170. package/esm/vs/editor/common/services/modelService.js +14 -21
  171. package/esm/vs/editor/common/services/modelService.js.map +1 -1
  172. package/esm/vs/editor/common/textModelEditSource.js +2 -0
  173. package/esm/vs/editor/common/textModelEditSource.js.map +1 -1
  174. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js +40 -1
  175. package/esm/vs/editor/common/viewLayout/viewLineRenderer.js.map +1 -1
  176. package/esm/vs/editor/common/viewModel/viewModelImpl.js +2 -1
  177. package/esm/vs/editor/common/viewModel/viewModelImpl.js.map +1 -1
  178. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js +1 -1
  179. package/esm/vs/editor/contrib/codeAction/browser/codeActionController.js.map +1 -1
  180. package/esm/vs/editor/contrib/codelens/browser/codelensController.js +1 -1
  181. package/esm/vs/editor/contrib/codelens/browser/codelensController.js.map +1 -1
  182. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js +1 -0
  183. package/esm/vs/editor/contrib/colorPicker/browser/colorDetector.js.map +1 -1
  184. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js +1 -0
  185. package/esm/vs/editor/contrib/contextmenu/browser/contextmenu.js.map +1 -1
  186. package/esm/vs/editor/contrib/find/browser/findModel.js +1 -0
  187. package/esm/vs/editor/contrib/find/browser/findModel.js.map +1 -1
  188. package/esm/vs/editor/contrib/find/browser/findWidget.css +5 -5
  189. package/esm/vs/editor/contrib/folding/browser/folding.css +4 -4
  190. package/esm/vs/editor/contrib/folding/browser/foldingDecorations.js.map +1 -1
  191. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js +1 -1
  192. package/esm/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.js.map +1 -1
  193. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js +30 -14
  194. package/esm/vs/editor/contrib/inlayHints/browser/inlayHintsController.js.map +1 -1
  195. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +4 -3
  196. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js.map +1 -1
  197. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js +56 -7
  198. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsSource.js.map +1 -1
  199. package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js +1 -0
  200. package/esm/vs/editor/contrib/inlineCompletions/browser/structuredLogger.js.map +1 -1
  201. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +2 -0
  202. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js.map +1 -1
  203. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +1 -0
  204. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js.map +1 -1
  205. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js +1 -1
  206. package/esm/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.js.map +1 -1
  207. package/esm/vs/editor/contrib/rename/browser/renameWidget.js.map +1 -1
  208. package/esm/vs/editor/contrib/symbolIcons/browser/symbolIcons.css +2 -0
  209. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js +2 -0
  210. package/esm/vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.js.map +1 -1
  211. package/esm/vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators.js.map +1 -1
  212. package/esm/vs/editor/editor.api.d.ts +8 -8
  213. package/esm/vs/editor/editor.api.js +4 -0
  214. package/esm/vs/editor/editor.api.js.map +1 -1
  215. package/esm/vs/editor/standalone/browser/standaloneCodeEditor.js.map +1 -1
  216. package/esm/vs/editor/standalone/browser/standaloneEditor.js +37 -0
  217. package/esm/vs/editor/standalone/browser/standaloneEditor.js.map +1 -1
  218. package/esm/vs/editor/standalone/browser/standaloneLanguages.js +37 -0
  219. package/esm/vs/editor/standalone/browser/standaloneLanguages.js.map +1 -1
  220. package/esm/vs/editor/standalone/browser/standaloneServices.js.map +1 -1
  221. package/esm/vs/editor/standalone/browser/standaloneWebWorker.js.map +1 -1
  222. package/esm/vs/editor/standalone/common/monarch/monarchCompile.js +3 -0
  223. package/esm/vs/editor/standalone/common/monarch/monarchCompile.js.map +1 -1
  224. package/esm/vs/platform/accessibility/browser/accessibilityService.js +2 -2
  225. package/esm/vs/platform/accessibility/browser/accessibilityService.js.map +1 -1
  226. package/esm/vs/platform/actions/common/actions.js.map +1 -1
  227. package/esm/vs/platform/commands/common/commands.js.map +1 -1
  228. package/esm/vs/platform/contextkey/common/contextkey.js +5 -0
  229. package/esm/vs/platform/contextkey/common/contextkey.js.map +1 -1
  230. package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js +1 -0
  231. package/esm/vs/platform/dataChannel/browser/forwardingTelemetryService.js.map +1 -1
  232. package/esm/vs/platform/dnd/browser/dnd.js +2 -0
  233. package/esm/vs/platform/dnd/browser/dnd.js.map +1 -1
  234. package/esm/vs/platform/instantiation/common/descriptors.js.map +1 -1
  235. package/esm/vs/platform/instantiation/common/instantiation.js.map +1 -1
  236. package/esm/vs/platform/instantiation/common/instantiationService.js +1 -0
  237. package/esm/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  238. package/esm/vs/platform/list/browser/listService.js +5 -0
  239. package/esm/vs/platform/list/browser/listService.js.map +1 -1
  240. package/esm/vs/platform/log/common/log.js.map +1 -1
  241. package/esm/vs/platform/log/common/logService.js.map +1 -1
  242. package/esm/vs/platform/observable/common/wrapInHotClass.js +2 -0
  243. package/esm/vs/platform/observable/common/wrapInHotClass.js.map +1 -1
  244. package/esm/vs/platform/observable/common/wrapInReloadableClass.js +3 -0
  245. package/esm/vs/platform/observable/common/wrapInReloadableClass.js.map +1 -1
  246. package/esm/vs/platform/product/common/product.js +69 -0
  247. package/esm/vs/platform/product/common/product.js.map +1 -0
  248. package/esm/vs/platform/quickinput/browser/quickInput.js +1 -1
  249. package/esm/vs/platform/quickinput/browser/quickInput.js.map +1 -1
  250. package/monaco.d.ts +8 -8
  251. package/package.json +2 -2
@@ -5,6 +5,7 @@
5
5
  import * as arrays from '../../../base/common/arrays.js';
6
6
  import * as objects from '../../../base/common/objects.js';
7
7
  import * as platform from '../../../base/common/platform.js';
8
+ import { EDITOR_FONT_DEFAULTS, FONT_VARIATION_OFF, FONT_VARIATION_TRANSLATE, FontInfo } from './fontInfo.js';
8
9
  import { EDITOR_MODEL_DEFAULTS } from '../core/misc/textModelDefaults.js';
9
10
  import { USUAL_WORD_SEPARATORS } from '../core/wordHelper.js';
10
11
  import * as nls from '../../../nls.js';
@@ -85,11 +86,11 @@ function applyUpdate(value, update) {
85
86
  * @internal
86
87
  */
87
88
  class ComputedEditorOption {
88
- constructor(id) {
89
+ constructor(id, defaultValue) {
89
90
  this.schema = undefined;
90
91
  this.id = id;
91
92
  this.name = '_never_';
92
- this.defaultValue = undefined;
93
+ this.defaultValue = defaultValue;
93
94
  }
94
95
  applyUpdate(value, update) {
95
96
  return applyUpdate(value, update);
@@ -108,12 +109,6 @@ class SimpleEditorOption {
108
109
  applyUpdate(value, update) {
109
110
  return applyUpdate(value, update);
110
111
  }
111
- validate(input) {
112
- if (typeof input === 'undefined') {
113
- return this.defaultValue;
114
- }
115
- return input;
116
- }
117
112
  compute(env, options, value) {
118
113
  return value;
119
114
  }
@@ -147,13 +142,13 @@ class EditorBooleanOption extends SimpleEditorOption {
147
142
  * @internal
148
143
  */
149
144
  export function clampedInt(value, defaultValue, minimum, maximum) {
150
- if (typeof value === 'undefined') {
151
- return defaultValue;
145
+ if (typeof value === 'string') {
146
+ value = parseInt(value, 10);
152
147
  }
153
- let r = parseInt(value, 10);
154
- if (isNaN(r)) {
148
+ if (typeof value !== 'number' || isNaN(value)) {
155
149
  return defaultValue;
156
150
  }
151
+ let r = value;
157
152
  r = Math.max(minimum, r);
158
153
  r = Math.min(maximum, r);
159
154
  return r | 0;
@@ -198,14 +193,13 @@ class EditorFloatOption extends SimpleEditorOption {
198
193
  return n;
199
194
  }
200
195
  static float(value, defaultValue) {
201
- if (typeof value === 'number') {
202
- return value;
196
+ if (typeof value === 'string') {
197
+ value = parseFloat(value);
203
198
  }
204
- if (typeof value === 'undefined') {
199
+ if (typeof value !== 'number' || isNaN(value)) {
205
200
  return defaultValue;
206
201
  }
207
- const r = parseFloat(value);
208
- return (isNaN(r) ? defaultValue : r);
202
+ return value;
209
203
  }
210
204
  constructor(id, name, defaultValue, validationFn, schema, minimum, maximum) {
211
205
  if (typeof schema !== 'undefined') {
@@ -260,7 +254,7 @@ class EditorStringEnumOption extends SimpleEditorOption {
260
254
  constructor(id, name, defaultValue, allowedValues, schema = undefined) {
261
255
  if (typeof schema !== 'undefined') {
262
256
  schema.type = 'string';
263
- schema.enum = allowedValues;
257
+ schema.enum = allowedValues.slice(0);
264
258
  schema.default = defaultValue;
265
259
  }
266
260
  super(id, name, defaultValue, schema);
@@ -426,7 +420,7 @@ export function cursorStyleFromString(cursorStyle) {
426
420
  //#region editorClassName
427
421
  class EditorClassName extends ComputedEditorOption {
428
422
  constructor() {
429
- super(162 /* EditorOption.editorClassName */);
423
+ super(162 /* EditorOption.editorClassName */, '');
430
424
  }
431
425
  compute(env, options, _) {
432
426
  const classNames = ['monaco-editor'];
@@ -553,11 +547,11 @@ class EditorFind extends BaseEditorOption {
553
547
  return {
554
548
  cursorMoveOnType: boolean(input.cursorMoveOnType, this.defaultValue.cursorMoveOnType),
555
549
  findOnType: boolean(input.findOnType, this.defaultValue.findOnType),
556
- seedSearchStringFromSelection: typeof _input.seedSearchStringFromSelection === 'boolean'
557
- ? (_input.seedSearchStringFromSelection ? 'always' : 'never')
550
+ seedSearchStringFromSelection: typeof input.seedSearchStringFromSelection === 'boolean'
551
+ ? (input.seedSearchStringFromSelection ? 'always' : 'never')
558
552
  : stringSet(input.seedSearchStringFromSelection, this.defaultValue.seedSearchStringFromSelection, ['never', 'always', 'selection']),
559
- autoFindInSelection: typeof _input.autoFindInSelection === 'boolean'
560
- ? (_input.autoFindInSelection ? 'always' : 'never')
553
+ autoFindInSelection: typeof input.autoFindInSelection === 'boolean'
554
+ ? (input.autoFindInSelection ? 'always' : 'never')
561
555
  : stringSet(input.autoFindInSelection, this.defaultValue.autoFindInSelection, ['never', 'always', 'multiline']),
562
556
  globalFindClipboard: boolean(input.globalFindClipboard, this.defaultValue.globalFindClipboard),
563
557
  addExtraSpaceOnTop: boolean(input.addExtraSpaceOnTop, this.defaultValue.addExtraSpaceOnTop),
@@ -617,9 +611,9 @@ export class EditorFontLigatures extends BaseEditorOption {
617
611
  */
618
612
  export class EditorFontVariations extends BaseEditorOption {
619
613
  // Text is laid out using default settings.
620
- static { this.OFF = 'normal'; }
614
+ static { this.OFF = FONT_VARIATION_OFF; }
621
615
  // Translate `fontWeight` config to the `font-variation-settings` CSS property.
622
- static { this.TRANSLATE = 'translate'; }
616
+ static { this.TRANSLATE = FONT_VARIATION_TRANSLATE; }
623
617
  constructor() {
624
618
  super(63 /* EditorOption.fontVariations */, 'fontVariations', EditorFontVariations.OFF, {
625
619
  anyOf: [
@@ -664,7 +658,24 @@ export class EditorFontVariations extends BaseEditorOption {
664
658
  //#region fontInfo
665
659
  class EditorFontInfo extends ComputedEditorOption {
666
660
  constructor() {
667
- super(59 /* EditorOption.fontInfo */);
661
+ super(59 /* EditorOption.fontInfo */, new FontInfo({
662
+ pixelRatio: 0,
663
+ fontFamily: '',
664
+ fontWeight: '',
665
+ fontSize: 0,
666
+ fontFeatureSettings: '',
667
+ fontVariationSettings: '',
668
+ lineHeight: 0,
669
+ letterSpacing: 0,
670
+ isMonospace: false,
671
+ typicalHalfwidthCharacterWidth: 0,
672
+ typicalFullwidthCharacterWidth: 0,
673
+ canUseHalfwidthRightwardsArrow: false,
674
+ spaceWidth: 0,
675
+ middotWidth: 0,
676
+ wsmiddotWidth: 0,
677
+ maxDigitWidth: 0,
678
+ }, false));
668
679
  }
669
680
  compute(env, options, _) {
670
681
  return env.fontInfo;
@@ -674,7 +685,7 @@ class EditorFontInfo extends ComputedEditorOption {
674
685
  //#region effectiveCursorStyle
675
686
  class EffectiveCursorStyle extends ComputedEditorOption {
676
687
  constructor() {
677
- super(161 /* EditorOption.effectiveCursorStyle */);
688
+ super(161 /* EditorOption.effectiveCursorStyle */, TextEditorCursorStyle.Line);
678
689
  }
679
690
  compute(env, options, _) {
680
691
  return env.inputMode === 'overtype' ?
@@ -686,7 +697,7 @@ class EffectiveCursorStyle extends ComputedEditorOption {
686
697
  //#region effectiveExperimentalEditContext
687
698
  class EffectiveEditContextEnabled extends ComputedEditorOption {
688
699
  constructor() {
689
- super(170 /* EditorOption.effectiveEditContext */);
700
+ super(170 /* EditorOption.effectiveEditContext */, false);
690
701
  }
691
702
  compute(env, options) {
692
703
  return env.editContextSupported && options.get(44 /* EditorOption.editContext */);
@@ -696,7 +707,7 @@ class EffectiveEditContextEnabled extends ComputedEditorOption {
696
707
  //#region effectiveAllowVariableFonts
697
708
  class EffectiveAllowVariableFonts extends ComputedEditorOption {
698
709
  constructor() {
699
- super(172 /* EditorOption.effectiveAllowVariableFonts */);
710
+ super(172 /* EditorOption.effectiveAllowVariableFonts */, false);
700
711
  }
701
712
  compute(env, options) {
702
713
  const accessibilitySupport = env.accessibilitySupport;
@@ -858,12 +869,12 @@ class EditorGoToLocation extends BaseEditorOption {
858
869
  const input = _input;
859
870
  return {
860
871
  multiple: stringSet(input.multiple, this.defaultValue.multiple, ['peek', 'gotoAndPeek', 'goto']),
861
- multipleDefinitions: input.multipleDefinitions ?? stringSet(input.multipleDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),
862
- multipleTypeDefinitions: input.multipleTypeDefinitions ?? stringSet(input.multipleTypeDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),
863
- multipleDeclarations: input.multipleDeclarations ?? stringSet(input.multipleDeclarations, 'peek', ['peek', 'gotoAndPeek', 'goto']),
864
- multipleImplementations: input.multipleImplementations ?? stringSet(input.multipleImplementations, 'peek', ['peek', 'gotoAndPeek', 'goto']),
865
- multipleReferences: input.multipleReferences ?? stringSet(input.multipleReferences, 'peek', ['peek', 'gotoAndPeek', 'goto']),
866
- multipleTests: input.multipleTests ?? stringSet(input.multipleTests, 'peek', ['peek', 'gotoAndPeek', 'goto']),
872
+ multipleDefinitions: stringSet(input.multipleDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),
873
+ multipleTypeDefinitions: stringSet(input.multipleTypeDefinitions, 'peek', ['peek', 'gotoAndPeek', 'goto']),
874
+ multipleDeclarations: stringSet(input.multipleDeclarations, 'peek', ['peek', 'gotoAndPeek', 'goto']),
875
+ multipleImplementations: stringSet(input.multipleImplementations, 'peek', ['peek', 'gotoAndPeek', 'goto']),
876
+ multipleReferences: stringSet(input.multipleReferences, 'peek', ['peek', 'gotoAndPeek', 'goto']),
877
+ multipleTests: stringSet(input.multipleTests, 'peek', ['peek', 'gotoAndPeek', 'goto']),
867
878
  alternativeDefinitionCommand: EditorStringOption.string(input.alternativeDefinitionCommand, this.defaultValue.alternativeDefinitionCommand),
868
879
  alternativeTypeDefinitionCommand: EditorStringOption.string(input.alternativeTypeDefinitionCommand, this.defaultValue.alternativeTypeDefinitionCommand),
869
880
  alternativeDeclarationCommand: EditorStringOption.string(input.alternativeDeclarationCommand, this.defaultValue.alternativeDeclarationCommand),
@@ -932,7 +943,44 @@ class EditorHover extends BaseEditorOption {
932
943
  */
933
944
  export class EditorLayoutInfoComputer extends ComputedEditorOption {
934
945
  constructor() {
935
- super(165 /* EditorOption.layoutInfo */);
946
+ super(165 /* EditorOption.layoutInfo */, {
947
+ width: 0,
948
+ height: 0,
949
+ glyphMarginLeft: 0,
950
+ glyphMarginWidth: 0,
951
+ glyphMarginDecorationLaneCount: 0,
952
+ lineNumbersLeft: 0,
953
+ lineNumbersWidth: 0,
954
+ decorationsLeft: 0,
955
+ decorationsWidth: 0,
956
+ contentLeft: 0,
957
+ contentWidth: 0,
958
+ minimap: {
959
+ renderMinimap: 0 /* RenderMinimap.None */,
960
+ minimapLeft: 0,
961
+ minimapWidth: 0,
962
+ minimapHeightIsEditorHeight: false,
963
+ minimapIsSampling: false,
964
+ minimapScale: 1,
965
+ minimapLineHeight: 1,
966
+ minimapCanvasInnerWidth: 0,
967
+ minimapCanvasInnerHeight: 0,
968
+ minimapCanvasOuterWidth: 0,
969
+ minimapCanvasOuterHeight: 0,
970
+ },
971
+ viewportColumn: 0,
972
+ isWordWrapMinified: false,
973
+ isViewportWrapping: false,
974
+ wrappingColumn: -1,
975
+ verticalScrollbarWidth: 0,
976
+ horizontalScrollbarHeight: 0,
977
+ overviewRuler: {
978
+ top: 0,
979
+ width: 0,
980
+ height: 0,
981
+ right: 0
982
+ }
983
+ });
936
984
  }
937
985
  compute(env, options, _) {
938
986
  return EditorLayoutInfoComputer.computeLayout(options, {
@@ -1551,7 +1599,7 @@ class EditorMinimap extends BaseEditorOption {
1551
1599
  const input = _input;
1552
1600
  // Validate mark section header regex
1553
1601
  let markSectionHeaderRegex = this.defaultValue.markSectionHeaderRegex;
1554
- const inputRegex = _input.markSectionHeaderRegex;
1602
+ const inputRegex = input.markSectionHeaderRegex;
1555
1603
  if (typeof inputRegex === 'string') {
1556
1604
  try {
1557
1605
  new RegExp(inputRegex, 'd');
@@ -1571,8 +1619,8 @@ class EditorMinimap extends BaseEditorOption {
1571
1619
  showRegionSectionHeaders: boolean(input.showRegionSectionHeaders, this.defaultValue.showRegionSectionHeaders),
1572
1620
  showMarkSectionHeaders: boolean(input.showMarkSectionHeaders, this.defaultValue.showMarkSectionHeaders),
1573
1621
  markSectionHeaderRegex: markSectionHeaderRegex,
1574
- sectionHeaderFontSize: EditorFloatOption.clamp(input.sectionHeaderFontSize ?? this.defaultValue.sectionHeaderFontSize, 4, 32),
1575
- sectionHeaderLetterSpacing: EditorFloatOption.clamp(input.sectionHeaderLetterSpacing ?? this.defaultValue.sectionHeaderLetterSpacing, 0, 5),
1622
+ sectionHeaderFontSize: EditorFloatOption.clamp(EditorFloatOption.float(input.sectionHeaderFontSize, this.defaultValue.sectionHeaderFontSize), 4, 32),
1623
+ sectionHeaderLetterSpacing: EditorFloatOption.clamp(EditorFloatOption.float(input.sectionHeaderLetterSpacing, this.defaultValue.sectionHeaderLetterSpacing), 0, 5),
1576
1624
  };
1577
1625
  }
1578
1626
  }
@@ -1648,7 +1696,7 @@ class EditorParameterHints extends BaseEditorOption {
1648
1696
  //#region pixelRatio
1649
1697
  class EditorPixelRatio extends ComputedEditorOption {
1650
1698
  constructor() {
1651
- super(163 /* EditorOption.pixelRatio */);
1699
+ super(163 /* EditorOption.pixelRatio */, 1);
1652
1700
  }
1653
1701
  compute(env, options, _) {
1654
1702
  return env.pixelRatio;
@@ -2093,8 +2141,8 @@ class UnicodeHighlight extends BaseEditorOption {
2093
2141
  ambiguousCharacters: boolean(input.ambiguousCharacters, this.defaultValue.ambiguousCharacters),
2094
2142
  includeComments: primitiveSet(input.includeComments, inUntrustedWorkspace, [true, false, inUntrustedWorkspace]),
2095
2143
  includeStrings: primitiveSet(input.includeStrings, inUntrustedWorkspace, [true, false, inUntrustedWorkspace]),
2096
- allowedCharacters: this.validateBooleanMap(_input.allowedCharacters, this.defaultValue.allowedCharacters),
2097
- allowedLocales: this.validateBooleanMap(_input.allowedLocales, this.defaultValue.allowedLocales),
2144
+ allowedCharacters: this.validateBooleanMap(input.allowedCharacters, this.defaultValue.allowedCharacters),
2145
+ allowedLocales: this.validateBooleanMap(input.allowedLocales, this.defaultValue.allowedLocales),
2098
2146
  };
2099
2147
  }
2100
2148
  validateBooleanMap(map, defaultValue) {
@@ -2124,7 +2172,7 @@ class InlineEditorSuggest extends BaseEditorOption {
2124
2172
  fontFamily: 'default',
2125
2173
  syntaxHighlightingEnabled: true,
2126
2174
  minShowDelay: 0,
2127
- suppressInSnippetMode: false,
2175
+ suppressInSnippetMode: true,
2128
2176
  edits: {
2129
2177
  enabled: true,
2130
2178
  showCollapsed: false,
@@ -2260,18 +2308,32 @@ class InlineEditorSuggest extends BaseEditorOption {
2260
2308
  syntaxHighlightingEnabled: boolean(input.syntaxHighlightingEnabled, this.defaultValue.syntaxHighlightingEnabled),
2261
2309
  minShowDelay: EditorIntOption.clampedInt(input.minShowDelay, 0, 0, 10000),
2262
2310
  suppressInSnippetMode: boolean(input.suppressInSnippetMode, this.defaultValue.suppressInSnippetMode),
2263
- edits: {
2264
- enabled: boolean(input.edits?.enabled, this.defaultValue.edits.enabled),
2265
- showCollapsed: boolean(input.edits?.showCollapsed, this.defaultValue.edits.showCollapsed),
2266
- allowCodeShifting: stringSet(input.edits?.allowCodeShifting, this.defaultValue.edits.allowCodeShifting, ['always', 'horizontal', 'never']),
2267
- renderSideBySide: stringSet(input.edits?.renderSideBySide, this.defaultValue.edits.renderSideBySide, ['never', 'auto']),
2268
- },
2311
+ edits: this._validateEdits(input.edits),
2269
2312
  triggerCommandOnProviderChange: boolean(input.triggerCommandOnProviderChange, this.defaultValue.triggerCommandOnProviderChange),
2270
- experimental: {
2271
- suppressInlineSuggestions: EditorStringOption.string(input.experimental?.suppressInlineSuggestions, this.defaultValue.experimental.suppressInlineSuggestions),
2272
- showOnSuggestConflict: stringSet(input.experimental?.showOnSuggestConflict, this.defaultValue.experimental.showOnSuggestConflict, ['always', 'never', 'whenSuggestListIsIncomplete']),
2273
- emptyResponseInformation: boolean(input.experimental?.emptyResponseInformation, this.defaultValue.experimental.emptyResponseInformation),
2274
- },
2313
+ experimental: this._validateExperimental(input.experimental),
2314
+ };
2315
+ }
2316
+ _validateEdits(_input) {
2317
+ if (!_input || typeof _input !== 'object') {
2318
+ return this.defaultValue.edits;
2319
+ }
2320
+ const input = _input;
2321
+ return {
2322
+ enabled: boolean(input.enabled, this.defaultValue.edits.enabled),
2323
+ showCollapsed: boolean(input.showCollapsed, this.defaultValue.edits.showCollapsed),
2324
+ allowCodeShifting: stringSet(input.allowCodeShifting, this.defaultValue.edits.allowCodeShifting, ['always', 'horizontal', 'never']),
2325
+ renderSideBySide: stringSet(input.renderSideBySide, this.defaultValue.edits.renderSideBySide, ['never', 'auto']),
2326
+ };
2327
+ }
2328
+ _validateExperimental(_input) {
2329
+ if (!_input || typeof _input !== 'object') {
2330
+ return this.defaultValue.experimental;
2331
+ }
2332
+ const input = _input;
2333
+ return {
2334
+ suppressInlineSuggestions: EditorStringOption.string(input.suppressInlineSuggestions, this.defaultValue.experimental.suppressInlineSuggestions),
2335
+ showOnSuggestConflict: stringSet(input.showOnSuggestConflict, this.defaultValue.experimental.showOnSuggestConflict, ['always', 'never', 'whenSuggestListIsIncomplete']),
2336
+ emptyResponseInformation: boolean(input.emptyResponseInformation, this.defaultValue.experimental.emptyResponseInformation),
2275
2337
  };
2276
2338
  }
2277
2339
  }
@@ -2821,7 +2883,12 @@ class WrappingIndentOption extends BaseEditorOption {
2821
2883
  }
2822
2884
  class EditorWrappingInfoComputer extends ComputedEditorOption {
2823
2885
  constructor() {
2824
- super(166 /* EditorOption.wrappingInfo */);
2886
+ super(166 /* EditorOption.wrappingInfo */, {
2887
+ isDominatedByLongLines: false,
2888
+ isWordWrapMinified: false,
2889
+ isViewportWrapping: false,
2890
+ wrappingColumn: -1
2891
+ });
2825
2892
  }
2826
2893
  compute(env, options, _) {
2827
2894
  const layoutInfo = options.get(165 /* EditorOption.layoutInfo */);
@@ -2904,19 +2971,6 @@ class EditorPasteAs extends BaseEditorOption {
2904
2971
  }
2905
2972
  }
2906
2973
  //#endregion
2907
- const DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, \'Courier New\', monospace';
2908
- const DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, \'Courier New\', monospace';
2909
- const DEFAULT_LINUX_FONT_FAMILY = '\'Droid Sans Mono\', \'monospace\', monospace';
2910
- /**
2911
- * @internal
2912
- */
2913
- export const EDITOR_FONT_DEFAULTS = {
2914
- fontFamily: (platform.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (platform.isWindows ? DEFAULT_WINDOWS_FONT_FAMILY : DEFAULT_LINUX_FONT_FAMILY)),
2915
- fontWeight: 'normal',
2916
- fontSize: (platform.isMacintosh ? 12 : 14),
2917
- lineHeight: 0,
2918
- letterSpacing: 0,
2919
- };
2920
2974
  /**
2921
2975
  * @internal
2922
2976
  */