@lvce-editor/source-control-worker 1.17.0 → 1.19.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/sourceControlWorkerMain.js +309 -297
- package/package.json +1 -1
|
@@ -513,7 +513,7 @@ const IpcParentWithMessagePort$1 = {
|
|
|
513
513
|
};
|
|
514
514
|
|
|
515
515
|
const Two = '2.0';
|
|
516
|
-
const create$4
|
|
516
|
+
const create$4 = (method, params) => {
|
|
517
517
|
return {
|
|
518
518
|
jsonrpc: Two,
|
|
519
519
|
method,
|
|
@@ -521,7 +521,7 @@ const create$4$1 = (method, params) => {
|
|
|
521
521
|
};
|
|
522
522
|
};
|
|
523
523
|
const callbacks = Object.create(null);
|
|
524
|
-
const set$
|
|
524
|
+
const set$5 = (id, fn) => {
|
|
525
525
|
callbacks[id] = fn;
|
|
526
526
|
};
|
|
527
527
|
const get$3 = id => {
|
|
@@ -531,16 +531,16 @@ const remove = id => {
|
|
|
531
531
|
delete callbacks[id];
|
|
532
532
|
};
|
|
533
533
|
let id = 0;
|
|
534
|
-
const create$3 = () => {
|
|
534
|
+
const create$3$1 = () => {
|
|
535
535
|
return ++id;
|
|
536
536
|
};
|
|
537
537
|
const registerPromise = () => {
|
|
538
|
-
const id = create$3();
|
|
538
|
+
const id = create$3$1();
|
|
539
539
|
const {
|
|
540
540
|
resolve,
|
|
541
541
|
promise
|
|
542
542
|
} = Promise.withResolvers();
|
|
543
|
-
set$
|
|
543
|
+
set$5(id, resolve);
|
|
544
544
|
return {
|
|
545
545
|
id,
|
|
546
546
|
promise
|
|
@@ -882,13 +882,13 @@ const invokeHelper = async (ipc, method, params, useSendAndTransfer) => {
|
|
|
882
882
|
return unwrapJsonRpcResult(responseMessage);
|
|
883
883
|
};
|
|
884
884
|
const send = (transport, method, ...params) => {
|
|
885
|
-
const message = create$4
|
|
885
|
+
const message = create$4(method, params);
|
|
886
886
|
transport.send(message);
|
|
887
887
|
};
|
|
888
888
|
const invoke$4 = (ipc, method, ...params) => {
|
|
889
889
|
return invokeHelper(ipc, method, params, false);
|
|
890
890
|
};
|
|
891
|
-
const invokeAndTransfer$
|
|
891
|
+
const invokeAndTransfer$2 = (ipc, method, ...params) => {
|
|
892
892
|
return invokeHelper(ipc, method, params, true);
|
|
893
893
|
};
|
|
894
894
|
|
|
@@ -927,7 +927,7 @@ const createRpc = ipc => {
|
|
|
927
927
|
return invoke$4(ipc, method, ...params);
|
|
928
928
|
},
|
|
929
929
|
invokeAndTransfer(method, ...params) {
|
|
930
|
-
return invokeAndTransfer$
|
|
930
|
+
return invokeAndTransfer$2(ipc, method, ...params);
|
|
931
931
|
},
|
|
932
932
|
async dispose() {
|
|
933
933
|
await ipc?.dispose();
|
|
@@ -981,18 +981,23 @@ const create$5 = async ({
|
|
|
981
981
|
messagePort.start();
|
|
982
982
|
return rpc;
|
|
983
983
|
};
|
|
984
|
-
const create$
|
|
984
|
+
const create$3 = async ({
|
|
985
985
|
commandMap,
|
|
986
|
-
|
|
986
|
+
send
|
|
987
987
|
}) => {
|
|
988
|
+
const {
|
|
989
|
+
port1,
|
|
990
|
+
port2
|
|
991
|
+
} = new MessageChannel();
|
|
992
|
+
await send(port1);
|
|
988
993
|
return create$5({
|
|
989
994
|
commandMap,
|
|
990
|
-
messagePort
|
|
995
|
+
messagePort: port2
|
|
991
996
|
});
|
|
992
997
|
};
|
|
993
|
-
const
|
|
998
|
+
const TransferMessagePortRpcParent = {
|
|
994
999
|
__proto__: null,
|
|
995
|
-
create: create$
|
|
1000
|
+
create: create$3
|
|
996
1001
|
};
|
|
997
1002
|
const create$2 = async ({
|
|
998
1003
|
commandMap
|
|
@@ -1028,207 +1033,52 @@ const createMockRpc = ({
|
|
|
1028
1033
|
return mockRpc;
|
|
1029
1034
|
};
|
|
1030
1035
|
|
|
1031
|
-
const toCommandId = key => {
|
|
1032
|
-
const dotIndex = key.indexOf('.');
|
|
1033
|
-
return key.slice(dotIndex + 1);
|
|
1034
|
-
};
|
|
1035
|
-
const create$1 = () => {
|
|
1036
|
-
const states = Object.create(null);
|
|
1037
|
-
const commandMapRef = {};
|
|
1038
|
-
return {
|
|
1039
|
-
get(uid) {
|
|
1040
|
-
return states[uid];
|
|
1041
|
-
},
|
|
1042
|
-
set(uid, oldState, newState) {
|
|
1043
|
-
states[uid] = {
|
|
1044
|
-
oldState,
|
|
1045
|
-
newState
|
|
1046
|
-
};
|
|
1047
|
-
},
|
|
1048
|
-
dispose(uid) {
|
|
1049
|
-
delete states[uid];
|
|
1050
|
-
},
|
|
1051
|
-
getKeys() {
|
|
1052
|
-
return Object.keys(states).map(key => {
|
|
1053
|
-
return Number.parseInt(key);
|
|
1054
|
-
});
|
|
1055
|
-
},
|
|
1056
|
-
clear() {
|
|
1057
|
-
for (const key of Object.keys(states)) {
|
|
1058
|
-
delete states[key];
|
|
1059
|
-
}
|
|
1060
|
-
},
|
|
1061
|
-
wrapCommand(fn) {
|
|
1062
|
-
const wrapped = async (uid, ...args) => {
|
|
1063
|
-
const {
|
|
1064
|
-
newState
|
|
1065
|
-
} = states[uid];
|
|
1066
|
-
const newerState = await fn(newState, ...args);
|
|
1067
|
-
if (newState === newerState) {
|
|
1068
|
-
return;
|
|
1069
|
-
}
|
|
1070
|
-
const latest = states[uid];
|
|
1071
|
-
states[uid] = {
|
|
1072
|
-
oldState: latest.oldState,
|
|
1073
|
-
newState: newerState
|
|
1074
|
-
};
|
|
1075
|
-
};
|
|
1076
|
-
return wrapped;
|
|
1077
|
-
},
|
|
1078
|
-
wrapGetter(fn) {
|
|
1079
|
-
const wrapped = (uid, ...args) => {
|
|
1080
|
-
const {
|
|
1081
|
-
newState
|
|
1082
|
-
} = states[uid];
|
|
1083
|
-
return fn(newState, ...args);
|
|
1084
|
-
};
|
|
1085
|
-
return wrapped;
|
|
1086
|
-
},
|
|
1087
|
-
diff(uid, modules, numbers) {
|
|
1088
|
-
const {
|
|
1089
|
-
oldState,
|
|
1090
|
-
newState
|
|
1091
|
-
} = states[uid];
|
|
1092
|
-
const diffResult = [];
|
|
1093
|
-
for (let i = 0; i < modules.length; i++) {
|
|
1094
|
-
const fn = modules[i];
|
|
1095
|
-
if (!fn(oldState, newState)) {
|
|
1096
|
-
diffResult.push(numbers[i]);
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
return diffResult;
|
|
1100
|
-
},
|
|
1101
|
-
getCommandIds() {
|
|
1102
|
-
const keys = Object.keys(commandMapRef);
|
|
1103
|
-
const ids = keys.map(toCommandId);
|
|
1104
|
-
return ids;
|
|
1105
|
-
},
|
|
1106
|
-
registerCommands(commandMap) {
|
|
1107
|
-
Object.assign(commandMapRef, commandMap);
|
|
1108
|
-
}
|
|
1109
|
-
};
|
|
1110
|
-
};
|
|
1111
|
-
|
|
1112
|
-
const {
|
|
1113
|
-
get: get$2,
|
|
1114
|
-
set: set$5,
|
|
1115
|
-
wrapCommand,
|
|
1116
|
-
getCommandIds,
|
|
1117
|
-
registerCommands
|
|
1118
|
-
} = create$1();
|
|
1119
|
-
|
|
1120
|
-
const create2 = (id, uri, x, y, width, height, workspacePath) => {
|
|
1121
|
-
const state = {
|
|
1122
|
-
actionsCache: Object.create(null),
|
|
1123
|
-
allGroups: [],
|
|
1124
|
-
deltaY: 0,
|
|
1125
|
-
enabledProviderIds: [],
|
|
1126
|
-
fileIconCache: Object.create(null),
|
|
1127
|
-
finalDeltaY: 0,
|
|
1128
|
-
gitRoot: '',
|
|
1129
|
-
handleOffset: 0,
|
|
1130
|
-
headerHeight: 40,
|
|
1131
|
-
// TODO
|
|
1132
|
-
height,
|
|
1133
|
-
id,
|
|
1134
|
-
index: [],
|
|
1135
|
-
inputValue: '',
|
|
1136
|
-
expandedGroups: Object.create(null),
|
|
1137
|
-
itemHeight: 20,
|
|
1138
|
-
items: [],
|
|
1139
|
-
maxLineY: 0,
|
|
1140
|
-
merge: [],
|
|
1141
|
-
minimumSliderSize: 20,
|
|
1142
|
-
minLineY: 0,
|
|
1143
|
-
providerId: '',
|
|
1144
|
-
root: '',
|
|
1145
|
-
scrollBarActive: false,
|
|
1146
|
-
scrollBarHeight: 0,
|
|
1147
|
-
splitButtonEnabled: false,
|
|
1148
|
-
untracked: [],
|
|
1149
|
-
visibleItems: [],
|
|
1150
|
-
width,
|
|
1151
|
-
workingTree: [],
|
|
1152
|
-
workspacePath,
|
|
1153
|
-
x,
|
|
1154
|
-
y
|
|
1155
|
-
};
|
|
1156
|
-
set$5(id, state, state);
|
|
1157
|
-
};
|
|
1158
|
-
|
|
1159
|
-
const RenderItems = 4;
|
|
1160
|
-
|
|
1161
|
-
const diffType = RenderItems;
|
|
1162
|
-
const isEqual = (oldState, newState) => {
|
|
1163
|
-
return oldState.allGroups === newState.allGroups && oldState.visibleItems === newState.visibleItems && oldState.items === newState.items && oldState.minLineY === newState.minLineY && oldState.maxLineY === newState.maxLineY && oldState.deltaY === newState.deltaY;
|
|
1164
|
-
};
|
|
1165
|
-
|
|
1166
|
-
const modules = [isEqual];
|
|
1167
|
-
const numbers = [diffType];
|
|
1168
|
-
|
|
1169
|
-
const diff = (oldState, newState) => {
|
|
1170
|
-
const diffResult = [];
|
|
1171
|
-
for (let i = 0; i < modules.length; i++) {
|
|
1172
|
-
const fn = modules[i];
|
|
1173
|
-
if (!fn(oldState, newState)) {
|
|
1174
|
-
diffResult.push(numbers[i]);
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
|
-
return diffResult;
|
|
1178
|
-
};
|
|
1179
|
-
|
|
1180
|
-
const diff2 = uid => {
|
|
1181
|
-
const {
|
|
1182
|
-
oldState,
|
|
1183
|
-
newState
|
|
1184
|
-
} = get$2(uid);
|
|
1185
|
-
const result = diff(oldState, newState);
|
|
1186
|
-
return result;
|
|
1187
|
-
};
|
|
1188
|
-
|
|
1189
|
-
const getInfo = uid => {
|
|
1190
|
-
const {
|
|
1191
|
-
newState
|
|
1192
|
-
} = get$2(uid);
|
|
1193
|
-
return newState.allGroups;
|
|
1194
|
-
};
|
|
1195
|
-
|
|
1196
1036
|
const None = 'none';
|
|
1197
1037
|
const ToolBar = 'toolbar';
|
|
1198
1038
|
const Tree = 'tree';
|
|
1199
1039
|
const TreeItem$1 = 'treeitem';
|
|
1200
1040
|
|
|
1201
|
-
const Button$
|
|
1041
|
+
const Button$2 = 1;
|
|
1202
1042
|
const Div = 4;
|
|
1203
|
-
const Input = 6;
|
|
1204
1043
|
const Span = 8;
|
|
1205
1044
|
const Text = 12;
|
|
1206
1045
|
const Img = 17;
|
|
1046
|
+
const TextArea = 62;
|
|
1047
|
+
|
|
1048
|
+
const TargetValue = 'event.target.value';
|
|
1049
|
+
const ClientX = 'event.clientX';
|
|
1050
|
+
const ClientY = 'event.clientY';
|
|
1051
|
+
const Button$1 = 'event.button';
|
|
1052
|
+
const DeltaMode = 'event.deltaMode';
|
|
1053
|
+
const DeltaY = 'event.deltaY';
|
|
1054
|
+
const TargetName = 'event.target.name';
|
|
1207
1055
|
|
|
1208
1056
|
const DebugWorker = 55;
|
|
1209
1057
|
const ExtensionHostWorker = 44;
|
|
1210
1058
|
const RendererWorker$1 = 1;
|
|
1211
1059
|
const SourceControlWorker = 66;
|
|
1212
1060
|
|
|
1061
|
+
const SetDom2 = 'Viewlet.setDom2';
|
|
1062
|
+
|
|
1213
1063
|
const rpcs = Object.create(null);
|
|
1214
1064
|
const set$4 = (id, rpc) => {
|
|
1215
1065
|
rpcs[id] = rpc;
|
|
1216
1066
|
};
|
|
1217
|
-
const get$
|
|
1067
|
+
const get$2 = id => {
|
|
1218
1068
|
return rpcs[id];
|
|
1219
1069
|
};
|
|
1220
1070
|
|
|
1221
|
-
const create = rpcId => {
|
|
1071
|
+
const create$1 = rpcId => {
|
|
1222
1072
|
return {
|
|
1223
1073
|
// @ts-ignore
|
|
1224
1074
|
invoke(method, ...params) {
|
|
1225
|
-
const rpc = get$
|
|
1075
|
+
const rpc = get$2(rpcId);
|
|
1226
1076
|
// @ts-ignore
|
|
1227
1077
|
return rpc.invoke(method, ...params);
|
|
1228
1078
|
},
|
|
1229
1079
|
// @ts-ignore
|
|
1230
1080
|
invokeAndTransfer(method, ...params) {
|
|
1231
|
-
const rpc = get$
|
|
1081
|
+
const rpc = get$2(rpcId);
|
|
1232
1082
|
// @ts-ignore
|
|
1233
1083
|
return rpc.invokeAndTransfer(method, ...params);
|
|
1234
1084
|
},
|
|
@@ -1236,7 +1086,7 @@ const create = rpcId => {
|
|
|
1236
1086
|
set$4(rpcId, rpc);
|
|
1237
1087
|
},
|
|
1238
1088
|
async dispose() {
|
|
1239
|
-
const rpc = get$
|
|
1089
|
+
const rpc = get$2(rpcId);
|
|
1240
1090
|
await rpc.dispose();
|
|
1241
1091
|
}
|
|
1242
1092
|
};
|
|
@@ -1244,10 +1094,10 @@ const create = rpcId => {
|
|
|
1244
1094
|
|
|
1245
1095
|
const {
|
|
1246
1096
|
invoke: invoke$3,
|
|
1247
|
-
invokeAndTransfer: invokeAndTransfer$
|
|
1097
|
+
invokeAndTransfer: invokeAndTransfer$1,
|
|
1248
1098
|
set: set$3,
|
|
1249
1099
|
dispose: dispose$1
|
|
1250
|
-
} = create(ExtensionHostWorker);
|
|
1100
|
+
} = create$1(ExtensionHostWorker);
|
|
1251
1101
|
const executeReferenceProvider = async (id, offset) => {
|
|
1252
1102
|
// @ts-ignore
|
|
1253
1103
|
return invoke$3('ExtensionHostReference.executeReferenceProvider', id, offset);
|
|
@@ -1275,17 +1125,17 @@ const ExtensionHost = {
|
|
|
1275
1125
|
executeReferenceProvider,
|
|
1276
1126
|
getRuntimeStatus,
|
|
1277
1127
|
invoke: invoke$3,
|
|
1278
|
-
invokeAndTransfer: invokeAndTransfer$
|
|
1128
|
+
invokeAndTransfer: invokeAndTransfer$1,
|
|
1279
1129
|
registerMockRpc: registerMockRpc$1,
|
|
1280
1130
|
set: set$3
|
|
1281
1131
|
};
|
|
1282
1132
|
|
|
1283
1133
|
const {
|
|
1284
1134
|
invoke: invoke$2,
|
|
1285
|
-
invokeAndTransfer
|
|
1135
|
+
invokeAndTransfer,
|
|
1286
1136
|
set: set$2,
|
|
1287
1137
|
dispose
|
|
1288
|
-
} = create(RendererWorker$1);
|
|
1138
|
+
} = create$1(RendererWorker$1);
|
|
1289
1139
|
const searchFileHtml = async uri => {
|
|
1290
1140
|
return invoke$2('ExtensionHost.searchFileWithHtml', uri);
|
|
1291
1141
|
};
|
|
@@ -1322,7 +1172,7 @@ const setWorkspacePath = async path => {
|
|
|
1322
1172
|
await invoke$2('Workspace.setPath', path);
|
|
1323
1173
|
};
|
|
1324
1174
|
const registerWebViewInterceptor = async (id, port) => {
|
|
1325
|
-
await invokeAndTransfer
|
|
1175
|
+
await invokeAndTransfer('WebView.registerInterceptor', id, port);
|
|
1326
1176
|
};
|
|
1327
1177
|
const unregisterWebViewInterceptor = async id => {
|
|
1328
1178
|
await invoke$2('WebView.unregisterInterceptor', id);
|
|
@@ -1330,22 +1180,22 @@ const unregisterWebViewInterceptor = async id => {
|
|
|
1330
1180
|
const sendMessagePortToEditorWorker = async (port, rpcId) => {
|
|
1331
1181
|
const command = 'HandleMessagePort.handleMessagePort';
|
|
1332
1182
|
// @ts-ignore
|
|
1333
|
-
await invokeAndTransfer
|
|
1183
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToEditorWorker', port, command, rpcId);
|
|
1334
1184
|
};
|
|
1335
1185
|
const sendMessagePortToErrorWorker = async (port, rpcId) => {
|
|
1336
1186
|
const command = 'Errors.handleMessagePort';
|
|
1337
1187
|
// @ts-ignore
|
|
1338
|
-
await invokeAndTransfer
|
|
1188
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToErrorWorker', port, command, rpcId);
|
|
1339
1189
|
};
|
|
1340
1190
|
const sendMessagePortToMarkdownWorker = async (port, rpcId) => {
|
|
1341
1191
|
const command = 'Markdown.handleMessagePort';
|
|
1342
1192
|
// @ts-ignore
|
|
1343
|
-
await invokeAndTransfer
|
|
1193
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToMarkdownWorker', port, command, rpcId);
|
|
1344
1194
|
};
|
|
1345
1195
|
const sendMessagePortToFileSystemWorker = async (port, rpcId) => {
|
|
1346
1196
|
const command = 'FileSystem.handleMessagePort';
|
|
1347
1197
|
// @ts-ignore
|
|
1348
|
-
await invokeAndTransfer
|
|
1198
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSystemWorker', port, command, rpcId);
|
|
1349
1199
|
};
|
|
1350
1200
|
const readFile$1 = async uri => {
|
|
1351
1201
|
return invoke$2('FileSystem.readFile', uri);
|
|
@@ -1355,7 +1205,7 @@ const getWebViewSecret = async key => {
|
|
|
1355
1205
|
return invoke$2('WebView.getSecret', key);
|
|
1356
1206
|
};
|
|
1357
1207
|
const setWebViewPort = async (uid, port, origin, portType) => {
|
|
1358
|
-
return invokeAndTransfer
|
|
1208
|
+
return invokeAndTransfer('WebView.setPort', uid, port, origin, portType);
|
|
1359
1209
|
};
|
|
1360
1210
|
const setFocus = key => {
|
|
1361
1211
|
return invoke$2('Focus.setFocus', key);
|
|
@@ -1386,10 +1236,10 @@ const closeWidget = async widgetId => {
|
|
|
1386
1236
|
};
|
|
1387
1237
|
const sendMessagePortToExtensionHostWorker$1 = async (port, rpcId = 0) => {
|
|
1388
1238
|
const command = 'HandleMessagePort.handleMessagePort2';
|
|
1389
|
-
await invokeAndTransfer
|
|
1239
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, rpcId);
|
|
1390
1240
|
};
|
|
1391
1241
|
const sendMessagePortToSearchProcess = async port => {
|
|
1392
|
-
await invokeAndTransfer
|
|
1242
|
+
await invokeAndTransfer('SendMessagePortToElectron.sendMessagePortToElectron', port, 'HandleMessagePortForSearchProcess.handleMessagePortForSearchProcess');
|
|
1393
1243
|
};
|
|
1394
1244
|
const confirm = async (message, options) => {
|
|
1395
1245
|
// @ts-ignore
|
|
@@ -1446,7 +1296,7 @@ const getWorkspacePath = () => {
|
|
|
1446
1296
|
const sendMessagePortToRendererProcess = async port => {
|
|
1447
1297
|
const command = 'HandleMessagePort.handleMessagePort';
|
|
1448
1298
|
// @ts-ignore
|
|
1449
|
-
await invokeAndTransfer
|
|
1299
|
+
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToRendererProcess', port, command, DebugWorker);
|
|
1450
1300
|
};
|
|
1451
1301
|
const getPreference = async key => {
|
|
1452
1302
|
return await invoke$2('Preferences.get', key);
|
|
@@ -1465,7 +1315,7 @@ const openUri$1 = async (uri, focus, options) => {
|
|
|
1465
1315
|
await invoke$2('Main.openUri', uri, focus, options);
|
|
1466
1316
|
};
|
|
1467
1317
|
const sendMessagePortToSyntaxHighlightingWorker = async port => {
|
|
1468
|
-
await invokeAndTransfer
|
|
1318
|
+
await invokeAndTransfer(
|
|
1469
1319
|
// @ts-ignore
|
|
1470
1320
|
'SendMessagePortToSyntaxHighlightingWorker.sendMessagePortToSyntaxHighlightingWorker', port, 'HandleMessagePort.handleMessagePort2');
|
|
1471
1321
|
};
|
|
@@ -1589,7 +1439,7 @@ const RendererWorker = {
|
|
|
1589
1439
|
handleDebugScriptParsed,
|
|
1590
1440
|
installExtension,
|
|
1591
1441
|
invoke: invoke$2,
|
|
1592
|
-
invokeAndTransfer
|
|
1442
|
+
invokeAndTransfer,
|
|
1593
1443
|
openExtensionSearch,
|
|
1594
1444
|
openExternal,
|
|
1595
1445
|
openNativeFolder,
|
|
@@ -1629,17 +1479,181 @@ const RendererWorker = {
|
|
|
1629
1479
|
writeClipBoardText
|
|
1630
1480
|
};
|
|
1631
1481
|
|
|
1482
|
+
const toCommandId = key => {
|
|
1483
|
+
const dotIndex = key.indexOf('.');
|
|
1484
|
+
return key.slice(dotIndex + 1);
|
|
1485
|
+
};
|
|
1486
|
+
const create = () => {
|
|
1487
|
+
const states = Object.create(null);
|
|
1488
|
+
const commandMapRef = {};
|
|
1489
|
+
return {
|
|
1490
|
+
get(uid) {
|
|
1491
|
+
return states[uid];
|
|
1492
|
+
},
|
|
1493
|
+
set(uid, oldState, newState) {
|
|
1494
|
+
states[uid] = {
|
|
1495
|
+
oldState,
|
|
1496
|
+
newState
|
|
1497
|
+
};
|
|
1498
|
+
},
|
|
1499
|
+
dispose(uid) {
|
|
1500
|
+
delete states[uid];
|
|
1501
|
+
},
|
|
1502
|
+
getKeys() {
|
|
1503
|
+
return Object.keys(states).map(key => {
|
|
1504
|
+
return Number.parseInt(key);
|
|
1505
|
+
});
|
|
1506
|
+
},
|
|
1507
|
+
clear() {
|
|
1508
|
+
for (const key of Object.keys(states)) {
|
|
1509
|
+
delete states[key];
|
|
1510
|
+
}
|
|
1511
|
+
},
|
|
1512
|
+
wrapCommand(fn) {
|
|
1513
|
+
const wrapped = async (uid, ...args) => {
|
|
1514
|
+
const {
|
|
1515
|
+
newState
|
|
1516
|
+
} = states[uid];
|
|
1517
|
+
const newerState = await fn(newState, ...args);
|
|
1518
|
+
if (newState === newerState) {
|
|
1519
|
+
return;
|
|
1520
|
+
}
|
|
1521
|
+
const latest = states[uid];
|
|
1522
|
+
states[uid] = {
|
|
1523
|
+
oldState: latest.oldState,
|
|
1524
|
+
newState: newerState
|
|
1525
|
+
};
|
|
1526
|
+
};
|
|
1527
|
+
return wrapped;
|
|
1528
|
+
},
|
|
1529
|
+
wrapGetter(fn) {
|
|
1530
|
+
const wrapped = (uid, ...args) => {
|
|
1531
|
+
const {
|
|
1532
|
+
newState
|
|
1533
|
+
} = states[uid];
|
|
1534
|
+
return fn(newState, ...args);
|
|
1535
|
+
};
|
|
1536
|
+
return wrapped;
|
|
1537
|
+
},
|
|
1538
|
+
diff(uid, modules, numbers) {
|
|
1539
|
+
const {
|
|
1540
|
+
oldState,
|
|
1541
|
+
newState
|
|
1542
|
+
} = states[uid];
|
|
1543
|
+
const diffResult = [];
|
|
1544
|
+
for (let i = 0; i < modules.length; i++) {
|
|
1545
|
+
const fn = modules[i];
|
|
1546
|
+
if (!fn(oldState, newState)) {
|
|
1547
|
+
diffResult.push(numbers[i]);
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
return diffResult;
|
|
1551
|
+
},
|
|
1552
|
+
getCommandIds() {
|
|
1553
|
+
const keys = Object.keys(commandMapRef);
|
|
1554
|
+
const ids = keys.map(toCommandId);
|
|
1555
|
+
return ids;
|
|
1556
|
+
},
|
|
1557
|
+
registerCommands(commandMap) {
|
|
1558
|
+
Object.assign(commandMapRef, commandMap);
|
|
1559
|
+
}
|
|
1560
|
+
};
|
|
1561
|
+
};
|
|
1562
|
+
const terminate = () => {
|
|
1563
|
+
globalThis.close();
|
|
1564
|
+
};
|
|
1565
|
+
|
|
1632
1566
|
const {
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1567
|
+
get: get$1,
|
|
1568
|
+
set: set$1,
|
|
1569
|
+
wrapCommand,
|
|
1570
|
+
getCommandIds,
|
|
1571
|
+
registerCommands
|
|
1572
|
+
} = create();
|
|
1573
|
+
|
|
1574
|
+
const create2 = (id, uri, x, y, width, height, workspacePath) => {
|
|
1575
|
+
const state = {
|
|
1576
|
+
actionsCache: Object.create(null),
|
|
1577
|
+
allGroups: [],
|
|
1578
|
+
deltaY: 0,
|
|
1579
|
+
enabledProviderIds: [],
|
|
1580
|
+
fileIconCache: Object.create(null),
|
|
1581
|
+
finalDeltaY: 0,
|
|
1582
|
+
gitRoot: '',
|
|
1583
|
+
handleOffset: 0,
|
|
1584
|
+
headerHeight: 40,
|
|
1585
|
+
// TODO
|
|
1586
|
+
height,
|
|
1587
|
+
id,
|
|
1588
|
+
index: [],
|
|
1589
|
+
inputValue: '',
|
|
1590
|
+
expandedGroups: Object.create(null),
|
|
1591
|
+
itemHeight: 20,
|
|
1592
|
+
items: [],
|
|
1593
|
+
maxLineY: 0,
|
|
1594
|
+
merge: [],
|
|
1595
|
+
minimumSliderSize: 20,
|
|
1596
|
+
minLineY: 0,
|
|
1597
|
+
providerId: '',
|
|
1598
|
+
root: '',
|
|
1599
|
+
scrollBarActive: false,
|
|
1600
|
+
scrollBarHeight: 0,
|
|
1601
|
+
splitButtonEnabled: false,
|
|
1602
|
+
untracked: [],
|
|
1603
|
+
visibleItems: [],
|
|
1604
|
+
width,
|
|
1605
|
+
workingTree: [],
|
|
1606
|
+
workspacePath,
|
|
1607
|
+
x,
|
|
1608
|
+
y,
|
|
1609
|
+
inputPlaceholder: ''
|
|
1610
|
+
};
|
|
1611
|
+
set$1(id, state, state);
|
|
1612
|
+
};
|
|
1613
|
+
|
|
1614
|
+
const RenderItems = 4;
|
|
1615
|
+
|
|
1616
|
+
const diffType = RenderItems;
|
|
1617
|
+
const isEqual = (oldState, newState) => {
|
|
1618
|
+
return oldState.allGroups === newState.allGroups && oldState.visibleItems === newState.visibleItems && oldState.items === newState.items && oldState.minLineY === newState.minLineY && oldState.maxLineY === newState.maxLineY && oldState.deltaY === newState.deltaY;
|
|
1619
|
+
};
|
|
1620
|
+
|
|
1621
|
+
const modules = [isEqual];
|
|
1622
|
+
const numbers = [diffType];
|
|
1623
|
+
|
|
1624
|
+
const diff = (oldState, newState) => {
|
|
1625
|
+
const diffResult = [];
|
|
1626
|
+
for (let i = 0; i < modules.length; i++) {
|
|
1627
|
+
const fn = modules[i];
|
|
1628
|
+
if (!fn(oldState, newState)) {
|
|
1629
|
+
diffResult.push(numbers[i]);
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
return diffResult;
|
|
1633
|
+
};
|
|
1634
|
+
|
|
1635
|
+
const diff2 = uid => {
|
|
1636
|
+
const {
|
|
1637
|
+
oldState,
|
|
1638
|
+
newState
|
|
1639
|
+
} = get$1(uid);
|
|
1640
|
+
const result = diff(oldState, newState);
|
|
1641
|
+
return result;
|
|
1642
|
+
};
|
|
1643
|
+
|
|
1644
|
+
const getInfo = uid => {
|
|
1645
|
+
const {
|
|
1646
|
+
newState
|
|
1647
|
+
} = get$1(uid);
|
|
1648
|
+
return newState.allGroups;
|
|
1649
|
+
};
|
|
1636
1650
|
|
|
1637
1651
|
const activateByEvent = event => {
|
|
1638
|
-
return
|
|
1652
|
+
return activateByEvent$1(event);
|
|
1639
1653
|
};
|
|
1640
1654
|
|
|
1641
1655
|
const {
|
|
1642
|
-
invoke,
|
|
1656
|
+
invoke: invoke$1,
|
|
1643
1657
|
set} = ExtensionHost;
|
|
1644
1658
|
|
|
1645
1659
|
const executeProvider = async ({
|
|
@@ -1649,7 +1663,7 @@ const executeProvider = async ({
|
|
|
1649
1663
|
}) => {
|
|
1650
1664
|
await activateByEvent(event);
|
|
1651
1665
|
// @ts-ignore
|
|
1652
|
-
const result = await invoke(method, ...params);
|
|
1666
|
+
const result = await invoke$1(method, ...params);
|
|
1653
1667
|
return result;
|
|
1654
1668
|
};
|
|
1655
1669
|
|
|
@@ -1774,8 +1788,11 @@ const getMissingIconRequests = (dirents, fileIconCache) => {
|
|
|
1774
1788
|
return missingRequests;
|
|
1775
1789
|
};
|
|
1776
1790
|
|
|
1791
|
+
const {
|
|
1792
|
+
invoke} = RendererWorker;
|
|
1793
|
+
|
|
1777
1794
|
const requestFileIcons = async requests => {
|
|
1778
|
-
const results = await invoke
|
|
1795
|
+
const results = await invoke('IconTheme.getIcons', requests);
|
|
1779
1796
|
return results;
|
|
1780
1797
|
};
|
|
1781
1798
|
|
|
@@ -1919,7 +1936,7 @@ const get = key => {
|
|
|
1919
1936
|
};
|
|
1920
1937
|
|
|
1921
1938
|
const getExtensions = async () => {
|
|
1922
|
-
return invoke('Extensions.getExtensions');
|
|
1939
|
+
return invoke$1('Extensions.getExtensions');
|
|
1923
1940
|
};
|
|
1924
1941
|
|
|
1925
1942
|
const requestSourceActions = async () => {
|
|
@@ -1952,6 +1969,28 @@ const getScrollBarSize = (size, contentSize, minimumSliderSize) => {
|
|
|
1952
1969
|
return Math.max(Math.round(size ** 2 / contentSize), minimumSliderSize);
|
|
1953
1970
|
};
|
|
1954
1971
|
|
|
1972
|
+
const emptyObject = {};
|
|
1973
|
+
const RE_PLACEHOLDER = /\{(PH\d+)\}/g;
|
|
1974
|
+
const i18nString = (key, placeholders = emptyObject) => {
|
|
1975
|
+
if (placeholders === emptyObject) {
|
|
1976
|
+
return key;
|
|
1977
|
+
}
|
|
1978
|
+
const replacer = (match, rest) => {
|
|
1979
|
+
return placeholders[rest];
|
|
1980
|
+
};
|
|
1981
|
+
return key.replaceAll(RE_PLACEHOLDER, replacer);
|
|
1982
|
+
};
|
|
1983
|
+
|
|
1984
|
+
const MessageEnterToCommitOnMaster = `Message (Enter) to commit on 'master'`;
|
|
1985
|
+
const SourceControlInput$1 = 'Source Control Input';
|
|
1986
|
+
|
|
1987
|
+
const messageEnterToCommitOnMaster = () => {
|
|
1988
|
+
return i18nString(MessageEnterToCommitOnMaster);
|
|
1989
|
+
};
|
|
1990
|
+
const sourceControlInput = () => {
|
|
1991
|
+
return i18nString(SourceControlInput$1);
|
|
1992
|
+
};
|
|
1993
|
+
|
|
1955
1994
|
const loadContent = async state => {
|
|
1956
1995
|
const {
|
|
1957
1996
|
itemHeight,
|
|
@@ -1981,20 +2020,22 @@ const loadContent = async state => {
|
|
|
1981
2020
|
const newFileIconCache = await getFileIcons(displayItems, fileIconCache);
|
|
1982
2021
|
const visibleItems = getVisibleSourceControlItems(displayItems, minLineY, maxLineY, actionsCache, newFileIconCache);
|
|
1983
2022
|
const finalDeltaY = getFinalDeltaY(listHeight, itemHeight, total);
|
|
2023
|
+
const inputPlaceholder = messageEnterToCommitOnMaster();
|
|
1984
2024
|
return {
|
|
1985
2025
|
...state,
|
|
2026
|
+
actionsCache,
|
|
1986
2027
|
allGroups,
|
|
2028
|
+
enabledProviderIds,
|
|
2029
|
+
fileIconCache: newFileIconCache,
|
|
2030
|
+
finalDeltaY,
|
|
1987
2031
|
gitRoot,
|
|
2032
|
+
inputPlaceholder,
|
|
1988
2033
|
items: displayItems,
|
|
1989
|
-
visibleItems,
|
|
1990
|
-
enabledProviderIds,
|
|
1991
|
-
root,
|
|
1992
|
-
splitButtonEnabled,
|
|
1993
2034
|
maxLineY,
|
|
2035
|
+
root,
|
|
1994
2036
|
scrollBarHeight,
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
actionsCache
|
|
2037
|
+
splitButtonEnabled,
|
|
2038
|
+
visibleItems
|
|
1998
2039
|
};
|
|
1999
2040
|
};
|
|
2000
2041
|
|
|
@@ -2137,12 +2178,20 @@ const handleClickDirectoryExpanded = async (state, item) => {
|
|
|
2137
2178
|
};
|
|
2138
2179
|
|
|
2139
2180
|
const readFile = async (uri, encoding = 'utf8') => {
|
|
2140
|
-
const content = await invoke
|
|
2181
|
+
const content = await invoke('FileSystem.readFile', uri);
|
|
2141
2182
|
return content;
|
|
2142
2183
|
};
|
|
2143
2184
|
|
|
2144
2185
|
const openUri = uri => {
|
|
2145
|
-
return invoke
|
|
2186
|
+
return invoke('Main.openUri', uri);
|
|
2187
|
+
};
|
|
2188
|
+
|
|
2189
|
+
const openDiffEditor = async (before, afterPath, width) => {
|
|
2190
|
+
// TODO handle error
|
|
2191
|
+
// TODO should only pass uris to diff editor, diff editor should then resolve file contents
|
|
2192
|
+
{
|
|
2193
|
+
await openUri(`inline-diff://data://${before}<->${afterPath}`);
|
|
2194
|
+
}
|
|
2146
2195
|
};
|
|
2147
2196
|
|
|
2148
2197
|
const handleClickFile = async (state, item) => {
|
|
@@ -2154,9 +2203,7 @@ const handleClickFile = async (state, item) => {
|
|
|
2154
2203
|
const absolutePath = `${root}/${item.file}`;
|
|
2155
2204
|
// TODO handle error
|
|
2156
2205
|
const [fileBefore] = await Promise.all([getFileBefore(providerId, item.file), readFile(absolutePath)]);
|
|
2157
|
-
|
|
2158
|
-
await openUri(`inline-diff://data://${fileBefore}<->${absolutePath}`);
|
|
2159
|
-
}
|
|
2206
|
+
await openDiffEditor(fileBefore, absolutePath);
|
|
2160
2207
|
return state;
|
|
2161
2208
|
};
|
|
2162
2209
|
|
|
@@ -2190,7 +2237,7 @@ const handleClickAt = async (state, eventX, eventY, name) => {
|
|
|
2190
2237
|
};
|
|
2191
2238
|
|
|
2192
2239
|
const show = async (x, y, id, ...args) => {
|
|
2193
|
-
return
|
|
2240
|
+
return showContextMenu(x, y, id, ...args);
|
|
2194
2241
|
};
|
|
2195
2242
|
|
|
2196
2243
|
const SourceControl$1 = 22;
|
|
@@ -2268,32 +2315,15 @@ const handleWheel = async (state, deltaMode, deltaY) => {
|
|
|
2268
2315
|
return setDeltaY(state, state.deltaY + deltaY);
|
|
2269
2316
|
};
|
|
2270
2317
|
|
|
2271
|
-
const getPortTuple = () => {
|
|
2272
|
-
const {
|
|
2273
|
-
port1,
|
|
2274
|
-
port2
|
|
2275
|
-
} = new MessageChannel();
|
|
2276
|
-
return {
|
|
2277
|
-
port1,
|
|
2278
|
-
port2
|
|
2279
|
-
};
|
|
2280
|
-
};
|
|
2281
|
-
|
|
2282
2318
|
const sendMessagePortToExtensionHostWorker = async port => {
|
|
2283
|
-
|
|
2284
|
-
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, SourceControlWorker);
|
|
2319
|
+
await sendMessagePortToExtensionHostWorker$1(port, SourceControlWorker);
|
|
2285
2320
|
};
|
|
2286
2321
|
|
|
2287
2322
|
const createExtensionHostRpc = async () => {
|
|
2288
2323
|
try {
|
|
2289
|
-
const {
|
|
2290
|
-
port1,
|
|
2291
|
-
port2
|
|
2292
|
-
} = getPortTuple();
|
|
2293
|
-
await sendMessagePortToExtensionHostWorker(port2);
|
|
2294
|
-
const rpc = await PlainMessagePortRpcParent.create({
|
|
2324
|
+
const rpc = await TransferMessagePortRpcParent.create({
|
|
2295
2325
|
commandMap: {},
|
|
2296
|
-
|
|
2326
|
+
send: sendMessagePortToExtensionHostWorker
|
|
2297
2327
|
});
|
|
2298
2328
|
return rpc;
|
|
2299
2329
|
} catch (error) {
|
|
@@ -2357,50 +2387,32 @@ const HandleMouseOver = 'handleMouseOver';
|
|
|
2357
2387
|
const HandleMouseOverAt = 'handleMouseOverAt';
|
|
2358
2388
|
const HandleWheel = 'handleWheel';
|
|
2359
2389
|
|
|
2360
|
-
const SourceControlInput
|
|
2361
|
-
|
|
2362
|
-
const emptyObject = {};
|
|
2363
|
-
const RE_PLACEHOLDER = /\{(PH\d+)\}/g;
|
|
2364
|
-
const i18nString = (key, placeholders = emptyObject) => {
|
|
2365
|
-
if (placeholders === emptyObject) {
|
|
2366
|
-
return key;
|
|
2367
|
-
}
|
|
2368
|
-
const replacer = (match, rest) => {
|
|
2369
|
-
return placeholders[rest];
|
|
2370
|
-
};
|
|
2371
|
-
return key.replaceAll(RE_PLACEHOLDER, replacer);
|
|
2372
|
-
};
|
|
2390
|
+
const SourceControlInput = 'SourceControlInput';
|
|
2373
2391
|
|
|
2374
|
-
const
|
|
2375
|
-
const SourceControlInput = 'Source Control Input';
|
|
2376
|
-
|
|
2377
|
-
const messageEnterToCommitOnMaster = () => {
|
|
2378
|
-
return i18nString(MessageEnterToCommitOnMaster);
|
|
2379
|
-
};
|
|
2380
|
-
const sourceControlInput = () => {
|
|
2381
|
-
return i18nString(SourceControlInput);
|
|
2382
|
-
};
|
|
2383
|
-
|
|
2384
|
-
const getSourceControlHeaderVirtualDom = () => {
|
|
2392
|
+
const getSourceControlInputDom = inputPlaceholder => {
|
|
2385
2393
|
return [{
|
|
2386
|
-
type:
|
|
2387
|
-
className:
|
|
2388
|
-
childCount: 1
|
|
2389
|
-
}, {
|
|
2390
|
-
type: Input,
|
|
2391
|
-
className: InputBox,
|
|
2394
|
+
type: TextArea,
|
|
2395
|
+
className: mergeClassNames(InputBox, 'MultilineInputBox'),
|
|
2392
2396
|
ariaLabel: sourceControlInput(),
|
|
2393
2397
|
autocapitalize: 'off',
|
|
2394
2398
|
autocorrect: 'off',
|
|
2395
2399
|
childCount: 0,
|
|
2396
|
-
name: SourceControlInput
|
|
2400
|
+
name: SourceControlInput,
|
|
2397
2401
|
onFocus: HandleFocus,
|
|
2398
2402
|
onInput: HandleInput,
|
|
2399
|
-
placeholder:
|
|
2403
|
+
placeholder: inputPlaceholder,
|
|
2400
2404
|
spellcheck: false
|
|
2401
2405
|
}];
|
|
2402
2406
|
};
|
|
2403
2407
|
|
|
2408
|
+
const getSourceControlHeaderVirtualDom = inputPlaceholder => {
|
|
2409
|
+
return [{
|
|
2410
|
+
type: Div,
|
|
2411
|
+
className: SourceControlHeader,
|
|
2412
|
+
childCount: 1
|
|
2413
|
+
}, ...getSourceControlInputDom(inputPlaceholder)];
|
|
2414
|
+
};
|
|
2415
|
+
|
|
2404
2416
|
const getBadgeVirtualDom = (className, count) => {
|
|
2405
2417
|
return [{
|
|
2406
2418
|
type: Div,
|
|
@@ -2424,7 +2436,7 @@ const getButtonVirtualDom = button => {
|
|
|
2424
2436
|
label
|
|
2425
2437
|
} = button;
|
|
2426
2438
|
return [{
|
|
2427
|
-
type: Button$
|
|
2439
|
+
type: Button$2,
|
|
2428
2440
|
className: SourceControlButton,
|
|
2429
2441
|
title: label,
|
|
2430
2442
|
ariaLabel: label,
|
|
@@ -2616,7 +2628,7 @@ const getSplitButtonVirtualDom = (hasItems, splitButtonEnabled, buttonText) => {
|
|
|
2616
2628
|
}];
|
|
2617
2629
|
};
|
|
2618
2630
|
|
|
2619
|
-
const getSourceControlVirtualDom = (items, splitButtonEnabled) => {
|
|
2631
|
+
const getSourceControlVirtualDom = (items, splitButtonEnabled, inputPlaceholder) => {
|
|
2620
2632
|
const hasItems = items.length > 0;
|
|
2621
2633
|
const dom = [{
|
|
2622
2634
|
type: Div,
|
|
@@ -2627,14 +2639,18 @@ const getSourceControlVirtualDom = (items, splitButtonEnabled) => {
|
|
|
2627
2639
|
onMouseOut: HandleMouseOut,
|
|
2628
2640
|
onWheel: HandleWheel,
|
|
2629
2641
|
childCount: splitButtonEnabled ? 3 : 2
|
|
2630
|
-
}, ...getSourceControlHeaderVirtualDom(), ...getSplitButtonVirtualDom(hasItems, splitButtonEnabled, 'Commit'), ...getSourceControlListVirtualDom(items)];
|
|
2642
|
+
}, ...getSourceControlHeaderVirtualDom(inputPlaceholder), ...getSplitButtonVirtualDom(hasItems, splitButtonEnabled, 'Commit'), ...getSourceControlListVirtualDom(items)];
|
|
2631
2643
|
return dom;
|
|
2632
2644
|
};
|
|
2633
2645
|
|
|
2634
2646
|
const renderItems = (oldState, newState) => {
|
|
2635
|
-
const
|
|
2636
|
-
|
|
2637
|
-
|
|
2647
|
+
const {
|
|
2648
|
+
visibleItems,
|
|
2649
|
+
splitButtonEnabled,
|
|
2650
|
+
inputPlaceholder
|
|
2651
|
+
} = newState;
|
|
2652
|
+
const dom = getSourceControlVirtualDom(visibleItems, splitButtonEnabled, inputPlaceholder);
|
|
2653
|
+
return [SetDom2, dom];
|
|
2638
2654
|
};
|
|
2639
2655
|
|
|
2640
2656
|
const getRenderer = diffType => {
|
|
@@ -2662,8 +2678,8 @@ const render2 = (uid, diffResult) => {
|
|
|
2662
2678
|
const {
|
|
2663
2679
|
oldState,
|
|
2664
2680
|
newState
|
|
2665
|
-
} = get$
|
|
2666
|
-
set$
|
|
2681
|
+
} = get$1(uid);
|
|
2682
|
+
set$1(uid, newState, newState);
|
|
2667
2683
|
const commands = applyRender(oldState, newState, diffResult);
|
|
2668
2684
|
return commands;
|
|
2669
2685
|
};
|
|
@@ -2677,7 +2693,7 @@ const getActionButtonVirtualDom = action => {
|
|
|
2677
2693
|
command
|
|
2678
2694
|
} = action;
|
|
2679
2695
|
return [{
|
|
2680
|
-
type: Button$
|
|
2696
|
+
type: Button$2,
|
|
2681
2697
|
className: IconButton,
|
|
2682
2698
|
title: id,
|
|
2683
2699
|
'data-command': command,
|
|
@@ -2712,40 +2728,40 @@ const renderActions = uid => {
|
|
|
2712
2728
|
const renderEventListeners = () => {
|
|
2713
2729
|
return [{
|
|
2714
2730
|
name: HandleWheel,
|
|
2715
|
-
params: ['handleWheel',
|
|
2731
|
+
params: ['handleWheel', DeltaMode, DeltaY],
|
|
2716
2732
|
passive: true
|
|
2717
2733
|
}, {
|
|
2718
2734
|
name: HandleFocus,
|
|
2719
2735
|
params: ['handleFocus']
|
|
2720
2736
|
}, {
|
|
2721
2737
|
name: HandleClickAt,
|
|
2722
|
-
params: ['handleClickAt',
|
|
2738
|
+
params: ['handleClickAt', ClientX, ClientY, TargetName]
|
|
2723
2739
|
}, {
|
|
2724
2740
|
name: HandleMouseOverAt,
|
|
2725
|
-
params: ['handleMouseOverAt',
|
|
2741
|
+
params: ['handleMouseOverAt', ClientX, ClientY]
|
|
2726
2742
|
}, {
|
|
2727
2743
|
name: HandleMouseOver,
|
|
2728
|
-
params: ['handleMouseOver',
|
|
2744
|
+
params: ['handleMouseOver', ClientX, ClientY]
|
|
2729
2745
|
}, {
|
|
2730
2746
|
name: HandleMouseOutAt,
|
|
2731
|
-
params: ['handleMouseOutAt',
|
|
2747
|
+
params: ['handleMouseOutAt', ClientX, ClientY]
|
|
2732
2748
|
}, {
|
|
2733
2749
|
name: HandleInput,
|
|
2734
|
-
params: ['handleInput',
|
|
2750
|
+
params: ['handleInput', TargetValue]
|
|
2735
2751
|
}, {
|
|
2736
2752
|
name: HandleContextMenu,
|
|
2737
|
-
params: ['handleContextMenu',
|
|
2753
|
+
params: ['handleContextMenu', Button$1, ClientX, ClientY],
|
|
2738
2754
|
preventDefault: true
|
|
2739
2755
|
}, {
|
|
2740
2756
|
name: HandleWheel,
|
|
2741
|
-
params: ['handleWheel',
|
|
2757
|
+
params: ['handleWheel', DeltaMode, DeltaY],
|
|
2742
2758
|
passive: true
|
|
2743
2759
|
}];
|
|
2744
2760
|
};
|
|
2745
2761
|
|
|
2746
2762
|
const saveState = uid => {
|
|
2747
2763
|
number(uid);
|
|
2748
|
-
const value = get$
|
|
2764
|
+
const value = get$1(uid);
|
|
2749
2765
|
const {
|
|
2750
2766
|
newState
|
|
2751
2767
|
} = value;
|
|
@@ -2763,10 +2779,6 @@ const saveState = uid => {
|
|
|
2763
2779
|
};
|
|
2764
2780
|
};
|
|
2765
2781
|
|
|
2766
|
-
const terminate = () => {
|
|
2767
|
-
globalThis.close();
|
|
2768
|
-
};
|
|
2769
|
-
|
|
2770
2782
|
const updateIcons = async state => {
|
|
2771
2783
|
const {
|
|
2772
2784
|
items,
|
|
@@ -2815,7 +2827,7 @@ const listen = async () => {
|
|
|
2815
2827
|
const rpc = await WebWorkerRpcClient.create({
|
|
2816
2828
|
commandMap: commandMap
|
|
2817
2829
|
});
|
|
2818
|
-
set$
|
|
2830
|
+
set$2(rpc);
|
|
2819
2831
|
};
|
|
2820
2832
|
|
|
2821
2833
|
const main = async () => {
|