@lvce-editor/extension-search-view 7.12.0 → 7.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.
|
@@ -1368,27 +1368,26 @@ const SetDom2 = 'Viewlet.setDom2';
|
|
|
1368
1368
|
const SetPatches = 'Viewlet.setPatches';
|
|
1369
1369
|
|
|
1370
1370
|
const {
|
|
1371
|
-
invoke: invoke$
|
|
1371
|
+
invoke: invoke$2,
|
|
1372
1372
|
set: set$5
|
|
1373
1373
|
} = create$3(DialogWorker);
|
|
1374
1374
|
|
|
1375
1375
|
const {
|
|
1376
|
-
invoke: invoke$2,
|
|
1377
1376
|
set: set$4
|
|
1378
1377
|
} = create$3(ExtensionHostWorker);
|
|
1379
1378
|
|
|
1380
1379
|
const ExtensionHost = {
|
|
1381
1380
|
__proto__: null,
|
|
1382
|
-
invoke: invoke$2,
|
|
1383
1381
|
set: set$4
|
|
1384
1382
|
};
|
|
1385
1383
|
|
|
1386
1384
|
const {
|
|
1385
|
+
invoke: invoke$1,
|
|
1387
1386
|
set: set$3
|
|
1388
1387
|
} = create$3(ExtensionManagementWorker);
|
|
1389
1388
|
|
|
1390
1389
|
const {
|
|
1391
|
-
invoke
|
|
1390
|
+
invoke,
|
|
1392
1391
|
invokeAndTransfer,
|
|
1393
1392
|
set: set$2
|
|
1394
1393
|
} = create$3(RendererWorker);
|
|
@@ -1397,40 +1396,40 @@ const showContextMenu2 = async (uid, menuId, x, y, args) => {
|
|
|
1397
1396
|
number(menuId);
|
|
1398
1397
|
number(x);
|
|
1399
1398
|
number(y);
|
|
1400
|
-
await invoke
|
|
1399
|
+
await invoke('ContextMenu.show2', uid, menuId, x, y, args);
|
|
1401
1400
|
};
|
|
1402
1401
|
const sendMessagePortToDialogWorker = async port => {
|
|
1403
1402
|
const command = 'HandleMessagePort.handleMessagePort';
|
|
1404
1403
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToDialogWorker', port, command);
|
|
1405
1404
|
};
|
|
1406
1405
|
const disableExtension = async id => {
|
|
1407
|
-
return invoke
|
|
1406
|
+
return invoke('ExtensionManagement.disable', id);
|
|
1408
1407
|
};
|
|
1409
1408
|
const enableExtension = async id => {
|
|
1410
|
-
return invoke
|
|
1409
|
+
return invoke('ExtensionManagement.enable', id);
|
|
1411
1410
|
};
|
|
1412
1411
|
const sendMessagePortToExtensionHostWorker$1 = async (port, rpcId = 0) => {
|
|
1413
1412
|
const command = 'HandleMessagePort.handleMessagePort2';
|
|
1414
1413
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker', port, command, rpcId);
|
|
1415
1414
|
};
|
|
1416
1415
|
const writeClipBoardText = async text => {
|
|
1417
|
-
await invoke
|
|
1416
|
+
await invoke('ClipBoard.writeText', /* text */text);
|
|
1418
1417
|
};
|
|
1419
1418
|
const sendMessagePortToExtensionManagementWorker = async (port, rpcId) => {
|
|
1420
1419
|
const command = 'Extensions.handleMessagePort';
|
|
1421
1420
|
await invokeAndTransfer('SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionManagementWorker', port, command, rpcId);
|
|
1422
1421
|
};
|
|
1423
1422
|
const openUri$1 = async (uri, focus, options) => {
|
|
1424
|
-
await invoke
|
|
1423
|
+
await invoke('Main.openUri', uri, focus, options);
|
|
1425
1424
|
};
|
|
1426
1425
|
const showErrorDialog = async errorInfo => {
|
|
1427
|
-
await invoke
|
|
1426
|
+
await invoke('ErrorHandling.showErrorDialog', errorInfo);
|
|
1428
1427
|
};
|
|
1429
1428
|
const uninstallExtension = async id => {
|
|
1430
|
-
return invoke
|
|
1429
|
+
return invoke('ExtensionManagement.uninstall', id);
|
|
1431
1430
|
};
|
|
1432
1431
|
const installExtension = async id => {
|
|
1433
|
-
return invoke
|
|
1432
|
+
return invoke('ExtensionManagement.install', id);
|
|
1434
1433
|
};
|
|
1435
1434
|
|
|
1436
1435
|
const toCommandId = key => {
|
|
@@ -2551,12 +2550,12 @@ const diff2 = uid => {
|
|
|
2551
2550
|
};
|
|
2552
2551
|
|
|
2553
2552
|
const disable$1 = async (state, _id) => {
|
|
2554
|
-
await invoke$
|
|
2553
|
+
await invoke$2('ConfirmPrompt.prompt', 'not implemented', undefined);
|
|
2555
2554
|
return state;
|
|
2556
2555
|
};
|
|
2557
2556
|
|
|
2558
2557
|
const disableWorkspace = async (state, _id) => {
|
|
2559
|
-
await invoke$
|
|
2558
|
+
await invoke$2('ConfirmPrompt.prompt', 'not implemented', undefined);
|
|
2560
2559
|
return state;
|
|
2561
2560
|
};
|
|
2562
2561
|
|
|
@@ -2566,12 +2565,12 @@ const dispose = uid => {
|
|
|
2566
2565
|
};
|
|
2567
2566
|
|
|
2568
2567
|
const enable$1 = async (state, _id) => {
|
|
2569
|
-
await invoke$
|
|
2568
|
+
await invoke$2('ConfirmPrompt.prompt', 'not implemented', undefined);
|
|
2570
2569
|
return state;
|
|
2571
2570
|
};
|
|
2572
2571
|
|
|
2573
2572
|
const enableWorkspace = async (state, _id) => {
|
|
2574
|
-
await invoke$
|
|
2573
|
+
await invoke$2('ConfirmPrompt.prompt', 'not implemented', undefined);
|
|
2575
2574
|
return state;
|
|
2576
2575
|
};
|
|
2577
2576
|
|
|
@@ -3758,7 +3757,6 @@ const createExtensionHostWorkerRpc = async () => {
|
|
|
3758
3757
|
};
|
|
3759
3758
|
|
|
3760
3759
|
const {
|
|
3761
|
-
invoke,
|
|
3762
3760
|
set
|
|
3763
3761
|
} = ExtensionHost;
|
|
3764
3762
|
|
|
@@ -3793,7 +3791,7 @@ const initialize = async () => {
|
|
|
3793
3791
|
};
|
|
3794
3792
|
|
|
3795
3793
|
const installAnotherVersion = async state => {
|
|
3796
|
-
await invoke$
|
|
3794
|
+
await invoke$2('ConfirmPrompt.prompt', 'not implemented', undefined);
|
|
3797
3795
|
return state;
|
|
3798
3796
|
};
|
|
3799
3797
|
|
|
@@ -3801,21 +3799,19 @@ const Web = 1;
|
|
|
3801
3799
|
const Electron = 2;
|
|
3802
3800
|
const Remote = 3;
|
|
3803
3801
|
|
|
3804
|
-
const getAllExtensions$1 = async platform => {
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
} catch {
|
|
3802
|
+
const getAllExtensions$1 = async (assetDir, platform) => {
|
|
3803
|
+
try {
|
|
3804
|
+
return await invoke$1('Extensions.getAllExtensions', assetDir, platform);
|
|
3805
|
+
} catch (error) {
|
|
3806
|
+
if (platform === Web) {
|
|
3810
3807
|
return [];
|
|
3811
3808
|
}
|
|
3809
|
+
throw error;
|
|
3812
3810
|
}
|
|
3813
|
-
// @ts-ignore todo
|
|
3814
|
-
return invoke$1('ExtensionManagement.getAllExtensions');
|
|
3815
3811
|
};
|
|
3816
3812
|
|
|
3817
|
-
const getAllExtensions = platform => {
|
|
3818
|
-
return getAllExtensions$1(platform);
|
|
3813
|
+
const getAllExtensions = (assetDir, platform) => {
|
|
3814
|
+
return getAllExtensions$1(assetDir, platform);
|
|
3819
3815
|
};
|
|
3820
3816
|
|
|
3821
3817
|
const Small = 1;
|
|
@@ -4051,7 +4047,7 @@ const loadContentWithContext = async (context, savedState) => {
|
|
|
4051
4047
|
size
|
|
4052
4048
|
};
|
|
4053
4049
|
});
|
|
4054
|
-
const allExtensions = await getAllExtensions(platform);
|
|
4050
|
+
const allExtensions = await getAllExtensions(assetDir, platform);
|
|
4055
4051
|
const normalized = normalizeExtensions(allExtensions, platform, assetDir);
|
|
4056
4052
|
await context.updateState(state => ({
|
|
4057
4053
|
...state,
|
|
@@ -4659,6 +4655,13 @@ const getNoExtensionsFoundVirtualDom = message => {
|
|
|
4659
4655
|
return [noExtensionsFoundNode, text(message)];
|
|
4660
4656
|
};
|
|
4661
4657
|
|
|
4658
|
+
const scrollBarNode = {
|
|
4659
|
+
childCount: 1,
|
|
4660
|
+
className: mergeClassNames(ScrollBar, ScrollBarSmall),
|
|
4661
|
+
onPointerDown: HandleScrollBarPointerDown,
|
|
4662
|
+
// TODO support pointercapture event
|
|
4663
|
+
type: Div
|
|
4664
|
+
};
|
|
4662
4665
|
const scrollBarThumbNode = {
|
|
4663
4666
|
childCount: 0,
|
|
4664
4667
|
className: ScrollBarThumb,
|
|
@@ -4669,13 +4672,7 @@ const getScrollBarVirtualDom = (scrollBarHeight, scrollBarTop) => {
|
|
|
4669
4672
|
if (!shouldShowScrollbar) {
|
|
4670
4673
|
return [];
|
|
4671
4674
|
}
|
|
4672
|
-
return [
|
|
4673
|
-
childCount: 1,
|
|
4674
|
-
className: mergeClassNames(ScrollBar, ScrollBarSmall),
|
|
4675
|
-
onPointerDown: HandleScrollBarPointerDown,
|
|
4676
|
-
// TODO support pointercapture event
|
|
4677
|
-
type: Div
|
|
4678
|
-
}, scrollBarThumbNode];
|
|
4675
|
+
return [scrollBarNode, scrollBarThumbNode];
|
|
4679
4676
|
};
|
|
4680
4677
|
|
|
4681
4678
|
const getVisibleItem = (item, setSize, itemHeight, minLineY, relative, i, focusedIndex) => {
|
|
@@ -4730,15 +4727,24 @@ const getVisible = state => {
|
|
|
4730
4727
|
return visible;
|
|
4731
4728
|
};
|
|
4732
4729
|
|
|
4730
|
+
const contentNode = {
|
|
4731
|
+
childCount: 2,
|
|
4732
|
+
className: mergeClassNames(Viewlet, List),
|
|
4733
|
+
type: Div
|
|
4734
|
+
};
|
|
4735
|
+
const extensionsNode = {
|
|
4736
|
+
ariaBusy: false,
|
|
4737
|
+
ariaLive: 'polite',
|
|
4738
|
+
childCount: 2,
|
|
4739
|
+
className: mergeClassNames(Viewlet, Extensions),
|
|
4740
|
+
role: None$3,
|
|
4741
|
+
type: Div
|
|
4742
|
+
};
|
|
4733
4743
|
const getContentVirtualDom = (visibleExtensions, message, scrollBarHeight, scrollBarY, focusOutline) => {
|
|
4734
4744
|
if (message) {
|
|
4735
4745
|
return getNoExtensionsFoundVirtualDom(message);
|
|
4736
4746
|
}
|
|
4737
|
-
return [
|
|
4738
|
-
childCount: 2,
|
|
4739
|
-
className: mergeClassNames(Viewlet, List),
|
|
4740
|
-
type: Div
|
|
4741
|
-
}, ...getExtensionsVirtualDom(visibleExtensions, focusOutline), ...getScrollBarVirtualDom(scrollBarHeight)];
|
|
4747
|
+
return [contentNode, ...getExtensionsVirtualDom(visibleExtensions, focusOutline), ...getScrollBarVirtualDom(scrollBarHeight)];
|
|
4742
4748
|
};
|
|
4743
4749
|
const getExtensionsViewVirtualDom = state => {
|
|
4744
4750
|
const visibleExtensions = getVisible(state);
|
|
@@ -4755,14 +4761,7 @@ const getExtensionsViewVirtualDom = state => {
|
|
|
4755
4761
|
suggestOpen
|
|
4756
4762
|
} = state;
|
|
4757
4763
|
const focusOutline = focusedIndex === -1 && focus === List$2;
|
|
4758
|
-
return [
|
|
4759
|
-
ariaBusy: false,
|
|
4760
|
-
ariaLive: 'polite',
|
|
4761
|
-
childCount: 2,
|
|
4762
|
-
className: mergeClassNames(Viewlet, Extensions),
|
|
4763
|
-
role: None$3,
|
|
4764
|
-
type: Div
|
|
4765
|
-
}, ...getExtensionHeaderVirtualDom(placeholder, inputActions, completionItems, completionFocusedIndex, suggestOpen), ...getContentVirtualDom(visibleExtensions, message, scrollBarHeight, scrollBarY, focusOutline)];
|
|
4764
|
+
return [extensionsNode, ...getExtensionHeaderVirtualDom(placeholder, inputActions, completionItems, completionFocusedIndex, suggestOpen), ...getContentVirtualDom(visibleExtensions, message, scrollBarHeight, scrollBarY, focusOutline)];
|
|
4766
4765
|
};
|
|
4767
4766
|
|
|
4768
4767
|
const renderItems2 = newState => {
|