@lvce-editor/renderer-process 13.14.0 → 13.16.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 +165 -61
- package/package.json +1 -1
|
@@ -297,9 +297,9 @@ const initializeModule = module => {
|
|
|
297
297
|
for (const [key, value] of Object.entries(module.Commands)) {
|
|
298
298
|
if (module.name) {
|
|
299
299
|
const actualKey = `${module.name}.${key}`;
|
|
300
|
-
register(actualKey, value);
|
|
300
|
+
register$1(actualKey, value);
|
|
301
301
|
} else {
|
|
302
|
-
register(key, value);
|
|
302
|
+
register$1(key, value);
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
return;
|
|
@@ -327,7 +327,7 @@ const getOrLoadModule = moduleId => {
|
|
|
327
327
|
const loadCommand = async command => {
|
|
328
328
|
await getOrLoadModule(getModuleId(command));
|
|
329
329
|
};
|
|
330
|
-
const register = (commandId, listener) => {
|
|
330
|
+
const register$1 = (commandId, listener) => {
|
|
331
331
|
state$a.commands[commandId] = listener;
|
|
332
332
|
};
|
|
333
333
|
const hasThrown = new Set();
|
|
@@ -344,9 +344,9 @@ const executeCommandAsync = async (command, ...args) => {
|
|
|
344
344
|
hasThrown.add(command);
|
|
345
345
|
throw new Error(`Command did not register "${command}"`);
|
|
346
346
|
}
|
|
347
|
-
return execute(command, ...args);
|
|
347
|
+
return execute$1(command, ...args);
|
|
348
348
|
};
|
|
349
|
-
const execute = (command, ...args) => {
|
|
349
|
+
const execute$1 = (command, ...args) => {
|
|
350
350
|
if (command in state$a.commands) {
|
|
351
351
|
const fn = state$a.commands[command];
|
|
352
352
|
if (typeof fn !== 'function') {
|
|
@@ -361,7 +361,7 @@ const setLoad = load => {
|
|
|
361
361
|
};
|
|
362
362
|
|
|
363
363
|
const ipcs = Object.create(null);
|
|
364
|
-
const set$
|
|
364
|
+
const set$a = (name, ipc) => {
|
|
365
365
|
ipcs[name] = ipc;
|
|
366
366
|
};
|
|
367
367
|
const get$9 = name => {
|
|
@@ -469,7 +469,7 @@ const create$4$1 = (method, params) => {
|
|
|
469
469
|
};
|
|
470
470
|
};
|
|
471
471
|
const callbacks = Object.create(null);
|
|
472
|
-
const set$
|
|
472
|
+
const set$9 = (id, fn) => {
|
|
473
473
|
callbacks[id] = fn;
|
|
474
474
|
};
|
|
475
475
|
const get$8 = id => {
|
|
@@ -488,7 +488,7 @@ const registerPromise = () => {
|
|
|
488
488
|
resolve,
|
|
489
489
|
promise
|
|
490
490
|
} = Promise.withResolvers();
|
|
491
|
-
set$
|
|
491
|
+
set$9(id, resolve);
|
|
492
492
|
return {
|
|
493
493
|
id,
|
|
494
494
|
promise
|
|
@@ -839,30 +839,30 @@ const invokeAndTransfer$1 = (ipc, method, ...params) => {
|
|
|
839
839
|
return invokeHelper(ipc, method, params, true);
|
|
840
840
|
};
|
|
841
841
|
|
|
842
|
-
const requiresSocket = () => {
|
|
842
|
+
const requiresSocket$1 = () => {
|
|
843
843
|
return false;
|
|
844
844
|
};
|
|
845
|
-
const preparePrettyError = error => {
|
|
845
|
+
const preparePrettyError$1 = error => {
|
|
846
846
|
return error;
|
|
847
847
|
};
|
|
848
|
-
const logError$
|
|
848
|
+
const logError$2 = error => {
|
|
849
849
|
// error is logged in renderer worker
|
|
850
850
|
};
|
|
851
|
-
const handleMessage = event => {
|
|
852
|
-
return handleJsonRpcMessage(event.target, event.data, execute, resolve, preparePrettyError, logError$
|
|
851
|
+
const handleMessage$1 = event => {
|
|
852
|
+
return handleJsonRpcMessage(event.target, event.data, execute$1, resolve, preparePrettyError$1, logError$2, requiresSocket$1);
|
|
853
853
|
};
|
|
854
854
|
|
|
855
|
-
const handleIpc = ipc => {
|
|
855
|
+
const handleIpc$1 = ipc => {
|
|
856
856
|
if ('addEventListener' in ipc) {
|
|
857
|
-
ipc.addEventListener('message', handleMessage);
|
|
857
|
+
ipc.addEventListener('message', handleMessage$1);
|
|
858
858
|
} else {
|
|
859
859
|
// deprevated
|
|
860
|
-
ipc.onmessage = handleMessage;
|
|
860
|
+
ipc.onmessage = handleMessage$1;
|
|
861
861
|
}
|
|
862
862
|
};
|
|
863
863
|
const unhandleIpc = ipc => {
|
|
864
864
|
if ('removeEventListener' in ipc) {
|
|
865
|
-
ipc.removeEventListener('message', handleMessage);
|
|
865
|
+
ipc.removeEventListener('message', handleMessage$1);
|
|
866
866
|
} else {
|
|
867
867
|
// deprecated
|
|
868
868
|
ipc.onmessage = null;
|
|
@@ -992,7 +992,7 @@ const state$9 = {
|
|
|
992
992
|
};
|
|
993
993
|
const hydrate$4 = async () => {
|
|
994
994
|
const ipc = await launchRendererWorker();
|
|
995
|
-
handleIpc(ipc);
|
|
995
|
+
handleIpc$1(ipc);
|
|
996
996
|
// @ts-expect-error
|
|
997
997
|
state$9.ipc = ipc;
|
|
998
998
|
};
|
|
@@ -1069,7 +1069,7 @@ const hydrate$3 = async () => {
|
|
|
1069
1069
|
} = new MessageChannel();
|
|
1070
1070
|
// TODO only launch port and send to renderer worker
|
|
1071
1071
|
const promise = launchEditorWorker(port1);
|
|
1072
|
-
set$
|
|
1072
|
+
set$a('Editor Worker', port2);
|
|
1073
1073
|
await promise;
|
|
1074
1074
|
};
|
|
1075
1075
|
|
|
@@ -1100,7 +1100,7 @@ const hydrate$2 = async () => {
|
|
|
1100
1100
|
// TODO only launch port and send to renderer worker
|
|
1101
1101
|
const promise = launchExtensionHostWorker(port1);
|
|
1102
1102
|
const name = isElectron ? 'Extension Host (Electron)' : 'Extension Host';
|
|
1103
|
-
set$
|
|
1103
|
+
set$a(name, port2);
|
|
1104
1104
|
await promise;
|
|
1105
1105
|
};
|
|
1106
1106
|
|
|
@@ -1123,7 +1123,7 @@ const hydrate$1 = async () => {
|
|
|
1123
1123
|
} = new MessageChannel();
|
|
1124
1124
|
// TODO only launch port and send to renderer worker
|
|
1125
1125
|
const promise = launchSyntaxHighlightingWorker(port1);
|
|
1126
|
-
set$
|
|
1126
|
+
set$a('Syntax Highlighting Worker', port2);
|
|
1127
1127
|
await promise;
|
|
1128
1128
|
};
|
|
1129
1129
|
|
|
@@ -1490,7 +1490,7 @@ const cache$1 = new Map();
|
|
|
1490
1490
|
const has = listener => {
|
|
1491
1491
|
return cache$1.has(listener);
|
|
1492
1492
|
};
|
|
1493
|
-
const set$
|
|
1493
|
+
const set$8 = (listener, value) => {
|
|
1494
1494
|
cache$1.set(listener, value);
|
|
1495
1495
|
};
|
|
1496
1496
|
const get$7 = listener => {
|
|
@@ -1517,7 +1517,7 @@ const getWrappedListener$1 = (listener, returnValue) => {
|
|
|
1517
1517
|
ipc.send('Viewlet.executeViewletCommand', uid, ...result);
|
|
1518
1518
|
};
|
|
1519
1519
|
nameAnonymousFunction$1(wrapped, listener.name);
|
|
1520
|
-
set$
|
|
1520
|
+
set$8(listener, wrapped);
|
|
1521
1521
|
}
|
|
1522
1522
|
return get$7(listener);
|
|
1523
1523
|
};
|
|
@@ -1739,6 +1739,13 @@ const applyPatch = ($Element, patches) => {
|
|
|
1739
1739
|
}
|
|
1740
1740
|
}
|
|
1741
1741
|
};
|
|
1742
|
+
const dragInfos = Object.create(null);
|
|
1743
|
+
const setDragInfo = (id, data) => {
|
|
1744
|
+
dragInfos[id] = data;
|
|
1745
|
+
};
|
|
1746
|
+
const getDragInfo = id => {
|
|
1747
|
+
return dragInfos[id];
|
|
1748
|
+
};
|
|
1742
1749
|
let id = 0;
|
|
1743
1750
|
const create$H = () => {
|
|
1744
1751
|
return ++id;
|
|
@@ -1763,6 +1770,36 @@ const addFileHandle$1 = fileHandle => {
|
|
|
1763
1770
|
const promise = Promise.resolve(fileHandle);
|
|
1764
1771
|
return add(promise);
|
|
1765
1772
|
};
|
|
1773
|
+
const setDragImage = (dataTransfer, label) => {
|
|
1774
|
+
const dragImage = document.createElement('div');
|
|
1775
|
+
dragImage.className = 'DragImage';
|
|
1776
|
+
dragImage.textContent = label;
|
|
1777
|
+
document.body.append(dragImage);
|
|
1778
|
+
dataTransfer.setDragImage(dragImage, -10, -10);
|
|
1779
|
+
const handleTimeOut = () => {
|
|
1780
|
+
dragImage.remove();
|
|
1781
|
+
};
|
|
1782
|
+
setTimeout(handleTimeOut, 0);
|
|
1783
|
+
};
|
|
1784
|
+
const applyDragInfoMaybe = event => {
|
|
1785
|
+
const {
|
|
1786
|
+
target,
|
|
1787
|
+
dataTransfer
|
|
1788
|
+
} = event;
|
|
1789
|
+
if (dataTransfer) {
|
|
1790
|
+
const uid = getComponentUid(target);
|
|
1791
|
+
const dragInfo = getDragInfo(uid);
|
|
1792
|
+
if (!dragInfo) {
|
|
1793
|
+
return;
|
|
1794
|
+
}
|
|
1795
|
+
for (const item of dragInfo) {
|
|
1796
|
+
dataTransfer.setData(item.type, item.data);
|
|
1797
|
+
}
|
|
1798
|
+
if (dragInfo.label) {
|
|
1799
|
+
setDragImage(dataTransfer, dragInfo.label);
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
};
|
|
1766
1803
|
let ignore = false;
|
|
1767
1804
|
const startIgnore = () => {
|
|
1768
1805
|
ignore = true;
|
|
@@ -1867,6 +1904,7 @@ const createFn = info => {
|
|
|
1867
1904
|
const uid = getComponentUidFromEvent(event);
|
|
1868
1905
|
const args = getEventListenerArgs(info.params, event);
|
|
1869
1906
|
preventEventsMaybe(info, event);
|
|
1907
|
+
applyDragInfoMaybe(event);
|
|
1870
1908
|
if (args.length === 0) {
|
|
1871
1909
|
return;
|
|
1872
1910
|
}
|
|
@@ -2000,7 +2038,7 @@ const rememberFocus$1 = ($Viewlet, dom, eventMap, uid = 0) => {
|
|
|
2000
2038
|
return $Viewlet;
|
|
2001
2039
|
};
|
|
2002
2040
|
|
|
2003
|
-
const set$
|
|
2041
|
+
const set$7 = setComponentUid;
|
|
2004
2042
|
const get$6 = getComponentUid;
|
|
2005
2043
|
const fromEvent = getComponentUidFromEvent;
|
|
2006
2044
|
|
|
@@ -2012,7 +2050,7 @@ const applyUidWorkaround = element => {
|
|
|
2012
2050
|
throw new Error('no editor found');
|
|
2013
2051
|
}
|
|
2014
2052
|
const editorUid = get$6(editor);
|
|
2015
|
-
set$
|
|
2053
|
+
set$7(element, editorUid);
|
|
2016
2054
|
};
|
|
2017
2055
|
|
|
2018
2056
|
const setBounds$a = ($Element, x, y, width, height) => {
|
|
@@ -3451,14 +3489,14 @@ const getMessage = error => {
|
|
|
3451
3489
|
return `Error: ${error}`;
|
|
3452
3490
|
};
|
|
3453
3491
|
|
|
3454
|
-
const logError = async (error, prefix = '') => {
|
|
3492
|
+
const logError$1 = async (error, prefix = '') => {
|
|
3455
3493
|
const prettyError = await prepare(error);
|
|
3456
3494
|
print(prettyError, prefix);
|
|
3457
3495
|
return prettyError;
|
|
3458
3496
|
};
|
|
3459
3497
|
const handleError$6 = async (error, notify = true, prefix = '') => {
|
|
3460
3498
|
try {
|
|
3461
|
-
const prettyError = await logError(error, prefix);
|
|
3499
|
+
const prettyError = await logError$1(error, prefix);
|
|
3462
3500
|
if (notify) {
|
|
3463
3501
|
alert(getMessage(prettyError));
|
|
3464
3502
|
}
|
|
@@ -3742,7 +3780,7 @@ const create$z = async ({
|
|
|
3742
3780
|
throw new IpcError$1(`worker must be of type Worker`);
|
|
3743
3781
|
}
|
|
3744
3782
|
const ipc = wrap(worker);
|
|
3745
|
-
handleIpc(ipc);
|
|
3783
|
+
handleIpc$1(ipc);
|
|
3746
3784
|
// TODO await promise
|
|
3747
3785
|
// TODO call separate method HandleMessagePort.handleMessagePort or
|
|
3748
3786
|
// HandleIncomingIpc.handleIncomingIpc
|
|
@@ -3756,17 +3794,6 @@ const IpcParentWithModuleWorkerWithMessagePort = {
|
|
|
3756
3794
|
create: create$z
|
|
3757
3795
|
};
|
|
3758
3796
|
|
|
3759
|
-
const handleIpcOnce = ipc => {
|
|
3760
|
-
if (ipc.addEventListener) {
|
|
3761
|
-
ipc.addEventListener('message', handleMessage, {
|
|
3762
|
-
once: true
|
|
3763
|
-
});
|
|
3764
|
-
} else {
|
|
3765
|
-
// deprecated
|
|
3766
|
-
ipc.onmessage = handleMessage;
|
|
3767
|
-
}
|
|
3768
|
-
};
|
|
3769
|
-
|
|
3770
3797
|
const normalizeLine = line => {
|
|
3771
3798
|
if (line.startsWith('Error: ')) {
|
|
3772
3799
|
return line.slice('Error: '.length);
|
|
@@ -4268,6 +4295,81 @@ const IpcChildWithModuleWorkerAndMessagePort$1 = {
|
|
|
4268
4295
|
wrap: wrap$e
|
|
4269
4296
|
};
|
|
4270
4297
|
|
|
4298
|
+
const commands = Object.create(null);
|
|
4299
|
+
const register = commandMap => {
|
|
4300
|
+
Object.assign(commands, commandMap);
|
|
4301
|
+
};
|
|
4302
|
+
const getCommand = key => {
|
|
4303
|
+
return commands[key];
|
|
4304
|
+
};
|
|
4305
|
+
const execute = (command, ...args) => {
|
|
4306
|
+
const fn = getCommand(command);
|
|
4307
|
+
if (!fn) {
|
|
4308
|
+
throw new Error(`command not found ${command}`);
|
|
4309
|
+
}
|
|
4310
|
+
return fn(...args);
|
|
4311
|
+
};
|
|
4312
|
+
|
|
4313
|
+
const createRpc = ipc => {
|
|
4314
|
+
const rpc = {
|
|
4315
|
+
// @ts-ignore
|
|
4316
|
+
ipc,
|
|
4317
|
+
/**
|
|
4318
|
+
* @deprecated
|
|
4319
|
+
*/
|
|
4320
|
+
send(method, ...params) {
|
|
4321
|
+
send$1(ipc, method, ...params);
|
|
4322
|
+
},
|
|
4323
|
+
invoke(method, ...params) {
|
|
4324
|
+
return invoke$2(ipc, method, ...params);
|
|
4325
|
+
},
|
|
4326
|
+
invokeAndTransfer(method, ...params) {
|
|
4327
|
+
return invokeAndTransfer$1(ipc, method, ...params);
|
|
4328
|
+
},
|
|
4329
|
+
async dispose() {
|
|
4330
|
+
await ipc?.dispose();
|
|
4331
|
+
}
|
|
4332
|
+
};
|
|
4333
|
+
return rpc;
|
|
4334
|
+
};
|
|
4335
|
+
const requiresSocket = () => {
|
|
4336
|
+
return false;
|
|
4337
|
+
};
|
|
4338
|
+
const preparePrettyError = error => {
|
|
4339
|
+
return error;
|
|
4340
|
+
};
|
|
4341
|
+
const logError = () => {
|
|
4342
|
+
// handled by renderer worker
|
|
4343
|
+
};
|
|
4344
|
+
const handleMessage = event => {
|
|
4345
|
+
const actualRequiresSocket = event?.target?.requiresSocket || requiresSocket;
|
|
4346
|
+
const actualExecute = event?.target?.execute || execute;
|
|
4347
|
+
return handleJsonRpcMessage(event.target, event.data, actualExecute, resolve, preparePrettyError, logError, actualRequiresSocket);
|
|
4348
|
+
};
|
|
4349
|
+
const handleIpc = ipc => {
|
|
4350
|
+
if ('addEventListener' in ipc) {
|
|
4351
|
+
ipc.addEventListener('message', handleMessage);
|
|
4352
|
+
} else if ('on' in ipc) {
|
|
4353
|
+
// deprecated
|
|
4354
|
+
ipc.on('message', handleMessage);
|
|
4355
|
+
}
|
|
4356
|
+
};
|
|
4357
|
+
const create$f$1 = async ({
|
|
4358
|
+
commandMap,
|
|
4359
|
+
window
|
|
4360
|
+
}) => {
|
|
4361
|
+
// TODO create a commandMap per rpc instance
|
|
4362
|
+
register(commandMap);
|
|
4363
|
+
const ipc = IpcChildWithElectronWindow$1.wrap(window);
|
|
4364
|
+
handleIpc(ipc);
|
|
4365
|
+
const rpc = createRpc(ipc);
|
|
4366
|
+
return rpc;
|
|
4367
|
+
};
|
|
4368
|
+
const ElectronWindowRpcClient = {
|
|
4369
|
+
__proto__: null,
|
|
4370
|
+
create: create$f$1
|
|
4371
|
+
};
|
|
4372
|
+
|
|
4271
4373
|
// TODO use handleIncomingIpc function
|
|
4272
4374
|
const create$y = async ({
|
|
4273
4375
|
port,
|
|
@@ -4277,9 +4379,11 @@ const create$y = async ({
|
|
|
4277
4379
|
if (!isElectron) {
|
|
4278
4380
|
throw new Error('Electron api was requested but is not available');
|
|
4279
4381
|
}
|
|
4280
|
-
const
|
|
4281
|
-
|
|
4282
|
-
|
|
4382
|
+
const rpc = await ElectronWindowRpcClient.create({
|
|
4383
|
+
commandMap: {},
|
|
4384
|
+
window
|
|
4385
|
+
});
|
|
4386
|
+
const webContentsIds = await rpc.invokeAndTransfer('CreateMessagePort.createMessagePort', ipcId, port);
|
|
4283
4387
|
return webContentsIds;
|
|
4284
4388
|
};
|
|
4285
4389
|
|
|
@@ -4405,7 +4509,7 @@ const FileHandles_ipc = {
|
|
|
4405
4509
|
const state$5 = {
|
|
4406
4510
|
styleSheets: Object.create(null)
|
|
4407
4511
|
};
|
|
4408
|
-
const set$
|
|
4512
|
+
const set$6 = (id, sheet) => {
|
|
4409
4513
|
state$5.styleSheets[id] = sheet;
|
|
4410
4514
|
};
|
|
4411
4515
|
const get$5 = id => {
|
|
@@ -4419,7 +4523,7 @@ const addCssStyleSheet = async (id, text) => {
|
|
|
4419
4523
|
return;
|
|
4420
4524
|
}
|
|
4421
4525
|
const sheet = new CSSStyleSheet({});
|
|
4422
|
-
set$
|
|
4526
|
+
set$6(id, sheet);
|
|
4423
4527
|
await sheet.replace(text);
|
|
4424
4528
|
document.adoptedStyleSheets.push(sheet);
|
|
4425
4529
|
};
|
|
@@ -4970,7 +5074,7 @@ const state$3 = {
|
|
|
4970
5074
|
const get$4 = id => {
|
|
4971
5075
|
return state$3.canvasObjects[id];
|
|
4972
5076
|
};
|
|
4973
|
-
const set$
|
|
5077
|
+
const set$5 = (canvasId, canvas) => {
|
|
4974
5078
|
state$3.canvasObjects[canvasId] = canvas;
|
|
4975
5079
|
};
|
|
4976
5080
|
|
|
@@ -4980,7 +5084,7 @@ const get$3 = id => {
|
|
|
4980
5084
|
const create$u = async (canvasId, objectId) => {
|
|
4981
5085
|
const canvas = document.createElement('canvas');
|
|
4982
5086
|
const offscreenCanvas = canvas.transferControlToOffscreen();
|
|
4983
|
-
set$
|
|
5087
|
+
set$5(canvasId, canvas);
|
|
4984
5088
|
await invokeAndTransfer('Transferrable.transfer', objectId, offscreenCanvas);
|
|
4985
5089
|
};
|
|
4986
5090
|
|
|
@@ -5421,7 +5525,7 @@ const screenCaptures = Object.create(null);
|
|
|
5421
5525
|
const get$2 = id => {
|
|
5422
5526
|
return screenCaptures[id];
|
|
5423
5527
|
};
|
|
5424
|
-
const set$
|
|
5528
|
+
const set$4 = (id, captureStream) => {
|
|
5425
5529
|
screenCaptures[id] = captureStream;
|
|
5426
5530
|
};
|
|
5427
5531
|
const remove$1 = id => {
|
|
@@ -5437,7 +5541,7 @@ const start = async (id, options) => {
|
|
|
5437
5541
|
number(id);
|
|
5438
5542
|
object(options);
|
|
5439
5543
|
const captureStream = await navigator.mediaDevices.getUserMedia(options);
|
|
5440
|
-
set$
|
|
5544
|
+
set$4(id, captureStream);
|
|
5441
5545
|
} catch (error) {
|
|
5442
5546
|
throw new VError$1(error, `Failed to start screen capture`);
|
|
5443
5547
|
}
|
|
@@ -5999,7 +6103,7 @@ const TestFrameWork_ipc = {
|
|
|
5999
6103
|
};
|
|
6000
6104
|
|
|
6001
6105
|
const webViews = Object.create(null);
|
|
6002
|
-
const set$
|
|
6106
|
+
const set$3 = (id, webView) => {
|
|
6003
6107
|
webViews[id] = webView;
|
|
6004
6108
|
};
|
|
6005
6109
|
const get = id => {
|
|
@@ -6055,6 +6159,10 @@ const Transferrable_ipc = {
|
|
|
6055
6159
|
name: name$9
|
|
6056
6160
|
};
|
|
6057
6161
|
|
|
6162
|
+
const set$2 = (id, data) => {
|
|
6163
|
+
setDragInfo(id, data);
|
|
6164
|
+
};
|
|
6165
|
+
|
|
6058
6166
|
const state = {
|
|
6059
6167
|
identifiers: new Uint32Array()
|
|
6060
6168
|
};
|
|
@@ -9892,7 +10000,7 @@ const setMenus = (state, changes, uid) => {
|
|
|
9892
10000
|
const menu = change[1];
|
|
9893
10001
|
const dom = change[2];
|
|
9894
10002
|
const $Menu = create$Menu();
|
|
9895
|
-
set$
|
|
10003
|
+
set$7($Menu, uid);
|
|
9896
10004
|
$Menu.onmouseover = handleMenuMouseOver;
|
|
9897
10005
|
$Menu.onclick = handleMenuClick;
|
|
9898
10006
|
const {
|
|
@@ -10093,7 +10201,7 @@ const setIframe = (state, src, sandbox = [], srcDoc = '', csp = '', credentialle
|
|
|
10093
10201
|
$Iframe.className = 'E2eTestIframe WebViewIframe';
|
|
10094
10202
|
$Parent.append($Iframe);
|
|
10095
10203
|
state.frame = $Iframe;
|
|
10096
|
-
set$
|
|
10204
|
+
set$3(1, $Iframe);
|
|
10097
10205
|
};
|
|
10098
10206
|
const setPort$1 = (state, portId, origin) => {
|
|
10099
10207
|
const port = acquire(portId);
|
|
@@ -10255,7 +10363,7 @@ const create$3 = (id, uid = id) => {
|
|
|
10255
10363
|
state$6.instances[id].state.$Viewlet.remove();
|
|
10256
10364
|
}
|
|
10257
10365
|
const instanceState = module.create();
|
|
10258
|
-
set$
|
|
10366
|
+
set$7(instanceState.$Viewlet, uid);
|
|
10259
10367
|
if (module.attachEvents) {
|
|
10260
10368
|
module.attachEvents(instanceState);
|
|
10261
10369
|
}
|
|
@@ -10385,7 +10493,7 @@ const setUid = (viewletId, uid) => {
|
|
|
10385
10493
|
const {
|
|
10386
10494
|
$Viewlet
|
|
10387
10495
|
} = instance.state;
|
|
10388
|
-
set$
|
|
10496
|
+
set$7($Viewlet, uid);
|
|
10389
10497
|
};
|
|
10390
10498
|
const focusSelector = (viewletId, selector) => {
|
|
10391
10499
|
const instance = state$6.instances[viewletId];
|
|
@@ -10435,11 +10543,7 @@ const createPlaceholder = (viewletId, parentId, top, left, width, height) => {
|
|
|
10435
10543
|
};
|
|
10436
10544
|
};
|
|
10437
10545
|
const setDragData = (viewletId, dragData) => {
|
|
10438
|
-
|
|
10439
|
-
if (!instance) {
|
|
10440
|
-
return;
|
|
10441
|
-
}
|
|
10442
|
-
instance.state.dragData = dragData;
|
|
10546
|
+
set$2(viewletId, dragData);
|
|
10443
10547
|
};
|
|
10444
10548
|
const setDom = (viewletId, dom) => {
|
|
10445
10549
|
const instance = state$6.instances[viewletId];
|
|
@@ -10475,7 +10579,7 @@ const setDom2 = (viewletId, dom) => {
|
|
|
10475
10579
|
const $NewViewlet = rememberFocus($Viewlet, dom, Events, viewletId);
|
|
10476
10580
|
if (uid) {
|
|
10477
10581
|
// @ts-ignore
|
|
10478
|
-
set$
|
|
10582
|
+
set$7($NewViewlet, uid);
|
|
10479
10583
|
}
|
|
10480
10584
|
instance.state.$Viewlet = $NewViewlet;
|
|
10481
10585
|
};
|
|
@@ -11075,7 +11179,7 @@ const handleMessagePort = async port => {
|
|
|
11075
11179
|
method: MessagePort$1,
|
|
11076
11180
|
port
|
|
11077
11181
|
});
|
|
11078
|
-
handleIpc(ipc);
|
|
11182
|
+
handleIpc$1(ipc);
|
|
11079
11183
|
};
|
|
11080
11184
|
|
|
11081
11185
|
const name$1 = 'HandleMessagePort';
|
|
@@ -11120,7 +11224,7 @@ const create$2 = async (uid, src, sandbox, csp, credentialless, permissionPolicy
|
|
|
11120
11224
|
if (title) {
|
|
11121
11225
|
$Iframe.title = title;
|
|
11122
11226
|
}
|
|
11123
|
-
set$
|
|
11227
|
+
set$3(uid, $Iframe);
|
|
11124
11228
|
// TODO make make waitForFrameToLoad a separate command
|
|
11125
11229
|
};
|
|
11126
11230
|
const loadOnly = async uid => {
|