@lvce-editor/embeds-worker 4.12.0 → 4.13.1

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.
@@ -1024,19 +1024,30 @@ const capturePage = id => {
1024
1024
  return invokeAny$1('ElectronWebContentsView.capturePage', id);
1025
1025
  };
1026
1026
 
1027
- const ERR_ABORTED = 'ERR_ABORTED';
1028
- const ERR_FAILED = 'ERR_FAILED';
1027
+ const createWebContentsView$1 = async (restoreId, ipcId) => {
1028
+ return invokeAny$1('ElectronWebContentsView.createWebContentsView', ipcId, restoreId);
1029
+ };
1030
+
1031
+ const CreateWebContentsView = {
1032
+ __proto__: null,
1033
+ createWebContentsView: createWebContentsView$1
1034
+ };
1029
1035
 
1030
1036
  const invoke = (method, ...params) => invoke$2(method, ...params);
1031
1037
  const invokeAndTransfer = (method, ...params) => invokeAndTransfer$1(method, ...params);
1032
1038
  const set = (...args) => set$2(...args);
1033
1039
  const invokeAny = (method, ...params) => invoke$2(method, ...params);
1034
1040
 
1035
- const createWebContentsView = async (restoreId, fallThroughKeyBindings) => {
1036
- // @ts-ignore
1037
- const id = await invoke$1('ElectronWebContentsView.createWebContentsView', restoreId, fallThroughKeyBindings);
1038
- return id;
1041
+ const forwardWebContentsViewEvent = (key, includeId = true) => (id, ...args) => {
1042
+ return invoke(key, ...(includeId ? [id, ...args] : args));
1039
1043
  };
1044
+
1045
+ const ERR_ABORTED = 'ERR_ABORTED';
1046
+ const ERR_FAILED = 'ERR_FAILED';
1047
+
1048
+ const {
1049
+ createWebContentsView
1050
+ } = CreateWebContentsView;
1040
1051
  const disposeWebContentsView = id => {
1041
1052
  return invoke$1('ElectronWebContentsView.disposeWebContentsView', id);
1042
1053
  };
@@ -1125,13 +1136,11 @@ const setFallthroughKeyBindings = async (id, fallthroughKeybindings) => {
1125
1136
  const getStats = (id, fallthroughKeybindings) => {
1126
1137
  return invoke$1('ElectronWebContentsView.getStats', id, fallthroughKeybindings);
1127
1138
  };
1128
- const forwardEvent = key => (id, ...args) => {
1129
- return invoke(key, ...args);
1130
- };
1131
- const handleDidNavigate = forwardEvent('ElectronBrowserView.handleDidNavigate');
1132
- const handleTitleUpdated = forwardEvent('ElectronBrowserView.handleTitleUpdated');
1133
- const handleWillNavigate = forwardEvent('ElectronBrowserView.handleWillNavigate');
1134
- const handleContextMenu = forwardEvent('ElectronBrowserView.handleContextMenu');
1139
+ const handleDidNavigate = forwardWebContentsViewEvent('ElectronBrowserView.handleDidNavigate');
1140
+ const handlePageFaviconUpdated = forwardWebContentsViewEvent('ElectronBrowserView.handlePageFaviconUpdated');
1141
+ const handleTitleUpdated = forwardWebContentsViewEvent('ElectronBrowserView.handleTitleUpdated');
1142
+ const handleWillNavigate = forwardWebContentsViewEvent('ElectronBrowserView.handleWillNavigate');
1143
+ const handleContextMenu = forwardWebContentsViewEvent('ElectronBrowserView.handleContextMenu', false);
1135
1144
 
1136
1145
  const exit = () => {
1137
1146
  globalThis.close();
@@ -1202,6 +1211,7 @@ const commandMap = {
1202
1211
  'ElectronWebContentsView.handleContextMenu': handleContextMenu,
1203
1212
  'ElectronWebContentsView.handleDidNavigate': handleDidNavigate,
1204
1213
  'ElectronWebContentsView.handleLogin': handleLogin,
1214
+ 'ElectronWebContentsView.handlePageFaviconUpdated': handlePageFaviconUpdated,
1205
1215
  'ElectronWebContentsView.handleTitleUpdated': handleTitleUpdated,
1206
1216
  'ElectronWebContentsView.handleWillNavigate': handleWillNavigate,
1207
1217
  'ElectronWebContentsView.hide': hide,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/embeds-worker",
3
- "version": "4.12.0",
3
+ "version": "4.13.1",
4
4
  "description": "Web Worker to manage electron webcontent views in Lvce Editor",
5
5
  "repository": {
6
6
  "type": "git",