@lvce-editor/renderer-process 29.5.0 → 30.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 +242 -175
- package/package.json +1 -1
|
@@ -146,7 +146,7 @@ const getSelectionText = () => {
|
|
|
146
146
|
const warn$1 = (...args) => {
|
|
147
147
|
console.warn(...args);
|
|
148
148
|
};
|
|
149
|
-
const error = (...args) => {
|
|
149
|
+
const error$1 = (...args) => {
|
|
150
150
|
console.error(...args);
|
|
151
151
|
};
|
|
152
152
|
const info = (...args) => {
|
|
@@ -3370,16 +3370,36 @@ const has = name => {
|
|
|
3370
3370
|
|
|
3371
3371
|
const commandMapRef = {};
|
|
3372
3372
|
|
|
3373
|
+
const success = value => {
|
|
3374
|
+
return {
|
|
3375
|
+
ok: true,
|
|
3376
|
+
value
|
|
3377
|
+
};
|
|
3378
|
+
};
|
|
3379
|
+
const error = error => {
|
|
3380
|
+
return {
|
|
3381
|
+
error,
|
|
3382
|
+
ok: false
|
|
3383
|
+
};
|
|
3384
|
+
};
|
|
3385
|
+
const isError = result => {
|
|
3386
|
+
return !result.ok;
|
|
3387
|
+
};
|
|
3388
|
+
|
|
3373
3389
|
const launchWorker = async ({
|
|
3374
3390
|
name,
|
|
3375
3391
|
url
|
|
3376
3392
|
}) => {
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3393
|
+
try {
|
|
3394
|
+
const rpc = await create$B({
|
|
3395
|
+
commandMap: commandMapRef,
|
|
3396
|
+
name,
|
|
3397
|
+
url
|
|
3398
|
+
});
|
|
3399
|
+
return success(rpc);
|
|
3400
|
+
} catch (error$1) {
|
|
3401
|
+
return error(error$1);
|
|
3402
|
+
}
|
|
3383
3403
|
};
|
|
3384
3404
|
|
|
3385
3405
|
const getAssetDir = () => {
|
|
@@ -3439,15 +3459,18 @@ const state$7 = {
|
|
|
3439
3459
|
rpc: undefined
|
|
3440
3460
|
};
|
|
3441
3461
|
const hydrate$3 = async () => {
|
|
3442
|
-
const
|
|
3443
|
-
|
|
3444
|
-
|
|
3462
|
+
const result = await launchRendererWorker();
|
|
3463
|
+
if (isError(result)) {
|
|
3464
|
+
state$7.rpc = undefined;
|
|
3465
|
+
return result;
|
|
3466
|
+
}
|
|
3467
|
+
state$7.rpc = result.value;
|
|
3468
|
+
return success(undefined);
|
|
3445
3469
|
};
|
|
3446
3470
|
|
|
3447
3471
|
// TODO needed?
|
|
3448
3472
|
const dispose$j = () => {
|
|
3449
3473
|
if (state$7.rpc) {
|
|
3450
|
-
// @ts-expect-error
|
|
3451
3474
|
state$7.rpc.dispose();
|
|
3452
3475
|
}
|
|
3453
3476
|
};
|
|
@@ -4293,6 +4316,13 @@ const hover = (element, options) => {
|
|
|
4293
4316
|
};
|
|
4294
4317
|
const type = (element, options) => {
|
|
4295
4318
|
element.value = options.text;
|
|
4319
|
+
const event = new InputEvent('input', {
|
|
4320
|
+
bubbles: true,
|
|
4321
|
+
cancelable: true,
|
|
4322
|
+
data: options.text,
|
|
4323
|
+
inputType: 'insertText'
|
|
4324
|
+
});
|
|
4325
|
+
element.dispatchEvent(event);
|
|
4296
4326
|
};
|
|
4297
4327
|
const keyboardEvent = (element, eventType, options) => {
|
|
4298
4328
|
const event = new KeyboardEvent(eventType, options);
|
|
@@ -8797,6 +8827,7 @@ const appendViewlet = (parentId, childId, focus) => {
|
|
|
8797
8827
|
if (focus && childInstance.factory.focus) {
|
|
8798
8828
|
childInstance.factory.focus(childInstance.state);
|
|
8799
8829
|
}
|
|
8830
|
+
applyLateFocusMaybe();
|
|
8800
8831
|
};
|
|
8801
8832
|
const ariaAnnounce = async message => {
|
|
8802
8833
|
const AriaAlert$1 = await Promise.resolve().then(function () { return AriaAlert; });
|
|
@@ -9269,154 +9300,6 @@ const commandMap = {
|
|
|
9269
9300
|
'WindowTitle.set': set$1
|
|
9270
9301
|
};
|
|
9271
9302
|
|
|
9272
|
-
const getConfiguredEditorWorkerUrl = () => {
|
|
9273
|
-
return getConfiguredWorkerUrl('editorWorkerUrl');
|
|
9274
|
-
};
|
|
9275
|
-
|
|
9276
|
-
const editorWorkerUrl = getConfiguredEditorWorkerUrl() || `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/editor-worker/dist/editorWorkerMain.js`;
|
|
9277
|
-
|
|
9278
|
-
const launchEditorWorker = async port => {
|
|
9279
|
-
const ipc = await create$w({
|
|
9280
|
-
method: ModuleWorkerWithMessagePort,
|
|
9281
|
-
name: 'Editor Worker',
|
|
9282
|
-
port,
|
|
9283
|
-
url: editorWorkerUrl
|
|
9284
|
-
});
|
|
9285
|
-
return ipc;
|
|
9286
|
-
};
|
|
9287
|
-
|
|
9288
|
-
const hydrate$2 = async () => {
|
|
9289
|
-
const {
|
|
9290
|
-
port1,
|
|
9291
|
-
port2
|
|
9292
|
-
} = new MessageChannel();
|
|
9293
|
-
// TODO only launch port and send to renderer worker
|
|
9294
|
-
const promise = launchEditorWorker(port1);
|
|
9295
|
-
set$7('Editor Worker', port2);
|
|
9296
|
-
await promise;
|
|
9297
|
-
};
|
|
9298
|
-
|
|
9299
|
-
const getConfiguredExtensionHostWorkerUrl = () => {
|
|
9300
|
-
return getConfiguredWorkerUrl('extensionHostWorkerUrl');
|
|
9301
|
-
};
|
|
9302
|
-
|
|
9303
|
-
const extensionHostWorkerUrl = getConfiguredExtensionHostWorkerUrl() || `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/extension-host-worker/dist/extensionHostWorkerMain.js`;
|
|
9304
|
-
|
|
9305
|
-
const launchExtensionHostWorker = async port => {
|
|
9306
|
-
const name = isElectron ? 'Extension Host (Electron)' : 'Extension Host';
|
|
9307
|
-
const ipc = await create$w({
|
|
9308
|
-
method: ModuleWorkerWithMessagePort,
|
|
9309
|
-
name,
|
|
9310
|
-
port,
|
|
9311
|
-
url: extensionHostWorkerUrl
|
|
9312
|
-
});
|
|
9313
|
-
return ipc;
|
|
9314
|
-
};
|
|
9315
|
-
|
|
9316
|
-
const hydrate$1 = async () => {
|
|
9317
|
-
const {
|
|
9318
|
-
port1,
|
|
9319
|
-
port2
|
|
9320
|
-
} = new MessageChannel();
|
|
9321
|
-
// TODO only launch port and send to renderer worker
|
|
9322
|
-
const promise = launchExtensionHostWorker(port1);
|
|
9323
|
-
const name = isElectron ? 'Extension Host (Electron)' : 'Extension Host';
|
|
9324
|
-
set$7(name, port2);
|
|
9325
|
-
await promise;
|
|
9326
|
-
};
|
|
9327
|
-
|
|
9328
|
-
const getConfiguredSyntaxHighlightingWorkerUrl = () => {
|
|
9329
|
-
return getConfiguredWorkerUrl('syntaxHighlightingWorkerUrl');
|
|
9330
|
-
};
|
|
9331
|
-
|
|
9332
|
-
const syntaxHighlightingWorkerUrl = getConfiguredSyntaxHighlightingWorkerUrl() || `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/syntax-highlighting-worker/dist/syntaxHighlightingWorkerMain.js`;
|
|
9333
|
-
|
|
9334
|
-
const launchSyntaxHighlightingWorker = async port => {
|
|
9335
|
-
const ipc = await create$w({
|
|
9336
|
-
method: ModuleWorkerWithMessagePort,
|
|
9337
|
-
name: 'Syntax Highlighting Worker',
|
|
9338
|
-
port,
|
|
9339
|
-
url: syntaxHighlightingWorkerUrl
|
|
9340
|
-
});
|
|
9341
|
-
return ipc;
|
|
9342
|
-
};
|
|
9343
|
-
|
|
9344
|
-
const hydrate = async () => {
|
|
9345
|
-
const {
|
|
9346
|
-
port1,
|
|
9347
|
-
port2
|
|
9348
|
-
} = new MessageChannel();
|
|
9349
|
-
// TODO only launch port and send to renderer worker
|
|
9350
|
-
const promise = launchSyntaxHighlightingWorker(port1);
|
|
9351
|
-
set$7('Syntax Highlighting Worker', port2);
|
|
9352
|
-
await promise;
|
|
9353
|
-
};
|
|
9354
|
-
|
|
9355
|
-
const workerFns = [hydrate$3, hydrate$2, hydrate, hydrate$1];
|
|
9356
|
-
const call = fn => {
|
|
9357
|
-
return fn();
|
|
9358
|
-
};
|
|
9359
|
-
const launchWorkers = () => {
|
|
9360
|
-
{
|
|
9361
|
-
return Promise.all(workerFns.map(call));
|
|
9362
|
-
}
|
|
9363
|
-
};
|
|
9364
|
-
|
|
9365
|
-
const handleFocusIn = event => {
|
|
9366
|
-
preventDefault(event);
|
|
9367
|
-
const uid = fromEvent(event);
|
|
9368
|
-
handleFocusIn$4(uid);
|
|
9369
|
-
};
|
|
9370
|
-
const handleBlur$1 = event => {
|
|
9371
|
-
const uid = fromEvent(event);
|
|
9372
|
-
executeViewletCommand(uid, 'EditorRename.handleBlur');
|
|
9373
|
-
};
|
|
9374
|
-
const handleInput = event => {
|
|
9375
|
-
const {
|
|
9376
|
-
target
|
|
9377
|
-
} = event;
|
|
9378
|
-
const {
|
|
9379
|
-
value
|
|
9380
|
-
} = target;
|
|
9381
|
-
const uid = fromEvent(event);
|
|
9382
|
-
executeViewletCommand(uid, 'EditorRename.handleInput', value);
|
|
9383
|
-
};
|
|
9384
|
-
|
|
9385
|
-
const ViewletEditorRenameEvents = {
|
|
9386
|
-
__proto__: null,
|
|
9387
|
-
handleBlur: handleBlur$1,
|
|
9388
|
-
handleFocusIn,
|
|
9389
|
-
handleInput
|
|
9390
|
-
};
|
|
9391
|
-
|
|
9392
|
-
const setBounds = (state, x, y, width, height) => {
|
|
9393
|
-
const {
|
|
9394
|
-
$Viewlet
|
|
9395
|
-
} = state;
|
|
9396
|
-
setBounds$a($Viewlet, x, y, width, height);
|
|
9397
|
-
applyUidWorkaround($Viewlet);
|
|
9398
|
-
};
|
|
9399
|
-
const appendWidget = state => {
|
|
9400
|
-
const {
|
|
9401
|
-
$Viewlet
|
|
9402
|
-
} = state;
|
|
9403
|
-
append$1($Viewlet);
|
|
9404
|
-
};
|
|
9405
|
-
const dispose$2 = state => {
|
|
9406
|
-
remove$1(state.$Viewlet);
|
|
9407
|
-
};
|
|
9408
|
-
|
|
9409
|
-
const ViewletEditorRename = {
|
|
9410
|
-
__proto__: null,
|
|
9411
|
-
Events: ViewletEditorRenameEvents,
|
|
9412
|
-
appendWidget,
|
|
9413
|
-
dispose: dispose$2,
|
|
9414
|
-
setBounds
|
|
9415
|
-
};
|
|
9416
|
-
|
|
9417
|
-
const handleContentSecurityPolicyViolation = event => {
|
|
9418
|
-
};
|
|
9419
|
-
|
|
9420
9303
|
const RE_AT = /^\s+at/;
|
|
9421
9304
|
const RE_AT_PROMISE_INDEX = /^\s*at async Promise.all \(index \d+\)$/;
|
|
9422
9305
|
const RE_OBJECT_AS = /^\s*at Object\.\w+ \[as ([\w.]+)]/;
|
|
@@ -9629,37 +9512,37 @@ const prepare = async error => {
|
|
|
9629
9512
|
}
|
|
9630
9513
|
return error;
|
|
9631
9514
|
};
|
|
9632
|
-
const print = (error
|
|
9515
|
+
const print = (error, prefix = '') => {
|
|
9633
9516
|
if (getIsFirefox()) {
|
|
9634
9517
|
// Firefox does not support printing codeframe with error stack
|
|
9635
|
-
if (error
|
|
9636
|
-
error(`${prefix}${error
|
|
9518
|
+
if (error && error._error) {
|
|
9519
|
+
error$1(`${prefix}${error._error}`);
|
|
9637
9520
|
return;
|
|
9638
9521
|
}
|
|
9639
|
-
error(`${prefix}${error
|
|
9522
|
+
error$1(`${prefix}${error}`);
|
|
9640
9523
|
return;
|
|
9641
9524
|
}
|
|
9642
|
-
if (error
|
|
9643
|
-
error(`${prefix}${error
|
|
9525
|
+
if (error && error.type && error.message && error.codeFrame) {
|
|
9526
|
+
error$1(`${prefix}${error.type}: ${error.message}\n\n${error.codeFrame}\n\n${error.stack}`);
|
|
9644
9527
|
return;
|
|
9645
9528
|
}
|
|
9646
|
-
if (error
|
|
9647
|
-
error(`${prefix}${error
|
|
9529
|
+
if (error && error.message && error.codeFrame) {
|
|
9530
|
+
error$1(`${prefix}${error.message}\n\n${error.codeFrame}\n\n${error.stack}`);
|
|
9648
9531
|
return;
|
|
9649
9532
|
}
|
|
9650
|
-
if (error
|
|
9651
|
-
error(`${prefix}${error
|
|
9533
|
+
if (error && error.type && error.message) {
|
|
9534
|
+
error$1(`${prefix}${error.type}: ${error.message}\n${error.stack}`);
|
|
9652
9535
|
return;
|
|
9653
9536
|
}
|
|
9654
|
-
if (error
|
|
9655
|
-
error(`${prefix}${error
|
|
9537
|
+
if (error && error.stack) {
|
|
9538
|
+
error$1(`${prefix}${error.stack}`);
|
|
9656
9539
|
return;
|
|
9657
9540
|
}
|
|
9658
|
-
if (error
|
|
9659
|
-
error(`${prefix}null`);
|
|
9541
|
+
if (error === null) {
|
|
9542
|
+
error$1(`${prefix}null`);
|
|
9660
9543
|
return;
|
|
9661
9544
|
}
|
|
9662
|
-
error(`${prefix}${error
|
|
9545
|
+
error$1(`${prefix}${error}`);
|
|
9663
9546
|
};
|
|
9664
9547
|
const getMessage = error => {
|
|
9665
9548
|
if (error && error.type && error.message) {
|
|
@@ -9689,6 +9572,186 @@ const handleError = async (error, notify = true, prefix = '') => {
|
|
|
9689
9572
|
}
|
|
9690
9573
|
};
|
|
9691
9574
|
|
|
9575
|
+
const getConfiguredEditorWorkerUrl = () => {
|
|
9576
|
+
return getConfiguredWorkerUrl('editorWorkerUrl');
|
|
9577
|
+
};
|
|
9578
|
+
|
|
9579
|
+
const editorWorkerUrl = getConfiguredEditorWorkerUrl() || `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/editor-worker/dist/editorWorkerMain.js`;
|
|
9580
|
+
|
|
9581
|
+
const launchEditorWorker = async port => {
|
|
9582
|
+
try {
|
|
9583
|
+
await create$w({
|
|
9584
|
+
method: ModuleWorkerWithMessagePort,
|
|
9585
|
+
name: 'Editor Worker',
|
|
9586
|
+
port,
|
|
9587
|
+
url: editorWorkerUrl
|
|
9588
|
+
});
|
|
9589
|
+
return success(undefined);
|
|
9590
|
+
} catch (error$1) {
|
|
9591
|
+
return error(error$1);
|
|
9592
|
+
}
|
|
9593
|
+
};
|
|
9594
|
+
|
|
9595
|
+
const hydrate$2 = async () => {
|
|
9596
|
+
const {
|
|
9597
|
+
port1,
|
|
9598
|
+
port2
|
|
9599
|
+
} = new MessageChannel();
|
|
9600
|
+
// TODO only launch port and send to renderer worker
|
|
9601
|
+
const promise = launchEditorWorker(port1);
|
|
9602
|
+
set$7('Editor Worker', port2);
|
|
9603
|
+
const result = await promise;
|
|
9604
|
+
if (isError(result)) {
|
|
9605
|
+
remove$2('Editor Worker');
|
|
9606
|
+
return result;
|
|
9607
|
+
}
|
|
9608
|
+
return success(undefined);
|
|
9609
|
+
};
|
|
9610
|
+
|
|
9611
|
+
const getConfiguredExtensionHostWorkerUrl = () => {
|
|
9612
|
+
return getConfiguredWorkerUrl('extensionHostWorkerUrl');
|
|
9613
|
+
};
|
|
9614
|
+
|
|
9615
|
+
const extensionHostWorkerUrl = getConfiguredExtensionHostWorkerUrl() || `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/extension-host-worker/dist/extensionHostWorkerMain.js`;
|
|
9616
|
+
|
|
9617
|
+
const launchExtensionHostWorker = async port => {
|
|
9618
|
+
const name = isElectron ? 'Extension Host (Electron)' : 'Extension Host';
|
|
9619
|
+
try {
|
|
9620
|
+
await create$w({
|
|
9621
|
+
method: ModuleWorkerWithMessagePort,
|
|
9622
|
+
name,
|
|
9623
|
+
port,
|
|
9624
|
+
url: extensionHostWorkerUrl
|
|
9625
|
+
});
|
|
9626
|
+
return success(undefined);
|
|
9627
|
+
} catch (error$1) {
|
|
9628
|
+
return error(error$1);
|
|
9629
|
+
}
|
|
9630
|
+
};
|
|
9631
|
+
|
|
9632
|
+
const hydrate$1 = async () => {
|
|
9633
|
+
const {
|
|
9634
|
+
port1,
|
|
9635
|
+
port2
|
|
9636
|
+
} = new MessageChannel();
|
|
9637
|
+
// TODO only launch port and send to renderer worker
|
|
9638
|
+
const promise = launchExtensionHostWorker(port1);
|
|
9639
|
+
const name = isElectron ? 'Extension Host (Electron)' : 'Extension Host';
|
|
9640
|
+
set$7(name, port2);
|
|
9641
|
+
const result = await promise;
|
|
9642
|
+
if (isError(result)) {
|
|
9643
|
+
remove$2(name);
|
|
9644
|
+
return result;
|
|
9645
|
+
}
|
|
9646
|
+
return success(undefined);
|
|
9647
|
+
};
|
|
9648
|
+
|
|
9649
|
+
const getConfiguredSyntaxHighlightingWorkerUrl = () => {
|
|
9650
|
+
return getConfiguredWorkerUrl('syntaxHighlightingWorkerUrl');
|
|
9651
|
+
};
|
|
9652
|
+
|
|
9653
|
+
const syntaxHighlightingWorkerUrl = getConfiguredSyntaxHighlightingWorkerUrl() || `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/syntax-highlighting-worker/dist/syntaxHighlightingWorkerMain.js`;
|
|
9654
|
+
|
|
9655
|
+
const launchSyntaxHighlightingWorker = async port => {
|
|
9656
|
+
try {
|
|
9657
|
+
await create$w({
|
|
9658
|
+
method: ModuleWorkerWithMessagePort,
|
|
9659
|
+
name: 'Syntax Highlighting Worker',
|
|
9660
|
+
port,
|
|
9661
|
+
url: syntaxHighlightingWorkerUrl
|
|
9662
|
+
});
|
|
9663
|
+
return success(undefined);
|
|
9664
|
+
} catch (error$1) {
|
|
9665
|
+
return error(error$1);
|
|
9666
|
+
}
|
|
9667
|
+
};
|
|
9668
|
+
|
|
9669
|
+
const hydrate = async () => {
|
|
9670
|
+
const {
|
|
9671
|
+
port1,
|
|
9672
|
+
port2
|
|
9673
|
+
} = new MessageChannel();
|
|
9674
|
+
// TODO only launch port and send to renderer worker
|
|
9675
|
+
const promise = launchSyntaxHighlightingWorker(port1);
|
|
9676
|
+
set$7('Syntax Highlighting Worker', port2);
|
|
9677
|
+
const result = await promise;
|
|
9678
|
+
if (isError(result)) {
|
|
9679
|
+
remove$2('Syntax Highlighting Worker');
|
|
9680
|
+
return result;
|
|
9681
|
+
}
|
|
9682
|
+
return success(undefined);
|
|
9683
|
+
};
|
|
9684
|
+
|
|
9685
|
+
const workerFns = [hydrate$3, hydrate$2, hydrate, hydrate$1];
|
|
9686
|
+
const call = fn => {
|
|
9687
|
+
return fn();
|
|
9688
|
+
};
|
|
9689
|
+
const launchWorkers = async () => {
|
|
9690
|
+
{
|
|
9691
|
+
const results = await Promise.all(workerFns.map(call));
|
|
9692
|
+
const firstError = results.find(isError);
|
|
9693
|
+
if (firstError) {
|
|
9694
|
+
return firstError;
|
|
9695
|
+
}
|
|
9696
|
+
return success(undefined);
|
|
9697
|
+
}
|
|
9698
|
+
};
|
|
9699
|
+
|
|
9700
|
+
const handleFocusIn = event => {
|
|
9701
|
+
preventDefault(event);
|
|
9702
|
+
const uid = fromEvent(event);
|
|
9703
|
+
handleFocusIn$4(uid);
|
|
9704
|
+
};
|
|
9705
|
+
const handleBlur$1 = event => {
|
|
9706
|
+
const uid = fromEvent(event);
|
|
9707
|
+
executeViewletCommand(uid, 'EditorRename.handleBlur');
|
|
9708
|
+
};
|
|
9709
|
+
const handleInput = event => {
|
|
9710
|
+
const {
|
|
9711
|
+
target
|
|
9712
|
+
} = event;
|
|
9713
|
+
const {
|
|
9714
|
+
value
|
|
9715
|
+
} = target;
|
|
9716
|
+
const uid = fromEvent(event);
|
|
9717
|
+
executeViewletCommand(uid, 'EditorRename.handleInput', value);
|
|
9718
|
+
};
|
|
9719
|
+
|
|
9720
|
+
const ViewletEditorRenameEvents = {
|
|
9721
|
+
__proto__: null,
|
|
9722
|
+
handleBlur: handleBlur$1,
|
|
9723
|
+
handleFocusIn,
|
|
9724
|
+
handleInput
|
|
9725
|
+
};
|
|
9726
|
+
|
|
9727
|
+
const setBounds = (state, x, y, width, height) => {
|
|
9728
|
+
const {
|
|
9729
|
+
$Viewlet
|
|
9730
|
+
} = state;
|
|
9731
|
+
setBounds$a($Viewlet, x, y, width, height);
|
|
9732
|
+
applyUidWorkaround($Viewlet);
|
|
9733
|
+
};
|
|
9734
|
+
const appendWidget = state => {
|
|
9735
|
+
const {
|
|
9736
|
+
$Viewlet
|
|
9737
|
+
} = state;
|
|
9738
|
+
append$1($Viewlet);
|
|
9739
|
+
};
|
|
9740
|
+
const dispose$2 = state => {
|
|
9741
|
+
remove$1(state.$Viewlet);
|
|
9742
|
+
};
|
|
9743
|
+
|
|
9744
|
+
const ViewletEditorRename = {
|
|
9745
|
+
__proto__: null,
|
|
9746
|
+
Events: ViewletEditorRenameEvents,
|
|
9747
|
+
appendWidget,
|
|
9748
|
+
dispose: dispose$2,
|
|
9749
|
+
setBounds
|
|
9750
|
+
};
|
|
9751
|
+
|
|
9752
|
+
const handleContentSecurityPolicyViolation = event => {
|
|
9753
|
+
};
|
|
9754
|
+
|
|
9692
9755
|
const isChromeExtensionError = error => {
|
|
9693
9756
|
return String(error) === 'Script error.';
|
|
9694
9757
|
};
|
|
@@ -9735,7 +9798,11 @@ const main = async () => {
|
|
|
9735
9798
|
state$1.modules[FindWidget] = ViewletFindWidget;
|
|
9736
9799
|
state$1.modules[TitleBar] = ViewletTitleBar;
|
|
9737
9800
|
// TODO this is discovered very late
|
|
9738
|
-
await launchWorkers();
|
|
9801
|
+
const launchWorkersResult = await launchWorkers();
|
|
9802
|
+
if (isError(launchWorkersResult)) {
|
|
9803
|
+
await handleError(launchWorkersResult.error, true);
|
|
9804
|
+
return;
|
|
9805
|
+
}
|
|
9739
9806
|
setIpc(RendererWorker);
|
|
9740
9807
|
};
|
|
9741
9808
|
|