@lvce-editor/embeds-worker 4.12.0 → 4.13.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.
@@ -1024,14 +1024,18 @@ 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';
1029
-
1030
1027
  const invoke = (method, ...params) => invoke$2(method, ...params);
1031
1028
  const invokeAndTransfer = (method, ...params) => invokeAndTransfer$1(method, ...params);
1032
1029
  const set = (...args) => set$2(...args);
1033
1030
  const invokeAny = (method, ...params) => invoke$2(method, ...params);
1034
1031
 
1032
+ const forwardWebContentsViewEvent = (key, includeId = true) => (id, ...args) => {
1033
+ return invoke(key, ...(includeId ? [id, ...args] : args));
1034
+ };
1035
+
1036
+ const ERR_ABORTED = 'ERR_ABORTED';
1037
+ const ERR_FAILED = 'ERR_FAILED';
1038
+
1035
1039
  const createWebContentsView = async (restoreId, fallThroughKeyBindings) => {
1036
1040
  // @ts-ignore
1037
1041
  const id = await invoke$1('ElectronWebContentsView.createWebContentsView', restoreId, fallThroughKeyBindings);
@@ -1125,13 +1129,11 @@ const setFallthroughKeyBindings = async (id, fallthroughKeybindings) => {
1125
1129
  const getStats = (id, fallthroughKeybindings) => {
1126
1130
  return invoke$1('ElectronWebContentsView.getStats', id, fallthroughKeybindings);
1127
1131
  };
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');
1132
+ const handleDidNavigate = forwardWebContentsViewEvent('ElectronBrowserView.handleDidNavigate');
1133
+ const handlePageFaviconUpdated = forwardWebContentsViewEvent('ElectronBrowserView.handlePageFaviconUpdated');
1134
+ const handleTitleUpdated = forwardWebContentsViewEvent('ElectronBrowserView.handleTitleUpdated');
1135
+ const handleWillNavigate = forwardWebContentsViewEvent('ElectronBrowserView.handleWillNavigate');
1136
+ const handleContextMenu = forwardWebContentsViewEvent('ElectronBrowserView.handleContextMenu', false);
1135
1137
 
1136
1138
  const exit = () => {
1137
1139
  globalThis.close();
@@ -1202,6 +1204,7 @@ const commandMap = {
1202
1204
  'ElectronWebContentsView.handleContextMenu': handleContextMenu,
1203
1205
  'ElectronWebContentsView.handleDidNavigate': handleDidNavigate,
1204
1206
  'ElectronWebContentsView.handleLogin': handleLogin,
1207
+ 'ElectronWebContentsView.handlePageFaviconUpdated': handlePageFaviconUpdated,
1205
1208
  'ElectronWebContentsView.handleTitleUpdated': handleTitleUpdated,
1206
1209
  'ElectronWebContentsView.handleWillNavigate': handleWillNavigate,
1207
1210
  '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.0",
4
4
  "description": "Web Worker to manage electron webcontent views in Lvce Editor",
5
5
  "repository": {
6
6
  "type": "git",