@lvce-editor/renderer-process 30.68.12 → 30.68.14
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 +28 -9
- package/package.json +1 -1
|
@@ -3215,9 +3215,9 @@ const set$c = (viewletId, instance) => {
|
|
|
3215
3215
|
};
|
|
3216
3216
|
|
|
3217
3217
|
const getEventListenerOptions = (eventName, value) => {
|
|
3218
|
-
if (value.passive) {
|
|
3218
|
+
if (value.passive === true || value.passive === false) {
|
|
3219
3219
|
return {
|
|
3220
|
-
passive:
|
|
3220
|
+
passive: value.passive
|
|
3221
3221
|
};
|
|
3222
3222
|
}
|
|
3223
3223
|
if (value.capture) {
|
|
@@ -3269,9 +3269,9 @@ const getWrappedListener = (listener, returnValue) => {
|
|
|
3269
3269
|
|
|
3270
3270
|
const attachedListeners = new WeakMap();
|
|
3271
3271
|
const getOptions = fn => {
|
|
3272
|
-
if (fn.passive) {
|
|
3272
|
+
if (fn.passive === true || fn.passive === false) {
|
|
3273
3273
|
return {
|
|
3274
|
-
passive:
|
|
3274
|
+
passive: fn.passive
|
|
3275
3275
|
};
|
|
3276
3276
|
}
|
|
3277
3277
|
if (fn.capture) {
|
|
@@ -3305,7 +3305,7 @@ const attachEvent = ($Node, eventMap, key, value, newEventMap) => {
|
|
|
3305
3305
|
console.warn('listener not found', value);
|
|
3306
3306
|
return;
|
|
3307
3307
|
}
|
|
3308
|
-
const options = getEventListenerOptions(key,
|
|
3308
|
+
const options = getEventListenerOptions(key, listener);
|
|
3309
3309
|
const wrapped = getWrappedListener(listener, eventMap.returnValue);
|
|
3310
3310
|
$Node.addEventListener(keyLower, wrapped, options);
|
|
3311
3311
|
listenersByEvent.set(keyLower, {
|
|
@@ -10502,15 +10502,25 @@ const setHash = hash => {
|
|
|
10502
10502
|
}
|
|
10503
10503
|
history.replaceState(null, '', url.href);
|
|
10504
10504
|
};
|
|
10505
|
-
const setWorkspaceUri =
|
|
10505
|
+
const setWorkspaceUri = _workspaceUri => {
|
|
10506
10506
|
const currentHref = getHref();
|
|
10507
10507
|
const url = new URL(currentHref);
|
|
10508
|
-
url.searchParams.
|
|
10508
|
+
url.searchParams.delete('workspace');
|
|
10509
10509
|
if (url.href === currentHref) {
|
|
10510
10510
|
return;
|
|
10511
10511
|
}
|
|
10512
10512
|
history.replaceState(null, '', url.href);
|
|
10513
10513
|
};
|
|
10514
|
+
const removeWorkspaceUri = () => {
|
|
10515
|
+
const currentHref = getHref();
|
|
10516
|
+
const url = new URL(currentHref);
|
|
10517
|
+
if (!url.searchParams.has('workspace')) {
|
|
10518
|
+
return currentHref;
|
|
10519
|
+
}
|
|
10520
|
+
url.searchParams.delete('workspace');
|
|
10521
|
+
history.replaceState(null, '', url.href);
|
|
10522
|
+
return getHref();
|
|
10523
|
+
};
|
|
10514
10524
|
const isChatPath = pathName => {
|
|
10515
10525
|
return /(?:^|\/)chat\/?$/.test(pathName);
|
|
10516
10526
|
};
|
|
@@ -10540,9 +10550,11 @@ const getConfig = () => {
|
|
|
10540
10550
|
return JSON.parse(configElement.textContent);
|
|
10541
10551
|
};
|
|
10542
10552
|
const getInitData = () => {
|
|
10553
|
+
const config = getConfig();
|
|
10554
|
+
const href = config.platform === 'electron' ? removeWorkspaceUri() : getHref();
|
|
10543
10555
|
const initData = {
|
|
10544
10556
|
Config: {
|
|
10545
|
-
...
|
|
10557
|
+
...config,
|
|
10546
10558
|
assetDir: assetDir,
|
|
10547
10559
|
platform: platform,
|
|
10548
10560
|
shouldLaunchMultipleWorkers: shouldLaunchMultipleWorkers,
|
|
@@ -10553,7 +10565,7 @@ const getInitData = () => {
|
|
|
10553
10565
|
bounds: getBounds()
|
|
10554
10566
|
},
|
|
10555
10567
|
Location: {
|
|
10556
|
-
href
|
|
10568
|
+
href
|
|
10557
10569
|
}
|
|
10558
10570
|
};
|
|
10559
10571
|
return initData;
|
|
@@ -11546,6 +11558,12 @@ const getStorage = storageType => {
|
|
|
11546
11558
|
}
|
|
11547
11559
|
};
|
|
11548
11560
|
|
|
11561
|
+
const getAll = storageType => {
|
|
11562
|
+
const storage = getStorage(storageType);
|
|
11563
|
+
return {
|
|
11564
|
+
...storage
|
|
11565
|
+
};
|
|
11566
|
+
};
|
|
11549
11567
|
const getItem = (storageType, key) => {
|
|
11550
11568
|
const storage = getStorage(storageType);
|
|
11551
11569
|
return storage.getItem(key) || undefined;
|
|
@@ -12126,6 +12144,7 @@ const commandMap = {
|
|
|
12126
12144
|
'WebRtc.startWebRtcAudioStream': startWebRtcAudioStream,
|
|
12127
12145
|
'WebRtc.stopWebRtcAudioStream': stopWebRtcAudioStream,
|
|
12128
12146
|
'WebStorage.clear': clear,
|
|
12147
|
+
'WebStorage.getAll': getAll,
|
|
12129
12148
|
'WebStorage.getItem': getItem,
|
|
12130
12149
|
'WebStorage.setItem': setItem,
|
|
12131
12150
|
'WebStorage.setJsonObjects': setJsonObjects,
|