@lvce-editor/editor-worker 18.6.0 → 18.7.0

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.
@@ -63,7 +63,7 @@ class AssertionError extends Error {
63
63
  const Object$1 = 1;
64
64
  const Number$1 = 2;
65
65
  const Array$1 = 3;
66
- const String = 4;
66
+ const String$1 = 4;
67
67
  const Boolean$1 = 5;
68
68
  const Function$1 = 6;
69
69
  const Null = 7;
@@ -75,7 +75,7 @@ const getType = value => {
75
75
  case 'function':
76
76
  return Function$1;
77
77
  case 'string':
78
- return String;
78
+ return String$1;
79
79
  case 'object':
80
80
  if (value === null) {
81
81
  return Null;
@@ -110,7 +110,7 @@ const array = value => {
110
110
  };
111
111
  const string = value => {
112
112
  const type = getType(value);
113
- if (type !== String) {
113
+ if (type !== String$1) {
114
114
  throw new AssertionError('expected value to be of type string');
115
115
  }
116
116
  };
@@ -553,7 +553,7 @@ const execute$1 = (command, ...args) => {
553
553
 
554
554
  const Two$1 = '2.0';
555
555
  const callbacks = Object.create(null);
556
- const get$9 = id => {
556
+ const get$8 = id => {
557
557
  return callbacks[id];
558
558
  };
559
559
  const remove$9 = id => {
@@ -702,7 +702,7 @@ const warn$1 = (...args) => {
702
702
  console.warn(...args);
703
703
  };
704
704
  const resolve = (id, response) => {
705
- const fn = get$9(id);
705
+ const fn = get$8(id);
706
706
  if (!fn) {
707
707
  console.log(response);
708
708
  warn$1(`callback ${id} may already be disposed`);
@@ -1083,18 +1083,6 @@ const create$b = async ({
1083
1083
  return rpc;
1084
1084
  };
1085
1085
 
1086
- const Script$1 = 2;
1087
-
1088
- const CompletionWorker = 301;
1089
- const DebugWorker = 55;
1090
- const EditorWorker = 99;
1091
- const ExtensionHostWorker = 44;
1092
- const ExtensionManagementWorker = 9006;
1093
- const IconThemeWorker = 7009;
1094
- const MarkdownWorker = 300;
1095
- const OpenerWorker = 4561;
1096
- const RendererWorker$1 = 1;
1097
-
1098
1086
  const createMockRpc = ({
1099
1087
  commandMap
1100
1088
  }) => {
@@ -1116,10 +1104,10 @@ const createMockRpc = ({
1116
1104
  };
1117
1105
 
1118
1106
  const rpcs = Object.create(null);
1119
- const set$f = (id, rpc) => {
1107
+ const set$e = (id, rpc) => {
1120
1108
  rpcs[id] = rpc;
1121
1109
  };
1122
- const get$8 = id => {
1110
+ const get$7 = id => {
1123
1111
  return rpcs[id];
1124
1112
  };
1125
1113
  const remove$8 = id => {
@@ -1130,18 +1118,18 @@ const remove$8 = id => {
1130
1118
  const create$a = rpcId => {
1131
1119
  return {
1132
1120
  async dispose() {
1133
- const rpc = get$8(rpcId);
1121
+ const rpc = get$7(rpcId);
1134
1122
  await rpc.dispose();
1135
1123
  },
1136
1124
  // @ts-ignore
1137
1125
  invoke(method, ...params) {
1138
- const rpc = get$8(rpcId);
1126
+ const rpc = get$7(rpcId);
1139
1127
  // @ts-ignore
1140
1128
  return rpc.invoke(method, ...params);
1141
1129
  },
1142
1130
  // @ts-ignore
1143
1131
  invokeAndTransfer(method, ...params) {
1144
- const rpc = get$8(rpcId);
1132
+ const rpc = get$7(rpcId);
1145
1133
  // @ts-ignore
1146
1134
  return rpc.invokeAndTransfer(method, ...params);
1147
1135
  },
@@ -1149,7 +1137,7 @@ const create$a = rpcId => {
1149
1137
  const mockRpc = createMockRpc({
1150
1138
  commandMap
1151
1139
  });
1152
- set$f(rpcId, mockRpc);
1140
+ set$e(rpcId, mockRpc);
1153
1141
  // @ts-ignore
1154
1142
  mockRpc[Symbol.dispose] = () => {
1155
1143
  remove$8(rpcId);
@@ -1158,554 +1146,205 @@ const create$a = rpcId => {
1158
1146
  return mockRpc;
1159
1147
  },
1160
1148
  set(rpc) {
1161
- set$f(rpcId, rpc);
1149
+ set$e(rpcId, rpc);
1162
1150
  }
1163
1151
  };
1164
1152
  };
1165
1153
 
1154
+ const Text$1 = 12;
1155
+ const Reference = 100;
1156
+
1157
+ const AltKey = 'event.altKey';
1158
+ const Button = 'event.button';
1159
+ const ClientX = 'event.clientX';
1160
+ const ClientY = 'event.clientY';
1161
+ const DeltaMode = 'event.deltaMode';
1162
+ const DeltaY = 'event.deltaY';
1163
+
1164
+ const Backspace = 1;
1165
+ const Tab$1 = 2;
1166
+ const Enter = 3;
1167
+ const Escape = 8;
1168
+ const Space$1 = 9;
1169
+ const End = 255;
1170
+ const Home = 12;
1171
+ const LeftArrow = 13;
1172
+ const UpArrow = 14;
1173
+ const RightArrow = 15;
1174
+ const DownArrow = 16;
1175
+ const Delete$1 = 18;
1176
+ const KeyA = 29;
1177
+ const KeyC = 31;
1178
+ const KeyD = 32;
1179
+ const KeyF = 34;
1180
+ const KeyH = 36;
1181
+ const KeyJ = 38;
1182
+ const KeyK = 39;
1183
+ const KeyL = 40;
1184
+ const KeyO = 43;
1185
+ const KeyV = 50;
1186
+ const KeyX = 52;
1187
+ const KeyZ = 54;
1188
+ const F2 = 58;
1189
+ const F3 = 59;
1190
+ const F4 = 60;
1191
+ const F12 = 68;
1192
+ const Period = 87;
1193
+ const Slash$1 = 88;
1194
+ const BracketLeft = 90;
1195
+ const BracketRight = 92;
1196
+
1197
+ const CodeGenerator = 1;
1198
+ const ColorPicker$1 = 2;
1199
+ const Completion = 3;
1200
+ const CompletionDetail = 4;
1201
+ const Find = 5;
1202
+ const Hover = 6;
1203
+ const Rename$1 = 7;
1204
+ const SourceAction$1 = 8;
1205
+
1206
+ const CtrlCmd = 1 << 11 >>> 0;
1207
+ const Shift = 1 << 10 >>> 0;
1208
+ const Alt$1 = 1 << 9 >>> 0;
1209
+
1210
+ const Editor$1 = 3;
1211
+ const SourceControl = 22;
1212
+
1213
+ const Separator = 1;
1214
+ const None = 0;
1215
+
1216
+ const CompletionWorker = 301;
1217
+ const DebugWorker = 55;
1218
+ const EditorWorker = 99;
1219
+ const ExtensionHostWorker = 44;
1220
+ const ExtensionManagementWorker = 9006;
1221
+ const IconThemeWorker = 7009;
1222
+ const MarkdownWorker = 300;
1223
+ const OpenerWorker = 4561;
1224
+ const RendererWorker$1 = 1;
1225
+
1226
+ const FocusSelector = 'Viewlet.focusSelector';
1227
+ const SetCss$1 = 'Viewlet.setCss';
1228
+ const SetFocusContext$1 = 'Viewlet.setFocusContext';
1229
+ const SetPatches = 'Viewlet.setPatches';
1230
+
1231
+ const FocusEditorText$1 = 12;
1232
+ const FocusExplorer = 13;
1233
+
1166
1234
  const {
1167
- dispose: dispose$3,
1168
1235
  invoke: invoke$f,
1169
- invokeAndTransfer: invokeAndTransfer$2,
1170
- registerMockRpc: registerMockRpc$1,
1171
- set: set$e
1236
+ set: set$d
1172
1237
  } = create$a(ExtensionHostWorker);
1173
- const executeReferenceProvider = async (id, offset) => {
1174
- // @ts-ignore
1175
- return invoke$f('ExtensionHostReference.executeReferenceProvider', id, offset);
1176
- };
1177
- const executeFileReferenceProvider = async id => {
1178
- // @ts-ignore
1179
- return invoke$f('ExtensionHostReference.executeFileReferenceProvider', id);
1180
- };
1181
- const getRuntimeStatus = async extensionId => {
1182
- // @ts-ignore
1183
- return invoke$f('ExtensionHost.getRuntimeStatus', extensionId);
1184
- };
1185
- const getEnabledOutputProviderIds = async () => {
1186
- const channels = await invoke$f('Output.getEnabledProviders');
1187
- return channels;
1188
- };
1189
1238
 
1190
1239
  const ExtensionHost = {
1191
1240
  __proto__: null,
1192
- dispose: dispose$3,
1193
- executeFileReferenceProvider,
1194
- executeReferenceProvider,
1195
- getEnabledOutputProviderIds,
1196
- getRuntimeStatus,
1197
1241
  invoke: invoke$f,
1198
- invokeAndTransfer: invokeAndTransfer$2,
1199
- registerMockRpc: registerMockRpc$1,
1200
- set: set$e
1242
+ set: set$d
1201
1243
  };
1202
1244
 
1203
1245
  const {
1204
1246
  invoke: invoke$e,
1205
- set: set$d
1247
+ set: set$c
1206
1248
  } = create$a(ExtensionManagementWorker);
1207
1249
  const getLanguages$1 = (platform, assetDir) => {
1208
1250
  return invoke$e('Extensions.getLanguages', platform, assetDir);
1209
1251
  };
1210
1252
 
1211
1253
  const {
1212
- dispose: dispose$2,
1213
1254
  invoke: invoke$d,
1214
- invokeAndTransfer: invokeAndTransfer$1,
1215
- registerMockRpc,
1216
- set: set$c
1217
- } = create$a(RendererWorker$1);
1218
- const searchFileHtml = async uri => {
1219
- return invoke$d('ExtensionHost.searchFileWithHtml', uri);
1220
- };
1221
- const getFilePathElectron = async file => {
1222
- return invoke$d('FileSystemHandle.getFilePathElectron', file);
1223
- };
1224
- const handleModifiedStatusChange = async (uri, modified) => {
1225
- return invoke$d('Main.handleModifiedStatusChange', uri, modified);
1226
- };
1227
- /**
1228
- * @deprecated
1229
- */
1230
- const showContextMenu = async (x, y, id, ...args) => {
1231
- return invoke$d('ContextMenu.show', x, y, id, ...args);
1255
+ set: set$b
1256
+ } = create$a(OpenerWorker);
1257
+ const openUrl = async (url, platform) => {
1258
+ return invoke$d('Open.openUrl', url, platform);
1232
1259
  };
1260
+
1261
+ const {
1262
+ invoke: invoke$c,
1263
+ invokeAndTransfer,
1264
+ set: set$a
1265
+ } = create$a(RendererWorker$1);
1233
1266
  const showContextMenu2 = async (uid, menuId, x, y, args) => {
1234
1267
  number(uid);
1235
1268
  number(menuId);
1236
1269
  number(x);
1237
1270
  number(y);
1238
- await invoke$d('ContextMenu.show2', uid, menuId, x, y, args);
1239
- };
1240
- const getElectronVersion = async () => {
1241
- return invoke$d('Process.getElectronVersion');
1242
- };
1243
- const applyBulkReplacement = async bulkEdits => {
1244
- await invoke$d('BulkReplacement.applyBulkReplacement', bulkEdits);
1245
- };
1246
- const setColorTheme = async id => {
1247
- return invoke$d(/* ColorTheme.setColorTheme */'ColorTheme.setColorTheme', /* colorThemeId */id);
1248
- };
1249
- const getNodeVersion = async () => {
1250
- return invoke$d('Process.getNodeVersion');
1251
- };
1252
- const getBadgeCounts = async () => {
1253
- return invoke$d('Layout.getBadgeCounts');
1254
- };
1255
- const getChromeVersion = async () => {
1256
- return invoke$d('Process.getChromeVersion');
1257
- };
1258
- const getV8Version = async () => {
1259
- return invoke$d('Process.getV8Version');
1260
- };
1261
- const getFileHandles = async fileIds => {
1262
- const files = await invoke$d('FileSystemHandle.getFileHandles', fileIds);
1263
- return files;
1264
- };
1265
- const setWorkspacePath = async path => {
1266
- await invoke$d('Workspace.setPath', path);
1267
- };
1268
- const registerWebViewInterceptor = async (id, port) => {
1269
- await invokeAndTransfer$1('WebView.registerInterceptor', id, port);
1270
- };
1271
- const unregisterWebViewInterceptor = async id => {
1272
- await invoke$d('WebView.unregisterInterceptor', id);
1273
- };
1274
- const sendMessagePortToEditorWorker = async (port, rpcId) => {
1275
- const command = 'HandleMessagePort.handleMessagePort';
1276
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToEditorWorker', port, command, rpcId);
1277
- };
1278
- const sendMessagePortToClipBoardWorker = async (port, rpcId) => {
1279
- const command = 'ClipBoard.handleMessagePort';
1280
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToClipBoardWorker', port, command, rpcId);
1271
+ await invoke$c('ContextMenu.show2', uid, menuId, x, y, args);
1281
1272
  };
1282
1273
  const sendMessagePortToOpenerWorker = async (port, rpcId) => {
1283
1274
  const command = 'HandleMessagePort.handleMessagePort';
1284
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToOpenerWorker', port, command, rpcId);
1285
- };
1286
- const sendMessagePortToMainAreaWorker = async (port, rpcId) => {
1287
- const command = 'HandleMessagePort.handleMessagePort';
1288
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToMainAreaWorker', port, command, rpcId);
1289
- };
1290
- const sendMessagePortToErrorWorker = async (port, rpcId) => {
1291
- const command = 'Errors.handleMessagePort';
1292
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToErrorWorker', port, command, rpcId);
1293
- };
1294
- const sendMessagePortToMarkdownWorker = async (port, rpcId) => {
1295
- const command = 'Markdown.handleMessagePort';
1296
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToMarkdownWorker', port, command, rpcId);
1297
- };
1298
- const sendMessagePortToIconThemeWorker = async (port, rpcId) => {
1299
- const command = 'IconTheme.handleMessagePort';
1300
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToIconThemeWorker', port, command, rpcId);
1301
- };
1302
- const sendMessagePortToFileSystemWorker = async (port, rpcId) => {
1303
- const command = 'FileSystem.handleMessagePort';
1304
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSystemWorker', port, command, rpcId);
1275
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToOpenerWorker', port, command, rpcId);
1305
1276
  };
1306
1277
  const readFile = async uri => {
1307
- return invoke$d('FileSystem.readFile', uri);
1308
- };
1309
- const getWebViewSecret = async key => {
1310
- return invoke$d('WebView.getSecret', key);
1311
- };
1312
- const setWebViewPort = async (uid, port, origin, portType) => {
1313
- return invokeAndTransfer$1('WebView.setPort', uid, port, origin, portType);
1314
- };
1315
- const setFocus$1 = key => {
1316
- return invoke$d('Focus.setFocus', key);
1317
- };
1318
- const getFileIcon = async options => {
1319
- return invoke$d('IconTheme.getFileIcon', options);
1320
- };
1321
- const getColorThemeNames = async () => {
1322
- return invoke$d('ColorTheme.getColorThemeNames');
1323
- };
1324
- const disableExtension = async id => {
1325
- return invoke$d('ExtensionManagement.disable', id);
1326
- };
1327
- const enableExtension = async id => {
1328
- return invoke$d('ExtensionManagement.enable', id);
1329
- };
1330
- const disposeEditor = async uid => {
1331
- return invoke$d('Viewlet.dispose', uid);
1332
- };
1333
- const handleDebugChange = async params => {
1334
- return invoke$d('Run And Debug.handleChange', params);
1335
- };
1336
- const getFolderIcon = async options => {
1337
- return invoke$d('IconTheme.getFolderIcon', options);
1278
+ return invoke$c('FileSystem.readFile', uri);
1338
1279
  };
1339
1280
  const handleWorkspaceRefresh = async () => {
1340
- return invoke$d('Layout.handleWorkspaceRefresh');
1341
- };
1342
- const closeWidget = async widgetId => {
1343
- return invoke$d('Viewlet.closeWidget', widgetId);
1344
- };
1345
- const createViewlet = async (viewletModuleId, editorUid, tabId, bounds, uri) => {
1346
- return invoke$d('Layout.createViewlet', viewletModuleId, editorUid, tabId, bounds, uri);
1281
+ return invoke$c('Layout.handleWorkspaceRefresh');
1347
1282
  };
1348
1283
  const sendMessagePortToExtensionHostWorker = async (port, rpcId = 0) => {
1349
1284
  const command = 'HandleMessagePort.handleMessagePort2';
1350
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, rpcId);
1351
- };
1352
- const getViewletModuleId = async uri => {
1353
- return invoke$d('Layout.getModuleId', uri);
1354
- };
1355
- const showPanel = async () => {
1356
- return invoke$d('Layout.showPanel');
1357
- };
1358
- const showPreview = async () => {
1359
- return invoke$d('Layout.showPreview');
1360
- };
1361
- const saveEditor = async () => {
1362
- return invoke$d('Editor.save');
1363
- };
1364
- const togglePanelView = async id => {
1365
- return invoke$d('Panel.toggleView', id);
1366
- };
1367
- const resizeViewlet = async (uid, dimensions) => {
1368
- return invoke$d('Viewlet.resize', uid, dimensions);
1369
- };
1370
- const sendMessagePortToFileSearchWorker = async (port, rpcId = 0) => {
1371
- const command = 'QuickPick.handleMessagePort';
1372
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSearchWorker', port, command, rpcId);
1373
- };
1374
- const sendMessagePortToSearchProcess = async port => {
1375
- await invokeAndTransfer$1('SendMessagePortToElectron.sendMessagePortToElectron', port, 'HandleMessagePortForSearchProcess.handleMessagePortForSearchProcess');
1376
- };
1377
- const confirm = async (message, options) => {
1378
- const result = await invoke$d('ConfirmPrompt.prompt', message, options);
1379
- return result;
1380
- };
1381
- const getRecentlyOpened = async () => {
1382
- return invoke$d(/* RecentlyOpened.getRecentlyOpened */'RecentlyOpened.getRecentlyOpened');
1383
- };
1384
- const getKeyBindings$1 = async () => {
1385
- return invoke$d('KeyBindingsInitial.getKeyBindings');
1285
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, rpcId);
1386
1286
  };
1387
1287
  const writeClipBoardText = async text => {
1388
- await invoke$d('ClipBoard.writeText', /* text */text);
1389
- };
1390
- const writeFile = async (uri, text) => {
1391
- await invoke$d('FileSystem.writeFile', uri, text);
1392
- };
1393
- const handleUriChange = async (uri, newUri) => {
1394
- await invoke$d('Main.handleUriChange', uri, newUri);
1288
+ await invoke$c('ClipBoard.writeText', /* text */text);
1395
1289
  };
1396
1290
  const readClipBoardText = async () => {
1397
- return invoke$d('ClipBoard.readText');
1398
- };
1399
- const writeClipBoardImage = async blob => {
1400
- await invoke$d('ClipBoard.writeImage', /* text */blob);
1401
- };
1402
- const searchFileMemory = async uri => {
1403
- return invoke$d('ExtensionHost.searchFileWithMemory', uri);
1404
- };
1405
- const searchFileFetch = async uri => {
1406
- return invoke$d('ExtensionHost.searchFileWithFetch', uri);
1407
- };
1408
- const showMessageBox = async options => {
1409
- return invoke$d('ElectronDialog.showMessageBox', options);
1410
- };
1411
- const handleDebugResumed = async params => {
1412
- await invoke$d('Run And Debug.handleResumed', params);
1413
- };
1414
- const openWidget = async name => {
1415
- await invoke$d('Viewlet.openWidget', name);
1416
- };
1417
- const getIcons = async requests => {
1418
- const icons = await invoke$d('IconTheme.getIcons', requests);
1419
- return icons;
1291
+ return invoke$c('ClipBoard.readText');
1420
1292
  };
1421
1293
  const activateByEvent$1 = (event, assetDir, platform) => {
1422
- return invoke$d('ExtensionHostManagement.activateByEvent', event, assetDir, platform);
1423
- };
1424
- const setAdditionalFocus = focusKey => {
1425
- return invoke$d('Focus.setAdditionalFocus', focusKey);
1426
- };
1427
- const getActiveEditorId = () => {
1428
- return invoke$d('GetActiveEditor.getActiveEditorId');
1429
- };
1430
- const getWorkspacePath = () => {
1431
- return invoke$d('Workspace.getPath');
1432
- };
1433
- const sendMessagePortToRendererProcess = async port => {
1434
- const command = 'HandleMessagePort.handleMessagePort';
1435
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToRendererProcess', port, command, DebugWorker);
1294
+ return invoke$c('ExtensionHostManagement.activateByEvent', event, assetDir, platform);
1436
1295
  };
1437
1296
  const sendMessagePortToTextMeasurementWorker = async port => {
1438
1297
  const command = 'TextMeasurement.handleMessagePort';
1439
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToTextMeasurementWorker', port, command, 0);
1440
- };
1441
- const sendMessagePortToSourceControlWorker = async port => {
1442
- const command = 'SourceControl.handleMessagePort';
1443
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToSourceControlWorker', port, command, 0);
1444
- };
1445
- const sendMessagePortToSharedProcess = async port => {
1446
- const command = 'HandleElectronMessagePort.handleElectronMessagePort';
1447
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToSharedProcess', port, command, 0);
1448
- };
1449
- const sendMessagePortToFileSystemProcess = async (port, rpcId) => {
1450
- const command = 'HandleMessagePortForFileSystemProcess.handleMessagePortForFileSystemProcess';
1451
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToSharedProcess', port, command, rpcId);
1452
- };
1453
- const sendMessagePortToIframeWorker = async (port, rpcId) => {
1454
- const command = 'Iframes.handleMessagePort';
1455
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToIframeWorker', port, command, rpcId);
1298
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToTextMeasurementWorker', port, command, 0);
1456
1299
  };
1457
1300
  const sendMessagePortToExtensionManagementWorker = async (port, rpcId) => {
1458
1301
  const command = 'Extensions.handleMessagePort';
1459
- await invokeAndTransfer$1('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionManagementWorker', port, command, rpcId);
1302
+ await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionManagementWorker', port, command, rpcId);
1460
1303
  };
1461
1304
  const getPreference = async key => {
1462
- return await invoke$d('Preferences.get', key);
1463
- };
1464
- const getAllExtensions = async () => {
1465
- return invoke$d('ExtensionManagement.getAllExtensions');
1466
- };
1467
- const rerenderEditor = async key => {
1468
- return invoke$d('Editor.rerender', key);
1469
- };
1470
- const handleDebugPaused = async params => {
1471
- await invoke$d('Run And Debug.handlePaused', params);
1305
+ return await invoke$c('Preferences.get', key);
1472
1306
  };
1473
1307
  const openUri = async (uri, focus, options) => {
1474
- await invoke$d('Main.openUri', uri, focus, options);
1308
+ await invoke$c('Main.openUri', uri, focus, options);
1475
1309
  };
1476
1310
  const sendMessagePortToSyntaxHighlightingWorker$1 = async port => {
1477
- await invokeAndTransfer$1('SendMessagePortToSyntaxHighlightingWorker.sendMessagePortToSyntaxHighlightingWorker', port, 'HandleMessagePort.handleMessagePort2');
1478
- };
1479
- const handleDebugScriptParsed = async script => {
1480
- await invoke$d('Run And Debug.handleScriptParsed', script);
1481
- };
1482
- const getWindowId = async () => {
1483
- return invoke$d('GetWindowId.getWindowId');
1484
- };
1485
- const getBlob = async uri => {
1486
- return invoke$d('FileSystem.getBlob', uri);
1487
- };
1488
- const getExtensionCommands = async () => {
1489
- return invoke$d('ExtensionHost.getCommands');
1490
- };
1491
- const showErrorDialog = async errorInfo => {
1492
- await invoke$d('ErrorHandling.showErrorDialog', errorInfo);
1493
- };
1494
- const getFolderSize = async uri => {
1495
- return await invoke$d('FileSystem.getFolderSize', uri);
1496
- };
1497
- const getExtension = async id => {
1498
- return invoke$d('ExtensionManagement.getExtension', id);
1499
- };
1500
- const getMarkdownDom = async html => {
1501
- return invoke$d('Markdown.getVirtualDom', html);
1502
- };
1503
- const renderMarkdown = async (markdown, options) => {
1504
- return invoke$d('Markdown.renderMarkdown', markdown, options);
1505
- };
1506
- const openNativeFolder = async uri => {
1507
- await invoke$d('OpenNativeFolder.openNativeFolder', uri);
1508
- };
1509
- const uninstallExtension = async id => {
1510
- return invoke$d('ExtensionManagement.uninstall', id);
1511
- };
1512
- const installExtension = async id => {
1513
- return invoke$d('ExtensionManagement.install', id);
1514
- };
1515
- const minimizeWindow = async () => {
1516
- return invoke$d('ElectronWindow.minimize');
1517
- };
1518
- const unmaximizeWindow = async () => {
1519
- return invoke$d('ElectronWindow.unmaximize');
1520
- };
1521
- const maximizeWindow = async () => {
1522
- return invoke$d('ElectronWindow.maximize');
1523
- };
1524
- const showSideBar = async (id, focus) => {
1525
- return invoke$d('SideBar.show', id, focus);
1526
- };
1527
- const closeWindow = async () => {
1528
- return invoke$d('ElectronWindow.close');
1529
- };
1530
- const openExtensionSearch = async () => {
1531
- return invoke$d('SideBar.openViewlet', 'Extensions');
1532
- };
1533
- const setExtensionsSearchValue = async searchValue => {
1534
- return invoke$d('Extensions.handleInput', searchValue, Script$1);
1535
- };
1536
- const openExternal$1 = async uri => {
1537
- await invoke$d('Open.openExternal', uri);
1538
- };
1539
- const openUrl$1 = async uri => {
1540
- await invoke$d('Open.openUrl', uri);
1541
- };
1542
- const getAllPreferences = async () => {
1543
- return invoke$d('Preferences.getAll');
1544
- };
1545
- const showSaveFilePicker = async () => {
1546
- return invoke$d('FilePicker.showSaveFilePicker');
1547
- };
1548
- const getLogsDir = async () => {
1549
- return invoke$d('PlatformPaths.getLogsDir');
1550
- };
1551
- const measureTextBlockHeight$1 = async (actualInput, fontFamily, fontSize, lineHeightPx, width) => {
1552
- return invoke$d(`MeasureTextHeight.measureTextBlockHeight`, actualInput, fontFamily, fontSize, lineHeightPx, width);
1553
- };
1554
- const refreshOutput = async () => {
1555
- await invoke$d('Output.refresh');
1311
+ await invokeAndTransfer('SendMessagePortToSyntaxHighlightingWorker.sendMessagePortToSyntaxHighlightingWorker', port, 'HandleMessagePort.handleMessagePort2');
1556
1312
  };
1557
1313
 
1558
1314
  const RendererWorker = {
1559
1315
  __proto__: null,
1560
1316
  activateByEvent: activateByEvent$1,
1561
- applyBulkReplacement,
1562
- closeWidget,
1563
- closeWindow,
1564
- confirm,
1565
- createViewlet,
1566
- disableExtension,
1567
- dispose: dispose$2,
1568
- disposeEditor,
1569
- enableExtension,
1570
- getActiveEditorId,
1571
- getAllExtensions,
1572
- getAllPreferences,
1573
- getBadgeCounts,
1574
- getBlob,
1575
- getChromeVersion,
1576
- getColorThemeNames,
1577
- getElectronVersion,
1578
- getExtension,
1579
- getExtensionCommands,
1580
- getFileHandles,
1581
- getFileIcon,
1582
- getFilePathElectron,
1583
- getFolderIcon,
1584
- getFolderSize,
1585
- getIcons,
1586
- getKeyBindings: getKeyBindings$1,
1587
- getLogsDir,
1588
- getMarkdownDom,
1589
- getNodeVersion,
1590
1317
  getPreference,
1591
- getRecentlyOpened,
1592
- getV8Version,
1593
- getViewletModuleId,
1594
- getWebViewSecret,
1595
- getWindowId,
1596
- getWorkspacePath,
1597
- handleDebugChange,
1598
- handleDebugPaused,
1599
- handleDebugResumed,
1600
- handleDebugScriptParsed,
1601
- handleModifiedStatusChange,
1602
- handleUriChange,
1603
1318
  handleWorkspaceRefresh,
1604
- installExtension,
1605
- invoke: invoke$d,
1606
- invokeAndTransfer: invokeAndTransfer$1,
1607
- maximizeWindow,
1608
- measureTextBlockHeight: measureTextBlockHeight$1,
1609
- minimizeWindow,
1610
- openExtensionSearch,
1611
- openExternal: openExternal$1,
1612
- openNativeFolder,
1319
+ invoke: invoke$c,
1320
+ invokeAndTransfer,
1613
1321
  openUri,
1614
- openUrl: openUrl$1,
1615
- openWidget,
1616
1322
  readClipBoardText,
1617
1323
  readFile,
1618
- refreshOutput,
1619
- registerMockRpc,
1620
- registerWebViewInterceptor,
1621
- renderMarkdown,
1622
- rerenderEditor,
1623
- resizeViewlet,
1624
- saveEditor,
1625
- searchFileFetch,
1626
- searchFileHtml,
1627
- searchFileMemory,
1628
- sendMessagePortToClipBoardWorker,
1629
- sendMessagePortToEditorWorker,
1630
- sendMessagePortToErrorWorker,
1631
1324
  sendMessagePortToExtensionHostWorker,
1632
1325
  sendMessagePortToExtensionManagementWorker,
1633
- sendMessagePortToFileSearchWorker,
1634
- sendMessagePortToFileSystemProcess,
1635
- sendMessagePortToFileSystemWorker,
1636
- sendMessagePortToIconThemeWorker,
1637
- sendMessagePortToIframeWorker,
1638
- sendMessagePortToMainAreaWorker,
1639
- sendMessagePortToMarkdownWorker,
1640
1326
  sendMessagePortToOpenerWorker,
1641
- sendMessagePortToRendererProcess,
1642
- sendMessagePortToSearchProcess,
1643
- sendMessagePortToSharedProcess,
1644
- sendMessagePortToSourceControlWorker,
1645
1327
  sendMessagePortToSyntaxHighlightingWorker: sendMessagePortToSyntaxHighlightingWorker$1,
1646
1328
  sendMessagePortToTextMeasurementWorker,
1647
- set: set$c,
1648
- setAdditionalFocus,
1649
- setColorTheme,
1650
- setExtensionsSearchValue,
1651
- setFocus: setFocus$1,
1652
- setWebViewPort,
1653
- setWorkspacePath,
1654
- showContextMenu,
1329
+ set: set$a,
1655
1330
  showContextMenu2,
1656
- showErrorDialog,
1657
- showMessageBox,
1658
- showPanel,
1659
- showPreview,
1660
- showSaveFilePicker,
1661
- showSideBar,
1662
- togglePanelView,
1663
- uninstallExtension,
1664
- unmaximizeWindow,
1665
- unregisterWebViewInterceptor,
1666
- writeClipBoardImage,
1667
- writeClipBoardText,
1668
- writeFile
1669
- };
1670
-
1671
- const {
1672
- invoke: invoke$c,
1673
- set: set$b
1674
- } = create$a(OpenerWorker);
1675
- const openUrl = async (url, platform) => {
1676
- return invoke$c('Open.openUrl', url, platform);
1331
+ writeClipBoardText
1677
1332
  };
1678
1333
 
1679
1334
  const {
1680
1335
  invoke: invoke$b,
1681
- set: set$a
1336
+ set: set$9
1682
1337
  } = create$a(IconThemeWorker);
1683
1338
 
1684
1339
  const {
1685
- dispose: dispose$1,
1686
1340
  invoke: invoke$a,
1687
- invokeAndTransfer,
1688
- set: set$9
1341
+ set: set$8
1689
1342
  } = create$a(MarkdownWorker);
1690
- const tokenizeIncremental = (uid, languageId, oldLine, newLine, rowIndex, minLineY) => {
1691
- return invoke$a('TokenizeIncremental.tokenizeIncremental', uid, languageId, oldLine, newLine, rowIndex, minLineY);
1692
- };
1693
- const getTokensViewPort = (slimEditor, startLineIndex, endLineIndex, hasLinesToSend, id, linesToSend) => {
1694
- return invoke$a('GetTokensViewport.getTokensViewport', slimEditor, startLineIndex, endLineIndex, hasLinesToSend, id, linesToSend);
1695
- };
1696
- const loadTokenizer$1 = (languageId, tokenizerPath) => {
1697
- return invoke$a('Tokenizer.load', languageId, tokenizerPath);
1698
- };
1699
1343
 
1700
1344
  const SyntaxHighlightingWorker = {
1701
1345
  __proto__: null,
1702
- dispose: dispose$1,
1703
- getTokensViewPort,
1704
1346
  invoke: invoke$a,
1705
- invokeAndTransfer,
1706
- loadTokenizer: loadTokenizer$1,
1707
- set: set$9,
1708
- tokenizeIncremental
1347
+ set: set$8
1709
1348
  };
1710
1349
 
1711
1350
  const createLazyRpc = rpcId => {
@@ -1713,7 +1352,7 @@ const createLazyRpc = rpcId => {
1713
1352
  let factory;
1714
1353
  const createRpc = async () => {
1715
1354
  const rpc = await factory();
1716
- set$f(rpcId, rpc);
1355
+ set$e(rpcId, rpc);
1717
1356
  };
1718
1357
  const ensureRpc = async () => {
1719
1358
  if (!rpcPromise) {
@@ -1724,12 +1363,12 @@ const createLazyRpc = rpcId => {
1724
1363
  return {
1725
1364
  async invoke(method, ...params) {
1726
1365
  await ensureRpc();
1727
- const rpc = get$8(rpcId);
1366
+ const rpc = get$7(rpcId);
1728
1367
  return rpc.invoke(method, ...params);
1729
1368
  },
1730
1369
  async invokeAndTransfer(method, ...params) {
1731
1370
  await ensureRpc();
1732
- const rpc = get$8(rpcId);
1371
+ const rpc = get$7(rpcId);
1733
1372
  return rpc.invokeAndTransfer(method, ...params);
1734
1373
  },
1735
1374
  setFactory(value) {
@@ -1878,7 +1517,7 @@ const launchWorker = async (name, url, intializeCommand) => {
1878
1517
  commandMap: {},
1879
1518
  isMessagePortOpen: true,
1880
1519
  async send(port) {
1881
- await invokeAndTransfer$1('IpcParent.create', {
1520
+ await invokeAndTransfer('IpcParent.create', {
1882
1521
  method: ModuleWorkerAndWorkaroundForChromeDevtoolsBug,
1883
1522
  name,
1884
1523
  port,
@@ -1929,18 +1568,27 @@ const loadContent$3 = async (state, parentUid) => {
1929
1568
  };
1930
1569
  };
1931
1570
 
1571
+ const editorStates = create$9();
1932
1572
  const {
1933
- get: get$7,
1934
1573
  getCommandIds,
1935
1574
  registerCommands,
1936
- set: set$8,
1937
- wrapCommand: wrapCommand$1,
1575
+ wrapCommand,
1938
1576
  wrapGetter
1939
- } = create$9();
1577
+ } = editorStates;
1578
+ const get$6 = id => {
1579
+ return editorStates.get(id);
1580
+ };
1581
+ const getKeys$2 = () => {
1582
+ const keys = editorStates.getKeys();
1583
+ return keys.map(String);
1584
+ };
1585
+ const set$7 = (id, oldEditor, newEditor) => {
1586
+ editorStates.set(id, oldEditor, newEditor);
1587
+ };
1940
1588
 
1941
1589
  const emptyIncrementalEdits = [];
1942
1590
 
1943
- const ColorPicker$1 = 41;
1591
+ const ColorPicker = 41;
1944
1592
  const EditorCompletion = 9;
1945
1593
  const Empty = 0;
1946
1594
  const FindWidget = 16;
@@ -2021,76 +1669,9 @@ const createEditor2 = (id, uri, x, y, width, height, platform, assetDir) => {
2021
1669
  x,
2022
1670
  y
2023
1671
  };
2024
- set$8(id, editor, editor);
1672
+ set$7(id, editor, editor);
2025
1673
  };
2026
1674
 
2027
- const AltKey = 'event.altKey';
2028
- const Button = 'event.button';
2029
- const ClientX = 'event.clientX';
2030
- const ClientY = 'event.clientY';
2031
- const DeltaMode = 'event.deltaMode';
2032
- const DeltaY = 'event.deltaY';
2033
-
2034
- const Backspace = 1;
2035
- const Tab$1 = 2;
2036
- const Enter = 3;
2037
- const Escape = 8;
2038
- const Space$1 = 9;
2039
- const End = 255;
2040
- const Home = 12;
2041
- const LeftArrow = 13;
2042
- const UpArrow = 14;
2043
- const RightArrow = 15;
2044
- const DownArrow = 16;
2045
- const Delete$1 = 18;
2046
- const KeyA = 29;
2047
- const KeyC = 31;
2048
- const KeyD = 32;
2049
- const KeyF = 34;
2050
- const KeyH = 36;
2051
- const KeyJ = 38;
2052
- const KeyK = 39;
2053
- const KeyL = 40;
2054
- const KeyO = 43;
2055
- const KeyV = 50;
2056
- const KeyX = 52;
2057
- const KeyZ = 54;
2058
- const F2 = 58;
2059
- const F3 = 59;
2060
- const F4 = 60;
2061
- const F12 = 68;
2062
- const Period = 87;
2063
- const Slash$1 = 88;
2064
- const BracketLeft = 90;
2065
- const BracketRight = 92;
2066
-
2067
- const CodeGenerator = 1;
2068
- const ColorPicker = 2;
2069
- const Completion = 3;
2070
- const CompletionDetail = 4;
2071
- const Find = 5;
2072
- const Hover = 6;
2073
- const Rename$1 = 7;
2074
- const SourceAction$1 = 8;
2075
-
2076
- const CtrlCmd = 1 << 11 >>> 0;
2077
- const Shift = 1 << 10 >>> 0;
2078
- const Alt$1 = 1 << 9 >>> 0;
2079
-
2080
- const Editor$1 = 3;
2081
- const SourceControl = 22;
2082
-
2083
- const Separator = 1;
2084
- const None = 0;
2085
-
2086
- const FocusSelector = 'Viewlet.focusSelector';
2087
- const SetCss$1 = 'Viewlet.setCss';
2088
- const SetFocusContext$1 = 'Viewlet.setFocusContext';
2089
- const SetPatches = 'Viewlet.setPatches';
2090
-
2091
- const FocusEditorText$1 = 12;
2092
- const FocusExplorer = 13;
2093
-
2094
1675
  // TODO use numeric enum
2095
1676
  const CompositionUpdate = 'compositionUpdate';
2096
1677
  const ContentEditableInput = 'contentEditableInput';
@@ -2111,15 +1692,15 @@ const Rename = 'rename';
2111
1692
  const ToggleBlockComment$1 = 'toggleBlockComment';
2112
1693
 
2113
1694
  const map$1 = Object.create(null);
2114
- const set$7 = (id, widget) => {
1695
+ const set$6 = (id, widget) => {
2115
1696
  map$1[id] = widget;
2116
1697
  };
2117
- const get$6 = id => {
1698
+ const get$5 = id => {
2118
1699
  return map$1[id];
2119
1700
  };
2120
1701
 
2121
1702
  const getModule = id => {
2122
- return get$6(id);
1703
+ return get$5(id);
2123
1704
  };
2124
1705
 
2125
1706
  const applyWidgetChange = async (editor, widget, changes) => {
@@ -2151,23 +1732,6 @@ const applyWidgetChanges = async (editor, changes) => {
2151
1732
  return latestEditor;
2152
1733
  };
2153
1734
 
2154
- const editors = Object.create(null);
2155
- const get$5 = id => {
2156
- number(id);
2157
- return editors[id];
2158
- };
2159
- const getKeys$2 = () => {
2160
- return Object.keys(editors);
2161
- };
2162
- const set$6 = (id, oldEditor, newEditor) => {
2163
- object(oldEditor);
2164
- object(newEditor);
2165
- editors[id] = {
2166
- newState: newEditor,
2167
- oldState: oldEditor
2168
- };
2169
- };
2170
-
2171
1735
  const clamp = (num, min, max) => {
2172
1736
  number(num);
2173
1737
  number(min);
@@ -3465,7 +3029,7 @@ const notifyListeners = async (listenerType, method, ...params) => {
3465
3029
  // Notify all listeners in parallel
3466
3030
  const notifications = rpcIds.map(async rpcId => {
3467
3031
  try {
3468
- const rpc = get$8(rpcId);
3032
+ const rpc = get$7(rpcId);
3469
3033
  if (rpc) {
3470
3034
  await rpc.invoke(method, ...params);
3471
3035
  }
@@ -3906,7 +3470,7 @@ const scheduleDocumentAndCursorsSelections = async (editor, changes, selectionCh
3906
3470
  ...newEditor,
3907
3471
  decorations: linkDecorations
3908
3472
  };
3909
- set$6(editor.uid, editor, newEditorWithDecorations);
3473
+ set$7(editor.uid, editor, newEditorWithDecorations);
3910
3474
 
3911
3475
  // Notify main-area-worker about modified status change
3912
3476
  if (!editor.modified) {
@@ -4315,7 +3879,7 @@ const updateDiagnostics = async newState => {
4315
3879
  // @ts-ignore
4316
3880
  await invoke$6(TextDocumentSyncFull, newState.uri, newState.id, newState.languageId, content);
4317
3881
  const diagnostics = await executeDiagnosticProvider(newState);
4318
- const latest = get$5(newState.id);
3882
+ const latest = get$6(newState.id);
4319
3883
  if (!latest) {
4320
3884
  return newState;
4321
3885
  }
@@ -4331,9 +3895,9 @@ const updateDiagnostics = async newState => {
4331
3895
  diagnostics,
4332
3896
  visualDecorations // Visual decorations (objects with x, y, width, height) for squiggly underlines
4333
3897
  };
4334
- set$6(newState.id, latest.oldState, newEditor);
3898
+ set$7(newState.id, latest.oldState, newEditor);
4335
3899
  // @ts-ignore
4336
- await invoke$d('Editor.rerender', newState.id);
3900
+ await invoke$c('Editor.rerender', newState.id);
4337
3901
  return newEditor;
4338
3902
  } catch (error) {
4339
3903
  // @ts-ignore
@@ -4478,7 +4042,7 @@ const createEditor = async ({
4478
4042
  focused: true,
4479
4043
  textInfos
4480
4044
  };
4481
- set$6(id, emptyEditor, newEditor4);
4045
+ set$7(id, emptyEditor, newEditor4);
4482
4046
 
4483
4047
  // TODO only sync when needed
4484
4048
  // e.g. it might not always be necessary to send text to extension host worker
@@ -4491,7 +4055,7 @@ const createEditor = async ({
4491
4055
  }
4492
4056
  const completionsOnTypeRaw = await get$1('editor.completionsOnType');
4493
4057
  const completionsOnType = Boolean(completionsOnTypeRaw);
4494
- set$6(id, emptyEditor, {
4058
+ set$7(id, emptyEditor, {
4495
4059
  ...newEditor4,
4496
4060
  completionsOnType
4497
4061
  });
@@ -4532,7 +4096,7 @@ const diff2 = uid => {
4532
4096
  const {
4533
4097
  newState,
4534
4098
  oldState
4535
- } = get$7(uid);
4099
+ } = get$6(uid);
4536
4100
  const result = diff(oldState, newState);
4537
4101
  return result;
4538
4102
  };
@@ -4840,6 +4404,7 @@ const at = async (editor, eventX, eventY) => {
4840
4404
  number(eventY);
4841
4405
  const {
4842
4406
  charWidth,
4407
+ deltaX,
4843
4408
  deltaY,
4844
4409
  fontFamily,
4845
4410
  fontSize,
@@ -4849,9 +4414,11 @@ const at = async (editor, eventX, eventY) => {
4849
4414
  lines,
4850
4415
  rowHeight,
4851
4416
  tabSize,
4417
+ x,
4852
4418
  y
4853
4419
  } = editor;
4854
4420
  const rowIndex = Math.floor((eventY - y + deltaY) / rowHeight);
4421
+ const relativeX = eventX - x + deltaX;
4855
4422
  if (rowIndex < 0) {
4856
4423
  return {
4857
4424
  columnIndex: 0,
@@ -4860,7 +4427,7 @@ const at = async (editor, eventX, eventY) => {
4860
4427
  }
4861
4428
  const clampedRowIndex = clamp(rowIndex, 0, lines.length - 1);
4862
4429
  const line = lines[clampedRowIndex];
4863
- const columnIndex = await getAccurateColumnIndex(line, fontWeight, fontSize, fontFamily, letterSpacing, isMonospaceFont, charWidth, tabSize, eventX);
4430
+ const columnIndex = await getAccurateColumnIndex(line, fontWeight, fontSize, fontFamily, letterSpacing, isMonospaceFont, charWidth, tabSize, relativeX);
4864
4431
  return {
4865
4432
  columnIndex,
4866
4433
  rowIndex: clampedRowIndex
@@ -4916,7 +4483,7 @@ const editorShowMessage = async (editor, rowIndex, columnIndex, message, isError
4916
4483
  const y$1 = y(editor, rowIndex);
4917
4484
  const displayErrorMessage = message;
4918
4485
  // @ts-ignore
4919
- await invoke$d('Editor.showOverlayMessage', editor, 'Viewlet.send', editor.uid, 'showOverlayMessage', x$1, y$1, displayErrorMessage);
4486
+ await invoke$c('Editor.showOverlayMessage', editor, 'Viewlet.send', editor.uid, 'showOverlayMessage', x$1, y$1, displayErrorMessage);
4920
4487
  if (!isError) {
4921
4488
  const handleTimeout = () => {
4922
4489
  editorHideMessage(editor);
@@ -4973,7 +4540,7 @@ const braceCompletion = async (editor, text) => {
4973
4540
  // @ts-ignore
4974
4541
  const offset = offsetAt(editor, editor.cursor);
4975
4542
  // @ts-ignore
4976
- const result = await invoke$d('ExtensionHostBraceCompletion.executeBraceCompletionProvider', editor, offset, text);
4543
+ const result = await invoke$c('ExtensionHostBraceCompletion.executeBraceCompletionProvider', editor, offset, text);
4977
4544
  if (result) {
4978
4545
  const closingBrace = getMatchingClosingBrace$1(text);
4979
4546
  const insertText = text + closingBrace;
@@ -5090,7 +4657,7 @@ const closeRename = async editor => {
5090
4657
  }
5091
4658
  const renameWidget = widgets[renameWidgetIndex];
5092
4659
  await invoke$5('Rename.close', renameWidget.newState.uid);
5093
- const latest = get$5(uid);
4660
+ const latest = get$6(uid);
5094
4661
  const {
5095
4662
  newState
5096
4663
  } = latest;
@@ -5160,7 +4727,7 @@ const create$7 = () => {
5160
4727
  const create$6 = () => {
5161
4728
  const completionUid = create$7();
5162
4729
  const widget = {
5163
- id: ColorPicker,
4730
+ id: ColorPicker$1,
5164
4731
  newState: {
5165
4732
  commands: [],
5166
4733
  height: 0,
@@ -5185,7 +4752,7 @@ const newStateGenerator$6 = (state, parentUid) => {
5185
4752
  return loadContent$3(state, parentUid);
5186
4753
  };
5187
4754
  const openColorPicker = async editor => {
5188
- return addWidgetToEditor(ColorPicker, ColorPicker$1, editor, create$6, newStateGenerator$6);
4755
+ return addWidgetToEditor(ColorPicker$1, ColorPicker, editor, create$6, newStateGenerator$6);
5189
4756
  };
5190
4757
 
5191
4758
  const state$4 = {
@@ -5906,7 +5473,7 @@ const deleteWordRight = editor => {
5906
5473
 
5907
5474
  const findAllReferences$1 = async editor => {
5908
5475
  // @ts-ignore
5909
- await invoke$d('SideBar.show', 'References', /* focus */true);
5476
+ await invoke$c('SideBar.show', 'References', /* focus */true);
5910
5477
  return editor;
5911
5478
  };
5912
5479
 
@@ -5994,7 +5561,7 @@ const getWordBefore = (editor, rowIndex, columnIndex) => {
5994
5561
  // @ts-ignore
5995
5562
  const getDefinition = async (editor, offset) => {
5996
5563
  // @ts-ignore
5997
- const definition = await invoke$d('ExtensionHostDefinition.executeDefinitionProvider', editor, offset);
5564
+ const definition = await invoke$c('ExtensionHostDefinition.executeDefinitionProvider', editor, offset);
5998
5565
  return definition;
5999
5566
  };
6000
5567
 
@@ -6279,7 +5846,7 @@ const getNoLocationFoundMessage = info => {
6279
5846
 
6280
5847
  const getTypeDefinition = async (editor, offset) => {
6281
5848
  // @ts-ignore
6282
- const definition = await invoke$d('ExtensionHostTypeDefinition.executeTypeDefinitionProvider', editor, offset);
5849
+ const definition = await invoke$c('ExtensionHostTypeDefinition.executeTypeDefinitionProvider', editor, offset);
6283
5850
  return definition;
6284
5851
  };
6285
5852
 
@@ -7060,7 +6627,7 @@ const indentMore = editor => {
7060
6627
 
7061
6628
  const getLanguageConfiguration = async editor => {
7062
6629
  // @ts-ignore
7063
- return invoke$d('Languages.getLanguageConfiguration', {
6630
+ return invoke$c('Languages.getLanguageConfiguration', {
7064
6631
  languageId: editor.languageId,
7065
6632
  uri: editor.uri
7066
6633
  });
@@ -7417,7 +6984,7 @@ const newStateGenerator$4 = async (state, parentUid) => {
7417
6984
  } = state;
7418
6985
  const {
7419
6986
  newState
7420
- } = get$5(parentUid);
6987
+ } = get$6(parentUid);
7421
6988
  const {
7422
6989
  languageId
7423
6990
  } = newState;
@@ -7470,18 +7037,18 @@ const launchFindWidgetWorker = async () => {
7470
7037
  const rpcId = 9002;
7471
7038
  const launch = async () => {
7472
7039
  // TODO race condition
7473
- if (get$8(rpcId)) {
7040
+ if (get$7(rpcId)) {
7474
7041
  return;
7475
7042
  }
7476
7043
  const rpc = await launchFindWidgetWorker();
7477
- set$f(rpcId, rpc);
7044
+ set$e(rpcId, rpc);
7478
7045
  };
7479
7046
  const invoke$3 = async (method, ...params) => {
7480
- const rpc = get$8(rpcId);
7047
+ const rpc = get$7(rpcId);
7481
7048
  return await rpc.invoke(method, ...params);
7482
7049
  };
7483
7050
  const dispose = async () => {
7484
- const rpc = get$8(rpcId);
7051
+ const rpc = get$7(rpcId);
7485
7052
  remove$8(rpcId);
7486
7053
  if (rpc) {
7487
7054
  await rpc.dispose();
@@ -7493,7 +7060,7 @@ const dispose = async () => {
7493
7060
  };
7494
7061
 
7495
7062
  const getEditor = editorUid => {
7496
- const instance = get$5(editorUid);
7063
+ const instance = get$6(editorUid);
7497
7064
  if (!instance) {
7498
7065
  throw new Error(`editor ${editorUid} not found`);
7499
7066
  }
@@ -7587,7 +7154,7 @@ const newStateGenerator$2 = async (state, parentUid) => {
7587
7154
  } = state;
7588
7155
  const {
7589
7156
  newState
7590
- } = get$5(parentUid);
7157
+ } = get$6(parentUid);
7591
7158
  const {
7592
7159
  languageId
7593
7160
  } = newState;
@@ -7779,7 +7346,7 @@ const isUntitledFile = uri => {
7779
7346
  };
7780
7347
 
7781
7348
  const saveNormalFile = async (uri, content) => {
7782
- await invoke$d('FileSystem.writeFile', uri, content);
7349
+ await invoke$c('FileSystem.writeFile', uri, content);
7783
7350
  };
7784
7351
 
7785
7352
  const showFilePicker = async platform => {
@@ -7787,7 +7354,7 @@ const showFilePicker = async platform => {
7787
7354
  const {
7788
7355
  canceled,
7789
7356
  filePath
7790
- } = await invoke$c('Open.showSaveDialog', dialogTitle, [], platform);
7357
+ } = await invoke$d('Open.showSaveDialog', dialogTitle, [], platform);
7791
7358
  if (canceled) {
7792
7359
  return '';
7793
7360
  }
@@ -7799,9 +7366,9 @@ const saveUntitledFile = async (uri, content, platform) => {
7799
7366
  if (!filePath) {
7800
7367
  return;
7801
7368
  }
7802
- await invoke$d('FileSystem.writeFile', filePath, content);
7369
+ await invoke$c('FileSystem.writeFile', filePath, content);
7803
7370
  await handleWorkspaceRefresh();
7804
- await invoke$d('Main.handleUriChange', uri, filePath);
7371
+ await invoke$c('Main.handleUriChange', uri, filePath);
7805
7372
  return filePath;
7806
7373
  };
7807
7374
 
@@ -8138,7 +7705,7 @@ const selectInsideString = editor => {
8138
7705
 
8139
7706
  const getNewSelections = async (editor, selections) => {
8140
7707
  // @ts-ignore
8141
- const newSelections = await invoke$d('ExtensionHostSelection.executeGrowSelection', editor, selections);
7708
+ const newSelections = await invoke$c('ExtensionHostSelection.executeGrowSelection', editor, selections);
8142
7709
  if (newSelections.length === 0) {
8143
7710
  return selections;
8144
7711
  }
@@ -8551,7 +8118,7 @@ const newStateGenerator$1 = async (state, parentUid) => {
8551
8118
  } = state;
8552
8119
  const {
8553
8120
  newState
8554
- } = get$5(parentUid);
8121
+ } = get$6(parentUid);
8555
8122
  const {
8556
8123
  languageId
8557
8124
  } = newState;
@@ -8571,7 +8138,7 @@ const showHover3 = async editor => {
8571
8138
 
8572
8139
  const EditorHover = 'EditorHover';
8573
8140
  const showHover = async state => {
8574
- await invoke$d('Viewlet.openWidget', EditorHover);
8141
+ await invoke$c('Viewlet.openWidget', EditorHover);
8575
8142
  return state;
8576
8143
  };
8577
8144
 
@@ -8635,7 +8202,7 @@ const newStateGenerator = async (state, parentUid) => {
8635
8202
  } = state;
8636
8203
  const {
8637
8204
  newState
8638
- } = get$5(parentUid);
8205
+ } = get$6(parentUid);
8639
8206
  const {
8640
8207
  languageId
8641
8208
  } = newState;
@@ -9252,7 +8819,7 @@ const typeWithAutoClosingQuote = (editor, text) => {
9252
8819
  const typeWithAutoClosingTag = async (editor, text) => {
9253
8820
  const offset = offsetAt(editor, editor.selections[0], editor.selections[1]);
9254
8821
  // @ts-ignore
9255
- const result = await invoke$d('ExtensionHostClosingTagCompletion.executeClosingTagProvider', editor, offset, text);
8822
+ const result = await invoke$c('ExtensionHostClosingTagCompletion.executeClosingTagProvider', editor, offset, text);
9256
8823
  if (!result) {
9257
8824
  const changes = editorReplaceSelections(editor, [text], EditorType);
9258
8825
  return scheduleDocumentAndCursorsSelections(editor, changes);
@@ -9470,7 +9037,7 @@ const editorUnindent = editor => {
9470
9037
 
9471
9038
  const isFunctional = widgetId => {
9472
9039
  switch (widgetId) {
9473
- case ColorPicker:
9040
+ case ColorPicker$1:
9474
9041
  case Completion:
9475
9042
  case Find:
9476
9043
  case Hover:
@@ -9515,7 +9082,7 @@ const addWidget$1 = (widget, id, render) => {
9515
9082
 
9516
9083
  const getWidgetInvoke = widgetId => {
9517
9084
  switch (widgetId) {
9518
- case ColorPicker:
9085
+ case ColorPicker$1:
9519
9086
  return invoke$9;
9520
9087
  case Completion:
9521
9088
  return invoke$4;
@@ -9578,7 +9145,7 @@ const createFn = (key, name, widgetId) => {
9578
9145
  ...state,
9579
9146
  commands
9580
9147
  };
9581
- const latest = get$5(editor.uid).newState;
9148
+ const latest = get$6(editor.uid).newState;
9582
9149
  const newEditor = updateWidget(latest, widgetId, newState);
9583
9150
  return newEditor;
9584
9151
  };
@@ -9875,7 +9442,7 @@ const getHoverPositionXy = (editor, rowIndex, wordStart, documentationHeight) =>
9875
9442
  };
9876
9443
  const getEditorHoverInfo = async (editorUid, position) => {
9877
9444
  number(editorUid);
9878
- const instance = get$5(editorUid);
9445
+ const instance = get$6(editorUid);
9879
9446
  const editor = instance.newState;
9880
9447
  const {
9881
9448
  selections
@@ -9992,13 +9559,13 @@ const HandleWheel = 'handleWheel';
9992
9559
  const Div = 4;
9993
9560
  const Input = 6;
9994
9561
  const Span = 8;
9995
- const Text$1 = 12;
9562
+ const Text = 12;
9996
9563
 
9997
9564
  const text = data => {
9998
9565
  return {
9999
9566
  childCount: 0,
10000
9567
  text: data,
10001
- type: Text$1
9568
+ type: Text
10002
9569
  };
10003
9570
  };
10004
9571
 
@@ -10271,12 +9838,12 @@ const getEditorSourceActions = async editorId => {
10271
9838
  }
10272
9839
  const {
10273
9840
  newState
10274
- } = get$5(editorId);
9841
+ } = get$6(editorId);
10275
9842
  const {
10276
9843
  languageId
10277
9844
  } = newState;
10278
9845
  // @ts-ignore
10279
- const allActions = await invoke$d('GetEditorSourceActions.getEditorSourceActions');
9846
+ const allActions = await invoke$c('GetEditorSourceActions.getEditorSourceActions');
10280
9847
  const filtered = filterActions(allActions, languageId);
10281
9848
  return filtered;
10282
9849
  };
@@ -10299,14 +9866,14 @@ const getWordAtOffset = editor => {
10299
9866
  };
10300
9867
 
10301
9868
  const setFocus = async focusKey => {
10302
- await invoke$d('Focus.setFocus', focusKey);
9869
+ await invoke$c('Focus.setFocus', focusKey);
10303
9870
  };
10304
9871
  const unsetAdditionalFocus = async focusKey => {
10305
9872
  if (!focusKey) {
10306
9873
  return;
10307
9874
  }
10308
9875
  // @ts-ignore
10309
- await invoke$d('Focus.removeAdditionalFocus', focusKey);
9876
+ await invoke$c('Focus.removeAdditionalFocus', focusKey);
10310
9877
  };
10311
9878
 
10312
9879
  const FocusEditor = 12;
@@ -10376,7 +9943,7 @@ const setSelections2 = (editorUid, selections) => {
10376
9943
  ...editor,
10377
9944
  selections
10378
9945
  };
10379
- set$6(editorUid, editor, newEditor);
9946
+ set$7(editorUid, editor, newEditor);
10380
9947
  };
10381
9948
  const closeWidget2 = async (editorUid, widgetId, widgetName, unsetAdditionalFocus$1) => {
10382
9949
  const editor = getEditor(editorUid);
@@ -10395,7 +9962,7 @@ const closeWidget2 = async (editorUid, widgetId, widgetName, unsetAdditionalFocu
10395
9962
  focused: true,
10396
9963
  widgets: newWidgets
10397
9964
  };
10398
- set$6(editorUid, editor, newEditor);
9965
+ set$7(editorUid, editor, newEditor);
10399
9966
  await setFocus(FocusEditorText);
10400
9967
  if (unsetAdditionalFocus$1) {
10401
9968
  await unsetAdditionalFocus(unsetAdditionalFocus$1);
@@ -10407,7 +9974,7 @@ const closeFind2 = async editorUid => {
10407
9974
  const applyEdits2 = async (editorUid, edits) => {
10408
9975
  const editor = getEditor(editorUid);
10409
9976
  const newEditor = await applyEdit(editor, edits);
10410
- set$6(editorUid, editor, newEditor);
9977
+ set$7(editorUid, editor, newEditor);
10411
9978
  };
10412
9979
  const getSourceActions = async editorUid => {
10413
9980
  const actions = await getEditorSourceActions(editorUid);
@@ -10870,7 +10437,7 @@ const getProblems = async () => {
10870
10437
  const keys = getKeys$2();
10871
10438
  const editors = keys.map(key => {
10872
10439
  const numericKey = parseInt(key);
10873
- const editor = get$5(numericKey);
10440
+ const editor = get$6(numericKey);
10874
10441
  return editor;
10875
10442
  });
10876
10443
  const newEditors = editors.map(editor => editor.newState);
@@ -10985,7 +10552,7 @@ const handleMessagePort = async (port, rpcId) => {
10985
10552
  messagePort: port
10986
10553
  });
10987
10554
  if (rpcId) {
10988
- set$f(rpcId, rpc);
10555
+ set$e(rpcId, rpc);
10989
10556
  }
10990
10557
  };
10991
10558
 
@@ -11018,7 +10585,7 @@ const getWidgetName = widgetId => {
11018
10585
  const saveWidgetState = async keys => {
11019
10586
  const savedStates = Object.create(null);
11020
10587
  for (const key of keys) {
11021
- const editor = get$5(parseInt(key));
10588
+ const editor = get$6(parseInt(key));
11022
10589
  const {
11023
10590
  widgets
11024
10591
  } = editor.newState;
@@ -11037,7 +10604,7 @@ const restoreWidgetState = async (keys, savedStates) => {
11037
10604
  const newEditors = [];
11038
10605
  for (const key of keys) {
11039
10606
  const editorUid = parseInt(key);
11040
- const editor = get$5(editorUid);
10607
+ const editor = get$6(editorUid);
11041
10608
  const {
11042
10609
  widgets
11043
10610
  } = editor.newState;
@@ -11084,12 +10651,12 @@ const hotReload = async () => {
11084
10651
  await relaunchWorkers();
11085
10652
  const newEditors = await restoreWidgetState(keys, savedStates);
11086
10653
  for (const editor of newEditors) {
11087
- set$6(editor.newState.uid, editor.oldState, editor.newState);
10654
+ set$7(editor.newState.uid, editor.oldState, editor.newState);
11088
10655
  }
11089
10656
 
11090
10657
  // TODO ask renderer worker to rerender all editors
11091
10658
  // @ts-ignore
11092
- await invoke$d(`Editor.rerender`);
10659
+ await invoke$c(`Editor.rerender`);
11093
10660
  isReloading = false;
11094
10661
  };
11095
10662
 
@@ -11134,7 +10701,7 @@ const createExtensionManagementWorkerRpc = async () => {
11134
10701
  const initializeExtensionManagementWorker = async () => {
11135
10702
  try {
11136
10703
  const rpc = await createExtensionManagementWorkerRpc();
11137
- set$d(rpc);
10704
+ set$c(rpc);
11138
10705
  } catch {
11139
10706
  // ignore
11140
10707
  }
@@ -11161,7 +10728,7 @@ const sendMessagePortToSyntaxHighlightingWorker = async port => {
11161
10728
  await sendMessagePortToSyntaxHighlightingWorker$1(port);
11162
10729
  } catch {
11163
10730
  // deprecated
11164
- await invokeAndTransfer$1(
10731
+ await invokeAndTransfer(
11165
10732
  // @ts-ignore
11166
10733
  'SendMessagePortToSyntaxHighlightingWorker.sendMessagePortToSyntaxHighlightingWorker', port, 'HandleMessagePort.handleMessagePort');
11167
10734
  }
@@ -11198,7 +10765,7 @@ const initializeTextMeasurementWorker = async () => {
11198
10765
  commandMap: {},
11199
10766
  send
11200
10767
  });
11201
- set$a(rpc);
10768
+ set$9(rpc);
11202
10769
  };
11203
10770
 
11204
10771
  const launchCompletionWorker = async () => {
@@ -11483,9 +11050,6 @@ const renderFocusContext$1 = (oldState, newState) => {
11483
11050
  return [SetFocusContext$1, newState.uid, FocusExplorer];
11484
11051
  };
11485
11052
 
11486
- const Text = 12;
11487
- const Reference = 100;
11488
-
11489
11053
  const SetText = 1;
11490
11054
  const Replace = 2;
11491
11055
  const SetAttribute = 3;
@@ -11574,7 +11138,7 @@ const compareNodes = (oldNode, newNode) => {
11574
11138
  return patches;
11575
11139
  }
11576
11140
  // Handle text nodes
11577
- if (oldNode.type === Text && newNode.type === Text) {
11141
+ if (oldNode.type === Text$1 && newNode.type === Text$1) {
11578
11142
  if (oldNode.text !== newNode.text) {
11579
11143
  patches.push({
11580
11144
  type: SetText,
@@ -12010,28 +11574,28 @@ const render2 = (uid, diffResult) => {
12010
11574
  const {
12011
11575
  newState,
12012
11576
  oldState
12013
- } = get$7(uid);
12014
- set$8(uid, newState, newState);
11577
+ } = get$6(uid);
11578
+ set$7(uid, newState, newState);
12015
11579
  const commands = applyRender(oldState, newState, diffResult);
12016
11580
  return commands;
12017
11581
  };
12018
11582
 
12019
11583
  const addWidget = widget => {
12020
- const module = get$6(widget.id);
11584
+ const module = get$5(widget.id);
12021
11585
  if (!module) {
12022
11586
  throw new Error('unsupported widget');
12023
11587
  }
12024
11588
  return module.add(widget);
12025
11589
  };
12026
11590
  const renderWidget = widget => {
12027
- const module = get$6(widget.id);
11591
+ const module = get$5(widget.id);
12028
11592
  if (!module) {
12029
11593
  throw new Error('unsupported widget');
12030
11594
  }
12031
11595
  return module.render(widget);
12032
11596
  };
12033
11597
  const removeWidget = widget => {
12034
- const module = get$6(widget.id);
11598
+ const module = get$5(widget.id);
12035
11599
  if (!module) {
12036
11600
  throw new Error('unsupported widget');
12037
11601
  }
@@ -12213,7 +11777,7 @@ const renderWidgets = {
12213
11777
  };
12214
11778
  const render$6 = [renderLines, renderSelections, renderScrollBarX, renderScrollBarY, renderFocus$1, renderDecorations, renderGutterInfo, renderWidgets, renderFocusContext, renderAdditionalFocusContext];
12215
11779
  const renderEditor = async id => {
12216
- const instance = get$5(id);
11780
+ const instance = get$6(id);
12217
11781
  if (!instance) {
12218
11782
  return [];
12219
11783
  }
@@ -12222,7 +11786,7 @@ const renderEditor = async id => {
12222
11786
  oldState
12223
11787
  } = instance;
12224
11788
  const commands = [];
12225
- set$6(id, newState, newState);
11789
+ set$7(id, newState, newState);
12226
11790
  for (const item of render$6) {
12227
11791
  if (!item.isEqual(oldState, newState)) {
12228
11792
  const result = await item.apply(oldState, newState);
@@ -12299,7 +11863,7 @@ const unregisterListener = (listenerType, rpcId) => {
12299
11863
  };
12300
11864
 
12301
11865
  const invoke = async (method, ...params) => {
12302
- const worker = get$8(DebugWorker);
11866
+ const worker = get$7(DebugWorker);
12303
11867
  return worker.invoke(method, ...params);
12304
11868
  };
12305
11869
 
@@ -12315,7 +11879,7 @@ const getKey = () => {
12315
11879
  const updateDebugInfo = async debugId => {
12316
11880
  const newInfo = await getDebugHighlight(debugId);
12317
11881
  const key = getKey();
12318
- const instance = get$5(key);
11882
+ const instance = get$6(key);
12319
11883
  if (!instance) {
12320
11884
  return;
12321
11885
  }
@@ -12327,90 +11891,69 @@ const updateDebugInfo = async debugId => {
12327
11891
  ...newState,
12328
11892
  highlightedLine: newInfo.rowIndex
12329
11893
  };
12330
- set$6(key, oldState, newEditor);
11894
+ set$7(key, oldState, newEditor);
12331
11895
  // @ts-ignore
12332
- await invoke$d('Editor.rerender', key);
12333
- };
12334
-
12335
- // TODO wrap commands globally, not per editor
12336
- // TODO only store editor state in editor worker, not in renderer worker also
12337
-
12338
- const wrapCommand = fn => async (editorUid, ...args) => {
12339
- const oldInstance = get$5(editorUid);
12340
- const state = oldInstance.newState;
12341
- const newEditor = await fn(state, ...args);
12342
- if (state === newEditor) {
12343
- return newEditor;
12344
- }
12345
- // TODO if editor did not change, no need to update furthur
12346
-
12347
- // TODO combine neweditor with latest editor?
12348
-
12349
- set$6(editorUid, state, newEditor);
12350
- const commands = await renderEditor(editorUid);
12351
- return {
12352
- ...newEditor,
12353
- commands
12354
- };
11896
+ await invoke$c('Editor.rerender', key);
12355
11897
  };
12356
11898
 
11899
+ const wrapCommandOld = wrapCommand;
12357
11900
  const commandMap = {
12358
11901
  'ActivateByEvent.activateByEvent': activateByEvent,
12359
11902
  'CodeGenerator.accept': codeGeneratorAccept,
12360
11903
  'ColorPicker.loadContent': loadContent$3,
12361
- 'Editor.addCursorAbove': wrapCommand(addCursorAbove),
12362
- 'Editor.addCursorBelow': wrapCommand(addCursorBelow),
12363
- 'Editor.applyDocumentEdits': wrapCommand(applyDocumentEdits),
12364
- 'Editor.applyEdit': wrapCommand(applyEdit),
11904
+ 'Editor.addCursorAbove': wrapCommandOld(addCursorAbove),
11905
+ 'Editor.addCursorBelow': wrapCommandOld(addCursorBelow),
11906
+ 'Editor.applyDocumentEdits': wrapCommandOld(applyDocumentEdits),
11907
+ 'Editor.applyEdit': wrapCommandOld(applyEdit),
12365
11908
  'Editor.applyEdit2': applyEdits2,
12366
- 'Editor.applyWorkspaceEdit': wrapCommand(applyWorkspaceEdit),
12367
- 'Editor.braceCompletion': wrapCommand(braceCompletion),
12368
- 'Editor.cancelSelection': wrapCommand(cancelSelection),
12369
- 'Editor.closeCodeGenerator': wrapCommand(closeCodeGenerator),
12370
- 'Editor.closeFind': wrapCommand(closeFind),
11909
+ 'Editor.applyWorkspaceEdit': wrapCommandOld(applyWorkspaceEdit),
11910
+ 'Editor.braceCompletion': wrapCommandOld(braceCompletion),
11911
+ 'Editor.cancelSelection': wrapCommandOld(cancelSelection),
11912
+ 'Editor.closeCodeGenerator': wrapCommandOld(closeCodeGenerator),
11913
+ 'Editor.closeFind': wrapCommandOld(closeFind),
12371
11914
  'Editor.closeFind2': closeFind2,
12372
- 'Editor.closeRename': wrapCommand(closeRename),
12373
- 'Editor.closeSourceAction': wrapCommand(closeSourceAction),
11915
+ 'Editor.closeRename': wrapCommandOld(closeRename),
11916
+ 'Editor.closeSourceAction': wrapCommandOld(closeSourceAction),
12374
11917
  'Editor.closeWidget2': closeWidget2,
12375
- 'Editor.compositionEnd': wrapCommand(compositionEnd),
12376
- 'Editor.compositionStart': wrapCommand(compositionStart),
12377
- 'Editor.compositionUpdate': wrapCommand(compositionUpdate),
12378
- 'Editor.contextMenu': wrapCommand(handleContextMenu),
12379
- 'Editor.copy': wrapCommand(copy$1),
12380
- 'Editor.copyLineDown': wrapCommand(copyLineDown),
12381
- 'Editor.copyLineUp': wrapCommand(copyLineUp),
11918
+ 'Editor.compositionEnd': wrapCommandOld(compositionEnd),
11919
+ 'Editor.compositionStart': wrapCommandOld(compositionStart),
11920
+ 'Editor.compositionUpdate': wrapCommandOld(compositionUpdate),
11921
+ 'Editor.contextMenu': wrapCommandOld(handleContextMenu),
11922
+ 'Editor.copy': wrapCommandOld(copy$1),
11923
+ 'Editor.copyLineDown': wrapCommandOld(copyLineDown),
11924
+ 'Editor.copyLineUp': wrapCommandOld(copyLineUp),
12382
11925
  'Editor.create': createEditor,
12383
11926
  'Editor.create2': createEditor2,
12384
- 'Editor.cursorCharacterLeft': wrapCommand(cursorCharacterLeft),
12385
- 'Editor.cursorCharacterRight': wrapCommand(cursorCharacterRight),
12386
- 'Editor.cursorDown': wrapCommand(cursorDown),
12387
- 'Editor.cursorEnd': wrapCommand(cursorEnd),
12388
- 'Editor.cursorHome': wrapCommand(cursorHome),
12389
- 'Editor.cursorLeft': wrapCommand(cursorCharacterLeft),
12390
- 'Editor.cursorRight': wrapCommand(cursorCharacterRight),
12391
- 'Editor.cursorSet': wrapCommand(cursorSet),
12392
- 'Editor.cursorUp': wrapCommand(cursorUp),
12393
- 'Editor.cursorWordLeft': wrapCommand(cursorWordLeft),
12394
- 'Editor.cursorWordPartLeft': wrapCommand(cursorWordPartLeft),
12395
- 'Editor.cursorWordPartRight': wrapCommand(cursorWordPartRight),
12396
- 'Editor.cursorWordRight': wrapCommand(cursorWordRight),
12397
- 'Editor.cut': wrapCommand(cut$1),
12398
- 'Editor.deleteAll': wrapCommand(deleteAll),
12399
- 'Editor.deleteAllLeft': wrapCommand(deleteAllLeft),
12400
- 'Editor.deleteAllRight': wrapCommand(deleteAllRight),
12401
- 'Editor.deleteCharacterLeft': wrapCommand(deleteCharacterLeft),
12402
- 'Editor.deleteCharacterRight': wrapCommand(deleteCharacterRight),
12403
- 'Editor.deleteHorizontalRight': wrapCommand(editorDeleteHorizontalRight),
12404
- 'Editor.deleteLeft': wrapCommand(deleteCharacterLeft),
12405
- 'Editor.deleteRight': wrapCommand(deleteCharacterRight),
12406
- 'Editor.deleteWordLeft': wrapCommand(deleteWordLeft),
12407
- 'Editor.deleteWordPartLeft': wrapCommand(deleteWordPartLeft),
12408
- 'Editor.deleteWordPartRight': wrapCommand(deleteWordPartRight),
12409
- 'Editor.deleteWordRight': wrapCommand(deleteWordRight),
11927
+ 'Editor.cursorCharacterLeft': wrapCommandOld(cursorCharacterLeft),
11928
+ 'Editor.cursorCharacterRight': wrapCommandOld(cursorCharacterRight),
11929
+ 'Editor.cursorDown': wrapCommandOld(cursorDown),
11930
+ 'Editor.cursorEnd': wrapCommandOld(cursorEnd),
11931
+ 'Editor.cursorHome': wrapCommandOld(cursorHome),
11932
+ 'Editor.cursorLeft': wrapCommandOld(cursorCharacterLeft),
11933
+ 'Editor.cursorRight': wrapCommandOld(cursorCharacterRight),
11934
+ 'Editor.cursorSet': wrapCommandOld(cursorSet),
11935
+ 'Editor.cursorUp': wrapCommandOld(cursorUp),
11936
+ 'Editor.cursorWordLeft': wrapCommandOld(cursorWordLeft),
11937
+ 'Editor.cursorWordPartLeft': wrapCommandOld(cursorWordPartLeft),
11938
+ 'Editor.cursorWordPartRight': wrapCommandOld(cursorWordPartRight),
11939
+ 'Editor.cursorWordRight': wrapCommandOld(cursorWordRight),
11940
+ 'Editor.cut': wrapCommandOld(cut$1),
11941
+ 'Editor.deleteAll': wrapCommandOld(deleteAll),
11942
+ 'Editor.deleteAllLeft': wrapCommandOld(deleteAllLeft),
11943
+ 'Editor.deleteAllRight': wrapCommandOld(deleteAllRight),
11944
+ 'Editor.deleteCharacterLeft': wrapCommandOld(deleteCharacterLeft),
11945
+ 'Editor.deleteCharacterRight': wrapCommandOld(deleteCharacterRight),
11946
+ 'Editor.deleteHorizontalRight': wrapCommandOld(editorDeleteHorizontalRight),
11947
+ 'Editor.deleteLeft': wrapCommandOld(deleteCharacterLeft),
11948
+ 'Editor.deleteRight': wrapCommandOld(deleteCharacterRight),
11949
+ 'Editor.deleteWordLeft': wrapCommandOld(deleteWordLeft),
11950
+ 'Editor.deleteWordPartLeft': wrapCommandOld(deleteWordPartLeft),
11951
+ 'Editor.deleteWordPartRight': wrapCommandOld(deleteWordPartRight),
11952
+ 'Editor.deleteWordRight': wrapCommandOld(deleteWordRight),
12410
11953
  'Editor.diff2': diff2,
12411
- 'Editor.executeWidgetCommand': wrapCommand(executeWidgetCommand),
12412
- 'Editor.findAllReferences': wrapCommand(findAllReferences$1),
12413
- 'Editor.format': wrapCommand(format),
11954
+ 'Editor.executeWidgetCommand': wrapCommandOld(executeWidgetCommand),
11955
+ 'Editor.findAllReferences': wrapCommandOld(findAllReferences$1),
11956
+ 'Editor.format': wrapCommandOld(format),
12414
11957
  'Editor.getCommandIds': getCommandIds,
12415
11958
  'Editor.getDiagnostics': getDiagnostics$1,
12416
11959
  'Editor.getKeyBindings': getKeyBindings,
@@ -12434,103 +11977,103 @@ const commandMap = {
12434
11977
  'Editor.getWordAtOffset2': getWordAtOffset2,
12435
11978
  'Editor.getWordBefore': getWordBefore,
12436
11979
  'Editor.getWordBefore2': getWordBefore2,
12437
- 'Editor.goToDefinition': wrapCommand(goToDefinition),
12438
- 'Editor.goToTypeDefinition': wrapCommand(goToTypeDefinition),
12439
- 'Editor.handleBeforeInput': wrapCommand(handleBeforeInput),
12440
- 'Editor.handleBeforeInputFromContentEditable': wrapCommand(handleBeforeInputFromContentEditable),
12441
- 'Editor.handleBlur': wrapCommand(handleBlur$1),
11980
+ 'Editor.goToDefinition': wrapCommandOld(goToDefinition),
11981
+ 'Editor.goToTypeDefinition': wrapCommandOld(goToTypeDefinition),
11982
+ 'Editor.handleBeforeInput': wrapCommandOld(handleBeforeInput),
11983
+ 'Editor.handleBeforeInputFromContentEditable': wrapCommandOld(handleBeforeInputFromContentEditable),
11984
+ 'Editor.handleBlur': wrapCommandOld(handleBlur$1),
12442
11985
  'Editor.handleClickAtPosition': handleClickAtPosition,
12443
- 'Editor.handleContextMenu': wrapCommand(handleContextMenu),
12444
- 'Editor.handleDoubleClick': wrapCommand(handleDoubleClick),
12445
- 'Editor.handleFocus': wrapCommand(handleFocus$1),
12446
- 'Editor.handleMouseDown': wrapCommand(handleMouseDown),
12447
- 'Editor.handleMouseMove': wrapCommand(handleMouseMove),
12448
- 'Editor.handleMouseMoveWithAltKey': wrapCommand(handleMouseMoveWithAltKey),
11986
+ 'Editor.handleContextMenu': wrapCommandOld(handleContextMenu),
11987
+ 'Editor.handleDoubleClick': wrapCommandOld(handleDoubleClick),
11988
+ 'Editor.handleFocus': wrapCommandOld(handleFocus$1),
11989
+ 'Editor.handleMouseDown': wrapCommandOld(handleMouseDown),
11990
+ 'Editor.handleMouseMove': wrapCommandOld(handleMouseMove),
11991
+ 'Editor.handleMouseMoveWithAltKey': wrapCommandOld(handleMouseMoveWithAltKey),
12449
11992
  'Editor.handleNativeSelectionChange': editorHandleNativeSelectionChange,
12450
- 'Editor.handlePointerCaptureLost': wrapCommand(handlePointerCaptureLost),
11993
+ 'Editor.handlePointerCaptureLost': wrapCommandOld(handlePointerCaptureLost),
12451
11994
  'Editor.handleScrollBarClick': handleScrollBarPointerDown,
12452
- 'Editor.handleScrollBarHorizontalMove': wrapCommand(handleScrollBarHorizontalMove),
12453
- 'Editor.handleScrollBarHorizontalPointerDown': wrapCommand(handleScrollBarHorizontalPointerDown),
12454
- 'Editor.handleScrollBarMove': wrapCommand(handleScrollBarMove),
12455
- 'Editor.handleScrollBarPointerDown': wrapCommand(handleScrollBarPointerDown),
12456
- 'Editor.handleScrollBarVerticalMove': wrapCommand(handleScrollBarVerticalPointerMove),
12457
- 'Editor.handleScrollBarVerticalPointerDown': wrapCommand(handleScrollBarPointerDown),
12458
- 'Editor.handleScrollBarVerticalPointerMove': wrapCommand(handleScrollBarVerticalPointerMove),
12459
- 'Editor.handleSingleClick': wrapCommand(handleSingleClick),
12460
- 'Editor.handleTab': wrapCommand(handleTab),
12461
- 'Editor.handleTouchEnd': wrapCommand(handleTouchEnd),
12462
- 'Editor.handleTouchMove': wrapCommand(handleTouchMove),
12463
- 'Editor.handleTouchStart': wrapCommand(handleTouchStart),
12464
- 'Editor.handleTripleClick': wrapCommand(handleTripleClick),
11995
+ 'Editor.handleScrollBarHorizontalMove': wrapCommandOld(handleScrollBarHorizontalMove),
11996
+ 'Editor.handleScrollBarHorizontalPointerDown': wrapCommandOld(handleScrollBarHorizontalPointerDown),
11997
+ 'Editor.handleScrollBarMove': wrapCommandOld(handleScrollBarMove),
11998
+ 'Editor.handleScrollBarPointerDown': wrapCommandOld(handleScrollBarPointerDown),
11999
+ 'Editor.handleScrollBarVerticalMove': wrapCommandOld(handleScrollBarVerticalPointerMove),
12000
+ 'Editor.handleScrollBarVerticalPointerDown': wrapCommandOld(handleScrollBarPointerDown),
12001
+ 'Editor.handleScrollBarVerticalPointerMove': wrapCommandOld(handleScrollBarVerticalPointerMove),
12002
+ 'Editor.handleSingleClick': wrapCommandOld(handleSingleClick),
12003
+ 'Editor.handleTab': wrapCommandOld(handleTab),
12004
+ 'Editor.handleTouchEnd': wrapCommandOld(handleTouchEnd),
12005
+ 'Editor.handleTouchMove': wrapCommandOld(handleTouchMove),
12006
+ 'Editor.handleTouchStart': wrapCommandOld(handleTouchStart),
12007
+ 'Editor.handleTripleClick': wrapCommandOld(handleTripleClick),
12465
12008
  'Editor.hotReload': hotReload,
12466
- 'Editor.indendLess': wrapCommand(indentLess),
12467
- 'Editor.indentMore': wrapCommand(indentMore),
12468
- 'Editor.insertLineBreak': wrapCommand(insertLineBreak),
12469
- 'Editor.loadContent': wrapCommand$1(loadContent),
12470
- 'Editor.moveLineDown': wrapCommand(moveLineDown),
12471
- 'Editor.moveLineUp': wrapCommand(moveLineUp),
12472
- 'Editor.moveRectangleSelection': wrapCommand(moveRectangleSelection),
12473
- 'Editor.moveRectangleSelectionPx': wrapCommand(moveRectangleSelectionPx),
12474
- 'Editor.moveSelection': wrapCommand(editorMoveSelection),
12475
- 'Editor.moveSelectionPx': wrapCommand(moveSelectionPx),
12009
+ 'Editor.indendLess': wrapCommandOld(indentLess),
12010
+ 'Editor.indentMore': wrapCommandOld(indentMore),
12011
+ 'Editor.insertLineBreak': wrapCommandOld(insertLineBreak),
12012
+ 'Editor.loadContent': wrapCommand(loadContent),
12013
+ 'Editor.moveLineDown': wrapCommandOld(moveLineDown),
12014
+ 'Editor.moveLineUp': wrapCommandOld(moveLineUp),
12015
+ 'Editor.moveRectangleSelection': wrapCommandOld(moveRectangleSelection),
12016
+ 'Editor.moveRectangleSelectionPx': wrapCommandOld(moveRectangleSelectionPx),
12017
+ 'Editor.moveSelection': wrapCommandOld(editorMoveSelection),
12018
+ 'Editor.moveSelectionPx': wrapCommandOld(moveSelectionPx),
12476
12019
  'Editor.offsetAt': offsetAt,
12477
- 'Editor.openCodeGenerator': wrapCommand(openCodeGenerator),
12478
- 'Editor.openColorPicker': wrapCommand(openColorPicker),
12479
- 'Editor.openCompletion': wrapCommand(openCompletion),
12480
- 'Editor.openFind': wrapCommand(openFind),
12481
- 'Editor.openFind2': wrapCommand(openFind2),
12482
- 'Editor.openRename': wrapCommand(openRename),
12483
- 'Editor.organizeImports': wrapCommand(organizeImports),
12484
- 'Editor.paste': wrapCommand(paste),
12485
- 'Editor.pasteText': wrapCommand(pasteText),
12020
+ 'Editor.openCodeGenerator': wrapCommandOld(openCodeGenerator),
12021
+ 'Editor.openColorPicker': wrapCommandOld(openColorPicker),
12022
+ 'Editor.openCompletion': wrapCommandOld(openCompletion),
12023
+ 'Editor.openFind': wrapCommandOld(openFind),
12024
+ 'Editor.openFind2': wrapCommandOld(openFind2),
12025
+ 'Editor.openRename': wrapCommandOld(openRename),
12026
+ 'Editor.organizeImports': wrapCommandOld(organizeImports),
12027
+ 'Editor.paste': wrapCommandOld(paste),
12028
+ 'Editor.pasteText': wrapCommandOld(pasteText),
12486
12029
  'Editor.render': renderEditor,
12487
12030
  'Editor.render2': render2,
12488
12031
  'Editor.renderEventListeners': renderEventListeners,
12489
- 'Editor.replaceRange': wrapCommand(replaceRange),
12490
- 'Editor.rerender': wrapCommand(rerender),
12491
- 'Editor.save': wrapCommand(save),
12032
+ 'Editor.replaceRange': wrapCommandOld(replaceRange),
12033
+ 'Editor.rerender': wrapCommandOld(rerender),
12034
+ 'Editor.save': wrapCommandOld(save),
12492
12035
  'Editor.saveState': wrapGetter(saveState),
12493
- 'Editor.selectAll': wrapCommand(selectAll),
12494
- 'Editor.selectAllLeft': wrapCommand(editorSelectAllLeft),
12495
- 'Editor.selectAllOccurrences': wrapCommand(selectAllOccurrences),
12496
- 'Editor.selectAllRight': wrapCommand(editorSelectAllRight),
12497
- 'Editor.selectCharacterLeft': wrapCommand(selectCharacterLeft),
12498
- 'Editor.selectCharacterRight': wrapCommand(selectCharacterRight),
12499
- 'Editor.selectDown': wrapCommand(selectDown),
12500
- 'Editor.selectInsideString': wrapCommand(selectInsideString),
12501
- 'Editor.selectionGrow': wrapCommand(selectionGrow),
12502
- 'Editor.selectLine': wrapCommand(selectLine),
12503
- 'Editor.selectNextOccurrence': wrapCommand(selectNextOccurrence),
12504
- 'Editor.selectPreviousOccurrence': wrapCommand(selectPreviousOccurrence),
12505
- 'Editor.selectUp': wrapCommand(selectUp),
12506
- 'Editor.selectWord': wrapCommand(selectWord),
12507
- 'Editor.selectWordLeft': wrapCommand(selectWordLeft),
12508
- 'Editor.selectWordRight': wrapCommand(selectWordRight),
12509
- 'Editor.setDebugEnabled': wrapCommand(setDebugEnabled),
12510
- 'Editor.setDecorations': wrapCommand(setDecorations),
12511
- 'Editor.setDelta': wrapCommand(setDelta),
12512
- 'Editor.setDeltaY': wrapCommand(setDeltaY),
12513
- 'Editor.setLanguageId': wrapCommand(setLanguageId),
12514
- 'Editor.setSelections': wrapCommand(setSelections),
12036
+ 'Editor.selectAll': wrapCommandOld(selectAll),
12037
+ 'Editor.selectAllLeft': wrapCommandOld(editorSelectAllLeft),
12038
+ 'Editor.selectAllOccurrences': wrapCommandOld(selectAllOccurrences),
12039
+ 'Editor.selectAllRight': wrapCommandOld(editorSelectAllRight),
12040
+ 'Editor.selectCharacterLeft': wrapCommandOld(selectCharacterLeft),
12041
+ 'Editor.selectCharacterRight': wrapCommandOld(selectCharacterRight),
12042
+ 'Editor.selectDown': wrapCommandOld(selectDown),
12043
+ 'Editor.selectInsideString': wrapCommandOld(selectInsideString),
12044
+ 'Editor.selectionGrow': wrapCommandOld(selectionGrow),
12045
+ 'Editor.selectLine': wrapCommandOld(selectLine),
12046
+ 'Editor.selectNextOccurrence': wrapCommandOld(selectNextOccurrence),
12047
+ 'Editor.selectPreviousOccurrence': wrapCommandOld(selectPreviousOccurrence),
12048
+ 'Editor.selectUp': wrapCommandOld(selectUp),
12049
+ 'Editor.selectWord': wrapCommandOld(selectWord),
12050
+ 'Editor.selectWordLeft': wrapCommandOld(selectWordLeft),
12051
+ 'Editor.selectWordRight': wrapCommandOld(selectWordRight),
12052
+ 'Editor.setDebugEnabled': wrapCommandOld(setDebugEnabled),
12053
+ 'Editor.setDecorations': wrapCommandOld(setDecorations),
12054
+ 'Editor.setDelta': wrapCommandOld(setDelta),
12055
+ 'Editor.setDeltaY': wrapCommandOld(setDeltaY),
12056
+ 'Editor.setLanguageId': wrapCommandOld(setLanguageId),
12057
+ 'Editor.setSelections': wrapCommandOld(setSelections),
12515
12058
  'Editor.setSelections2': setSelections2,
12516
- 'Editor.setText': wrapCommand(setText),
12059
+ 'Editor.setText': wrapCommandOld(setText),
12517
12060
  'Editor.showHover': showHover,
12518
12061
  'Editor.showHover2': showHover3,
12519
12062
  'Editor.showSourceActions': showSourceActions,
12520
12063
  'Editor.showSourceActions2': showSourceActions,
12521
12064
  'Editor.showSourceActions3': showSourceActions,
12522
- 'Editor.sortLinesAscending': wrapCommand(sortLinesAscending),
12523
- 'Editor.tabCompletion': wrapCommand(tabCompletion),
12065
+ 'Editor.sortLinesAscending': wrapCommandOld(sortLinesAscending),
12066
+ 'Editor.tabCompletion': wrapCommandOld(tabCompletion),
12524
12067
  'Editor.terminate': terminate,
12525
- 'Editor.toggleBlockComment': wrapCommand(toggleBlockComment),
12526
- 'Editor.toggleComment': wrapCommand(toggleComment),
12527
- 'Editor.toggleLineComment': wrapCommand(editorToggleLineComment),
12528
- 'Editor.type': wrapCommand(type),
12529
- 'Editor.typeWithAutoClosing': wrapCommand(typeWithAutoClosing),
12530
- 'Editor.undo': wrapCommand(undo),
12531
- 'Editor.unIndent': wrapCommand(editorUnindent),
12068
+ 'Editor.toggleBlockComment': wrapCommandOld(toggleBlockComment),
12069
+ 'Editor.toggleComment': wrapCommandOld(toggleComment),
12070
+ 'Editor.toggleLineComment': wrapCommandOld(editorToggleLineComment),
12071
+ 'Editor.type': wrapCommandOld(type),
12072
+ 'Editor.typeWithAutoClosing': wrapCommandOld(typeWithAutoClosing),
12073
+ 'Editor.undo': wrapCommandOld(undo),
12074
+ 'Editor.unIndent': wrapCommandOld(editorUnindent),
12532
12075
  'Editor.updateDebugInfo': updateDebugInfo,
12533
- 'Editor.updateDiagnostics': wrapCommand(updateDiagnostics),
12076
+ 'Editor.updateDiagnostics': wrapCommandOld(updateDiagnostics),
12534
12077
  'EditorCompletion.close': close$4,
12535
12078
  'EditorCompletion.closeDetails': closeDetails$1,
12536
12079
  'EditorCompletion.focusFirst': focusFirst$1,
@@ -12617,7 +12160,7 @@ const listen = async () => {
12617
12160
  const rpc = await create$b({
12618
12161
  commandMap: commandMap
12619
12162
  });
12620
- set$c(rpc);
12163
+ set$a(rpc);
12621
12164
  };
12622
12165
 
12623
12166
  const CodeGeneratorInput = 'CodeGeneratorInput';
@@ -12915,14 +12458,14 @@ const EditorHoverWidget = {
12915
12458
  };
12916
12459
 
12917
12460
  const registerWidgets = () => {
12918
- set$7(ColorPicker, EditorColorPickerWidget);
12919
- set$7(Completion, EditorCompletionWidget);
12920
- set$7(CompletionDetail, EditorCompletionDetailWidget);
12921
- set$7(Find, EditorFindWidget);
12922
- set$7(Hover, EditorHoverWidget);
12923
- set$7(Rename$1, EditorRenameWidget);
12924
- set$7(SourceAction$1, EditorSourceActionWidget);
12925
- set$7(CodeGenerator, EditorCodeGeneratorWidget);
12461
+ set$6(ColorPicker$1, EditorColorPickerWidget);
12462
+ set$6(Completion, EditorCompletionWidget);
12463
+ set$6(CompletionDetail, EditorCompletionDetailWidget);
12464
+ set$6(Find, EditorFindWidget);
12465
+ set$6(Hover, EditorHoverWidget);
12466
+ set$6(Rename$1, EditorRenameWidget);
12467
+ set$6(SourceAction$1, EditorSourceActionWidget);
12468
+ set$6(CodeGenerator, EditorCodeGeneratorWidget);
12926
12469
  };
12927
12470
 
12928
12471
  const handleUnhandledRejection = event => {