@lvce-editor/renderer-process 24.1.0 → 24.3.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/rendererProcessMain.js +21 -8
- package/package.json +1 -1
|
@@ -304,9 +304,18 @@ const unwrapItemString = async item => {
|
|
|
304
304
|
};
|
|
305
305
|
const unwrapItemFile = async item => {
|
|
306
306
|
// @ts-ignore
|
|
307
|
-
|
|
307
|
+
if (item.getAsFileSystemHandle) {
|
|
308
|
+
// @ts-ignore
|
|
309
|
+
const file = await item.getAsFileSystemHandle();
|
|
310
|
+
return {
|
|
311
|
+
kind: 'file',
|
|
312
|
+
type: item.type,
|
|
313
|
+
value: file
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
const file = item.getAsFile();
|
|
308
317
|
return {
|
|
309
|
-
kind: 'file',
|
|
318
|
+
kind: 'file-legacy',
|
|
310
319
|
type: item.type,
|
|
311
320
|
value: file
|
|
312
321
|
};
|
|
@@ -3549,6 +3558,10 @@ const handleBackDropMouseDown = event => {
|
|
|
3549
3558
|
preventDefault(event);
|
|
3550
3559
|
stopPropagation(event);
|
|
3551
3560
|
send(/* Menu.hide */'Menu.hide');
|
|
3561
|
+
if (state$3.$BackDrop) {
|
|
3562
|
+
remove$1(state$3.$BackDrop);
|
|
3563
|
+
state$3.$BackDrop = undefined;
|
|
3564
|
+
}
|
|
3552
3565
|
};
|
|
3553
3566
|
const handleContextMenu$8 = event => {
|
|
3554
3567
|
preventDefault(event);
|
|
@@ -3587,6 +3600,11 @@ const hideSubMenu = level => {
|
|
|
3587
3600
|
for (const $ChildMenu of $$ChildMenus) {
|
|
3588
3601
|
remove$1($ChildMenu);
|
|
3589
3602
|
}
|
|
3603
|
+
state$3.$$Menus = state$3.$$Menus.slice(0, level);
|
|
3604
|
+
if (state$3.$$Menus.length === 0 && state$3.$BackDrop) {
|
|
3605
|
+
remove$1(state$3.$BackDrop);
|
|
3606
|
+
state$3.$BackDrop = undefined;
|
|
3607
|
+
}
|
|
3590
3608
|
};
|
|
3591
3609
|
|
|
3592
3610
|
// export const showSubMenu = (level, items, parentIndex) => {
|
|
@@ -10017,11 +10035,6 @@ const getIsFirefox = () => {
|
|
|
10017
10035
|
return navigator.userAgent.toLowerCase().includes('firefox');
|
|
10018
10036
|
};
|
|
10019
10037
|
|
|
10020
|
-
/**
|
|
10021
|
-
* @type {boolean}
|
|
10022
|
-
*/
|
|
10023
|
-
const isFirefox = getIsFirefox();
|
|
10024
|
-
|
|
10025
10038
|
const getErrorMessage = error => {
|
|
10026
10039
|
if (!error) {
|
|
10027
10040
|
return `Error: ${error}`;
|
|
@@ -10119,7 +10132,7 @@ const prepare = async error => {
|
|
|
10119
10132
|
return error;
|
|
10120
10133
|
};
|
|
10121
10134
|
const print = (error$1, prefix = '') => {
|
|
10122
|
-
if (
|
|
10135
|
+
if (getIsFirefox()) {
|
|
10123
10136
|
// Firefox does not support printing codeframe with error stack
|
|
10124
10137
|
if (error$1 && error$1._error) {
|
|
10125
10138
|
error(`${prefix}${error$1._error}`);
|