@lvce-editor/menu-worker 4.14.2 → 4.14.3
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/menuWorkerMain.js +10 -11
- package/package.json +1 -1
package/dist/menuWorkerMain.js
CHANGED
|
@@ -1403,7 +1403,6 @@ const RendererWorker = 1;
|
|
|
1403
1403
|
const FocusSelector = 'Viewlet.focusSelector';
|
|
1404
1404
|
|
|
1405
1405
|
const {
|
|
1406
|
-
invoke: invoke$3,
|
|
1407
1406
|
set: set$3
|
|
1408
1407
|
} = create$1(RendererProcess);
|
|
1409
1408
|
|
|
@@ -1483,11 +1482,16 @@ const getLatestTimestamp = () => {
|
|
|
1483
1482
|
return state$1.latestTimeStamp;
|
|
1484
1483
|
};
|
|
1485
1484
|
|
|
1485
|
+
const invoke$1 = async (method, ...params) => {
|
|
1486
|
+
// @ts-ignore
|
|
1487
|
+
await invoke$2('WebView.compatRendererProcessInvoke', method, ...params);
|
|
1488
|
+
};
|
|
1489
|
+
|
|
1486
1490
|
const closeSubMenu = async () => {
|
|
1487
1491
|
const menus = getAll();
|
|
1488
1492
|
const parentMenu = menus.at(-1);
|
|
1489
1493
|
// @ts-ignore
|
|
1490
|
-
await invoke$
|
|
1494
|
+
await invoke$1(/* Menu.hideSubMenu */7903, /* parentIndex */parentMenu.focusedIndex);
|
|
1491
1495
|
};
|
|
1492
1496
|
|
|
1493
1497
|
const send = port => {
|
|
@@ -1637,11 +1641,6 @@ const warn = (...args) => {
|
|
|
1637
1641
|
console.warn(...args);
|
|
1638
1642
|
};
|
|
1639
1643
|
|
|
1640
|
-
const invoke$1 = async (method, ...params) => {
|
|
1641
|
-
// @ts-ignore
|
|
1642
|
-
await invoke$2('WebView.compatRendererProcessInvoke', method, ...params);
|
|
1643
|
-
};
|
|
1644
|
-
|
|
1645
1644
|
const state = {
|
|
1646
1645
|
/**
|
|
1647
1646
|
* @type {any}
|
|
@@ -2517,7 +2516,7 @@ const hide = async (restoreFocus = true) => {
|
|
|
2517
2516
|
} = await getMenuHideCommands(restoreFocus);
|
|
2518
2517
|
if (commands.length > 0) {
|
|
2519
2518
|
// @ts-ignore
|
|
2520
|
-
await invoke$
|
|
2519
|
+
await invoke$1(...commands);
|
|
2521
2520
|
}
|
|
2522
2521
|
};
|
|
2523
2522
|
|
|
@@ -2690,7 +2689,7 @@ const focusIndex = async (menu, index) => {
|
|
|
2690
2689
|
}
|
|
2691
2690
|
const oldFocusedIndex = menu.focusedIndex;
|
|
2692
2691
|
menu.focusedIndex = index;
|
|
2693
|
-
await invoke$
|
|
2692
|
+
await invoke$1('Menu.focusIndex', /* level */menu.level, /* oldFocusedIndex */oldFocusedIndex, /* newFocusedIndex */index);
|
|
2694
2693
|
};
|
|
2695
2694
|
|
|
2696
2695
|
const getCurrentMenu = () => {
|
|
@@ -2871,7 +2870,7 @@ const handleContextMenu = state => {
|
|
|
2871
2870
|
const hideSubMenus = async level => {
|
|
2872
2871
|
if (level < getCount()) {
|
|
2873
2872
|
set$1(getAll().slice(0, level + 1));
|
|
2874
|
-
await invoke$
|
|
2873
|
+
await invoke$1('Menu.hideSubMenu', /* level */level + 1);
|
|
2875
2874
|
}
|
|
2876
2875
|
};
|
|
2877
2876
|
|
|
@@ -2926,7 +2925,7 @@ const showSubMenuAtEnter = async (level, index, enterX, enterY) => {
|
|
|
2926
2925
|
const height = getMenuHeight(subMenuItems);
|
|
2927
2926
|
const visible = getVisible(subMenu.items, -1, false, subMenu.level);
|
|
2928
2927
|
const dom = getMenuVirtualDom(visible).slice(1);
|
|
2929
|
-
await invoke$
|
|
2928
|
+
await invoke$1(/* Menu.showMenu */'Menu.showMenu', /* x */subMenu.x, /* y */subMenu.y, /* width */width, /* height */height, /* items */subMenu.items, /* level */subMenu.level, /* parentIndex */index, /* dom */dom);
|
|
2930
2929
|
};
|
|
2931
2930
|
const showSubMenu = async (level, index) => {
|
|
2932
2931
|
return showSubMenuAtEnter(level, index, -1, -1);
|