@lvce-editor/renderer-process 30.81.3 → 30.81.5
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 +15 -6
- package/package.json +1 -1
|
@@ -2360,6 +2360,12 @@ const prepareErrorMessageWithoutCodeFrame = async error => {
|
|
|
2360
2360
|
return error;
|
|
2361
2361
|
}
|
|
2362
2362
|
};
|
|
2363
|
+
const getStackSuffix = (error, separator) => {
|
|
2364
|
+
if (!error.stack) {
|
|
2365
|
+
return '';
|
|
2366
|
+
}
|
|
2367
|
+
return `${separator}${error.stack}`;
|
|
2368
|
+
};
|
|
2363
2369
|
const prepare = async error => {
|
|
2364
2370
|
if (error && error.message && error.codeFrame) {
|
|
2365
2371
|
return prepareErrorMessageWithCodeFrame(error);
|
|
@@ -2380,15 +2386,18 @@ const print = (error$1, prefix = '') => {
|
|
|
2380
2386
|
return;
|
|
2381
2387
|
}
|
|
2382
2388
|
if (error$1 && error$1.type && error$1.message && error$1.codeFrame) {
|
|
2383
|
-
|
|
2389
|
+
const stack = getStackSuffix(error$1, '\n\n');
|
|
2390
|
+
error(`${prefix}${error$1.type}: ${error$1.message}\n\n${error$1.codeFrame}${stack}`);
|
|
2384
2391
|
return;
|
|
2385
2392
|
}
|
|
2386
2393
|
if (error$1 && error$1.message && error$1.codeFrame) {
|
|
2387
|
-
|
|
2394
|
+
const stack = getStackSuffix(error$1, '\n\n');
|
|
2395
|
+
error(`${prefix}${error$1.message}\n\n${error$1.codeFrame}${stack}`);
|
|
2388
2396
|
return;
|
|
2389
2397
|
}
|
|
2390
2398
|
if (error$1 && error$1.type && error$1.message) {
|
|
2391
|
-
|
|
2399
|
+
const stack = getStackSuffix(error$1, '\n');
|
|
2400
|
+
error(`${prefix}${error$1.type}: ${error$1.message}${stack}`);
|
|
2392
2401
|
return;
|
|
2393
2402
|
}
|
|
2394
2403
|
if (error$1 && error$1.stack) {
|
|
@@ -9088,7 +9097,7 @@ const handleBackDropMouseDown = event => {
|
|
|
9088
9097
|
const handleContextMenu$1 = event => {
|
|
9089
9098
|
preventDefault(event);
|
|
9090
9099
|
};
|
|
9091
|
-
const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom = [], mouseBlocking = false) => {
|
|
9100
|
+
const showMenu = async (x, y, width, height, items, level, parentIndex = -1, dom = [], mouseBlocking = false) => {
|
|
9092
9101
|
if (mouseBlocking && !state$6.$BackDrop) {
|
|
9093
9102
|
const $BackDrop = create$BackDrop();
|
|
9094
9103
|
$BackDrop.onmousedown = handleBackDropMouseDown;
|
|
@@ -9099,7 +9108,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom = [],
|
|
|
9099
9108
|
}
|
|
9100
9109
|
const $Menu = create$Menu$1();
|
|
9101
9110
|
renderInto($Menu, dom);
|
|
9102
|
-
|
|
9111
|
+
setBounds$a($Menu, x, y, width, height);
|
|
9103
9112
|
$Menu.id = `Menu-${level}`;
|
|
9104
9113
|
if (parentIndex !== -1) {
|
|
9105
9114
|
const $ParentMenu = state$6.$$Menus[level - 1];
|
|
@@ -9114,7 +9123,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom = [],
|
|
|
9114
9123
|
append$1($Menu);
|
|
9115
9124
|
if (level === 0) {
|
|
9116
9125
|
focus$6($Menu);
|
|
9117
|
-
|
|
9126
|
+
await invoke$1('Focus.setFocus', FocusMenu);
|
|
9118
9127
|
}
|
|
9119
9128
|
};
|
|
9120
9129
|
const hideSubmenu = level => {
|