@lvce-editor/editor-worker 18.6.0 → 18.8.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.
- package/dist/editorWorkerMain.js +407 -913
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -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$
|
|
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$
|
|
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$
|
|
1107
|
+
const set$e = (id, rpc) => {
|
|
1120
1108
|
rpcs[id] = rpc;
|
|
1121
1109
|
};
|
|
1122
|
-
const get$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
-
|
|
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
|
-
|
|
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$
|
|
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
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
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$
|
|
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
|
|
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$
|
|
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$
|
|
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
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
|
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
|
|
1302
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionManagementWorker', port, command, rpcId);
|
|
1460
1303
|
};
|
|
1461
1304
|
const getPreference = async key => {
|
|
1462
|
-
return await invoke$
|
|
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$
|
|
1308
|
+
await invoke$c('Main.openUri', uri, focus, options);
|
|
1475
1309
|
};
|
|
1476
1310
|
const sendMessagePortToSyntaxHighlightingWorker$1 = async port => {
|
|
1477
|
-
await invokeAndTransfer
|
|
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
|
-
|
|
1605
|
-
|
|
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$
|
|
1648
|
-
setAdditionalFocus,
|
|
1649
|
-
setColorTheme,
|
|
1650
|
-
setExtensionsSearchValue,
|
|
1651
|
-
setFocus: setFocus$1,
|
|
1652
|
-
setWebViewPort,
|
|
1653
|
-
setWorkspacePath,
|
|
1654
|
-
showContextMenu,
|
|
1329
|
+
set: set$a,
|
|
1655
1330
|
showContextMenu2,
|
|
1656
|
-
|
|
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$
|
|
1336
|
+
set: set$9
|
|
1682
1337
|
} = create$a(IconThemeWorker);
|
|
1683
1338
|
|
|
1684
1339
|
const {
|
|
1685
|
-
dispose: dispose$1,
|
|
1686
1340
|
invoke: invoke$a,
|
|
1687
|
-
|
|
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
|
-
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
|
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
|
-
|
|
1937
|
-
wrapCommand: wrapCommand$1,
|
|
1575
|
+
wrapCommand,
|
|
1938
1576
|
wrapGetter
|
|
1939
|
-
} =
|
|
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
|
|
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$
|
|
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$
|
|
1695
|
+
const set$6 = (id, widget) => {
|
|
2115
1696
|
map$1[id] = widget;
|
|
2116
1697
|
};
|
|
2117
|
-
const get$
|
|
1698
|
+
const get$5 = id => {
|
|
2118
1699
|
return map$1[id];
|
|
2119
1700
|
};
|
|
2120
1701
|
|
|
2121
1702
|
const getModule = id => {
|
|
2122
|
-
return get$
|
|
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);
|
|
@@ -3314,7 +2878,7 @@ const getRegexMatches = (text, regex) => {
|
|
|
3314
2878
|
// Supports: http://, https://, ftp://, ftps://, file://
|
|
3315
2879
|
// Also matches URLs without explicit scheme (www.example.com)
|
|
3316
2880
|
// Excludes trailing quotes which are commonly used in JSON strings
|
|
3317
|
-
const URL_PATTERN = /(?:
|
|
2881
|
+
const URL_PATTERN = /(?:https?|ftps?|file):\/\/[^\s"']+|www\.[^\s"']+/g;
|
|
3318
2882
|
|
|
3319
2883
|
// Regex to check if URL has a scheme (http://, https://, ftp://, etc.)
|
|
3320
2884
|
const HAS_SCHEME_PATTERN = /^(?:https?|ftp|ftps|file):\/\//;
|
|
@@ -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$
|
|
3032
|
+
const rpc = get$7(rpcId);
|
|
3469
3033
|
if (rpc) {
|
|
3470
3034
|
await rpc.invoke(method, ...params);
|
|
3471
3035
|
}
|
|
@@ -3517,7 +3081,7 @@ const getTabCount = string => {
|
|
|
3517
3081
|
return count;
|
|
3518
3082
|
};
|
|
3519
3083
|
|
|
3520
|
-
const RE_ASCII =
|
|
3084
|
+
const RE_ASCII = /^\p{ASCII}*$/u;
|
|
3521
3085
|
const isAscii = line => {
|
|
3522
3086
|
return RE_ASCII.test(line);
|
|
3523
3087
|
};
|
|
@@ -3906,7 +3470,7 @@ const scheduleDocumentAndCursorsSelections = async (editor, changes, selectionCh
|
|
|
3906
3470
|
...newEditor,
|
|
3907
3471
|
decorations: linkDecorations
|
|
3908
3472
|
};
|
|
3909
|
-
set$
|
|
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$
|
|
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$
|
|
3898
|
+
set$7(newState.id, latest.oldState, newEditor);
|
|
4335
3899
|
// @ts-ignore
|
|
4336
|
-
await invoke$
|
|
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$
|
|
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$
|
|
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$
|
|
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,
|
|
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$
|
|
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$
|
|
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$
|
|
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
|
|
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$
|
|
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$
|
|
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$
|
|
5849
|
+
const definition = await invoke$c('ExtensionHostTypeDefinition.executeTypeDefinitionProvider', editor, offset);
|
|
6283
5850
|
return definition;
|
|
6284
5851
|
};
|
|
6285
5852
|
|
|
@@ -6639,11 +6206,7 @@ const handleMouseMoveWithAltKey = async (editor, x, y) => {
|
|
|
6639
6206
|
// TODO make sure that editor is not disposed
|
|
6640
6207
|
|
|
6641
6208
|
const definitionStartPosition = positionAt(editor, definition.startOffset);
|
|
6642
|
-
|
|
6643
|
-
// @ts-ignore
|
|
6644
|
-
const definitionRelativeStartX = definitionStartPosition.columnIndex;
|
|
6645
|
-
// @ts-ignore
|
|
6646
|
-
const definitionRelativeEndX = definitionEndPosition.columnIndex;
|
|
6209
|
+
positionAt(editor, definition.endOffset);
|
|
6647
6210
|
// const definitionRelativeY = definitionStartPosition.rowIndex - editor.minLineY
|
|
6648
6211
|
|
|
6649
6212
|
const lineTokenMap = editor.lineCache[definitionStartPosition.rowIndex + 1];
|
|
@@ -6964,7 +6527,8 @@ const setDelta = (editor, deltaMode, eventDeltaX, eventDeltaY) => {
|
|
|
6964
6527
|
number(eventDeltaY);
|
|
6965
6528
|
// @ts-ignore
|
|
6966
6529
|
const {
|
|
6967
|
-
deltaX
|
|
6530
|
+
deltaX
|
|
6531
|
+
} = editor;
|
|
6968
6532
|
if (eventDeltaX === 0) {
|
|
6969
6533
|
return setDeltaY(editor, eventDeltaY);
|
|
6970
6534
|
}
|
|
@@ -7060,7 +6624,7 @@ const indentMore = editor => {
|
|
|
7060
6624
|
|
|
7061
6625
|
const getLanguageConfiguration = async editor => {
|
|
7062
6626
|
// @ts-ignore
|
|
7063
|
-
return invoke$
|
|
6627
|
+
return invoke$c('Languages.getLanguageConfiguration', {
|
|
7064
6628
|
languageId: editor.languageId,
|
|
7065
6629
|
uri: editor.uri
|
|
7066
6630
|
});
|
|
@@ -7417,7 +6981,7 @@ const newStateGenerator$4 = async (state, parentUid) => {
|
|
|
7417
6981
|
} = state;
|
|
7418
6982
|
const {
|
|
7419
6983
|
newState
|
|
7420
|
-
} = get$
|
|
6984
|
+
} = get$6(parentUid);
|
|
7421
6985
|
const {
|
|
7422
6986
|
languageId
|
|
7423
6987
|
} = newState;
|
|
@@ -7470,18 +7034,18 @@ const launchFindWidgetWorker = async () => {
|
|
|
7470
7034
|
const rpcId = 9002;
|
|
7471
7035
|
const launch = async () => {
|
|
7472
7036
|
// TODO race condition
|
|
7473
|
-
if (get$
|
|
7037
|
+
if (get$7(rpcId)) {
|
|
7474
7038
|
return;
|
|
7475
7039
|
}
|
|
7476
7040
|
const rpc = await launchFindWidgetWorker();
|
|
7477
|
-
set$
|
|
7041
|
+
set$e(rpcId, rpc);
|
|
7478
7042
|
};
|
|
7479
7043
|
const invoke$3 = async (method, ...params) => {
|
|
7480
|
-
const rpc = get$
|
|
7044
|
+
const rpc = get$7(rpcId);
|
|
7481
7045
|
return await rpc.invoke(method, ...params);
|
|
7482
7046
|
};
|
|
7483
7047
|
const dispose = async () => {
|
|
7484
|
-
const rpc = get$
|
|
7048
|
+
const rpc = get$7(rpcId);
|
|
7485
7049
|
remove$8(rpcId);
|
|
7486
7050
|
if (rpc) {
|
|
7487
7051
|
await rpc.dispose();
|
|
@@ -7493,7 +7057,7 @@ const dispose = async () => {
|
|
|
7493
7057
|
};
|
|
7494
7058
|
|
|
7495
7059
|
const getEditor = editorUid => {
|
|
7496
|
-
const instance = get$
|
|
7060
|
+
const instance = get$6(editorUid);
|
|
7497
7061
|
if (!instance) {
|
|
7498
7062
|
throw new Error(`editor ${editorUid} not found`);
|
|
7499
7063
|
}
|
|
@@ -7587,7 +7151,7 @@ const newStateGenerator$2 = async (state, parentUid) => {
|
|
|
7587
7151
|
} = state;
|
|
7588
7152
|
const {
|
|
7589
7153
|
newState
|
|
7590
|
-
} = get$
|
|
7154
|
+
} = get$6(parentUid);
|
|
7591
7155
|
const {
|
|
7592
7156
|
languageId
|
|
7593
7157
|
} = newState;
|
|
@@ -7761,7 +7325,7 @@ const logError = async error => {
|
|
|
7761
7325
|
};
|
|
7762
7326
|
const handleError = async error => {
|
|
7763
7327
|
try {
|
|
7764
|
-
|
|
7328
|
+
await logError(error);
|
|
7765
7329
|
} catch (otherError) {
|
|
7766
7330
|
console.warn('ErrorHandling error');
|
|
7767
7331
|
console.warn(otherError);
|
|
@@ -7779,7 +7343,7 @@ const isUntitledFile = uri => {
|
|
|
7779
7343
|
};
|
|
7780
7344
|
|
|
7781
7345
|
const saveNormalFile = async (uri, content) => {
|
|
7782
|
-
await invoke$
|
|
7346
|
+
await invoke$c('FileSystem.writeFile', uri, content);
|
|
7783
7347
|
};
|
|
7784
7348
|
|
|
7785
7349
|
const showFilePicker = async platform => {
|
|
@@ -7787,7 +7351,7 @@ const showFilePicker = async platform => {
|
|
|
7787
7351
|
const {
|
|
7788
7352
|
canceled,
|
|
7789
7353
|
filePath
|
|
7790
|
-
} = await invoke$
|
|
7354
|
+
} = await invoke$d('Open.showSaveDialog', dialogTitle, [], platform);
|
|
7791
7355
|
if (canceled) {
|
|
7792
7356
|
return '';
|
|
7793
7357
|
}
|
|
@@ -7799,9 +7363,9 @@ const saveUntitledFile = async (uri, content, platform) => {
|
|
|
7799
7363
|
if (!filePath) {
|
|
7800
7364
|
return;
|
|
7801
7365
|
}
|
|
7802
|
-
await invoke$
|
|
7366
|
+
await invoke$c('FileSystem.writeFile', filePath, content);
|
|
7803
7367
|
await handleWorkspaceRefresh();
|
|
7804
|
-
await invoke$
|
|
7368
|
+
await invoke$c('Main.handleUriChange', uri, filePath);
|
|
7805
7369
|
return filePath;
|
|
7806
7370
|
};
|
|
7807
7371
|
|
|
@@ -7868,13 +7432,8 @@ const getNewSelections$4 = (selections, lines, getDelta) => {
|
|
|
7868
7432
|
for (let i = 0; i < selections.length; i += 4) {
|
|
7869
7433
|
// @ts-ignore
|
|
7870
7434
|
const [selectionStartRow, selectionStartColumn, selectionEndRow, selectionEndColumn] = getSelectionPairs(selections, i);
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
moveToPositionEqual(newSelections, i, selectionEndRow, selectionEndColumn);
|
|
7874
|
-
} else {
|
|
7875
|
-
moveToPositionLeft(newSelections, i + 2, selectionStartRow, selectionStartColumn, lines, getDelta);
|
|
7876
|
-
moveToPositionEqual(newSelections, i, selectionEndRow, selectionEndColumn);
|
|
7877
|
-
}
|
|
7435
|
+
moveToPositionLeft(newSelections, i + 2, selectionStartRow, selectionStartColumn, lines, getDelta);
|
|
7436
|
+
moveToPositionEqual(newSelections, i, selectionEndRow, selectionEndColumn);
|
|
7878
7437
|
}
|
|
7879
7438
|
return newSelections;
|
|
7880
7439
|
};
|
|
@@ -8138,7 +7697,7 @@ const selectInsideString = editor => {
|
|
|
8138
7697
|
|
|
8139
7698
|
const getNewSelections = async (editor, selections) => {
|
|
8140
7699
|
// @ts-ignore
|
|
8141
|
-
const newSelections = await invoke$
|
|
7700
|
+
const newSelections = await invoke$c('ExtensionHostSelection.executeGrowSelection', editor, selections);
|
|
8142
7701
|
if (newSelections.length === 0) {
|
|
8143
7702
|
return selections;
|
|
8144
7703
|
}
|
|
@@ -8551,7 +8110,7 @@ const newStateGenerator$1 = async (state, parentUid) => {
|
|
|
8551
8110
|
} = state;
|
|
8552
8111
|
const {
|
|
8553
8112
|
newState
|
|
8554
|
-
} = get$
|
|
8113
|
+
} = get$6(parentUid);
|
|
8555
8114
|
const {
|
|
8556
8115
|
languageId
|
|
8557
8116
|
} = newState;
|
|
@@ -8571,7 +8130,7 @@ const showHover3 = async editor => {
|
|
|
8571
8130
|
|
|
8572
8131
|
const EditorHover = 'EditorHover';
|
|
8573
8132
|
const showHover = async state => {
|
|
8574
|
-
await invoke$
|
|
8133
|
+
await invoke$c('Viewlet.openWidget', EditorHover);
|
|
8575
8134
|
return state;
|
|
8576
8135
|
};
|
|
8577
8136
|
|
|
@@ -8635,7 +8194,7 @@ const newStateGenerator = async (state, parentUid) => {
|
|
|
8635
8194
|
} = state;
|
|
8636
8195
|
const {
|
|
8637
8196
|
newState
|
|
8638
|
-
} = get$
|
|
8197
|
+
} = get$6(parentUid);
|
|
8639
8198
|
const {
|
|
8640
8199
|
languageId
|
|
8641
8200
|
} = newState;
|
|
@@ -8883,6 +8442,27 @@ const getBlockComment = async (editor, offset) => {
|
|
|
8883
8442
|
|
|
8884
8443
|
const RE_WHITESPACE_AT_START$1 = /^\s+/;
|
|
8885
8444
|
const RE_WHITESPACE_AT_END = /\s+$/;
|
|
8445
|
+
const createDeleteEdit = (rowIndex, columnIndex, text) => {
|
|
8446
|
+
return {
|
|
8447
|
+
deleted: [text],
|
|
8448
|
+
end: {
|
|
8449
|
+
columnIndex: columnIndex + text.length,
|
|
8450
|
+
rowIndex
|
|
8451
|
+
},
|
|
8452
|
+
inserted: [],
|
|
8453
|
+
origin: ToggleBlockComment$1,
|
|
8454
|
+
start: {
|
|
8455
|
+
columnIndex,
|
|
8456
|
+
rowIndex
|
|
8457
|
+
}
|
|
8458
|
+
};
|
|
8459
|
+
};
|
|
8460
|
+
const getRemoveBlockCommentEdits = (rowIndex, startRowIndex, startColumnIndex, endRowIndex, endColumnIndex, blockCommentStart, blockCommentEnd) => {
|
|
8461
|
+
if (startRowIndex === endRowIndex) {
|
|
8462
|
+
return [createDeleteEdit(rowIndex, startColumnIndex, blockCommentStart), createDeleteEdit(rowIndex, endColumnIndex - blockCommentStart.length, blockCommentEnd)];
|
|
8463
|
+
}
|
|
8464
|
+
return [createDeleteEdit(startRowIndex, startColumnIndex, blockCommentStart), createDeleteEdit(endRowIndex, endColumnIndex, blockCommentEnd)];
|
|
8465
|
+
};
|
|
8886
8466
|
const getBlockCommentEdits = (editor, blockComment) => {
|
|
8887
8467
|
const {
|
|
8888
8468
|
selections
|
|
@@ -8914,75 +8494,19 @@ const getBlockCommentEdits = (editor, blockComment) => {
|
|
|
8914
8494
|
}
|
|
8915
8495
|
const changes = [];
|
|
8916
8496
|
if (startColumnIndex !== -1 && endColumnIndex !== -1) {
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
};
|
|
8931
|
-
const change2 = {
|
|
8932
|
-
deleted: [blockCommentEnd],
|
|
8933
|
-
end: {
|
|
8934
|
-
columnIndex: endColumnIndex - blockCommentStart.length + blockCommentEnd.length,
|
|
8935
|
-
rowIndex
|
|
8936
|
-
},
|
|
8937
|
-
inserted: [],
|
|
8938
|
-
origin: ToggleBlockComment$1,
|
|
8939
|
-
start: {
|
|
8940
|
-
columnIndex: endColumnIndex - blockCommentStart.length,
|
|
8941
|
-
rowIndex
|
|
8942
|
-
}
|
|
8943
|
-
};
|
|
8944
|
-
changes.push(change1, change2);
|
|
8945
|
-
} else {
|
|
8946
|
-
const change1 = {
|
|
8947
|
-
deleted: [blockCommentStart],
|
|
8948
|
-
end: {
|
|
8949
|
-
columnIndex: startColumnIndex + blockCommentStart.length,
|
|
8950
|
-
rowIndex: startRowIndex
|
|
8951
|
-
},
|
|
8952
|
-
inserted: [],
|
|
8953
|
-
origin: ToggleBlockComment$1,
|
|
8954
|
-
start: {
|
|
8955
|
-
columnIndex: startColumnIndex,
|
|
8956
|
-
rowIndex: startRowIndex
|
|
8957
|
-
}
|
|
8958
|
-
};
|
|
8959
|
-
const change2 = {
|
|
8960
|
-
deleted: [blockCommentEnd],
|
|
8961
|
-
end: {
|
|
8962
|
-
columnIndex: endColumnIndex + blockCommentEnd.length,
|
|
8963
|
-
rowIndex: endRowIndex
|
|
8964
|
-
},
|
|
8965
|
-
inserted: [],
|
|
8966
|
-
origin: ToggleBlockComment$1,
|
|
8967
|
-
start: {
|
|
8968
|
-
columnIndex: endColumnIndex,
|
|
8969
|
-
rowIndex: endRowIndex
|
|
8970
|
-
}
|
|
8971
|
-
};
|
|
8972
|
-
changes.push(change1, change2);
|
|
8973
|
-
|
|
8974
|
-
// const oldRow1 = TextDocument.getLine(editor, startRowIndex)
|
|
8975
|
-
// const newRow1 =
|
|
8976
|
-
// oldRow1.slice(0, startColumnIndex) +
|
|
8977
|
-
// oldRow1.slice(startColumnIndex + blockCommentStart.length)
|
|
8978
|
-
// const oldRow2 = TextDocument.getLine(editor, endRowIndex)
|
|
8979
|
-
// const newRow2 =
|
|
8980
|
-
// oldRow2.slice(0, endColumnIndex) +
|
|
8981
|
-
// oldRow2.slice(endColumnIndex + blockCommentEnd.length)
|
|
8982
|
-
// // TODO use applyEdit to have undo functionality
|
|
8983
|
-
// TextDocument.setLine(editor, startRowIndex, newRow1)
|
|
8984
|
-
// TextDocument.setLine(editor, endRowIndex, newRow2)
|
|
8985
|
-
}
|
|
8497
|
+
changes.push(...getRemoveBlockCommentEdits(rowIndex, startRowIndex, startColumnIndex, endRowIndex, endColumnIndex, blockCommentStart, blockCommentEnd));
|
|
8498
|
+
|
|
8499
|
+
// const oldRow1 = TextDocument.getLine(editor, startRowIndex)
|
|
8500
|
+
// const newRow1 =
|
|
8501
|
+
// oldRow1.slice(0, startColumnIndex) +
|
|
8502
|
+
// oldRow1.slice(startColumnIndex + blockCommentStart.length)
|
|
8503
|
+
// const oldRow2 = TextDocument.getLine(editor, endRowIndex)
|
|
8504
|
+
// const newRow2 =
|
|
8505
|
+
// oldRow2.slice(0, endColumnIndex) +
|
|
8506
|
+
// oldRow2.slice(endColumnIndex + blockCommentEnd.length)
|
|
8507
|
+
// // TODO use applyEdit to have undo functionality
|
|
8508
|
+
// TextDocument.setLine(editor, startRowIndex, newRow1)
|
|
8509
|
+
// TextDocument.setLine(editor, endRowIndex, newRow2)
|
|
8986
8510
|
// TODO move cursors
|
|
8987
8511
|
} else {
|
|
8988
8512
|
const whitespaceAtStart = line.match(RE_WHITESPACE_AT_START$1);
|
|
@@ -9252,7 +8776,7 @@ const typeWithAutoClosingQuote = (editor, text) => {
|
|
|
9252
8776
|
const typeWithAutoClosingTag = async (editor, text) => {
|
|
9253
8777
|
const offset = offsetAt(editor, editor.selections[0], editor.selections[1]);
|
|
9254
8778
|
// @ts-ignore
|
|
9255
|
-
const result = await invoke$
|
|
8779
|
+
const result = await invoke$c('ExtensionHostClosingTagCompletion.executeClosingTagProvider', editor, offset, text);
|
|
9256
8780
|
if (!result) {
|
|
9257
8781
|
const changes = editorReplaceSelections(editor, [text], EditorType);
|
|
9258
8782
|
return scheduleDocumentAndCursorsSelections(editor, changes);
|
|
@@ -9470,7 +8994,7 @@ const editorUnindent = editor => {
|
|
|
9470
8994
|
|
|
9471
8995
|
const isFunctional = widgetId => {
|
|
9472
8996
|
switch (widgetId) {
|
|
9473
|
-
case ColorPicker:
|
|
8997
|
+
case ColorPicker$1:
|
|
9474
8998
|
case Completion:
|
|
9475
8999
|
case Find:
|
|
9476
9000
|
case Hover:
|
|
@@ -9515,7 +9039,7 @@ const addWidget$1 = (widget, id, render) => {
|
|
|
9515
9039
|
|
|
9516
9040
|
const getWidgetInvoke = widgetId => {
|
|
9517
9041
|
switch (widgetId) {
|
|
9518
|
-
case ColorPicker:
|
|
9042
|
+
case ColorPicker$1:
|
|
9519
9043
|
return invoke$9;
|
|
9520
9044
|
case Completion:
|
|
9521
9045
|
return invoke$4;
|
|
@@ -9578,7 +9102,7 @@ const createFn = (key, name, widgetId) => {
|
|
|
9578
9102
|
...state,
|
|
9579
9103
|
commands
|
|
9580
9104
|
};
|
|
9581
|
-
const latest = get$
|
|
9105
|
+
const latest = get$6(editor.uid).newState;
|
|
9582
9106
|
const newEditor = updateWidget(latest, widgetId, newState);
|
|
9583
9107
|
return newEditor;
|
|
9584
9108
|
};
|
|
@@ -9875,7 +9399,7 @@ const getHoverPositionXy = (editor, rowIndex, wordStart, documentationHeight) =>
|
|
|
9875
9399
|
};
|
|
9876
9400
|
const getEditorHoverInfo = async (editorUid, position) => {
|
|
9877
9401
|
number(editorUid);
|
|
9878
|
-
const instance = get$
|
|
9402
|
+
const instance = get$6(editorUid);
|
|
9879
9403
|
const editor = instance.newState;
|
|
9880
9404
|
const {
|
|
9881
9405
|
selections
|
|
@@ -9941,7 +9465,8 @@ const handleSashPointerDown = (state, eventX, eventY) => {
|
|
|
9941
9465
|
const handleSashPointerMove = (state, eventX, eventY) => {
|
|
9942
9466
|
// @ts-ignore
|
|
9943
9467
|
const {
|
|
9944
|
-
x
|
|
9468
|
+
x
|
|
9469
|
+
} = state;
|
|
9945
9470
|
const minWidth = 100;
|
|
9946
9471
|
const newWidth = Math.max(eventX - x, minWidth);
|
|
9947
9472
|
return {
|
|
@@ -9992,13 +9517,13 @@ const HandleWheel = 'handleWheel';
|
|
|
9992
9517
|
const Div = 4;
|
|
9993
9518
|
const Input = 6;
|
|
9994
9519
|
const Span = 8;
|
|
9995
|
-
const Text
|
|
9520
|
+
const Text = 12;
|
|
9996
9521
|
|
|
9997
9522
|
const text = data => {
|
|
9998
9523
|
return {
|
|
9999
9524
|
childCount: 0,
|
|
10000
9525
|
text: data,
|
|
10001
|
-
type: Text
|
|
9526
|
+
type: Text
|
|
10002
9527
|
};
|
|
10003
9528
|
};
|
|
10004
9529
|
|
|
@@ -10035,7 +9560,9 @@ const hoverProblemDetail = {
|
|
|
10035
9560
|
type: Span
|
|
10036
9561
|
};
|
|
10037
9562
|
const getChildCount = (lineInfos, documentation, diagnostics) => {
|
|
10038
|
-
|
|
9563
|
+
const documentationCount = documentation ? 1 : 0;
|
|
9564
|
+
const diagnosticsCount = diagnostics && diagnostics.length > 0 ? 1 : 0;
|
|
9565
|
+
return lineInfos.length + documentationCount + diagnosticsCount;
|
|
10039
9566
|
};
|
|
10040
9567
|
const getHoverVirtualDom = (lineInfos, documentation, diagnostics) => {
|
|
10041
9568
|
const dom = [];
|
|
@@ -10271,12 +9798,12 @@ const getEditorSourceActions = async editorId => {
|
|
|
10271
9798
|
}
|
|
10272
9799
|
const {
|
|
10273
9800
|
newState
|
|
10274
|
-
} = get$
|
|
9801
|
+
} = get$6(editorId);
|
|
10275
9802
|
const {
|
|
10276
9803
|
languageId
|
|
10277
9804
|
} = newState;
|
|
10278
9805
|
// @ts-ignore
|
|
10279
|
-
const allActions = await invoke$
|
|
9806
|
+
const allActions = await invoke$c('GetEditorSourceActions.getEditorSourceActions');
|
|
10280
9807
|
const filtered = filterActions(allActions, languageId);
|
|
10281
9808
|
return filtered;
|
|
10282
9809
|
};
|
|
@@ -10299,14 +9826,14 @@ const getWordAtOffset = editor => {
|
|
|
10299
9826
|
};
|
|
10300
9827
|
|
|
10301
9828
|
const setFocus = async focusKey => {
|
|
10302
|
-
await invoke$
|
|
9829
|
+
await invoke$c('Focus.setFocus', focusKey);
|
|
10303
9830
|
};
|
|
10304
9831
|
const unsetAdditionalFocus = async focusKey => {
|
|
10305
9832
|
if (!focusKey) {
|
|
10306
9833
|
return;
|
|
10307
9834
|
}
|
|
10308
9835
|
// @ts-ignore
|
|
10309
|
-
await invoke$
|
|
9836
|
+
await invoke$c('Focus.removeAdditionalFocus', focusKey);
|
|
10310
9837
|
};
|
|
10311
9838
|
|
|
10312
9839
|
const FocusEditor = 12;
|
|
@@ -10376,7 +9903,7 @@ const setSelections2 = (editorUid, selections) => {
|
|
|
10376
9903
|
...editor,
|
|
10377
9904
|
selections
|
|
10378
9905
|
};
|
|
10379
|
-
set$
|
|
9906
|
+
set$7(editorUid, editor, newEditor);
|
|
10380
9907
|
};
|
|
10381
9908
|
const closeWidget2 = async (editorUid, widgetId, widgetName, unsetAdditionalFocus$1) => {
|
|
10382
9909
|
const editor = getEditor(editorUid);
|
|
@@ -10395,7 +9922,7 @@ const closeWidget2 = async (editorUid, widgetId, widgetName, unsetAdditionalFocu
|
|
|
10395
9922
|
focused: true,
|
|
10396
9923
|
widgets: newWidgets
|
|
10397
9924
|
};
|
|
10398
|
-
set$
|
|
9925
|
+
set$7(editorUid, editor, newEditor);
|
|
10399
9926
|
await setFocus(FocusEditorText);
|
|
10400
9927
|
if (unsetAdditionalFocus$1) {
|
|
10401
9928
|
await unsetAdditionalFocus(unsetAdditionalFocus$1);
|
|
@@ -10407,7 +9934,7 @@ const closeFind2 = async editorUid => {
|
|
|
10407
9934
|
const applyEdits2 = async (editorUid, edits) => {
|
|
10408
9935
|
const editor = getEditor(editorUid);
|
|
10409
9936
|
const newEditor = await applyEdit(editor, edits);
|
|
10410
|
-
set$
|
|
9937
|
+
set$7(editorUid, editor, newEditor);
|
|
10411
9938
|
};
|
|
10412
9939
|
const getSourceActions = async editorUid => {
|
|
10413
9940
|
const actions = await getEditorSourceActions(editorUid);
|
|
@@ -10870,7 +10397,7 @@ const getProblems = async () => {
|
|
|
10870
10397
|
const keys = getKeys$2();
|
|
10871
10398
|
const editors = keys.map(key => {
|
|
10872
10399
|
const numericKey = parseInt(key);
|
|
10873
|
-
const editor = get$
|
|
10400
|
+
const editor = get$6(numericKey);
|
|
10874
10401
|
return editor;
|
|
10875
10402
|
});
|
|
10876
10403
|
const newEditors = editors.map(editor => editor.newState);
|
|
@@ -10985,7 +10512,7 @@ const handleMessagePort = async (port, rpcId) => {
|
|
|
10985
10512
|
messagePort: port
|
|
10986
10513
|
});
|
|
10987
10514
|
if (rpcId) {
|
|
10988
|
-
set$
|
|
10515
|
+
set$e(rpcId, rpc);
|
|
10989
10516
|
}
|
|
10990
10517
|
};
|
|
10991
10518
|
|
|
@@ -11018,7 +10545,7 @@ const getWidgetName = widgetId => {
|
|
|
11018
10545
|
const saveWidgetState = async keys => {
|
|
11019
10546
|
const savedStates = Object.create(null);
|
|
11020
10547
|
for (const key of keys) {
|
|
11021
|
-
const editor = get$
|
|
10548
|
+
const editor = get$6(parseInt(key));
|
|
11022
10549
|
const {
|
|
11023
10550
|
widgets
|
|
11024
10551
|
} = editor.newState;
|
|
@@ -11037,7 +10564,7 @@ const restoreWidgetState = async (keys, savedStates) => {
|
|
|
11037
10564
|
const newEditors = [];
|
|
11038
10565
|
for (const key of keys) {
|
|
11039
10566
|
const editorUid = parseInt(key);
|
|
11040
|
-
const editor = get$
|
|
10567
|
+
const editor = get$6(editorUid);
|
|
11041
10568
|
const {
|
|
11042
10569
|
widgets
|
|
11043
10570
|
} = editor.newState;
|
|
@@ -11084,12 +10611,12 @@ const hotReload = async () => {
|
|
|
11084
10611
|
await relaunchWorkers();
|
|
11085
10612
|
const newEditors = await restoreWidgetState(keys, savedStates);
|
|
11086
10613
|
for (const editor of newEditors) {
|
|
11087
|
-
set$
|
|
10614
|
+
set$7(editor.newState.uid, editor.oldState, editor.newState);
|
|
11088
10615
|
}
|
|
11089
10616
|
|
|
11090
10617
|
// TODO ask renderer worker to rerender all editors
|
|
11091
10618
|
// @ts-ignore
|
|
11092
|
-
await invoke$
|
|
10619
|
+
await invoke$c(`Editor.rerender`);
|
|
11093
10620
|
isReloading = false;
|
|
11094
10621
|
};
|
|
11095
10622
|
|
|
@@ -11134,7 +10661,7 @@ const createExtensionManagementWorkerRpc = async () => {
|
|
|
11134
10661
|
const initializeExtensionManagementWorker = async () => {
|
|
11135
10662
|
try {
|
|
11136
10663
|
const rpc = await createExtensionManagementWorkerRpc();
|
|
11137
|
-
set$
|
|
10664
|
+
set$c(rpc);
|
|
11138
10665
|
} catch {
|
|
11139
10666
|
// ignore
|
|
11140
10667
|
}
|
|
@@ -11161,7 +10688,7 @@ const sendMessagePortToSyntaxHighlightingWorker = async port => {
|
|
|
11161
10688
|
await sendMessagePortToSyntaxHighlightingWorker$1(port);
|
|
11162
10689
|
} catch {
|
|
11163
10690
|
// deprecated
|
|
11164
|
-
await invokeAndTransfer
|
|
10691
|
+
await invokeAndTransfer(
|
|
11165
10692
|
// @ts-ignore
|
|
11166
10693
|
'SendMessagePortToSyntaxHighlightingWorker.sendMessagePortToSyntaxHighlightingWorker', port, 'HandleMessagePort.handleMessagePort');
|
|
11167
10694
|
}
|
|
@@ -11198,7 +10725,7 @@ const initializeTextMeasurementWorker = async () => {
|
|
|
11198
10725
|
commandMap: {},
|
|
11199
10726
|
send
|
|
11200
10727
|
});
|
|
11201
|
-
set$
|
|
10728
|
+
set$9(rpc);
|
|
11202
10729
|
};
|
|
11203
10730
|
|
|
11204
10731
|
const launchCompletionWorker = async () => {
|
|
@@ -11483,9 +11010,6 @@ const renderFocusContext$1 = (oldState, newState) => {
|
|
|
11483
11010
|
return [SetFocusContext$1, newState.uid, FocusExplorer];
|
|
11484
11011
|
};
|
|
11485
11012
|
|
|
11486
|
-
const Text = 12;
|
|
11487
|
-
const Reference = 100;
|
|
11488
|
-
|
|
11489
11013
|
const SetText = 1;
|
|
11490
11014
|
const Replace = 2;
|
|
11491
11015
|
const SetAttribute = 3;
|
|
@@ -11574,7 +11098,7 @@ const compareNodes = (oldNode, newNode) => {
|
|
|
11574
11098
|
return patches;
|
|
11575
11099
|
}
|
|
11576
11100
|
// Handle text nodes
|
|
11577
|
-
if (oldNode.type === Text && newNode.type === Text) {
|
|
11101
|
+
if (oldNode.type === Text$1 && newNode.type === Text$1) {
|
|
11578
11102
|
if (oldNode.text !== newNode.text) {
|
|
11579
11103
|
patches.push({
|
|
11580
11104
|
type: SetText,
|
|
@@ -11708,7 +11232,6 @@ const diffChildren = (oldChildren, newChildren, patches) => {
|
|
|
11708
11232
|
patches.push({
|
|
11709
11233
|
type: NavigateParent
|
|
11710
11234
|
});
|
|
11711
|
-
currentChildIndex = -1;
|
|
11712
11235
|
}
|
|
11713
11236
|
// Add remove patches in reverse order (highest index first)
|
|
11714
11237
|
// This ensures indices remain valid as we remove
|
|
@@ -12010,28 +11533,28 @@ const render2 = (uid, diffResult) => {
|
|
|
12010
11533
|
const {
|
|
12011
11534
|
newState,
|
|
12012
11535
|
oldState
|
|
12013
|
-
} = get$
|
|
12014
|
-
set$
|
|
11536
|
+
} = get$6(uid);
|
|
11537
|
+
set$7(uid, newState, newState);
|
|
12015
11538
|
const commands = applyRender(oldState, newState, diffResult);
|
|
12016
11539
|
return commands;
|
|
12017
11540
|
};
|
|
12018
11541
|
|
|
12019
11542
|
const addWidget = widget => {
|
|
12020
|
-
const module = get$
|
|
11543
|
+
const module = get$5(widget.id);
|
|
12021
11544
|
if (!module) {
|
|
12022
11545
|
throw new Error('unsupported widget');
|
|
12023
11546
|
}
|
|
12024
11547
|
return module.add(widget);
|
|
12025
11548
|
};
|
|
12026
11549
|
const renderWidget = widget => {
|
|
12027
|
-
const module = get$
|
|
11550
|
+
const module = get$5(widget.id);
|
|
12028
11551
|
if (!module) {
|
|
12029
11552
|
throw new Error('unsupported widget');
|
|
12030
11553
|
}
|
|
12031
11554
|
return module.render(widget);
|
|
12032
11555
|
};
|
|
12033
11556
|
const removeWidget = widget => {
|
|
12034
|
-
const module = get$
|
|
11557
|
+
const module = get$5(widget.id);
|
|
12035
11558
|
if (!module) {
|
|
12036
11559
|
throw new Error('unsupported widget');
|
|
12037
11560
|
}
|
|
@@ -12213,7 +11736,7 @@ const renderWidgets = {
|
|
|
12213
11736
|
};
|
|
12214
11737
|
const render$6 = [renderLines, renderSelections, renderScrollBarX, renderScrollBarY, renderFocus$1, renderDecorations, renderGutterInfo, renderWidgets, renderFocusContext, renderAdditionalFocusContext];
|
|
12215
11738
|
const renderEditor = async id => {
|
|
12216
|
-
const instance = get$
|
|
11739
|
+
const instance = get$6(id);
|
|
12217
11740
|
if (!instance) {
|
|
12218
11741
|
return [];
|
|
12219
11742
|
}
|
|
@@ -12222,7 +11745,7 @@ const renderEditor = async id => {
|
|
|
12222
11745
|
oldState
|
|
12223
11746
|
} = instance;
|
|
12224
11747
|
const commands = [];
|
|
12225
|
-
set$
|
|
11748
|
+
set$7(id, newState, newState);
|
|
12226
11749
|
for (const item of render$6) {
|
|
12227
11750
|
if (!item.isEqual(oldState, newState)) {
|
|
12228
11751
|
const result = await item.apply(oldState, newState);
|
|
@@ -12299,7 +11822,7 @@ const unregisterListener = (listenerType, rpcId) => {
|
|
|
12299
11822
|
};
|
|
12300
11823
|
|
|
12301
11824
|
const invoke = async (method, ...params) => {
|
|
12302
|
-
const worker = get$
|
|
11825
|
+
const worker = get$7(DebugWorker);
|
|
12303
11826
|
return worker.invoke(method, ...params);
|
|
12304
11827
|
};
|
|
12305
11828
|
|
|
@@ -12315,7 +11838,7 @@ const getKey = () => {
|
|
|
12315
11838
|
const updateDebugInfo = async debugId => {
|
|
12316
11839
|
const newInfo = await getDebugHighlight(debugId);
|
|
12317
11840
|
const key = getKey();
|
|
12318
|
-
const instance = get$
|
|
11841
|
+
const instance = get$6(key);
|
|
12319
11842
|
if (!instance) {
|
|
12320
11843
|
return;
|
|
12321
11844
|
}
|
|
@@ -12327,90 +11850,69 @@ const updateDebugInfo = async debugId => {
|
|
|
12327
11850
|
...newState,
|
|
12328
11851
|
highlightedLine: newInfo.rowIndex
|
|
12329
11852
|
};
|
|
12330
|
-
set$
|
|
11853
|
+
set$7(key, oldState, newEditor);
|
|
12331
11854
|
// @ts-ignore
|
|
12332
|
-
await invoke$
|
|
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
|
-
};
|
|
11855
|
+
await invoke$c('Editor.rerender', key);
|
|
12355
11856
|
};
|
|
12356
11857
|
|
|
11858
|
+
const wrapCommandOld = wrapCommand;
|
|
12357
11859
|
const commandMap = {
|
|
12358
11860
|
'ActivateByEvent.activateByEvent': activateByEvent,
|
|
12359
11861
|
'CodeGenerator.accept': codeGeneratorAccept,
|
|
12360
11862
|
'ColorPicker.loadContent': loadContent$3,
|
|
12361
|
-
'Editor.addCursorAbove':
|
|
12362
|
-
'Editor.addCursorBelow':
|
|
12363
|
-
'Editor.applyDocumentEdits':
|
|
12364
|
-
'Editor.applyEdit':
|
|
11863
|
+
'Editor.addCursorAbove': wrapCommandOld(addCursorAbove),
|
|
11864
|
+
'Editor.addCursorBelow': wrapCommandOld(addCursorBelow),
|
|
11865
|
+
'Editor.applyDocumentEdits': wrapCommandOld(applyDocumentEdits),
|
|
11866
|
+
'Editor.applyEdit': wrapCommandOld(applyEdit),
|
|
12365
11867
|
'Editor.applyEdit2': applyEdits2,
|
|
12366
|
-
'Editor.applyWorkspaceEdit':
|
|
12367
|
-
'Editor.braceCompletion':
|
|
12368
|
-
'Editor.cancelSelection':
|
|
12369
|
-
'Editor.closeCodeGenerator':
|
|
12370
|
-
'Editor.closeFind':
|
|
11868
|
+
'Editor.applyWorkspaceEdit': wrapCommandOld(applyWorkspaceEdit),
|
|
11869
|
+
'Editor.braceCompletion': wrapCommandOld(braceCompletion),
|
|
11870
|
+
'Editor.cancelSelection': wrapCommandOld(cancelSelection),
|
|
11871
|
+
'Editor.closeCodeGenerator': wrapCommandOld(closeCodeGenerator),
|
|
11872
|
+
'Editor.closeFind': wrapCommandOld(closeFind),
|
|
12371
11873
|
'Editor.closeFind2': closeFind2,
|
|
12372
|
-
'Editor.closeRename':
|
|
12373
|
-
'Editor.closeSourceAction':
|
|
11874
|
+
'Editor.closeRename': wrapCommandOld(closeRename),
|
|
11875
|
+
'Editor.closeSourceAction': wrapCommandOld(closeSourceAction),
|
|
12374
11876
|
'Editor.closeWidget2': closeWidget2,
|
|
12375
|
-
'Editor.compositionEnd':
|
|
12376
|
-
'Editor.compositionStart':
|
|
12377
|
-
'Editor.compositionUpdate':
|
|
12378
|
-
'Editor.contextMenu':
|
|
12379
|
-
'Editor.copy':
|
|
12380
|
-
'Editor.copyLineDown':
|
|
12381
|
-
'Editor.copyLineUp':
|
|
11877
|
+
'Editor.compositionEnd': wrapCommandOld(compositionEnd),
|
|
11878
|
+
'Editor.compositionStart': wrapCommandOld(compositionStart),
|
|
11879
|
+
'Editor.compositionUpdate': wrapCommandOld(compositionUpdate),
|
|
11880
|
+
'Editor.contextMenu': wrapCommandOld(handleContextMenu),
|
|
11881
|
+
'Editor.copy': wrapCommandOld(copy$1),
|
|
11882
|
+
'Editor.copyLineDown': wrapCommandOld(copyLineDown),
|
|
11883
|
+
'Editor.copyLineUp': wrapCommandOld(copyLineUp),
|
|
12382
11884
|
'Editor.create': createEditor,
|
|
12383
11885
|
'Editor.create2': createEditor2,
|
|
12384
|
-
'Editor.cursorCharacterLeft':
|
|
12385
|
-
'Editor.cursorCharacterRight':
|
|
12386
|
-
'Editor.cursorDown':
|
|
12387
|
-
'Editor.cursorEnd':
|
|
12388
|
-
'Editor.cursorHome':
|
|
12389
|
-
'Editor.cursorLeft':
|
|
12390
|
-
'Editor.cursorRight':
|
|
12391
|
-
'Editor.cursorSet':
|
|
12392
|
-
'Editor.cursorUp':
|
|
12393
|
-
'Editor.cursorWordLeft':
|
|
12394
|
-
'Editor.cursorWordPartLeft':
|
|
12395
|
-
'Editor.cursorWordPartRight':
|
|
12396
|
-
'Editor.cursorWordRight':
|
|
12397
|
-
'Editor.cut':
|
|
12398
|
-
'Editor.deleteAll':
|
|
12399
|
-
'Editor.deleteAllLeft':
|
|
12400
|
-
'Editor.deleteAllRight':
|
|
12401
|
-
'Editor.deleteCharacterLeft':
|
|
12402
|
-
'Editor.deleteCharacterRight':
|
|
12403
|
-
'Editor.deleteHorizontalRight':
|
|
12404
|
-
'Editor.deleteLeft':
|
|
12405
|
-
'Editor.deleteRight':
|
|
12406
|
-
'Editor.deleteWordLeft':
|
|
12407
|
-
'Editor.deleteWordPartLeft':
|
|
12408
|
-
'Editor.deleteWordPartRight':
|
|
12409
|
-
'Editor.deleteWordRight':
|
|
11886
|
+
'Editor.cursorCharacterLeft': wrapCommandOld(cursorCharacterLeft),
|
|
11887
|
+
'Editor.cursorCharacterRight': wrapCommandOld(cursorCharacterRight),
|
|
11888
|
+
'Editor.cursorDown': wrapCommandOld(cursorDown),
|
|
11889
|
+
'Editor.cursorEnd': wrapCommandOld(cursorEnd),
|
|
11890
|
+
'Editor.cursorHome': wrapCommandOld(cursorHome),
|
|
11891
|
+
'Editor.cursorLeft': wrapCommandOld(cursorCharacterLeft),
|
|
11892
|
+
'Editor.cursorRight': wrapCommandOld(cursorCharacterRight),
|
|
11893
|
+
'Editor.cursorSet': wrapCommandOld(cursorSet),
|
|
11894
|
+
'Editor.cursorUp': wrapCommandOld(cursorUp),
|
|
11895
|
+
'Editor.cursorWordLeft': wrapCommandOld(cursorWordLeft),
|
|
11896
|
+
'Editor.cursorWordPartLeft': wrapCommandOld(cursorWordPartLeft),
|
|
11897
|
+
'Editor.cursorWordPartRight': wrapCommandOld(cursorWordPartRight),
|
|
11898
|
+
'Editor.cursorWordRight': wrapCommandOld(cursorWordRight),
|
|
11899
|
+
'Editor.cut': wrapCommandOld(cut$1),
|
|
11900
|
+
'Editor.deleteAll': wrapCommandOld(deleteAll),
|
|
11901
|
+
'Editor.deleteAllLeft': wrapCommandOld(deleteAllLeft),
|
|
11902
|
+
'Editor.deleteAllRight': wrapCommandOld(deleteAllRight),
|
|
11903
|
+
'Editor.deleteCharacterLeft': wrapCommandOld(deleteCharacterLeft),
|
|
11904
|
+
'Editor.deleteCharacterRight': wrapCommandOld(deleteCharacterRight),
|
|
11905
|
+
'Editor.deleteHorizontalRight': wrapCommandOld(editorDeleteHorizontalRight),
|
|
11906
|
+
'Editor.deleteLeft': wrapCommandOld(deleteCharacterLeft),
|
|
11907
|
+
'Editor.deleteRight': wrapCommandOld(deleteCharacterRight),
|
|
11908
|
+
'Editor.deleteWordLeft': wrapCommandOld(deleteWordLeft),
|
|
11909
|
+
'Editor.deleteWordPartLeft': wrapCommandOld(deleteWordPartLeft),
|
|
11910
|
+
'Editor.deleteWordPartRight': wrapCommandOld(deleteWordPartRight),
|
|
11911
|
+
'Editor.deleteWordRight': wrapCommandOld(deleteWordRight),
|
|
12410
11912
|
'Editor.diff2': diff2,
|
|
12411
|
-
'Editor.executeWidgetCommand':
|
|
12412
|
-
'Editor.findAllReferences':
|
|
12413
|
-
'Editor.format':
|
|
11913
|
+
'Editor.executeWidgetCommand': wrapCommandOld(executeWidgetCommand),
|
|
11914
|
+
'Editor.findAllReferences': wrapCommandOld(findAllReferences$1),
|
|
11915
|
+
'Editor.format': wrapCommandOld(format),
|
|
12414
11916
|
'Editor.getCommandIds': getCommandIds,
|
|
12415
11917
|
'Editor.getDiagnostics': getDiagnostics$1,
|
|
12416
11918
|
'Editor.getKeyBindings': getKeyBindings,
|
|
@@ -12434,103 +11936,103 @@ const commandMap = {
|
|
|
12434
11936
|
'Editor.getWordAtOffset2': getWordAtOffset2,
|
|
12435
11937
|
'Editor.getWordBefore': getWordBefore,
|
|
12436
11938
|
'Editor.getWordBefore2': getWordBefore2,
|
|
12437
|
-
'Editor.goToDefinition':
|
|
12438
|
-
'Editor.goToTypeDefinition':
|
|
12439
|
-
'Editor.handleBeforeInput':
|
|
12440
|
-
'Editor.handleBeforeInputFromContentEditable':
|
|
12441
|
-
'Editor.handleBlur':
|
|
11939
|
+
'Editor.goToDefinition': wrapCommandOld(goToDefinition),
|
|
11940
|
+
'Editor.goToTypeDefinition': wrapCommandOld(goToTypeDefinition),
|
|
11941
|
+
'Editor.handleBeforeInput': wrapCommandOld(handleBeforeInput),
|
|
11942
|
+
'Editor.handleBeforeInputFromContentEditable': wrapCommandOld(handleBeforeInputFromContentEditable),
|
|
11943
|
+
'Editor.handleBlur': wrapCommandOld(handleBlur$1),
|
|
12442
11944
|
'Editor.handleClickAtPosition': handleClickAtPosition,
|
|
12443
|
-
'Editor.handleContextMenu':
|
|
12444
|
-
'Editor.handleDoubleClick':
|
|
12445
|
-
'Editor.handleFocus':
|
|
12446
|
-
'Editor.handleMouseDown':
|
|
12447
|
-
'Editor.handleMouseMove':
|
|
12448
|
-
'Editor.handleMouseMoveWithAltKey':
|
|
11945
|
+
'Editor.handleContextMenu': wrapCommandOld(handleContextMenu),
|
|
11946
|
+
'Editor.handleDoubleClick': wrapCommandOld(handleDoubleClick),
|
|
11947
|
+
'Editor.handleFocus': wrapCommandOld(handleFocus$1),
|
|
11948
|
+
'Editor.handleMouseDown': wrapCommandOld(handleMouseDown),
|
|
11949
|
+
'Editor.handleMouseMove': wrapCommandOld(handleMouseMove),
|
|
11950
|
+
'Editor.handleMouseMoveWithAltKey': wrapCommandOld(handleMouseMoveWithAltKey),
|
|
12449
11951
|
'Editor.handleNativeSelectionChange': editorHandleNativeSelectionChange,
|
|
12450
|
-
'Editor.handlePointerCaptureLost':
|
|
11952
|
+
'Editor.handlePointerCaptureLost': wrapCommandOld(handlePointerCaptureLost),
|
|
12451
11953
|
'Editor.handleScrollBarClick': handleScrollBarPointerDown,
|
|
12452
|
-
'Editor.handleScrollBarHorizontalMove':
|
|
12453
|
-
'Editor.handleScrollBarHorizontalPointerDown':
|
|
12454
|
-
'Editor.handleScrollBarMove':
|
|
12455
|
-
'Editor.handleScrollBarPointerDown':
|
|
12456
|
-
'Editor.handleScrollBarVerticalMove':
|
|
12457
|
-
'Editor.handleScrollBarVerticalPointerDown':
|
|
12458
|
-
'Editor.handleScrollBarVerticalPointerMove':
|
|
12459
|
-
'Editor.handleSingleClick':
|
|
12460
|
-
'Editor.handleTab':
|
|
12461
|
-
'Editor.handleTouchEnd':
|
|
12462
|
-
'Editor.handleTouchMove':
|
|
12463
|
-
'Editor.handleTouchStart':
|
|
12464
|
-
'Editor.handleTripleClick':
|
|
11954
|
+
'Editor.handleScrollBarHorizontalMove': wrapCommandOld(handleScrollBarHorizontalMove),
|
|
11955
|
+
'Editor.handleScrollBarHorizontalPointerDown': wrapCommandOld(handleScrollBarHorizontalPointerDown),
|
|
11956
|
+
'Editor.handleScrollBarMove': wrapCommandOld(handleScrollBarMove),
|
|
11957
|
+
'Editor.handleScrollBarPointerDown': wrapCommandOld(handleScrollBarPointerDown),
|
|
11958
|
+
'Editor.handleScrollBarVerticalMove': wrapCommandOld(handleScrollBarVerticalPointerMove),
|
|
11959
|
+
'Editor.handleScrollBarVerticalPointerDown': wrapCommandOld(handleScrollBarPointerDown),
|
|
11960
|
+
'Editor.handleScrollBarVerticalPointerMove': wrapCommandOld(handleScrollBarVerticalPointerMove),
|
|
11961
|
+
'Editor.handleSingleClick': wrapCommandOld(handleSingleClick),
|
|
11962
|
+
'Editor.handleTab': wrapCommandOld(handleTab),
|
|
11963
|
+
'Editor.handleTouchEnd': wrapCommandOld(handleTouchEnd),
|
|
11964
|
+
'Editor.handleTouchMove': wrapCommandOld(handleTouchMove),
|
|
11965
|
+
'Editor.handleTouchStart': wrapCommandOld(handleTouchStart),
|
|
11966
|
+
'Editor.handleTripleClick': wrapCommandOld(handleTripleClick),
|
|
12465
11967
|
'Editor.hotReload': hotReload,
|
|
12466
|
-
'Editor.indendLess':
|
|
12467
|
-
'Editor.indentMore':
|
|
12468
|
-
'Editor.insertLineBreak':
|
|
12469
|
-
'Editor.loadContent': wrapCommand
|
|
12470
|
-
'Editor.moveLineDown':
|
|
12471
|
-
'Editor.moveLineUp':
|
|
12472
|
-
'Editor.moveRectangleSelection':
|
|
12473
|
-
'Editor.moveRectangleSelectionPx':
|
|
12474
|
-
'Editor.moveSelection':
|
|
12475
|
-
'Editor.moveSelectionPx':
|
|
11968
|
+
'Editor.indendLess': wrapCommandOld(indentLess),
|
|
11969
|
+
'Editor.indentMore': wrapCommandOld(indentMore),
|
|
11970
|
+
'Editor.insertLineBreak': wrapCommandOld(insertLineBreak),
|
|
11971
|
+
'Editor.loadContent': wrapCommand(loadContent),
|
|
11972
|
+
'Editor.moveLineDown': wrapCommandOld(moveLineDown),
|
|
11973
|
+
'Editor.moveLineUp': wrapCommandOld(moveLineUp),
|
|
11974
|
+
'Editor.moveRectangleSelection': wrapCommandOld(moveRectangleSelection),
|
|
11975
|
+
'Editor.moveRectangleSelectionPx': wrapCommandOld(moveRectangleSelectionPx),
|
|
11976
|
+
'Editor.moveSelection': wrapCommandOld(editorMoveSelection),
|
|
11977
|
+
'Editor.moveSelectionPx': wrapCommandOld(moveSelectionPx),
|
|
12476
11978
|
'Editor.offsetAt': offsetAt,
|
|
12477
|
-
'Editor.openCodeGenerator':
|
|
12478
|
-
'Editor.openColorPicker':
|
|
12479
|
-
'Editor.openCompletion':
|
|
12480
|
-
'Editor.openFind':
|
|
12481
|
-
'Editor.openFind2':
|
|
12482
|
-
'Editor.openRename':
|
|
12483
|
-
'Editor.organizeImports':
|
|
12484
|
-
'Editor.paste':
|
|
12485
|
-
'Editor.pasteText':
|
|
11979
|
+
'Editor.openCodeGenerator': wrapCommandOld(openCodeGenerator),
|
|
11980
|
+
'Editor.openColorPicker': wrapCommandOld(openColorPicker),
|
|
11981
|
+
'Editor.openCompletion': wrapCommandOld(openCompletion),
|
|
11982
|
+
'Editor.openFind': wrapCommandOld(openFind),
|
|
11983
|
+
'Editor.openFind2': wrapCommandOld(openFind2),
|
|
11984
|
+
'Editor.openRename': wrapCommandOld(openRename),
|
|
11985
|
+
'Editor.organizeImports': wrapCommandOld(organizeImports),
|
|
11986
|
+
'Editor.paste': wrapCommandOld(paste),
|
|
11987
|
+
'Editor.pasteText': wrapCommandOld(pasteText),
|
|
12486
11988
|
'Editor.render': renderEditor,
|
|
12487
11989
|
'Editor.render2': render2,
|
|
12488
11990
|
'Editor.renderEventListeners': renderEventListeners,
|
|
12489
|
-
'Editor.replaceRange':
|
|
12490
|
-
'Editor.rerender':
|
|
12491
|
-
'Editor.save':
|
|
11991
|
+
'Editor.replaceRange': wrapCommandOld(replaceRange),
|
|
11992
|
+
'Editor.rerender': wrapCommandOld(rerender),
|
|
11993
|
+
'Editor.save': wrapCommandOld(save),
|
|
12492
11994
|
'Editor.saveState': wrapGetter(saveState),
|
|
12493
|
-
'Editor.selectAll':
|
|
12494
|
-
'Editor.selectAllLeft':
|
|
12495
|
-
'Editor.selectAllOccurrences':
|
|
12496
|
-
'Editor.selectAllRight':
|
|
12497
|
-
'Editor.selectCharacterLeft':
|
|
12498
|
-
'Editor.selectCharacterRight':
|
|
12499
|
-
'Editor.selectDown':
|
|
12500
|
-
'Editor.selectInsideString':
|
|
12501
|
-
'Editor.selectionGrow':
|
|
12502
|
-
'Editor.selectLine':
|
|
12503
|
-
'Editor.selectNextOccurrence':
|
|
12504
|
-
'Editor.selectPreviousOccurrence':
|
|
12505
|
-
'Editor.selectUp':
|
|
12506
|
-
'Editor.selectWord':
|
|
12507
|
-
'Editor.selectWordLeft':
|
|
12508
|
-
'Editor.selectWordRight':
|
|
12509
|
-
'Editor.setDebugEnabled':
|
|
12510
|
-
'Editor.setDecorations':
|
|
12511
|
-
'Editor.setDelta':
|
|
12512
|
-
'Editor.setDeltaY':
|
|
12513
|
-
'Editor.setLanguageId':
|
|
12514
|
-
'Editor.setSelections':
|
|
11995
|
+
'Editor.selectAll': wrapCommandOld(selectAll),
|
|
11996
|
+
'Editor.selectAllLeft': wrapCommandOld(editorSelectAllLeft),
|
|
11997
|
+
'Editor.selectAllOccurrences': wrapCommandOld(selectAllOccurrences),
|
|
11998
|
+
'Editor.selectAllRight': wrapCommandOld(editorSelectAllRight),
|
|
11999
|
+
'Editor.selectCharacterLeft': wrapCommandOld(selectCharacterLeft),
|
|
12000
|
+
'Editor.selectCharacterRight': wrapCommandOld(selectCharacterRight),
|
|
12001
|
+
'Editor.selectDown': wrapCommandOld(selectDown),
|
|
12002
|
+
'Editor.selectInsideString': wrapCommandOld(selectInsideString),
|
|
12003
|
+
'Editor.selectionGrow': wrapCommandOld(selectionGrow),
|
|
12004
|
+
'Editor.selectLine': wrapCommandOld(selectLine),
|
|
12005
|
+
'Editor.selectNextOccurrence': wrapCommandOld(selectNextOccurrence),
|
|
12006
|
+
'Editor.selectPreviousOccurrence': wrapCommandOld(selectPreviousOccurrence),
|
|
12007
|
+
'Editor.selectUp': wrapCommandOld(selectUp),
|
|
12008
|
+
'Editor.selectWord': wrapCommandOld(selectWord),
|
|
12009
|
+
'Editor.selectWordLeft': wrapCommandOld(selectWordLeft),
|
|
12010
|
+
'Editor.selectWordRight': wrapCommandOld(selectWordRight),
|
|
12011
|
+
'Editor.setDebugEnabled': wrapCommandOld(setDebugEnabled),
|
|
12012
|
+
'Editor.setDecorations': wrapCommandOld(setDecorations),
|
|
12013
|
+
'Editor.setDelta': wrapCommandOld(setDelta),
|
|
12014
|
+
'Editor.setDeltaY': wrapCommandOld(setDeltaY),
|
|
12015
|
+
'Editor.setLanguageId': wrapCommandOld(setLanguageId),
|
|
12016
|
+
'Editor.setSelections': wrapCommandOld(setSelections),
|
|
12515
12017
|
'Editor.setSelections2': setSelections2,
|
|
12516
|
-
'Editor.setText':
|
|
12018
|
+
'Editor.setText': wrapCommandOld(setText),
|
|
12517
12019
|
'Editor.showHover': showHover,
|
|
12518
12020
|
'Editor.showHover2': showHover3,
|
|
12519
12021
|
'Editor.showSourceActions': showSourceActions,
|
|
12520
12022
|
'Editor.showSourceActions2': showSourceActions,
|
|
12521
12023
|
'Editor.showSourceActions3': showSourceActions,
|
|
12522
|
-
'Editor.sortLinesAscending':
|
|
12523
|
-
'Editor.tabCompletion':
|
|
12024
|
+
'Editor.sortLinesAscending': wrapCommandOld(sortLinesAscending),
|
|
12025
|
+
'Editor.tabCompletion': wrapCommandOld(tabCompletion),
|
|
12524
12026
|
'Editor.terminate': terminate,
|
|
12525
|
-
'Editor.toggleBlockComment':
|
|
12526
|
-
'Editor.toggleComment':
|
|
12527
|
-
'Editor.toggleLineComment':
|
|
12528
|
-
'Editor.type':
|
|
12529
|
-
'Editor.typeWithAutoClosing':
|
|
12530
|
-
'Editor.undo':
|
|
12531
|
-
'Editor.unIndent':
|
|
12027
|
+
'Editor.toggleBlockComment': wrapCommandOld(toggleBlockComment),
|
|
12028
|
+
'Editor.toggleComment': wrapCommandOld(toggleComment),
|
|
12029
|
+
'Editor.toggleLineComment': wrapCommandOld(editorToggleLineComment),
|
|
12030
|
+
'Editor.type': wrapCommandOld(type),
|
|
12031
|
+
'Editor.typeWithAutoClosing': wrapCommandOld(typeWithAutoClosing),
|
|
12032
|
+
'Editor.undo': wrapCommandOld(undo),
|
|
12033
|
+
'Editor.unIndent': wrapCommandOld(editorUnindent),
|
|
12532
12034
|
'Editor.updateDebugInfo': updateDebugInfo,
|
|
12533
|
-
'Editor.updateDiagnostics':
|
|
12035
|
+
'Editor.updateDiagnostics': wrapCommandOld(updateDiagnostics),
|
|
12534
12036
|
'EditorCompletion.close': close$4,
|
|
12535
12037
|
'EditorCompletion.closeDetails': closeDetails$1,
|
|
12536
12038
|
'EditorCompletion.focusFirst': focusFirst$1,
|
|
@@ -12617,7 +12119,7 @@ const listen = async () => {
|
|
|
12617
12119
|
const rpc = await create$b({
|
|
12618
12120
|
commandMap: commandMap
|
|
12619
12121
|
});
|
|
12620
|
-
set$
|
|
12122
|
+
set$a(rpc);
|
|
12621
12123
|
};
|
|
12622
12124
|
|
|
12623
12125
|
const CodeGeneratorInput = 'CodeGeneratorInput';
|
|
@@ -12843,7 +12345,7 @@ const add$1 = widget => {
|
|
|
12843
12345
|
return addWidget$1(widget, 'EditorCompletionDetails', render$1);
|
|
12844
12346
|
};
|
|
12845
12347
|
const remove$1 = removeWidget$1;
|
|
12846
|
-
const
|
|
12348
|
+
const handleEditorChange = (editor, state) => {
|
|
12847
12349
|
const completionState = getCompletionState(editor);
|
|
12848
12350
|
if (!completionState) {
|
|
12849
12351
|
return editor;
|
|
@@ -12857,19 +12359,11 @@ const handleEditorType = (editor, state) => {
|
|
|
12857
12359
|
x: detailX
|
|
12858
12360
|
};
|
|
12859
12361
|
};
|
|
12362
|
+
const handleEditorType = (editor, state) => {
|
|
12363
|
+
return handleEditorChange(editor, state);
|
|
12364
|
+
};
|
|
12860
12365
|
const handleEditorDeleteLeft = (editor, state) => {
|
|
12861
|
-
|
|
12862
|
-
if (!completionState) {
|
|
12863
|
-
return editor;
|
|
12864
|
-
}
|
|
12865
|
-
const {
|
|
12866
|
-
x
|
|
12867
|
-
} = getPositionAtCursor$1(editor);
|
|
12868
|
-
const detailX = x + completionState.width - state.borderSize;
|
|
12869
|
-
return {
|
|
12870
|
-
...state,
|
|
12871
|
-
x: detailX
|
|
12872
|
-
};
|
|
12366
|
+
return handleEditorChange(editor, state);
|
|
12873
12367
|
};
|
|
12874
12368
|
|
|
12875
12369
|
const EditorCompletionDetailWidget = {
|
|
@@ -12915,14 +12409,14 @@ const EditorHoverWidget = {
|
|
|
12915
12409
|
};
|
|
12916
12410
|
|
|
12917
12411
|
const registerWidgets = () => {
|
|
12918
|
-
set$
|
|
12919
|
-
set$
|
|
12920
|
-
set$
|
|
12921
|
-
set$
|
|
12922
|
-
set$
|
|
12923
|
-
set$
|
|
12924
|
-
set$
|
|
12925
|
-
set$
|
|
12412
|
+
set$6(ColorPicker$1, EditorColorPickerWidget);
|
|
12413
|
+
set$6(Completion, EditorCompletionWidget);
|
|
12414
|
+
set$6(CompletionDetail, EditorCompletionDetailWidget);
|
|
12415
|
+
set$6(Find, EditorFindWidget);
|
|
12416
|
+
set$6(Hover, EditorHoverWidget);
|
|
12417
|
+
set$6(Rename$1, EditorRenameWidget);
|
|
12418
|
+
set$6(SourceAction$1, EditorSourceActionWidget);
|
|
12419
|
+
set$6(CodeGenerator, EditorCodeGeneratorWidget);
|
|
12926
12420
|
};
|
|
12927
12421
|
|
|
12928
12422
|
const handleUnhandledRejection = event => {
|