@lvce-editor/renderer-process 14.0.1 → 14.1.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 +40 -49
- package/package.json +1 -1
|
@@ -230,6 +230,7 @@ const Select$1 = 'select';
|
|
|
230
230
|
const Option$1 = 'option';
|
|
231
231
|
const Code$1 = 'code';
|
|
232
232
|
const Label$1 = 'label';
|
|
233
|
+
const Dt$1 = 'dt';
|
|
233
234
|
const Audio$2 = 0;
|
|
234
235
|
const Button = 1;
|
|
235
236
|
const Col = 2;
|
|
@@ -284,6 +285,7 @@ const Select = 63;
|
|
|
284
285
|
const Option = 64;
|
|
285
286
|
const Code$2 = 65;
|
|
286
287
|
const Label = 66;
|
|
288
|
+
const Dt = 67;
|
|
287
289
|
const getElementTag = type => {
|
|
288
290
|
switch (type) {
|
|
289
291
|
case Audio$2:
|
|
@@ -392,6 +394,8 @@ const getElementTag = type => {
|
|
|
392
394
|
return Code$1;
|
|
393
395
|
case Label:
|
|
394
396
|
return Label$1;
|
|
397
|
+
case Dt:
|
|
398
|
+
return Dt$1;
|
|
395
399
|
default:
|
|
396
400
|
throw new Error(`element tag not found ${type}`);
|
|
397
401
|
}
|
|
@@ -2038,7 +2042,7 @@ const invokeHelper = async (ipc, method, params, useSendAndTransfer) => {
|
|
|
2038
2042
|
const responseMessage = await promise;
|
|
2039
2043
|
return unwrapJsonRpcResult(responseMessage);
|
|
2040
2044
|
};
|
|
2041
|
-
const send$
|
|
2045
|
+
const send$1 = (transport, method, ...params) => {
|
|
2042
2046
|
const message = create$4$2(method, params);
|
|
2043
2047
|
transport.send(message);
|
|
2044
2048
|
};
|
|
@@ -2072,7 +2076,7 @@ const createRpc = ipc => {
|
|
|
2072
2076
|
* @deprecated
|
|
2073
2077
|
*/
|
|
2074
2078
|
send(method, ...params) {
|
|
2075
|
-
send$
|
|
2079
|
+
send$1(ipc, method, ...params);
|
|
2076
2080
|
},
|
|
2077
2081
|
invoke(method, ...params) {
|
|
2078
2082
|
return invoke$2(ipc, method, ...params);
|
|
@@ -2303,7 +2307,7 @@ const dispose$k = () => {
|
|
|
2303
2307
|
state$7.rpc.dispose();
|
|
2304
2308
|
}
|
|
2305
2309
|
};
|
|
2306
|
-
const send
|
|
2310
|
+
const send = (method, ...params) => {
|
|
2307
2311
|
// @ts-ignore
|
|
2308
2312
|
state$7.rpc.send(method, ...params);
|
|
2309
2313
|
};
|
|
@@ -2326,7 +2330,7 @@ const RendererWorker = {
|
|
|
2326
2330
|
hydrate: hydrate$3,
|
|
2327
2331
|
invoke: invoke$1,
|
|
2328
2332
|
invokeAndTransfer,
|
|
2329
|
-
send
|
|
2333
|
+
send,
|
|
2330
2334
|
sendAndTransfer,
|
|
2331
2335
|
state: state$7
|
|
2332
2336
|
};
|
|
@@ -2467,7 +2471,7 @@ const handleNotificationClick = event => {
|
|
|
2467
2471
|
switch ($Target.className) {
|
|
2468
2472
|
case 'NotificationOption':
|
|
2469
2473
|
const index = findIndex$1($Target);
|
|
2470
|
-
send
|
|
2474
|
+
send(/* Notification.handleClick */'Notification.handleClick', /* index */index);
|
|
2471
2475
|
break;
|
|
2472
2476
|
}
|
|
2473
2477
|
};
|
|
@@ -2745,7 +2749,7 @@ const handleMouseDown$4 = event => {
|
|
|
2745
2749
|
}
|
|
2746
2750
|
preventDefault(event);
|
|
2747
2751
|
const level = getLevel($Menu);
|
|
2748
|
-
send
|
|
2752
|
+
send(/* Menu.handleClick */'Menu.selectIndex', /* level */level, /* index */index);
|
|
2749
2753
|
};
|
|
2750
2754
|
|
|
2751
2755
|
// const handleKeyDown = (event) => {
|
|
@@ -2790,7 +2794,7 @@ const handleMouseEnter = event => {
|
|
|
2790
2794
|
return;
|
|
2791
2795
|
}
|
|
2792
2796
|
const level = getLevel($Menu);
|
|
2793
|
-
send
|
|
2797
|
+
send(/* Menu.handleMouseEnter */'Menu.handleMouseEnter', /* level */level, /* index */index, /* x */clientX, /* y */clientY, /* timeStamp */timeStamp);
|
|
2794
2798
|
};
|
|
2795
2799
|
const handleMouseLeave = event => {
|
|
2796
2800
|
const $RelatedTarget = event.relatedTarget;
|
|
@@ -2852,7 +2856,7 @@ const focusIndex = (level, oldFocusedIndex, newFocusedIndex) => {
|
|
|
2852
2856
|
const handleBackDropMouseDown = event => {
|
|
2853
2857
|
preventDefault(event);
|
|
2854
2858
|
stopPropagation(event);
|
|
2855
|
-
send
|
|
2859
|
+
send(/* Menu.hide */'Menu.hide');
|
|
2856
2860
|
};
|
|
2857
2861
|
const handleContextMenu$b = event => {
|
|
2858
2862
|
preventDefault(event);
|
|
@@ -2883,7 +2887,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom, mous
|
|
|
2883
2887
|
append$1($Menu);
|
|
2884
2888
|
if (level === 0) {
|
|
2885
2889
|
focus$h($Menu);
|
|
2886
|
-
send
|
|
2890
|
+
send('Focus.setFocus', FocusMenu);
|
|
2887
2891
|
}
|
|
2888
2892
|
};
|
|
2889
2893
|
const hideSubMenu = level => {
|
|
@@ -3822,7 +3826,7 @@ const ViewletActivityBar = {
|
|
|
3822
3826
|
|
|
3823
3827
|
const executeViewletCommand = (uid, command, ...args) => {
|
|
3824
3828
|
number(uid);
|
|
3825
|
-
send
|
|
3829
|
+
send('Viewlet.executeViewletCommand', uid, command, ...args);
|
|
3826
3830
|
};
|
|
3827
3831
|
|
|
3828
3832
|
const nameAnonymousFunction = (fn, name) => {
|
|
@@ -4023,7 +4027,7 @@ const create$B = (pointerDown, pointerMove, pointerUp) => {
|
|
|
4023
4027
|
return;
|
|
4024
4028
|
}
|
|
4025
4029
|
const uid = fromEvent(event);
|
|
4026
|
-
send
|
|
4030
|
+
send('Viewlet.executeViewletCommand', uid, ...message);
|
|
4027
4031
|
};
|
|
4028
4032
|
const handlePointerMove = event => {
|
|
4029
4033
|
shared(pointerMove, event);
|
|
@@ -4228,7 +4232,7 @@ const create$Button = (label, icon) => {
|
|
|
4228
4232
|
};
|
|
4229
4233
|
|
|
4230
4234
|
const handleClick$5 = index => {
|
|
4231
|
-
send
|
|
4235
|
+
send(/* Dialog.handleClick */'Dialog.handleClick', /* index */index);
|
|
4232
4236
|
};
|
|
4233
4237
|
|
|
4234
4238
|
const handleClick$4 = event => {
|
|
@@ -4503,7 +4507,7 @@ const sendToIframe = (contentWindow, message, origin, transfer) => {
|
|
|
4503
4507
|
const handleLoad$1 = event => {
|
|
4504
4508
|
// eslint-disable-next-line no-console
|
|
4505
4509
|
console.log(event.target.src);
|
|
4506
|
-
send
|
|
4510
|
+
send('E2eTests.handleLoad');
|
|
4507
4511
|
};
|
|
4508
4512
|
const setIframe$1 = (state, src, sandbox = []) => {
|
|
4509
4513
|
if (!src) {
|
|
@@ -5217,7 +5221,7 @@ const getWrappedListener = (listener, returnValue) => {
|
|
|
5217
5221
|
if (result.length === 0) {
|
|
5218
5222
|
return;
|
|
5219
5223
|
}
|
|
5220
|
-
send
|
|
5224
|
+
send('Viewlet.executeViewletCommand', uid, ...result);
|
|
5221
5225
|
};
|
|
5222
5226
|
nameAnonymousFunction(wrapped, listener.name);
|
|
5223
5227
|
cache.set(listener, wrapped);
|
|
@@ -6325,9 +6329,9 @@ const handleLocationsMouseDown = event => {
|
|
|
6325
6329
|
const $Target = event.target;
|
|
6326
6330
|
if ($Target.classList.contains('TreeItem')) {
|
|
6327
6331
|
const index = getNodeIndex($Target);
|
|
6328
|
-
send
|
|
6332
|
+
send(/* ViewletLocations.selectIndex */'Locations.selectIndex', /* index */index);
|
|
6329
6333
|
} else if ($Target.classList.contains('LocationList')) {
|
|
6330
|
-
send
|
|
6334
|
+
send(/* ViewletLocations.focusIndex */'Locations.focusIndex', /* index */-1);
|
|
6331
6335
|
}
|
|
6332
6336
|
};
|
|
6333
6337
|
|
|
@@ -6365,7 +6369,7 @@ const focus$a = state => {
|
|
|
6365
6369
|
} = state;
|
|
6366
6370
|
$Locations.classList.add('FocusOutline');
|
|
6367
6371
|
$Locations.focus();
|
|
6368
|
-
send
|
|
6372
|
+
send('Focus.setFocus', FocusLocationList);
|
|
6369
6373
|
};
|
|
6370
6374
|
|
|
6371
6375
|
const ViewletImplementations = {
|
|
@@ -6879,7 +6883,7 @@ const isMatchingKeyBinding = (identifiers, identifier) => {
|
|
|
6879
6883
|
};
|
|
6880
6884
|
|
|
6881
6885
|
const handleMatchingKeyBinding = identifier => {
|
|
6882
|
-
send
|
|
6886
|
+
send(/* KeyBindings.handleKeyBinding */'KeyBindings.handleKeyBinding', /* keyBinding */identifier);
|
|
6883
6887
|
};
|
|
6884
6888
|
const handleKeyDown$2 = event => {
|
|
6885
6889
|
const identifier = getKeyBindingIdentifier(event);
|
|
@@ -6894,27 +6898,27 @@ const handleKeyDown$2 = event => {
|
|
|
6894
6898
|
const handleKeyUp$1 = event => {};
|
|
6895
6899
|
|
|
6896
6900
|
const handleSashPointerMove$1 = (x, y) => {
|
|
6897
|
-
send
|
|
6901
|
+
send('Layout.handleSashPointerMove', x, y);
|
|
6898
6902
|
};
|
|
6899
6903
|
const handleSashPointerDown$1 = id => {
|
|
6900
|
-
send
|
|
6904
|
+
send('Layout.handleSashPointerDown', id);
|
|
6901
6905
|
};
|
|
6902
6906
|
|
|
6903
6907
|
// TODO send component uid
|
|
6904
6908
|
const handleSashPointerUp = id => {
|
|
6905
|
-
send
|
|
6909
|
+
send('Layout.handleSashPointerUp', id);
|
|
6906
6910
|
};
|
|
6907
6911
|
const handleSashDoubleClick$1 = id => {
|
|
6908
|
-
send
|
|
6912
|
+
send('Layout.handleSashDoubleClick', id);
|
|
6909
6913
|
};
|
|
6910
6914
|
const handleResize$1 = (width, height) => {
|
|
6911
|
-
send
|
|
6915
|
+
send('Layout.handleResize', width, height);
|
|
6912
6916
|
};
|
|
6913
6917
|
const handleFocus$3 = () => {
|
|
6914
|
-
send
|
|
6918
|
+
send('Layout.handleFocus');
|
|
6915
6919
|
};
|
|
6916
6920
|
const handleBlur$4 = () => {
|
|
6917
|
-
send
|
|
6921
|
+
send('Layout.handleBlur');
|
|
6918
6922
|
};
|
|
6919
6923
|
|
|
6920
6924
|
const handleSashPointerMove = event => {
|
|
@@ -7438,7 +7442,7 @@ const handleError$2 = (state, error) => {
|
|
|
7438
7442
|
const focus$8 = state => {
|
|
7439
7443
|
object(state);
|
|
7440
7444
|
focus$h(state.$ViewletOutputContent);
|
|
7441
|
-
send
|
|
7445
|
+
send('Focus.setFocus', FocusOutput);
|
|
7442
7446
|
};
|
|
7443
7447
|
|
|
7444
7448
|
// TODO handle case when output is opened -> find widget is opened -> output is disposed before find widget is ready
|
|
@@ -7832,22 +7836,22 @@ const ViewletSideBar = {
|
|
|
7832
7836
|
};
|
|
7833
7837
|
|
|
7834
7838
|
const handleInput$3 = value => {
|
|
7835
|
-
send
|
|
7839
|
+
send('SimpleBrowser.handleInput', value);
|
|
7836
7840
|
};
|
|
7837
7841
|
const forward = () => {
|
|
7838
|
-
send
|
|
7842
|
+
send('SimpleBrowser.forward');
|
|
7839
7843
|
};
|
|
7840
7844
|
const backward = () => {
|
|
7841
|
-
send
|
|
7845
|
+
send('SimpleBrowser.backward');
|
|
7842
7846
|
};
|
|
7843
7847
|
const reload$1 = () => {
|
|
7844
|
-
send
|
|
7848
|
+
send('SimpleBrowser.reload');
|
|
7845
7849
|
};
|
|
7846
7850
|
const cancelNavigation = () => {
|
|
7847
|
-
send
|
|
7851
|
+
send('SimpleBrowser.cancelNavigation');
|
|
7848
7852
|
};
|
|
7849
7853
|
const openExternal = () => {
|
|
7850
|
-
send
|
|
7854
|
+
send('SimpleBrowser.openExternal');
|
|
7851
7855
|
};
|
|
7852
7856
|
|
|
7853
7857
|
const handleInput$2 = event => {
|
|
@@ -7863,7 +7867,7 @@ const handleFocus$1 = event => {
|
|
|
7863
7867
|
const {
|
|
7864
7868
|
target
|
|
7865
7869
|
} = event;
|
|
7866
|
-
send
|
|
7870
|
+
send('Focus.setFocus', FocusSimpleBrowserInput);
|
|
7867
7871
|
setTimeout(() => {
|
|
7868
7872
|
target.select();
|
|
7869
7873
|
});
|
|
@@ -8558,7 +8562,7 @@ const ViewletTitleBarTitle = {
|
|
|
8558
8562
|
};
|
|
8559
8563
|
|
|
8560
8564
|
const handleVideoError$1 = (code, message) => {
|
|
8561
|
-
send
|
|
8565
|
+
send('Video.handleVideoError', code, message);
|
|
8562
8566
|
};
|
|
8563
8567
|
|
|
8564
8568
|
const handleVideoError = event => {
|
|
@@ -8984,19 +8988,6 @@ const refresh$1 = (viewletId, viewletContext) => {
|
|
|
8984
8988
|
state$1.refreshContext[viewletId] = viewletContext;
|
|
8985
8989
|
}
|
|
8986
8990
|
};
|
|
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
8991
|
const specialIds = new Set(['TitleBar', 'SideBar', 'Main', 'ActivityBar', 'StatusBar', 'Panel']);
|
|
9001
8992
|
const isSpecial = id => {
|
|
9002
8993
|
return specialIds.has(id);
|
|
@@ -9457,7 +9448,7 @@ const close = () => {
|
|
|
9457
9448
|
// window.close()
|
|
9458
9449
|
};
|
|
9459
9450
|
const sendVisibilityChangeHint = () => {
|
|
9460
|
-
send
|
|
9451
|
+
send(/* SaveState.handleVisibilityChange */'SaveState.handleVisibilityChange', /* visibilityState */'hidden');
|
|
9461
9452
|
};
|
|
9462
9453
|
const handleBeforeUnload = () => {
|
|
9463
9454
|
sendVisibilityChangeHint();
|
|
@@ -9681,7 +9672,7 @@ const commandMap = {
|
|
|
9681
9672
|
'Viewlet.refresh': refresh$1,
|
|
9682
9673
|
'Viewlet.registerEventListeners': registerEventListeners,
|
|
9683
9674
|
'Viewlet.removeKeyBindings': removeKeyBindings,
|
|
9684
|
-
'Viewlet.send':
|
|
9675
|
+
'Viewlet.send': invoke,
|
|
9685
9676
|
'Viewlet.sendMultiple': sendMultiple,
|
|
9686
9677
|
'Viewlet.setBounds': setBounds$1,
|
|
9687
9678
|
'Viewlet.show': show,
|