@lvce-editor/panel-worker 2.10.4 → 2.10.5

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.
@@ -1646,12 +1646,17 @@ const layoutCommands = {
1646
1646
  handleClickMaximize: 'Layout.maximizePanel',
1647
1647
  handleClickUnmaximize: 'Layout.unmaximizePanel'
1648
1648
  };
1649
+ const forwardLayoutCommand = layoutCommand => {
1650
+ setTimeout(() => {
1651
+ void invoke('Viewlet.forwardRendererWorkerCommand', layoutCommand);
1652
+ }, 0);
1653
+ };
1649
1654
  const handleMessagePort = async (port, viewletCommandMap) => {
1650
1655
  const executeViewletCommand = async (uid, command, ...args) => {
1651
1656
  const layoutCommand = layoutCommands[command];
1652
1657
  if (layoutCommand) {
1653
- // The layout command can resize this worker before it completes.
1654
- void invoke$1(layoutCommand);
1658
+ // Forward after this direct event returns so layout callbacks use an idle worker RPC.
1659
+ forwardLayoutCommand(layoutCommand);
1655
1660
  return;
1656
1661
  }
1657
1662
  const fn = viewletCommandMap[`Panel.${command}`];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/panel-worker",
3
- "version": "2.10.4",
3
+ "version": "2.10.5",
4
4
  "description": "Panel Worker",
5
5
  "repository": {
6
6
  "type": "git",