@lvce-editor/renderer-process 14.0.1 → 14.0.2
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 +36 -49
- package/package.json +1 -1
|
@@ -2038,7 +2038,7 @@ const invokeHelper = async (ipc, method, params, useSendAndTransfer) => {
|
|
|
2038
2038
|
const responseMessage = await promise;
|
|
2039
2039
|
return unwrapJsonRpcResult(responseMessage);
|
|
2040
2040
|
};
|
|
2041
|
-
const send$
|
|
2041
|
+
const send$1 = (transport, method, ...params) => {
|
|
2042
2042
|
const message = create$4$2(method, params);
|
|
2043
2043
|
transport.send(message);
|
|
2044
2044
|
};
|
|
@@ -2072,7 +2072,7 @@ const createRpc = ipc => {
|
|
|
2072
2072
|
* @deprecated
|
|
2073
2073
|
*/
|
|
2074
2074
|
send(method, ...params) {
|
|
2075
|
-
send$
|
|
2075
|
+
send$1(ipc, method, ...params);
|
|
2076
2076
|
},
|
|
2077
2077
|
invoke(method, ...params) {
|
|
2078
2078
|
return invoke$2(ipc, method, ...params);
|
|
@@ -2303,7 +2303,7 @@ const dispose$k = () => {
|
|
|
2303
2303
|
state$7.rpc.dispose();
|
|
2304
2304
|
}
|
|
2305
2305
|
};
|
|
2306
|
-
const send
|
|
2306
|
+
const send = (method, ...params) => {
|
|
2307
2307
|
// @ts-ignore
|
|
2308
2308
|
state$7.rpc.send(method, ...params);
|
|
2309
2309
|
};
|
|
@@ -2326,7 +2326,7 @@ const RendererWorker = {
|
|
|
2326
2326
|
hydrate: hydrate$3,
|
|
2327
2327
|
invoke: invoke$1,
|
|
2328
2328
|
invokeAndTransfer,
|
|
2329
|
-
send
|
|
2329
|
+
send,
|
|
2330
2330
|
sendAndTransfer,
|
|
2331
2331
|
state: state$7
|
|
2332
2332
|
};
|
|
@@ -2467,7 +2467,7 @@ const handleNotificationClick = event => {
|
|
|
2467
2467
|
switch ($Target.className) {
|
|
2468
2468
|
case 'NotificationOption':
|
|
2469
2469
|
const index = findIndex$1($Target);
|
|
2470
|
-
send
|
|
2470
|
+
send(/* Notification.handleClick */'Notification.handleClick', /* index */index);
|
|
2471
2471
|
break;
|
|
2472
2472
|
}
|
|
2473
2473
|
};
|
|
@@ -2745,7 +2745,7 @@ const handleMouseDown$4 = event => {
|
|
|
2745
2745
|
}
|
|
2746
2746
|
preventDefault(event);
|
|
2747
2747
|
const level = getLevel($Menu);
|
|
2748
|
-
send
|
|
2748
|
+
send(/* Menu.handleClick */'Menu.selectIndex', /* level */level, /* index */index);
|
|
2749
2749
|
};
|
|
2750
2750
|
|
|
2751
2751
|
// const handleKeyDown = (event) => {
|
|
@@ -2790,7 +2790,7 @@ const handleMouseEnter = event => {
|
|
|
2790
2790
|
return;
|
|
2791
2791
|
}
|
|
2792
2792
|
const level = getLevel($Menu);
|
|
2793
|
-
send
|
|
2793
|
+
send(/* Menu.handleMouseEnter */'Menu.handleMouseEnter', /* level */level, /* index */index, /* x */clientX, /* y */clientY, /* timeStamp */timeStamp);
|
|
2794
2794
|
};
|
|
2795
2795
|
const handleMouseLeave = event => {
|
|
2796
2796
|
const $RelatedTarget = event.relatedTarget;
|
|
@@ -2852,7 +2852,7 @@ const focusIndex = (level, oldFocusedIndex, newFocusedIndex) => {
|
|
|
2852
2852
|
const handleBackDropMouseDown = event => {
|
|
2853
2853
|
preventDefault(event);
|
|
2854
2854
|
stopPropagation(event);
|
|
2855
|
-
send
|
|
2855
|
+
send(/* Menu.hide */'Menu.hide');
|
|
2856
2856
|
};
|
|
2857
2857
|
const handleContextMenu$b = event => {
|
|
2858
2858
|
preventDefault(event);
|
|
@@ -2883,7 +2883,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom, mous
|
|
|
2883
2883
|
append$1($Menu);
|
|
2884
2884
|
if (level === 0) {
|
|
2885
2885
|
focus$h($Menu);
|
|
2886
|
-
send
|
|
2886
|
+
send('Focus.setFocus', FocusMenu);
|
|
2887
2887
|
}
|
|
2888
2888
|
};
|
|
2889
2889
|
const hideSubMenu = level => {
|
|
@@ -3822,7 +3822,7 @@ const ViewletActivityBar = {
|
|
|
3822
3822
|
|
|
3823
3823
|
const executeViewletCommand = (uid, command, ...args) => {
|
|
3824
3824
|
number(uid);
|
|
3825
|
-
send
|
|
3825
|
+
send('Viewlet.executeViewletCommand', uid, command, ...args);
|
|
3826
3826
|
};
|
|
3827
3827
|
|
|
3828
3828
|
const nameAnonymousFunction = (fn, name) => {
|
|
@@ -4023,7 +4023,7 @@ const create$B = (pointerDown, pointerMove, pointerUp) => {
|
|
|
4023
4023
|
return;
|
|
4024
4024
|
}
|
|
4025
4025
|
const uid = fromEvent(event);
|
|
4026
|
-
send
|
|
4026
|
+
send('Viewlet.executeViewletCommand', uid, ...message);
|
|
4027
4027
|
};
|
|
4028
4028
|
const handlePointerMove = event => {
|
|
4029
4029
|
shared(pointerMove, event);
|
|
@@ -4228,7 +4228,7 @@ const create$Button = (label, icon) => {
|
|
|
4228
4228
|
};
|
|
4229
4229
|
|
|
4230
4230
|
const handleClick$5 = index => {
|
|
4231
|
-
send
|
|
4231
|
+
send(/* Dialog.handleClick */'Dialog.handleClick', /* index */index);
|
|
4232
4232
|
};
|
|
4233
4233
|
|
|
4234
4234
|
const handleClick$4 = event => {
|
|
@@ -4503,7 +4503,7 @@ const sendToIframe = (contentWindow, message, origin, transfer) => {
|
|
|
4503
4503
|
const handleLoad$1 = event => {
|
|
4504
4504
|
// eslint-disable-next-line no-console
|
|
4505
4505
|
console.log(event.target.src);
|
|
4506
|
-
send
|
|
4506
|
+
send('E2eTests.handleLoad');
|
|
4507
4507
|
};
|
|
4508
4508
|
const setIframe$1 = (state, src, sandbox = []) => {
|
|
4509
4509
|
if (!src) {
|
|
@@ -5217,7 +5217,7 @@ const getWrappedListener = (listener, returnValue) => {
|
|
|
5217
5217
|
if (result.length === 0) {
|
|
5218
5218
|
return;
|
|
5219
5219
|
}
|
|
5220
|
-
send
|
|
5220
|
+
send('Viewlet.executeViewletCommand', uid, ...result);
|
|
5221
5221
|
};
|
|
5222
5222
|
nameAnonymousFunction(wrapped, listener.name);
|
|
5223
5223
|
cache.set(listener, wrapped);
|
|
@@ -6325,9 +6325,9 @@ const handleLocationsMouseDown = event => {
|
|
|
6325
6325
|
const $Target = event.target;
|
|
6326
6326
|
if ($Target.classList.contains('TreeItem')) {
|
|
6327
6327
|
const index = getNodeIndex($Target);
|
|
6328
|
-
send
|
|
6328
|
+
send(/* ViewletLocations.selectIndex */'Locations.selectIndex', /* index */index);
|
|
6329
6329
|
} else if ($Target.classList.contains('LocationList')) {
|
|
6330
|
-
send
|
|
6330
|
+
send(/* ViewletLocations.focusIndex */'Locations.focusIndex', /* index */-1);
|
|
6331
6331
|
}
|
|
6332
6332
|
};
|
|
6333
6333
|
|
|
@@ -6365,7 +6365,7 @@ const focus$a = state => {
|
|
|
6365
6365
|
} = state;
|
|
6366
6366
|
$Locations.classList.add('FocusOutline');
|
|
6367
6367
|
$Locations.focus();
|
|
6368
|
-
send
|
|
6368
|
+
send('Focus.setFocus', FocusLocationList);
|
|
6369
6369
|
};
|
|
6370
6370
|
|
|
6371
6371
|
const ViewletImplementations = {
|
|
@@ -6879,7 +6879,7 @@ const isMatchingKeyBinding = (identifiers, identifier) => {
|
|
|
6879
6879
|
};
|
|
6880
6880
|
|
|
6881
6881
|
const handleMatchingKeyBinding = identifier => {
|
|
6882
|
-
send
|
|
6882
|
+
send(/* KeyBindings.handleKeyBinding */'KeyBindings.handleKeyBinding', /* keyBinding */identifier);
|
|
6883
6883
|
};
|
|
6884
6884
|
const handleKeyDown$2 = event => {
|
|
6885
6885
|
const identifier = getKeyBindingIdentifier(event);
|
|
@@ -6894,27 +6894,27 @@ const handleKeyDown$2 = event => {
|
|
|
6894
6894
|
const handleKeyUp$1 = event => {};
|
|
6895
6895
|
|
|
6896
6896
|
const handleSashPointerMove$1 = (x, y) => {
|
|
6897
|
-
send
|
|
6897
|
+
send('Layout.handleSashPointerMove', x, y);
|
|
6898
6898
|
};
|
|
6899
6899
|
const handleSashPointerDown$1 = id => {
|
|
6900
|
-
send
|
|
6900
|
+
send('Layout.handleSashPointerDown', id);
|
|
6901
6901
|
};
|
|
6902
6902
|
|
|
6903
6903
|
// TODO send component uid
|
|
6904
6904
|
const handleSashPointerUp = id => {
|
|
6905
|
-
send
|
|
6905
|
+
send('Layout.handleSashPointerUp', id);
|
|
6906
6906
|
};
|
|
6907
6907
|
const handleSashDoubleClick$1 = id => {
|
|
6908
|
-
send
|
|
6908
|
+
send('Layout.handleSashDoubleClick', id);
|
|
6909
6909
|
};
|
|
6910
6910
|
const handleResize$1 = (width, height) => {
|
|
6911
|
-
send
|
|
6911
|
+
send('Layout.handleResize', width, height);
|
|
6912
6912
|
};
|
|
6913
6913
|
const handleFocus$3 = () => {
|
|
6914
|
-
send
|
|
6914
|
+
send('Layout.handleFocus');
|
|
6915
6915
|
};
|
|
6916
6916
|
const handleBlur$4 = () => {
|
|
6917
|
-
send
|
|
6917
|
+
send('Layout.handleBlur');
|
|
6918
6918
|
};
|
|
6919
6919
|
|
|
6920
6920
|
const handleSashPointerMove = event => {
|
|
@@ -7438,7 +7438,7 @@ const handleError$2 = (state, error) => {
|
|
|
7438
7438
|
const focus$8 = state => {
|
|
7439
7439
|
object(state);
|
|
7440
7440
|
focus$h(state.$ViewletOutputContent);
|
|
7441
|
-
send
|
|
7441
|
+
send('Focus.setFocus', FocusOutput);
|
|
7442
7442
|
};
|
|
7443
7443
|
|
|
7444
7444
|
// TODO handle case when output is opened -> find widget is opened -> output is disposed before find widget is ready
|
|
@@ -7832,22 +7832,22 @@ const ViewletSideBar = {
|
|
|
7832
7832
|
};
|
|
7833
7833
|
|
|
7834
7834
|
const handleInput$3 = value => {
|
|
7835
|
-
send
|
|
7835
|
+
send('SimpleBrowser.handleInput', value);
|
|
7836
7836
|
};
|
|
7837
7837
|
const forward = () => {
|
|
7838
|
-
send
|
|
7838
|
+
send('SimpleBrowser.forward');
|
|
7839
7839
|
};
|
|
7840
7840
|
const backward = () => {
|
|
7841
|
-
send
|
|
7841
|
+
send('SimpleBrowser.backward');
|
|
7842
7842
|
};
|
|
7843
7843
|
const reload$1 = () => {
|
|
7844
|
-
send
|
|
7844
|
+
send('SimpleBrowser.reload');
|
|
7845
7845
|
};
|
|
7846
7846
|
const cancelNavigation = () => {
|
|
7847
|
-
send
|
|
7847
|
+
send('SimpleBrowser.cancelNavigation');
|
|
7848
7848
|
};
|
|
7849
7849
|
const openExternal = () => {
|
|
7850
|
-
send
|
|
7850
|
+
send('SimpleBrowser.openExternal');
|
|
7851
7851
|
};
|
|
7852
7852
|
|
|
7853
7853
|
const handleInput$2 = event => {
|
|
@@ -7863,7 +7863,7 @@ const handleFocus$1 = event => {
|
|
|
7863
7863
|
const {
|
|
7864
7864
|
target
|
|
7865
7865
|
} = event;
|
|
7866
|
-
send
|
|
7866
|
+
send('Focus.setFocus', FocusSimpleBrowserInput);
|
|
7867
7867
|
setTimeout(() => {
|
|
7868
7868
|
target.select();
|
|
7869
7869
|
});
|
|
@@ -8558,7 +8558,7 @@ const ViewletTitleBarTitle = {
|
|
|
8558
8558
|
};
|
|
8559
8559
|
|
|
8560
8560
|
const handleVideoError$1 = (code, message) => {
|
|
8561
|
-
send
|
|
8561
|
+
send('Video.handleVideoError', code, message);
|
|
8562
8562
|
};
|
|
8563
8563
|
|
|
8564
8564
|
const handleVideoError = event => {
|
|
@@ -8984,19 +8984,6 @@ const refresh$1 = (viewletId, viewletContext) => {
|
|
|
8984
8984
|
state$1.refreshContext[viewletId] = viewletContext;
|
|
8985
8985
|
}
|
|
8986
8986
|
};
|
|
8987
|
-
|
|
8988
|
-
// TODO handle error when viewlet creation fails
|
|
8989
|
-
|
|
8990
|
-
// TODO remove send -> use invoke instead
|
|
8991
|
-
const send = (viewletId, method, ...args) => {
|
|
8992
|
-
const instance = state$1.instances[viewletId];
|
|
8993
|
-
if (instance) {
|
|
8994
|
-
instance.factory[method](...args);
|
|
8995
|
-
} else {
|
|
8996
|
-
// TODO
|
|
8997
|
-
warn$1('instance not present');
|
|
8998
|
-
}
|
|
8999
|
-
};
|
|
9000
8987
|
const specialIds = new Set(['TitleBar', 'SideBar', 'Main', 'ActivityBar', 'StatusBar', 'Panel']);
|
|
9001
8988
|
const isSpecial = id => {
|
|
9002
8989
|
return specialIds.has(id);
|
|
@@ -9457,7 +9444,7 @@ const close = () => {
|
|
|
9457
9444
|
// window.close()
|
|
9458
9445
|
};
|
|
9459
9446
|
const sendVisibilityChangeHint = () => {
|
|
9460
|
-
send
|
|
9447
|
+
send(/* SaveState.handleVisibilityChange */'SaveState.handleVisibilityChange', /* visibilityState */'hidden');
|
|
9461
9448
|
};
|
|
9462
9449
|
const handleBeforeUnload = () => {
|
|
9463
9450
|
sendVisibilityChangeHint();
|
|
@@ -9681,7 +9668,7 @@ const commandMap = {
|
|
|
9681
9668
|
'Viewlet.refresh': refresh$1,
|
|
9682
9669
|
'Viewlet.registerEventListeners': registerEventListeners,
|
|
9683
9670
|
'Viewlet.removeKeyBindings': removeKeyBindings,
|
|
9684
|
-
'Viewlet.send':
|
|
9671
|
+
'Viewlet.send': invoke,
|
|
9685
9672
|
'Viewlet.sendMultiple': sendMultiple,
|
|
9686
9673
|
'Viewlet.setBounds': setBounds$1,
|
|
9687
9674
|
'Viewlet.show': show,
|