@lvce-editor/title-bar-worker 3.18.0 → 3.20.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/titleBarWorkerMain.js +302 -159
- package/package.json +1 -1
|
@@ -518,6 +518,27 @@ const IpcParentWithMessagePort$1 = {
|
|
|
518
518
|
wrap: wrap$5
|
|
519
519
|
};
|
|
520
520
|
|
|
521
|
+
class CommandNotFoundError extends Error {
|
|
522
|
+
constructor(command) {
|
|
523
|
+
super(`Command not found ${command}`);
|
|
524
|
+
this.name = 'CommandNotFoundError';
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
const commands = Object.create(null);
|
|
528
|
+
const register = commandMap => {
|
|
529
|
+
Object.assign(commands, commandMap);
|
|
530
|
+
};
|
|
531
|
+
const getCommand = key => {
|
|
532
|
+
return commands[key];
|
|
533
|
+
};
|
|
534
|
+
const execute = (command, ...args) => {
|
|
535
|
+
const fn = getCommand(command);
|
|
536
|
+
if (!fn) {
|
|
537
|
+
throw new CommandNotFoundError(command);
|
|
538
|
+
}
|
|
539
|
+
return fn(...args);
|
|
540
|
+
};
|
|
541
|
+
|
|
521
542
|
const Two$1 = '2.0';
|
|
522
543
|
const callbacks = Object.create(null);
|
|
523
544
|
const get$2 = id => {
|
|
@@ -542,12 +563,12 @@ const getErrorConstructor = (message, type) => {
|
|
|
542
563
|
switch (type) {
|
|
543
564
|
case DomException:
|
|
544
565
|
return DOMException;
|
|
545
|
-
case TypeError$1:
|
|
546
|
-
return TypeError;
|
|
547
|
-
case SyntaxError$1:
|
|
548
|
-
return SyntaxError;
|
|
549
566
|
case ReferenceError$1:
|
|
550
567
|
return ReferenceError;
|
|
568
|
+
case SyntaxError$1:
|
|
569
|
+
return SyntaxError;
|
|
570
|
+
case TypeError$1:
|
|
571
|
+
return TypeError;
|
|
551
572
|
default:
|
|
552
573
|
return Error;
|
|
553
574
|
}
|
|
@@ -703,27 +724,27 @@ const getErrorProperty = (error, prettyError) => {
|
|
|
703
724
|
if (error && error.code === E_COMMAND_NOT_FOUND) {
|
|
704
725
|
return {
|
|
705
726
|
code: MethodNotFound,
|
|
706
|
-
|
|
707
|
-
|
|
727
|
+
data: error.stack,
|
|
728
|
+
message: error.message
|
|
708
729
|
};
|
|
709
730
|
}
|
|
710
731
|
return {
|
|
711
732
|
code: Custom,
|
|
712
|
-
message: prettyError.message,
|
|
713
733
|
data: {
|
|
714
|
-
stack: getStack(prettyError),
|
|
715
|
-
codeFrame: prettyError.codeFrame,
|
|
716
|
-
type: getErrorType(prettyError),
|
|
717
734
|
code: prettyError.code,
|
|
718
|
-
|
|
719
|
-
|
|
735
|
+
codeFrame: prettyError.codeFrame,
|
|
736
|
+
name: prettyError.name,
|
|
737
|
+
stack: getStack(prettyError),
|
|
738
|
+
type: getErrorType(prettyError)
|
|
739
|
+
},
|
|
740
|
+
message: prettyError.message
|
|
720
741
|
};
|
|
721
742
|
};
|
|
722
743
|
const create$1$1 = (id, error) => {
|
|
723
744
|
return {
|
|
724
|
-
|
|
745
|
+
error,
|
|
725
746
|
id,
|
|
726
|
-
|
|
747
|
+
jsonrpc: Two$1
|
|
727
748
|
};
|
|
728
749
|
};
|
|
729
750
|
const getErrorResponse = (id, error, preparePrettyError, logError) => {
|
|
@@ -732,27 +753,27 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
|
|
|
732
753
|
const errorProperty = getErrorProperty(error, prettyError);
|
|
733
754
|
return create$1$1(id, errorProperty);
|
|
734
755
|
};
|
|
735
|
-
const create$
|
|
756
|
+
const create$9 = (message, result) => {
|
|
736
757
|
return {
|
|
737
|
-
jsonrpc: Two$1,
|
|
738
758
|
id: message.id,
|
|
759
|
+
jsonrpc: Two$1,
|
|
739
760
|
result: result ?? null
|
|
740
761
|
};
|
|
741
762
|
};
|
|
742
763
|
const getSuccessResponse = (message, result) => {
|
|
743
764
|
const resultProperty = result ?? null;
|
|
744
|
-
return create$
|
|
765
|
+
return create$9(message, resultProperty);
|
|
745
766
|
};
|
|
746
767
|
const getErrorResponseSimple = (id, error) => {
|
|
747
768
|
return {
|
|
748
|
-
jsonrpc: Two$1,
|
|
749
|
-
id,
|
|
750
769
|
error: {
|
|
751
770
|
code: Custom,
|
|
771
|
+
data: error,
|
|
752
772
|
// @ts-ignore
|
|
753
|
-
message: error.message
|
|
754
|
-
|
|
755
|
-
|
|
773
|
+
message: error.message
|
|
774
|
+
},
|
|
775
|
+
id,
|
|
776
|
+
jsonrpc: Two$1
|
|
756
777
|
};
|
|
757
778
|
};
|
|
758
779
|
const getResponse = async (message, ipc, execute, preparePrettyError, logError, requiresSocket) => {
|
|
@@ -782,35 +803,35 @@ const normalizeParams = args => {
|
|
|
782
803
|
if (args.length === 1) {
|
|
783
804
|
const options = args[0];
|
|
784
805
|
return {
|
|
806
|
+
execute: options.execute,
|
|
785
807
|
ipc: options.ipc,
|
|
808
|
+
logError: options.logError || defaultLogError,
|
|
786
809
|
message: options.message,
|
|
787
|
-
execute: options.execute,
|
|
788
|
-
resolve: options.resolve || defaultResolve,
|
|
789
810
|
preparePrettyError: options.preparePrettyError || defaultPreparePrettyError,
|
|
790
|
-
|
|
791
|
-
|
|
811
|
+
requiresSocket: options.requiresSocket || defaultRequiresSocket,
|
|
812
|
+
resolve: options.resolve || defaultResolve
|
|
792
813
|
};
|
|
793
814
|
}
|
|
794
815
|
return {
|
|
816
|
+
execute: args[2],
|
|
795
817
|
ipc: args[0],
|
|
818
|
+
logError: args[5],
|
|
796
819
|
message: args[1],
|
|
797
|
-
execute: args[2],
|
|
798
|
-
resolve: args[3],
|
|
799
820
|
preparePrettyError: args[4],
|
|
800
|
-
|
|
801
|
-
|
|
821
|
+
requiresSocket: args[6],
|
|
822
|
+
resolve: args[3]
|
|
802
823
|
};
|
|
803
824
|
};
|
|
804
825
|
const handleJsonRpcMessage = async (...args) => {
|
|
805
826
|
const options = normalizeParams(args);
|
|
806
827
|
const {
|
|
807
|
-
message,
|
|
808
|
-
ipc,
|
|
809
828
|
execute,
|
|
810
|
-
|
|
811
|
-
preparePrettyError,
|
|
829
|
+
ipc,
|
|
812
830
|
logError,
|
|
813
|
-
|
|
831
|
+
message,
|
|
832
|
+
preparePrettyError,
|
|
833
|
+
requiresSocket,
|
|
834
|
+
resolve
|
|
814
835
|
} = options;
|
|
815
836
|
if ('id' in message) {
|
|
816
837
|
if ('method' in message) {
|
|
@@ -833,36 +854,17 @@ const handleJsonRpcMessage = async (...args) => {
|
|
|
833
854
|
throw new JsonRpcError('unexpected message');
|
|
834
855
|
};
|
|
835
856
|
|
|
836
|
-
class CommandNotFoundError extends Error {
|
|
837
|
-
constructor(command) {
|
|
838
|
-
super(`Command not found ${command}`);
|
|
839
|
-
this.name = 'CommandNotFoundError';
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
const commands = Object.create(null);
|
|
843
|
-
const register = commandMap => {
|
|
844
|
-
Object.assign(commands, commandMap);
|
|
845
|
-
};
|
|
846
|
-
const getCommand = key => {
|
|
847
|
-
return commands[key];
|
|
848
|
-
};
|
|
849
|
-
const execute = (command, ...args) => {
|
|
850
|
-
const fn = getCommand(command);
|
|
851
|
-
if (!fn) {
|
|
852
|
-
throw new CommandNotFoundError(command);
|
|
853
|
-
}
|
|
854
|
-
return fn(...args);
|
|
855
|
-
};
|
|
856
|
-
|
|
857
857
|
const Two = '2.0';
|
|
858
|
-
|
|
858
|
+
|
|
859
|
+
const create$8 = (method, params) => {
|
|
859
860
|
return {
|
|
860
861
|
jsonrpc: Two,
|
|
861
862
|
method,
|
|
862
863
|
params
|
|
863
864
|
};
|
|
864
865
|
};
|
|
865
|
-
|
|
866
|
+
|
|
867
|
+
const create$7 = (id, method, params) => {
|
|
866
868
|
const message = {
|
|
867
869
|
id,
|
|
868
870
|
jsonrpc: Two,
|
|
@@ -871,15 +873,14 @@ const create$s = (id, method, params) => {
|
|
|
871
873
|
};
|
|
872
874
|
return message;
|
|
873
875
|
};
|
|
876
|
+
|
|
874
877
|
let id = 0;
|
|
875
|
-
const create$
|
|
878
|
+
const create$6 = () => {
|
|
876
879
|
return ++id;
|
|
877
880
|
};
|
|
878
881
|
|
|
879
|
-
/* eslint-disable n/no-unsupported-features/es-syntax */
|
|
880
|
-
|
|
881
882
|
const registerPromise = map => {
|
|
882
|
-
const id = create$
|
|
883
|
+
const id = create$6();
|
|
883
884
|
const {
|
|
884
885
|
promise,
|
|
885
886
|
resolve
|
|
@@ -891,13 +892,12 @@ const registerPromise = map => {
|
|
|
891
892
|
};
|
|
892
893
|
};
|
|
893
894
|
|
|
894
|
-
// @ts-ignore
|
|
895
895
|
const invokeHelper = async (callbacks, ipc, method, params, useSendAndTransfer) => {
|
|
896
896
|
const {
|
|
897
897
|
id,
|
|
898
898
|
promise
|
|
899
899
|
} = registerPromise(callbacks);
|
|
900
|
-
const message = create$
|
|
900
|
+
const message = create$7(id, method, params);
|
|
901
901
|
if (useSendAndTransfer && ipc.sendAndTransfer) {
|
|
902
902
|
ipc.sendAndTransfer(message);
|
|
903
903
|
} else {
|
|
@@ -933,12 +933,13 @@ const createRpc = ipc => {
|
|
|
933
933
|
* @deprecated
|
|
934
934
|
*/
|
|
935
935
|
send(method, ...params) {
|
|
936
|
-
const message = create$
|
|
936
|
+
const message = create$8(method, params);
|
|
937
937
|
ipc.send(message);
|
|
938
938
|
}
|
|
939
939
|
};
|
|
940
940
|
return rpc;
|
|
941
941
|
};
|
|
942
|
+
|
|
942
943
|
const requiresSocket = () => {
|
|
943
944
|
return false;
|
|
944
945
|
};
|
|
@@ -953,6 +954,7 @@ const handleMessage = event => {
|
|
|
953
954
|
const actualExecute = event?.target?.execute || execute;
|
|
954
955
|
return handleJsonRpcMessage(event.target, event.data, actualExecute, event.target._resolve, preparePrettyError, logError, actualRequiresSocket);
|
|
955
956
|
};
|
|
957
|
+
|
|
956
958
|
const handleIpc = ipc => {
|
|
957
959
|
if ('addEventListener' in ipc) {
|
|
958
960
|
ipc.addEventListener('message', handleMessage);
|
|
@@ -961,6 +963,7 @@ const handleIpc = ipc => {
|
|
|
961
963
|
ipc.on('message', handleMessage);
|
|
962
964
|
}
|
|
963
965
|
};
|
|
966
|
+
|
|
964
967
|
const listen$1 = async (module, options) => {
|
|
965
968
|
const rawIpc = await module.listen(options);
|
|
966
969
|
if (module.signal) {
|
|
@@ -969,6 +972,7 @@ const listen$1 = async (module, options) => {
|
|
|
969
972
|
const ipc = module.wrap(rawIpc);
|
|
970
973
|
return ipc;
|
|
971
974
|
};
|
|
975
|
+
|
|
972
976
|
const create$5 = async ({
|
|
973
977
|
commandMap,
|
|
974
978
|
isMessagePortOpen = true,
|
|
@@ -986,7 +990,8 @@ const create$5 = async ({
|
|
|
986
990
|
messagePort.start();
|
|
987
991
|
return rpc;
|
|
988
992
|
};
|
|
989
|
-
|
|
993
|
+
|
|
994
|
+
const create$4 = async ({
|
|
990
995
|
commandMap,
|
|
991
996
|
isMessagePortOpen,
|
|
992
997
|
send
|
|
@@ -1002,11 +1007,8 @@ const create$3 = async ({
|
|
|
1002
1007
|
messagePort: port2
|
|
1003
1008
|
});
|
|
1004
1009
|
};
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
create: create$3
|
|
1008
|
-
};
|
|
1009
|
-
const create$2$1 = async ({
|
|
1010
|
+
|
|
1011
|
+
const create$3 = async ({
|
|
1010
1012
|
commandMap
|
|
1011
1013
|
}) => {
|
|
1012
1014
|
// TODO create a commandMap per rpc instance
|
|
@@ -1016,10 +1018,7 @@ const create$2$1 = async ({
|
|
|
1016
1018
|
const rpc = createRpc(ipc);
|
|
1017
1019
|
return rpc;
|
|
1018
1020
|
};
|
|
1019
|
-
|
|
1020
|
-
__proto__: null,
|
|
1021
|
-
create: create$2$1
|
|
1022
|
-
};
|
|
1021
|
+
|
|
1023
1022
|
const createMockRpc = ({
|
|
1024
1023
|
commandMap
|
|
1025
1024
|
}) => {
|
|
@@ -1040,6 +1039,54 @@ const createMockRpc = ({
|
|
|
1040
1039
|
return mockRpc;
|
|
1041
1040
|
};
|
|
1042
1041
|
|
|
1042
|
+
const rpcs = Object.create(null);
|
|
1043
|
+
const set$2 = (id, rpc) => {
|
|
1044
|
+
rpcs[id] = rpc;
|
|
1045
|
+
};
|
|
1046
|
+
const get$1 = id => {
|
|
1047
|
+
return rpcs[id];
|
|
1048
|
+
};
|
|
1049
|
+
const remove = id => {
|
|
1050
|
+
delete rpcs[id];
|
|
1051
|
+
};
|
|
1052
|
+
|
|
1053
|
+
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
1054
|
+
const create$2 = rpcId => {
|
|
1055
|
+
return {
|
|
1056
|
+
async dispose() {
|
|
1057
|
+
const rpc = get$1(rpcId);
|
|
1058
|
+
await rpc.dispose();
|
|
1059
|
+
},
|
|
1060
|
+
// @ts-ignore
|
|
1061
|
+
invoke(method, ...params) {
|
|
1062
|
+
const rpc = get$1(rpcId);
|
|
1063
|
+
// @ts-ignore
|
|
1064
|
+
return rpc.invoke(method, ...params);
|
|
1065
|
+
},
|
|
1066
|
+
// @ts-ignore
|
|
1067
|
+
invokeAndTransfer(method, ...params) {
|
|
1068
|
+
const rpc = get$1(rpcId);
|
|
1069
|
+
// @ts-ignore
|
|
1070
|
+
return rpc.invokeAndTransfer(method, ...params);
|
|
1071
|
+
},
|
|
1072
|
+
registerMockRpc(commandMap) {
|
|
1073
|
+
const mockRpc = createMockRpc({
|
|
1074
|
+
commandMap
|
|
1075
|
+
});
|
|
1076
|
+
set$2(rpcId, mockRpc);
|
|
1077
|
+
// @ts-ignore
|
|
1078
|
+
mockRpc[Symbol.dispose] = () => {
|
|
1079
|
+
remove(rpcId);
|
|
1080
|
+
};
|
|
1081
|
+
// @ts-ignore
|
|
1082
|
+
return mockRpc;
|
|
1083
|
+
},
|
|
1084
|
+
set(rpc) {
|
|
1085
|
+
set$2(rpcId, rpc);
|
|
1086
|
+
}
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
1089
|
+
|
|
1043
1090
|
const ContentInfo = 'contentinfo';
|
|
1044
1091
|
const Menu$1 = 'menu';
|
|
1045
1092
|
const MenuBar$1 = 'menubar';
|
|
@@ -1337,7 +1384,7 @@ const OpenRecent$1 = 9;
|
|
|
1337
1384
|
const Run$2 = 10;
|
|
1338
1385
|
const Selection$2 = 11;
|
|
1339
1386
|
const Terminal$2 = 14;
|
|
1340
|
-
const TitleBar$
|
|
1387
|
+
const TitleBar$3 = 15;
|
|
1341
1388
|
const View$2 = 16;
|
|
1342
1389
|
const TitleBarContextMenu = 90;
|
|
1343
1390
|
|
|
@@ -1365,54 +1412,6 @@ const SetFocusContext = 'Viewlet.setFocusContext';
|
|
|
1365
1412
|
|
|
1366
1413
|
const FocusTitleBarMenuBar = 26;
|
|
1367
1414
|
|
|
1368
|
-
const rpcs = Object.create(null);
|
|
1369
|
-
const set$2 = (id, rpc) => {
|
|
1370
|
-
rpcs[id] = rpc;
|
|
1371
|
-
};
|
|
1372
|
-
const get$1 = id => {
|
|
1373
|
-
return rpcs[id];
|
|
1374
|
-
};
|
|
1375
|
-
const remove = id => {
|
|
1376
|
-
delete rpcs[id];
|
|
1377
|
-
};
|
|
1378
|
-
|
|
1379
|
-
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
1380
|
-
const create$2 = rpcId => {
|
|
1381
|
-
return {
|
|
1382
|
-
async dispose() {
|
|
1383
|
-
const rpc = get$1(rpcId);
|
|
1384
|
-
await rpc.dispose();
|
|
1385
|
-
},
|
|
1386
|
-
// @ts-ignore
|
|
1387
|
-
invoke(method, ...params) {
|
|
1388
|
-
const rpc = get$1(rpcId);
|
|
1389
|
-
// @ts-ignore
|
|
1390
|
-
return rpc.invoke(method, ...params);
|
|
1391
|
-
},
|
|
1392
|
-
// @ts-ignore
|
|
1393
|
-
invokeAndTransfer(method, ...params) {
|
|
1394
|
-
const rpc = get$1(rpcId);
|
|
1395
|
-
// @ts-ignore
|
|
1396
|
-
return rpc.invokeAndTransfer(method, ...params);
|
|
1397
|
-
},
|
|
1398
|
-
registerMockRpc(commandMap) {
|
|
1399
|
-
const mockRpc = createMockRpc({
|
|
1400
|
-
commandMap
|
|
1401
|
-
});
|
|
1402
|
-
set$2(rpcId, mockRpc);
|
|
1403
|
-
// @ts-ignore
|
|
1404
|
-
mockRpc[Symbol.dispose] = () => {
|
|
1405
|
-
remove(rpcId);
|
|
1406
|
-
};
|
|
1407
|
-
// @ts-ignore
|
|
1408
|
-
return mockRpc;
|
|
1409
|
-
},
|
|
1410
|
-
set(rpc) {
|
|
1411
|
-
set$2(rpcId, rpc);
|
|
1412
|
-
}
|
|
1413
|
-
};
|
|
1414
|
-
};
|
|
1415
|
-
|
|
1416
1415
|
const {
|
|
1417
1416
|
invoke,
|
|
1418
1417
|
invokeAndTransfer,
|
|
@@ -1423,24 +1422,22 @@ const showContextMenu2 = async (uid, menuId, x, y, args) => {
|
|
|
1423
1422
|
number(menuId);
|
|
1424
1423
|
number(x);
|
|
1425
1424
|
number(y);
|
|
1426
|
-
// @ts-ignore
|
|
1427
1425
|
await invoke('ContextMenu.show2', uid, menuId, x, y, args);
|
|
1428
1426
|
};
|
|
1429
1427
|
const sendMessagePortToTextMeasurementWorker = async port => {
|
|
1430
1428
|
const command = 'TextMeasurement.handleMessagePort';
|
|
1431
|
-
// @ts-ignore
|
|
1432
1429
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToTextMeasurementWorker', port, command, 0);
|
|
1433
1430
|
};
|
|
1431
|
+
const getWindowId$1 = async () => {
|
|
1432
|
+
return invoke('GetWindowId.getWindowId');
|
|
1433
|
+
};
|
|
1434
1434
|
const minimizeWindow = async () => {
|
|
1435
|
-
// @ts-ignore
|
|
1436
1435
|
return invoke('ElectronWindow.minimize');
|
|
1437
1436
|
};
|
|
1438
1437
|
const maximizeWindow = async () => {
|
|
1439
|
-
// @ts-ignore
|
|
1440
1438
|
return invoke('ElectronWindow.maximize');
|
|
1441
1439
|
};
|
|
1442
1440
|
const closeWindow = async () => {
|
|
1443
|
-
// @ts-ignore
|
|
1444
1441
|
return invoke('ElectronWindow.close');
|
|
1445
1442
|
};
|
|
1446
1443
|
|
|
@@ -1484,7 +1481,7 @@ const create$1 = () => {
|
|
|
1484
1481
|
},
|
|
1485
1482
|
getKeys() {
|
|
1486
1483
|
return Object.keys(states).map(key => {
|
|
1487
|
-
return Number.
|
|
1484
|
+
return Number.parseFloat(key);
|
|
1488
1485
|
});
|
|
1489
1486
|
},
|
|
1490
1487
|
registerCommands(commandMap) {
|
|
@@ -1526,6 +1523,37 @@ const create$1 = () => {
|
|
|
1526
1523
|
return fn(newState, ...args);
|
|
1527
1524
|
};
|
|
1528
1525
|
return wrapped;
|
|
1526
|
+
},
|
|
1527
|
+
wrapLoadContent(fn) {
|
|
1528
|
+
const wrapped = async (uid, ...args) => {
|
|
1529
|
+
const {
|
|
1530
|
+
newState,
|
|
1531
|
+
oldState
|
|
1532
|
+
} = states[uid];
|
|
1533
|
+
const result = await fn(newState, ...args);
|
|
1534
|
+
const {
|
|
1535
|
+
error,
|
|
1536
|
+
state
|
|
1537
|
+
} = result;
|
|
1538
|
+
if (oldState === state || newState === state) {
|
|
1539
|
+
return {
|
|
1540
|
+
error
|
|
1541
|
+
};
|
|
1542
|
+
}
|
|
1543
|
+
const latestOld = states[uid];
|
|
1544
|
+
const latestNew = {
|
|
1545
|
+
...latestOld.newState,
|
|
1546
|
+
...state
|
|
1547
|
+
};
|
|
1548
|
+
states[uid] = {
|
|
1549
|
+
newState: latestNew,
|
|
1550
|
+
oldState: latestOld.oldState
|
|
1551
|
+
};
|
|
1552
|
+
return {
|
|
1553
|
+
error
|
|
1554
|
+
};
|
|
1555
|
+
};
|
|
1556
|
+
return wrapped;
|
|
1529
1557
|
}
|
|
1530
1558
|
};
|
|
1531
1559
|
};
|
|
@@ -1538,7 +1566,9 @@ const Electron = 2;
|
|
|
1538
1566
|
const Remote = 3;
|
|
1539
1567
|
|
|
1540
1568
|
const DEFAULT_UID = 1;
|
|
1569
|
+
const DEFAULT_APP_NAME = 'Lvce Editor';
|
|
1541
1570
|
const createDefaultState = (uid = DEFAULT_UID) => ({
|
|
1571
|
+
appName: DEFAULT_APP_NAME,
|
|
1542
1572
|
assetDir: '',
|
|
1543
1573
|
buttons: [],
|
|
1544
1574
|
commandCenterEnabled: false,
|
|
@@ -1587,6 +1617,7 @@ const HandlePointerOver = 8;
|
|
|
1587
1617
|
const HandleMenuClick = 9;
|
|
1588
1618
|
const HandleMenuMouseOver = 10;
|
|
1589
1619
|
const HandleContextMenu = 11;
|
|
1620
|
+
const HandleTitleBarContextMenu = 12;
|
|
1590
1621
|
|
|
1591
1622
|
const emptyObject = {};
|
|
1592
1623
|
const RE_PLACEHOLDER = /\{(PH\d+)\}/g;
|
|
@@ -1601,13 +1632,19 @@ const i18nString = (key, placeholders = emptyObject) => {
|
|
|
1601
1632
|
};
|
|
1602
1633
|
|
|
1603
1634
|
const About = 'About';
|
|
1635
|
+
const Appearance = 'Appearance';
|
|
1636
|
+
const Chat = 'Chat';
|
|
1604
1637
|
const CheckForUpdates = 'Check For Updates';
|
|
1605
1638
|
const ClearRecentlyOpened = 'Clear Recently Opened';
|
|
1606
1639
|
const Close = 'Close';
|
|
1607
1640
|
const Exit = 'Exit';
|
|
1641
|
+
const TitleBar$2 = 'Title Bar';
|
|
1608
1642
|
const MenuBar = 'Menu Bar';
|
|
1609
1643
|
const CommandCenter = 'Command Center';
|
|
1644
|
+
const CommandPalette = 'Command Palette';
|
|
1610
1645
|
const Edit$1 = 'Edit';
|
|
1646
|
+
const EditorLayout = 'Editor Layout';
|
|
1647
|
+
const Explorer = 'Explorer';
|
|
1611
1648
|
const File$2 = 'File';
|
|
1612
1649
|
const Go$1 = 'Go';
|
|
1613
1650
|
const Help$2 = 'Help';
|
|
@@ -1615,12 +1652,19 @@ const Maximize = 'Maximize';
|
|
|
1615
1652
|
const Minimize = 'Minimize';
|
|
1616
1653
|
const MoreDot = 'More ...';
|
|
1617
1654
|
const NewTerminal = 'New Terminal';
|
|
1655
|
+
const OpenView = 'Open View';
|
|
1618
1656
|
const OpenProcessExplorer = 'Open Process Explorer';
|
|
1657
|
+
const Output = 'Output';
|
|
1658
|
+
const Problems = 'Problems';
|
|
1619
1659
|
const Run$1 = 'Run';
|
|
1660
|
+
const Search = 'Search';
|
|
1620
1661
|
const Selection$1 = 'Selection';
|
|
1662
|
+
const SourceControl = 'Source Control';
|
|
1621
1663
|
const Terminal$1 = 'Terminal';
|
|
1622
1664
|
const ToggleDeveloperTools = 'Toggle Developer Tools';
|
|
1623
1665
|
const View$1 = 'View';
|
|
1666
|
+
const WordWrap = 'Word Wrap';
|
|
1667
|
+
const Extensions = 'Extensions';
|
|
1624
1668
|
const AddCursorAbove = 'Add Cursor Above';
|
|
1625
1669
|
const AddCursorBelow = 'Add Cursor Below';
|
|
1626
1670
|
const AddCursorsToLineEnds = 'Add Cursors to Line ends';
|
|
@@ -1676,6 +1720,9 @@ const maximize$1 = () => {
|
|
|
1676
1720
|
const close$1 = () => {
|
|
1677
1721
|
return i18nString(Close);
|
|
1678
1722
|
};
|
|
1723
|
+
const titleBar = () => {
|
|
1724
|
+
return i18nString(TitleBar$2);
|
|
1725
|
+
};
|
|
1679
1726
|
const menuBar = () => {
|
|
1680
1727
|
return i18nString(MenuBar);
|
|
1681
1728
|
};
|
|
@@ -1870,8 +1917,14 @@ const getMenuEntriesTitleBarContextMenu = async state => {
|
|
|
1870
1917
|
};
|
|
1871
1918
|
|
|
1872
1919
|
const MenuIdTitleBarContextMenu = 50;
|
|
1920
|
+
const MenuIdAppearance = 'appearance';
|
|
1921
|
+
const MenuIdEditorLayout = 'editorLayout';
|
|
1873
1922
|
const getMenuIds = () => {
|
|
1874
|
-
return [Edit$2, File$3, Go$2, Help$3, OpenRecent$1, Run$2, Selection$2, Terminal$2, TitleBar$
|
|
1923
|
+
return [Edit$2, File$3, Go$2, Help$3, OpenRecent$1, Run$2, Selection$2, Terminal$2, TitleBar$3, View$2, MenuIdTitleBarContextMenu, TitleBarContextMenu];
|
|
1924
|
+
};
|
|
1925
|
+
|
|
1926
|
+
const getMenuEntries$e = () => {
|
|
1927
|
+
return [];
|
|
1875
1928
|
};
|
|
1876
1929
|
|
|
1877
1930
|
const cut = () => {
|
|
@@ -1945,7 +1998,7 @@ const menuEntrySeparator = {
|
|
|
1945
1998
|
label: ''
|
|
1946
1999
|
};
|
|
1947
2000
|
|
|
1948
|
-
const getMenuEntries$
|
|
2001
|
+
const getMenuEntries$d = () => {
|
|
1949
2002
|
return [{
|
|
1950
2003
|
command: /* TODO */'-1',
|
|
1951
2004
|
flags: None,
|
|
@@ -1984,6 +2037,10 @@ const getMenuEntries$c = () => {
|
|
|
1984
2037
|
}];
|
|
1985
2038
|
};
|
|
1986
2039
|
|
|
2040
|
+
const getMenuEntries$c = () => {
|
|
2041
|
+
return [];
|
|
2042
|
+
};
|
|
2043
|
+
|
|
1987
2044
|
/**
|
|
1988
2045
|
* @enum {string}
|
|
1989
2046
|
*/
|
|
@@ -2029,7 +2086,7 @@ const OpenRecent = 9;
|
|
|
2029
2086
|
const Run = 10;
|
|
2030
2087
|
const Selection = 11;
|
|
2031
2088
|
const Terminal = 14;
|
|
2032
|
-
const TitleBar = 15;
|
|
2089
|
+
const TitleBar$1 = 15;
|
|
2033
2090
|
const View = 16;
|
|
2034
2091
|
|
|
2035
2092
|
const getMenuEntries$b = platform => {
|
|
@@ -2382,13 +2439,84 @@ const getMenuEntries$2 = async platform => {
|
|
|
2382
2439
|
};
|
|
2383
2440
|
|
|
2384
2441
|
const getMenuEntries$1 = () => {
|
|
2385
|
-
return [
|
|
2442
|
+
return [{
|
|
2443
|
+
command: 'Command.openCommandPalette',
|
|
2444
|
+
flags: None,
|
|
2445
|
+
id: 'commandPalette',
|
|
2446
|
+
label: i18nString(CommandPalette)
|
|
2447
|
+
}, {
|
|
2448
|
+
command: 'View.openView',
|
|
2449
|
+
flags: None,
|
|
2450
|
+
id: 'openView',
|
|
2451
|
+
label: i18nString(OpenView)
|
|
2452
|
+
}, menuEntrySeparator, {
|
|
2453
|
+
command: '',
|
|
2454
|
+
flags: SubMenu$1,
|
|
2455
|
+
id: 'appearance',
|
|
2456
|
+
label: i18nString(Appearance)
|
|
2457
|
+
}, {
|
|
2458
|
+
command: '',
|
|
2459
|
+
flags: SubMenu$1,
|
|
2460
|
+
id: 'editorLayout',
|
|
2461
|
+
label: i18nString(EditorLayout)
|
|
2462
|
+
}, menuEntrySeparator, {
|
|
2463
|
+
command: 'Explorer.focus',
|
|
2464
|
+
flags: None,
|
|
2465
|
+
id: 'explorer',
|
|
2466
|
+
label: i18nString(Explorer)
|
|
2467
|
+
}, {
|
|
2468
|
+
command: 'Search.focus',
|
|
2469
|
+
flags: None,
|
|
2470
|
+
id: 'search',
|
|
2471
|
+
label: i18nString(Search)
|
|
2472
|
+
}, {
|
|
2473
|
+
command: 'SourceControl.focus',
|
|
2474
|
+
flags: None,
|
|
2475
|
+
id: 'sourceControl',
|
|
2476
|
+
label: i18nString(SourceControl)
|
|
2477
|
+
}, {
|
|
2478
|
+
command: 'Run.focus',
|
|
2479
|
+
flags: None,
|
|
2480
|
+
id: 'run',
|
|
2481
|
+
label: i18nString(Run$1)
|
|
2482
|
+
}, {
|
|
2483
|
+
command: 'Extensions.focus',
|
|
2484
|
+
flags: None,
|
|
2485
|
+
id: 'extensions',
|
|
2486
|
+
label: i18nString(Extensions)
|
|
2487
|
+
}, menuEntrySeparator, {
|
|
2488
|
+
command: 'Chat.focus',
|
|
2489
|
+
flags: None,
|
|
2490
|
+
id: 'chat',
|
|
2491
|
+
label: i18nString(Chat)
|
|
2492
|
+
}, menuEntrySeparator, {
|
|
2493
|
+
command: 'Problems.toggle',
|
|
2494
|
+
flags: None,
|
|
2495
|
+
id: 'problems',
|
|
2496
|
+
label: i18nString(Problems)
|
|
2497
|
+
}, {
|
|
2498
|
+
command: 'Output.toggle',
|
|
2499
|
+
flags: None,
|
|
2500
|
+
id: 'output',
|
|
2501
|
+
label: i18nString(Output)
|
|
2502
|
+
}, {
|
|
2503
|
+
args: ['Terminal'],
|
|
2504
|
+
command: 'Layout.togglePanel',
|
|
2505
|
+
flags: None,
|
|
2506
|
+
id: 'terminal',
|
|
2507
|
+
label: i18nString(Terminal$1)
|
|
2508
|
+
}, {
|
|
2509
|
+
command: 'Editor.toggleWordWrap',
|
|
2510
|
+
flags: None,
|
|
2511
|
+
id: 'wordWrap',
|
|
2512
|
+
label: i18nString(WordWrap)
|
|
2513
|
+
}];
|
|
2386
2514
|
};
|
|
2387
2515
|
|
|
2388
2516
|
const getMenuEntries2 = async (state, props) => {
|
|
2389
2517
|
switch (props.menuId) {
|
|
2390
2518
|
case Edit$2:
|
|
2391
|
-
return getMenuEntries$
|
|
2519
|
+
return getMenuEntries$d();
|
|
2392
2520
|
case File$3:
|
|
2393
2521
|
return getMenuEntries$b(props.platform);
|
|
2394
2522
|
case Go$2:
|
|
@@ -2403,13 +2531,19 @@ const getMenuEntries2 = async (state, props) => {
|
|
|
2403
2531
|
return getMenuEntries$6();
|
|
2404
2532
|
case Terminal$2:
|
|
2405
2533
|
return getMenuEntries$5();
|
|
2406
|
-
case TitleBar$
|
|
2534
|
+
case TitleBar$3:
|
|
2407
2535
|
return getMenuEntries$2(props.platform);
|
|
2408
2536
|
case TitleBarContextMenu:
|
|
2409
2537
|
case MenuIdTitleBarContextMenu:
|
|
2410
2538
|
return getMenuEntriesTitleBarContextMenu(state);
|
|
2411
2539
|
case View$2:
|
|
2412
2540
|
return getMenuEntries$1();
|
|
2541
|
+
// @ts-ignore
|
|
2542
|
+
case MenuIdAppearance:
|
|
2543
|
+
return getMenuEntries$e();
|
|
2544
|
+
// @ts-ignore
|
|
2545
|
+
case MenuIdEditorLayout:
|
|
2546
|
+
return getMenuEntries$c();
|
|
2413
2547
|
default:
|
|
2414
2548
|
return [];
|
|
2415
2549
|
}
|
|
@@ -2431,7 +2565,7 @@ const getEntryMap = async (state, menuIds, platform) => {
|
|
|
2431
2565
|
// TODO cache window id
|
|
2432
2566
|
|
|
2433
2567
|
const getWindowId = async () => {
|
|
2434
|
-
const windowId = await
|
|
2568
|
+
const windowId = await getWindowId$1();
|
|
2435
2569
|
return windowId;
|
|
2436
2570
|
};
|
|
2437
2571
|
|
|
@@ -2535,7 +2669,6 @@ const toElectronMenuItem = entry => {
|
|
|
2535
2669
|
const toElectronMenuInternal = (commandMap, map, id, electronMenu) => {
|
|
2536
2670
|
object(commandMap);
|
|
2537
2671
|
object(map);
|
|
2538
|
-
number(id);
|
|
2539
2672
|
array(electronMenu);
|
|
2540
2673
|
const entries = map[id];
|
|
2541
2674
|
array(entries);
|
|
@@ -2547,7 +2680,7 @@ const toElectronMenuInternal = (commandMap, map, id, electronMenu) => {
|
|
|
2547
2680
|
};
|
|
2548
2681
|
}
|
|
2549
2682
|
const electronEntry = toElectronMenuItem(entry);
|
|
2550
|
-
if (entry.flags === SubMenu$2) {
|
|
2683
|
+
if (entry.flags === SubMenu$2 && entry.id !== undefined && map[entry.id]) {
|
|
2551
2684
|
toElectronMenuInternal(commandMap, map, entry.id, electronEntry.submenu);
|
|
2552
2685
|
}
|
|
2553
2686
|
electronMenu.push(electronEntry);
|
|
@@ -2581,7 +2714,7 @@ const hydrate = async state => {
|
|
|
2581
2714
|
const {
|
|
2582
2715
|
commandMap,
|
|
2583
2716
|
electronMenu
|
|
2584
|
-
} = toElectronMenu(map, TitleBar);
|
|
2717
|
+
} = toElectronMenu(map, TitleBar$1);
|
|
2585
2718
|
await setItems(electronMenu);
|
|
2586
2719
|
// TODO get all menu items
|
|
2587
2720
|
// TODO send menu items to electron
|
|
@@ -2670,15 +2803,14 @@ const handleClickToggleMaximize = async state => {
|
|
|
2670
2803
|
return state;
|
|
2671
2804
|
};
|
|
2672
2805
|
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
if (className.includes('Minimize')) {
|
|
2806
|
+
const handleClick$1 = async (state, buttonName) => {
|
|
2807
|
+
if (buttonName === 'Minimize') {
|
|
2676
2808
|
return handleClickMinimize(state);
|
|
2677
2809
|
}
|
|
2678
|
-
if (
|
|
2810
|
+
if (buttonName === 'ToggleMaximize') {
|
|
2679
2811
|
return handleClickToggleMaximize(state);
|
|
2680
2812
|
}
|
|
2681
|
-
if (
|
|
2813
|
+
if (buttonName === 'Close') {
|
|
2682
2814
|
return handleClickClose(state);
|
|
2683
2815
|
}
|
|
2684
2816
|
return state;
|
|
@@ -2951,6 +3083,10 @@ const handlePointerOver = (state, name) => {
|
|
|
2951
3083
|
return handleMouseOver(state, index);
|
|
2952
3084
|
};
|
|
2953
3085
|
|
|
3086
|
+
const handleTitleBarContextMenu = async state => {
|
|
3087
|
+
return state;
|
|
3088
|
+
};
|
|
3089
|
+
|
|
2954
3090
|
/**
|
|
2955
3091
|
* Parses a title template string and replaces special variables with their values.
|
|
2956
3092
|
* Supported variables:
|
|
@@ -2988,11 +3124,9 @@ const getTitle = (workspaceUri, titleTemplate, appName) => {
|
|
|
2988
3124
|
return parseTitleTemplate(titleTemplate, folderName, appName);
|
|
2989
3125
|
};
|
|
2990
3126
|
|
|
2991
|
-
const APP_NAME$2 = 'Lvce Editor';
|
|
2992
|
-
|
|
2993
3127
|
// TODO in the future, it could also be a multi-root workspace
|
|
2994
3128
|
const handleWorkspaceChange = async (state, uri) => {
|
|
2995
|
-
const title = getTitle(uri, state.titleTemplate,
|
|
3129
|
+
const title = getTitle(uri, state.titleTemplate, state.appName);
|
|
2996
3130
|
return {
|
|
2997
3131
|
...state,
|
|
2998
3132
|
title,
|
|
@@ -3030,7 +3164,7 @@ const getFontString = (fontWeight, fontSize, fontFamily) => {
|
|
|
3030
3164
|
};
|
|
3031
3165
|
|
|
3032
3166
|
const launchTextMeasurementWorker = async () => {
|
|
3033
|
-
const rpc = await
|
|
3167
|
+
const rpc = await create$4({
|
|
3034
3168
|
commandMap: {},
|
|
3035
3169
|
async send(port) {
|
|
3036
3170
|
await sendMessagePortToTextMeasurementWorker(port);
|
|
@@ -3103,7 +3237,6 @@ const getWorkspaceUri = () => {
|
|
|
3103
3237
|
return invoke('Workspace.getUri');
|
|
3104
3238
|
};
|
|
3105
3239
|
|
|
3106
|
-
const APP_NAME$1 = 'Lvce Editor';
|
|
3107
3240
|
const loadContent2 = async state => {
|
|
3108
3241
|
const {
|
|
3109
3242
|
controlsOverlayEnabled,
|
|
@@ -3119,7 +3252,7 @@ const loadContent2 = async state => {
|
|
|
3119
3252
|
const withWidths = await addWidths(titleBarEntries, labelPadding, labelFontWeight, labelFontSize, labelFontFamily, labelLetterSpacing);
|
|
3120
3253
|
const buttons = getTitleBarButtons(platform, controlsOverlayEnabled, titleBarStyleCustom);
|
|
3121
3254
|
const workspaceUri = await getWorkspaceUri();
|
|
3122
|
-
const title = getTitle(workspaceUri, state.titleTemplate,
|
|
3255
|
+
const title = getTitle(workspaceUri, state.titleTemplate, state.appName);
|
|
3123
3256
|
const iconWidth = 30;
|
|
3124
3257
|
|
|
3125
3258
|
// TODO load preferences here
|
|
@@ -3162,6 +3295,7 @@ const MenuItemSeparator = 'MenuItemSeparator';
|
|
|
3162
3295
|
const MenuItemSeparatorLine = 'MenuItemSeparatorLine';
|
|
3163
3296
|
const MenuItemSubMenu = 'MenuItemSubMenu';
|
|
3164
3297
|
const MenuItemSubMenuArrowRight = 'MenuItemSubMenuArrowRight';
|
|
3298
|
+
const TitleBar = 'TitleBar';
|
|
3165
3299
|
const TitleBarButtons = 'TitleBarButtons';
|
|
3166
3300
|
const TitleBarEntryActive = 'TitleBarEntryActive';
|
|
3167
3301
|
const TitleBarIcon = 'TitleBarIcon';
|
|
@@ -3433,6 +3567,7 @@ const createTitleBarButton = button => {
|
|
|
3433
3567
|
ariaLabel: label,
|
|
3434
3568
|
childCount: 1,
|
|
3435
3569
|
className: `TitleBarButton TitleBarButton${id}`,
|
|
3570
|
+
name: id,
|
|
3436
3571
|
onClick,
|
|
3437
3572
|
type: Button$1
|
|
3438
3573
|
}, getIconVirtualDom(icon, I)];
|
|
@@ -3600,11 +3735,11 @@ const getTitleBarVirtualDom = state => {
|
|
|
3600
3735
|
const iconSrc = getIcon(assetDir);
|
|
3601
3736
|
const visibleEntries = getVisibleTitleBarEntries(titleBarEntries, width, focusedIndex, isMenuOpen);
|
|
3602
3737
|
return [{
|
|
3603
|
-
ariaLabel:
|
|
3604
|
-
// TODO i18n string
|
|
3738
|
+
ariaLabel: titleBar(),
|
|
3605
3739
|
childCount: 4,
|
|
3606
|
-
className:
|
|
3740
|
+
className: mergeClassNames(Viewlet, TitleBar),
|
|
3607
3741
|
id: 'TitleBar',
|
|
3742
|
+
onContextMenu: HandleTitleBarContextMenu,
|
|
3608
3743
|
role: ContentInfo,
|
|
3609
3744
|
type: Div
|
|
3610
3745
|
}, ...getTitleBarIconVirtualDom(titleBarIconEnabled, iconSrc), ...getTitleBarMenuBarVirtualDom(titleBarMenuBarEnabled, visibleEntries, focusedIndex), ...getTitleVirtualDom(titleBarTitleEnabled, title), ...getTitleBarButtonsVirtualDom(titleBarButtonsEnabled, titleBarButtons)];
|
|
@@ -3654,6 +3789,10 @@ const renderEventListeners = () => {
|
|
|
3654
3789
|
}, {
|
|
3655
3790
|
name: HandleContextMenu,
|
|
3656
3791
|
params: ['handleContextMenu', Button, ClientX, ClientY]
|
|
3792
|
+
}, {
|
|
3793
|
+
name: HandleTitleBarContextMenu,
|
|
3794
|
+
params: ['handleTitleBarContextMenu'],
|
|
3795
|
+
preventDefault: true
|
|
3657
3796
|
}, {
|
|
3658
3797
|
name: HandleClickClose,
|
|
3659
3798
|
params: ['handleClickClose']
|
|
@@ -3722,9 +3861,8 @@ const setPlatform = (state, platform) => {
|
|
|
3722
3861
|
};
|
|
3723
3862
|
};
|
|
3724
3863
|
|
|
3725
|
-
const APP_NAME = 'Lvce Editor';
|
|
3726
3864
|
const setTitleTemplate = (state, titleTemplate) => {
|
|
3727
|
-
const title = getTitle(state.workspaceUri, titleTemplate,
|
|
3865
|
+
const title = getTitle(state.workspaceUri, titleTemplate, state.appName);
|
|
3728
3866
|
return {
|
|
3729
3867
|
...state,
|
|
3730
3868
|
title,
|
|
@@ -3956,7 +4094,7 @@ const handleKeyArrowLeft = ifElse(handleKeyArrowLeftMenuOpen, handleKeyArrowLeft
|
|
|
3956
4094
|
const getFn = id => {
|
|
3957
4095
|
switch (id) {
|
|
3958
4096
|
case Edit$2:
|
|
3959
|
-
return getMenuEntries$
|
|
4097
|
+
return getMenuEntries$d;
|
|
3960
4098
|
case File$3:
|
|
3961
4099
|
return getMenuEntries$b;
|
|
3962
4100
|
case Go$2:
|
|
@@ -3971,10 +4109,14 @@ const getFn = id => {
|
|
|
3971
4109
|
return getMenuEntries$6;
|
|
3972
4110
|
case Terminal$2:
|
|
3973
4111
|
return getMenuEntries$5;
|
|
3974
|
-
case TitleBar$
|
|
4112
|
+
case TitleBar$3:
|
|
3975
4113
|
return getMenuEntries$2;
|
|
3976
4114
|
case View$2:
|
|
3977
4115
|
return getMenuEntries$1;
|
|
4116
|
+
case MenuIdAppearance:
|
|
4117
|
+
return getMenuEntries$e;
|
|
4118
|
+
case MenuIdEditorLayout:
|
|
4119
|
+
return getMenuEntries$c;
|
|
3978
4120
|
default:
|
|
3979
4121
|
return undefined;
|
|
3980
4122
|
}
|
|
@@ -4358,6 +4500,7 @@ const commandMap = {
|
|
|
4358
4500
|
'TitleBar.handleMouseOver': wrapCommand(handleMouseOver),
|
|
4359
4501
|
'TitleBar.handlePointerOut': wrapCommand(handlePointerOut),
|
|
4360
4502
|
'TitleBar.handlePointerOver': wrapCommand(handlePointerOver),
|
|
4503
|
+
'TitleBar.handleTitleBarContextMenu': wrapCommand(handleTitleBarContextMenu),
|
|
4361
4504
|
'TitleBar.handleWorkspaceChange': wrapCommand(handleWorkspaceChange),
|
|
4362
4505
|
'TitleBar.hideCommandCenter': wrapCommand(hideCommandCenter),
|
|
4363
4506
|
'TitleBar.hideMenuBar': wrapCommand(hideMenuBar),
|
|
@@ -4378,7 +4521,7 @@ const commandMap = {
|
|
|
4378
4521
|
|
|
4379
4522
|
const listen = async () => {
|
|
4380
4523
|
registerCommands(commandMap);
|
|
4381
|
-
const rpc = await
|
|
4524
|
+
const rpc = await create$3({
|
|
4382
4525
|
commandMap: commandMap
|
|
4383
4526
|
});
|
|
4384
4527
|
set$1(rpc);
|