@lvce-editor/ports-view 0.11.0 → 0.13.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/portsViewWorkerMain.js +225 -59
- package/package.json +1 -1
|
@@ -417,6 +417,100 @@ const IpcChildWithModuleWorkerAndMessagePort$1 = {
|
|
|
417
417
|
listen: listen$6,
|
|
418
418
|
wrap: wrap$e
|
|
419
419
|
};
|
|
420
|
+
const addListener = (emitter, type, callback) => {
|
|
421
|
+
if ('addEventListener' in emitter) {
|
|
422
|
+
emitter.addEventListener(type, callback);
|
|
423
|
+
} else {
|
|
424
|
+
emitter.on(type, callback);
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
const removeListener = (emitter, type, callback) => {
|
|
428
|
+
if ('removeEventListener' in emitter) {
|
|
429
|
+
emitter.removeEventListener(type, callback);
|
|
430
|
+
} else {
|
|
431
|
+
emitter.off(type, callback);
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
const getFirstEvent = (eventEmitter, eventMap) => {
|
|
435
|
+
const {
|
|
436
|
+
promise,
|
|
437
|
+
resolve
|
|
438
|
+
} = Promise.withResolvers();
|
|
439
|
+
const listenerMap = Object.create(null);
|
|
440
|
+
const cleanup = value => {
|
|
441
|
+
for (const event of Object.keys(eventMap)) {
|
|
442
|
+
removeListener(eventEmitter, event, listenerMap[event]);
|
|
443
|
+
}
|
|
444
|
+
resolve(value);
|
|
445
|
+
};
|
|
446
|
+
for (const [event, type] of Object.entries(eventMap)) {
|
|
447
|
+
const listener = event => {
|
|
448
|
+
cleanup({
|
|
449
|
+
event,
|
|
450
|
+
type
|
|
451
|
+
});
|
|
452
|
+
};
|
|
453
|
+
addListener(eventEmitter, event, listener);
|
|
454
|
+
listenerMap[event] = listener;
|
|
455
|
+
}
|
|
456
|
+
return promise;
|
|
457
|
+
};
|
|
458
|
+
const Message$1 = 3;
|
|
459
|
+
const create$5$1 = async ({
|
|
460
|
+
isMessagePortOpen,
|
|
461
|
+
messagePort
|
|
462
|
+
}) => {
|
|
463
|
+
if (!isMessagePort(messagePort)) {
|
|
464
|
+
throw new IpcError('port must be of type MessagePort');
|
|
465
|
+
}
|
|
466
|
+
if (isMessagePortOpen) {
|
|
467
|
+
return messagePort;
|
|
468
|
+
}
|
|
469
|
+
const eventPromise = getFirstEvent(messagePort, {
|
|
470
|
+
message: Message$1
|
|
471
|
+
});
|
|
472
|
+
messagePort.start();
|
|
473
|
+
const {
|
|
474
|
+
event,
|
|
475
|
+
type
|
|
476
|
+
} = await eventPromise;
|
|
477
|
+
if (type !== Message$1) {
|
|
478
|
+
throw new IpcError('Failed to wait for ipc message');
|
|
479
|
+
}
|
|
480
|
+
if (event.data !== readyMessage) {
|
|
481
|
+
throw new IpcError('unexpected first message');
|
|
482
|
+
}
|
|
483
|
+
return messagePort;
|
|
484
|
+
};
|
|
485
|
+
const signal$1 = messagePort => {
|
|
486
|
+
messagePort.start();
|
|
487
|
+
};
|
|
488
|
+
class IpcParentWithMessagePort extends Ipc {
|
|
489
|
+
getData = getData$2;
|
|
490
|
+
send(message) {
|
|
491
|
+
this._rawIpc.postMessage(message);
|
|
492
|
+
}
|
|
493
|
+
sendAndTransfer(message) {
|
|
494
|
+
const transfer = getTransferrables(message);
|
|
495
|
+
this._rawIpc.postMessage(message, transfer);
|
|
496
|
+
}
|
|
497
|
+
dispose() {
|
|
498
|
+
this._rawIpc.close();
|
|
499
|
+
}
|
|
500
|
+
onMessage(callback) {
|
|
501
|
+
this._rawIpc.addEventListener('message', callback);
|
|
502
|
+
}
|
|
503
|
+
onClose(callback) {}
|
|
504
|
+
}
|
|
505
|
+
const wrap$5 = messagePort => {
|
|
506
|
+
return new IpcParentWithMessagePort(messagePort);
|
|
507
|
+
};
|
|
508
|
+
const IpcParentWithMessagePort$1 = {
|
|
509
|
+
__proto__: null,
|
|
510
|
+
create: create$5$1,
|
|
511
|
+
signal: signal$1,
|
|
512
|
+
wrap: wrap$5
|
|
513
|
+
};
|
|
420
514
|
|
|
421
515
|
class CommandNotFoundError extends Error {
|
|
422
516
|
constructor(command) {
|
|
@@ -725,7 +819,7 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
|
|
|
725
819
|
const errorProperty = getErrorProperty(error, prettyError);
|
|
726
820
|
return create$1$1(id, errorProperty);
|
|
727
821
|
};
|
|
728
|
-
const create$
|
|
822
|
+
const create$8 = (message, result) => {
|
|
729
823
|
return {
|
|
730
824
|
id: message.id,
|
|
731
825
|
jsonrpc: Two$1,
|
|
@@ -734,7 +828,7 @@ const create$7 = (message, result) => {
|
|
|
734
828
|
};
|
|
735
829
|
const getSuccessResponse = (message, result) => {
|
|
736
830
|
const resultProperty = result ?? null;
|
|
737
|
-
return create$
|
|
831
|
+
return create$8(message, resultProperty);
|
|
738
832
|
};
|
|
739
833
|
const getErrorResponseSimple = (id, error) => {
|
|
740
834
|
return {
|
|
@@ -833,7 +927,7 @@ const handleJsonRpcMessage = async (...args) => {
|
|
|
833
927
|
|
|
834
928
|
const Two = '2.0';
|
|
835
929
|
|
|
836
|
-
const create$
|
|
930
|
+
const create$7 = (method, params) => {
|
|
837
931
|
return {
|
|
838
932
|
jsonrpc: Two,
|
|
839
933
|
method,
|
|
@@ -841,7 +935,7 @@ const create$6 = (method, params) => {
|
|
|
841
935
|
};
|
|
842
936
|
};
|
|
843
937
|
|
|
844
|
-
const create$
|
|
938
|
+
const create$6 = (id, method, params) => {
|
|
845
939
|
const message = {
|
|
846
940
|
id,
|
|
847
941
|
jsonrpc: Two,
|
|
@@ -852,12 +946,12 @@ const create$5 = (id, method, params) => {
|
|
|
852
946
|
};
|
|
853
947
|
|
|
854
948
|
let id = 0;
|
|
855
|
-
const create$
|
|
949
|
+
const create$5 = () => {
|
|
856
950
|
return ++id;
|
|
857
951
|
};
|
|
858
952
|
|
|
859
953
|
const registerPromise = map => {
|
|
860
|
-
const id = create$
|
|
954
|
+
const id = create$5();
|
|
861
955
|
const {
|
|
862
956
|
promise,
|
|
863
957
|
resolve
|
|
@@ -874,7 +968,7 @@ const invokeHelper = async (callbacks, ipc, method, params, useSendAndTransfer)
|
|
|
874
968
|
id,
|
|
875
969
|
promise
|
|
876
970
|
} = registerPromise(callbacks);
|
|
877
|
-
const message = create$
|
|
971
|
+
const message = create$6(id, method, params);
|
|
878
972
|
if (useSendAndTransfer && ipc.sendAndTransfer) {
|
|
879
973
|
ipc.sendAndTransfer(message);
|
|
880
974
|
} else {
|
|
@@ -910,7 +1004,7 @@ const createRpc = ipc => {
|
|
|
910
1004
|
* @deprecated
|
|
911
1005
|
*/
|
|
912
1006
|
send(method, ...params) {
|
|
913
|
-
const message = create$
|
|
1007
|
+
const message = create$7(method, params);
|
|
914
1008
|
ipc.send(message);
|
|
915
1009
|
}
|
|
916
1010
|
};
|
|
@@ -950,6 +1044,24 @@ const listen$1 = async (module, options) => {
|
|
|
950
1044
|
return ipc;
|
|
951
1045
|
};
|
|
952
1046
|
|
|
1047
|
+
const create$4 = async ({
|
|
1048
|
+
commandMap,
|
|
1049
|
+
isMessagePortOpen = true,
|
|
1050
|
+
messagePort
|
|
1051
|
+
}) => {
|
|
1052
|
+
// TODO create a commandMap per rpc instance
|
|
1053
|
+
register(commandMap);
|
|
1054
|
+
const rawIpc = await IpcParentWithMessagePort$1.create({
|
|
1055
|
+
isMessagePortOpen,
|
|
1056
|
+
messagePort
|
|
1057
|
+
});
|
|
1058
|
+
const ipc = IpcParentWithMessagePort$1.wrap(rawIpc);
|
|
1059
|
+
handleIpc(ipc);
|
|
1060
|
+
const rpc = createRpc(ipc);
|
|
1061
|
+
messagePort.start();
|
|
1062
|
+
return rpc;
|
|
1063
|
+
};
|
|
1064
|
+
|
|
953
1065
|
const create$3 = async ({
|
|
954
1066
|
commandMap
|
|
955
1067
|
}) => {
|
|
@@ -982,7 +1094,7 @@ const createMockRpc = ({
|
|
|
982
1094
|
};
|
|
983
1095
|
|
|
984
1096
|
const rpcs = Object.create(null);
|
|
985
|
-
const set$
|
|
1097
|
+
const set$4 = (id, rpc) => {
|
|
986
1098
|
rpcs[id] = rpc;
|
|
987
1099
|
};
|
|
988
1100
|
const get$1 = id => {
|
|
@@ -1015,7 +1127,7 @@ const create$2 = rpcId => {
|
|
|
1015
1127
|
const mockRpc = createMockRpc({
|
|
1016
1128
|
commandMap
|
|
1017
1129
|
});
|
|
1018
|
-
set$
|
|
1130
|
+
set$4(rpcId, mockRpc);
|
|
1019
1131
|
// @ts-ignore
|
|
1020
1132
|
mockRpc[Symbol.dispose] = () => {
|
|
1021
1133
|
remove(rpcId);
|
|
@@ -1024,7 +1136,7 @@ const create$2 = rpcId => {
|
|
|
1024
1136
|
return mockRpc;
|
|
1025
1137
|
},
|
|
1026
1138
|
set(rpc) {
|
|
1027
|
-
set$
|
|
1139
|
+
set$4(rpcId, rpc);
|
|
1028
1140
|
}
|
|
1029
1141
|
};
|
|
1030
1142
|
};
|
|
@@ -1059,6 +1171,7 @@ const Shift = 1 << 10 >>> 0;
|
|
|
1059
1171
|
|
|
1060
1172
|
const None = 0;
|
|
1061
1173
|
|
|
1174
|
+
const RendererProcess = 1670;
|
|
1062
1175
|
const RendererWorker = 1;
|
|
1063
1176
|
|
|
1064
1177
|
const FocusSelector = 'Viewlet.focusSelector';
|
|
@@ -1068,18 +1181,23 @@ const SetFocusContext = 'Viewlet.setFocusContext';
|
|
|
1068
1181
|
const SetPatches = 'Viewlet.setPatches';
|
|
1069
1182
|
|
|
1070
1183
|
const {
|
|
1071
|
-
invoke,
|
|
1072
|
-
set: set$
|
|
1184
|
+
invoke: invoke$2,
|
|
1185
|
+
set: set$3
|
|
1186
|
+
} = create$2(RendererProcess);
|
|
1187
|
+
|
|
1188
|
+
const {
|
|
1189
|
+
invoke: invoke$1,
|
|
1190
|
+
set: set$2
|
|
1073
1191
|
} = create$2(RendererWorker);
|
|
1074
1192
|
const showContextMenu2 = async (uid, menuId, x, y, args) => {
|
|
1075
1193
|
number(uid);
|
|
1076
1194
|
number(menuId);
|
|
1077
1195
|
number(x);
|
|
1078
1196
|
number(y);
|
|
1079
|
-
await invoke('ContextMenu.show2', uid, menuId, x, y, args);
|
|
1197
|
+
await invoke$1('ContextMenu.show2', uid, menuId, x, y, args);
|
|
1080
1198
|
};
|
|
1081
1199
|
const writeClipBoardText = async text => {
|
|
1082
|
-
await invoke('ClipBoard.writeText', /* text */text);
|
|
1200
|
+
await invoke$1('ClipBoard.writeText', /* text */text);
|
|
1083
1201
|
};
|
|
1084
1202
|
|
|
1085
1203
|
const toCommandId = key => {
|
|
@@ -1613,7 +1731,7 @@ const forwardRemotePort = async (state, port) => {
|
|
|
1613
1731
|
uid
|
|
1614
1732
|
} = state;
|
|
1615
1733
|
try {
|
|
1616
|
-
const forwardedPort = await invoke('Application.executeForView', uid, 'PortProvider.forwardPort', port);
|
|
1734
|
+
const forwardedPort = await invoke$1('Application.executeForView', uid, 'PortProvider.forwardPort', port);
|
|
1617
1735
|
if (!forwardedPort || typeof forwardedPort !== 'object' || !('localPort' in forwardedPort)) {
|
|
1618
1736
|
throw new Error('Remote SSH returned an invalid local forwarding port');
|
|
1619
1737
|
}
|
|
@@ -1639,14 +1757,15 @@ const copyLink = async (state, href) => {
|
|
|
1639
1757
|
};
|
|
1640
1758
|
|
|
1641
1759
|
const {
|
|
1760
|
+
createDirectEventCommandMap,
|
|
1642
1761
|
diff,
|
|
1643
1762
|
dispose,
|
|
1644
1763
|
get,
|
|
1645
1764
|
getCommandIds,
|
|
1646
1765
|
registerCommands,
|
|
1647
|
-
set,
|
|
1648
|
-
|
|
1649
|
-
|
|
1766
|
+
set: set$1,
|
|
1767
|
+
wrapGetter,
|
|
1768
|
+
wrapSerialCommand
|
|
1650
1769
|
} = create$1();
|
|
1651
1770
|
|
|
1652
1771
|
const create = (uid, uri, x, y, width, height, platform, assetDir, parentUid) => {
|
|
@@ -1681,7 +1800,7 @@ const create = (uid, uri, x, y, width, height, platform, assetDir, parentUid) =>
|
|
|
1681
1800
|
y
|
|
1682
1801
|
};
|
|
1683
1802
|
const calculated = recalculateVirtualList(state);
|
|
1684
|
-
set(uid, calculated, calculated);
|
|
1803
|
+
set$1(uid, calculated, calculated);
|
|
1685
1804
|
};
|
|
1686
1805
|
|
|
1687
1806
|
const isFocusContextEqual = (oldState, newState) => {
|
|
@@ -2234,8 +2353,8 @@ const openAddress = async (state, portNumber) => {
|
|
|
2234
2353
|
return state;
|
|
2235
2354
|
}
|
|
2236
2355
|
const url = getAddressUrl(port.forwardedAddress);
|
|
2237
|
-
await invoke('Layout.showPreview', 'simple-browser://');
|
|
2238
|
-
await invoke('SimpleBrowser.openOrRevealTab', url);
|
|
2356
|
+
await invoke$1('Layout.showPreview', 'simple-browser://');
|
|
2357
|
+
await invoke$1('SimpleBrowser.openOrRevealTab', url);
|
|
2239
2358
|
return state;
|
|
2240
2359
|
};
|
|
2241
2360
|
|
|
@@ -2279,9 +2398,9 @@ const toggleRemoteSshPort = async (state, portNumber) => {
|
|
|
2279
2398
|
let forwardedAddress = oldForwardedAddress;
|
|
2280
2399
|
try {
|
|
2281
2400
|
if (port.active) {
|
|
2282
|
-
await invoke('Application.executeForView', uid, 'PortProvider.stopForwardPort', portNumber);
|
|
2401
|
+
await invoke$1('Application.executeForView', uid, 'PortProvider.stopForwardPort', portNumber);
|
|
2283
2402
|
} else {
|
|
2284
|
-
const forwardedPort = await invoke('Application.executeForView', uid, 'PortProvider.forwardPort', portNumber);
|
|
2403
|
+
const forwardedPort = await invoke$1('Application.executeForView', uid, 'PortProvider.forwardPort', portNumber);
|
|
2285
2404
|
if (!forwardedPort || typeof forwardedPort !== 'object' || !('localPort' in forwardedPort)) {
|
|
2286
2405
|
throw new Error('Remote SSH returned an invalid local forwarding port');
|
|
2287
2406
|
}
|
|
@@ -2372,6 +2491,31 @@ const handleFocus = state => {
|
|
|
2372
2491
|
};
|
|
2373
2492
|
};
|
|
2374
2493
|
|
|
2494
|
+
const state = {
|
|
2495
|
+
connected: false
|
|
2496
|
+
};
|
|
2497
|
+
const isConnected = () => {
|
|
2498
|
+
const {
|
|
2499
|
+
connected
|
|
2500
|
+
} = state;
|
|
2501
|
+
return connected;
|
|
2502
|
+
};
|
|
2503
|
+
const invoke = (method, ...params) => {
|
|
2504
|
+
return invoke$2(method, ...params);
|
|
2505
|
+
};
|
|
2506
|
+
const set = rpc => {
|
|
2507
|
+
set$3(rpc);
|
|
2508
|
+
state.connected = true;
|
|
2509
|
+
};
|
|
2510
|
+
|
|
2511
|
+
const handleMessagePort = async port => {
|
|
2512
|
+
const rpc = await create$4({
|
|
2513
|
+
commandMap: createDirectEventCommandMap(uid => invoke$1('Viewlet.requestRender', uid)),
|
|
2514
|
+
messagePort: port
|
|
2515
|
+
});
|
|
2516
|
+
set(rpc);
|
|
2517
|
+
};
|
|
2518
|
+
|
|
2375
2519
|
const handleWheel = (state, deltaMode, deltaY) => {
|
|
2376
2520
|
const {
|
|
2377
2521
|
deltaY: oldDeltaY,
|
|
@@ -2389,7 +2533,7 @@ const loadContent = async (state, workspaceUri = '') => {
|
|
|
2389
2533
|
const request = {};
|
|
2390
2534
|
requests.set(uid, request);
|
|
2391
2535
|
try {
|
|
2392
|
-
const ports = workspaceUri ? await invoke('Application.executeForView', uid, 'PortProvider.getPorts', workspaceUri) : [];
|
|
2536
|
+
const ports = workspaceUri ? await invoke$1('Application.executeForView', uid, 'PortProvider.getPorts', workspaceUri) : [];
|
|
2393
2537
|
if (requests.get(uid) !== request) {
|
|
2394
2538
|
return get(uid).newState;
|
|
2395
2539
|
}
|
|
@@ -2435,7 +2579,7 @@ const stopRemotePort = async (state, portNumber) => {
|
|
|
2435
2579
|
uid
|
|
2436
2580
|
} = state;
|
|
2437
2581
|
try {
|
|
2438
|
-
await invoke('Application.executeForView', uid, 'PortProvider.stopForwardPort', portNumber);
|
|
2582
|
+
await invoke$1('Application.executeForView', uid, 'PortProvider.stopForwardPort', portNumber);
|
|
2439
2583
|
} catch (error) {
|
|
2440
2584
|
return {
|
|
2441
2585
|
...state,
|
|
@@ -2814,12 +2958,33 @@ const getRenderer = diffType => {
|
|
|
2814
2958
|
}
|
|
2815
2959
|
};
|
|
2816
2960
|
const render2 = (uid, diffResult) => {
|
|
2961
|
+
// An event may arrive between diff and render; include its changes in this snapshot.
|
|
2962
|
+
const pendingDiffs = [...new Set([...diffResult, ...diff2(uid)])];
|
|
2817
2963
|
const {
|
|
2818
|
-
|
|
2819
|
-
|
|
2964
|
+
oldState,
|
|
2965
|
+
scheduledState
|
|
2820
2966
|
} = get(uid);
|
|
2821
|
-
|
|
2822
|
-
|
|
2967
|
+
const commands = pendingDiffs.map(diffType => getRenderer(diffType)(oldState, scheduledState)).filter(command => command.length > 0);
|
|
2968
|
+
set$1(uid, scheduledState, scheduledState);
|
|
2969
|
+
if (!isConnected() || commands.length === 0) {
|
|
2970
|
+
return commands;
|
|
2971
|
+
}
|
|
2972
|
+
return renderDirect(uid, commands, oldState, scheduledState);
|
|
2973
|
+
};
|
|
2974
|
+
const isWorkerCommand = command => command[0] === SetFocusContext || command[0] === 'Viewlet.unsetAdditionalFocus';
|
|
2975
|
+
const renderDirect = async (uid, commands, oldState, renderedState) => {
|
|
2976
|
+
const workerCommands = commands.filter(isWorkerCommand);
|
|
2977
|
+
const processCommands = commands.filter(command => !isWorkerCommand(command));
|
|
2978
|
+
try {
|
|
2979
|
+
const transactionId = await invoke('Viewlet.queueCommands', uid, [...processCommands, ['Viewlet.setUid', uid, uid]]);
|
|
2980
|
+
return [...workerCommands, ['Viewlet.commitPending', uid, transactionId]];
|
|
2981
|
+
} catch (error) {
|
|
2982
|
+
const current = get(uid);
|
|
2983
|
+
if (current?.oldState === renderedState) {
|
|
2984
|
+
set$1(uid, oldState, current.newState, current.scheduledState);
|
|
2985
|
+
}
|
|
2986
|
+
throw error;
|
|
2987
|
+
}
|
|
2823
2988
|
};
|
|
2824
2989
|
|
|
2825
2990
|
const renderEventListeners = () => {
|
|
@@ -2877,7 +3042,7 @@ const applyComponentState = (currentState, state) => {
|
|
|
2877
3042
|
}
|
|
2878
3043
|
return state;
|
|
2879
3044
|
};
|
|
2880
|
-
const setComponentState =
|
|
3045
|
+
const setComponentState = wrapSerialCommand(applyComponentState);
|
|
2881
3046
|
|
|
2882
3047
|
const toggleFocusedPort = state => {
|
|
2883
3048
|
const {
|
|
@@ -2893,45 +3058,46 @@ const toggleFocusedPort = state => {
|
|
|
2893
3058
|
};
|
|
2894
3059
|
|
|
2895
3060
|
const commandMap = {
|
|
2896
|
-
'Ports.addPort':
|
|
2897
|
-
'Ports.cancelAddPort':
|
|
2898
|
-
'Ports.copyLink':
|
|
3061
|
+
'Ports.addPort': wrapSerialCommand(addPort),
|
|
3062
|
+
'Ports.cancelAddPort': wrapSerialCommand(cancelAddPort),
|
|
3063
|
+
'Ports.copyLink': wrapSerialCommand(copyLink),
|
|
2899
3064
|
'Ports.create': create,
|
|
2900
3065
|
'Ports.diff2': diff2,
|
|
2901
3066
|
'Ports.dispose': dispose,
|
|
2902
|
-
'Ports.focusFirst':
|
|
2903
|
-
'Ports.focusIndex':
|
|
2904
|
-
'Ports.focusLast':
|
|
2905
|
-
'Ports.focusNext':
|
|
2906
|
-
'Ports.focusPrevious':
|
|
3067
|
+
'Ports.focusFirst': wrapSerialCommand(focusFirst),
|
|
3068
|
+
'Ports.focusIndex': wrapSerialCommand(focusIndex),
|
|
3069
|
+
'Ports.focusLast': wrapSerialCommand(focusLast),
|
|
3070
|
+
'Ports.focusNext': wrapSerialCommand(focusNext),
|
|
3071
|
+
'Ports.focusPrevious': wrapSerialCommand(focusPrevious),
|
|
2907
3072
|
'Ports.getCommandIds': getCommandIds,
|
|
2908
3073
|
'Ports.getComponentState': getComponentState,
|
|
2909
3074
|
'Ports.getKeyBindings': getKeyBindings,
|
|
2910
3075
|
'Ports.getMenuEntries2': wrapGetter(getMenuEntries2),
|
|
2911
3076
|
'Ports.getMenuIds': getMenuIds,
|
|
2912
|
-
'Ports.handleAddPortInput':
|
|
2913
|
-
'Ports.handleBlur':
|
|
2914
|
-
'Ports.handleClick':
|
|
2915
|
-
'Ports.handleContextMenu':
|
|
2916
|
-
'Ports.handleFocus':
|
|
2917
|
-
'Ports.
|
|
2918
|
-
'Ports.
|
|
2919
|
-
'Ports.
|
|
2920
|
-
'Ports.
|
|
2921
|
-
'Ports.
|
|
2922
|
-
'Ports.
|
|
2923
|
-
'Ports.
|
|
3077
|
+
'Ports.handleAddPortInput': wrapSerialCommand(handleAddPortInput),
|
|
3078
|
+
'Ports.handleBlur': wrapSerialCommand(handleBlur),
|
|
3079
|
+
'Ports.handleClick': wrapSerialCommand(handleClick),
|
|
3080
|
+
'Ports.handleContextMenu': wrapSerialCommand(handleContextMenu),
|
|
3081
|
+
'Ports.handleFocus': wrapSerialCommand(handleFocus),
|
|
3082
|
+
'Ports.handleMessagePort': handleMessagePort,
|
|
3083
|
+
'Ports.handleWheel': wrapSerialCommand(handleWheel),
|
|
3084
|
+
'Ports.handleWorkspaceChange': wrapSerialCommand(loadContent),
|
|
3085
|
+
'Ports.loadContent': wrapSerialCommand(loadContent),
|
|
3086
|
+
'Ports.openAddress': wrapSerialCommand(openAddress),
|
|
3087
|
+
'Ports.openFocusedAddress': wrapSerialCommand(openFocusedAddress),
|
|
3088
|
+
'Ports.removeFocusedPort': wrapSerialCommand(removeFocusedPort),
|
|
3089
|
+
'Ports.removePort': wrapSerialCommand(removePort),
|
|
2924
3090
|
'Ports.render2': render2,
|
|
2925
3091
|
'Ports.renderEventListeners': renderEventListeners,
|
|
2926
|
-
'Ports.resize':
|
|
3092
|
+
'Ports.resize': wrapSerialCommand(resize),
|
|
2927
3093
|
'Ports.setComponentState': setComponentState,
|
|
2928
|
-
'Ports.setDeltaY':
|
|
2929
|
-
'Ports.setPorts':
|
|
2930
|
-
'Ports.startAddPort':
|
|
2931
|
-
'Ports.submitAddPort':
|
|
3094
|
+
'Ports.setDeltaY': wrapSerialCommand(setDeltaY),
|
|
3095
|
+
'Ports.setPorts': wrapSerialCommand(setPorts),
|
|
3096
|
+
'Ports.startAddPort': wrapSerialCommand(startAddPort),
|
|
3097
|
+
'Ports.submitAddPort': wrapSerialCommand(submitAddPort),
|
|
2932
3098
|
'Ports.terminate': terminate,
|
|
2933
|
-
'Ports.toggleFocusedPort':
|
|
2934
|
-
'Ports.togglePortActive':
|
|
3099
|
+
'Ports.toggleFocusedPort': wrapSerialCommand(toggleFocusedPort),
|
|
3100
|
+
'Ports.togglePortActive': wrapSerialCommand(togglePortActive)
|
|
2935
3101
|
};
|
|
2936
3102
|
|
|
2937
3103
|
const listen = async () => {
|
|
@@ -2939,7 +3105,7 @@ const listen = async () => {
|
|
|
2939
3105
|
const rpc = await create$3({
|
|
2940
3106
|
commandMap: commandMap
|
|
2941
3107
|
});
|
|
2942
|
-
set$
|
|
3108
|
+
set$2(rpc);
|
|
2943
3109
|
};
|
|
2944
3110
|
|
|
2945
3111
|
const main = async () => {
|