@lvce-editor/renderer-process 8.1.0 → 8.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 +39 -26
- package/package.json +1 -1
|
@@ -461,6 +461,9 @@ const getPlatform = () => {
|
|
|
461
461
|
if (globalThis.isElectron) {
|
|
462
462
|
return Electron$1;
|
|
463
463
|
}
|
|
464
|
+
if (typeof location !== 'undefined' && location.search === '?web') {
|
|
465
|
+
return Web;
|
|
466
|
+
}
|
|
464
467
|
return Remote;
|
|
465
468
|
};
|
|
466
469
|
const platform = getPlatform();
|
|
@@ -881,8 +884,6 @@ const unhandleIpc = ipc => {
|
|
|
881
884
|
}
|
|
882
885
|
};
|
|
883
886
|
|
|
884
|
-
const isElectron = platform === Electron$1;
|
|
885
|
-
|
|
886
887
|
const MessagePort$2 = 1;
|
|
887
888
|
const ModuleWorker$1 = 2;
|
|
888
889
|
const ReferencePort = 3;
|
|
@@ -1026,8 +1027,18 @@ const assetDir = getAssetDir();
|
|
|
1026
1027
|
|
|
1027
1028
|
const rendererWorkerUrl = `${assetDir}/packages/renderer-worker/src/rendererWorkerMain.ts`;
|
|
1028
1029
|
|
|
1030
|
+
const getName = platform => {
|
|
1031
|
+
switch (platform) {
|
|
1032
|
+
case Electron$1:
|
|
1033
|
+
return 'Renderer Worker (Electron)';
|
|
1034
|
+
case Web:
|
|
1035
|
+
return 'Renderer Worker (Web)';
|
|
1036
|
+
default:
|
|
1037
|
+
return 'Renderer Worker';
|
|
1038
|
+
}
|
|
1039
|
+
};
|
|
1029
1040
|
const launchRendererWorker = async () => {
|
|
1030
|
-
const name =
|
|
1041
|
+
const name = getName(platform);
|
|
1031
1042
|
return launchWorker({
|
|
1032
1043
|
name,
|
|
1033
1044
|
url: rendererWorkerUrl
|
|
@@ -2809,7 +2820,7 @@ const FocusSimpleBrowserInput = 23;
|
|
|
2809
2820
|
const FocusOutput = 28;
|
|
2810
2821
|
|
|
2811
2822
|
const handleBlur$9 = () => {
|
|
2812
|
-
send(
|
|
2823
|
+
send(/* EditorRename.abort */'EditorRename.abort');
|
|
2813
2824
|
};
|
|
2814
2825
|
const create$G = (x, y) => {
|
|
2815
2826
|
const $RenameWidgetInputBox = create$H();
|
|
@@ -3182,7 +3193,7 @@ const handleNotificationClick = event => {
|
|
|
3182
3193
|
switch ($Target.className) {
|
|
3183
3194
|
case 'NotificationOption':
|
|
3184
3195
|
const index = findIndex$1($Target);
|
|
3185
|
-
send(
|
|
3196
|
+
send(/* Notification.handleClick */'Notification.handleClick', /* index */index);
|
|
3186
3197
|
break;
|
|
3187
3198
|
}
|
|
3188
3199
|
};
|
|
@@ -3335,7 +3346,7 @@ const handleMouseDown$3 = event => {
|
|
|
3335
3346
|
}
|
|
3336
3347
|
preventDefault(event);
|
|
3337
3348
|
const level = getLevel($Menu);
|
|
3338
|
-
send(
|
|
3349
|
+
send(/* Menu.handleClick */'Menu.selectIndex', /* level */level, /* index */index);
|
|
3339
3350
|
};
|
|
3340
3351
|
|
|
3341
3352
|
// const handleKeyDown = (event) => {
|
|
@@ -3380,7 +3391,7 @@ const handleMouseEnter$1 = event => {
|
|
|
3380
3391
|
return;
|
|
3381
3392
|
}
|
|
3382
3393
|
const level = getLevel($Menu);
|
|
3383
|
-
send(
|
|
3394
|
+
send(/* Menu.handleMouseEnter */'Menu.handleMouseEnter', /* level */level, /* index */index, /* x */clientX, /* y */clientY, /* timeStamp */timeStamp);
|
|
3384
3395
|
};
|
|
3385
3396
|
const handleMouseLeave$1 = event => {
|
|
3386
3397
|
const $RelatedTarget = event.relatedTarget;
|
|
@@ -3442,7 +3453,7 @@ const focusIndex = (level, oldFocusedIndex, newFocusedIndex) => {
|
|
|
3442
3453
|
const handleBackDropMouseDown = event => {
|
|
3443
3454
|
preventDefault(event);
|
|
3444
3455
|
stopPropagation(event);
|
|
3445
|
-
send(
|
|
3456
|
+
send(/* Menu.hide */'Menu.hide');
|
|
3446
3457
|
};
|
|
3447
3458
|
const handleContextMenu$c = event => {
|
|
3448
3459
|
preventDefault(event);
|
|
@@ -4927,7 +4938,7 @@ const close = () => {
|
|
|
4927
4938
|
// window.close()
|
|
4928
4939
|
};
|
|
4929
4940
|
const sendVisibilityChangeHint = () => {
|
|
4930
|
-
send(
|
|
4941
|
+
send(/* SaveState.handleVisibilityChange */'SaveState.handleVisibilityChange', /* visibilityState */'hidden');
|
|
4931
4942
|
};
|
|
4932
4943
|
const handleBeforeUnload = () => {
|
|
4933
4944
|
sendVisibilityChangeHint();
|
|
@@ -5167,6 +5178,18 @@ const joinLines = lines => {
|
|
|
5167
5178
|
const splitLines = lines => {
|
|
5168
5179
|
return lines.split(NewLine$1);
|
|
5169
5180
|
};
|
|
5181
|
+
const isModuleNotFoundMessage = line => {
|
|
5182
|
+
return line.includes('[ERR_MODULE_NOT_FOUND]');
|
|
5183
|
+
};
|
|
5184
|
+
const getModuleNotFoundError = stderr => {
|
|
5185
|
+
const lines = splitLines(stderr);
|
|
5186
|
+
const messageIndex = lines.findIndex(isModuleNotFoundMessage);
|
|
5187
|
+
const message = lines[messageIndex];
|
|
5188
|
+
return {
|
|
5189
|
+
message,
|
|
5190
|
+
code: ERR_MODULE_NOT_FOUND
|
|
5191
|
+
};
|
|
5192
|
+
};
|
|
5170
5193
|
const RE_NATIVE_MODULE_ERROR = /^innerError Error: Cannot find module '.*.node'/;
|
|
5171
5194
|
const RE_NATIVE_MODULE_ERROR_2 = /was compiled against a different Node.js version/;
|
|
5172
5195
|
const RE_MESSAGE_CODE_BLOCK_START = /^Error: The module '.*'$/;
|
|
@@ -5215,18 +5238,6 @@ const isModuleNotFoundError = stderr => {
|
|
|
5215
5238
|
}
|
|
5216
5239
|
return stderr.includes('ERR_MODULE_NOT_FOUND');
|
|
5217
5240
|
};
|
|
5218
|
-
const isModuleNotFoundMessage = line => {
|
|
5219
|
-
return line.includes('ERR_MODULE_NOT_FOUND');
|
|
5220
|
-
};
|
|
5221
|
-
const getModuleNotFoundError = stderr => {
|
|
5222
|
-
const lines = splitLines(stderr);
|
|
5223
|
-
const messageIndex = lines.findIndex(isModuleNotFoundMessage);
|
|
5224
|
-
const message = lines[messageIndex];
|
|
5225
|
-
return {
|
|
5226
|
-
message,
|
|
5227
|
-
code: ERR_MODULE_NOT_FOUND
|
|
5228
|
-
};
|
|
5229
|
-
};
|
|
5230
5241
|
const isNormalStackLine = line => {
|
|
5231
5242
|
return RE_AT.test(line) && !RE_AT_PROMISE_INDEX.test(line);
|
|
5232
5243
|
};
|
|
@@ -5837,6 +5848,8 @@ const handleIpcOnce = ipc => {
|
|
|
5837
5848
|
}
|
|
5838
5849
|
};
|
|
5839
5850
|
|
|
5851
|
+
const isElectron = platform === Electron$1;
|
|
5852
|
+
|
|
5840
5853
|
// TODO use handleIncomingIpc function
|
|
5841
5854
|
const create$x = async ({
|
|
5842
5855
|
port,
|
|
@@ -6212,7 +6225,7 @@ const create$Button = (label, icon) => {
|
|
|
6212
6225
|
};
|
|
6213
6226
|
|
|
6214
6227
|
const handleClick$8 = index => {
|
|
6215
|
-
send(
|
|
6228
|
+
send(/* Dialog.handleClick */'Dialog.handleClick', /* index */index);
|
|
6216
6229
|
};
|
|
6217
6230
|
|
|
6218
6231
|
const handleClick$7 = event => {
|
|
@@ -7949,9 +7962,9 @@ const handleLocationsMouseDown = event => {
|
|
|
7949
7962
|
const $Target = event.target;
|
|
7950
7963
|
if ($Target.classList.contains('TreeItem')) {
|
|
7951
7964
|
const index = getNodeIndex($Target);
|
|
7952
|
-
send(
|
|
7965
|
+
send(/* ViewletLocations.selectIndex */'Locations.selectIndex', /* index */index);
|
|
7953
7966
|
} else if ($Target.classList.contains('LocationList')) {
|
|
7954
|
-
send(
|
|
7967
|
+
send(/* ViewletLocations.focusIndex */'Locations.focusIndex', /* index */-1);
|
|
7955
7968
|
}
|
|
7956
7969
|
};
|
|
7957
7970
|
|
|
@@ -8521,7 +8534,7 @@ const isMatchingKeyBinding = (identifiers, identifier) => {
|
|
|
8521
8534
|
};
|
|
8522
8535
|
|
|
8523
8536
|
const handleMatchingKeyBinding = identifier => {
|
|
8524
|
-
send(
|
|
8537
|
+
send(/* KeyBindings.handleKeyBinding */'KeyBindings.handleKeyBinding', /* keyBinding */identifier);
|
|
8525
8538
|
};
|
|
8526
8539
|
const handleKeyDown$2 = event => {
|
|
8527
8540
|
const identifier = getKeyBindingIdentifier(event);
|
|
@@ -10670,7 +10683,7 @@ const closeMenu = (state, unFocusIndex, index) => {
|
|
|
10670
10683
|
if (index !== -1) {
|
|
10671
10684
|
$Viewlet.children[index].focus();
|
|
10672
10685
|
}
|
|
10673
|
-
hide(
|
|
10686
|
+
hide(/* restoreFocus */false);
|
|
10674
10687
|
$Viewlet.removeEventListener('mouseenter', handlePointerOver, {
|
|
10675
10688
|
capture: true
|
|
10676
10689
|
});
|