@lvce-editor/extension-search-view 7.16.1 → 7.17.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.
|
@@ -1123,7 +1123,7 @@ const createMockRpc = ({
|
|
|
1123
1123
|
};
|
|
1124
1124
|
|
|
1125
1125
|
const rpcs = Object.create(null);
|
|
1126
|
-
const set$
|
|
1126
|
+
const set$6 = (id, rpc) => {
|
|
1127
1127
|
rpcs[id] = rpc;
|
|
1128
1128
|
};
|
|
1129
1129
|
const get$1 = id => {
|
|
@@ -1156,7 +1156,7 @@ const create$3 = rpcId => {
|
|
|
1156
1156
|
const mockRpc = createMockRpc({
|
|
1157
1157
|
commandMap
|
|
1158
1158
|
});
|
|
1159
|
-
set$
|
|
1159
|
+
set$6(rpcId, mockRpc);
|
|
1160
1160
|
// @ts-ignore
|
|
1161
1161
|
mockRpc[Symbol.dispose] = () => {
|
|
1162
1162
|
remove(rpcId);
|
|
@@ -1165,7 +1165,7 @@ const create$3 = rpcId => {
|
|
|
1165
1165
|
return mockRpc;
|
|
1166
1166
|
},
|
|
1167
1167
|
set(rpc) {
|
|
1168
|
-
set$
|
|
1168
|
+
set$6(rpcId, rpc);
|
|
1169
1169
|
}
|
|
1170
1170
|
};
|
|
1171
1171
|
};
|
|
@@ -1359,70 +1359,77 @@ const LeftClick = 0;
|
|
|
1359
1359
|
|
|
1360
1360
|
const DialogWorker = 7014;
|
|
1361
1361
|
const ExtensionManagementWorker = 9006;
|
|
1362
|
+
const RendererProcess = 1670;
|
|
1362
1363
|
const RendererWorker = 1;
|
|
1363
1364
|
|
|
1364
1365
|
const FocusSelector = 'Viewlet.focusSelector';
|
|
1365
1366
|
const SetCss = 'Viewlet.setCss';
|
|
1366
1367
|
const SetDom2 = 'Viewlet.setDom2';
|
|
1368
|
+
const SetFocusContext = 'Viewlet.setFocusContext';
|
|
1367
1369
|
const SetPatches = 'Viewlet.setPatches';
|
|
1368
1370
|
|
|
1369
1371
|
const {
|
|
1370
|
-
invoke: invoke$
|
|
1371
|
-
set: set$
|
|
1372
|
+
invoke: invoke$4,
|
|
1373
|
+
set: set$5
|
|
1372
1374
|
} = create$3(DialogWorker);
|
|
1373
1375
|
|
|
1374
1376
|
const {
|
|
1375
|
-
invoke: invoke$
|
|
1376
|
-
set: set$
|
|
1377
|
+
invoke: invoke$3,
|
|
1378
|
+
set: set$4
|
|
1377
1379
|
} = create$3(ExtensionManagementWorker);
|
|
1378
1380
|
const disableWorkspace$2 = id => {
|
|
1379
|
-
return invoke$
|
|
1381
|
+
return invoke$3('Extensions.disableWorkspace', id);
|
|
1380
1382
|
};
|
|
1381
1383
|
const uninstall$2 = id => {
|
|
1382
|
-
return invoke$
|
|
1384
|
+
return invoke$3(`Extensions.uninstall`, id);
|
|
1383
1385
|
};
|
|
1384
1386
|
|
|
1385
1387
|
const {
|
|
1386
|
-
invoke,
|
|
1388
|
+
invoke: invoke$2,
|
|
1389
|
+
set: set$3
|
|
1390
|
+
} = create$3(RendererProcess);
|
|
1391
|
+
|
|
1392
|
+
const {
|
|
1393
|
+
invoke: invoke$1,
|
|
1387
1394
|
invokeAndTransfer,
|
|
1388
|
-
set: set$
|
|
1395
|
+
set: set$2
|
|
1389
1396
|
} = create$3(RendererWorker);
|
|
1390
1397
|
const showContextMenu2 = async (uid, menuId, x, y, args) => {
|
|
1391
1398
|
number(uid);
|
|
1392
1399
|
number(menuId);
|
|
1393
1400
|
number(x);
|
|
1394
1401
|
number(y);
|
|
1395
|
-
await invoke('ContextMenu.show2', uid, menuId, x, y, args);
|
|
1402
|
+
await invoke$1('ContextMenu.show2', uid, menuId, x, y, args);
|
|
1396
1403
|
};
|
|
1397
1404
|
const sendMessagePortToDialogWorker = async port => {
|
|
1398
1405
|
const command = 'HandleMessagePort.handleMessagePort';
|
|
1399
1406
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToDialogWorker', port, command);
|
|
1400
1407
|
};
|
|
1401
1408
|
const disableExtension = async id => {
|
|
1402
|
-
return invoke('ExtensionManagement.disable', id);
|
|
1409
|
+
return invoke$1('ExtensionManagement.disable', id);
|
|
1403
1410
|
};
|
|
1404
1411
|
const enableExtension = async id => {
|
|
1405
|
-
return invoke('ExtensionManagement.enable', id);
|
|
1412
|
+
return invoke$1('ExtensionManagement.enable', id);
|
|
1406
1413
|
};
|
|
1407
1414
|
const writeClipBoardText = async text => {
|
|
1408
|
-
await invoke('ClipBoard.writeText', /* text */text);
|
|
1415
|
+
await invoke$1('ClipBoard.writeText', /* text */text);
|
|
1409
1416
|
};
|
|
1410
1417
|
const sendMessagePortToExtensionManagementWorker = async (port, rpcId) => {
|
|
1411
1418
|
const command = 'Extensions.handleMessagePort';
|
|
1412
1419
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionManagementWorker', port, command, rpcId);
|
|
1413
1420
|
};
|
|
1414
1421
|
const openUri$1 = async (uri, focus, options) => {
|
|
1415
|
-
await invoke('Main.openUri', {
|
|
1422
|
+
await invoke$1('Main.openUri', {
|
|
1416
1423
|
...options,
|
|
1417
1424
|
focus,
|
|
1418
1425
|
uri
|
|
1419
1426
|
});
|
|
1420
1427
|
};
|
|
1421
1428
|
const showErrorDialog = async errorInfo => {
|
|
1422
|
-
await invoke('ErrorHandling.showErrorDialog', errorInfo);
|
|
1429
|
+
await invoke$1('ErrorHandling.showErrorDialog', errorInfo);
|
|
1423
1430
|
};
|
|
1424
1431
|
const installExtension = async id => {
|
|
1425
|
-
return invoke('ExtensionManagement.install', id);
|
|
1432
|
+
return invoke$1('ExtensionManagement.install', id);
|
|
1426
1433
|
};
|
|
1427
1434
|
|
|
1428
1435
|
const toCommandId = key => {
|
|
@@ -2467,7 +2474,7 @@ const {
|
|
|
2467
2474
|
get,
|
|
2468
2475
|
getCommandIds,
|
|
2469
2476
|
registerCommands,
|
|
2470
|
-
set,
|
|
2477
|
+
set: set$1,
|
|
2471
2478
|
wrapAsyncCommand,
|
|
2472
2479
|
wrapCommand,
|
|
2473
2480
|
wrapGetter
|
|
@@ -2514,7 +2521,7 @@ const create = (id, uri, x, y, width, height, platform, assetDir, parentUid) =>
|
|
|
2514
2521
|
y
|
|
2515
2522
|
};
|
|
2516
2523
|
create$1(id);
|
|
2517
|
-
set(id, state, state);
|
|
2524
|
+
set$1(id, state, state);
|
|
2518
2525
|
};
|
|
2519
2526
|
|
|
2520
2527
|
const isEqual$4 = (oldState, newState) => {
|
|
@@ -2619,7 +2626,7 @@ const enableWorkspace = async state => {
|
|
|
2619
2626
|
if (!item) {
|
|
2620
2627
|
return state;
|
|
2621
2628
|
}
|
|
2622
|
-
await invoke$
|
|
2629
|
+
await invoke$3('Extensions.enableWorkspace', item.id);
|
|
2623
2630
|
return setExtensionStatus(state, item.id, Enabled);
|
|
2624
2631
|
};
|
|
2625
2632
|
|
|
@@ -3562,7 +3569,7 @@ const Remote = 3;
|
|
|
3562
3569
|
|
|
3563
3570
|
const getAllExtensions$1 = async (assetDir, platform) => {
|
|
3564
3571
|
try {
|
|
3565
|
-
return await invoke$
|
|
3572
|
+
return await invoke$3('Extensions.getAllExtensions', assetDir, platform);
|
|
3566
3573
|
} catch (error) {
|
|
3567
3574
|
if (platform === Web) {
|
|
3568
3575
|
return [];
|
|
@@ -3803,6 +3810,31 @@ const handleInstall = async (state, id) => {
|
|
|
3803
3810
|
return setExtensionStatus(state, id, Enabled);
|
|
3804
3811
|
};
|
|
3805
3812
|
|
|
3813
|
+
const state = {
|
|
3814
|
+
connected: false
|
|
3815
|
+
};
|
|
3816
|
+
const isConnected = () => {
|
|
3817
|
+
const {
|
|
3818
|
+
connected
|
|
3819
|
+
} = state;
|
|
3820
|
+
return connected;
|
|
3821
|
+
};
|
|
3822
|
+
const invoke = (method, ...params) => {
|
|
3823
|
+
return invoke$2(method, ...params);
|
|
3824
|
+
};
|
|
3825
|
+
const set = rpc => {
|
|
3826
|
+
set$3(rpc);
|
|
3827
|
+
state.connected = true;
|
|
3828
|
+
};
|
|
3829
|
+
|
|
3830
|
+
const handleMessagePort = async port => {
|
|
3831
|
+
const rpc = await create$7({
|
|
3832
|
+
commandMap: {},
|
|
3833
|
+
messagePort: port
|
|
3834
|
+
});
|
|
3835
|
+
set(rpc);
|
|
3836
|
+
};
|
|
3837
|
+
|
|
3806
3838
|
const handleScrollBarCaptureLost = state => {
|
|
3807
3839
|
return {
|
|
3808
3840
|
...state,
|
|
@@ -3995,7 +4027,7 @@ const createExtensionManagementWorkerRpc = async () => {
|
|
|
3995
4027
|
const initializeExtensionManagementWorker = async () => {
|
|
3996
4028
|
try {
|
|
3997
4029
|
const rpc = await createExtensionManagementWorkerRpc();
|
|
3998
|
-
set$
|
|
4030
|
+
set$4(rpc);
|
|
3999
4031
|
} catch {
|
|
4000
4032
|
// ignore
|
|
4001
4033
|
}
|
|
@@ -4006,7 +4038,7 @@ const initialize = async () => {
|
|
|
4006
4038
|
};
|
|
4007
4039
|
|
|
4008
4040
|
const installAnotherVersion = async state => {
|
|
4009
|
-
await invoke$
|
|
4041
|
+
await invoke$4('ConfirmPrompt.prompt', 'not implemented', undefined);
|
|
4010
4042
|
return state;
|
|
4011
4043
|
};
|
|
4012
4044
|
|
|
@@ -4957,14 +4989,20 @@ const applyRender = (oldState, newState, diffResult) => {
|
|
|
4957
4989
|
return commands;
|
|
4958
4990
|
};
|
|
4959
4991
|
|
|
4960
|
-
const render3 = (uid, diffResult) => {
|
|
4992
|
+
const render3 = async (uid, diffResult) => {
|
|
4961
4993
|
const {
|
|
4962
4994
|
newState,
|
|
4963
4995
|
oldState
|
|
4964
4996
|
} = get(uid);
|
|
4965
|
-
set(uid, newState, newState);
|
|
4997
|
+
set$1(uid, newState, newState);
|
|
4966
4998
|
const commands = applyRender(oldState, newState, diffResult);
|
|
4967
|
-
|
|
4999
|
+
if (!isConnected()) {
|
|
5000
|
+
return commands;
|
|
5001
|
+
}
|
|
5002
|
+
const rendererWorkerCommands = commands.filter(command => command[0] === SetFocusContext);
|
|
5003
|
+
const rendererProcessCommands = commands.filter(command => command[0] !== SetFocusContext);
|
|
5004
|
+
const transactionId = await invoke('Viewlet.queueCommands', uid, rendererProcessCommands);
|
|
5005
|
+
return [...rendererWorkerCommands, ['Viewlet.commitPending', uid, transactionId]];
|
|
4968
5006
|
};
|
|
4969
5007
|
|
|
4970
5008
|
const getIconVirtualDom = (icon, type = Div) => {
|
|
@@ -5225,6 +5263,7 @@ const commandMap = {
|
|
|
5225
5263
|
'SearchExtensions.handleInput': wrapAsyncCommand(handleInputWithContext),
|
|
5226
5264
|
'SearchExtensions.handleInputFocus': wrapCommand(handleInputFocus),
|
|
5227
5265
|
'SearchExtensions.handleInstall': wrapCommand(handleInstall),
|
|
5266
|
+
'SearchExtensions.handleMessagePort': handleMessagePort,
|
|
5228
5267
|
'SearchExtensions.handleScrollBarCaptureLost': wrapCommand(handleScrollBarCaptureLost),
|
|
5229
5268
|
'SearchExtensions.handleScrollBarClick': wrapCommand(handleScrollBarClick),
|
|
5230
5269
|
'SearchExtensions.handleScrollBarMove': wrapCommand(handleScrollBarMove),
|
|
@@ -5258,12 +5297,12 @@ const listen = async () => {
|
|
|
5258
5297
|
const rpc = await create$4({
|
|
5259
5298
|
commandMap: commandMap
|
|
5260
5299
|
});
|
|
5261
|
-
set$
|
|
5300
|
+
set$2(rpc);
|
|
5262
5301
|
const dialogRpc = await create$5({
|
|
5263
5302
|
commandMap: {},
|
|
5264
5303
|
send: sendMessagePortToDialogWorker
|
|
5265
5304
|
});
|
|
5266
|
-
set$
|
|
5305
|
+
set$5(dialogRpc);
|
|
5267
5306
|
};
|
|
5268
5307
|
|
|
5269
5308
|
const main = async () => {
|