@lvce-editor/about-view 7.17.0 → 7.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/aboutWorkerMain.js +34 -29
- package/package.json +1 -1
package/dist/aboutWorkerMain.js
CHANGED
|
@@ -965,6 +965,34 @@ const listen$1 = async (module, options) => {
|
|
|
965
965
|
return ipc;
|
|
966
966
|
};
|
|
967
967
|
|
|
968
|
+
const createSharedLazyRpc = factory => {
|
|
969
|
+
let rpcPromise;
|
|
970
|
+
const getOrCreate = () => {
|
|
971
|
+
if (!rpcPromise) {
|
|
972
|
+
rpcPromise = factory();
|
|
973
|
+
}
|
|
974
|
+
return rpcPromise;
|
|
975
|
+
};
|
|
976
|
+
return {
|
|
977
|
+
async dispose() {
|
|
978
|
+
const rpc = await getOrCreate();
|
|
979
|
+
await rpc.dispose();
|
|
980
|
+
},
|
|
981
|
+
async invoke(method, ...params) {
|
|
982
|
+
const rpc = await getOrCreate();
|
|
983
|
+
return rpc.invoke(method, ...params);
|
|
984
|
+
},
|
|
985
|
+
async invokeAndTransfer(method, ...params) {
|
|
986
|
+
const rpc = await getOrCreate();
|
|
987
|
+
return rpc.invokeAndTransfer(method, ...params);
|
|
988
|
+
},
|
|
989
|
+
async send(method, ...params) {
|
|
990
|
+
const rpc = await getOrCreate();
|
|
991
|
+
rpc.send(method, ...params);
|
|
992
|
+
}
|
|
993
|
+
};
|
|
994
|
+
};
|
|
995
|
+
|
|
968
996
|
const create$6 = async ({
|
|
969
997
|
commandMap,
|
|
970
998
|
isMessagePortOpen = true,
|
|
@@ -1000,34 +1028,6 @@ const create$5 = async ({
|
|
|
1000
1028
|
});
|
|
1001
1029
|
};
|
|
1002
1030
|
|
|
1003
|
-
const createSharedLazyRpc = factory => {
|
|
1004
|
-
let rpcPromise;
|
|
1005
|
-
const getOrCreate = () => {
|
|
1006
|
-
if (!rpcPromise) {
|
|
1007
|
-
rpcPromise = factory();
|
|
1008
|
-
}
|
|
1009
|
-
return rpcPromise;
|
|
1010
|
-
};
|
|
1011
|
-
return {
|
|
1012
|
-
async dispose() {
|
|
1013
|
-
const rpc = await getOrCreate();
|
|
1014
|
-
await rpc.dispose();
|
|
1015
|
-
},
|
|
1016
|
-
async invoke(method, ...params) {
|
|
1017
|
-
const rpc = await getOrCreate();
|
|
1018
|
-
return rpc.invoke(method, ...params);
|
|
1019
|
-
},
|
|
1020
|
-
async invokeAndTransfer(method, ...params) {
|
|
1021
|
-
const rpc = await getOrCreate();
|
|
1022
|
-
return rpc.invokeAndTransfer(method, ...params);
|
|
1023
|
-
},
|
|
1024
|
-
async send(method, ...params) {
|
|
1025
|
-
const rpc = await getOrCreate();
|
|
1026
|
-
rpc.send(method, ...params);
|
|
1027
|
-
}
|
|
1028
|
-
};
|
|
1029
|
-
};
|
|
1030
|
-
|
|
1031
1031
|
const create$4 = async ({
|
|
1032
1032
|
commandMap,
|
|
1033
1033
|
isMessagePortOpen,
|
|
@@ -1601,7 +1601,7 @@ const create$1 = () => {
|
|
|
1601
1601
|
const {
|
|
1602
1602
|
dispose: dispose$1,
|
|
1603
1603
|
get,
|
|
1604
|
-
getCommandIds,
|
|
1604
|
+
getCommandIds: getCommandIds$1,
|
|
1605
1605
|
registerCommands,
|
|
1606
1606
|
set,
|
|
1607
1607
|
wrapAsyncCommand,
|
|
@@ -1710,6 +1710,11 @@ const focusPrevious = state => {
|
|
|
1710
1710
|
};
|
|
1711
1711
|
};
|
|
1712
1712
|
|
|
1713
|
+
const topLevelCommandIds = new Set(['showAbout', 'showAboutElectron']);
|
|
1714
|
+
const getCommandIds = () => {
|
|
1715
|
+
return getCommandIds$1().filter(commandId => !topLevelCommandIds.has(commandId));
|
|
1716
|
+
};
|
|
1717
|
+
|
|
1713
1718
|
const mergeClassNames = (...classNames) => {
|
|
1714
1719
|
return classNames.filter(Boolean).join(' ');
|
|
1715
1720
|
};
|