@lvce-editor/about-view 7.18.0 → 7.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/aboutWorkerMain.js +75 -30
- package/dist/notificationCenterWorkerMain.js +2641 -0
- package/package.json +1 -1
package/dist/aboutWorkerMain.js
CHANGED
|
@@ -1074,7 +1074,7 @@ const createMockRpc = ({
|
|
|
1074
1074
|
};
|
|
1075
1075
|
|
|
1076
1076
|
const rpcs = Object.create(null);
|
|
1077
|
-
const set$
|
|
1077
|
+
const set$6 = (id, rpc) => {
|
|
1078
1078
|
rpcs[id] = rpc;
|
|
1079
1079
|
};
|
|
1080
1080
|
const get$1 = id => {
|
|
@@ -1107,7 +1107,7 @@ const create$2 = rpcId => {
|
|
|
1107
1107
|
const mockRpc = createMockRpc({
|
|
1108
1108
|
commandMap
|
|
1109
1109
|
});
|
|
1110
|
-
set$
|
|
1110
|
+
set$6(rpcId, mockRpc);
|
|
1111
1111
|
// @ts-ignore
|
|
1112
1112
|
mockRpc[Symbol.dispose] = () => {
|
|
1113
1113
|
remove(rpcId);
|
|
@@ -1116,7 +1116,7 @@ const create$2 = rpcId => {
|
|
|
1116
1116
|
return mockRpc;
|
|
1117
1117
|
},
|
|
1118
1118
|
set(rpc) {
|
|
1119
|
-
set$
|
|
1119
|
+
set$6(rpcId, rpc);
|
|
1120
1120
|
}
|
|
1121
1121
|
};
|
|
1122
1122
|
};
|
|
@@ -1299,37 +1299,45 @@ const Shift = 1 << 10 >>> 0;
|
|
|
1299
1299
|
|
|
1300
1300
|
const DialogWorker = 7014;
|
|
1301
1301
|
const FileSystemWorker = 209;
|
|
1302
|
+
const RendererProcess = 1670;
|
|
1302
1303
|
const RendererWorker = 1;
|
|
1303
1304
|
|
|
1305
|
+
const SetFocusContext = 'Viewlet.setFocusContext';
|
|
1306
|
+
|
|
1304
1307
|
const {
|
|
1305
|
-
invoke: invoke$
|
|
1306
|
-
set: set$
|
|
1308
|
+
invoke: invoke$4,
|
|
1309
|
+
set: set$5
|
|
1307
1310
|
} = create$2(DialogWorker);
|
|
1308
1311
|
|
|
1309
1312
|
const {
|
|
1310
|
-
invoke: invoke$
|
|
1311
|
-
set: set$
|
|
1313
|
+
invoke: invoke$3,
|
|
1314
|
+
set: set$4
|
|
1312
1315
|
} = create$2(FileSystemWorker);
|
|
1313
1316
|
const readFile = async uri => {
|
|
1314
|
-
return invoke$
|
|
1317
|
+
return invoke$3('FileSystem.readFile', uri);
|
|
1315
1318
|
};
|
|
1316
1319
|
|
|
1317
1320
|
const {
|
|
1318
|
-
invoke,
|
|
1321
|
+
invoke: invoke$2,
|
|
1322
|
+
set: set$3
|
|
1323
|
+
} = create$2(RendererProcess);
|
|
1324
|
+
|
|
1325
|
+
const {
|
|
1326
|
+
invoke: invoke$1,
|
|
1319
1327
|
invokeAndTransfer,
|
|
1320
|
-
set: set$
|
|
1328
|
+
set: set$2
|
|
1321
1329
|
} = create$2(RendererWorker);
|
|
1322
1330
|
const getElectronVersion$1 = async () => {
|
|
1323
|
-
return invoke('Process.getElectronVersion');
|
|
1331
|
+
return invoke$1('Process.getElectronVersion');
|
|
1324
1332
|
};
|
|
1325
1333
|
const getNodeVersion$1 = async () => {
|
|
1326
|
-
return invoke('Process.getNodeVersion');
|
|
1334
|
+
return invoke$1('Process.getNodeVersion');
|
|
1327
1335
|
};
|
|
1328
1336
|
const getChromeVersion$1 = async () => {
|
|
1329
|
-
return invoke('Process.getChromeVersion');
|
|
1337
|
+
return invoke$1('Process.getChromeVersion');
|
|
1330
1338
|
};
|
|
1331
1339
|
const getV8Version$1 = async () => {
|
|
1332
|
-
return invoke('Process.getV8Version');
|
|
1340
|
+
return invoke$1('Process.getV8Version');
|
|
1333
1341
|
};
|
|
1334
1342
|
const sendMessagePortToDialogWorker = async port => {
|
|
1335
1343
|
const command = 'HandleMessagePort.handleMessagePort';
|
|
@@ -1340,19 +1348,19 @@ const sendMessagePortToFileSystemWorker = async (port, rpcId) => {
|
|
|
1340
1348
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToFileSystemWorker', port, command, rpcId);
|
|
1341
1349
|
};
|
|
1342
1350
|
const setFocus = key => {
|
|
1343
|
-
return invoke('Focus.setFocus', key);
|
|
1351
|
+
return invoke$1('Focus.setFocus', key);
|
|
1344
1352
|
};
|
|
1345
1353
|
const closeWidget$1 = async widgetId => {
|
|
1346
|
-
return invoke('Viewlet.closeWidget', widgetId);
|
|
1354
|
+
return invoke$1('Viewlet.closeWidget', widgetId);
|
|
1347
1355
|
};
|
|
1348
1356
|
const writeClipBoardText = async text => {
|
|
1349
|
-
await invoke('ClipBoard.writeText', /* text */text);
|
|
1357
|
+
await invoke$1('ClipBoard.writeText', /* text */text);
|
|
1350
1358
|
};
|
|
1351
1359
|
const openWidget = async name => {
|
|
1352
|
-
await invoke('Viewlet.openWidget', name);
|
|
1360
|
+
await invoke$1('Viewlet.openWidget', name);
|
|
1353
1361
|
};
|
|
1354
1362
|
const getWindowId$1 = async () => {
|
|
1355
|
-
return invoke('GetWindowId.getWindowId');
|
|
1363
|
+
return invoke$1('GetWindowId.getWindowId');
|
|
1356
1364
|
};
|
|
1357
1365
|
|
|
1358
1366
|
const toCommandId = key => {
|
|
@@ -1601,9 +1609,9 @@ const create$1 = () => {
|
|
|
1601
1609
|
const {
|
|
1602
1610
|
dispose: dispose$1,
|
|
1603
1611
|
get,
|
|
1604
|
-
getCommandIds,
|
|
1612
|
+
getCommandIds: getCommandIds$1,
|
|
1605
1613
|
registerCommands,
|
|
1606
|
-
set,
|
|
1614
|
+
set: set$1,
|
|
1607
1615
|
wrapAsyncCommand,
|
|
1608
1616
|
wrapCommand
|
|
1609
1617
|
} = create$1();
|
|
@@ -1615,7 +1623,7 @@ const create = uid => {
|
|
|
1615
1623
|
productName: '',
|
|
1616
1624
|
uid
|
|
1617
1625
|
};
|
|
1618
|
-
set(uid, state, state);
|
|
1626
|
+
set$1(uid, state, state);
|
|
1619
1627
|
};
|
|
1620
1628
|
|
|
1621
1629
|
const RenderFocus = 2;
|
|
@@ -1710,6 +1718,11 @@ const focusPrevious = state => {
|
|
|
1710
1718
|
};
|
|
1711
1719
|
};
|
|
1712
1720
|
|
|
1721
|
+
const topLevelCommandIds = new Set(['showAbout', 'showAboutElectron']);
|
|
1722
|
+
const getCommandIds = () => {
|
|
1723
|
+
return getCommandIds$1().filter(commandId => !topLevelCommandIds.has(commandId));
|
|
1724
|
+
};
|
|
1725
|
+
|
|
1713
1726
|
const mergeClassNames = (...classNames) => {
|
|
1714
1727
|
return classNames.filter(Boolean).join(' ');
|
|
1715
1728
|
};
|
|
@@ -1820,6 +1833,31 @@ const handleFocusIn = async context => {
|
|
|
1820
1833
|
});
|
|
1821
1834
|
};
|
|
1822
1835
|
|
|
1836
|
+
const state = {
|
|
1837
|
+
connected: false
|
|
1838
|
+
};
|
|
1839
|
+
const isConnected = () => {
|
|
1840
|
+
const {
|
|
1841
|
+
connected
|
|
1842
|
+
} = state;
|
|
1843
|
+
return connected;
|
|
1844
|
+
};
|
|
1845
|
+
const invoke = (method, ...params) => {
|
|
1846
|
+
return invoke$2(method, ...params);
|
|
1847
|
+
};
|
|
1848
|
+
const set = rpc => {
|
|
1849
|
+
set$3(rpc);
|
|
1850
|
+
state.connected = true;
|
|
1851
|
+
};
|
|
1852
|
+
|
|
1853
|
+
const handleMessagePort = async port => {
|
|
1854
|
+
const rpc = await create$6({
|
|
1855
|
+
commandMap: {},
|
|
1856
|
+
messagePort: port
|
|
1857
|
+
});
|
|
1858
|
+
set(rpc);
|
|
1859
|
+
};
|
|
1860
|
+
|
|
1823
1861
|
const OneSecondAgo = '1 second ago';
|
|
1824
1862
|
const SomeSecondsAgo = '{PH1} seconds ago';
|
|
1825
1863
|
const OneMinuteAgo = '1 minute ago';
|
|
@@ -2116,7 +2154,7 @@ const getDetailStringWeb = config => {
|
|
|
2116
2154
|
};
|
|
2117
2155
|
|
|
2118
2156
|
const getConfigJsonPath = async () => {
|
|
2119
|
-
return invoke('PlatformPaths.getConfigJsonPath');
|
|
2157
|
+
return invoke$1('PlatformPaths.getConfigJsonPath');
|
|
2120
2158
|
};
|
|
2121
2159
|
|
|
2122
2160
|
const getString = (config, key) => {
|
|
@@ -2386,14 +2424,20 @@ const applyRender = (oldState, newState, diffResult) => {
|
|
|
2386
2424
|
return commands;
|
|
2387
2425
|
};
|
|
2388
2426
|
|
|
2389
|
-
const doRender = (uid, diffResult) => {
|
|
2427
|
+
const doRender = async (uid, diffResult) => {
|
|
2390
2428
|
const {
|
|
2391
2429
|
oldState,
|
|
2392
2430
|
scheduledState
|
|
2393
2431
|
} = get(uid);
|
|
2394
|
-
set(uid, scheduledState, scheduledState);
|
|
2432
|
+
set$1(uid, scheduledState, scheduledState);
|
|
2395
2433
|
const commands = applyRender(oldState, scheduledState, diffResult);
|
|
2396
|
-
|
|
2434
|
+
if (!isConnected()) {
|
|
2435
|
+
return commands;
|
|
2436
|
+
}
|
|
2437
|
+
const rendererWorkerCommands = commands.filter(command => command[0] === SetFocusContext);
|
|
2438
|
+
const rendererProcessCommands = commands.filter(command => command[0] !== SetFocusContext);
|
|
2439
|
+
const transactionId = await invoke('Viewlet.queueCommands', uid, rendererProcessCommands);
|
|
2440
|
+
return [...rendererWorkerCommands, ['Viewlet.commitPending', uid, transactionId]];
|
|
2397
2441
|
};
|
|
2398
2442
|
|
|
2399
2443
|
const renderEventListeners = () => {
|
|
@@ -2429,7 +2473,7 @@ const showMessageBox = async options => {
|
|
|
2429
2473
|
...options,
|
|
2430
2474
|
windowId
|
|
2431
2475
|
};
|
|
2432
|
-
return invoke$
|
|
2476
|
+
return invoke$4('ElectronDialog.showMessageBox', finalOptions);
|
|
2433
2477
|
};
|
|
2434
2478
|
|
|
2435
2479
|
const Info = 'info';
|
|
@@ -2504,6 +2548,7 @@ const commandMap = {
|
|
|
2504
2548
|
'About.handleClickCopy': wrapCommand(handleClickCopy),
|
|
2505
2549
|
'About.handleClickOk': wrapCommand(handleClickOk),
|
|
2506
2550
|
'About.handleFocusIn': wrapAsyncCommand(handleFocusIn),
|
|
2551
|
+
'About.handleMessagePort': handleMessagePort,
|
|
2507
2552
|
'About.loadContent2': wrapAsyncCommand(loadContent2),
|
|
2508
2553
|
'About.render2': doRender,
|
|
2509
2554
|
'About.renderEventListeners': renderEventListeners,
|
|
@@ -2519,14 +2564,14 @@ const initializeFileSystemWorker = async () => {
|
|
|
2519
2564
|
commandMap: {},
|
|
2520
2565
|
send
|
|
2521
2566
|
});
|
|
2522
|
-
set$
|
|
2567
|
+
set$4(rpc);
|
|
2523
2568
|
};
|
|
2524
2569
|
|
|
2525
2570
|
const initializeRendererWorker = async () => {
|
|
2526
2571
|
const rpc = await create$3({
|
|
2527
2572
|
commandMap: commandMap
|
|
2528
2573
|
});
|
|
2529
|
-
set$
|
|
2574
|
+
set$2(rpc);
|
|
2530
2575
|
};
|
|
2531
2576
|
|
|
2532
2577
|
const listen = async () => {
|
|
@@ -2537,7 +2582,7 @@ const listen = async () => {
|
|
|
2537
2582
|
commandMap: {},
|
|
2538
2583
|
send: sendMessagePortToDialogWorker
|
|
2539
2584
|
});
|
|
2540
|
-
set$
|
|
2585
|
+
set$5(dialogRpc);
|
|
2541
2586
|
};
|
|
2542
2587
|
|
|
2543
2588
|
const main = async () => {
|