@lvce-editor/status-bar-worker 1.8.0 → 1.10.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.
@@ -1008,8 +1008,9 @@ const WebWorkerRpcClient = {
1008
1008
  create: create$4
1009
1009
  };
1010
1010
 
1011
- const Button = 'button';
1011
+ const Button$1 = 'button';
1012
1012
 
1013
+ const Button = 1;
1013
1014
  const Div = 4;
1014
1015
  const Text = 12;
1015
1016
 
@@ -1216,6 +1217,11 @@ const getMatchingItem = (itemsLeft, itemsRight, name) => {
1216
1217
  return undefined;
1217
1218
  };
1218
1219
 
1220
+ const handleClickExtensionStatusBarItem = async name => {
1221
+ // @ts-ignore
1222
+ await invoke$1(`ExtensionHostStatusBar.executeCommand`, name);
1223
+ };
1224
+
1219
1225
  const handleClickNotification = async () => {
1220
1226
  // TODO toggle notifications
1221
1227
  };
@@ -1224,7 +1230,7 @@ const handleClickProblems = async () => {
1224
1230
  // @ts-ignore
1225
1231
  await invoke('Layout.showPanel');
1226
1232
  // @ts-ignore
1227
- await invoke('Panel.selectView', 'Problems');
1233
+ await invoke('Panel.toggleView', 'Problems');
1228
1234
  };
1229
1235
 
1230
1236
  const Notifications = 'Notifications';
@@ -1244,9 +1250,10 @@ const handleClick = async (state, name) => {
1244
1250
  }
1245
1251
  if (item.name === Notifications) {
1246
1252
  await handleClickNotification();
1247
- }
1248
- if (item.name === Problems) {
1253
+ } else if (item.name === Problems) {
1249
1254
  await handleClickProblems();
1255
+ } else {
1256
+ await handleClickExtensionStatusBarItem(name);
1250
1257
  }
1251
1258
  // TODO
1252
1259
  // sendExtensionWorker([/* statusBarItemHandleClick */ 7657, /* name */ name])
@@ -1321,7 +1328,7 @@ const itemRightUpdate = (state, newItem) => {
1321
1328
 
1322
1329
  const OnStatusBarItem = 'onStatusBarItem';
1323
1330
 
1324
- const GetStatusBarItems = 'ExtensionHost.getStatusBarItems';
1331
+ const GetStatusBarItems = 'ExtensionHost.getStatusBarItems2';
1325
1332
 
1326
1333
  const activateByEvent = event => {
1327
1334
  return activateByEvent$1(event);
@@ -1359,7 +1366,7 @@ const toUiStatusBarItem = extensionHostStatusBarItem => {
1359
1366
  return {
1360
1367
  command: extensionHostStatusBarItem.command || '',
1361
1368
  icon: extensionHostStatusBarItem.icon || '',
1362
- name: extensionHostStatusBarItem.id || '',
1369
+ name: extensionHostStatusBarItem.id || extensionHostStatusBarItem.name || '',
1363
1370
  text: extensionHostStatusBarItem.text || '',
1364
1371
  tooltip: extensionHostStatusBarItem.tooltip || ''
1365
1372
  };
@@ -1435,10 +1442,10 @@ const getStatusBarItemVirtualDom = statusBarItem => {
1435
1442
  childCount: 1,
1436
1443
  className: StatusBarItem,
1437
1444
  name,
1438
- role: Button,
1445
+ role: Button$1,
1439
1446
  tabIndex: -1,
1440
1447
  title: tooltip,
1441
- type: Div
1448
+ type: Button
1442
1449
  }, text(statusBarItem.text)];
1443
1450
  };
1444
1451
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/status-bar-worker",
3
- "version": "1.8.0",
3
+ "version": "1.10.0",
4
4
  "description": "Status Bar Worker",
5
5
  "repository": {
6
6
  "type": "git",