monaco-editor 0.56.0-dev-20260120 → 0.56.0-dev-20260121

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 (131) hide show
  1. package/dev/vs/basic-languages/monaco.contribution.js +18 -18
  2. package/dev/vs/{cssMode-DYAvCb0Q.js → cssMode-B0VkNrib.js} +1 -1
  3. package/dev/vs/editor/editor.main.css +34 -20
  4. package/dev/vs/editor/editor.main.js +1 -1
  5. package/dev/vs/{editor-V-thM4Kh.js → editor-CR18QzPP.js} +541 -177
  6. package/dev/vs/editor.js +1 -1
  7. package/dev/vs/{freemarker2-DNhaeW6n.js → freemarker2-Byr9HmH9.js} +1 -1
  8. package/dev/vs/{handlebars-B9XLHU9b.js → handlebars-BEVXeROF.js} +1 -1
  9. package/dev/vs/{html-CSZlVq5J.js → html-CetHjWIf.js} +1 -1
  10. package/dev/vs/{htmlMode-DkNCbjhM.js → htmlMode-BNKYUVNo.js} +1 -1
  11. package/dev/vs/{index-CuJyCoc4.js → index-g_7JbDIY.js} +1 -1
  12. package/dev/vs/index.js +1 -1
  13. package/dev/vs/{javascript-D1PoJUjx.js → javascript-BEgEU725.js} +1 -1
  14. package/dev/vs/{jsonMode-C84g5aG1.js → jsonMode-CT2UkfFE.js} +1 -1
  15. package/dev/vs/language/css/monaco.contribution.js +1 -1
  16. package/dev/vs/language/html/monaco.contribution.js +1 -1
  17. package/dev/vs/language/json/monaco.contribution.js +1 -1
  18. package/dev/vs/language/typescript/monaco.contribution.js +1 -1
  19. package/dev/vs/{liquid-BR1qAgSc.js → liquid-D-aiCb1P.js} +1 -1
  20. package/dev/vs/{lspLanguageFeatures-e8bPBYUK.js → lspLanguageFeatures-CE9Occyu.js} +1 -1
  21. package/dev/vs/{mdx-BLfAN-pP.js → mdx-DchJ8pbq.js} +1 -1
  22. package/dev/vs/{monaco.contribution-BpJCJ2aN.js → monaco.contribution-CHqb1dWh.js} +2 -2
  23. package/dev/vs/{monaco.contribution-BoVCpaaV.js → monaco.contribution-CVBrIlxn.js} +2 -2
  24. package/dev/vs/{monaco.contribution-Ccg01HGd.js → monaco.contribution-CZxuzvA9.js} +2 -2
  25. package/dev/vs/{monaco.contribution-ehavOHIf.js → monaco.contribution-Cw4OdERZ.js} +2 -2
  26. package/dev/vs/nls/lang/cs.js +1 -1
  27. package/dev/vs/nls/lang/de.js +1 -1
  28. package/dev/vs/nls/lang/es.js +1 -1
  29. package/dev/vs/nls/lang/fr.js +1 -1
  30. package/dev/vs/nls/lang/it.js +1 -1
  31. package/dev/vs/nls/lang/ja.js +1 -1
  32. package/dev/vs/nls/lang/ko.js +1 -1
  33. package/dev/vs/nls/lang/pl.js +1 -1
  34. package/dev/vs/nls/lang/pt-br.js +1 -1
  35. package/dev/vs/nls/lang/ru.js +1 -1
  36. package/dev/vs/nls/lang/tr.js +1 -1
  37. package/dev/vs/nls/lang/zh-cn.js +1 -1
  38. package/dev/vs/nls/lang/zh-tw.js +1 -1
  39. package/dev/vs/{python-sycHAgxs.js → python-BCOSaCC8.js} +1 -1
  40. package/dev/vs/{razor-B62R6Lsx.js → razor-BM2tZCwj.js} +1 -1
  41. package/dev/vs/{toggleHighContrast-3bUMPAmT.js → toggleHighContrast-CLgtrrIB.js} +141 -310
  42. package/dev/vs/{tsMode-Co79Xo5K.js → tsMode-jpkv3SbL.js} +1 -1
  43. package/dev/vs/{typescript-_1BH4dlp.js → typescript-f8pt88eA.js} +1 -1
  44. package/dev/vs/{workers-BGdHt1rb.js → workers-zrUx_2Gw.js} +1 -1
  45. package/dev/vs/{xml-Cqh8dVgY.js → xml-CmSjtiR0.js} +1 -1
  46. package/dev/vs/{yaml-D6-bhWv5.js → yaml-PRriLGdw.js} +1 -1
  47. package/esm/vs/base/browser/markdownRenderer.js +1 -0
  48. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +81 -35
  49. package/esm/vs/editor/browser/controller/editContext/editContext.js +11 -0
  50. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +39 -32
  51. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +5 -16
  52. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +39 -16
  53. package/esm/vs/editor/browser/dataTransfer.js +1 -1
  54. package/esm/vs/editor/browser/view.js +21 -1
  55. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +18 -0
  56. package/esm/vs/editor/common/model/bracketPairsTextModelPart/colorizedBracketPairsDecorationProvider.js +3 -3
  57. package/esm/vs/editor/common/model/textModel.js +4 -4
  58. package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +20 -16
  59. package/esm/vs/editor/common/viewModel/viewModelDecorations.js +11 -4
  60. package/esm/vs/editor/common/viewModel/viewModelImpl.js +25 -14
  61. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +3 -3
  62. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +28 -64
  63. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +27 -20
  64. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.js +37 -9
  65. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.css +7 -0
  66. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +22 -3
  67. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +1 -0
  68. package/esm/vs/editor/editor.api.d.ts +5 -1
  69. package/esm/vs/nls/lang/cs.js +1 -1
  70. package/esm/vs/nls/lang/de.js +1 -1
  71. package/esm/vs/nls/lang/es.js +1 -1
  72. package/esm/vs/nls/lang/fr.js +1 -1
  73. package/esm/vs/nls/lang/it.js +1 -1
  74. package/esm/vs/nls/lang/ja.js +1 -1
  75. package/esm/vs/nls/lang/ko.js +1 -1
  76. package/esm/vs/nls/lang/pl.js +1 -1
  77. package/esm/vs/nls/lang/pt-br.js +1 -1
  78. package/esm/vs/nls/lang/ru.js +1 -1
  79. package/esm/vs/nls/lang/tr.js +1 -1
  80. package/esm/vs/nls/lang/zh-cn.js +1 -1
  81. package/esm/vs/nls/lang/zh-tw.js +1 -1
  82. package/esm/vs/platform/actionWidget/browser/actionList.js +46 -6
  83. package/esm/vs/platform/actionWidget/browser/actionWidget.js +9 -2
  84. package/min/vs/basic-languages/monaco.contribution.js +1 -1
  85. package/min/vs/{cssMode-C9eBIuJR.js → cssMode-CheCY05R.js} +1 -1
  86. package/min/vs/editor/editor.main.css +1 -1
  87. package/min/vs/editor/editor.main.js +1 -1
  88. package/min/vs/{editor-Ch74nR58.js → editor-DxYWA3-X.js} +112 -110
  89. package/min/vs/editor.js +1 -1
  90. package/min/vs/{freemarker2-sjIgVc3I.js → freemarker2-C7J7V1Hp.js} +1 -1
  91. package/min/vs/{handlebars-IDPYJ5Bq.js → handlebars-DsCar5Ix.js} +1 -1
  92. package/min/vs/{html-DfUrEqvV.js → html-BGLIaUZV.js} +1 -1
  93. package/min/vs/{htmlMode-Dg0zLT1w.js → htmlMode-BB6WOoy3.js} +1 -1
  94. package/min/vs/{index-D6TJnMd3.js → index-BdR0nSqf.js} +1 -1
  95. package/min/vs/index.js +1 -1
  96. package/min/vs/{javascript-BpnRo0yM.js → javascript-CXE3i1eX.js} +1 -1
  97. package/min/vs/{jsonMode-DtUQxAtK.js → jsonMode-rtaE9alu.js} +1 -1
  98. package/min/vs/language/css/monaco.contribution.js +1 -1
  99. package/min/vs/language/html/monaco.contribution.js +1 -1
  100. package/min/vs/language/json/monaco.contribution.js +1 -1
  101. package/min/vs/language/typescript/monaco.contribution.js +1 -1
  102. package/min/vs/{liquid-Bpv368IV.js → liquid-CEdn0ovR.js} +1 -1
  103. package/min/vs/{lspLanguageFeatures-C0Mzq6q_.js → lspLanguageFeatures-CRAjJmzF.js} +1 -1
  104. package/min/vs/{mdx-CT-XRvYr.js → mdx-DLDMIqnu.js} +1 -1
  105. package/min/vs/{monaco.contribution-tn0sN6iU.js → monaco.contribution-BrRAk-VA.js} +1 -1
  106. package/min/vs/{monaco.contribution-B6pVhtM0.js → monaco.contribution-C67XgReK.js} +1 -1
  107. package/min/vs/{monaco.contribution-ZmSpiAe2.js → monaco.contribution-CYT-Sx3l.js} +1 -1
  108. package/min/vs/{monaco.contribution-Bp7k_fZE.js → monaco.contribution-DjiQkKLa.js} +1 -1
  109. package/min/vs/nls/lang/cs.js +1 -1
  110. package/min/vs/nls/lang/de.js +1 -1
  111. package/min/vs/nls/lang/es.js +1 -1
  112. package/min/vs/nls/lang/fr.js +1 -1
  113. package/min/vs/nls/lang/it.js +1 -1
  114. package/min/vs/nls/lang/ja.js +1 -1
  115. package/min/vs/nls/lang/ko.js +1 -1
  116. package/min/vs/nls/lang/pl.js +1 -1
  117. package/min/vs/nls/lang/pt-br.js +1 -1
  118. package/min/vs/nls/lang/ru.js +1 -1
  119. package/min/vs/nls/lang/tr.js +1 -1
  120. package/min/vs/nls/lang/zh-cn.js +1 -1
  121. package/min/vs/nls/lang/zh-tw.js +1 -1
  122. package/min/vs/{python-CdDzXJRR.js → python-CKbl_I3e.js} +1 -1
  123. package/min/vs/{razor-oKyioz5n.js → razor--RjiPxbd.js} +1 -1
  124. package/min/vs/{toggleHighContrast-CKdnSOZR.js → toggleHighContrast-BKDMxisH.js} +30 -32
  125. package/min/vs/{tsMode-cB-UHsG6.js → tsMode-C48d5M22.js} +1 -1
  126. package/min/vs/{typescript-B8RK7Scz.js → typescript-e7oUhPyX.js} +1 -1
  127. package/min/vs/{workers-DYaZhUMn.js → workers-CtpYUoCo.js} +1 -1
  128. package/min/vs/{xml-DvqAg4in.js → xml-tOyfgws7.js} +1 -1
  129. package/min/vs/{yaml-KLiQ2nzu.js → yaml-Cmf9NYDf.js} +1 -1
  130. package/monaco.d.ts +5 -1
  131. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-"], (function(require, exports, editorWorkerHost) {
