@lvce-editor/renderer-process 7.0.1 → 7.0.2

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.
@@ -5813,19 +5813,22 @@ const IpcChildWithModuleWorkerAndMessagePort$1 = {
5813
5813
  const isTransferrable = value => {
5814
5814
  return value instanceof MessagePort;
5815
5815
  };
5816
+ const UntransferrableValue = {};
5816
5817
  const walkValue = (value, transferrables) => {
5817
5818
  if (!value) {
5818
5819
  return value;
5819
5820
  }
5820
5821
  if (isTransferrable(value)) {
5821
5822
  transferrables.push(value);
5822
- return undefined;
5823
+ return UntransferrableValue;
5823
5824
  }
5824
5825
  if (Array.isArray(value)) {
5825
5826
  const newItems = [];
5826
5827
  for (const item of value) {
5827
5828
  const newItem = walkValue(item, transferrables);
5828
- newItems.push(newItem);
5829
+ if (newItem !== UntransferrableValue) {
5830
+ newItems.push(newItem);
5831
+ }
5829
5832
  }
5830
5833
  return newItems;
5831
5834
  }
@@ -5833,7 +5836,9 @@ const walkValue = (value, transferrables) => {
5833
5836
  const newObject = Object.create(null);
5834
5837
  for (const [key, property] of Object.entries(value)) {
5835
5838
  const newValue = walkValue(property, transferrables);
5836
- newObject[key] = newValue;
5839
+ if (newValue !== UntransferrableValue) {
5840
+ newObject[key] = newValue;
5841
+ }
5837
5842
  }
5838
5843
  return newObject;
5839
5844
  }
@@ -5857,7 +5862,7 @@ const listen$1 = () => {
5857
5862
  const signal$1 = global => {
5858
5863
  global.postMessage(readyMessage);
5859
5864
  };
5860
- class IpcChildWithWindow extends Ipc {
5865
+ class IpcChildWithElectronWindow extends Ipc {
5861
5866
  getData(event) {
5862
5867
  return getData$1(event);
5863
5868
  }
@@ -5892,9 +5897,9 @@ class IpcChildWithWindow extends Ipc {
5892
5897
  }
5893
5898
  }
5894
5899
  const wrap$3 = window => {
5895
- return new IpcChildWithWindow(window);
5900
+ return new IpcChildWithElectronWindow(window);
5896
5901
  };
5897
- const IpcChildWithElectronWindow = {
5902
+ const IpcChildWithElectronWindow$1 = {
5898
5903
  __proto__: null,
5899
5904
  listen: listen$1,
5900
5905
  signal: signal$1,
@@ -6240,7 +6245,7 @@ const create$x = async ({
6240
6245
  if (!isElectron) {
6241
6246
  throw new Error('Electron api was requested but is not available');
6242
6247
  }
6243
- const windowIpc = IpcChildWithElectronWindow.wrap(window);
6248
+ const windowIpc = IpcChildWithElectronWindow$1.wrap(window);
6244
6249
  handleIpcOnce(windowIpc);
6245
6250
  const webContentsIds = await invokeAndTransfer$1(windowIpc, 'CreateMessagePort.createMessagePort', ipcId, port);
6246
6251
  return webContentsIds;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "7.0.1",
3
+ "version": "7.0.2",
4
4
  "description": "",
5
5
  "main": "dist/diffWorkerMain.js",
6
6
  "type": "module",