@lvce-editor/renderer-process 9.8.0 → 9.9.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 +44 -34
- package/package.json +1 -1
|
@@ -210,6 +210,7 @@ const getModuleId = commandId => {
|
|
|
210
210
|
return HandleMessagePort;
|
|
211
211
|
case 'WebView.create':
|
|
212
212
|
case 'WebView.setPort':
|
|
213
|
+
case 'WebView.dispose':
|
|
213
214
|
return WebView$1;
|
|
214
215
|
default:
|
|
215
216
|
throw new CommandNotFoundError(commandId);
|
|
@@ -525,7 +526,7 @@ const set$7 = (id, fn) => {
|
|
|
525
526
|
const get$8 = id => {
|
|
526
527
|
return state$1$1.callbacks[id];
|
|
527
528
|
};
|
|
528
|
-
const remove$
|
|
529
|
+
const remove$4 = id => {
|
|
529
530
|
delete state$1$1.callbacks[id];
|
|
530
531
|
};
|
|
531
532
|
const state$a = {
|
|
@@ -571,7 +572,7 @@ const resolve = (id, args) => {
|
|
|
571
572
|
return;
|
|
572
573
|
}
|
|
573
574
|
fn(args);
|
|
574
|
-
remove$
|
|
575
|
+
remove$4(id);
|
|
575
576
|
};
|
|
576
577
|
const create$2$1 = (method, params) => {
|
|
577
578
|
const {
|
|
@@ -926,7 +927,7 @@ const set$6 = (name, ipc) => {
|
|
|
926
927
|
const get$7 = name => {
|
|
927
928
|
return ipcs[name];
|
|
928
929
|
};
|
|
929
|
-
const remove$
|
|
930
|
+
const remove$3 = name => {
|
|
930
931
|
delete ipcs[name];
|
|
931
932
|
};
|
|
932
933
|
const has = name => {
|
|
@@ -944,7 +945,7 @@ const create$L = async ({
|
|
|
944
945
|
// TODO rename method
|
|
945
946
|
// TODO avoid cyclic dependency
|
|
946
947
|
const port = get$7(options.name);
|
|
947
|
-
remove$
|
|
948
|
+
remove$3(options.name);
|
|
948
949
|
await invokeAndTransfer('Transferrable.transfer', options.id, port);
|
|
949
950
|
return;
|
|
950
951
|
}
|
|
@@ -1095,7 +1096,7 @@ const hydrate$4 = async () => {
|
|
|
1095
1096
|
};
|
|
1096
1097
|
|
|
1097
1098
|
// TODO needed?
|
|
1098
|
-
const dispose$
|
|
1099
|
+
const dispose$k = () => {
|
|
1099
1100
|
// @ts-expect-error
|
|
1100
1101
|
if (state$9.rendererWorker) {
|
|
1101
1102
|
// @ts-expect-error
|
|
@@ -1118,7 +1119,7 @@ const invokeAndTransfer = (method, ...params) => {
|
|
|
1118
1119
|
|
|
1119
1120
|
const RendererWorker = {
|
|
1120
1121
|
__proto__: null,
|
|
1121
|
-
dispose: dispose$
|
|
1122
|
+
dispose: dispose$k,
|
|
1122
1123
|
hydrate: hydrate$4,
|
|
1123
1124
|
invoke: invoke$1,
|
|
1124
1125
|
invokeAndTransfer,
|
|
@@ -2194,7 +2195,7 @@ const append$1 = $Element => {
|
|
|
2194
2195
|
document.body.append(state$7.$Widgets);
|
|
2195
2196
|
}
|
|
2196
2197
|
};
|
|
2197
|
-
const remove$
|
|
2198
|
+
const remove$2 = $Element => {
|
|
2198
2199
|
if (!$Element) {
|
|
2199
2200
|
// TODO $Element should always be defined
|
|
2200
2201
|
return;
|
|
@@ -2496,8 +2497,8 @@ const setDom$a = (state, dom) => {
|
|
|
2496
2497
|
// TODO recycle nodes
|
|
2497
2498
|
// TODO set right aria attributes on $EditorInput
|
|
2498
2499
|
};
|
|
2499
|
-
const dispose$
|
|
2500
|
-
remove$
|
|
2500
|
+
const dispose$j = state => {
|
|
2501
|
+
remove$2(state.$Viewlet);
|
|
2501
2502
|
// state.$EditorInput.removeAttribute('aria-activedescendant')
|
|
2502
2503
|
};
|
|
2503
2504
|
const showLoading = (state, x, y) => {
|
|
@@ -2527,7 +2528,7 @@ const ViewletEditorCompletion = {
|
|
|
2527
2528
|
__proto__: null,
|
|
2528
2529
|
attachEvents: attachEvents$b,
|
|
2529
2530
|
create: create$K,
|
|
2530
|
-
dispose: dispose$
|
|
2531
|
+
dispose: dispose$j,
|
|
2531
2532
|
handleError: handleError$7,
|
|
2532
2533
|
setBounds: setBounds$5,
|
|
2533
2534
|
setContentHeight,
|
|
@@ -2953,9 +2954,9 @@ const create$H = (x, y) => {
|
|
|
2953
2954
|
$RenameWidgetInputBox
|
|
2954
2955
|
};
|
|
2955
2956
|
};
|
|
2956
|
-
const dispose$
|
|
2957
|
+
const dispose$i = state => {
|
|
2957
2958
|
// TODO focus editor
|
|
2958
|
-
remove$
|
|
2959
|
+
remove$2(state.$RenameWidget);
|
|
2959
2960
|
};
|
|
2960
2961
|
|
|
2961
2962
|
// TODO could also be event based
|
|
@@ -2970,7 +2971,7 @@ const finish = state => {
|
|
|
2970
2971
|
const name$s = 'EditorRename';
|
|
2971
2972
|
const Commands$t = {
|
|
2972
2973
|
create: create$H,
|
|
2973
|
-
dispose: dispose$
|
|
2974
|
+
dispose: dispose$i,
|
|
2974
2975
|
finish: finish
|
|
2975
2976
|
};
|
|
2976
2977
|
|
|
@@ -3080,14 +3081,14 @@ const create$G = (uri, top, left) => {
|
|
|
3080
3081
|
const update = (state, uri) => {
|
|
3081
3082
|
state.$ImagePreviewImage.uri = uri;
|
|
3082
3083
|
};
|
|
3083
|
-
const dispose$
|
|
3084
|
-
remove$
|
|
3084
|
+
const dispose$h = state => {
|
|
3085
|
+
remove$2(state.$ImagePreview);
|
|
3085
3086
|
};
|
|
3086
3087
|
|
|
3087
3088
|
const ImagePreview = {
|
|
3088
3089
|
__proto__: null,
|
|
3089
3090
|
create: create$G,
|
|
3090
|
-
dispose: dispose$
|
|
3091
|
+
dispose: dispose$h,
|
|
3091
3092
|
showError,
|
|
3092
3093
|
update
|
|
3093
3094
|
};
|
|
@@ -3095,7 +3096,7 @@ const ImagePreview = {
|
|
|
3095
3096
|
const name$p = 'ImagePreview';
|
|
3096
3097
|
const Commands$q = {
|
|
3097
3098
|
create: create$G,
|
|
3098
|
-
dispose: dispose$
|
|
3099
|
+
dispose: dispose$h,
|
|
3099
3100
|
showError: showError,
|
|
3100
3101
|
update: update
|
|
3101
3102
|
};
|
|
@@ -3337,7 +3338,7 @@ const createWithOptions = (type, message, options) => {
|
|
|
3337
3338
|
const $Notification = create$NotificationWithOptions(message, options);
|
|
3338
3339
|
append$1($Notification);
|
|
3339
3340
|
};
|
|
3340
|
-
const dispose$
|
|
3341
|
+
const dispose$g = id => {
|
|
3341
3342
|
// const $Notification = state.$Notifications
|
|
3342
3343
|
};
|
|
3343
3344
|
|
|
@@ -3347,7 +3348,7 @@ const name$h = 'Notification';
|
|
|
3347
3348
|
const Commands$i = {
|
|
3348
3349
|
create: create$F,
|
|
3349
3350
|
createWithOptions: createWithOptions,
|
|
3350
|
-
dispose: dispose$
|
|
3351
|
+
dispose: dispose$g
|
|
3351
3352
|
};
|
|
3352
3353
|
|
|
3353
3354
|
const Notification_ipc = {
|
|
@@ -3608,7 +3609,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom, mous
|
|
|
3608
3609
|
const hideSubMenu = level => {
|
|
3609
3610
|
const $$ChildMenus = state$1.$$Menus.slice(level);
|
|
3610
3611
|
for (const $ChildMenu of $$ChildMenus) {
|
|
3611
|
-
remove$
|
|
3612
|
+
remove$2($ChildMenu);
|
|
3612
3613
|
}
|
|
3613
3614
|
};
|
|
3614
3615
|
|
|
@@ -3666,11 +3667,11 @@ const showControlled = ({
|
|
|
3666
3667
|
|
|
3667
3668
|
const hide = (restoreFocus = true) => {
|
|
3668
3669
|
for (const $Menu of state$1.$$Menus) {
|
|
3669
|
-
remove$
|
|
3670
|
+
remove$2($Menu);
|
|
3670
3671
|
}
|
|
3671
3672
|
state$1.$$Menus = [];
|
|
3672
3673
|
if (state$1.$BackDrop) {
|
|
3673
|
-
remove$
|
|
3674
|
+
remove$2(state$1.$BackDrop);
|
|
3674
3675
|
state$1.$BackDrop = undefined;
|
|
3675
3676
|
}
|
|
3676
3677
|
// TODO focus previous item
|
|
@@ -3782,7 +3783,7 @@ const get$2 = id => {
|
|
|
3782
3783
|
const set$2 = (id, captureStream) => {
|
|
3783
3784
|
screenCaptures[id] = captureStream;
|
|
3784
3785
|
};
|
|
3785
|
-
const remove = id => {
|
|
3786
|
+
const remove$1 = id => {
|
|
3786
3787
|
delete screenCaptures[id];
|
|
3787
3788
|
};
|
|
3788
3789
|
|
|
@@ -3800,14 +3801,14 @@ const start = async (id, options) => {
|
|
|
3800
3801
|
throw new VError$1(error, `Failed to start screen capture`);
|
|
3801
3802
|
}
|
|
3802
3803
|
};
|
|
3803
|
-
const dispose$
|
|
3804
|
+
const dispose$f = async (id, options) => {
|
|
3804
3805
|
try {
|
|
3805
3806
|
number(id);
|
|
3806
3807
|
const captureStream = get$2(id);
|
|
3807
3808
|
for (const track of captureStream.getTracks()) {
|
|
3808
3809
|
track.stop();
|
|
3809
3810
|
}
|
|
3810
|
-
remove(id);
|
|
3811
|
+
remove$1(id);
|
|
3811
3812
|
} catch (error) {
|
|
3812
3813
|
throw new VError$1(error, `Failed to start screen capture`);
|
|
3813
3814
|
}
|
|
@@ -3815,7 +3816,7 @@ const dispose$e = async (id, options) => {
|
|
|
3815
3816
|
|
|
3816
3817
|
const name$b = 'ScreenCapture';
|
|
3817
3818
|
const Commands$c = {
|
|
3818
|
-
dispose: dispose$
|
|
3819
|
+
dispose: dispose$f,
|
|
3819
3820
|
start: start
|
|
3820
3821
|
};
|
|
3821
3822
|
|
|
@@ -4352,6 +4353,9 @@ const set$1 = (id, webView) => {
|
|
|
4352
4353
|
const get = id => {
|
|
4353
4354
|
return webViews[id];
|
|
4354
4355
|
};
|
|
4356
|
+
const remove = id => {
|
|
4357
|
+
delete webViews[id];
|
|
4358
|
+
};
|
|
4355
4359
|
|
|
4356
4360
|
const objects = Object.create(null);
|
|
4357
4361
|
const transfer = (transferable, objectId) => {
|
|
@@ -4729,7 +4733,7 @@ const sendMultiple = commands => {
|
|
|
4729
4733
|
}
|
|
4730
4734
|
case 'Viewlet.dispose':
|
|
4731
4735
|
{
|
|
4732
|
-
dispose$
|
|
4736
|
+
dispose$e(viewletId);
|
|
4733
4737
|
break;
|
|
4734
4738
|
}
|
|
4735
4739
|
case 'Viewlet.createPlaceholder':
|
|
@@ -4782,7 +4786,7 @@ const sendMultiple = commands => {
|
|
|
4782
4786
|
}
|
|
4783
4787
|
}
|
|
4784
4788
|
};
|
|
4785
|
-
const dispose$
|
|
4789
|
+
const dispose$e = id => {
|
|
4786
4790
|
try {
|
|
4787
4791
|
number(id);
|
|
4788
4792
|
const {
|
|
@@ -4913,7 +4917,7 @@ const getFn = command => {
|
|
|
4913
4917
|
case 'Viewlet.show':
|
|
4914
4918
|
return show;
|
|
4915
4919
|
case 'Viewlet.dispose':
|
|
4916
|
-
return dispose$
|
|
4920
|
+
return dispose$e;
|
|
4917
4921
|
case 'Viewlet.setDom2':
|
|
4918
4922
|
return setDom2;
|
|
4919
4923
|
case 'Viewlet.setBounds':
|
|
@@ -4970,7 +4974,7 @@ const name$8 = 'Viewlet';
|
|
|
4970
4974
|
const Commands$9 = {
|
|
4971
4975
|
addKeyBindings: addKeyBindings,
|
|
4972
4976
|
appendViewlet: appendViewlet,
|
|
4973
|
-
dispose: dispose$
|
|
4977
|
+
dispose: dispose$e,
|
|
4974
4978
|
executeCommands: executeCommands,
|
|
4975
4979
|
focus: focus$h,
|
|
4976
4980
|
focusSelector: focusSelector,
|
|
@@ -5823,12 +5827,18 @@ const setPort$2 = (uid, port, origin, portType) => {
|
|
|
5823
5827
|
params: [port, portType]
|
|
5824
5828
|
}, origin, [port]);
|
|
5825
5829
|
};
|
|
5830
|
+
const dispose$d = uid => {
|
|
5831
|
+
const $Iframe = get(uid);
|
|
5832
|
+
$Iframe.remove();
|
|
5833
|
+
remove(uid);
|
|
5834
|
+
};
|
|
5826
5835
|
|
|
5827
5836
|
const name = 'WebView';
|
|
5828
5837
|
const Commands$1 = {
|
|
5829
5838
|
create: create$C,
|
|
5830
5839
|
load: load,
|
|
5831
|
-
setPort: setPort$2
|
|
5840
|
+
setPort: setPort$2,
|
|
5841
|
+
dispose: dispose$d
|
|
5832
5842
|
};
|
|
5833
5843
|
|
|
5834
5844
|
const WebView_ipc = {
|
|
@@ -7376,7 +7386,7 @@ const hideOverlayMessage = state => {
|
|
|
7376
7386
|
for (const $Widget of state$7.widgetSet) {
|
|
7377
7387
|
// @ts-expect-error
|
|
7378
7388
|
if ($Widget.className === 'EditorOverlayMessage') {
|
|
7379
|
-
remove$
|
|
7389
|
+
remove$2($Widget);
|
|
7380
7390
|
}
|
|
7381
7391
|
}
|
|
7382
7392
|
};
|
|
@@ -10874,7 +10884,7 @@ const openMenu = (state, unFocusIndex, index, level, menuItems, menuFocusedIndex
|
|
|
10874
10884
|
focusIndex(0, -1, menuFocusedIndex);
|
|
10875
10885
|
}
|
|
10876
10886
|
for (const $Menu of $$Menus) {
|
|
10877
|
-
remove$
|
|
10887
|
+
remove$2($Menu);
|
|
10878
10888
|
}
|
|
10879
10889
|
};
|
|
10880
10890
|
|
|
@@ -10990,7 +11000,7 @@ const setMenus = (state, changes, uid) => {
|
|
|
10990
11000
|
const keepCount = change[1];
|
|
10991
11001
|
const $$ToDispose = $$Menus.slice(keepCount);
|
|
10992
11002
|
for (const $ToDispose of $$ToDispose) {
|
|
10993
|
-
remove$
|
|
11003
|
+
remove$2($ToDispose);
|
|
10994
11004
|
}
|
|
10995
11005
|
$$Menus.length = keepCount;
|
|
10996
11006
|
break;
|