monaco-editor 0.56.0-dev-20260119 → 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 (143) hide show
  1. package/dev/vs/basic-languages/monaco.contribution.js +18 -18
  2. package/dev/vs/{cssMode-VP5J4n2d.js → cssMode-B0VkNrib.js} +1 -1
  3. package/dev/vs/editor/editor.main.css +42 -25
  4. package/dev/vs/editor/editor.main.js +1 -1
  5. package/dev/vs/{editor-ML6zs6Go.js → editor-CR18QzPP.js} +633 -162
  6. package/dev/vs/editor.js +1 -1
  7. package/dev/vs/{freemarker2-DOuHb9T9.js → freemarker2-Byr9HmH9.js} +1 -1
  8. package/dev/vs/{handlebars-CEHZxVsE.js → handlebars-BEVXeROF.js} +1 -1
  9. package/dev/vs/{html-CHMe_cBk.js → html-CetHjWIf.js} +1 -1
  10. package/dev/vs/{htmlMode-D7MQf6Yp.js → htmlMode-BNKYUVNo.js} +1 -1
  11. package/dev/vs/{index-KO0Jv4kb.js → index-g_7JbDIY.js} +1 -1
  12. package/dev/vs/index.js +1 -1
  13. package/dev/vs/{javascript-hfXEMgFg.js → javascript-BEgEU725.js} +1 -1
  14. package/dev/vs/{jsonMode-Dp9qexJG.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-C5xy2cvN.js → liquid-D-aiCb1P.js} +1 -1
  20. package/dev/vs/{lspLanguageFeatures-D6ykJL1B.js → lspLanguageFeatures-CE9Occyu.js} +1 -1
  21. package/dev/vs/{mdx-DTsW_-Y_.js → mdx-DchJ8pbq.js} +1 -1
  22. package/dev/vs/{monaco.contribution-DuzmV_VZ.js → monaco.contribution-CHqb1dWh.js} +2 -2
  23. package/dev/vs/{monaco.contribution-t7Hz4wVA.js → monaco.contribution-CVBrIlxn.js} +2 -2
  24. package/dev/vs/{monaco.contribution-CcoogmES.js → monaco.contribution-CZxuzvA9.js} +2 -2
  25. package/dev/vs/{monaco.contribution-CQ8dNY-Q.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-1ZtmJ8bh.js → python-BCOSaCC8.js} +1 -1
  40. package/dev/vs/{razor-D7Pdon_S.js → razor-BM2tZCwj.js} +1 -1
  41. package/dev/vs/{toggleHighContrast-Btd2ryZF.js → toggleHighContrast-CLgtrrIB.js} +148 -315
  42. package/dev/vs/{tsMode-Dy3ckMs8.js → tsMode-jpkv3SbL.js} +1 -1
  43. package/dev/vs/{typescript-BBL8N09V.js → typescript-f8pt88eA.js} +1 -1
  44. package/dev/vs/{workers-B9Ao1ciR.js → workers-zrUx_2Gw.js} +1 -1
  45. package/dev/vs/{xml-7BH7GgP4.js → xml-CmSjtiR0.js} +1 -1
  46. package/dev/vs/{yaml-DvwGvgS8.js → yaml-PRriLGdw.js} +1 -1
  47. package/esm/vs/base/browser/markdownRenderer.js +1 -0
  48. package/esm/vs/base/browser/ui/actionbar/actionViewItems.js +4 -1
  49. package/esm/vs/base/browser/ui/actionbar/actionbar.css +8 -5
  50. package/esm/vs/base/browser/ui/contextview/contextview.js +1 -1
  51. package/esm/vs/base/browser/ui/list/list.js +2 -1
  52. package/esm/vs/base/browser/ui/list/listWidget.js +62 -5
  53. package/esm/vs/base/browser/ui/tree/abstractTree.js +4 -1
  54. package/esm/vs/base/browser/ui/tree/asyncDataTree.js +4 -1
  55. package/esm/vs/editor/browser/controller/editContext/clipboardUtils.js +81 -35
  56. package/esm/vs/editor/browser/controller/editContext/editContext.js +11 -0
  57. package/esm/vs/editor/browser/controller/editContext/native/nativeEditContext.js +38 -18
  58. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContext.js +4 -0
  59. package/esm/vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.js +39 -16
  60. package/esm/vs/editor/browser/dataTransfer.js +1 -1
  61. package/esm/vs/editor/browser/view.js +21 -1
  62. package/esm/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +18 -0
  63. package/esm/vs/editor/common/model/bracketPairsTextModelPart/colorizedBracketPairsDecorationProvider.js +3 -3
  64. package/esm/vs/editor/common/model/textModel.js +7 -5
  65. package/esm/vs/editor/common/model/tokens/tokenizationFontDecorationsProvider.js +21 -17
  66. package/esm/vs/editor/common/viewModel/viewModelDecorations.js +11 -4
  67. package/esm/vs/editor/common/viewModel/viewModelImpl.js +25 -14
  68. package/esm/vs/editor/contrib/clipboard/browser/clipboard.js +3 -3
  69. package/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +28 -64
  70. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.css +27 -20
  71. package/esm/vs/editor/contrib/floatingMenu/browser/floatingMenu.js +37 -9
  72. package/esm/vs/editor/contrib/inlineCompletions/browser/model/inlineCompletionsModel.js +2 -2
  73. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.css +7 -0
  74. package/esm/vs/editor/contrib/inlineCompletions/browser/view/ghostText/ghostTextView.js +22 -3
  75. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/components/gutterIndicatorView.js +20 -14
  76. package/esm/vs/editor/contrib/inlineCompletions/browser/view/inlineSuggestionsView.js +1 -0
  77. package/esm/vs/editor/editor.api.d.ts +5 -1
  78. package/esm/vs/nls/lang/cs.js +1 -1
  79. package/esm/vs/nls/lang/de.js +1 -1
  80. package/esm/vs/nls/lang/es.js +1 -1
  81. package/esm/vs/nls/lang/fr.js +1 -1
  82. package/esm/vs/nls/lang/it.js +1 -1
  83. package/esm/vs/nls/lang/ja.js +1 -1
  84. package/esm/vs/nls/lang/ko.js +1 -1
  85. package/esm/vs/nls/lang/pl.js +1 -1
  86. package/esm/vs/nls/lang/pt-br.js +1 -1
  87. package/esm/vs/nls/lang/ru.js +1 -1
  88. package/esm/vs/nls/lang/tr.js +1 -1
  89. package/esm/vs/nls/lang/zh-cn.js +1 -1
  90. package/esm/vs/nls/lang/zh-tw.js +1 -1
  91. package/esm/vs/platform/actionWidget/browser/actionList.js +46 -6
  92. package/esm/vs/platform/actionWidget/browser/actionWidget.js +9 -2
  93. package/esm/vs/platform/actions/common/actions.js +2 -1
  94. package/esm/vs/platform/hover/browser/hoverService.js +1 -0
  95. package/esm/vs/platform/product/common/product.js +16 -1
  96. package/min/vs/basic-languages/monaco.contribution.js +1 -1
  97. package/min/vs/{cssMode-CxJ_Cr_Z.js → cssMode-CheCY05R.js} +1 -1
  98. package/min/vs/editor/editor.main.css +1 -1
  99. package/min/vs/editor/editor.main.js +1 -1
  100. package/min/vs/{editor-CyVlw8K4.js → editor-DxYWA3-X.js} +112 -110
  101. package/min/vs/editor.js +1 -1
  102. package/min/vs/{freemarker2-CJcSu3nc.js → freemarker2-C7J7V1Hp.js} +1 -1
  103. package/min/vs/{handlebars-DPLjS6oj.js → handlebars-DsCar5Ix.js} +1 -1
  104. package/min/vs/{html-DUmbFRY-.js → html-BGLIaUZV.js} +1 -1
  105. package/min/vs/{htmlMode-DfUvYWkE.js → htmlMode-BB6WOoy3.js} +1 -1
  106. package/min/vs/{index-DOycyDud.js → index-BdR0nSqf.js} +1 -1
  107. package/min/vs/index.js +1 -1
  108. package/min/vs/{javascript-CQpB78Gy.js → javascript-CXE3i1eX.js} +1 -1
  109. package/min/vs/{jsonMode-B1E1R3KS.js → jsonMode-rtaE9alu.js} +1 -1
  110. package/min/vs/language/css/monaco.contribution.js +1 -1
  111. package/min/vs/language/html/monaco.contribution.js +1 -1
  112. package/min/vs/language/json/monaco.contribution.js +1 -1
  113. package/min/vs/language/typescript/monaco.contribution.js +1 -1
  114. package/min/vs/{liquid-Bh_nhvai.js → liquid-CEdn0ovR.js} +1 -1
  115. package/min/vs/{lspLanguageFeatures-CAWBopti.js → lspLanguageFeatures-CRAjJmzF.js} +1 -1
  116. package/min/vs/{mdx-CvpAYI3X.js → mdx-DLDMIqnu.js} +1 -1
  117. package/min/vs/{monaco.contribution-QIm8iN-Y.js → monaco.contribution-BrRAk-VA.js} +1 -1
  118. package/min/vs/{monaco.contribution-C3jTRlbI.js → monaco.contribution-C67XgReK.js} +1 -1
  119. package/min/vs/{monaco.contribution-Cmckd8EG.js → monaco.contribution-CYT-Sx3l.js} +1 -1
  120. package/min/vs/{monaco.contribution-6Rc9eWJ0.js → monaco.contribution-DjiQkKLa.js} +1 -1
  121. package/min/vs/nls/lang/cs.js +1 -1
  122. package/min/vs/nls/lang/de.js +1 -1
  123. package/min/vs/nls/lang/es.js +1 -1
  124. package/min/vs/nls/lang/fr.js +1 -1
  125. package/min/vs/nls/lang/it.js +1 -1
  126. package/min/vs/nls/lang/ja.js +1 -1
  127. package/min/vs/nls/lang/ko.js +1 -1
  128. package/min/vs/nls/lang/pl.js +1 -1
  129. package/min/vs/nls/lang/pt-br.js +1 -1
  130. package/min/vs/nls/lang/ru.js +1 -1
  131. package/min/vs/nls/lang/tr.js +1 -1
  132. package/min/vs/nls/lang/zh-cn.js +1 -1
  133. package/min/vs/nls/lang/zh-tw.js +1 -1
  134. package/min/vs/{python-BuY3uazV.js → python-CKbl_I3e.js} +1 -1
  135. package/min/vs/{razor-DQBMGsJX.js → razor--RjiPxbd.js} +1 -1
  136. package/min/vs/{toggleHighContrast-BTse4XBl.js → toggleHighContrast-BKDMxisH.js} +31 -33
  137. package/min/vs/{tsMode-C8sInOMc.js → tsMode-C48d5M22.js} +1 -1
  138. package/min/vs/{typescript-DMigl3F4.js → typescript-e7oUhPyX.js} +1 -1
  139. package/min/vs/{workers-BznOw4bL.js → workers-CtpYUoCo.js} +1 -1
  140. package/min/vs/{xml-C2bHWkWJ.js → xml-tOyfgws7.js} +1 -1
  141. package/min/vs/{yaml-gtjQmyMa.js → yaml-Cmf9NYDf.js} +1 -1
  142. package/monaco.d.ts +5 -1
  143. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./editor-ML6zs6Go"], (function(editorWorkerHost, editor) {
