@lvce-editor/renderer-process 30.34.2 → 30.36.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 +102 -73
- package/package.json +1 -1
|
@@ -211,13 +211,6 @@ const showState = async () => {
|
|
|
211
211
|
info(state);
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
const downloadFile = (fileName, url) => {
|
|
215
|
-
const a = document.createElement('a');
|
|
216
|
-
a.href = url;
|
|
217
|
-
a.download = fileName;
|
|
218
|
-
a.click();
|
|
219
|
-
};
|
|
220
|
-
|
|
221
214
|
const uidSymbol = Symbol('uid');
|
|
222
215
|
|
|
223
216
|
const getUidTarget = $Element => {
|
|
@@ -1930,7 +1923,61 @@ const rememberFocus$1 = ($Viewlet, dom, eventMap, uid = 0) => {
|
|
|
1930
1923
|
}
|
|
1931
1924
|
};
|
|
1932
1925
|
|
|
1933
|
-
const
|
|
1926
|
+
const set$8 = setComponentUid;
|
|
1927
|
+
const get$7 = getComponentUid;
|
|
1928
|
+
const fromEvent = getComponentUidFromEvent;
|
|
1929
|
+
|
|
1930
|
+
const rpcs = new Map();
|
|
1931
|
+
const viewRpcIds = new Map();
|
|
1932
|
+
const get$6 = uid => {
|
|
1933
|
+
const rpcId = viewRpcIds.get(uid);
|
|
1934
|
+
return rpcId === undefined ? undefined : rpcs.get(rpcId);
|
|
1935
|
+
};
|
|
1936
|
+
const getViewUid = rpcId => {
|
|
1937
|
+
let matchingUid;
|
|
1938
|
+
for (const [uid, registeredRpcId] of viewRpcIds) {
|
|
1939
|
+
if (registeredRpcId === rpcId) {
|
|
1940
|
+
matchingUid = uid;
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
if (matchingUid === undefined) {
|
|
1944
|
+
throw new Error(`direct view not found: ${rpcId}`);
|
|
1945
|
+
}
|
|
1946
|
+
return matchingUid;
|
|
1947
|
+
};
|
|
1948
|
+
const getFocusedViewUid = (rpcId, element = document.activeElement) => {
|
|
1949
|
+
const uid = element ? get$7(element) : 0;
|
|
1950
|
+
if (!uid || viewRpcIds.get(uid) !== rpcId) {
|
|
1951
|
+
throw new Error(`focused direct view not found: ${rpcId}`);
|
|
1952
|
+
}
|
|
1953
|
+
return uid;
|
|
1954
|
+
};
|
|
1955
|
+
const registerRpc = (rpcId, rpc) => {
|
|
1956
|
+
const previous = rpcs.get(rpcId);
|
|
1957
|
+
if (previous && previous !== rpc) {
|
|
1958
|
+
previous.dispose();
|
|
1959
|
+
}
|
|
1960
|
+
rpcs.set(rpcId, rpc);
|
|
1961
|
+
};
|
|
1962
|
+
const registerView = (uid, rpcId) => {
|
|
1963
|
+
if (rpcId === undefined) {
|
|
1964
|
+
viewRpcIds.delete(uid);
|
|
1965
|
+
return;
|
|
1966
|
+
}
|
|
1967
|
+
viewRpcIds.set(uid, rpcId);
|
|
1968
|
+
};
|
|
1969
|
+
const unregisterView = uid => {
|
|
1970
|
+
viewRpcIds.delete(uid);
|
|
1971
|
+
};
|
|
1972
|
+
|
|
1973
|
+
const downloadFile = (fileName, url) => {
|
|
1974
|
+
const a = document.createElement('a');
|
|
1975
|
+
a.href = url;
|
|
1976
|
+
a.download = fileName;
|
|
1977
|
+
a.click();
|
|
1978
|
+
};
|
|
1979
|
+
|
|
1980
|
+
const get$5 = ids => {
|
|
1934
1981
|
return getFileHandles$1(ids);
|
|
1935
1982
|
};
|
|
1936
1983
|
|
|
@@ -2857,7 +2904,7 @@ const execute = (command, ...args) => {
|
|
|
2857
2904
|
|
|
2858
2905
|
const Two$1 = '2.0';
|
|
2859
2906
|
const callbacks = Object.create(null);
|
|
2860
|
-
const get$
|
|
2907
|
+
const get$4 = id => {
|
|
2861
2908
|
return callbacks[id];
|
|
2862
2909
|
};
|
|
2863
2910
|
const remove$4 = id => {
|
|
@@ -3047,7 +3094,7 @@ const warn = (...args) => {
|
|
|
3047
3094
|
console.warn(...args);
|
|
3048
3095
|
};
|
|
3049
3096
|
const resolve = (id, response) => {
|
|
3050
|
-
const fn = get$
|
|
3097
|
+
const fn = get$4(id);
|
|
3051
3098
|
if (!fn) {
|
|
3052
3099
|
console.log(response);
|
|
3053
3100
|
warn(`callback ${id} may already be disposed`);
|
|
@@ -3417,7 +3464,7 @@ const create$x = async ({
|
|
|
3417
3464
|
};
|
|
3418
3465
|
|
|
3419
3466
|
const workers = Object.create(null);
|
|
3420
|
-
const set$
|
|
3467
|
+
const set$7 = (id, worker) => {
|
|
3421
3468
|
workers[id] = worker;
|
|
3422
3469
|
};
|
|
3423
3470
|
const remove$3 = id => {
|
|
@@ -3441,7 +3488,7 @@ const create$w = async ({
|
|
|
3441
3488
|
});
|
|
3442
3489
|
const worker = rpc.ipc?._rawIpc;
|
|
3443
3490
|
if (typeof id === 'number' && raw && worker) {
|
|
3444
|
-
set$
|
|
3491
|
+
set$7(id, worker);
|
|
3445
3492
|
}
|
|
3446
3493
|
return undefined;
|
|
3447
3494
|
};
|
|
@@ -3520,10 +3567,10 @@ const getModule = method => {
|
|
|
3520
3567
|
};
|
|
3521
3568
|
|
|
3522
3569
|
const ipcs = Object.create(null);
|
|
3523
|
-
const set$
|
|
3570
|
+
const set$6 = (name, ipc) => {
|
|
3524
3571
|
ipcs[name] = ipc;
|
|
3525
3572
|
};
|
|
3526
|
-
const get$
|
|
3573
|
+
const get$3 = name => {
|
|
3527
3574
|
return ipcs[name];
|
|
3528
3575
|
};
|
|
3529
3576
|
const remove$2 = name => {
|
|
@@ -3757,7 +3804,7 @@ const create$u = async ({
|
|
|
3757
3804
|
}
|
|
3758
3805
|
// TODO rename method
|
|
3759
3806
|
// TODO avoid cyclic dependency
|
|
3760
|
-
const port = get$
|
|
3807
|
+
const port = get$3(options.name);
|
|
3761
3808
|
remove$2(options.name);
|
|
3762
3809
|
await invokeAndTransfer('Transferrable.transfer', options.id, port);
|
|
3763
3810
|
return;
|
|
@@ -3982,14 +4029,14 @@ const dispose$h = id => {
|
|
|
3982
4029
|
const state$7 = {
|
|
3983
4030
|
canvasObjects: Object.create(null)
|
|
3984
4031
|
};
|
|
3985
|
-
const set$
|
|
4032
|
+
const set$5 = (canvasId, canvas) => {
|
|
3986
4033
|
state$7.canvasObjects[canvasId] = canvas;
|
|
3987
4034
|
};
|
|
3988
4035
|
|
|
3989
4036
|
const create$r = async (canvasId, objectId) => {
|
|
3990
4037
|
const canvas = document.createElement('canvas');
|
|
3991
4038
|
const offscreenCanvas = canvas.transferControlToOffscreen();
|
|
3992
|
-
set$
|
|
4039
|
+
set$5(canvasId, canvas);
|
|
3993
4040
|
await invokeAndTransfer('Transferrable.transfer', objectId, offscreenCanvas);
|
|
3994
4041
|
};
|
|
3995
4042
|
const create2 = async (canvasId, objectId, width, height) => {
|
|
@@ -4020,10 +4067,6 @@ const create$BackDrop = () => {
|
|
|
4020
4067
|
return $BackDrop;
|
|
4021
4068
|
};
|
|
4022
4069
|
|
|
4023
|
-
const set$5 = setComponentUid;
|
|
4024
|
-
const get$4 = getComponentUid;
|
|
4025
|
-
const fromEvent = getComponentUidFromEvent;
|
|
4026
|
-
|
|
4027
4070
|
const AriaOwns = 'aria-owns';
|
|
4028
4071
|
const AriaLabelledBy = 'aria-labelledby';
|
|
4029
4072
|
const AriaDescribedBy = 'aria-describedby';
|
|
@@ -4400,8 +4443,8 @@ const showControlled = ({
|
|
|
4400
4443
|
showMenu(x, y, width, height, items, level);
|
|
4401
4444
|
const $Menu = state$5.$$Menus.at(-1);
|
|
4402
4445
|
if ($Parent && $Menu) {
|
|
4403
|
-
const uid = get$
|
|
4404
|
-
set$
|
|
4446
|
+
const uid = get$7($Parent);
|
|
4447
|
+
set$8($Menu, uid);
|
|
4405
4448
|
}
|
|
4406
4449
|
// TODO menu should not necessarily know about parent (titleBarMenuBar)
|
|
4407
4450
|
// it should be the other way around
|
|
@@ -4487,7 +4530,7 @@ const prompt = (message, defaultValue) => {
|
|
|
4487
4530
|
};
|
|
4488
4531
|
|
|
4489
4532
|
const screenCaptures = Object.create(null);
|
|
4490
|
-
const get$
|
|
4533
|
+
const get$2 = id => {
|
|
4491
4534
|
return screenCaptures[id];
|
|
4492
4535
|
};
|
|
4493
4536
|
const set$4 = (id, captureStream) => {
|
|
@@ -4553,9 +4596,9 @@ class VError extends Error {
|
|
|
4553
4596
|
}
|
|
4554
4597
|
}
|
|
4555
4598
|
|
|
4556
|
-
const get$
|
|
4599
|
+
const get$1 = id => {
|
|
4557
4600
|
number(id);
|
|
4558
|
-
return get$
|
|
4601
|
+
return get$2(id);
|
|
4559
4602
|
};
|
|
4560
4603
|
const start = async (id, options) => {
|
|
4561
4604
|
try {
|
|
@@ -5212,7 +5255,7 @@ const webViews = Object.create(null);
|
|
|
5212
5255
|
const set$3 = (id, webView) => {
|
|
5213
5256
|
webViews[id] = webView;
|
|
5214
5257
|
};
|
|
5215
|
-
const get
|
|
5258
|
+
const get = id => {
|
|
5216
5259
|
return webViews[id];
|
|
5217
5260
|
};
|
|
5218
5261
|
const remove = id => {
|
|
@@ -5232,7 +5275,7 @@ const acquire = objectId => {
|
|
|
5232
5275
|
// TODO transfer port directly instead of storing
|
|
5233
5276
|
// it for a short time in state
|
|
5234
5277
|
const transferToWebView = objectId => {
|
|
5235
|
-
const $Iframe = get
|
|
5278
|
+
const $Iframe = get(1);
|
|
5236
5279
|
if (!$Iframe) {
|
|
5237
5280
|
throw new Error(`webview not found`);
|
|
5238
5281
|
}
|
|
@@ -5261,30 +5304,6 @@ const attachEvents$7 = ($Node, eventMap) => {
|
|
|
5261
5304
|
}
|
|
5262
5305
|
};
|
|
5263
5306
|
|
|
5264
|
-
const rpcs = new Map();
|
|
5265
|
-
const viewRpcIds = new Map();
|
|
5266
|
-
const get = uid => {
|
|
5267
|
-
const rpcId = viewRpcIds.get(uid);
|
|
5268
|
-
return rpcId === undefined ? undefined : rpcs.get(rpcId);
|
|
5269
|
-
};
|
|
5270
|
-
const registerRpc = (rpcId, rpc) => {
|
|
5271
|
-
const previous = rpcs.get(rpcId);
|
|
5272
|
-
if (previous && previous !== rpc) {
|
|
5273
|
-
previous.dispose();
|
|
5274
|
-
}
|
|
5275
|
-
rpcs.set(rpcId, rpc);
|
|
5276
|
-
};
|
|
5277
|
-
const registerView = (uid, rpcId) => {
|
|
5278
|
-
if (rpcId === undefined) {
|
|
5279
|
-
viewRpcIds.delete(uid);
|
|
5280
|
-
return;
|
|
5281
|
-
}
|
|
5282
|
-
viewRpcIds.set(uid, rpcId);
|
|
5283
|
-
};
|
|
5284
|
-
const unregisterView = uid => {
|
|
5285
|
-
viewRpcIds.delete(uid);
|
|
5286
|
-
};
|
|
5287
|
-
|
|
5288
5307
|
const state$4 = {
|
|
5289
5308
|
currentDragInfo: undefined
|
|
5290
5309
|
};
|
|
@@ -5483,7 +5502,7 @@ const ViewletActivityBar = {
|
|
|
5483
5502
|
const executeViewletCommand$1 = 'Viewlet.executeViewletCommand';
|
|
5484
5503
|
const send = (method, uid, ...args) => {
|
|
5485
5504
|
if (method === executeViewletCommand$1) {
|
|
5486
|
-
const rpc = get(uid);
|
|
5505
|
+
const rpc = get$6(uid);
|
|
5487
5506
|
if (rpc) {
|
|
5488
5507
|
rpc.send(method, uid, ...args);
|
|
5489
5508
|
return;
|
|
@@ -5678,8 +5697,8 @@ const applyUidWorkaround = element => {
|
|
|
5678
5697
|
if (!editor) {
|
|
5679
5698
|
throw new Error('no editor found');
|
|
5680
5699
|
}
|
|
5681
|
-
const editorUid = get$
|
|
5682
|
-
set$
|
|
5700
|
+
const editorUid = get$7(editor);
|
|
5701
|
+
set$8(element, editorUid);
|
|
5683
5702
|
};
|
|
5684
5703
|
|
|
5685
5704
|
const startTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp) => {
|
|
@@ -7652,7 +7671,7 @@ const handleClickAction$1 = target => {
|
|
|
7652
7671
|
console.info('[panel] action command not found');
|
|
7653
7672
|
return;
|
|
7654
7673
|
}
|
|
7655
|
-
const childUid = get$
|
|
7674
|
+
const childUid = get$7(target);
|
|
7656
7675
|
handleClickAction$2(childUid, index, command);
|
|
7657
7676
|
};
|
|
7658
7677
|
const handleHeaderClick$1 = event => {
|
|
@@ -7831,7 +7850,7 @@ const setScreenCapture = (state, id) => {
|
|
|
7831
7850
|
$Viewlet
|
|
7832
7851
|
} = state;
|
|
7833
7852
|
const $Video = document.createElement('video');
|
|
7834
|
-
const screenCapture = get$
|
|
7853
|
+
const screenCapture = get$1(id);
|
|
7835
7854
|
$Video.srcObject = screenCapture;
|
|
7836
7855
|
$Video.onloadedmetadata = handleLoadedMetadata;
|
|
7837
7856
|
$Viewlet.append($Video);
|
|
@@ -8210,7 +8229,7 @@ const handleMouseDown$1 = event => {
|
|
|
8210
8229
|
if (!terminal) {
|
|
8211
8230
|
return;
|
|
8212
8231
|
}
|
|
8213
|
-
const terminalUid = get$
|
|
8232
|
+
const terminalUid = get$7(terminal);
|
|
8214
8233
|
if (!terminalUid) {
|
|
8215
8234
|
return;
|
|
8216
8235
|
}
|
|
@@ -8514,7 +8533,7 @@ const addMenu = ($$Menus, change, uid) => {
|
|
|
8514
8533
|
const menu = change[1];
|
|
8515
8534
|
const dom = change[2];
|
|
8516
8535
|
const $Menu = create$Menu();
|
|
8517
|
-
set$
|
|
8536
|
+
set$8($Menu, uid);
|
|
8518
8537
|
$Menu.onmouseover = handleMenuMouseOver;
|
|
8519
8538
|
$Menu.onclick = handleMenuClick;
|
|
8520
8539
|
const {
|
|
@@ -8774,7 +8793,7 @@ const setPort$1 = (state, portId, origin) => {
|
|
|
8774
8793
|
});
|
|
8775
8794
|
};
|
|
8776
8795
|
const setPosition = (state, id, x, y, width, height) => {
|
|
8777
|
-
const $Iframe = get
|
|
8796
|
+
const $Iframe = get(id);
|
|
8778
8797
|
if (!$Iframe) {
|
|
8779
8798
|
return;
|
|
8780
8799
|
}
|
|
@@ -8864,7 +8883,7 @@ const create$2 = (id, uid = id) => {
|
|
|
8864
8883
|
existing.state.$Viewlet.remove();
|
|
8865
8884
|
}
|
|
8866
8885
|
const instanceState = module.create();
|
|
8867
|
-
set$
|
|
8886
|
+
set$8(instanceState.$Viewlet, uid);
|
|
8868
8887
|
if (module.attachEvents) {
|
|
8869
8888
|
module.attachEvents(instanceState);
|
|
8870
8889
|
}
|
|
@@ -8888,7 +8907,7 @@ const createFunctionalRoot = (id, uid = id, hasFunctionalEvents, directEventRpcI
|
|
|
8888
8907
|
const instanceState = {
|
|
8889
8908
|
$Viewlet: document.createElement('div')
|
|
8890
8909
|
};
|
|
8891
|
-
set$
|
|
8910
|
+
set$8(instanceState.$Viewlet, uid);
|
|
8892
8911
|
registerView(uid, directEventRpcId);
|
|
8893
8912
|
set$a(uid, {
|
|
8894
8913
|
factory: module,
|
|
@@ -9013,7 +9032,7 @@ const setUid = (viewletId, uid) => {
|
|
|
9013
9032
|
const {
|
|
9014
9033
|
$Viewlet
|
|
9015
9034
|
} = instance.state;
|
|
9016
|
-
set$
|
|
9035
|
+
set$8($Viewlet, uid);
|
|
9017
9036
|
};
|
|
9018
9037
|
const focusCallback = {
|
|
9019
9038
|
id: 0,
|
|
@@ -9117,14 +9136,14 @@ const setDom2 = (viewletId, dom) => {
|
|
|
9117
9136
|
let uid;
|
|
9118
9137
|
if ($Viewlet) {
|
|
9119
9138
|
try {
|
|
9120
|
-
uid = get$
|
|
9139
|
+
uid = get$7($Viewlet);
|
|
9121
9140
|
} catch {}
|
|
9122
9141
|
}
|
|
9123
9142
|
// TODO optimize rendering with virtual DOM diffing
|
|
9124
9143
|
const $NewViewlet = rememberFocus($Viewlet, dom, Events, viewletId);
|
|
9125
9144
|
if (uid) {
|
|
9126
9145
|
// @ts-ignore
|
|
9127
|
-
set$
|
|
9146
|
+
set$8($NewViewlet, uid);
|
|
9128
9147
|
}
|
|
9129
9148
|
set$a(viewletId, {
|
|
9130
9149
|
...instance,
|
|
@@ -9623,12 +9642,12 @@ const create$1 = async (uid, src, sandbox, csp, credentialless, permissionPolicy
|
|
|
9623
9642
|
// TODO make make waitForFrameToLoad a separate command
|
|
9624
9643
|
};
|
|
9625
9644
|
const loadOnly = async uid => {
|
|
9626
|
-
const $Iframe = get
|
|
9645
|
+
const $Iframe = get(uid);
|
|
9627
9646
|
const promise = waitForFrameToLoad($Iframe);
|
|
9628
9647
|
await promise;
|
|
9629
9648
|
};
|
|
9630
9649
|
const appendOnly = async uid => {
|
|
9631
|
-
const $Iframe = get
|
|
9650
|
+
const $Iframe = get(uid);
|
|
9632
9651
|
const parent = document.getElementById('Workbench');
|
|
9633
9652
|
parent.append($Iframe);
|
|
9634
9653
|
};
|
|
@@ -9637,7 +9656,7 @@ const appendOnly = async uid => {
|
|
|
9637
9656
|
* @deprecated use loadOnly and appendOnly instead
|
|
9638
9657
|
*/
|
|
9639
9658
|
const load = async uid => {
|
|
9640
|
-
const $Iframe = get
|
|
9659
|
+
const $Iframe = get(uid);
|
|
9641
9660
|
const promise = waitForFrameToLoad($Iframe);
|
|
9642
9661
|
const parent = document.getElementById('Workbench');
|
|
9643
9662
|
parent.append($Iframe);
|
|
@@ -9646,7 +9665,7 @@ const load = async uid => {
|
|
|
9646
9665
|
|
|
9647
9666
|
// TODO rename to sendMessage
|
|
9648
9667
|
const setPort = (uid, port, origin, portType) => {
|
|
9649
|
-
const $Iframe = get
|
|
9668
|
+
const $Iframe = get(uid);
|
|
9650
9669
|
// TODO use jsonrpc invoke
|
|
9651
9670
|
const {
|
|
9652
9671
|
contentWindow
|
|
@@ -9661,7 +9680,7 @@ const setPort = (uid, port, origin, portType) => {
|
|
|
9661
9680
|
}, origin, [port]);
|
|
9662
9681
|
};
|
|
9663
9682
|
const dispose$2 = uid => {
|
|
9664
|
-
const $Iframe = get
|
|
9683
|
+
const $Iframe = get(uid);
|
|
9665
9684
|
$Iframe.remove();
|
|
9666
9685
|
remove(uid);
|
|
9667
9686
|
};
|
|
@@ -9853,8 +9872,10 @@ const commandMap = {
|
|
|
9853
9872
|
'Css.addCssStyleSheet': addCssStyleSheet,
|
|
9854
9873
|
'Css.getSelectionText': getSelectionText,
|
|
9855
9874
|
'Developer.showState': showState,
|
|
9875
|
+
'DirectView.getFocusedUid': getFocusedViewUid,
|
|
9876
|
+
'DirectView.getUid': getViewUid,
|
|
9856
9877
|
'Download.downloadFile': downloadFile,
|
|
9857
|
-
'FileHandles.get': get$
|
|
9878
|
+
'FileHandles.get': get$5,
|
|
9858
9879
|
'FilePicker.showDirectoryPicker': showDirectoryPicker,
|
|
9859
9880
|
'FilePicker.showFilePicker': showFilePicker,
|
|
9860
9881
|
'FilePicker.showSaveFilePicker': showSaveFilePicker,
|
|
@@ -10247,7 +10268,7 @@ const hydrate$1 = async () => {
|
|
|
10247
10268
|
} = new MessageChannel();
|
|
10248
10269
|
// TODO only launch port and send to renderer worker
|
|
10249
10270
|
const promise = launchEditorWorker(port1);
|
|
10250
|
-
set$
|
|
10271
|
+
set$6('Editor Worker', port2);
|
|
10251
10272
|
const result = await promise;
|
|
10252
10273
|
if (isError(result)) {
|
|
10253
10274
|
remove$2('Editor Worker');
|
|
@@ -10283,7 +10304,7 @@ const hydrate = async () => {
|
|
|
10283
10304
|
} = new MessageChannel();
|
|
10284
10305
|
// TODO only launch port and send to renderer worker
|
|
10285
10306
|
const promise = launchSyntaxHighlightingWorker(port1);
|
|
10286
|
-
set$
|
|
10307
|
+
set$6('Syntax Highlighting Worker', port2);
|
|
10287
10308
|
const result = await promise;
|
|
10288
10309
|
if (isError(result)) {
|
|
10289
10310
|
remove$2('Syntax Highlighting Worker');
|
|
@@ -10486,6 +10507,10 @@ const mountTerminal = async (state, uid) => {
|
|
|
10486
10507
|
state.disposables = [inputDisposable, resizeDisposable];
|
|
10487
10508
|
fitAddon.fit();
|
|
10488
10509
|
flushPendingData(state);
|
|
10510
|
+
if (state.pendingFocus) {
|
|
10511
|
+
state.pendingFocus = false;
|
|
10512
|
+
terminal.focus();
|
|
10513
|
+
}
|
|
10489
10514
|
};
|
|
10490
10515
|
const create = () => {
|
|
10491
10516
|
const $Viewlet = document.createElement('div');
|
|
@@ -10498,6 +10523,7 @@ const create = () => {
|
|
|
10498
10523
|
mountPromise: undefined,
|
|
10499
10524
|
mouseDownListener: undefined,
|
|
10500
10525
|
pendingData: [],
|
|
10526
|
+
pendingFocus: false,
|
|
10501
10527
|
resizeObserver: undefined,
|
|
10502
10528
|
terminal: undefined
|
|
10503
10529
|
};
|
|
@@ -10529,8 +10555,10 @@ const focus = state => {
|
|
|
10529
10555
|
terminal
|
|
10530
10556
|
} = state;
|
|
10531
10557
|
if (!terminal) {
|
|
10558
|
+
state.pendingFocus = true;
|
|
10532
10559
|
return;
|
|
10533
10560
|
}
|
|
10561
|
+
state.pendingFocus = false;
|
|
10534
10562
|
terminal.focus();
|
|
10535
10563
|
};
|
|
10536
10564
|
const handleMouseDown = state => {
|
|
@@ -10556,6 +10584,7 @@ const dispose = state => {
|
|
|
10556
10584
|
}
|
|
10557
10585
|
state.disposables = [];
|
|
10558
10586
|
state.pendingData.length = 0;
|
|
10587
|
+
state.pendingFocus = false;
|
|
10559
10588
|
state.resizeObserver?.disconnect();
|
|
10560
10589
|
state.resizeObserver = undefined;
|
|
10561
10590
|
state.terminal?.dispose();
|