@lvce-editor/title-bar-worker 3.6.0 → 3.7.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.
@@ -1236,6 +1236,26 @@ const {
1236
1236
  invoke,
1237
1237
  set: set$1
1238
1238
  } = create$2(RendererWorker);
1239
+ const showContextMenu2 = async (uid, menuId, x, y, args) => {
1240
+ number(uid);
1241
+ number(menuId);
1242
+ number(x);
1243
+ number(y);
1244
+ // @ts-ignore
1245
+ await invoke('ContextMenu.show2', uid, menuId, x, y, args);
1246
+ };
1247
+ const minimizeWindow = async () => {
1248
+ // @ts-ignore
1249
+ return invoke('ElectronWindow.minimize');
1250
+ };
1251
+ const maximizeWindow = async () => {
1252
+ // @ts-ignore
1253
+ return invoke('ElectronWindow.maximize');
1254
+ };
1255
+ const closeWindow = async () => {
1256
+ // @ts-ignore
1257
+ return invoke('ElectronWindow.close');
1258
+ };
1239
1259
 
1240
1260
  const toCommandId = key => {
1241
1261
  const dotIndex = key.indexOf('.');
@@ -2457,13 +2477,13 @@ const getKeyBindings = () => {
2457
2477
  };
2458
2478
 
2459
2479
  const maximize = async () => {
2460
- await invoke('ElectronWindow.maximize');
2480
+ await maximizeWindow();
2461
2481
  };
2462
2482
  const minimize = async () => {
2463
- await invoke('ElectronWindow.minimize');
2483
+ await minimizeWindow();
2464
2484
  };
2465
2485
  const close = async () => {
2466
- await invoke('ElectronWindow.close');
2486
+ await closeWindow();
2467
2487
  };
2468
2488
 
2469
2489
  const handleClickClose = async state => {
@@ -2497,8 +2517,7 @@ const handleClick$1 = async (state, className) => {
2497
2517
  };
2498
2518
 
2499
2519
  const show2 = async (uid, menuId, x, y, args) => {
2500
- // @ts-ignore
2501
- await invoke('ContextMenu.show2', uid, menuId, x, y, args);
2520
+ await showContextMenu2(uid, menuId, x, y, args);
2502
2521
  };
2503
2522
 
2504
2523
  const handleContextMenu = async (state, button, eventX, eventY) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/title-bar-worker",
3
- "version": "3.6.0",
3
+ "version": "3.7.0",
4
4
  "description": "Title Bar Worker",
5
5
  "repository": {
6
6
  "type": "git",