1
+ define("vs/toggleHighContrast-CLgtrrIB", ["./editorWorkerHost--0eDLpc-", "./editor-CR18QzPP"], (function(editorWorkerHost, editor) {
2
2
  "use strict";
3
3
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va;
4
4
  class ToggleCollapseUnchangedRegions extends editor.Action2 {
@@ -932,125 +932,6 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
932
932
  }
933
933
  }
934
934
  editor.registerEditorAction(TransposeLettersAction);
935
- function createStringDataTransferItem(stringOrPromise, id) {
936
- return {
937
- id,
938
- asString: async () => stringOrPromise,
939
- asFile: () => void 0,
940
- value: typeof stringOrPromise === "string" ? stringOrPromise : void 0
941
- };
942
- }
943
- function createFileDataTransferItem(fileName, uri, data, id) {
944
- const file = { id: editor.generateUuid(), name: fileName, uri, data };
945
- return {
946
- id,
947
- asString: async () => "",
948
- asFile: () => file,
949
- value: void 0
950
- };
951
- }
952
- class VSDataTransfer {
953
- constructor() {
954
- this._entries = /* @__PURE__ */ new Map();
955
- }
956
- get size() {
957
- let size = 0;
958
- for (const _ of this._entries) {
959
- size++;
960
- }
961
- return size;
962
- }
963
- has(mimeType) {
964
- return this._entries.has(this.toKey(mimeType));
965
- }
966
- matches(pattern) {
967
- const mimes = [...this._entries.keys()];
968
- if (editorWorkerHost.Iterable.some(this, ([_, item]) => item.asFile())) {
969
- mimes.push("files");
970
- }
971
- return matchesMimeType_normalized(normalizeMimeType(pattern), mimes);
972
- }
973
- get(mimeType) {
974
- return this._entries.get(this.toKey(mimeType))?.[0];
975
- }
976
- /**
977
- * Add a new entry to this data transfer.
978
- *
979
- * This does not replace existing entries for `mimeType`.
980
- */
981
- append(mimeType, value) {
982
- const existing = this._entries.get(mimeType);
983
- if (existing) {
984
- existing.push(value);
985
- } else {
986
- this._entries.set(this.toKey(mimeType), [value]);
987
- }
988
- }
989
- /**
990
- * Set the entry for a given mime type.
991
- *
992
- * This replaces all existing entries for `mimeType`.
993
- */
994
- replace(mimeType, value) {
995
- this._entries.set(this.toKey(mimeType), [value]);
996
- }
997
- /**
998
- * Remove all entries for `mimeType`.
999
- */
1000
- delete(mimeType) {
1001
- this._entries.delete(this.toKey(mimeType));
1002
- }
1003
- /**
1004
- * Iterate over all `[mime, item]` pairs in this data transfer.
1005
- *
1006
- * There may be multiple entries for each mime type.
1007
- */
1008
- *[Symbol.iterator]() {
1009
- for (const [mine, items] of this._entries) {
1010
- for (const item of items) {
1011
- yield [mine, item];
1012
- }
1013
- }
1014
- }
1015
- toKey(mimeType) {
1016
- return normalizeMimeType(mimeType);
1017
- }
1018
- }
1019
- function normalizeMimeType(mimeType) {
1020
- return mimeType.toLowerCase();
1021
- }
1022
- function matchesMimeType(pattern, mimeTypes) {
1023
- return matchesMimeType_normalized(normalizeMimeType(pattern), mimeTypes.map(normalizeMimeType));
1024
- }
1025
- function matchesMimeType_normalized(normalizedPattern, normalizedMimeTypes) {
1026
- if (normalizedPattern === "*/*") {
1027
- return normalizedMimeTypes.length > 0;
1028
- }
1029
- if (normalizedMimeTypes.includes(normalizedPattern)) {
1030
- return true;
1031
- }
1032
- const wildcard = normalizedPattern.match(/^([a-z]+)\/([a-z]+|\*)$/i);
1033
- if (!wildcard) {
1034
- return false;
1035
- }
1036
- const [_, type, subtype] = wildcard;
1037
- if (subtype === "*") {
1038
- return normalizedMimeTypes.some((mime) => mime.startsWith(type + "/"));
1039
- }
1040
- return false;
1041
- }
1042
- const UriList = Object.freeze({
1043
- // http://amundsen.com/hypermedia/urilist/
1044
- create: (entries) => {
1045
- return editorWorkerHost.distinct(entries.map((x) => x.toString())).join("\r\n");
1046
- },
1047
- split: (str) => {
1048
- return str.split("\r\n");
1049
- },
1050
- parse: (str) => {
1051
- return UriList.split(str).filter((value) => !value.startsWith("#"));
1052
- }
1053
- });
1054
935
  const _HierarchicalKind = class _HierarchicalKind {
1055
936
  constructor(value) {
1056
937
  this.value = value;
@@ -1072,101 +953,6 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
1072
953
  _HierarchicalKind.None = new _HierarchicalKind("@@none@@");
1073
954
  _HierarchicalKind.Empty = new _HierarchicalKind("");
1074
955
  let HierarchicalKind = _HierarchicalKind;
1075
- const CodeDataTransfers = {
1076
- EDITORS: "CodeEditors",
1077
- FILES: "CodeFiles"
1078
- };
1079
- class DragAndDropContributionRegistry {
1080
- }
1081
- const Extensions = {
1082
- DragAndDropContribution: "workbench.contributions.dragAndDrop"
1083
- };
1084
- editor.Registry.add(Extensions.DragAndDropContribution, new DragAndDropContributionRegistry());
1085
- const _LocalSelectionTransfer = class _LocalSelectionTransfer {
1086
- constructor() {
1087
- }
1088
- static getInstance() {
1089
- return _LocalSelectionTransfer.INSTANCE;
1090
- }
1091
- hasData(proto) {
1092
- return proto && proto === this.proto;
1093
- }
1094
- getData(proto) {
1095
- if (this.hasData(proto)) {
1096
- return this.data;
1097
- }
1098
- return void 0;
1099
- }
1100
- };
1101
- _LocalSelectionTransfer.INSTANCE = new _LocalSelectionTransfer();
1102
- let LocalSelectionTransfer = _LocalSelectionTransfer;
1103
- function getPathForFile(file) {
1104
- if (editorWorkerHost.isNative && typeof globalThis.vscode?.webUtils?.getPathForFile === "function") {
1105
- return globalThis.vscode?.webUtils?.getPathForFile(file);
1106
- }
1107
- return void 0;
1108
- }
1109
- function toVSDataTransfer(dataTransfer) {
1110
- const vsDataTransfer = new VSDataTransfer();
1111
- for (const item of dataTransfer.items) {
1112
- const type = item.type;
1113
- if (item.kind === "string") {
1114
- const asStringValue = new Promise((resolve) => item.getAsString(resolve));
1115
- vsDataTransfer.append(type, createStringDataTransferItem(asStringValue));
1116
- } else if (item.kind === "file") {
1117
- const file = item.getAsFile();
1118
- if (file) {
1119
- vsDataTransfer.append(type, createFileDataTransferItemFromFile(file));
1120
- }
1121
- }
1122
- }
1123
- return vsDataTransfer;
1124
- }
1125
- function createFileDataTransferItemFromFile(file) {
1126
- const path = getPathForFile(file);
1127
- const uri = path ? editorWorkerHost.URI.parse(path) : void 0;
1128
- return createFileDataTransferItem(file.name, uri, async () => {
1129
- return new Uint8Array(await file.arrayBuffer());
1130
- });
1131
- }
1132
- const INTERNAL_DND_MIME_TYPES = Object.freeze([
1133
- CodeDataTransfers.EDITORS,
1134
- CodeDataTransfers.FILES,
1135
- editor.DataTransfers.RESOURCES,
1136
- editor.DataTransfers.INTERNAL_URI_LIST
1137
- ]);
1138
- function toExternalVSDataTransfer(sourceDataTransfer, overwriteUriList = false) {
1139
- const vsDataTransfer = toVSDataTransfer(sourceDataTransfer);
1140
- const uriList = vsDataTransfer.get(editor.DataTransfers.INTERNAL_URI_LIST);
1141
- if (uriList) {
1142
- vsDataTransfer.replace(editor.Mimes.uriList, uriList);
1143
- } else {
1144
- if (overwriteUriList || !vsDataTransfer.has(editor.Mimes.uriList)) {
1145
- const editorData = [];
1146
- for (const item of sourceDataTransfer.items) {
1147
- const file = item.getAsFile();
1148
- if (file) {
1149
- const path = getPathForFile(file);
1150
- try {
1151
- if (path) {
1152
- editorData.push(editorWorkerHost.URI.file(path).toString());
1153
- } else {
1154
- editorData.push(editorWorkerHost.URI.parse(file.name, true).toString());
1155
- }
1156
- } catch {
1157
- }
1158
- }
1159
- }
1160
- if (editorData.length) {
1161
- vsDataTransfer.replace(editor.Mimes.uriList, createStringDataTransferItem(UriList.create(editorData)));
1162
- }
1163
- }
1164
- }
1165
- for (const internal of INTERNAL_DND_MIME_TYPES) {
1166
- vsDataTransfer.delete(internal);
1167
- }
1168
- return vsDataTransfer;
1169
- }
1170
956
  var __decorate$1V = function(decorators, target, key, desc) {
1171
957
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1172
958
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -1640,7 +1426,7 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
1640
1426
  }
1641
1427
  const strUriList = await urlListEntry.asString();
1642
1428
  const entries = [];
1643
- for (const entry of UriList.parse(strUriList)) {
1429
+ for (const entry of editor.UriList.parse(strUriList)) {
1644
1430
  try {
1645
1431
  entries.push({ uri: editorWorkerHost.URI.parse(entry), originalText: entry });
1646
1432
  } catch {
@@ -2827,6 +2613,8 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
2827
2613
  data.container.title = element.tooltip;
2828
2614
  } else if (element.disabled) {
2829
2615
  data.container.title = element.label;
2616
+ } else if (element.hover?.content) {
2617
+ data.container.title = "";
2830
2618
  } else if (actionTitle && previewTitle) {
2831
2619
  if (this._supportsPreview && element.canPreview) {
2832
2620
  data.container.title = editorWorkerHost.localize(1668, "{0} to Apply, {1} to Preview", actionTitle, previewTitle);
@@ -2861,16 +2649,18 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
2861
2649
  return void 0;
2862
2650
  }
2863
2651
  let ActionList = class ActionList extends editorWorkerHost.Disposable {
2864
- constructor(user, preview, items, _delegate, accessibilityProvider, _contextViewService, _keybindingService, _layoutService) {
2652
+ constructor(user, preview, items, _delegate, accessibilityProvider, _contextViewService, _keybindingService, _layoutService, _hoverService) {
2865
2653
  super();
2866
2654
  this._delegate = _delegate;
2867
2655
  this._contextViewService = _contextViewService;
2868
2656
  this._keybindingService = _keybindingService;
2869
2657
  this._layoutService = _layoutService;
2658
+ this._hoverService = _hoverService;
2870
2659
  this._actionLineHeight = 28;
2871
2660
  this._headerLineHeight = 28;
2872
2661
  this._separatorLineHeight = 8;
2873
2662
  this.cts = this._register(new editorWorkerHost.CancellationTokenSource());
2663
+ this._hover = this._register(new editorWorkerHost.MutableDisposable());
2874
2664
  this.domNode = document.createElement("div");
2875
2665
  this.domNode.classList.add("actionList");
2876
2666
  const virtualDelegate = {
@@ -2940,6 +2730,7 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
2940
2730
  hide(didCancel) {
2941
2731
  this._delegate.onHide(didCancel);
2942
2732
  this.cts.cancel();
2733
+ this._hover.clear();
2943
2734
  this._contextViewService.hideContextView();
2944
2735
  }
2945
2736
  layout(minWidth) {
@@ -2954,7 +2745,7 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
2954
2745
  maxWidth = 380;
2955
2746
  } else {
2956
2747
  const itemWidths = this._allMenuItems.map((_, index) => {
2957
- const element = this.domNode.ownerDocument.getElementById(this._list.getElementID(index));
2748
+ const element = this._getRowElement(index);
2958
2749
  if (element) {
2959
2750
  element.style.width = "auto";
2960
2751
  const width = element.getBoundingClientRect().width;
@@ -3010,6 +2801,32 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3010
2801
  const focusIndex = focused[0];
3011
2802
  const element = this._list.element(focusIndex);
3012
2803
  this._delegate.onFocus?.(element.item);
2804
+ this._showHoverForElement(element, focusIndex);
2805
+ }
2806
+ _getRowElement(index) {
2807
+ return this.domNode.ownerDocument.getElementById(this._list.getElementID(index));
2808
+ }
2809
+ _showHoverForElement(element, index) {
2810
+ let newHover;
2811
+ if (element.hover?.content && this.focusCondition(element)) {
2812
+ const rowElement = this._getRowElement(index);
2813
+ if (rowElement) {
2814
+ const markdown = element.hover.content ? new editor.MarkdownString(element.hover.content) : void 0;
2815
+ newHover = this._hoverService.showDelayedHover({
2816
+ content: markdown ?? "",
2817
+ target: rowElement,
2818
+ additionalClasses: ["action-widget-hover"],
2819
+ position: {
2820
+ hoverPosition: 0,
2821
+ forcePosition: false
2822
+ },
2823
+ appearance: {
2824
+ showPointer: true
2825
+ }
2826
+ }, { groupId: `actionListHover` });
2827
+ }
2828
+ }
2829
+ this._hover.value = newHover;
3013
2830
  }
3014
2831
  async onListHover(e) {
3015
2832
  const element = e.element;
@@ -3021,8 +2838,8 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3021
2838
  if (e.index) {
3022
2839
  this._list.splice(e.index, 1, [element]);
3023
2840
  }
2841
+ this._list.setFocus(typeof e.index === "number" ? [e.index] : []);
3024
2842
  }
3025
- this._list.setFocus(typeof e.index === "number" ? [e.index] : []);
3026
2843
  }
3027
2844
  onListClick(e) {
3028
2845
  if (e.element && this.focusCondition(e.element)) {
@@ -3033,7 +2850,8 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3033
2850
  ActionList = __decorate$1S([
3034
2851
  __param$1S(5, editor.IContextViewService),
3035
2852
  __param$1S(6, editor.IKeybindingService),
3036
- __param$1S(7, editor.ILayoutService)
2853
+ __param$1S(7, editor.ILayoutService),
2854
+ __param$1S(8, editor.IHoverService)
3037
2855
  ], ActionList);
3038
2856
  function stripNewlines(str) {
3039
2857
  return str.replace(/\r\n|\r|\n/g, " ");
@@ -3125,7 +2943,13 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3125
2943
  const width = this._list.value?.layout(actionBarWidth);
3126
2944
  widget.style.width = `${width}px`;
3127
2945
  const focusTracker = renderDisposables.add(editor.trackFocus(element));
3128
- renderDisposables.add(focusTracker.onDidBlur(() => this.hide(true)));
2946
+ renderDisposables.add(focusTracker.onDidBlur(() => {
2947
+ const activeElement = editor.getActiveElement();
2948
+ if (activeElement?.closest(".action-widget-hover")) {
2949
+ return;
2950
+ }
2951
+ this.hide(true);
2952
+ }));
3129
2953
  return renderDisposables;
3130
2954
  }
3131
2955
  _createActionBar(className, actions) {
@@ -3486,7 +3310,7 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3486
3310
  static get(editor2) {
3487
3311
  return editor2.getContribution(CopyPasteController_1.ID);
3488
3312
  }
3489
- constructor(editor$1, instantiationService, _logService, _bulkEditService, _clipboardService, _commandService, _configService, _languageFeaturesService, _quickInputService, _progressService) {
3313
+ constructor(editor2, instantiationService, _logService, _bulkEditService, _clipboardService, _commandService, _configService, _languageFeaturesService, _quickInputService, _progressService) {
3490
3314
  super();
3491
3315
  this._logService = _logService;
3492
3316
  this._bulkEditService = _bulkEditService;
@@ -3496,13 +3320,12 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3496
3320
  this._languageFeaturesService = _languageFeaturesService;
3497
3321
  this._quickInputService = _quickInputService;
3498
3322
  this._progressService = _progressService;
3499
- this._editor = editor$1;
3500
- const container = editor$1.getContainerDomNode();
3501
- this._register(editor.addDisposableListener(container, "copy", (e) => this.handleCopy(e)));
3502
- this._register(editor.addDisposableListener(container, "cut", (e) => this.handleCopy(e)));
3503
- this._register(editor.addDisposableListener(container, "paste", (e) => this.handlePaste(e), true));
3504
- this._pasteProgressManager = this._register(new InlineProgressManager("pasteIntoEditor", editor$1, instantiationService));
3505
- this._postPasteWidgetManager = this._register(instantiationService.createInstance(PostEditWidgetManager, "pasteIntoEditor", editor$1, pasteWidgetVisibleCtx, { id: changePasteTypeCommandId, label: editorWorkerHost.localize(927, "Show paste options...") }, () => CopyPasteController_1._configureDefaultAction ? [CopyPasteController_1._configureDefaultAction] : []));
3323
+ this._editor = editor2;
3324
+ this._register(editor2.onWillCopy((e) => this.handleCopy(e)));
3325
+ this._register(editor2.onWillCut((e) => this.handleCopy(e)));
3326
+ this._register(editor2.onWillPaste((e) => this.handlePaste(e)));
3327
+ this._pasteProgressManager = this._register(new InlineProgressManager("pasteIntoEditor", editor2, instantiationService));
3328
+ this._postPasteWidgetManager = this._register(instantiationService.createInstance(PostEditWidgetManager, "pasteIntoEditor", editor2, pasteWidgetVisibleCtx, { id: changePasteTypeCommandId, label: editorWorkerHost.localize(927, "Show paste options...") }, () => CopyPasteController_1._configureDefaultAction ? [CopyPasteController_1._configureDefaultAction] : []));
3506
3329
  }
3507
3330
  changePasteType() {
3508
3331
  this._postPasteWidgetManager.tryShowSelector();
@@ -3531,44 +3354,23 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3531
3354
  await this._currentPasteOperation;
3532
3355
  }
3533
3356
  handleCopy(e) {
3534
- let id = null;
3535
- if (e.clipboardData) {
3536
- const [text, metadata] = editor.ClipboardEventUtils.getTextData(e.clipboardData);
3537
- const storedMetadata = metadata || editor.InMemoryClipboardMetadataManager.INSTANCE.get(text);
3538
- id = storedMetadata?.id || null;
3539
- this._logService.trace("CopyPasteController#handleCopy for id : ", id, " with text.length : ", text.length);
3540
- } else {
3541
- this._logService.trace("CopyPasteController#handleCopy");
3542
- }
3357
+ this._logService.trace("CopyPasteController#handleCopy");
3543
3358
  if (!this._editor.hasTextFocus()) {
3544
3359
  return;
3545
3360
  }
3546
3361
  this._clipboardService.clearInternalState?.();
3547
- if (!e.clipboardData || !this.isPasteAsEnabled()) {
3362
+ if (!this.isPasteAsEnabled()) {
3548
3363
  return;
3549
3364
  }
3550
3365
  const model = this._editor.getModel();
3366
+ const viewModel = this._editor._getViewModel();
3551
3367
  const selections = this._editor.getSelections();
3552
- if (!model || !selections?.length) {
3368
+ if (!model || !viewModel || !selections?.length) {
3553
3369
  return;
3554
3370
  }
3555
- const enableEmptySelectionClipboard = this._editor.getOption(
3556
- 45
3557
- /* EditorOption.emptySelectionClipboard */
3558
- );
3559
- let ranges = selections;
3560
- const wasFromEmptySelection = selections.length === 1 && selections[0].isEmpty();
3561
- if (wasFromEmptySelection) {
3562
- if (!enableEmptySelectionClipboard) {
3563
- return;
3564
- }
3565
- ranges = [new editorWorkerHost.Range(ranges[0].startLineNumber, 1, ranges[0].startLineNumber, 1 + model.getLineLength(ranges[0].startLineNumber))];
3566
- }
3567
- const toCopy = this._editor._getViewModel()?.getPlainTextToCopy(selections, enableEmptySelectionClipboard, editorWorkerHost.isWindows);
3568
- const multicursorText = Array.isArray(toCopy) ? toCopy : null;
3569
3371
  const defaultPastePayload = {
3570
- multicursorText,
3571
- pasteOnNewLine: wasFromEmptySelection,
3372
+ multicursorText: e.dataToCopy.multicursorText ?? null,
3373
+ pasteOnNewLine: e.dataToCopy.isFromEmptySelection,
3572
3374
  mode: null
3573
3375
  };
3574
3376
  const providers = this._languageFeaturesService.documentPasteEditProvider.ordered(model).filter((x) => !!x.prepareDocumentPaste);
@@ -3576,9 +3378,9 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3576
3378
  this.setCopyMetadata(e.clipboardData, { defaultPastePayload });
3577
3379
  return;
3578
3380
  }
3579
- const dataTransfer = toVSDataTransfer(e.clipboardData);
3381
+ const dataTransfer = new editor.VSDataTransfer();
3580
3382
  const providerCopyMimeTypes = providers.flatMap((x) => x.copyMimeTypes ?? []);
3581
- const handle = id ?? editor.generateUuid();
3383
+ const handle = editor.generateUuid();
3582
3384
  this.setCopyMetadata(e.clipboardData, {
3583
3385
  id: handle,
3584
3386
  providerCopyMimeTypes,
@@ -3587,7 +3389,7 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3587
3389
  const operations = providers.map((provider) => {
3588
3390
  return {
3589
3391
  providerMimeTypes: provider.copyMimeTypes,
3590
- operation: editorWorkerHost.createCancelablePromise((token) => provider.prepareDocumentPaste(model, ranges, dataTransfer, token).catch((err) => {
3392
+ operation: editorWorkerHost.createCancelablePromise((token) => provider.prepareDocumentPaste(model, e.dataToCopy.sourceRanges, dataTransfer, token).catch((err) => {
3591
3393
  console.error(err);
3592
3394
  return void 0;
3593
3395
  }))
@@ -3597,16 +3399,15 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3597
3399
  CopyPasteController_1._currentCopyOperation = { handle, operations };
3598
3400
  }
3599
3401
  async handlePaste(e) {
3600
- if (e.clipboardData) {
3601
- const [text, metadata2] = editor.ClipboardEventUtils.getTextData(e.clipboardData);
3602
- const metadataComputed = metadata2 || editor.InMemoryClipboardMetadataManager.INSTANCE.get(text);
3603
- this._logService.trace("CopyPasteController#handlePaste for id : ", metadataComputed?.id);
3604
- } else {
3605
- this._logService.trace("CopyPasteController#handlePaste");
3402
+ this._logService.trace("CopyPasteController#handlePaste for id : ", e.metadata?.id);
3403
+ if (!this._editor.hasTextFocus()) {
3404
+ return;
3606
3405
  }
3607
- if (!e.clipboardData || !this._editor.hasTextFocus()) {
3406
+ const dataTransfer = e.toExternalVSDataTransfer();
3407
+ if (!dataTransfer) {
3608
3408
  return;
3609
3409
  }
3410
+ dataTransfer.delete(vscodeClipboardMime);
3610
3411
  MessageController.get(this._editor)?.closeMessage();
3611
3412
  this._currentPasteOperation?.cancel();
3612
3413
  this._currentPasteOperation = void 0;
@@ -3623,8 +3424,6 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3623
3424
  }
3624
3425
  const metadata = this.fetchCopyMetadata(e);
3625
3426
  this._logService.trace("CopyPasteController#handlePaste with metadata : ", metadata?.id, " and text.length : ", e.clipboardData.getData("text/plain").length);
3626
- const dataTransfer = toExternalVSDataTransfer(e.clipboardData);
3627
- dataTransfer.delete(vscodeClipboardMime);
3628
3427
  const fileTypes = Array.from(e.clipboardData.files).map((file) => file.type);
3629
3428
  const allPotentialMimeTypes = [
3630
3429
  ...e.clipboardData.types,
@@ -3642,22 +3441,20 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3642
3441
  return false;
3643
3442
  }
3644
3443
  }
3645
- return provider.pasteMimeTypes?.some((type) => matchesMimeType(type, allPotentialMimeTypes));
3444
+ return provider.pasteMimeTypes?.some((type) => editor.matchesMimeType(type, allPotentialMimeTypes));
3646
3445
  });
3647
3446
  if (!allProviders.length) {
3648
3447
  if (this._pasteAsActionContext?.preferred) {
3649
3448
  this.showPasteAsNoEditMessage(selections, this._pasteAsActionContext.preferred);
3650
- e.preventDefault();
3651
- e.stopImmediatePropagation();
3449
+ e.setHandled();
3652
3450
  }
3653
3451
  return;
3654
3452
  }
3655
- e.preventDefault();
3656
- e.stopImmediatePropagation();
3453
+ e.setHandled();
3657
3454
  if (this._pasteAsActionContext) {
3658
3455
  this.showPasteAsPick(this._pasteAsActionContext.preferred, allProviders, selections, dataTransfer, metadata);
3659
3456
  } else {
3660
- this.doPasteInline(allProviders, selections, dataTransfer, metadata, e);
3457
+ this.doPasteInline(allProviders, selections, dataTransfer, metadata, e.browserEvent);
3661
3458
  }
3662
3459
  }
3663
3460
  showPasteAsNoEditMessage(selections, preference) {
@@ -3838,15 +3635,12 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3838
3635
  title: editorWorkerHost.localize(934, "Running paste handlers")
3839
3636
  }, () => p);
3840
3637
  }
3841
- setCopyMetadata(dataTransfer, metadata) {
3638
+ setCopyMetadata(clipboardData, metadata) {
3842
3639
  this._logService.trace("CopyPasteController#setCopyMetadata new id : ", metadata.id);
3843
- dataTransfer.setData(vscodeClipboardMime, JSON.stringify(metadata));
3640
+ clipboardData.setData(vscodeClipboardMime, JSON.stringify(metadata));
3844
3641
  }
3845
3642
  fetchCopyMetadata(e) {
3846
3643
  this._logService.trace("CopyPasteController#fetchCopyMetadata");
3847
- if (!e.clipboardData) {
3848
- return;
3849
- }
3850
3644
  const rawMetadata = e.clipboardData.getData(vscodeClipboardMime);
3851
3645
  if (rawMetadata) {
3852
3646
  try {
@@ -3855,13 +3649,12 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3855
3649
  return void 0;
3856
3650
  }
3857
3651
  }
3858
- const [_, metadata] = editor.ClipboardEventUtils.getTextData(e.clipboardData);
3859
- if (metadata) {
3652
+ if (e.metadata) {
3860
3653
  return {
3861
3654
  defaultPastePayload: {
3862
- mode: metadata.mode,
3863
- multicursorText: metadata.multicursorText ?? null,
3864
- pasteOnNewLine: !!metadata.isFromEmptySelection
3655
+ mode: e.metadata.mode,
3656
+ multicursorText: e.metadata.multicursorText ?? null,
3657
+ pasteOnNewLine: !!e.metadata.isFromEmptySelection
3865
3658
  }
3866
3659
  };
3867
3660
  }
@@ -3870,7 +3663,7 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3870
3663
  async mergeInDataFromCopy(allProviders, dataTransfer, metadata, token) {
3871
3664
  this._logService.trace("CopyPasteController#mergeInDataFromCopy with metadata : ", metadata?.id);
3872
3665
  if (metadata?.id && CopyPasteController_1._currentCopyOperation?.handle === metadata.id) {
3873
- const toResolve = CopyPasteController_1._currentCopyOperation.operations.filter((op) => allProviders.some((provider) => provider.pasteMimeTypes.some((type) => matchesMimeType(type, op.providerMimeTypes)))).map((op) => op.operation);
3666
+ const toResolve = CopyPasteController_1._currentCopyOperation.operations.filter((op) => allProviders.some((provider) => provider.pasteMimeTypes.some((type) => editor.matchesMimeType(type, op.providerMimeTypes)))).map((op) => op.operation);
3874
3667
  const toMergeResults = await Promise.all(toResolve);
3875
3668
  if (token.isCancellationRequested) {
3876
3669
  return;
@@ -3889,7 +3682,7 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
3889
3682
  return;
3890
3683
  }
3891
3684
  if (resources.length) {
3892
- dataTransfer.append(editor.Mimes.uriList, createStringDataTransferItem(UriList.create(resources)));
3685
+ dataTransfer.append(editor.Mimes.uriList, editor.createStringDataTransferItem(editor.UriList.create(resources)));
3893
3686
  }
3894
3687
  }
3895
3688
  }
@@ -4150,7 +3943,7 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
4150
3943
  editor.CopyOptions.electronBugWorkaroundCopyEventHasFired = false;
4151
3944
  editor$1.getContainerDomNode().ownerDocument.execCommand("copy");
4152
3945
  if (editorWorkerHost.isNative && editor.CopyOptions.electronBugWorkaroundCopyEventHasFired === false) {
4153
- const { dataToCopy } = editor.generateDataToCopyAndStoreInMemory(editor$1._getViewModel(), editor$1.getOptions(), void 0, editor.isFirefox);
3946
+ const { dataToCopy } = editor.generateDataToCopyAndStoreInMemory(editor$1._getViewModel(), void 0, editor.isFirefox);
4154
3947
  clipboardService.writeText(dataToCopy.text);
4155
3948
  }
4156
3949
  }
@@ -4212,7 +4005,7 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
4212
4005
  if (editContextEnabled) {
4213
4006
  const nativeEditContext = editor.NativeEditContextRegistry.get(editor$1.getId());
4214
4007
  if (nativeEditContext) {
4215
- nativeEditContext.onWillCopy();
4008
+ nativeEditContext.handleWillCopy();
4216
4009
  }
4217
4010
  }
4218
4011
  }
@@ -4233,7 +4026,7 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
4233
4026
  if (editContextEnabled) {
4234
4027
  const nativeEditContext = editor.NativeEditContextRegistry.get(focusedEditor.getId());
4235
4028
  if (nativeEditContext) {
4236
- nativeEditContext.onWillPaste();
4029
+ nativeEditContext.handleWillPaste();
4237
4030
  }
4238
4031
  }
4239
4032
  logService.trace("registerExecCommandImpl (before triggerPaste)");
@@ -20076,15 +19869,15 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
20076
19869
  static get(editor2) {
20077
19870
  return editor2.getContribution(DropIntoEditorController_1.ID);
20078
19871
  }
20079
- constructor(editor2, instantiationService, _configService, _languageFeaturesService, _treeViewsDragAndDropService) {
19872
+ constructor(editor$1, instantiationService, _configService, _languageFeaturesService, _treeViewsDragAndDropService) {
20080
19873
  super();
20081
19874
  this._configService = _configService;
20082
19875
  this._languageFeaturesService = _languageFeaturesService;
20083
19876
  this._treeViewsDragAndDropService = _treeViewsDragAndDropService;
20084
- this.treeItemsTransfer = LocalSelectionTransfer.getInstance();
20085
- this._dropProgressManager = this._register(instantiationService.createInstance(InlineProgressManager, "dropIntoEditor", editor2));
20086
- this._postDropWidgetManager = this._register(instantiationService.createInstance(PostEditWidgetManager, "dropIntoEditor", editor2, dropWidgetVisibleCtx, { id: changeDropTypeCommandId, label: editorWorkerHost.localize(944, "Show drop options...") }, () => DropIntoEditorController_1._configureDefaultAction ? [DropIntoEditorController_1._configureDefaultAction] : []));
20087
- this._register(editor2.onDropIntoEditor((e) => this.onDropIntoEditor(editor2, e.position, e.event)));
19877
+ this.treeItemsTransfer = editor.LocalSelectionTransfer.getInstance();
19878
+ this._dropProgressManager = this._register(instantiationService.createInstance(InlineProgressManager, "dropIntoEditor", editor$1));
19879
+ this._postDropWidgetManager = this._register(instantiationService.createInstance(PostEditWidgetManager, "dropIntoEditor", editor$1, dropWidgetVisibleCtx, { id: changeDropTypeCommandId, label: editorWorkerHost.localize(944, "Show drop options...") }, () => DropIntoEditorController_1._configureDefaultAction ? [DropIntoEditorController_1._configureDefaultAction] : []));
19880
+ this._register(editor$1.onDropIntoEditor((e) => this.onDropIntoEditor(editor$1, e.position, e.event)));
20088
19881
  }
20089
19882
  clearWidgets() {
20090
19883
  this._postDropWidgetManager.clear();
@@ -20175,9 +19968,9 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
20175
19968
  }
20176
19969
  async extractDataTransferData(dragEvent) {
20177
19970
  if (!dragEvent.dataTransfer) {
20178
- return new VSDataTransfer();
19971
+ return new editor.VSDataTransfer();
20179
19972
  }
20180
- const dataTransfer = toExternalVSDataTransfer(dragEvent.dataTransfer);
19973
+ const dataTransfer = editor.toExternalVSDataTransfer(dragEvent.dataTransfer);
20181
19974
  if (this.treeItemsTransfer.hasData(DraggedTreeItemsIdentifier.prototype)) {
20182
19975
  const data = this.treeItemsTransfer.getData(DraggedTreeItemsIdentifier.prototype);
20183
19976
  if (Array.isArray(data)) {
@@ -33226,8 +33019,8 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
33226
33019
  return viewportRange.containsRange(targetRange);
33227
33020
  }
33228
33021
  function skuFromAccount(account) {
33229
- if (account?.access_type_sku && account?.copilot_plan) {
33230
- return { type: account.access_type_sku, plan: account.copilot_plan };
33022
+ if (account?.entitlementsData?.access_type_sku && account?.entitlementsData?.copilot_plan) {
33023
+ return { type: account.entitlementsData.access_type_sku, plan: account.entitlementsData.copilot_plan };
33231
33024
  }
33232
33025
  return void 0;
33233
33026
  }
@@ -37649,14 +37442,26 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
37649
37442
  });
37650
37443
  this._onDidClick = this._register(new editorWorkerHost.Emitter());
37651
37444
  this.onDidClick = this._onDidClick.event;
37445
+ this._nonWhitespaceCount = editor.derived(this, (reader) => {
37446
+ const data = this._data.read(reader);
37447
+ if (!data) {
37448
+ return void 0;
37449
+ }
37450
+ const ghostText = data.ghostText;
37451
+ const allText = ghostText.parts.map((p) => p.lines.map((l) => l.line).join("")).join("");
37452
+ return allText.replace(/\s/g, "").length;
37453
+ });
37652
37454
  this._extraClassNames = editor.derived(this, (reader) => {
37653
37455
  const extraClasses = this._extraClasses.slice();
37654
- if (this._useSyntaxHighlighting.read(reader)) {
37655
- extraClasses.push("syntax-highlighted");
37656
- }
37657
37456
  if (this._warningState.read(reader)) {
37658
37457
  extraClasses.push("warning");
37659
37458
  }
37459
+ const nonWhitespaceCount = this._nonWhitespaceCount.read(reader);
37460
+ if (this._highlightShortText && nonWhitespaceCount && nonWhitespaceCount < 3) {
37461
+ extraClasses.push("short-text");
37462
+ } else if (this._useSyntaxHighlighting.read(reader)) {
37463
+ extraClasses.push("syntax-highlighted");
37464
+ }
37660
37465
  const extraClassNames = extraClasses.map((c) => ` ${c}`).join("");
37661
37466
  return extraClassNames;
37662
37467
  });
@@ -37728,6 +37533,10 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
37728
37533
  });
37729
37534
  }
37730
37535
  for (const p of uiState.inlineTexts) {
37536
+ let inlineExtraClassNames = "";
37537
+ if (this._highlightShortText && p.text.length < 5) {
37538
+ inlineExtraClassNames += " short-text";
37539
+ }
37731
37540
  decorations.push({
37732
37541
  range: editorWorkerHost.Range.fromPositions(new editorWorkerHost.Position(uiState.lineNumber, p.column)),
37733
37542
  options: {
@@ -37735,7 +37544,7 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
37735
37544
  after: {
37736
37545
  content: p.text,
37737
37546
  tokens: p.tokens,
37738
- inlineClassName: (p.preview ? "ghost-text-decoration-preview" : "ghost-text-decoration") + (this._isClickable ? " clickable" : "") + extraClassNames + p.lineDecorations.map((d) => " " + d.className).join(" "),
37547
+ inlineClassName: (p.preview ? "ghost-text-decoration-preview" : "ghost-text-decoration") + (this._isClickable ? " clickable" : "") + extraClassNames + inlineExtraClassNames + p.lineDecorations.map((d) => " " + d.className).join(" "),
37739
37548
  // TODO: take the ranges into account for line decorations
37740
37549
  cursorStops: editorWorkerHost.InjectedTextCursorStops.Left,
37741
37550
  attachedData: new GhostTextAttachedData(this)
@@ -37764,6 +37573,7 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
37764
37573
  this._shouldKeepCursorStable = options.shouldKeepCursorStable ?? false;
37765
37574
  this._minReservedLineCount = options.minReservedLineCount ?? editor.constObservable(0);
37766
37575
  this._useSyntaxHighlighting = options.useSyntaxHighlighting ?? editor.constObservable(true);
37576
+ this._highlightShortText = options.highlightShortSuggestions ?? false;
37767
37577
  this._editorObs = editor.observableCodeEditor(this._editor);
37768
37578
  this._additionalLinesWidget = this._register(new AdditionalLinesWidget(this._editor, editor.derivedOpts({ owner: this, equalsFn: editor.equalsIfDefinedC(editor.thisEqualsC()) }, (reader) => {
37769
37579
  const uiState = this._state.read(reader);
@@ -40352,11 +40162,12 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
40352
40162
  };
40353
40163
  };
40354
40164
  class InlineEditsGutterIndicatorData {
40355
- constructor(gutterMenuData, originalRange, model, altAction) {
40165
+ constructor(gutterMenuData, originalRange, model, altAction, customization) {
40356
40166
  this.gutterMenuData = gutterMenuData;
40357
40167
  this.originalRange = originalRange;
40358
40168
  this.model = model;
40359
40169
  this.altAction = altAction;
40170
+ this.customization = customization;
40360
40171
  }
40361
40172
  }
40362
40173
  class InlineSuggestionGutterMenuData {
@@ -40539,8 +40350,9 @@ define("vs/toggleHighContrast-Btd2ryZF", ["./editorWorkerHost--0eDLpc-", "./edit
40539
40350
  const pillOffset = this._verticalOffset.read(reader);
40540
40351
  const pillFullyDockedRect = gutterEditArea.withHeight(pillHeight).translateY(pillOffset);
40541
40352
  const pillIsFullyDocked = gutterViewPortWithoutStickyScrollWithoutPaddingTop.containsRect(pillFullyDockedRect);
40542
- const iconNoneDocked = this._tabAction.map((action) => action === InlineEditTabAction.Accept ? editorWorkerHost.Codicon.keyboardTab : editorWorkerHost.Codicon.arrowRight);
40543
- const iconDocked = editor.derived(this, (reader2) => {
40353
+ const customIcon = this._data.read(reader)?.customization?.icon;
40354
+ const iconNoneDocked = customIcon ? editor.constObservable(customIcon) : this._tabAction.map((action) => action === InlineEditTabAction.Accept ? editorWorkerHost.Codicon.keyboardTab : editorWorkerHost.Codicon.arrowRight);
40355
+ const iconDocked = customIcon ? editor.constObservable(customIcon) : editor.derived(this, (reader2) => {
40544
40356
  if (this._isHoveredOverIconDebounced.read(reader2) || this._isHoveredOverInlineEditDebounced.read(reader2)) {
40545
40357
  return editorWorkerHost.Codicon.check;
40546
40358
  }
@@ -44865,7 +44677,8 @@ ${keybindingTooltip}` : void 0,
44865
44677
  useSyntaxHighlighting: this._editorObs.getOption(
44866
44678
  71
44867
44679
  /* EditorOption.inlineSuggest */
44868
- ).map((v) => v.syntaxHighlightingEnabled)
44680
+ ).map((v) => v.syntaxHighlightingEnabled),
44681
+ highlightShortSuggestions: true
44869
44682
  });
44870
44683
  }
44871
44684
  shouldShowHoverAtViewZone(viewZoneId) {
@@ -54739,27 +54552,47 @@ ${json}
54739
54552
  super();
54740
54553
  const editorObs = this._register(editor.observableCodeEditor(editor$1));
54741
54554
  const menu = this._register(menuService.createMenu(editor.MenuId.EditorContent, editor$1.contextKeyService));
54742
- const menuIsEmptyObs = editor.observableFromEvent(this, menu.onDidChange, () => menu.getActions().length === 0);
54555
+ const menuActionsObs = editor.observableFromEvent(this, menu.onDidChange, () => menu.getActions());
54556
+ const menuPrimaryActionIdObs = editor.derived((reader) => {
54557
+ const menuActions = menuActionsObs.read(reader);
54558
+ if (menuActions.length === 0) {
54559
+ return void 0;
54560
+ }
54561
+ const navigationGroup = menuActions.find((group) => group[0] === "navigation");
54562
+ if (navigationGroup && navigationGroup[1].length > 0) {
54563
+ return navigationGroup[1][0].id;
54564
+ }
54565
+ for (const [, actions] of menuActions) {
54566
+ if (actions.length > 0) {
54567
+ return actions[0].id;
54568
+ }
54569
+ }
54570
+ return void 0;
54571
+ });
54743
54572
  this._register(editor.autorun((reader) => {
54744
- const menuIsEmpty = menuIsEmptyObs.read(reader);
54745
- if (menuIsEmpty) {
54573
+ const menuPrimaryActionId = menuPrimaryActionIdObs.read(reader);
54574
+ if (!menuPrimaryActionId) {
54746
54575
  return;
54747
54576
  }
54748
54577
  const container = editor.h("div.floating-menu-overlay-widget");
54749
- container.root.style.height = "28px";
54578
+ container.root.style.height = "26px";
54750
54579
  const toolbar = instantiationService.createInstance(editor.MenuWorkbenchToolBar, container.root, editor.MenuId.EditorContent, {
54751
54580
  actionViewItemProvider: (action, options) => {
54752
54581
  if (!(action instanceof editor.MenuItemAction)) {
54753
54582
  return void 0;
54754
54583
  }
54755
- const keybinding = keybindingService.lookupKeybinding(action.id);
54756
- if (!keybinding) {
54757
- return void 0;
54758
- }
54759
54584
  return instantiationService.createInstance(class extends editor.MenuEntryActionViewItem {
54585
+ render(container2) {
54586
+ super.render(container2);
54587
+ if (action.id === menuPrimaryActionId) {
54588
+ this.element?.classList.add("primary");
54589
+ }
54590
+ }
54760
54591
  updateLabel() {
54592
+ const keybinding = keybindingService.lookupKeybinding(action.id);
54593
+ const keybindingLabel2 = keybinding ? keybinding.getLabel() : void 0;
54761
54594
  if (this.options.label && this.label) {
54762
- this.label.textContent = `${this._commandAction.label} (${keybinding.getLabel()})`;
54595
+ this.label.textContent = keybindingLabel2 ? `${this._commandAction.label} (${keybindingLabel2})` : this._commandAction.label;
54763
54596
  }
54764
54597
  }
54765
54598
  }, action, { ...options, keybindingNotRenderedWithLabel: true });