1
+ define("vs/editor-CR18QzPP", ["require", "exports", "./editorWorkerHost--0eDLpc-"], (function(require, exports, editorWorkerHost) {
2
2
  "use strict";
3
3
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
4
4
  const EditorZoom = new class {
@@ -10710,10 +10710,10 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
10710
10710
  }
10711
10711
  }
10712
10712
  const KeybindingsRegistry = new KeybindingsRegistryImpl();
10713
- const Extensions$8 = {
10713
+ const Extensions$9 = {
10714
10714
  EditorModes: "platform.keybindingsRegistry"
10715
10715
  };
10716
- Registry.add(Extensions$8.EditorModes, KeybindingsRegistry);
10716
+ Registry.add(Extensions$9.EditorModes, KeybindingsRegistry);
10717
10717
  function sorter(a, b) {
10718
10718
  if (a.weight1 !== b.weight1) {
10719
10719
  return a.weight1 - b.weight1;
@@ -12096,7 +12096,7 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
12096
12096
  }
12097
12097
  EditorExtensionsRegistry2.getDiffEditorContributions = getDiffEditorContributions;
12098
12098
  })(EditorExtensionsRegistry || (EditorExtensionsRegistry = {}));
12099
- const Extensions$7 = {
12099
+ const Extensions$8 = {
12100
12100
  EditorCommonContributions: "editor.contributions"
12101
12101
  };
12102
12102
  const _EditorContributionRegistry = class _EditorContributionRegistry {
@@ -12132,7 +12132,7 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
12132
12132
  };
12133
12133
  _EditorContributionRegistry.INSTANCE = new _EditorContributionRegistry();
12134
12134
  let EditorContributionRegistry = _EditorContributionRegistry;
12135
- Registry.add(Extensions$7.EditorCommonContributions, EditorContributionRegistry.INSTANCE);
12135
+ Registry.add(Extensions$8.EditorCommonContributions, EditorContributionRegistry.INSTANCE);
12136
12136
  function registerCommand$2(command) {
12137
12137
  command.register();
12138
12138
  return command;
@@ -13094,7 +13094,7 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
13094
13094
  uriList: "text/uri-list",
13095
13095
  html: "text/html"
13096
13096
  });
13097
- const Extensions$6 = {
13097
+ const Extensions$7 = {
13098
13098
  JSONContribution: "base.contributions.json"
13099
13099
  };
13100
13100
  function normalizeId(id) {
@@ -13125,7 +13125,7 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
13125
13125
  }
13126
13126
  }
13127
13127
  const jsonContributionRegistry = new JSONContributionRegistry();
13128
- Registry.add(Extensions$6.JSONContribution, jsonContributionRegistry);
13128
+ Registry.add(Extensions$7.JSONContribution, jsonContributionRegistry);
13129
13129
  let product;
13130
13130
  const vscodeGlobal = globalThis.vscode;
13131
13131
  if (typeof vscodeGlobal !== "undefined" && typeof vscodeGlobal.context !== "undefined") {
@@ -13186,11 +13186,11 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
13186
13186
  }
13187
13187
  }
13188
13188
  const product$1 = product;
13189
- const Extensions$5 = {
13189
+ const Extensions$6 = {
13190
13190
  Configuration: "base.contributions.configuration"
13191
13191
  };
13192
13192
  const resourceLanguageSettingsSchemaId = "vscode://schemas/settings/resourceLanguage";
13193
- const contributionRegistry = Registry.as(Extensions$6.JSONContribution);
13193
+ const contributionRegistry = Registry.as(Extensions$7.JSONContribution);
13194
13194
  class ConfigurationRegistry extends editorWorkerHost.Disposable {
13195
13195
  constructor() {
13196
13196
  super();
@@ -13530,7 +13530,7 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
13530
13530
  }
13531
13531
  }
13532
13532
  const configurationRegistry$2 = new ConfigurationRegistry();
13533
- Registry.add(Extensions$5.Configuration, configurationRegistry$2);
13533
+ Registry.add(Extensions$6.Configuration, configurationRegistry$2);
13534
13534
  function validateProperty(property, schema, extensionId) {
13535
13535
  if (!property.trim()) {
13536
13536
  return editorWorkerHost.localize(1685, "Cannot register an empty property");
@@ -13547,7 +13547,7 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
13547
13547
  return null;
13548
13548
  }
13549
13549
  const EXTENSION_UNIFICATION_EXTENSION_IDS = new Set(product$1.defaultChatAgent ? [product$1.defaultChatAgent.extensionId, product$1.defaultChatAgent.chatExtensionId].map((id) => id.toLowerCase()) : []);
13550
- const Extensions$4 = {
13550
+ const Extensions$5 = {
13551
13551
  ModesRegistry: "editor.modesRegistry"
13552
13552
  };
13553
13553
  class EditorModesRegistry extends editorWorkerHost.Disposable {
@@ -13576,7 +13576,7 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
13576
13576
  }
13577
13577
  }
13578
13578
  const ModesRegistry = new EditorModesRegistry();
13579
- Registry.add(Extensions$4.ModesRegistry, ModesRegistry);
13579
+ Registry.add(Extensions$5.ModesRegistry, ModesRegistry);
13580
13580
  const PLAINTEXT_LANGUAGE_ID = "plaintext";
13581
13581
  const PLAINTEXT_EXTENSION = ".txt";
13582
13582
  ModesRegistry.registerLanguage({
@@ -13585,7 +13585,7 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
13585
13585
  aliases: [editorWorkerHost.localize(792, "Plain Text"), "text"],
13586
13586
  mimetypes: [Mimes.text]
13587
13587
  });
13588
- Registry.as(Extensions$5.Configuration).registerDefaultConfigurations([{
13588
+ Registry.as(Extensions$6.Configuration).registerDefaultConfigurations([{
13589
13589
  overrides: {
13590
13590
  "[plaintext]": {
13591
13591
  "editor.unicodeHighlight.ambiguousCharacters": false,
@@ -17970,7 +17970,7 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
17970
17970
  function isColorDefaults(value) {
17971
17971
  return value !== null && typeof value === "object" && "light" in value && "dark" in value;
17972
17972
  }
17973
- const Extensions$3 = {
17973
+ const Extensions$4 = {
17974
17974
  ColorContribution: "base.contributions.colors"
17975
17975
  };
17976
17976
  const DEFAULT_COLOR_CONFIG_VALUE = "default";
@@ -18033,7 +18033,7 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
18033
18033
  }
18034
18034
  }
18035
18035
  const colorRegistry$1 = new ColorRegistry();
18036
- Registry.add(Extensions$3.ColorContribution, colorRegistry$1);
18036
+ Registry.add(Extensions$4.ColorContribution, colorRegistry$1);
18037
18037
  function registerColor(id, defaults, description, needsTransparency, deprecationMessage) {
18038
18038
  return colorRegistry$1.registerColor(id, defaults, description, needsTransparency, deprecationMessage);
18039
18039
  }
@@ -18116,7 +18116,7 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
18116
18116
  return void 0;
18117
18117
  }
18118
18118
  const workbenchColorsSchemaId = "vscode://schemas/workbench-colors";
18119
- const schemaRegistry$1 = Registry.as(Extensions$6.JSONContribution);
18119
+ const schemaRegistry$1 = Registry.as(Extensions$7.JSONContribution);
18120
18120
  schemaRegistry$1.registerSchema(workbenchColorsSchemaId, colorRegistry$1.getColorSchema());
18121
18121
  const delayer$1 = new editorWorkerHost.RunOnceScheduler(() => schemaRegistry$1.notifySchemaChanged(workbenchColorsSchemaId), 200);
18122
18122
  colorRegistry$1.onDidChangeSchema(() => {
@@ -23199,56 +23199,278 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
23199
23199
  function prefixedUuid(namespace) {
23200
23200
  return `${namespace}-${generateUuid()}`;
23201
23201
  }
23202
- function ensureClipboardGetsEditorSelection(e, context, logService, isFirefox2) {
23203
- const viewModel = context.viewModel;
23204
- const options = context.configuration.options;
23205
- let id = void 0;
23206
- if (logService.getLevel() === exports.LogLevel.Trace) {
23207
- id = generateUuid();
23202
+ const DataTransfers = {
23203
+ /**
23204
+ * Application specific resource transfer type
23205
+ */
23206
+ RESOURCES: "ResourceURLs",
23207
+ /**
23208
+ * Typically transfer type for copy/paste transfers.
23209
+ */
23210
+ TEXT: Mimes.text,
23211
+ /**
23212
+ * Internal type used to pass around text/uri-list data.
23213
+ *
23214
+ * This is needed to work around https://bugs.chromium.org/p/chromium/issues/detail?id=239745.
23215
+ */
23216
+ INTERNAL_URI_LIST: "application/vnd.code.uri-list"
23217
+ };
23218
+ function createStringDataTransferItem(stringOrPromise, id) {
23219
+ return {
23220
+ id,
23221
+ asString: async () => stringOrPromise,
23222
+ asFile: () => void 0,
23223
+ value: typeof stringOrPromise === "string" ? stringOrPromise : void 0
23224
+ };
23225
+ }
23226
+ function createFileDataTransferItem(fileName, uri, data, id) {
23227
+ const file = { id: generateUuid(), name: fileName, uri, data };
23228
+ return {
23229
+ id,
23230
+ asString: async () => "",
23231
+ asFile: () => file,
23232
+ value: void 0
23233
+ };
23234
+ }
23235
+ class VSDataTransfer {
23236
+ constructor() {
23237
+ this._entries = /* @__PURE__ */ new Map();
23238
+ }
23239
+ get size() {
23240
+ let size2 = 0;
23241
+ for (const _ of this._entries) {
23242
+ size2++;
23243
+ }
23244
+ return size2;
23245
+ }
23246
+ has(mimeType) {
23247
+ return this._entries.has(this.toKey(mimeType));
23248
+ }
23249
+ matches(pattern) {
23250
+ const mimes = [...this._entries.keys()];
23251
+ if (editorWorkerHost.Iterable.some(this, ([_, item]) => item.asFile())) {
23252
+ mimes.push("files");
23253
+ }
23254
+ return matchesMimeType_normalized(normalizeMimeType(pattern), mimes);
23208
23255
  }
23209
- const { dataToCopy, storedMetadata } = generateDataToCopyAndStoreInMemory(viewModel, options, id, isFirefox2);
23210
- CopyOptions.electronBugWorkaroundCopyEventHasFired = true;
23211
- e.preventDefault();
23212
- if (e.clipboardData) {
23213
- ClipboardEventUtils.setTextData(e.clipboardData, dataToCopy.text, dataToCopy.html, storedMetadata);
23256
+ get(mimeType) {
23257
+ return this._entries.get(this.toKey(mimeType))?.[0];
23214
23258
  }
23215
- logService.trace("ensureClipboardGetsEditorSelection with id : ", id, " with text.length: ", dataToCopy.text.length);
23259
+ /**
23260
+ * Add a new entry to this data transfer.
23261
+ *
23262
+ * This does not replace existing entries for `mimeType`.
23263
+ */
23264
+ append(mimeType, value) {
23265
+ const existing = this._entries.get(mimeType);
23266
+ if (existing) {
23267
+ existing.push(value);
23268
+ } else {
23269
+ this._entries.set(this.toKey(mimeType), [value]);
23270
+ }
23271
+ }
23272
+ /**
23273
+ * Set the entry for a given mime type.
23274
+ *
23275
+ * This replaces all existing entries for `mimeType`.
23276
+ */
23277
+ replace(mimeType, value) {
23278
+ this._entries.set(this.toKey(mimeType), [value]);
23279
+ }
23280
+ /**
23281
+ * Remove all entries for `mimeType`.
23282
+ */
23283
+ delete(mimeType) {
23284
+ this._entries.delete(this.toKey(mimeType));
23285
+ }
23286
+ /**
23287
+ * Iterate over all `[mime, item]` pairs in this data transfer.
23288
+ *
23289
+ * There may be multiple entries for each mime type.
23290
+ */
23291
+ *[Symbol.iterator]() {
23292
+ for (const [mine, items] of this._entries) {
23293
+ for (const item of items) {
23294
+ yield [mine, item];
23295
+ }
23296
+ }
23297
+ }
23298
+ toKey(mimeType) {
23299
+ return normalizeMimeType(mimeType);
23300
+ }
23301
+ }
23302
+ function normalizeMimeType(mimeType) {
23303
+ return mimeType.toLowerCase();
23304
+ }
23305
+ function matchesMimeType(pattern, mimeTypes) {
23306
+ return matchesMimeType_normalized(normalizeMimeType(pattern), mimeTypes.map(normalizeMimeType));
23307
+ }
23308
+ function matchesMimeType_normalized(normalizedPattern, normalizedMimeTypes) {
23309
+ if (normalizedPattern === "*/*") {
23310
+ return normalizedMimeTypes.length > 0;
23311
+ }
23312
+ if (normalizedMimeTypes.includes(normalizedPattern)) {
23313
+ return true;
23314
+ }
23315
+ const wildcard = normalizedPattern.match(/^([a-z]+)\/([a-z]+|\*)$/i);
23316
+ if (!wildcard) {
23317
+ return false;
23318
+ }
23319
+ const [_, type, subtype] = wildcard;
23320
+ if (subtype === "*") {
23321
+ return normalizedMimeTypes.some((mime) => mime.startsWith(type + "/"));
23322
+ }
23323
+ return false;
23216
23324
  }
23217
- function generateDataToCopyAndStoreInMemory(viewModel, options, id, isFirefox2) {
23218
- const emptySelectionClipboard = options.get(
23325
+ const UriList = Object.freeze({
23326
+ // http://amundsen.com/hypermedia/urilist/
23327
+ create: (entries2) => {
23328
+ return editorWorkerHost.distinct(entries2.map((x) => x.toString())).join("\r\n");
23329
+ },
23330
+ split: (str) => {
23331
+ return str.split("\r\n");
23332
+ },
23333
+ parse: (str) => {
23334
+ return UriList.split(str).filter((value) => !value.startsWith("#"));
23335
+ }
23336
+ });
23337
+ const CodeDataTransfers = {
23338
+ EDITORS: "CodeEditors",
23339
+ FILES: "CodeFiles"
23340
+ };
23341
+ class DragAndDropContributionRegistry {
23342
+ }
23343
+ const Extensions$3 = {
23344
+ DragAndDropContribution: "workbench.contributions.dragAndDrop"
23345
+ };
23346
+ Registry.add(Extensions$3.DragAndDropContribution, new DragAndDropContributionRegistry());
23347
+ const _LocalSelectionTransfer = class _LocalSelectionTransfer {
23348
+ constructor() {
23349
+ }
23350
+ static getInstance() {
23351
+ return _LocalSelectionTransfer.INSTANCE;
23352
+ }
23353
+ hasData(proto) {
23354
+ return proto && proto === this.proto;
23355
+ }
23356
+ getData(proto) {
23357
+ if (this.hasData(proto)) {
23358
+ return this.data;
23359
+ }
23360
+ return void 0;
23361
+ }
23362
+ };
23363
+ _LocalSelectionTransfer.INSTANCE = new _LocalSelectionTransfer();
23364
+ let LocalSelectionTransfer = _LocalSelectionTransfer;
23365
+ function getPathForFile(file) {
23366
+ if (editorWorkerHost.isNative && typeof globalThis.vscode?.webUtils?.getPathForFile === "function") {
23367
+ return globalThis.vscode?.webUtils?.getPathForFile(file);
23368
+ }
23369
+ return void 0;
23370
+ }
23371
+ function toVSDataTransfer(dataTransfer) {
23372
+ const vsDataTransfer = new VSDataTransfer();
23373
+ for (const item of dataTransfer.items) {
23374
+ const type = item.type;
23375
+ if (item.kind === "string") {
23376
+ const asStringValue = new Promise((resolve2) => item.getAsString(resolve2));
23377
+ vsDataTransfer.append(type, createStringDataTransferItem(asStringValue));
23378
+ } else if (item.kind === "file") {
23379
+ const file = item.getAsFile();
23380
+ if (file) {
23381
+ vsDataTransfer.append(type, createFileDataTransferItemFromFile(file));
23382
+ }
23383
+ }
23384
+ }
23385
+ return vsDataTransfer;
23386
+ }
23387
+ function createFileDataTransferItemFromFile(file) {
23388
+ const path = getPathForFile(file);
23389
+ const uri = path ? editorWorkerHost.URI.parse(path) : void 0;
23390
+ return createFileDataTransferItem(file.name, uri, async () => {
23391
+ return new Uint8Array(await file.arrayBuffer());
23392
+ });
23393
+ }
23394
+ const INTERNAL_DND_MIME_TYPES = Object.freeze([
23395
+ CodeDataTransfers.EDITORS,
23396
+ CodeDataTransfers.FILES,
23397
+ DataTransfers.RESOURCES,
23398
+ DataTransfers.INTERNAL_URI_LIST
23399
+ ]);
23400
+ function toExternalVSDataTransfer(sourceDataTransfer, overwriteUriList = false) {
23401
+ const vsDataTransfer = toVSDataTransfer(sourceDataTransfer);
23402
+ const uriList = vsDataTransfer.get(DataTransfers.INTERNAL_URI_LIST);
23403
+ if (uriList) {
23404
+ vsDataTransfer.replace(Mimes.uriList, uriList);
23405
+ } else {
23406
+ if (overwriteUriList || !vsDataTransfer.has(Mimes.uriList)) {
23407
+ const editorData = [];
23408
+ for (const item of sourceDataTransfer.items) {
23409
+ const file = item.getAsFile();
23410
+ if (file) {
23411
+ const path = getPathForFile(file);
23412
+ try {
23413
+ if (path) {
23414
+ editorData.push(editorWorkerHost.URI.file(path).toString());
23415
+ } else {
23416
+ editorData.push(editorWorkerHost.URI.parse(file.name, true).toString());
23417
+ }
23418
+ } catch {
23419
+ }
23420
+ }
23421
+ }
23422
+ if (editorData.length) {
23423
+ vsDataTransfer.replace(Mimes.uriList, createStringDataTransferItem(UriList.create(editorData)));
23424
+ }
23425
+ }
23426
+ }
23427
+ for (const internal of INTERNAL_DND_MIME_TYPES) {
23428
+ vsDataTransfer.delete(internal);
23429
+ }
23430
+ return vsDataTransfer;
23431
+ }
23432
+ function generateDataToCopyAndStoreInMemory(viewModel, id, isFirefox2) {
23433
+ const { dataToCopy, metadata } = generateDataToCopy(viewModel);
23434
+ storeMetadataInMemory(dataToCopy.text, metadata, isFirefox2);
23435
+ return { dataToCopy, metadata };
23436
+ }
23437
+ function storeMetadataInMemory(textToCopy, metadata, isFirefox2) {
23438
+ InMemoryClipboardMetadataManager.INSTANCE.set(
23439
+ // When writing "LINE\r\n" to the clipboard and then pasting,
23440
+ // Firefox pastes "LINE\n", so let's work around this quirk
23441
+ isFirefox2 ? textToCopy.replace(/\r\n/g, "\n") : textToCopy,
23442
+ metadata
23443
+ );
23444
+ }
23445
+ function generateDataToCopy(viewModel) {
23446
+ const emptySelectionClipboard = viewModel.getEditorOption(
23219
23447
  45
23220
23448
  /* EditorOption.emptySelectionClipboard */
23221
23449
  );
23222
- const copyWithSyntaxHighlighting = options.get(
23450
+ const copyWithSyntaxHighlighting = viewModel.getEditorOption(
23223
23451
  31
23224
23452
  /* EditorOption.copyWithSyntaxHighlighting */
23225
23453
  );
23226
23454
  const selections = viewModel.getCursorStates().map((cursorState) => cursorState.modelState.selection);
23227
23455
  const dataToCopy = getDataToCopy(viewModel, selections, emptySelectionClipboard, copyWithSyntaxHighlighting);
23228
- const storedMetadata = {
23456
+ const metadata = {
23229
23457
  version: 1,
23230
- id,
23458
+ id: generateUuid(),
23231
23459
  isFromEmptySelection: dataToCopy.isFromEmptySelection,
23232
23460
  multicursorText: dataToCopy.multicursorText,
23233
23461
  mode: dataToCopy.mode
23234
23462
  };
23235
- InMemoryClipboardMetadataManager.INSTANCE.set(
23236
- // When writing "LINE\r\n" to the clipboard and then pasting,
23237
- // Firefox pastes "LINE\n", so let's work around this quirk
23238
- isFirefox2 ? dataToCopy.text.replace(/\r\n/g, "\n") : dataToCopy.text,
23239
- storedMetadata
23240
- );
23241
- return { dataToCopy, storedMetadata };
23463
+ return { dataToCopy, metadata };
23242
23464
  }
23243
23465
  function getDataToCopy(viewModel, modelSelections, emptySelectionClipboard, copyWithSyntaxHighlighting) {
23244
- const rawTextToCopy = viewModel.getPlainTextToCopy(modelSelections, emptySelectionClipboard, editorWorkerHost.isWindows);
23466
+ const { sourceRanges, sourceText } = viewModel.getPlainTextToCopy(modelSelections, emptySelectionClipboard, editorWorkerHost.isWindows);
23245
23467
  const newLineCharacter = viewModel.model.getEOL();
23246
23468
  const isFromEmptySelection = emptySelectionClipboard && modelSelections.length === 1 && modelSelections[0].isEmpty();
23247
- const multicursorText = Array.isArray(rawTextToCopy) ? rawTextToCopy : null;
23248
- const text2 = Array.isArray(rawTextToCopy) ? rawTextToCopy.join(newLineCharacter) : rawTextToCopy;
23469
+ const multicursorText = Array.isArray(sourceText) ? sourceText : null;
23470
+ const text2 = Array.isArray(sourceText) ? sourceText.join(newLineCharacter) : sourceText;
23249
23471
  let html2 = void 0;
23250
23472
  let mode = null;
23251
- if (CopyOptions.forceCopyWithSyntaxHighlighting || copyWithSyntaxHighlighting && text2.length < 65536) {
23473
+ if (CopyOptions.forceCopyWithSyntaxHighlighting || copyWithSyntaxHighlighting && sourceText.length < 65536) {
23252
23474
  const richText = viewModel.getRichTextToCopy(modelSelections, emptySelectionClipboard);
23253
23475
  if (richText) {
23254
23476
  html2 = richText.html;
@@ -23257,6 +23479,7 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
23257
23479
  }
23258
23480
  const dataToCopy = {
23259
23481
  isFromEmptySelection,
23482
+ sourceRanges,
23260
23483
  multicursorText,
23261
23484
  text: text2,
23262
23485
  html: html2,
@@ -23313,6 +23536,62 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
23313
23536
  clipboardData.setData("vscode-editor-data", JSON.stringify(metadata));
23314
23537
  }
23315
23538
  };
23539
+ function createClipboardCopyEvent(e, isCut, context, logService, isFirefox2) {
23540
+ const { dataToCopy, metadata } = generateDataToCopy(context.viewModel);
23541
+ let handled = false;
23542
+ return {
23543
+ isCut,
23544
+ clipboardData: {
23545
+ setData: (type, value) => {
23546
+ e.clipboardData?.setData(type, value);
23547
+ }
23548
+ },
23549
+ dataToCopy,
23550
+ ensureClipboardGetsEditorData: () => {
23551
+ e.preventDefault();
23552
+ if (e.clipboardData) {
23553
+ ClipboardEventUtils.setTextData(e.clipboardData, dataToCopy.text, dataToCopy.html, metadata);
23554
+ }
23555
+ storeMetadataInMemory(dataToCopy.text, metadata, isFirefox2);
23556
+ logService.trace("ensureClipboardGetsEditorSelection with id : ", metadata.id, " with text.length: ", dataToCopy.text.length);
23557
+ },
23558
+ setHandled: () => {
23559
+ handled = true;
23560
+ e.preventDefault();
23561
+ e.stopImmediatePropagation();
23562
+ },
23563
+ get isHandled() {
23564
+ return handled;
23565
+ }
23566
+ };
23567
+ }
23568
+ function createClipboardPasteEvent(e) {
23569
+ let handled = false;
23570
+ let [text2, metadata] = e.clipboardData ? ClipboardEventUtils.getTextData(e.clipboardData) : ["", null];
23571
+ metadata = metadata || InMemoryClipboardMetadataManager.INSTANCE.get(text2);
23572
+ return {
23573
+ clipboardData: createReadableClipboardData(e.clipboardData),
23574
+ metadata,
23575
+ text: text2,
23576
+ toExternalVSDataTransfer: () => e.clipboardData ? toExternalVSDataTransfer(e.clipboardData) : void 0,
23577
+ browserEvent: e,
23578
+ setHandled: () => {
23579
+ handled = true;
23580
+ e.preventDefault();
23581
+ e.stopImmediatePropagation();
23582
+ },
23583
+ get isHandled() {
23584
+ return handled;
23585
+ }
23586
+ };
23587
+ }
23588
+ function createReadableClipboardData(dataTransfer) {
23589
+ return {
23590
+ types: Array.from(dataTransfer?.types ?? []),
23591
+ files: Array.prototype.slice.call(dataTransfer?.files ?? [], 0),
23592
+ getData: (type) => dataTransfer?.getData(type) ?? ""
23593
+ };
23594
+ }
23316
23595
  const _TextAreaState = class _TextAreaState {
23317
23596
  constructor(value, selectionStart, selectionEnd, selection, newlineCountBeforeSelection) {
23318
23597
  this.value = value;
@@ -23522,6 +23801,12 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
23522
23801
  this.onCut = this._onCut.event;
23523
23802
  this._onPaste = this._register(new editorWorkerHost.Emitter());
23524
23803
  this.onPaste = this._onPaste.event;
23804
+ this._onWillCopy = this._register(new editorWorkerHost.Emitter());
23805
+ this.onWillCopy = this._onWillCopy.event;
23806
+ this._onWillCut = this._register(new editorWorkerHost.Emitter());
23807
+ this.onWillCut = this._onWillCut.event;
23808
+ this._onWillPaste = this._register(new editorWorkerHost.Emitter());
23809
+ this.onWillPaste = this._onWillPaste.event;
23525
23810
  this._onType = this._register(new editorWorkerHost.Emitter());
23526
23811
  this.onType = this._onType.event;
23527
23812
  this._onCompositionStart = this._register(new editorWorkerHost.Emitter());
@@ -23657,35 +23942,56 @@ define("vs/editor-V-thM4Kh", ["require", "exports", "./editorWorkerHost--0eDLpc-
23657
23942
  }));
23658
23943
  this._register(this._textArea.onCut((e) => {
23659
23944
  this._logService.trace(`TextAreaInput#onCut`, e);
23660
- this._textArea.setIgnoreSelectionChangeTime("received cut event");
23661
- if (this._host.context) {
23662
- ensureClipboardGetsEditorSelection(e, this._host.context, this._logService, this._browser.isFirefox);
23945
+ const cutEvent = createClipboardCopyEvent(
23946
+ e,
23947
+ /* isCut */
23948
+ true,
23949
+ this._host.context,
23950
+ this._logService,
23951
+ this._browser.isFirefox
23952
+ );
23953
+ this._onWillCut.fire(cutEvent);
23954
+ if (cutEvent.isHandled) {
23955
+ return;
23663
23956
  }
23957
+ this._textArea.setIgnoreSelectionChangeTime("received cut event");
23958
+ cutEvent.ensureClipboardGetsEditorData();
23664
23959
  this._asyncTriggerCut.schedule();
23665
23960
  }));
23666
23961
  this._register(this._textArea.onCopy((e) => {
23667
23962
  this._logService.trace(`TextAreaInput#onCopy`, e);
23668
- if (this._host.context) {
23669
- ensureClipboardGetsEditorSelection(e, this._host.context, this._logService, this._browser.isFirefox);
23963
+ CopyOptions.electronBugWorkaroundCopyEventHasFired = true;
23964
+ const copyEvent = createClipboardCopyEvent(
23965
+ e,
23966
+ /* isCut */
23967
+ false,
23968
+ this._host.context,
23969
+ this._logService,
23970
+ this._browser.isFirefox
23971
+ );
23972
+ this._onWillCopy.fire(copyEvent);
23973
+ if (copyEvent.isHandled) {
23974
+ return;
23670
23975
  }
23976
+ copyEvent.ensureClipboardGetsEditorData();
23671
23977
  }));
23672
23978
  this._register(this._textArea.onPaste((e) => {
23673
23979
  this._logService.trace(`TextAreaInput#onPaste`, e);
23674
- this._textArea.setIgnoreSelectionChangeTime("received paste event");
23675
- e.preventDefault();
23676
- if (!e.clipboardData) {
23980
+ const pasteEvent = createClipboardPasteEvent(e);
23981
+ this._onWillPaste.fire(pasteEvent);
23982
+ if (pasteEvent.isHandled) {
23677
23983
  return;
23678
23984
  }
23679
- let [text2, metadata] = ClipboardEventUtils.getTextData(e.clipboardData);
23680
- this._logService.trace(`TextAreaInput#onPaste with id : `, metadata?.id, " with text.length: ", text2.length);
23681
- if (!text2) {
23985
+ this._textArea.setIgnoreSelectionChangeTime("received paste event");
23986
+ e.preventDefault();
23987
+ this._logService.trace(`TextAreaInput#onPaste with id : `, pasteEvent.metadata?.id, " with text.length: ", pasteEvent.text.length);
23988
+ if (!pasteEvent.text) {
23682
23989
  return;
23683
23990
  }
23684
- metadata = metadata || InMemoryClipboardMetadataManager.INSTANCE.get(text2);
23685
23991
  this._logService.trace(`TextAreaInput#onPaste (before onPaste)`);
23686
23992
  this._onPaste.fire({
23687
- text: text2,
23688
- metadata
23993
+ text: pasteEvent.text,
23994
+ metadata: pasteEvent.metadata
23689
23995
  });
23690
23996
  }));
23691
23997
  this._register(this._textArea.onFocus(() => {
@@ -42333,6 +42639,15 @@ struct VSOutput {
42333
42639
  const IME = new IMEImpl();
42334
42640
  const IKeybindingService = createDecorator("keybindingService");
42335
42641
  class AbstractEditContext extends ViewPart {
42642
+ constructor() {
42643
+ super(...arguments);
42644
+ this._onWillCopy = this._register(new editorWorkerHost.Emitter());
42645
+ this.onWillCopy = this._onWillCopy.event;
42646
+ this._onWillCut = this._register(new editorWorkerHost.Emitter());
42647
+ this.onWillCut = this._onWillCut.event;
42648
+ this._onWillPaste = this._register(new editorWorkerHost.Emitter());
42649
+ this.onWillPaste = this._onWillPaste.event;
42650
+ }
42336
42651
  }
42337
42652
  class SimplePagedScreenReaderStrategy {
42338
42653
  _getPageOfLine(lineNumber, linesPerPage) {
@@ -42534,7 +42849,6 @@ struct VSOutput {
42534
42849
  super(context);
42535
42850
  this._keybindingService = _keybindingService;
42536
42851
  this._instantiationService = _instantiationService;
42537
- this._scheduledRender = null;
42538
42852
  this._primaryCursorPosition = new editorWorkerHost.Position(1, 1);
42539
42853
  this._primaryCursorVisibleRange = null;
42540
42854
  this._viewController = viewController;
@@ -42663,6 +42977,9 @@ struct VSOutput {
42663
42977
  isFirefox,
42664
42978
  isSafari
42665
42979
  }));
42980
+ this._register(this._textAreaInput.onWillCopy((e) => this._onWillCopy.fire(e)));
42981
+ this._register(this._textAreaInput.onWillCut((e) => this._onWillCut.fire(e)));
42982
+ this._register(this._textAreaInput.onWillPaste((e) => this._onWillPaste.fire(e)));
42666
42983
  this._register(this._textAreaInput.onKeyDown((e) => {
42667
42984
  this._viewController.emitKeyDown(e);
42668
42985
  }));
@@ -42770,8 +43087,6 @@ struct VSOutput {
42770
43087
  this._textAreaInput.writeNativeTextAreaContent(reason);
42771
43088
  }
42772
43089
  dispose() {
42773
- this._scheduledRender?.dispose();
42774
- this._scheduledRender = null;
42775
43090
  super.dispose();
42776
43091
  this.textArea.domNode.remove();
42777
43092
  this.textAreaCover.domNode.remove();
@@ -43002,18 +43317,7 @@ struct VSOutput {
43002
43317
  }
43003
43318
  render(ctx) {
43004
43319
  this._textAreaInput.writeNativeTextAreaContent("render");
43005
- this._scheduleRender();
43006
- }
43007
- // Delay expensive DOM updates until the next animation frame to reduce reflow pressure.
43008
- _scheduleRender() {
43009
- if (this._scheduledRender) {
43010
- return;
43011
- }
43012
- const targetWindow = getWindow(this.textArea.domNode);
43013
- this._scheduledRender = scheduleAtNextAnimationFrame(targetWindow, () => {
43014
- this._scheduledRender = null;
43015
- this._render();
43016
- });
43320
+ this._render();
43017
43321
  }
43018
43322
  _render() {
43019
43323
  if (this._visibleTextArea) {
@@ -44372,12 +44676,37 @@ struct VSOutput {
44372
44676
  this._screenReaderSupport = this._register(instantiationService.createInstance(ScreenReaderSupport, this.domNode, context, this._viewController));
44373
44677
  this._register(addDisposableListener(this.domNode.domNode, "copy", (e) => {
44374
44678
  this.logService.trace("NativeEditContext#copy");
44375
- ensureClipboardGetsEditorSelection(e, this._context, this.logService, isFirefox);
44679
+ CopyOptions.electronBugWorkaroundCopyEventHasFired = true;
44680
+ const copyEvent = createClipboardCopyEvent(
44681
+ e,
44682
+ /* isCut */
44683
+ false,
44684
+ this._context,
44685
+ this.logService,
44686
+ isFirefox
44687
+ );
44688
+ this._onWillCopy.fire(copyEvent);
44689
+ if (copyEvent.isHandled) {
44690
+ return;
44691
+ }
44692
+ copyEvent.ensureClipboardGetsEditorData();
44376
44693
  }));
44377
44694
  this._register(addDisposableListener(this.domNode.domNode, "cut", (e) => {
44378
44695
  this.logService.trace("NativeEditContext#cut");
44696
+ const cutEvent = createClipboardCopyEvent(
44697
+ e,
44698
+ /* isCut */
44699
+ true,
44700
+ this._context,
44701
+ this.logService,
44702
+ isFirefox
44703
+ );
44704
+ this._onWillCut.fire(cutEvent);
44705
+ if (cutEvent.isHandled) {
44706
+ return;
44707
+ }
44379
44708
  this._screenReaderSupport.onWillCut();
44380
- ensureClipboardGetsEditorSelection(e, this._context, this.logService, isFirefox);
44709
+ cutEvent.ensureClipboardGetsEditorData();
44381
44710
  this.logService.trace("NativeEditContext#cut (before viewController.cut)");
44382
44711
  this._viewController.cut();
44383
44712
  }));
@@ -44396,31 +44725,35 @@ struct VSOutput {
44396
44725
  }));
44397
44726
  this._register(addDisposableListener(this.domNode.domNode, "paste", (e) => {
44398
44727
  this.logService.trace("NativeEditContext#paste");
44728
+ const pasteEvent = createClipboardPasteEvent(e);
44729
+ this._onWillPaste.fire(pasteEvent);
44730
+ if (pasteEvent.isHandled) {
44731
+ e.preventDefault();
44732
+ return;
44733
+ }
44399
44734
  e.preventDefault();
44400
44735
  if (!e.clipboardData) {
44401
44736
  return;
44402
44737
  }
44403
- let [text2, metadata] = ClipboardEventUtils.getTextData(e.clipboardData);
44404
- this.logService.trace("NativeEditContext#paste with id : ", metadata?.id, " with text.length: ", text2.length);
44405
- if (!text2) {
44738
+ this.logService.trace("NativeEditContext#paste with id : ", pasteEvent.metadata?.id, " with text.length: ", pasteEvent.text.length);
44739
+ if (!pasteEvent.text) {
44406
44740
  return;
44407
44741
  }
44408
- metadata = metadata || InMemoryClipboardMetadataManager.INSTANCE.get(text2);
44409
44742
  let pasteOnNewLine = false;
44410
44743
  let multicursorText = null;
44411
44744
  let mode = null;
44412
- if (metadata) {
44745
+ if (pasteEvent.metadata) {
44413
44746
  const options = this._context.configuration.options;
44414
44747
  const emptySelectionClipboard = options.get(
44415
44748
  45
44416
44749
  /* EditorOption.emptySelectionClipboard */
44417
44750
  );
44418
- pasteOnNewLine = emptySelectionClipboard && !!metadata.isFromEmptySelection;
44419
- multicursorText = typeof metadata.multicursorText !== "undefined" ? metadata.multicursorText : null;
44420
- mode = metadata.mode;
44751
+ pasteOnNewLine = emptySelectionClipboard && !!pasteEvent.metadata.isFromEmptySelection;
44752
+ multicursorText = typeof pasteEvent.metadata.multicursorText !== "undefined" ? pasteEvent.metadata.multicursorText : null;
44753
+ mode = pasteEvent.metadata.mode;
44421
44754
  }
44422
44755
  this.logService.trace("NativeEditContext#paste (before viewController.paste)");
44423
- this._viewController.paste(text2, pasteOnNewLine, multicursorText, mode);
44756
+ this._viewController.paste(pasteEvent.text, pasteOnNewLine, multicursorText, mode);
44424
44757
  }));
44425
44758
  this._register(editContextAddDisposableListener(this._editContext, "textformatupdate", (e) => this._handleTextFormatUpdate(e)));
44426
44759
  this._register(editContextAddDisposableListener(this._editContext, "characterboundsupdate", (e) => this._updateCharacterBounds(e)));
@@ -44480,8 +44813,6 @@ struct VSOutput {
44480
44813
  this.domNode.domNode.blur();
44481
44814
  this.domNode.domNode.remove();
44482
44815
  this._imeTextArea.domNode.remove();
44483
- this._selectionAndControlBoundsUpdateDisposable?.dispose();
44484
- this._selectionAndControlBoundsUpdateDisposable = void 0;
44485
44816
  super.dispose();
44486
44817
  }
44487
44818
  setAriaOptions(options) {
@@ -44545,15 +44876,15 @@ struct VSOutput {
44545
44876
  onZonesChanged(e) {
44546
44877
  return true;
44547
44878
  }
44548
- onWillPaste() {
44549
- this.logService.trace("NativeEditContext#onWillPaste");
44550
- this._onWillPaste();
44879
+ handleWillPaste() {
44880
+ this.logService.trace("NativeEditContext#handleWillPaste");
44881
+ this._prepareScreenReaderForPaste();
44551
44882
  }
44552
- _onWillPaste() {
44883
+ _prepareScreenReaderForPaste() {
44553
44884
  this._screenReaderSupport.onWillPaste();
44554
44885
  }
44555
- onWillCopy() {
44556
- this.logService.trace("NativeEditContext#onWillCopy");
44886
+ handleWillCopy() {
44887
+ this.logService.trace("NativeEditContext#handleWillCopy");
44557
44888
  this.logService.trace("NativeEditContext#isFocused : ", this.domNode.domNode === getActiveElement());
44558
44889
  }
44559
44890
  writeScreenReaderContent() {
@@ -44721,16 +45052,6 @@ struct VSOutput {
44721
45052
  }
44722
45053
  }
44723
45054
  _updateSelectionAndControlBoundsAfterRender() {
44724
- if (this._selectionAndControlBoundsUpdateDisposable) {
44725
- return;
44726
- }
44727
- const targetWindow = getWindow(this.domNode.domNode);
44728
- this._selectionAndControlBoundsUpdateDisposable = scheduleAtNextAnimationFrame(targetWindow, () => {
44729
- this._selectionAndControlBoundsUpdateDisposable = void 0;
44730
- this._applySelectionAndControlBounds();
44731
- });
44732
- }
44733
- _applySelectionAndControlBounds() {
44734
45055
  const options = this._context.configuration.options;
44735
45056
  const contentLeft = options.get(
44736
45057
  165
@@ -44935,6 +45256,13 @@ struct VSOutput {
44935
45256
  constructor(editorContainer, ownerID, commandDelegate, configuration, colorTheme, model, userInputEvents, overflowWidgetsDomNode, _instantiationService) {
44936
45257
  super();
44937
45258
  this._instantiationService = _instantiationService;
45259
+ this._editContextClipboardListeners = new editorWorkerHost.DisposableStore();
45260
+ this._onWillCopy = this._register(new editorWorkerHost.Emitter());
45261
+ this.onWillCopy = this._onWillCopy.event;
45262
+ this._onWillCut = this._register(new editorWorkerHost.Emitter());
45263
+ this.onWillCut = this._onWillCut.event;
45264
+ this._onWillPaste = this._register(new editorWorkerHost.Emitter());
45265
+ this.onWillPaste = this._onWillPaste.event;
44938
45266
  this._shouldRecomputeGlyphMarginLanes = false;
44939
45267
  this._ownerID = ownerID;
44940
45268
  this._widgetFocusTracker = this._register(new CodeEditorWidgetFocusTracker(editorContainer, overflowWidgetsDomNode));
@@ -44963,6 +45291,7 @@ struct VSOutput {
44963
45291
  /* EditorOption.accessibilitySupport */
44964
45292
  );
44965
45293
  this._editContext = this._instantiateEditContext();
45294
+ this._connectEditContextClipboardEvents();
44966
45295
  this._viewParts.push(this._editContext);
44967
45296
  this._linesContent = createFastDomNode(document.createElement("div"));
44968
45297
  this._linesContent.setClassName("lines-content monaco-editor-background");
@@ -45084,6 +45413,7 @@ struct VSOutput {
45084
45413
  const indexOfEditContext = this._viewParts.indexOf(this._editContext);
45085
45414
  this._editContext.dispose();
45086
45415
  this._editContext = this._instantiateEditContext();
45416
+ this._connectEditContextClipboardEvents();
45087
45417
  if (isEditContextFocused) {
45088
45418
  this._editContext.focus();
45089
45419
  }
@@ -45091,6 +45421,12 @@ struct VSOutput {
45091
45421
  this._viewParts.splice(indexOfEditContext, 1, this._editContext);
45092
45422
  }
45093
45423
  }
45424
+ _connectEditContextClipboardEvents() {
45425
+ this._editContextClipboardListeners.clear();
45426
+ this._editContextClipboardListeners.add(this._editContext.onWillCopy((e) => this._onWillCopy.fire(e)));
45427
+ this._editContextClipboardListeners.add(this._editContext.onWillCut((e) => this._onWillCut.fire(e)));
45428
+ this._editContextClipboardListeners.add(this._editContext.onWillPaste((e) => this._onWillPaste.fire(e)));
45429
+ }
45094
45430
  _computeGlyphMarginLanes() {
45095
45431
  const model = this._context.viewModel.model;
45096
45432
  const laneModel = this._context.viewModel.glyphLanes;
@@ -45228,6 +45564,7 @@ struct VSOutput {
45228
45564
  this._renderAnimationFrame.dispose();
45229
45565
  this._renderAnimationFrame = null;
45230
45566
  }
45567
+ this._editContextClipboardListeners.dispose();
45231
45568
  this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove();
45232
45569
  this._overlayWidgets.overflowingOverlayWidgetsDomNode.domNode.remove();
45233
45570
  this._context.removeEventHandler(this);
@@ -49172,7 +49509,7 @@ struct VSOutput {
49172
49509
  this.colorizationOptions = this.textModel.getOptions().bracketPairColorizationOptions;
49173
49510
  }
49174
49511
  //#endregion
49175
- getDecorationsInRange(range, ownerId2, filterOutValidation, onlyMinimapDecorations) {
49512
+ getDecorationsInRange(range, ownerId2, filterOutValidation, filterFontDecorations2, onlyMinimapDecorations) {
49176
49513
  if (onlyMinimapDecorations) {
49177
49514
  return [];
49178
49515
  }
@@ -49193,14 +49530,14 @@ struct VSOutput {
49193
49530
  })).toArray();
49194
49531
  return result;
49195
49532
  }
49196
- getAllDecorations(ownerId2, filterOutValidation) {
49533
+ getAllDecorations(ownerId2, filterOutValidation, filterFontDecorations2) {
49197
49534
  if (ownerId2 === void 0) {
49198
49535
  return [];
49199
49536
  }
49200
49537
  if (!this.colorizationOptions.enabled) {
49201
49538
  return [];
49202
49539
  }
49203
- return this.getDecorationsInRange(new editorWorkerHost.Range(1, 1, this.textModel.getLineCount(), 1), ownerId2, filterOutValidation);
49540
+ return this.getDecorationsInRange(new editorWorkerHost.Range(1, 1, this.textModel.getLineCount(), 1), ownerId2, filterOutValidation, filterFontDecorations2);
49204
49541
  }
49205
49542
  }
49206
49543
  class ColorProvider {
@@ -53794,29 +54131,33 @@ struct VSOutput {
53794
54131
  this._onDidChangeLineHeight.fire(affectedLineHeights);
53795
54132
  this._onDidChangeFont.fire(affectedLineFonts);
53796
54133
  }
53797
- getDecorationsInRange(range, ownerId2, filterOutValidation, onlyMinimapDecorations) {
54134
+ getDecorationsInRange(range, ownerId2, filterOutValidation, filterFontDecorations2, onlyMinimapDecorations) {
53798
54135
  const startOffsetOfRange = this.textModel.getOffsetAt(range.getStartPosition());
53799
54136
  const endOffsetOfRange = this.textModel.getOffsetAt(range.getEndPosition());
53800
54137
  const annotations = this._fontAnnotatedString.getAnnotationsIntersecting(new editorWorkerHost.OffsetRange(startOffsetOfRange, endOffsetOfRange));
53801
54138
  const decorations = [];
53802
54139
  for (const annotation of annotations) {
53803
- const annotationStartPosition = this.textModel.getPositionAt(annotation.range.start);
53804
- const annotationEndPosition = this.textModel.getPositionAt(annotation.range.endExclusive);
53805
- const range2 = editorWorkerHost.Range.fromPositions(annotationStartPosition, annotationEndPosition);
53806
54140
  const anno = annotation.annotation;
53807
- const className2 = classNameForFontTokenDecorations(anno.fontToken.fontFamily ?? "", anno.fontToken.fontSizeMultiplier ?? 0);
53808
54141
  const affectsFont = !!(anno.fontToken.fontFamily || anno.fontToken.fontSizeMultiplier);
53809
- const id = anno.decorationId;
53810
- decorations.push({
53811
- id,
53812
- options: {
53813
- description: "FontOptionDecoration",
53814
- inlineClassName: className2,
53815
- affectsFont
53816
- },
53817
- ownerId: 0,
53818
- range: range2
53819
- });
54142
+ if (!(affectsFont && filterFontDecorations2)) {
54143
+ const annotationStartPosition = this.textModel.getPositionAt(annotation.range.start);
54144
+ const annotationEndPosition = this.textModel.getPositionAt(annotation.range.endExclusive);
54145
+ const range2 = editorWorkerHost.Range.fromPositions(annotationStartPosition, annotationEndPosition);
54146
+ const anno2 = annotation.annotation;
54147
+ const className2 = classNameForFontTokenDecorations(anno2.fontToken.fontFamily ?? "", anno2.fontToken.fontSizeMultiplier ?? 0);
54148
+ const id = anno2.decorationId;
54149
+ decorations.push({
54150
+ id,
54151
+ options: {
54152
+ description: "FontOptionDecoration",
54153
+ inlineClassName: className2,
54154
+ lineHeight: anno2.fontToken.lineHeightMultiplier,
54155
+ affectsFont
54156
+ },
54157
+ ownerId: 0,
54158
+ range: range2
54159
+ });
54160
+ }
53820
54161
  }
53821
54162
  return decorations;
53822
54163
  }
@@ -58118,15 +58459,15 @@ struct VSOutput {
58118
58459
  const endColumn = this.getLineMaxColumn(endLineNumber);
58119
58460
  const range = new editorWorkerHost.Range(startLineNumber, 1, endLineNumber, endColumn);
58120
58461
  const decorations = this._getDecorationsInRange(range, ownerId2, filterOutValidation, filterFontDecorations2, onlyMarginDecorations);
58121
- editorWorkerHost.pushMany(decorations, this._decorationProvider.getDecorationsInRange(range, ownerId2, filterOutValidation));
58122
- editorWorkerHost.pushMany(decorations, this._fontTokenDecorationsProvider.getDecorationsInRange(range, ownerId2, filterOutValidation));
58462
+ editorWorkerHost.pushMany(decorations, this._decorationProvider.getDecorationsInRange(range, ownerId2, filterOutValidation, filterFontDecorations2));
58463
+ editorWorkerHost.pushMany(decorations, this._fontTokenDecorationsProvider.getDecorationsInRange(range, ownerId2, filterOutValidation, filterFontDecorations2));
58123
58464
  return decorations;
58124
58465
  }
58125
58466
  getDecorationsInRange(range, ownerId2 = 0, filterOutValidation = false, filterFontDecorations2 = false, onlyMinimapDecorations = false, onlyMarginDecorations = false) {
58126
58467
  const validatedRange = this.validateRange(range);
58127
58468
  const decorations = this._getDecorationsInRange(validatedRange, ownerId2, filterOutValidation, filterFontDecorations2, onlyMarginDecorations);
58128
- editorWorkerHost.pushMany(decorations, this._decorationProvider.getDecorationsInRange(validatedRange, ownerId2, filterOutValidation, onlyMinimapDecorations));
58129
- editorWorkerHost.pushMany(decorations, this._fontTokenDecorationsProvider.getDecorationsInRange(validatedRange, ownerId2, filterOutValidation, onlyMinimapDecorations));
58469
+ editorWorkerHost.pushMany(decorations, this._decorationProvider.getDecorationsInRange(validatedRange, ownerId2, filterOutValidation, filterFontDecorations2, onlyMinimapDecorations));
58470
+ editorWorkerHost.pushMany(decorations, this._fontTokenDecorationsProvider.getDecorationsInRange(validatedRange, ownerId2, filterOutValidation, filterFontDecorations2, onlyMinimapDecorations));
58130
58471
  return decorations;
58131
58472
  }
58132
58473
  getOverviewRulerDecorations(ownerId2 = 0, filterOutValidation = false, filterFontDecorations2 = false) {
@@ -62540,10 +62881,11 @@ struct VSOutput {
62540
62881
  const decorationsInViewport = [];
62541
62882
  let decorationsInViewportLen = 0;
62542
62883
  const inlineDecorations = [];
62884
+ const hasVariableFonts = [];
62543
62885
  for (let j = startLineNumber; j <= endLineNumber; j++) {
62544
62886
  inlineDecorations[j - startLineNumber] = [];
62887
+ hasVariableFonts[j - startLineNumber] = false;
62545
62888
  }
62546
- let hasVariableFonts = false;
62547
62889
  for (let i = 0, len = modelDecorations.length; i < len; i++) {
62548
62890
  const modelDecoration = modelDecorations[i];
62549
62891
  const decorationOptions = modelDecoration.options;
@@ -62564,6 +62906,9 @@ struct VSOutput {
62564
62906
  const intersectedEndLineNumber = Math.min(endLineNumber, viewRange2.endLineNumber);
62565
62907
  for (let j = intersectedStartLineNumber; j <= intersectedEndLineNumber; j++) {
62566
62908
  inlineDecorations[j - startLineNumber].push(inlineDecoration);
62909
+ if (decorationOptions.affectsFont) {
62910
+ hasVariableFonts[j - startLineNumber] = true;
62911
+ }
62567
62912
  }
62568
62913
  }
62569
62914
  if (decorationOptions.beforeContentClassName) {
@@ -62575,6 +62920,9 @@ struct VSOutput {
62575
62920
  /* InlineDecorationType.Before */
62576
62921
  );
62577
62922
  inlineDecorations[viewRange2.startLineNumber - startLineNumber].push(inlineDecoration);
62923
+ if (decorationOptions.affectsFont) {
62924
+ hasVariableFonts[viewRange2.startLineNumber - startLineNumber] = true;
62925
+ }
62578
62926
  }
62579
62927
  }
62580
62928
  if (decorationOptions.afterContentClassName) {
@@ -62586,11 +62934,11 @@ struct VSOutput {
62586
62934
  /* InlineDecorationType.After */
62587
62935
  );
62588
62936
  inlineDecorations[viewRange2.endLineNumber - startLineNumber].push(inlineDecoration);
62937
+ if (decorationOptions.affectsFont) {
62938
+ hasVariableFonts[viewRange2.endLineNumber - startLineNumber] = true;
62939
+ }
62589
62940
  }
62590
62941
  }
62591
- if (decorationOptions.affectsFont) {
62592
- hasVariableFonts = true;
62593
- }
62594
62942
  }
62595
62943
  return {
62596
62944
  decorations: decorationsInViewport,
@@ -63969,6 +64317,9 @@ struct VSOutput {
63969
64317
  this._viewportStart.dispose();
63970
64318
  this._eventDispatcher.dispose();
63971
64319
  }
64320
+ getEditorOption(id) {
64321
+ return this._configuration.options.get(id);
64322
+ }
63972
64323
  createLineBreaksComputer() {
63973
64324
  return this._lines.createLineBreaksComputer();
63974
64325
  }
@@ -63986,6 +64337,10 @@ struct VSOutput {
63986
64337
  if (!allowVariableLineHeights) {
63987
64338
  return [];
63988
64339
  }
64340
+ const defaultLineHeight = this._configuration.options.get(
64341
+ 75
64342
+ /* EditorOption.lineHeight */
64343
+ );
63989
64344
  const decorations = this.model.getCustomLineHeightsDecorations(this._editorId);
63990
64345
  return decorations.map((d) => {
63991
64346
  const lineNumber = d.range.startLineNumber;
@@ -63994,7 +64349,7 @@ struct VSOutput {
63994
64349
  decorationId: d.id,
63995
64350
  startLineNumber: viewRange.startLineNumber,
63996
64351
  endLineNumber: viewRange.endLineNumber,
63997
- lineHeight: d.options.lineHeight || 0
64352
+ lineHeight: d.options.lineHeight ? d.options.lineHeight * defaultLineHeight : 0
63998
64353
  };
63999
64354
  });
64000
64355
  }
@@ -64566,12 +64921,14 @@ struct VSOutput {
64566
64921
  }
64567
64922
  getViewportViewLineRenderingData(visibleRange, lineNumber) {
64568
64923
  const viewportDecorationsCollection = this._decorations.getDecorationsViewportData(visibleRange);
64569
- const inlineDecorations = viewportDecorationsCollection.inlineDecorations[lineNumber - visibleRange.startLineNumber];
64570
- return this._getViewLineRenderingData(lineNumber, inlineDecorations, viewportDecorationsCollection.hasVariableFonts, viewportDecorationsCollection.decorations);
64924
+ const relativeLineNumber = lineNumber - visibleRange.startLineNumber;
64925
+ const inlineDecorations = viewportDecorationsCollection.inlineDecorations[relativeLineNumber];
64926
+ const hasVariableFonts = viewportDecorationsCollection.hasVariableFonts[relativeLineNumber];
64927
+ return this._getViewLineRenderingData(lineNumber, inlineDecorations, hasVariableFonts, viewportDecorationsCollection.decorations);
64571
64928
  }
64572
64929
  getViewLineRenderingData(lineNumber) {
64573
64930
  const decorationsCollection = this._decorations.getDecorationsOnLine(lineNumber);
64574
- return this._getViewLineRenderingData(lineNumber, decorationsCollection.inlineDecorations[0], decorationsCollection.hasVariableFonts, decorationsCollection.decorations);
64931
+ return this._getViewLineRenderingData(lineNumber, decorationsCollection.inlineDecorations[0], decorationsCollection.hasVariableFonts[0], decorationsCollection.decorations);
64575
64932
  }
64576
64933
  _getViewLineRenderingData(lineNumber, inlineDecorations, hasVariableFonts, decorations) {
64577
64934
  const mightContainRTL = this.model.mightContainRTL();
@@ -64662,39 +65019,39 @@ struct VSOutput {
64662
65019
  }
64663
65020
  }
64664
65021
  if (!hasNonEmptyRange && !emptySelectionClipboard) {
64665
- return "";
65022
+ return { sourceRanges: [], sourceText: "" };
64666
65023
  }
65024
+ const ranges = [];
65025
+ const result = [];
65026
+ const pushRange = (modelRange, append2 = "") => {
65027
+ ranges.push(modelRange);
65028
+ result.push(this.model.getValueInRange(
65029
+ modelRange,
65030
+ forceCRLF ? 2 : 0
65031
+ /* EndOfLinePreference.TextDefined */
65032
+ ) + append2);
65033
+ };
64667
65034
  if (hasEmptyRange && emptySelectionClipboard) {
64668
- const result2 = [];
64669
65035
  let prevModelLineNumber = 0;
64670
65036
  for (const modelRange of modelRanges) {
64671
65037
  const modelLineNumber = modelRange.startLineNumber;
64672
65038
  if (modelRange.isEmpty()) {
64673
65039
  if (modelLineNumber !== prevModelLineNumber) {
64674
- result2.push(this.model.getLineContent(modelLineNumber) + newLineCharacter);
65040
+ pushRange(new editorWorkerHost.Range(modelLineNumber, this.model.getLineMinColumn(modelLineNumber), modelLineNumber, this.model.getLineMaxColumn(modelLineNumber)), newLineCharacter);
64675
65041
  }
64676
65042
  } else {
64677
- result2.push(this.model.getValueInRange(
64678
- modelRange,
64679
- forceCRLF ? 2 : 0
64680
- /* EndOfLinePreference.TextDefined */
64681
- ));
65043
+ pushRange(modelRange);
64682
65044
  }
64683
65045
  prevModelLineNumber = modelLineNumber;
64684
65046
  }
64685
- return result2.length === 1 ? result2[0] : result2;
64686
- }
64687
- const result = [];
64688
- for (const modelRange of modelRanges) {
64689
- if (!modelRange.isEmpty()) {
64690
- result.push(this.model.getValueInRange(
64691
- modelRange,
64692
- forceCRLF ? 2 : 0
64693
- /* EndOfLinePreference.TextDefined */
64694
- ));
65047
+ } else {
65048
+ for (const modelRange of modelRanges) {
65049
+ if (!modelRange.isEmpty()) {
65050
+ pushRange(modelRange);
65051
+ }
64695
65052
  }
64696
65053
  }
64697
- return result.length === 1 ? result[0] : result;
65054
+ return { sourceRanges: ranges, sourceText: result.length === 1 ? result[0] : result };
64698
65055
  }
64699
65056
  getRichTextToCopy(modelRanges, emptySelectionClipboard) {
64700
65057
  const languageId = this.model.getLanguageId();
@@ -65203,6 +65560,12 @@ struct VSOutput {
65203
65560
  this.onDidCompositionEnd = this._onDidCompositionEnd.event;
65204
65561
  this._onDidPaste = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue));
65205
65562
  this.onDidPaste = this._onDidPaste.event;
65563
+ this._onWillCopy = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue));
65564
+ this.onWillCopy = this._onWillCopy.event;
65565
+ this._onWillCut = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue));
65566
+ this.onWillCut = this._onWillCut.event;
65567
+ this._onWillPaste = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue));
65568
+ this.onWillPaste = this._onWillPaste.event;
65206
65569
  this._onMouseUp = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue));
65207
65570
  this.onMouseUp = this._onMouseUp.event;
65208
65571
  this._onMouseDown = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue));
@@ -66327,6 +66690,14 @@ struct VSOutput {
66327
66690
  this._modelData.view.render(true, forceRedraw);
66328
66691
  });
66329
66692
  }
66693
+ renderAsync(forceRedraw = false) {
66694
+ if (!this._modelData || !this._modelData.hasRealView) {
66695
+ return;
66696
+ }
66697
+ this._modelData.viewModel.batchEvents(() => {
66698
+ this._modelData.view.render(false, forceRedraw);
66699
+ });
66700
+ }
66330
66701
  setAriaOptions(options) {
66331
66702
  if (!this._modelData || !this._modelData.hasRealView) {
66332
66703
  return;
@@ -66487,6 +66858,9 @@ struct VSOutput {
66487
66858
  }
66488
66859
  view.render(false, true);
66489
66860
  view.domNode.domNode.setAttribute("data-uri", model.uri.toString());
66861
+ listenersToRemove.push(view.onWillCopy((e) => this._onWillCopy.fire(e)));
66862
+ listenersToRemove.push(view.onWillCut((e) => this._onWillCut.fire(e)));
66863
+ listenersToRemove.push(view.onWillPaste((e) => this._onWillPaste.fire(e)));
66490
66864
  }
66491
66865
  this._modelData = new ModelData$1(model, viewModel, view, hasRealView, listenersToRemove, attachedView);
66492
66866
  }
@@ -75183,6 +75557,7 @@ ${text2}</tr>
75183
75557
  exports.Schemas.vscodeRemote,
75184
75558
  exports.Schemas.vscodeRemoteResource,
75185
75559
  exports.Schemas.vscodeNotebookCell,
75560
+ exports.Schemas.vscodeChatPrompt,
75186
75561
  // For links that are handled entirely by the action handler
75187
75562
  exports.Schemas.internal
75188
75563
  ];
@@ -78110,7 +78485,7 @@ ${text2}</tr>
78110
78485
  const editorConfigurationKeys = getEditorConfigurationKeys();
78111
78486
  return editorConfigurationKeys[`diffEditor.${key}`] || false;
78112
78487
  }
78113
- const configurationRegistry$1 = Registry.as(Extensions$5.Configuration);
78488
+ const configurationRegistry$1 = Registry.as(Extensions$6.Configuration);
78114
78489
  configurationRegistry$1.registerConfiguration(editorConfiguration);
78115
78490
  class EditOperation {
78116
78491
  static insert(position, text2) {
@@ -78378,7 +78753,7 @@ ${text2}</tr>
78378
78753
  this._restrictedConfigurations = restricted || [];
78379
78754
  }
78380
78755
  doParseRaw(raw, options) {
78381
- const registry = Registry.as(Extensions$5.Configuration);
78756
+ const registry = Registry.as(Extensions$6.Configuration);
78382
78757
  const configurationProperties = registry.getConfigurationProperties();
78383
78758
  const excludedConfigurationProperties = registry.getExcludedConfigurationProperties();
78384
78759
  const filtered = this.filter(raw, configurationProperties, excludedConfigurationProperties, true, options);
@@ -80617,7 +80992,7 @@ ${text2}</tr>
80617
80992
  this._mimeTypesMap[mimetype] = language.identifier;
80618
80993
  });
80619
80994
  });
80620
- Registry.as(Extensions$5.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds());
80995
+ Registry.as(Extensions$6.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds());
80621
80996
  this._onDidChange.fire();
80622
80997
  }
80623
80998
  _registerLanguage(lang) {
@@ -80889,22 +81264,6 @@ ${text2}</tr>
80889
81264
  return asFragment(this._parts.join(joiner));
80890
81265
  }
80891
81266
  }
80892
- const DataTransfers = {
80893
- /**
80894
- * Application specific resource transfer type
80895
- */
80896
- RESOURCES: "ResourceURLs",
80897
- /**
80898
- * Typically transfer type for copy/paste transfers.
80899
- */
80900
- TEXT: Mimes.text,
80901
- /**
80902
- * Internal type used to pass around text/uri-list data.
80903
- *
80904
- * This is needed to work around https://bugs.chromium.org/p/chromium/issues/detail?id=239745.
80905
- */
80906
- INTERNAL_URI_LIST: "application/vnd.code.uri-list"
80907
- };
80908
81267
  const nullHoverDelegateFactory = () => ({
80909
81268
  get delay() {
80910
81269
  return -1;
@@ -99227,7 +99586,7 @@ ${formatRule(editorWorkerHost.Codicon.menuSubmenu)}
99227
99586
  __param$r(5, IListService),
99228
99587
  __param$r(6, IConfigurationService)
99229
99588
  ], WorkbenchTreeInternals);
99230
- const configurationRegistry = Registry.as(Extensions$5.Configuration);
99589
+ const configurationRegistry = Registry.as(Extensions$6.Configuration);
99231
99590
  configurationRegistry.registerConfiguration({
99232
99591
  id: "workbench",
99233
99592
  order: 7,
@@ -103041,7 +103400,7 @@ ${formatRule(editorWorkerHost.Codicon.menuSubmenu)}
103041
103400
  }
103042
103401
  initialize();
103043
103402
  const iconsSchemaId = "vscode://schemas/icons";
103044
- const schemaRegistry = Registry.as(Extensions$6.JSONContribution);
103403
+ const schemaRegistry = Registry.as(Extensions$7.JSONContribution);
103045
103404
  schemaRegistry.registerSchema(iconsSchemaId, iconRegistry.getIconSchema());
103046
103405
  const delayer = new editorWorkerHost.RunOnceScheduler(() => schemaRegistry.notifySchemaChanged(iconsSchemaId), 200);
103047
103406
  iconRegistry.onDidChange(() => {
@@ -103120,7 +103479,7 @@ ${formatRule(editorWorkerHost.Codicon.menuSubmenu)}
103120
103479
  const VS_DARK_THEME_NAME = "vs-dark";
103121
103480
  const HC_BLACK_THEME_NAME = "hc-black";
103122
103481
  const HC_LIGHT_THEME_NAME = "hc-light";
103123
- const colorRegistry = Registry.as(Extensions$3.ColorContribution);
103482
+ const colorRegistry = Registry.as(Extensions$4.ColorContribution);
103124
103483
  const themingRegistry = Registry.as(Extensions$2.ThemingContribution);
103125
103484
  class StandaloneTheme {
103126
103485
  constructor(name, standaloneThemeData) {
@@ -105276,7 +105635,7 @@ ${graph.toString()}`;
105276
105635
  }
105277
105636
  resetConfigurationModel() {
105278
105637
  this._configurationModel = ConfigurationModel.createEmptyModel(this.logService);
105279
- const properties = Registry.as(Extensions$5.Configuration).getConfigurationProperties();
105638
+ const properties = Registry.as(Extensions$6.Configuration).getConfigurationProperties();
105280
105639
  this.updateConfigurationModel(Object.keys(properties), properties);
105281
105640
  }
105282
105641
  updateConfigurationModel(properties, configurationProperties) {
@@ -115342,7 +115701,6 @@ Ensure your bundler properly bundles modules referenced by "new URL("...?esm", i
115342
115701
  exports.CancellationTokenSource = CancellationTokenSource;
115343
115702
  exports.CaseSensitiveToggle = CaseSensitiveToggle;
115344
115703
  exports.ClickAction = ClickAction;
115345
- exports.ClipboardEventUtils = ClipboardEventUtils;
115346
115704
  exports.CommandsRegistry = CommandsRegistry;
115347
115705
  exports.ContextKeyEqualsExpr = ContextKeyEqualsExpr;
115348
115706
  exports.ContextKeyExpr = ContextKeyExpr;
@@ -115377,7 +115735,7 @@ Ensure your bundler properly bundles modules referenced by "new URL("...?esm", i
115377
115735
  exports.EnterOperation = EnterOperation;
115378
115736
  exports.EventHelper = EventHelper;
115379
115737
  exports.EventType = EventType;
115380
- exports.Extensions = Extensions$5;
115738
+ exports.Extensions = Extensions$6;
115381
115739
  exports.Extensions$1 = Extensions$1;
115382
115740
  exports.FindInput = FindInput;
115383
115741
  exports.FormattingEdit = FormattingEdit;
@@ -115455,6 +115813,7 @@ Ensure your bundler properly bundles modules referenced by "new URL("...?esm", i
115455
115813
  exports.LineSource = LineSource;
115456
115814
  exports.LineTokens = LineTokens;
115457
115815
  exports.List = List;
115816
+ exports.LocalSelectionTransfer = LocalSelectionTransfer;
115458
115817
  exports.MarkdownString = MarkdownString;
115459
115818
  exports.MarkerSeverity = MarkerSeverity;
115460
115819
  exports.MarkerTag = MarkerTag;
@@ -115515,6 +115874,8 @@ Ensure your bundler properly bundles modules referenced by "new URL("...?esm", i
115515
115874
  exports.TriggerInlineEditCommandsRegistry = TriggerInlineEditCommandsRegistry;
115516
115875
  exports.TypeOperations = TypeOperations;
115517
115876
  exports.Uri = Uri;
115877
+ exports.UriList = UriList;
115878
+ exports.VSDataTransfer = VSDataTransfer;
115518
115879
  exports.VS_DARK_THEME_NAME = VS_DARK_THEME_NAME;
115519
115880
  exports.VS_LIGHT_THEME_NAME = VS_LIGHT_THEME_NAME;
115520
115881
  exports.WORKSPACE_EXTENSION = WORKSPACE_EXTENSION;
@@ -115562,6 +115923,7 @@ Ensure your bundler properly bundles modules referenced by "new URL("...?esm", i
115562
115923
  exports.createDecorator = createDecorator;
115563
115924
  exports.createHotClass = createHotClass;
115564
115925
  exports.createMatches = createMatches;
115926
+ exports.createStringDataTransferItem = createStringDataTransferItem;
115565
115927
  exports.createStyleSheetFromObservable = createStyleSheetFromObservable;
115566
115928
  exports.createTrustedTypesPolicy = createTrustedTypesPolicy;
115567
115929
  exports.darken = darken;
@@ -115694,6 +116056,7 @@ Ensure your bundler properly bundles modules referenced by "new URL("...?esm", i
115694
116056
  exports.mainWindow = mainWindow;
115695
116057
  exports.mapObservableArrayCached = mapObservableArrayCached;
115696
116058
  exports.matchesBaseContiguousSubString = matchesBaseContiguousSubString;
116059
+ exports.matchesMimeType = matchesMimeType;
115697
116060
  exports.matchesScheme = matchesScheme;
115698
116061
  exports.matchesSomeScheme = matchesSomeScheme;
115699
116062
  exports.matchesSubString = matchesSubString;
@@ -115765,6 +116128,7 @@ Ensure your bundler properly bundles modules referenced by "new URL("...?esm", i
115765
116128
  exports.subtransaction = subtransaction;
115766
116129
  exports.themeColorFromId = themeColorFromId;
115767
116130
  exports.thisEqualsC = thisEqualsC;
116131
+ exports.toExternalVSDataTransfer = toExternalVSDataTransfer;
115768
116132
  exports.toMultilineTokens2 = toMultilineTokens2;
115769
116133
  exports.toWorkspaceIdentifier = toWorkspaceIdentifier;
115770
116134
  exports.trackFocus = trackFocus;