@lvce-editor/panel-worker 2.10.1 → 2.10.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.
@@ -1641,8 +1641,13 @@ const set = rpc => {
1641
1641
  state.connected = true;
1642
1642
  };
1643
1643
 
1644
+ const rendererWorkerCommands = new Set(['handleClickClose', 'handleClickMaximize', 'handleClickUnmaximize']);
1644
1645
  const handleMessagePort = async (port, viewletCommandMap) => {
1645
1646
  const executeViewletCommand = async (uid, command, ...args) => {
1647
+ if (rendererWorkerCommands.has(command)) {
1648
+ await invoke$1('Viewlet.executeViewletCommand', uid, command, ...args);
1649
+ return;
1650
+ }
1646
1651
  const fn = viewletCommandMap[`Panel.${command}`];
1647
1652
  if (typeof fn !== 'function') {
1648
1653
  throw new TypeError(`Viewlet command not found: ${command}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/panel-worker",
3
- "version": "2.10.1",
3
+ "version": "2.10.2",
4
4
  "description": "Panel Worker",
5
5
  "repository": {
6
6
  "type": "git",